| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

DayaBay::SimTrack Class Reference

Records the history of a tracked particle. More...

#include <SimTrack.h>

Collaboration diagram for DayaBay::SimTrack:

[legend]
List of all members.

Public Types

typedef std::map< int, unsigned
int > 
descendants_map
 Type for map of unrecorded descendants.
typedef std::vector< DayaBay::SimVertex * > vertex_list
 Type for list of vertices.

Public Member Functions

 SimTrack ()
 Default Constructor.
virtual ~SimTrack ()
 Default Destructor.
unsigned int unrecordedDescendants (int pdg) const
 Get number of unrecordeds for given pdg type.
void incrementUnrecordedDescendants (int pdg)
 Increment number of unrecordeds for given pdg type.
void addVertex (DayaBay::SimVertex *v)
 Add a vertex.
std::ostream & fillStream (std::ostream &s) const
 Print the collection.
int trackId () const
 Retrieve const Geant4 track ID.
void setTrackId (int value)
 Update Geant4 track ID.
int parentParticle () const
 Retrieve const PDG code of the immediate parent to this track.
void setParentParticle (int value)
 Update PDG code of the immediate parent to this track.
const DayaBay::SimTrackReferenceancestorTrack () const
 Retrieve const Reference to the parent or ancestor of this track.
void setAncestorTrack (const DayaBay::SimTrackReference &value)
 Update Reference to the parent or ancestor of this track.
const DayaBay::SimVertexReferenceancestorVertex () const
 Retrieve const Reference to the parent or ancestor of this track.
void setAncestorVertex (const DayaBay::SimVertexReference &value)
 Update Reference to the parent or ancestor of this track.
const HepMC::GenParticleprimaryParticle () const
 Retrieve const Pointer to the ancestor primary kinematics particle.
void setPrimaryParticle (const HepMC::GenParticle *value)
 Update Pointer to the ancestor primary kinematics particle.
int particle () const
 Retrieve const PDG code of this track.
void setParticle (int value)
 Update PDG code of this track.
const vertex_listvertices () const
 Retrieve const Pointers to the vertices along this track.
void setVertices (const vertex_list &value)
 Update Pointers to the vertices along this track.
const descendants_mapunrecordedDescendants () const
 Retrieve const Tally of PDG codes for daughter particles that didn't get their own track.
void setUnrecordedDescendants (const descendants_map &value)
 Update Tally of PDG codes for daughter particles that didn't get their own track.

Static Public Member Functions

static void * operator new (size_t size)
 operator new
