Event::McParticle Class Reference

#include <McParticle.h>

Inheritance diagram for Event::McParticle:

ContainedObject List of all members.

Public Types

typedef int StdHepId
 DECAYED = 1
 DECAYFLT = 1<<1
 Decayed by generator.
 PRIMARY = 1<<2
 Decayed in flight.
 LEAF = 1<<3
 primary particle
 ERROR = 1<<4
 this particle is a leaf in the particle tree
enum  StatusBits {
  DECAYED = 1, DECAYFLT = 1<<1, PRIMARY = 1<<2, LEAF = 1<<3,
  ERROR = 1<<4
}
 status bits modeled More...

Public Member Functions

virtual const CLID & clID () const
 McParticle ()
 Constructors.
virtual ~McParticle ()
 Destructor.
void init (McParticle *mother, StdHepId id, unsigned int statusBits, const HepLorentzVector &initialMomentum, const HepLorentzVector &finalMomentum, const HepLorentzVector &initialPosition, const HepLorentzVector &finalPosition, const std::string process="")
void initialize (StdHepId id, unsigned int statusBits, const HepLorentzVector &initialMomentum, const HepLorentzVector &initialPosition, const std::string process="")
 Set the initial attributes of the McParticle.
void initialize (McParticle *mother, StdHepId id, unsigned int statusBits, const HepLorentzVector &initialMomentum, const HepLorentzVector &initialPosition, const std::string process="")
void finalize (const HepLorentzVector &finalPosition)
 Set the final attributes of the McParticle.
StdHepId particleProperty () const
 Retrieve particle property.
unsigned int statusFlags () const
 retrieve all of status flags for const object
void addStatusFlag (unsigned int flag)
 add a new flag to the status flags
bool primaryParticle () const
 Retrieve whether this is a primary particle.
bool leafParticle () const
 Retrieve whether this is a leave particle.
bool decayFromGenerator () const
 Retrieve whether decayed from generator.
bool decayInFlight () const
 Retrieve wheter decayed in flight.
void setVertexIndex0 (int index0)
 methods for setting and getting vertex indexes
int vertexIndex0 () const
void setVertexIndex1 (int index1)
int vertexIndex1 () const
void setTrackIndex (int trackIndex)
int trackIndex () const
const HepLorentzVector & initialPosition () const
 Retrieve pointer to the start, end vertex positions.
const HepLorentzVector & finalPosition () const
const HepLorentzVector & initialFourMomentum () const
const McParticlemother () const
 access to the mother particle
void setMother (const SmartRef< McParticle > m)
 set the mother particle
void addDaughter (const SmartRef< McParticle > d)
 add a daugther particle to this particle
void removeDaughter (const SmartRef< McParticle > mcPart)
 Remove daughters when in prune mode.
const SmartRefVector< McParticle > & daughterList () const
 access to the list of daughters

Static Public Member Functions

static const CLID & classID ()

Private Attributes

StdHepId m_particleID
 particle property (such as electron or proton or ....) ID
int m_trackIndex
int m_vertexIndex0
 the index for the vertex where the particle starts
int m_vertexIndex1
 the index for the vertex where the particle stops
unsigned long m_statusFlags
 Bit-field status flag.
HepLorentzVector m_initialPosition
 Initial position.
HepLorentzVector m_finalPosition
 Final position.
HepLorentzVector m_initialFourMomentum
 Initial 4-momentum.
HepLorentzVector m_finalFourMomentum
 Final 4-momentum.
SmartRef< McParticlem_mother
 Pointer to mother particle.
SmartRefVector< McParticlem_daughters
 Vector of pointers to daughter particles.
std::string m_process
 String with the process name that poduces this particle.

Detailed Description

Definition at line 28 of file McParticle.h.


Member Typedef Documentation

typedef int Event::McParticle::StdHepId

Definition at line 30 of file McParticle.h.


Member Enumeration Documentation

enum Event::McParticle::StatusBits

status bits modeled

