BOSS 7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
PdtEntry.h
Go to the documentation of this file.
1// -*- Mode: C++ -*-
2//
3// PdtEntry.h - data class for a particle
4//
5// Copyright (C) 1993 The Board of Trustees of The Leland Stanford
6//
7// History:
8// Migration for BESIII MDC
9// Junior University. All Rights Reserved.
10//
11// $Id: PdtEntry.h,v 1.2 2009/12/23 02:59:56 zhangy Exp $
12//
13// A PdtEntry is an almost pure data class. It holds the data for a particle,
14// ie. mass, width, lifetime, decay modes, etc. The sign of quantities is
15// defined to be that of the particle (not antiparticle).
16//
17// Modified:
18// Luca Lista 04 oct 96 lookup by different types, not by integer
19//
20// See Also
21// AntiPData, PData, Pdt, DecayMode
22
23#ifndef _PDTENTRY_HH_
24#define _PDTENTRY_HH_
25
26#include "MdcRecoUtil/PdtLund.h"
27#include "MdcRecoUtil/PdtPdg.h"
29#include "MdcRecoUtil/PdtPid.h"
30#include <vector>
31using std::vector;
32
33#include <iosfwd>
34class DecayMode;
35
37{
38public:
39 // in the constructor, spin is in units of hbar, charge in unit of e.
40 // mass and width are in GeV.
41 PdtEntry(const char *name, PdtLund::LundType code, float spin,
42 float charge, float mass, float width=0, float massCut=0);
43 PdtEntry(const char *name, PdtGeant::GeantType code, float spin,
44 float charge, float mass, float width=0, float massCut=0);
45 PdtEntry(const char *name, PdtPdg::PdgType code, float spin,
46 float charge, float mass, float width=0, float massCut=0);
47
48 virtual ~PdtEntry();
49
50 void printOn(std::ostream& str) const;
51 void printBFOn(std::ostream& str) const;
52
53 const char *name() const {return _name;}
54 float charge() const {return _charge;}
55 float mass() const {return _mass;}
56 float width() const {return _width;}
57 float widthCut() const {return _widthCut;}
58 float lifetime() const {return _lifetime;}
59 float spin() const {return _spin;}
60 float sumBR() const {return _sumBR;}
61 const vector<DecayMode*> *decayList() const { return _decayList; }
62 void addDecay(float bf, vector<PdtEntry*> *kids );
63 PdtLund::LundType lundId() const { return _lundId;};
64 PdtPdg::PdgType pdgId() const { return _pdgId; }
66 PdtPid::PidType pidId() const { return _pidId; };
68 bool operator==(const PdtEntry &) const;
69 bool operator<(const PdtEntry &) const;
70
71 // new functionality (GHM 05/99) : get the conjugate PdtEntry
72 const PdtEntry* conjugate() const;
73
74protected:
75 char *_name; // name
76 float _mass; // nominal mass (GeV)
77 float _width; // width (0 if stable) (GeV)
78 float _lifetime; // c*tau, in standard length units (cm)
79 float _spin; // spin, in units of hbar
80 float _charge; // charge, in units of e
81 float _widthCut; // used to limit range of B-W
82 float _sumBR; // total branching ratio (should be 1.)
83 vector<DecayMode*>* _decayList; // pointer to linked list of decayers
89 /*mutable*/ const PdtEntry* _conjugate; // this particle conjugate
90};
91
92#endif
PdtPid::PidNeutralType pidNeutId() const
Definition: PdtEntry.h:67
float _width
Definition: PdtEntry.h:77
PdtLund::LundType _lundId
Definition: PdtEntry.h:84
virtual ~PdtEntry()
Definition: PdtEntry.cxx:164
const PdtEntry * conjugate() const
Definition: PdtEntry.cxx:174
float _sumBR
Definition: PdtEntry.h:82
float _spin
Definition: PdtEntry.h:79
PdtGeant::GeantType _geantId
Definition: PdtEntry.h:86
PdtGeant::GeantType geantId() const
Definition: PdtEntry.h:65
float mass() const
Definition: PdtEntry.h:55
vector< DecayMode * > * _decayList
Definition: PdtEntry.h:83
float widthCut() const
Definition: PdtEntry.h:57
PdtPid::PidType pidId() const
Definition: PdtEntry.h:66
bool operator<(const PdtEntry &) const
Definition: PdtEntry.cxx:188
float charge() const
Definition: PdtEntry.h:54
float _lifetime
Definition: PdtEntry.h:78
char * _name
Definition: PdtEntry.h:75
void addDecay(float bf, vector< PdtEntry * > *kids)
Definition: PdtEntry.cxx:105
PdtLund::LundType lundId() const
Definition: PdtEntry.h:63
float spin() const
Definition: PdtEntry.h:59
float _widthCut
Definition: PdtEntry.h:81
bool operator==(const PdtEntry &) const
Definition: PdtEntry.cxx:183
PdtPdg::PdgType pdgId() const
Definition: PdtEntry.h:64
const char * name() const
Definition: PdtEntry.h:53
PdtPdg::PdgType _pdgId
Definition: PdtEntry.h:85
void printOn(std::ostream &str) const
Definition: PdtEntry.cxx:112
float _charge
Definition: PdtEntry.h:80
PdtPid::PidType _pidId
Definition: PdtEntry.h:87
float _mass
Definition: PdtEntry.h:76
float lifetime() const
Definition: PdtEntry.h:58
const vector< DecayMode * > * decayList() const
Definition: PdtEntry.h:61
float sumBR() const
Definition: PdtEntry.h:60
PdtPid::PidNeutralType _pidNeutId
Definition: PdtEntry.h:88
void printBFOn(std::ostream &str) const
Definition: PdtEntry.cxx:157
const PdtEntry * _conjugate
Definition: PdtEntry.h:89
float width() const
Definition: PdtEntry.h:56
LundType
Definition: PdtLund.h:11
PdgType
Definition: PdtPdg.h:8
PidType
Definition: PdtPid.h:11
PidNeutralType
Definition: PdtPid.h:22