#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. | |
TTrackHEP * | mother (void) const |
returns a pointer to a mother. | |
TTrackHEP * | child (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_hepevt * | gen (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 TTrackHEP * | hep (const Gen_hepevt *) |
returns a pointer to TTrackHEP of given Gen_hepevt. | |
Private Member Functions | |
TTrackHEP (const Gen_hepevt *) | |
Constructor. | |
Static Private Member Functions | |
static void | update (void) |
updates information. | |
Private Attributes | |
const Gen_hepevt * | _hep |
TTrackHEP * | _mother |
AList< TTrackHEP > | _children |
const HepLorentzVector | _p |
const Hep3Vector | _v |
AList< TMDCWireHitMC > | _hits |
Static Private Attributes | |
static AList< TTrackHEP > | _list = AList<TTrackHEP>() |
Friends | |
void | TMDC::updateMC (void) |
Definition at line 37 of file TTrackHEP.h.
TTrackHEP::TTrackHEP | ( | const Gen_hepevt * | ) | [private] |
Constructor.
Definition at line 43 of file TTrackHEP.cxx.
References _children, _hep, _list, _mother, Gen_hepevt::id, and Gen_hepevt::mother.
Referenced by update().
00044 : _hep(h), 00045 _mother(0), 00046 _p(h->P[0], h->P[1], h->P[2], h->P[3]), 00047 _v(h->V[0], h->V[1], h->V[2]) { 00048 if (_hep->mother != 0) { 00049 // _mother = _list[_hep->mother-1]; 00050 _mother = _list[_hep->mother->id]; 00051 _mother->_children.append(this); 00052 } 00053 }
TTrackHEP::~TTrackHEP | ( | ) | [virtual] |
TTrackHEP * TTrackHEP::child | ( | unsigned | i | ) | const [inline] |
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.
References _mother, _p, _v, id(), and pType().
00059 { 00060 std::cout << pre; 00061 00062 std::cout << id() << ":"; 00063 std::cout << pType() << ":"; 00064 if (_mother) std::cout << _mother->id(); 00065 else std::cout << "-"; 00066 std::cout << ":"; 00067 std::cout << _p << ":" << _v; 00068 std::cout << std::endl; 00069 }
const Gen_hepevt * TTrackHEP::gen | ( | void | ) | const [inline] |
returns a pointer to Gen_hepevt.
Definition at line 184 of file TTrackHEP.h.
References _hep.
Referenced by TTrackManager::saveMCTables().
00184 { 00185 return _hep; 00186 }
TTrackHEP * TTrackHEP::hep | ( | const Gen_hepevt * | ) | [inline, static] |
returns a pointer to TTrackHEP of given Gen_hepevt.
Definition at line 164 of file TTrackHEP.h.
References _list, and Gen_hepevt::id.
Referenced by TMDCWireHitMC::TMDCWireHitMC().
const AList< TMDCWireHitMC > & TTrackHEP::hits | ( | void | ) | const [inline] |
returns a list of TMDCWireHitMC.
Definition at line 172 of file TTrackHEP.h.
References _hits.
00172 { 00173 return _hits; 00174 }
unsigned TTrackHEP::id | ( | void | ) | const [inline] |
returns an id started from 0.
Definition at line 122 of file TTrackHEP.h.
References _hep, and Gen_hepevt::id.
Referenced by dump(), TMDCWireHit::dump(), and TConformalFinder::findSegmentsPerfect().
const AList< TTrackHEP > & TTrackHEP::list | ( | void | ) | [static] |
returns a list of TTrackHEP's.
Definition at line 72 of file TTrackHEP.cxx.
References _list.
Referenced by TConformalFinder::findSegmentsPerfect(), Links2HEP(), TrkReco::mcInformation(), and TMDC::updateMC().
00072 { 00073 return _list; 00074 }
TTrackHEP * TTrackHEP::mother | ( | void | ) | const [inline] |
returns a pointer to a mother.
Definition at line 140 of file TTrackHEP.h.
References _mother.
00140 { 00141 return _mother; 00142 }
std::string TTrackHEP::name | ( | void | ) | const [inline] |
const HepLorentzVector & TTrackHEP::p | ( | void | ) | const [inline] |
returns momentum vector.
Definition at line 152 of file TTrackHEP.h.
References _p.
00152 { 00153 return _p; 00154 }
int TTrackHEP::pType | ( | void | ) | const [inline] |
returns particle type.
Definition at line 134 of file TTrackHEP.h.
References _hep, and Gen_hepevt::idhep.
Referenced by TTrackMC::compare(), and dump().
int TTrackHEP::status | ( | void | ) | const [inline] |
returns status.
Definition at line 128 of file TTrackHEP.h.
References _hep, and Gen_hepevt::isthep.
void TTrackHEP::update | ( | void | ) | [static, private] |
updates information.
Definition at line 21 of file TTrackHEP.cxx.
References _list, GenHepevtCol::getGenHepevtCol(), genRecEmupikp::i, and TTrackHEP().
Referenced by TMDC::updateMC().
00021 { 00022 if (_list.length()) HepAListDeleteAll(_list); 00023 00024 // unsigned n = BsCouTab(GEN_HEPEVT); 00025 // std::vector<Gen_hepevt>* genhep = GenHepevtCol::getGenHepevtCol(); 00026 unsigned n = GenHepevtCol::getGenHepevtCol()->size(); 00027 // unsigned n = genhep -> size(); 00028 00029 for (unsigned i = 0; i < n; i++) { 00030 // Gen_hepevt * h = *genhep[i]; 00031 Gen_hepevt* h = &(*GenHepevtCol::getGenHepevtCol())[i]; 00032 // (struct gen_hepevt *) BsGetEnt(GEN_HEPEVT, i + 1, BBS_No_Index); 00033 if (! h) { 00034 std::cout << "TTrackHEP::update !!! can not access to GEN_HEPEVT"; 00035 std::cout << std::endl; 00036 break; 00037 } 00038 00039 _list.append(new TTrackHEP(h)); 00040 } 00041 }
const Hep3Vector & TTrackHEP::v | ( | void | ) | const [inline] |
returns position vector.
Definition at line 158 of file TTrackHEP.h.
References _v.
00158 { 00159 return _v; 00160 }
void TMDC::updateMC | ( | void | ) | [friend] |
AList<TTrackHEP> TTrackHEP::_children [private] |
const Gen_hepevt* TTrackHEP::_hep [private] |
Definition at line 95 of file TTrackHEP.h.
Referenced by gen(), id(), pType(), status(), and TTrackHEP().
AList<TMDCWireHitMC> TTrackHEP::_hits [private] |
AList< TTrackHEP > TTrackHEP::_list = AList<TTrackHEP>() [static, private] |
TTrackHEP* TTrackHEP::_mother [private] |
const HepLorentzVector TTrackHEP::_p [private] |
const Hep3Vector TTrackHEP::_v [private] |