Enumerator:
DECAYED 
DECAYFLT  Decayed by generator.
PRIMARY  Decayed in flight.
LEAF  primary particle
ERROR  this particle is a leaf in the particle tree

Definition at line 34 of file McParticle.h.

00034                    {  
00035         DECAYED =1 ,    
00036         DECAYFLT=1<<1,  
00037         PRIMARY =1<<2,  
00038         LEAF = 1<<3,    
00039         ERROR = 1<<4    
00040         //MISSED=  1<<2,  //! Does not hit detector
00041         //NOINTER =1<<3,  //! Traverses detector w/o interacting 
00042         //STOPPED =1<<4,  //! Energy below cut; other bits may say why 
00043         //INTERACT=1<<5,  //! Interacted, no further decision to be made
00044         //INTSHDEP=1<<6,  //! Interacted, further decision depends on ! selection of shower deposition  
00045         //PRIMARY =1<<7,  //! primary particle 
00046         //SWERROR =1<<8,  //! Error occurred in swimming the track 
00047         //BCKSPL=1<<9,    //! The particle is backsplashed from the CAL back in the TKR region
00048         //POSHIT =1<<10,     //! The particle released a hit a PositionHit detector
00049         //NOTTRACK=1<<11, //! Not tracked by user request 
00050         //Swum =   1<<12,  //! this particle was produced by the swimmer
00051         //LEAF = 1<<13     //! this particle is a leaf in the particle tree 
00052     };


Constructor & Destructor Documentation

Event::McParticle::McParticle (  )  [inline]

Constructors.

Definition at line 58 of file McParticle.h.

00058                  :
00059       m_statusFlags(0)
00060     {}

virtual Event::McParticle::~McParticle (  )  [inline, virtual]

Destructor.

Definition at line 62 of file McParticle.h.

00062 {}


Member Function Documentation

void Event::McParticle::addDaughter ( const SmartRef< McParticle d  )  [inline]

add a daugther particle to this particle

Definition at line 147 of file McParticle.h.

References m_daughters.

00147 {m_daughters.push_back(d);};

void Event::McParticle::addStatusFlag ( unsigned int  flag  )  [inline]

add a new flag to the status flags

Definition at line 103 of file McParticle.h.

References m_statusFlags.

Referenced by McParticleCnv::TObjectToDataObject().

00103 {m_statusFlags |= flag;};

static const CLID& Event::McParticle::classID (  )  [inline, static]

Definition at line 56 of file McParticle.h.

References CLID_McParticle.

Referenced by clID().

00056 { return CLID_McParticle; }

virtual const CLID& Event::McParticle::clID (  )  const [inline, virtual]

Definition at line 55 of file McParticle.h.

References classID().

00055 { return McParticle::classID(); }

const SmartRefVector<McParticle>& Event::McParticle::daughterList (  )  const [inline]

access to the list of daughters

Definition at line 164 of file McParticle.h.

Referenced by PrintMcInfo::printPartInf(), and PrintMcInfo::printTree().

00164 {return m_daughters;};

bool McParticle::decayFromGenerator (  )  const

Retrieve whether decayed from generator.

Definition at line 25 of file McParticle.cxx.

00026 {
00027   return (m_statusFlags & DECAYED)==DECAYED;
00028 }

bool McParticle::decayInFlight (  )  const

Retrieve wheter decayed in flight.

Definition at line 31 of file McParticle.cxx.

00032 {
00033   return (m_statusFlags & DECAYFLT)==DECAYFLT;
00034 }

void McParticle::finalize ( const HepLorentzVector &  finalPosition  ) 

Set the final attributes of the McParticle.

Definition at line 85 of file McParticle.cxx.

Referenced by McParticleCnv::TObjectToDataObject().

00086 {
00087     m_finalPosition = finalPosition;
00088 }

const HepLorentzVector & McParticle::finalPosition (  )  const

Definition at line 99 of file McParticle.cxx.

00100 {
00101     return m_finalPosition;
00102 }

