PdtEntry Class Reference

#include <PdtEntry.h>

List of all members.

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

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

Definition at line 36 of file PdtEntry.h.


Constructor & Destructor Documentation

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.

References _name.

00048                                                             :
00049   _name(new char[strlen(name) + 1]),
00050   _mass(mass),
00051   _width(width),
00052   _lifetime( (width>0.0) ? (HBARC / width) : FLT_MAX ),
00053   _spin(spin),
00054   _charge(charge),
00055   _widthCut( (massCut > 0.0) ? massCut : 2.0*width ),
00056   _sumBR(0.0),
00057   _decayList(new vector<DecayMode*>),
00058   _lundId(code),
00059   _pdgId(Pdt::pdgId(code)),
00060   _geantId(Pdt::geantId(code)),
00061   _pidId(Pdt::pidId(code)),
00062   _pidNeutId(Pdt::pidNeutId(code)),
00063   _conjugate(0)
00064 { strcpy(_name, name); }

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.

References _name.

00068                                                             :
00069   _name(new char[strlen(name) + 1]),
00070   _mass(mass),
00071   _width(width),
00072   _lifetime( (width>0.0) ? (HBARC / width) : FLT_MAX ),
00073   _spin(spin),
00074   _charge(charge),
00075   _widthCut( (massCut > 0.0) ? massCut : 2.0*width ),
00076   _sumBR(0.0),
00077   _decayList(new vector<DecayMode*>),
00078   _lundId(Pdt::lundId(code)),
00079   _pdgId(Pdt::pdgId(code)),
00080   _geantId(code),
00081   _pidId(Pdt::pidId(code)),
00082   _pidNeutId(Pdt::pidNeutId(code)),
00083   _conjugate(0)
00084 { strcpy(_name, name); }

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.

References _name.

00087                                                             :
00088   _name(new char[strlen(name) + 1]),
00089   _mass(mass),
00090   _width(width),
00091   _lifetime( (width>0.0) ? (HBARC / width) : FLT_MAX ),
00092   _spin(spin),
00093   _charge(charge),
00094   _widthCut( (massCut > 0.0) ? massCut : 2.0*width ),
00095   _sumBR(0.0),
00096   _decayList(new vector<DecayMode*>),
00097   _lundId(Pdt::lundId(code)),
00098   _pdgId(code),
00099   _geantId(Pdt::geantId(code)),
00100   _pidId(Pdt::pidId(code)),
00101   _pidNeutId(Pdt::pidNeutId(code)),
00102   _conjugate(0)
00103 { strcpy(_name, name); }

PdtEntry::~PdtEntry (  )  [virtual]

Definition at line 164 of file PdtEntry.cxx.

References _decayList, _name, and iter().

00165 {
00166   vector<DecayMode*>::iterator iter=_decayList->begin();
00167   while ( iter != _decayList->end() ) { delete *iter; ++iter; }
00168   _decayList->clear(); 
00169   delete _decayList;
00170   delete [] _name;
00171 }


Member Function Documentation

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

Definition at line 105 of file PdtEntry.cxx.

References _decayList, _sumBR, and EventModel::MC::DecayMode.

Referenced by Pdt::addDecay().

00106 {
00107   _decayList->push_back(new DecayMode(bf, kids));
00108   _sumBR += bf;
00109 }

float PdtEntry::charge (  )  const [inline]

Definition at line 54 of file PdtEntry.h.

References _charge.

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

00054 {return _charge;}

const PdtEntry * PdtEntry::conjugate (  )  const

Definition at line 174 of file PdtEntry.cxx.

References _conjugate, and Pdt::conjugate().

Referenced by Pdt::sameOrConj().

00175 {
00176   if ( ! _conjugate ) {
00177     const_cast<PdtEntry*>(this)->_conjugate = Pdt::conjugate( this );
00178   }
00179   return _conjugate ;
00180 }

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

Definition at line 61 of file PdtEntry.h.

References _decayList.

00061 { return _decayList; }

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

Definition at line 65 of file PdtEntry.h.

References _geantId.

Referenced by Pdt::addParticle().

00065 { return _geantId; };

float PdtEntry::lifetime (  )  const [inline]

Definition at line 58 of file PdtEntry.h.

References _lifetime.

Referenced by Pdt::lifetime().

00058 {return _lifetime;}

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

