BOSS 7.0.7
BESIII Offline Software System
Loading...
Searching...
No Matches
TTrackHEP Class Reference

A class to represent a GEN_HEPEVT particle in tracking. More...

#include <TTrackHEP.h>

Public Member Functions

virtual ~TTrackHEP ()
 Destructor.
 
std::string name (void) const
 returns name.
 
unsigned id (void) const
 returns an id started from 0.
 
int status (void) const
 returns status.
 
int pType (void) const
 returns particle type.
 
TTrackHEPmother (void) const
 returns a pointer to a mother.
 
TTrackHEPchild (unsigned i) const
 returns a pointer to i'th child.
 
const HepLorentzVector & p (void) const
 returns momentum vector.
 
const Hep3Vector & v (void) const
 returns position vector.
 
void dump (const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
 dumps debug information.
 
const AList< TMDCWireHitMC > & hits (void) const
 returns a list of TMDCWireHitMC.
 
const Gen_hepevtgen (void) const
 returns a pointer to Gen_hepevt.
 

Static Public Member Functions

static const AList< TTrackHEP > & list (void)
 returns a list of TTrackHEP's.
 
static TTrackHEPhep (const Gen_hepevt *)
 returns a pointer to TTrackHEP of given Gen_hepevt.
 

Friends

void TMDC::updateMC (void)
 

Detailed Description

A class to represent a GEN_HEPEVT particle in tracking.

Definition at line 37 of file TTrackHEP.h.

Constructor & Destructor Documentation

◆ ~TTrackHEP()

TTrackHEP::~TTrackHEP ( )
virtual

Destructor.

Definition at line 55 of file TTrackHEP.cxx.

55 {
56}

Member Function Documentation

◆ child()

TTrackHEP * TTrackHEP::child ( unsigned  i) const
inline

returns a pointer to i'th child.

Definition at line 146 of file TTrackHEP.h.

146 {
147 return _children[i];
148}

◆ dump()

void TTrackHEP::dump ( const std::string &  message = std::string(""),
const std::string &  prefix = std::string("") 
) const

dumps debug information.

Definition at line 59 of file TTrackHEP.cxx.

59 {
60 std::cout << pre;
61
62 std::cout << id() << ":";
63 std::cout << pType() << ":";
64 if (_mother) std::cout << _mother->id();
65 else std::cout << "-";
66 std::cout << ":";
67 std::cout << _p << ":" << _v;
68 std::cout << std::endl;
69}
unsigned id(void) const
returns an id started from 0.
Definition: TTrackHEP.h:122
int pType(void) const
returns particle type.
Definition: TTrackHEP.h:134

◆ gen()

const Gen_hepevt * TTrackHEP::gen ( void  ) const
inline

returns a pointer to Gen_hepevt.

Definition at line 184 of file TTrackHEP.h.

184 {
185 return _hep;
186}

Referenced by TTrackManager::saveMCTables().

◆ hep()

TTrackHEP * TTrackHEP::hep ( const Gen_hepevt h)
inlinestatic

returns a pointer to TTrackHEP of given Gen_hepevt.

Definition at line 164 of file TTrackHEP.h.

164 {
165 if (! h) return 0;
166 unsigned id = h->id - 1;
167 return _list[id];
168}

Referenced by TMDCWireHitMC::TMDCWireHitMC().

◆ hits()

const AList< TMDCWireHitMC > & TTrackHEP::hits ( void  ) const
inline

returns a list of TMDCWireHitMC.

Definition at line 172 of file TTrackHEP.h.

172 {
173 return _hits;
174}

◆ id()

unsigned TTrackHEP::id ( void  ) const
inline

returns an id started from 0.

Definition at line 122 of file TTrackHEP.h.

122 {
123 return _hep->id - 1;
124}

Referenced by Dump(), TMDCWireHit::dump(), dump(), hep(), TLine0::refine(), and TMLine::refine().

◆ list()

const AList< TTrackHEP > & TTrackHEP::list ( void  )
static

returns a list of TTrackHEP's.

Definition at line 72 of file TTrackHEP.cxx.

72 {
73 return _list;
74}

Referenced by Links2HEP(), and TMDC::updateMC().

◆ mother()

TTrackHEP * TTrackHEP::mother ( void  ) const
inline

returns a pointer to a mother.

Definition at line 140 of file TTrackHEP.h.

140 {
141 return _mother;
142}

◆ name()

std::string TTrackHEP::name ( void  ) const
inline

returns name.

Definition at line 178 of file TTrackHEP.h.

178 {
179 return "mc" + itostring(id());
180}

◆ p()

const HepLorentzVector & TTrackHEP::p ( void  ) const
inline

returns momentum vector.

Definition at line 152 of file TTrackHEP.h.

152 {
153 return _p;
154}

◆ pType()

int TTrackHEP::pType ( void  ) const
inline

returns particle type.

Definition at line 134 of file TTrackHEP.h.

134 {
135 return _hep->idhep;
136}

Referenced by TPerfectFinder::doit(), and dump().

◆ status()

int TTrackHEP::status ( void  ) const
inline

returns status.

Definition at line 128 of file TTrackHEP.h.

128 {
129 return _hep->isthep;
130}

◆ v()

const Hep3Vector & TTrackHEP::v ( void  ) const
inline

returns position vector.

Definition at line 158 of file TTrackHEP.h.

158 {
159 return _v;
160}

Friends And Related Function Documentation

◆ TMDC::updateMC

void TMDC::updateMC ( void  )
friend

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