static void * operator new (size_t size, void *pObj)
 placement operator new it is needed by libstdc++ 3.2.3 (e.g.
static void operator delete (void *p)
 operator delete
static void operator delete (void *p, void *pObj)
 placement operator delete not sure if really needed, but it does not harm

Private Attributes

int m_trackId
 Geant4 track ID.
int m_parentParticle
 PDG code of the immediate parent to this track.
DayaBay::SimTrackReference m_ancestorTrack
 Reference to the parent or ancestor of this track.
DayaBay::SimVertexReference m_ancestorVertex
 Reference to the parent or ancestor of this track.
const HepMC::GenParticlem_primaryParticle
 Pointer to the ancestor primary kinematics particle.
int m_particle
 PDG code of this track.
vertex_list m_vertices
 Pointers to the vertices along this track. Not owned.
descendants_map m_unrecordedDescendants
 Tally of PDG codes for daughter particles that didn't get their own track.

Detailed Description

Records the history of a tracked particle.

Equivalent to a single G4Track.

Author:
tagg@minos.phy.tufts.edu created Mon Apr 11 03:59:58 2011

Definition at line 45 of file SimTrack.h.


Member Typedef Documentation

typedef std::map<int,unsigned int> DayaBay::SimTrack::descendants_map

Type for map of unrecorded descendants.

Definition at line 50 of file SimTrack.h.

typedef std::vector<DayaBay::SimVertex*> DayaBay::SimTrack::vertex_list

Type for list of vertices.

Definition at line 52 of file SimTrack.h.


Constructor & Destructor Documentation

DayaBay::SimTrack::SimTrack (  )  [inline]

Default Constructor.

Definition at line 55 of file SimTrack.h.

00055                : m_trackId(-1),
00056                  m_parentParticle(0),
00057                  m_ancestorTrack(0,-1),
00058                  m_ancestorVertex(0,-1),
00059                  m_primaryParticle(0),
00060                  m_particle(0),
00061                  m_vertices(),
00062                  m_unrecordedDescendants() {}

virtual DayaBay::SimTrack::~SimTrack (  )  [inline, virtual]

Default Destructor.

Definition at line 65 of file SimTrack.h.

00065 {}


Member Function Documentation

unsigned int SimTrack::unrecordedDescendants ( int  pdg  )  const

Get number of unrecordeds for given pdg type.

Return zero if the vector hasn't been expanded to include the type.

Definition at line 27 of file SimTrack.cc.

00028 {
00032   
00033   descendants_map::const_iterator it = m_unrecordedDescendants.find(pdg);
00034   if(it == m_unrecordedDescendants.end()) return 0;
00035   return it->second;
00036 }

void DayaBay::SimTrack::incrementUnrecordedDescendants ( int  pdg  )  [inline]

Increment number of unrecordeds for given pdg type.

Definition at line 284 of file SimTrack.h.

00285 {
00286 
00287           m_unrecordedDescendants[pdg]+=1;
00288         
00289 }

void DayaBay::SimTrack::addVertex ( DayaBay::SimVertex v  )  [inline]

Add a vertex.

Definition at line 291 of file SimTrack.h.

00292 {
00293 
00294           m_vertices.push_back(v);
00295         
00296 }

std::ostream & SimTrack::fillStream ( std::ostream &  s  )  const

Print the collection.

Definition at line 6 of file SimTrack.cc.

00007 {
00008     s << "{ " 
00009       << "trackId :     " << m_trackId << std::endl
00010       << "parentParticle :      " << m_parentParticle << std::endl
00011       << "ancestorTrack :       " << m_ancestorTrack << std::endl
00012       << "ancestorVertex :      " << m_ancestorVertex << std::endl
00013       << "particle :    " << m_particle << std::endl
00014       << "vertices :    " << m_vertices.size() << std::endl
00015       << "unrecordedDescendants :       " << std::endl 
00016       << " }";
00017     for(descendants_map::const_iterator it = m_unrecordedDescendants.begin();
00018         it != m_unrecordedDescendants.end(); ++it) {
00019         s << "pdg " << it->first << "(" << it->second << ")" << "  ";
00020     }
00021     s << std::endl << " }";
00022     return s;
00023 }

int DayaBay::SimTrack::trackId (  )  const [inline]

Retrieve const Geant4 track ID.

Definition at line 204 of file SimTrack.h.

00205 {
00206   return m_trackId;
00207 }

void DayaBay::SimTrack::setTrackId ( int  value  )  [inline]

Update Geant4 track ID.

Definition at line 209 of file SimTrack.h.

00210 {
00211   m_trackId = value;
00212 }

int DayaBay::SimTrack::parentParticle (  )  const [inline]

Retrieve const PDG code of the immediate parent to this track.

Definition at line 214 of file SimTrack.h.

00215 {
00216   return m_parentParticle;
00217 }

void DayaBay::SimTrack::setParentParticle ( int  value  )  [inline]

Update PDG code of the immediate parent to this track.

Definition at line 219 of file SimTrack.h.

00220 {
00221   m_parentParticle = value;
00222 }

const DayaBay::SimTrackReference & DayaBay::SimTrack::ancestorTrack (  )  const [inline]

Retrieve const Reference to the parent or ancestor of this track.

Definition at line 224 of file SimTrack.h.

00225 {
00226   return m_ancestorTrack;
00227 }

void DayaBay::SimTrack::setAncestorTrack ( const DayaBay::SimTrackReference value  )  [inline]

Update Reference to the parent or ancestor of this track.

Definition at line 229 of file SimTrack.h.

00230 {
00231   m_ancestorTrack = value;
00232 }

const DayaBay::SimVertexReference & DayaBay::SimTrack::ancestorVertex (  )  const [inline]

Retrieve const Reference to the parent or ancestor of this track.

Definition at line 234 of file SimTrack.h.

00235 {
00236   return m_ancestorVertex;
00237 }

void DayaBay::SimTrack::setAncestorVertex ( const DayaBay::SimVertexReference value  )  [inline]

Update Reference to the parent or ancestor of this track.

Definition at line 239 of file SimTrack.h.

00240 {
00241   m_ancestorVertex = value;
00242 }

const HepMC::GenParticle * DayaBay::SimTrack::primaryParticle (  )  const [inline]

Retrieve const Pointer to the ancestor primary kinematics particle.

Definition at line 244 of file SimTrack.h.

00245 {
00246   return m_primaryParticle;
00247 }

void DayaBay::SimTrack::setPrimaryParticle ( const HepMC::GenParticle value  )  [inline]

Update Pointer to the ancestor primary kinematics particle.

Definition at line 249 of file SimTrack.h.

00250 {
00251   m_primaryParticle = value;
00252 }

int DayaBay::SimTrack::particle (  )  const [inline]

Retrieve const PDG code of this track.

Definition at line 254 of file SimTrack.h.

00255 {
00256   return m_particle;
00257 }

void DayaBay::SimTrack::setParticle ( int  value  )  [inline]

Update PDG code of this track.

Definition at line 259 of file SimTrack.h.

00260 {
00261   m_particle = value;
00262 }

const DayaBay::SimTrack::vertex_list & DayaBay::SimTrack::vertices (  )  const [inline]

Retrieve const Pointers to the vertices along this track.

Not owned.

Definition at line 264 of file SimTrack.h.

00265 {
00266   return m_vertices;
00267 }

void DayaBay::SimTrack::setVertices ( const vertex_list value  )  [inline]

Update Pointers to the vertices along this track.

Not owned.

Definition at line 269 of file SimTrack.h.

00270 {
00271   m_vertices = value;
00272 }

const DayaBay::SimTrack::descendants_map & DayaBay::SimTrack::unrecordedDescendants (  )  const [inline]

Retrieve const Tally of PDG codes for daughter particles that didn't get their own track.

Definition at line 274 of file SimTrack.h.

00275 {
00276   return m_unrecordedDescendants;
00277 }

void DayaBay::SimTrack::setUnrecordedDescendants ( const descendants_map value  )  [inline]

Update Tally of PDG codes for daughter particles that didn't get their own track.

Definition at line 279 of file SimTrack.h.

00280 {
00281   m_unrecordedDescendants = value;
00282 }

static void* DayaBay::SimTrack::operator new ( size_t  size  )  [inline, static]

operator new

Definition at line 146 of file SimTrack.h.

00147     {
00148       return ( sizeof(SimTrack) == size ? 
00149                boost::singleton_pool<SimTrack, sizeof(SimTrack)>::malloc() :
00150                ::operator new(size) );
00151     }

static void* DayaBay::SimTrack::operator new ( size_t  size,
void *  pObj 
) [inline, static]

placement operator new it is needed by libstdc++ 3.2.3 (e.g.

in std::vector) it is not needed in libstdc++ >= 3.4

Definition at line 156 of file SimTrack.h.

00157     {
00158       return ::operator new (size,pObj);
00159     }

static void DayaBay::SimTrack::operator delete ( void *  p  )  [inline, static]

operator delete

Definition at line 162 of file SimTrack.h.

00163     {
00164       boost::singleton_pool<SimTrack, sizeof(SimTrack)>::is_from(p) ?
00165       boost::singleton_pool<SimTrack, sizeof(SimTrack)>::free(p) :
00166       ::operator delete(p);
00167     }

static void DayaBay::SimTrack::operator delete ( void *  p,
void *  pObj 
) [inline, static]

placement operator delete not sure if really needed, but it does not harm

Definition at line 171 of file SimTrack.h.

00172     {
00173       ::operator delete (p, pObj);
00174     }


Member Data Documentation

int DayaBay::SimTrack::m_trackId [private]

Geant4 track ID.

Definition at line 180 of file SimTrack.h.

int DayaBay::SimTrack::m_parentParticle [private]

PDG code of the immediate parent to this track.

Definition at line 181 of file SimTrack.h.

DayaBay::SimTrackReference DayaBay::SimTrack::m_ancestorTrack [private]

Reference to the parent or ancestor of this track.

Definition at line 182 of file SimTrack.h.

DayaBay::SimVertexReference DayaBay::SimTrack::m_ancestorVertex [private]

Reference to the parent or ancestor of this track.

Definition at line 183 of file SimTrack.h.

const HepMC::GenParticle* DayaBay::SimTrack::m_primaryParticle [private]

Pointer to the ancestor primary kinematics particle.

Definition at line 184 of file SimTrack.h.

int DayaBay::SimTrack::m_particle [private]

PDG code of this track.

Definition at line 185 of file SimTrack.h.

vertex_list DayaBay::SimTrack::m_vertices [private]

Pointers to the vertices along this track. Not owned.

Definition at line 186 of file SimTrack.h.

descendants_map DayaBay::SimTrack::m_unrecordedDescendants [private]

Tally of PDG codes for daughter particles that didn't get their own track.

Definition at line 187 of file SimTrack.h.


The documentation for this class was generated from the following files:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:31:30 2011 for SimEvent by doxygen 1.4.7