BOSS 7.0.5
BESIII Offline Software System
Loading...
Searching...
No Matches
PdtEntry Class Reference

#include <PdtEntry.h>

Public Member Functions

 PdtEntry (const char *name, PdtLund::LundType code, float spin, float charge, float mass, float width=0, float massCut=0)
 
 PdtEntry (const char *name, PdtGeant::GeantType code, float spin, float charge, float mass, float width=0, float massCut=0)
 
 PdtEntry (const char *name, PdtPdg::PdgType code, float spin, float charge, float mass, float width=0, float massCut=0)
 
virtual ~PdtEntry ()
 
void printOn (std::ostream &str) const
 
void printBFOn (std::ostream &str) const
 
const char * name () const
 
float charge () const
 
float mass () const
 
float width () const
 
float widthCut () const
 
float lifetime () const
 
float spin () const
 
float sumBR () const
 
const vector< DecayMode * > * decayList () const
 
void addDecay (float bf, vector< PdtEntry * > *kids)
 
PdtLund::LundType lundId () const
 
PdtPdg::PdgType pdgId () const
 
PdtGeant::GeantType geantId () const
 
PdtPid::PidType pidId () const
 
PdtPid::PidNeutralType pidNeutId () const
 
bool operator== (const PdtEntry &) const
 
bool operator< (const PdtEntry &) const
 
const PdtEntryconjugate () const
 
 PdtEntry (const char *name, PdtLund::LundType code, float spin, float charge, float mass, float width=0, float massCut=0)
 
 PdtEntry (const char *name, PdtGeant::GeantType code, float spin, float charge, float mass, float width=0, float massCut=0)
 
 PdtEntry (const char *name, PdtPdg::PdgType code, float spin, float charge, float mass, float width=0, float massCut=0)
 
virtual ~PdtEntry ()
 
void printOn (std::ostream &str) const
 
void printBFOn (std::ostream &str) const
 
const char * name () const
 
float charge () const
 
float mass () const
 
float width () const
 
float widthCut () const
 
float lifetime () const
 
float spin () const
 
float sumBR () const
 
const vector< DecayMode * > * decayList () const
 
void addDecay (float bf, vector< PdtEntry * > *kids)
 
PdtLund::LundType lundId () const
 
PdtPdg::PdgType pdgId () const
 
PdtGeant::GeantType geantId () const
 
PdtPid::PidType pidId () const
 
PdtPid::PidNeutralType pidNeutId () const
 
bool operator== (const PdtEntry &) const
 
bool operator< (const PdtEntry &) const
 
const PdtEntryconjugate () const
 

Protected Attributes

char * _name
 
float _mass
 
float _width
 
float _lifetime
 
float _spin
 
float _charge
 
float _widthCut
 
float _sumBR
 
vector< DecayMode * > * _decayList
 
PdtLund::LundType _lundId
 
PdtPdg::PdgType _pdgId
 
PdtGeant::GeantType _geantId
 
PdtPid::PidType _pidId
 
PdtPid::PidNeutralType _pidNeutId
 
const PdtEntry_conjugate
 

Detailed Description

Constructor & Destructor Documentation

◆ PdtEntry() [1/6]

PdtEntry::PdtEntry ( const char *  name,
PdtLund::LundType  code,
float  spin,
float  charge,
float  mass,
float  width = 0,
float  massCut = 0 
)

Definition at line 47 of file PdtEntry.cxx.

48 :
49 _name(new char[strlen(name) + 1]),
50 _mass(mass),
52 _lifetime( (width>0.0) ? (HBARC / width) : FLT_MAX ),
53 _spin(spin),
55 _widthCut( (massCut > 0.0) ? massCut : 2.0*width ),
56 _sumBR(0.0),
57 _decayList(new vector<DecayMode*>),
58 _lundId(code),
59 _pdgId(Pdt::pdgId(code)),
61 _pidId(Pdt::pidId(code)),
63 _conjugate(0)
64{ strcpy(_name, name); }
#define HBARC
Definition: Pdt.cxx:51
static PdtPid::PidType pidId(const PdtLund::LundType)
Definition: Pdt.cxx:449
static PdtGeant::GeantType geantId(const PdtLund::LundType)
Definition: Pdt.cxx:427
static PdtPdg::PdgType pdgId(const PdtLund::LundType)
Definition: Pdt.cxx:608
static PdtPid::PidNeutralType pidNeutId(const PdtLund::LundType)
Definition: Pdt.cxx:473