void McParticle::init ( McParticle mother,
StdHepId  id,
unsigned int  statusBits,
const HepLorentzVector &  initialMomentum,
const HepLorentzVector &  finalMomentum,
const HepLorentzVector &  initialPosition,
const HepLorentzVector &  finalPosition,
const std::string  process = "" 
)

completely initialize a newed object. No other way to set most attributes. it will be replaced by the following methods (left here just in the transition)

Definition at line 36 of file McParticle.cxx.

00044 {
00045   initialize(mother, id, flags, initialMomentum, initialPosition,process);
00046   //finalize(finalMomentum, finalPosition);
00047   finalize(finalPosition);
00048 }

const HepLorentzVector & McParticle::initialFourMomentum (  )  const

Definition at line 103 of file McParticle.cxx.

00104 {
00105     return m_initialFourMomentum;
00106 }

void McParticle::initialize ( McParticle mother,
StdHepId  id,
unsigned int  statusBits,
const HepLorentzVector &  initialMomentum,
const HepLorentzVector &  initialPosition,
const std::string  process = "" 
)

Definition at line 63 of file McParticle.cxx.

References m_daughters.

00068 {
00069     m_mother = mother;
00070     m_particleID = id;
00071     m_statusFlags = flags;
00072     m_initialFourMomentum = initialMomentum;
00073     m_initialPosition = initialPosition;
00074     m_process = process;
00075     if( mother != this) mother->m_daughters.push_back(this);
00076 }

void McParticle::initialize ( StdHepId  id,
unsigned int  statusBits,
const HepLorentzVector &  initialMomentum,
const HepLorentzVector &  initialPosition,
const std::string  process = "" 
)

Set the initial attributes of the McParticle.

Definition at line 50 of file McParticle.cxx.

Referenced by McParticleCnv::TObjectToDataObject().

00055 {
00056     m_particleID = id;
00057     m_statusFlags = flags;
00058     m_initialFourMomentum = initialMomentum;
00059     m_initialPosition = initialPosition;
00060     m_process = process;
00061 }

const HepLorentzVector & McParticle::initialPosition (  )  const

Retrieve pointer to the start, end vertex positions.

Definition at line 95 of file McParticle.cxx.

Referenced by PrintMcInfo::printPartInf().

00096 {
00097     return m_initialPosition;
00098 }

bool McParticle::leafParticle (  )  const

Retrieve whether this is a leave particle.

Definition at line 19 of file McParticle.cxx.

Referenced by BesMcTruthWriter::AddMother().

00020 {
00021   return (m_statusFlags & LEAF)==LEAF;
00022 }

const McParticle & McParticle::mother (  )  const

access to the mother particle

Definition at line 117 of file McParticle.cxx.

Referenced by QCMCFilter::findD0Decay().

00118 {
00119     return *m_mother;
00120 }

McParticle::StdHepId McParticle::particleProperty (  )  const

Retrieve particle property.

Definition at line 7 of file McParticle.cxx.

Referenced by QCMCFilter::execute(), QCMCFilter::findD0Decay(), mcPartPrtLess(), and PrintMcInfo::printPartInf().

00008 {
00009   return m_particleID;
00010 }

bool McParticle::primaryParticle (  )  const

Retrieve whether this is a primary particle.

Retrieve whether this is a primary particle: there's no mother for a primary particle

Definition at line 13 of file McParticle.cxx.

Referenced by PrintMcInfo::printPartInf(), and PrintMcInfo::printTree().

00014 {
00015   return (m_statusFlags & PRIMARY)==PRIMARY;
00016 }

void McParticle::removeDaughter ( const SmartRef< McParticle mcPart  ) 

Remove daughters when in prune mode.

Definition at line 123 of file McParticle.cxx.

00124 {
00125     SmartRefVector<Event::McParticle>::iterator daughtIter;
00126     for(daughtIter = m_daughters.begin();daughtIter != m_daughters.end();daughtIter++)
00127     {
00128         if (mcPart == *daughtIter)
00129         {
00130             m_daughters.erase(daughtIter);
00131             break;
00132         }
00133     }
00134     return;
00135 }