Definition at line 63 of file PdtEntry.h.

References _lundId.

00063 { return _lundId;};

float PdtEntry::mass ( void   )  const [inline]

Definition at line 55 of file PdtEntry.h.

References _mass.

Referenced by TrkLineRep::arrivalTime(), TrkRep::arrivalTime(), and Pdt::mass().

00055 {return _mass;}

const char* PdtEntry::name (  )  const [inline]

Definition at line 53 of file PdtEntry.h.

References _name.

00053 {return _name;}

bool PdtEntry::operator< ( const PdtEntry  )  const

Definition at line 188 of file PdtEntry.cxx.

References _geantId, and _lundId.

00189 {
00190   return (_lundId < theOther._lundId || 
00191           (_lundId == theOther._lundId && _geantId < theOther._geantId));
00192 }

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

Definition at line 183 of file PdtEntry.cxx.

References _geantId, and _lundId.

00184 {
00185   return (theOther._lundId==_lundId && theOther._geantId==_geantId);
00186 }

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

Definition at line 64 of file PdtEntry.h.

References _pdgId.

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

00064 { return _pdgId; }

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

Definition at line 66 of file PdtEntry.h.

References _pidId.

Referenced by Pdt::addParticle().

00066 { return _pidId; };

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

Definition at line 67 of file PdtEntry.h.

References _pidNeutId.

Referenced by Pdt::addParticle().

00067 { return _pidNeutId; };

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

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

float PdtEntry::spin (  )  const [inline]

Definition at line 59 of file PdtEntry.h.

References _spin.

Referenced by Pdt::spin().

00059 {return _spin;}

float PdtEntry::sumBR (  )  const [inline]

Definition at line 60 of file PdtEntry.h.

References _sumBR.

00060 {return _sumBR;}

float PdtEntry::width (  )  const [inline]

Definition at line 56 of file PdtEntry.h.

References _width.

Referenced by Pdt::width().

00056 {return _width;}

float PdtEntry::widthCut (  )  const [inline]

Definition at line 57 of file PdtEntry.h.

References _widthCut.

00057 {return _widthCut;}


Member Data Documentation

float PdtEntry::_charge [protected]

Definition at line 80 of file PdtEntry.h.

Referenced by charge().

const PdtEntry* PdtEntry::_conjugate [protected]

Definition at line 89 of file PdtEntry.h.

Referenced by conjugate().

vector<DecayMode*>* PdtEntry::_decayList [protected]

Definition at line 83 of file PdtEntry.h.

Referenced by addDecay(), decayList(), and ~PdtEntry().

PdtGeant::GeantType PdtEntry::_geantId [protected]

Definition at line 86 of file PdtEntry.h.

Referenced by geantId(), operator<(), and operator==().

float PdtEntry::_lifetime [protected]

Definition at line 78 of file PdtEntry.h.

Referenced by lifetime().

PdtLund::LundType PdtEntry::_lundId [protected]

Definition at line 84 of file PdtEntry.h.

Referenced by lundId(), operator<(), and operator==().

float PdtEntry::_mass [protected]

Definition at line 76 of file PdtEntry.h.

Referenced by mass().

char* PdtEntry::_name [protected]

Definition at line 75 of file PdtEntry.h.

Referenced by name(), PdtEntry(), and ~PdtEntry().

PdtPdg::PdgType PdtEntry::_pdgId [protected]

Definition at line 85 of file PdtEntry.h.

Referenced by pdgId().

PdtPid::PidType PdtEntry::_pidId [protected]

Definition at line 87 of file PdtEntry.h.

Referenced by pidId().

PdtPid::PidNeutralType PdtEntry::_pidNeutId [protected]

Definition at line 88 of file PdtEntry.h.

Referenced by pidNeutId().

float PdtEntry::_spin [protected]

Definition at line 79 of file PdtEntry.h.

Referenced by spin().

float PdtEntry::_sumBR [protected]

Definition at line 82 of file PdtEntry.h.

Referenced by addDecay(), and sumBR().

float PdtEntry::_width [protected]

Definition at line 77 of file PdtEntry.h.

Referenced by width().

float PdtEntry::_widthCut [protected]

Definition at line 81 of file PdtEntry.h.

Referenced by widthCut().


Generated on Tue Nov 29 23:20:39 2016 for BOSS_7.0.2 by  doxygen 1.4.7