◆ PdtEntry() [2/6]

PdtEntry::PdtEntry ( const char *  name,
PdtGeant::GeantType  code,
float  spin,
float  charge,
float  mass,
float  width = 0,
float  massCut = 0 
)

Definition at line 67 of file PdtEntry.cxx.

68 :
69 _name(new char[strlen(name) + 1]),
70 _mass(mass),
72 _lifetime( (width>0.0) ? (HBARC / width) : FLT_MAX ),
73 _spin(spin),
75 _widthCut( (massCut > 0.0) ? massCut : 2.0*width ),
76 _sumBR(0.0),
77 _decayList(new vector<DecayMode*>),
78 _lundId(Pdt::lundId(code)),
79 _pdgId(Pdt::pdgId(code)),
80 _geantId(code),
81 _pidId(Pdt::pidId(code)),
83 _conjugate(0)
84{ strcpy(_name, name); }
static PdtLund::LundType lundId(const PdtGeant::GeantType)
Definition: Pdt.cxx:413

◆ PdtEntry() [3/6]

PdtEntry::PdtEntry ( const char *  name,
PdtPdg::PdgType  code,
float  spin,
float  charge,
float  mass,
float  width = 0,
float  massCut = 0 
)

Definition at line 86 of file PdtEntry.cxx.

87 :
88 _name(new char[strlen(name) + 1]),
89 _mass(mass),
91 _lifetime( (width>0.0) ? (HBARC / width) : FLT_MAX ),
92 _spin(spin),
94 _widthCut( (massCut > 0.0) ? massCut : 2.0*width ),
95 _sumBR(0.0),
96 _decayList(new vector<DecayMode*>),
97 _lundId(Pdt::lundId(code)),
98 _pdgId(code),
100 _pidId(Pdt::pidId(code)),
102 _conjugate(0)
103{ strcpy(_name, name); }

◆ ~PdtEntry() [1/2]

PdtEntry::~PdtEntry ( )
virtual

Definition at line 164 of file PdtEntry.cxx.

165{
166 vector<DecayMode*>::iterator iter=_decayList->begin();
167 while ( iter != _decayList->end() ) { delete *iter; ++iter; }
168 _decayList->clear();
169 delete _decayList;
170 delete [] _name;
171}
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)

◆ PdtEntry() [4/6]

PdtEntry::PdtEntry ( const char *  name,
PdtLund::LundType  code,
float  spin,
float  charge,
float  mass,
float  width = 0,
float  massCut = 0 
)

◆ PdtEntry() [5/6]

PdtEntry::PdtEntry ( const char *  name,
PdtGeant::GeantType  code,
float  spin,
float  charge,
float  mass,
float  width = 0,
float  massCut = 0 
)

◆ PdtEntry() [6/6]

PdtEntry::PdtEntry ( const char *  name,
PdtPdg::PdgType  code,
float  spin,
float  charge,
float  mass,
float  width = 0,
float  massCut = 0 
)

◆ ~PdtEntry() [2/2]

virtual PdtEntry::~PdtEntry ( )
virtual

Member Function Documentation

◆ addDecay() [1/2]

void PdtEntry::addDecay ( float  bf,
vector< PdtEntry * > *  kids 
)

Definition at line 105 of file PdtEntry.cxx.

106{
107 _decayList->push_back(new DecayMode(bf, kids));
108 _sumBR += bf;
109}

Referenced by Pdt::addDecay().

◆ addDecay() [2/2]

void PdtEntry::addDecay ( float  bf,
vector< PdtEntry * > *  kids 
)

◆ charge() [1/2]

float PdtEntry::charge ( ) const
inline

Definition at line 54 of file InstallArea/include/MdcRecoUtil/MdcRecoUtil/PdtEntry.h.

54{return _charge;}

Referenced by Pdt::addParticle(), and Pdt::charge().

◆ charge() [2/2]

float PdtEntry::charge ( ) const
inline

◆ conjugate() [1/2]

const PdtEntry * PdtEntry::conjugate ( ) const

Definition at line 174 of file PdtEntry.cxx.

175{
176 if ( ! _conjugate ) {
177 const_cast<PdtEntry*>(this)->_conjugate = Pdt::conjugate( this );
178 }
179 return _conjugate ;
180}
static const PdtEntry * conjugate(const PdtEntry *)
Definition: Pdt.cxx:681