void McParticle::setMother ( const SmartRef< McParticle m  ) 

set the mother particle

Definition at line 90 of file McParticle.cxx.

00091 {
00092   m_mother = m;
00093 }

void Event::McParticle::setTrackIndex ( int  trackIndex  )  [inline]

Definition at line 128 of file McParticle.h.

References m_trackIndex.

Referenced by McParticleCnv::TObjectToDataObject().

00128 { m_trackIndex = trackIndex; }

void Event::McParticle::setVertexIndex0 ( int  index0  )  [inline]

methods for setting and getting vertex indexes

Definition at line 119 of file McParticle.h.

References m_vertexIndex0.

Referenced by McParticleCnv::TObjectToDataObject().

00119 { m_vertexIndex0 = index0; }

void Event::McParticle::setVertexIndex1 ( int  index1  )  [inline]

Definition at line 123 of file McParticle.h.

References m_vertexIndex1.

Referenced by McParticleCnv::TObjectToDataObject().

00123 { m_vertexIndex1 = index1; }

unsigned int McParticle::statusFlags (  )  const

retrieve all of status flags for const object

Definition at line 112 of file McParticle.cxx.

00112                                          {
00113     return m_statusFlags;
00114 }

int Event::McParticle::trackIndex (  )  const [inline]

Definition at line 131 of file McParticle.h.

References m_trackIndex.

Referenced by PrintMcInfo::execute(), and PrintMcInfo::printPartInf().

00131 {return m_trackIndex;}

int Event::McParticle::vertexIndex0 (  )  const [inline]

Definition at line 121 of file McParticle.h.

References m_vertexIndex0.

00121 {return m_vertexIndex0;}

int Event::McParticle::vertexIndex1 (  )  const [inline]

Definition at line 125 of file McParticle.h.

References m_vertexIndex1.

Referenced by BesMcTruthWriter::AddMother().

00125 {return m_vertexIndex1;}


Member Data Documentation

SmartRefVector<McParticle> Event::McParticle::m_daughters [private]

Vector of pointers to daughter particles.

Definition at line 194 of file McParticle.h.

Referenced by addDaughter(), and initialize().

HepLorentzVector Event::McParticle::m_finalFourMomentum [private]

Final 4-momentum.

Definition at line 190 of file McParticle.h.

HepLorentzVector Event::McParticle::m_finalPosition [private]

Final position.

Definition at line 185 of file McParticle.h.

HepLorentzVector Event::McParticle::m_initialFourMomentum [private]

Initial 4-momentum.

Definition at line 188 of file McParticle.h.

HepLorentzVector Event::McParticle::m_initialPosition [private]

Initial position.

Definition at line 183 of file McParticle.h.

SmartRef<McParticle> Event::McParticle::m_mother [private]

Pointer to mother particle.

Definition at line 192 of file McParticle.h.

StdHepId Event::McParticle::m_particleID [private]

particle property (such as electron or proton or ....) ID

Definition at line 164 of file McParticle.h.

std::string Event::McParticle::m_process [private]

String with the process name that poduces this particle.

Definition at line 196 of file McParticle.h.

unsigned long Event::McParticle::m_statusFlags [private]

Bit-field status flag.

Definition at line 181 of file McParticle.h.

Referenced by addStatusFlag().

int Event::McParticle::m_trackIndex [private]

Definition at line 172 of file McParticle.h.

Referenced by setTrackIndex(), and trackIndex().

int Event::McParticle::m_vertexIndex0 [private]

the index for the vertex where the particle starts

Definition at line 175 of file McParticle.h.

Referenced by setVertexIndex0(), and vertexIndex0().

int Event::McParticle::m_vertexIndex1 [private]

the index for the vertex where the particle stops

Definition at line 178 of file McParticle.h.

Referenced by setVertexIndex1(), and vertexIndex1().


Generated on Tue Nov 29 23:36:33 2016 for BOSS_7.0.2 by  doxygen 1.4.7