TTrackHEP Class Reference

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

#include <TTrackHEP.h>

List of all members.

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.

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)


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 ( 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]

Destructor.

Definition at line 55 of file TTrackHEP.cxx.

00055                       {
00056 }


Member Function Documentation

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

returns a pointer to i'th child.

Definition at line 146 of file TTrackHEP.h.

References _children.

00146                                  {
00147     return _children[i];
00148 }

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().

00164                                    {
00165     if (! h) return 0;
00166     unsigned id = h->id - 1;
00167     return _list[id];
00168 }

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().

00122                         {
00123     return _hep->id - 1;
00124 }

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]

returns name.

Definition at line 178 of file TTrackHEP.h.

00178                           {
00179     return "mc" + itostring(id());
00180 }

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().

00134                            {
00135     return _hep->idhep;
00136 }

int TTrackHEP::status ( void   )  const [inline]

returns status.

Definition at line 128 of file TTrackHEP.h.

References _hep, and Gen_hepevt::isthep.

00128                             {
00129     return _hep->isthep;
00130 }

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 }


Friends And Related Function Documentation

void TMDC::updateMC ( void   )  [friend]


Member Data Documentation

AList<TTrackHEP> TTrackHEP::_children [private]

Definition at line 97 of file TTrackHEP.h.

Referenced by child(), and TTrackHEP().

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]

Definition at line 101 of file TTrackHEP.h.

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

AList< TTrackHEP > TTrackHEP::_list = AList<TTrackHEP>() [static, private]

Definition at line 104 of file TTrackHEP.h.

Referenced by hep(), list(), TTrackHEP(), and update().

TTrackHEP* TTrackHEP::_mother [private]

Definition at line 96 of file TTrackHEP.h.

Referenced by dump(), mother(), and TTrackHEP().

const HepLorentzVector TTrackHEP::_p [private]

Definition at line 99 of file TTrackHEP.h.

Referenced by dump(), and p().

const Hep3Vector TTrackHEP::_v [private]

Definition at line 100 of file TTrackHEP.h.

Referenced by dump(), and v().


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