Referenced by Pdt::sameOrConj().

◆ conjugate() [2/2]

const PdtEntry * PdtEntry::conjugate ( ) const

◆ decayList() [1/2]

const vector< DecayMode * > * PdtEntry::decayList ( ) const
inline

Definition at line 61 of file InstallArea/include/MdcRecoUtil/MdcRecoUtil/PdtEntry.h.

61{ return _decayList; }

◆ decayList() [2/2]

const vector< DecayMode * > * PdtEntry::decayList ( ) const
inline

◆ geantId() [1/2]

PdtGeant::GeantType PdtEntry::geantId ( ) const
inline

Definition at line 65 of file InstallArea/include/MdcRecoUtil/MdcRecoUtil/PdtEntry.h.

65{ return _geantId; };

Referenced by Pdt::addParticle().

◆ geantId() [2/2]

PdtGeant::GeantType PdtEntry::geantId ( ) const
inline

◆ lifetime() [1/2]

float PdtEntry::lifetime ( ) const
inline

Definition at line 58 of file InstallArea/include/MdcRecoUtil/MdcRecoUtil/PdtEntry.h.

58{return _lifetime;}

Referenced by Pdt::lifetime().

◆ lifetime() [2/2]

float PdtEntry::lifetime ( ) const
inline

◆ lundId() [1/2]

PdtLund::LundType PdtEntry::lundId ( ) const
inline

Definition at line 63 of file InstallArea/include/MdcRecoUtil/MdcRecoUtil/PdtEntry.h.

63{ return _lundId;};

◆ lundId() [2/2]

PdtLund::LundType PdtEntry::lundId ( ) const
inline

◆ mass() [1/2]

float PdtEntry::mass ( ) const
inline

◆ mass() [2/2]

float PdtEntry::mass ( ) const
inline

◆ name() [1/2]

const char * PdtEntry::name ( ) const
inline

Definition at line 53 of file InstallArea/include/MdcRecoUtil/MdcRecoUtil/PdtEntry.h.

53{return _name;}

Referenced by PdtEntry().

◆ name() [2/2]

const char * PdtEntry::name ( ) const
inline

◆ operator<() [1/2]

bool PdtEntry::operator< ( const PdtEntry theOther) const

Definition at line 188 of file PdtEntry.cxx.

189{
190 return (_lundId < theOther._lundId ||
191 (_lundId == theOther._lundId && _geantId < theOther._geantId));
192}

◆ operator<() [2/2]

bool PdtEntry::operator< ( const PdtEntry ) const

◆ operator==() [1/2]

bool PdtEntry::operator== ( const PdtEntry theOther) const

Definition at line 183 of file PdtEntry.cxx.

184{
185 return (theOther._lundId==_lundId && theOther._geantId==_geantId);
186}

◆ operator==() [2/2]

bool PdtEntry::operator== ( const PdtEntry ) const

◆ pdgId() [1/2]

PdtPdg::PdgType PdtEntry::pdgId ( ) const
inline

Definition at line 64 of file InstallArea/include/MdcRecoUtil/MdcRecoUtil/PdtEntry.h.

64{ return _pdgId; }

Referenced by Pdt::conjugate(), and Pdt::sameOrConj().

◆ pdgId() [2/2]

PdtPdg::PdgType PdtEntry::pdgId ( ) const
inline

◆ pidId() [1/2]

PdtPid::PidType PdtEntry::pidId ( ) const
inline

Definition at line 66 of file InstallArea/include/MdcRecoUtil/MdcRecoUtil/PdtEntry.h.

66{ return _pidId; };

Referenced by Pdt::addParticle().

◆ pidId() [2/2]

PdtPid::PidType PdtEntry::pidId ( ) const
inline

◆ pidNeutId() [1/2]

PdtPid::PidNeutralType PdtEntry::pidNeutId ( ) const
inline

Definition at line 67 of file InstallArea/include/MdcRecoUtil/MdcRecoUtil/PdtEntry.h.

67{ return _pidNeutId; };

Referenced by Pdt::addParticle().

◆ pidNeutId() [2/2]

PdtPid::PidNeutralType PdtEntry::pidNeutId ( ) const
inline

◆ printBFOn() [1/2]

void PdtEntry::printBFOn ( std::ostream &  str) const

◆ printBFOn() [2/2]

void PdtEntry::printBFOn ( std::ostream &  str) const

◆ printOn() [1/2]

void PdtEntry::printOn ( std::ostream &  str) const

◆ printOn() [2/2]

void PdtEntry::printOn ( std::ostream &  str) const

◆ spin() [1/2]

float PdtEntry::spin ( ) const
inline

Definition at line 59 of file InstallArea/include/MdcRecoUtil/MdcRecoUtil/PdtEntry.h.

59{return _spin;}

Referenced by Pdt::spin().

◆ spin() [2/2]

float PdtEntry::spin ( ) const
inline

◆ sumBR() [1/2]

float PdtEntry::sumBR ( ) const
inline

Definition at line 60 of file InstallArea/include/MdcRecoUtil/MdcRecoUtil/PdtEntry.h.

60{return _sumBR;}

◆ sumBR() [2/2]

float PdtEntry::sumBR ( ) const
inline

◆ width() [1/2]

float PdtEntry::width ( ) const
inline

Definition at line 56 of file InstallArea/include/MdcRecoUtil/MdcRecoUtil/PdtEntry.h.

56{return _width;}

Referenced by Pdt::width().

◆ width() [2/2]

float PdtEntry::width ( ) const
inline

◆ widthCut() [1/2]

float PdtEntry::widthCut ( ) const
inline

Definition at line 57 of file InstallArea/include/MdcRecoUtil/MdcRecoUtil/PdtEntry.h.

57{return _widthCut;}

◆ widthCut() [2/2]

float PdtEntry::widthCut ( ) const
inline

Member Data Documentation

◆ _charge

float PdtEntry::_charge
protected

Definition at line 80 of file InstallArea/include/MdcRecoUtil/MdcRecoUtil/PdtEntry.h.

Referenced by charge().

◆ _conjugate

const PdtEntry * PdtEntry::_conjugate
protected

Definition at line 89 of file InstallArea/include/MdcRecoUtil/MdcRecoUtil/PdtEntry.h.

Referenced by conjugate().

◆ _decayList

vector< DecayMode * > * PdtEntry::_decayList
protected

◆ _geantId

PdtGeant::GeantType PdtEntry::_geantId
protected

◆ _lifetime

float PdtEntry::_lifetime
protected

Definition at line 78 of file InstallArea/include/MdcRecoUtil/MdcRecoUtil/PdtEntry.h.

Referenced by lifetime().

◆ _lundId

PdtLund::LundType PdtEntry::_lundId
protected

◆ _mass

float PdtEntry::_mass
protected

Definition at line 76 of file InstallArea/include/MdcRecoUtil/MdcRecoUtil/PdtEntry.h.

Referenced by mass().

◆ _name

char * PdtEntry::_name
protected

◆ _pdgId

PdtPdg::PdgType PdtEntry::_pdgId
protected

Definition at line 85 of file InstallArea/include/MdcRecoUtil/MdcRecoUtil/PdtEntry.h.

Referenced by pdgId().

◆ _pidId

PdtPid::PidType PdtEntry::_pidId
protected

Definition at line 87 of file InstallArea/include/MdcRecoUtil/MdcRecoUtil/PdtEntry.h.

Referenced by pidId().

◆ _pidNeutId

PdtPid::PidNeutralType PdtEntry::_pidNeutId
protected

Definition at line 88 of file InstallArea/include/MdcRecoUtil/MdcRecoUtil/PdtEntry.h.

Referenced by pidNeutId().

◆ _spin

float PdtEntry::_spin
protected

Definition at line 79 of file InstallArea/include/MdcRecoUtil/MdcRecoUtil/PdtEntry.h.

Referenced by spin().

◆ _sumBR

float PdtEntry::_sumBR
protected

Definition at line 82 of file InstallArea/include/MdcRecoUtil/MdcRecoUtil/PdtEntry.h.

Referenced by addDecay(), and sumBR().

◆ _width

float PdtEntry::_width
protected

Definition at line 77 of file InstallArea/include/MdcRecoUtil/MdcRecoUtil/PdtEntry.h.

Referenced by width().

◆ _widthCut

float PdtEntry::_widthCut
protected

Definition at line 81 of file InstallArea/include/MdcRecoUtil/MdcRecoUtil/PdtEntry.h.

Referenced by widthCut().


The documentation for this class was generated from the following files: