_HADES_CLASS_DESCRIPTION HParticleGeantEvent Simulation object keeping HGeant pointers and decays to ease the geant use. USAGE: HParticleGeantEvent geantevent; // create the object out side event loop for (Int_t i=0; i < entries; i++) { Int_t nbytes = loop.nextEvent(i); // get next event. categories will be cleared before if(nbytes <= 0) { cout<<nbytes<<endl; break; } // last event reached geantevent.nextEvent(); // fill the geant event structure cout<<"event "<<i<<"------------------------------------------"<<endl; cout<<"impact : "<<geantevent.getImpactParam()<<", beam E: "<< geantevent.getBeamEnergy()<< ", event plane: "<<geantevent.getEventPlane()<<endl; cout<<"mult charged prim 4pi "<<geantevent.getMultiplicity(-1,0,0,0) // id,generation,charge,type,detbits <<" acc "<< geantevent.getMultiplicity(-1,0,0,1) <<" reco true iMDC+oMDC+META "<<geantevent.getMultiplicity(-1,0,0,2,kIsInInnerMDC|kIsInOuterMDC|kIsInMETA) <<" reco true all "<<geantevent.getMultiplicity(-1,0,0,2,0) <<endl; //---------------------------------------------------- // example 1: for(UInt_t j = 0; j < geantevent.getDecays().size(); j++ ){ HParticleGeantDecay* decay = geantevent.getDecays()[j]; if(decay->getDistFromVertex()<100 ) decay->print(); // print all decays max 10cm arround 0,0,0 } //---------------------------------------------------- // example 2 : vector<HParticleGeantDecay*> decays; // a decay keeps pointer to mother and daughters and the mother decay geantevent.isDecay(decays,52,-1); // all omgegas from PLUTO (external : generation = -1) filter params : motherid, generation, med, dist for(UInt_t j = 0; j < decays.size(); j++) { decays[j] ->print(); } //---------------------------------------------------- // example 3 : geantevent.isDecay(decays,18,0); // all primary lambda decays (urqmd+PLUTO(is not decayed outside GEANT)) vector<Int_t > pids; pids.push_back(14); // proton pids.push_back(9); // pion for(UInt_t j = 0; j < decays.size(); j++) { HParticleGeantDecay* lambda = decays[j]; if(!lambda->isExternalSource()) continue; // keep only PLUTO if(lambda->isDaughter(pids)) // both particles found vector<HGeantKine*>& daughters = lambda->getDaughters(); for(UInt_t l = 0; l < daughters.size(); j++){ HParticleGeant* p = geantevent.getParticle(daughters[l]); if(p->isInAcceptance()){ Int_t nReco p->getNRecoCand(); // number of HParticleCandSim keeping this geant track for(Int_t k=0; k < nReco; k++){ if(!p->getRecoCand(k)->isGhostTrack() && p->getRecoCand(k)->isIndDetectors(kIsInInnerMDC||kIsInOuterMDC|kIsInMETA)) { // true reco } } } } } //---------------------------------------------------- // example 4 : vector<HParticleGeant*> particles; geantevent.isParticle(particles,2,-2,0); // all primary positrons possible filter params : id,motherid,generation,med,dist for(UInt_t j = 0; j < particles.size(); j++) { particles[j]->print(); HParticleGeantDecay* d = particles[j]->getMotherDecay(); // will even work for PLUTO decayed particles if(d) d->print(); } //---------------------------------------------------- // example 5 : HParticleCandSim* cand1=0; for(Int_t j = 0; j < particleCat->getEntries(); j ++){ cand1 = HCategoryManager::getObject(cand1,particleCat,j); if(!cand1->isFlagBit(Particle::kIsLepton)) continue; Int_t tr = cand1->getGeantTrack(); HParticleGeant* p = geantevent.getParticle(tr); HParticleGeantDecay* d = p->getMotherDecay(); // mother decay Int_t nDaughter = d ->getNDaughters(); HGeantKine* sister = 0; for(Int_t k=0; k < nDaughter; k++){ // find sister track sister = d->getDaughter(k); if(sister->getTrack() != p->getParticle()->getTrack()) break; } HParticleGeant* pSister = geantevent.getParticle(sister); Int_t nReco p->getNRecoCand(); // number of HParticleCandSim keeping this geant track for(Int_t k=0; k < nReco; k++){ p->getRecoCand(k)->print(); // all candidates sharing the same geant track } nReco pSister->getNRecoCand(); // number of HParticleCandSim keeping this geant track for(Int_t k=0; k < nReco; k++){ p->getRecoCand(k)->print(); // all candidates sharing the same geant track } } } // end eventloop
HParticleGeantEvent() | |
HParticleGeantEvent(const HParticleGeantEvent&) | |
virtual | ~HParticleGeantEvent() |
void | TObject::AbstractMethod(const char* method) const |
virtual void | TObject::AppendPad(Option_t* option = "") |
virtual void | TObject::Browse(TBrowser* b) |
static TClass* | Class() |
virtual const char* | TObject::ClassName() const |
virtual void | TObject::Clear(Option_t* = "") |
virtual TObject* | TObject::Clone(const char* newname = "") const |
virtual Int_t | TObject::Compare(const TObject* obj) const |
virtual void | TObject::Copy(TObject& object) const |
virtual void | TObject::Delete(Option_t* option = "")MENU |
virtual Int_t | TObject::DistancetoPrimitive(Int_t px, Int_t py) |
virtual void | TObject::Draw(Option_t* option = "") |
virtual void | TObject::DrawClass() constMENU |
virtual TObject* | TObject::DrawClone(Option_t* option = "") constMENU |
virtual void | TObject::Dump() constMENU |
virtual void | TObject::Error(const char* method, const char* msgfmt) const |
virtual void | TObject::Execute(const char* method, const char* params, Int_t* error = 0) |
virtual void | TObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0) |
virtual void | TObject::ExecuteEvent(Int_t event, Int_t px, Int_t py) |
virtual void | TObject::Fatal(const char* method, const char* msgfmt) const |
virtual TObject* | TObject::FindObject(const char* name) const |
virtual TObject* | TObject::FindObject(const TObject* obj) const |
Float_t | getBeamEnergy() |
vector<HParticleGeantDecay*>& | getDecays() |
virtual Option_t* | TObject::GetDrawOption() const |
static Long_t | TObject::GetDtorOnly() |
Float_t | getEventPlane() |
HGeomVector& | getEventVertex() |
vector<HGeantKine*>& | getExternalParticles() |
virtual const char* | TObject::GetIconName() const |
Float_t | getImpactParam() |
HGeantKine* | getKine(Int_t track) |
UInt_t | getMultiplicity(Int_t id = -10, Int_t generation = 0, Int_t charge = 0, UInt_t type = 1, UInt_t detbits = kIsInInnerMDC|kIsInOuterMDC|kIsInMETA) |
virtual const char* | TObject::GetName() const |
virtual char* | TObject::GetObjectInfo(Int_t px, Int_t py) const |
static Bool_t | TObject::GetObjectStat() |
virtual Option_t* | TObject::GetOption() const |
HParticleGeant* | getParticle(Int_t track) |
HParticleGeant* | getParticle(HGeantKine*) |
vector<HParticleGeant*>& | getParticles() |
virtual const char* | TObject::GetTitle() const |
virtual UInt_t | TObject::GetUniqueID() const |
virtual Bool_t | TObject::HandleTimer(TTimer* timer) |
virtual ULong_t | TObject::Hash() const |
virtual void | TObject::Info(const char* method, const char* msgfmt) const |
virtual Bool_t | TObject::InheritsFrom(const char* classname) const |
virtual Bool_t | TObject::InheritsFrom(const TClass* cl) const |
virtual void | TObject::Inspect() constMENU |
void | TObject::InvertBit(UInt_t f) |
virtual TClass* | IsA() const |
HParticleGeantDecay* | isDaughterOfDecay(HGeantKine* daughter) |
HParticleGeantDecay* | isDaughterOfDecay(Int_t track) |
Int_t | isDecay(vector<HParticleGeantDecay*>& decays, Int_t motherid = -2, Int_t generation = -2, Int_t med = -2, Float_t dist = 0) |
virtual Bool_t | TObject::IsEqual(const TObject* obj) const |
virtual Bool_t | TObject::IsFolder() const |
HParticleGeantDecay* | isMotherOfDecay(Int_t track) |
HParticleGeantDecay* | isMotherOfDecay(HGeantKine* moth) |
Bool_t | TObject::IsOnHeap() const |
Int_t | isParticle(vector<HGeantKine*>& particles, Int_t id = -2, Int_t motherid = -2, Int_t generation = -2, Int_t med = -2, Float_t dist = 0) |
Int_t | isParticle(vector<HParticleGeant*>& particles, Int_t id = -2, Int_t motherid = -2, Int_t generation = -2, Int_t med = -2, Float_t dist = 0) |
virtual Bool_t | TObject::IsSortable() const |
Bool_t | TObject::IsZombie() const |
virtual void | TObject::ls(Option_t* option = "") const |
void | TObject::MayNotUse(const char* method) const |
void | nextEvent() |
virtual Bool_t | TObject::Notify() |
void | TObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const |
static void | TObject::operator delete(void* ptr) |
static void | TObject::operator delete(void* ptr, void* vp) |
static void | TObject::operator delete[](void* ptr) |
static void | TObject::operator delete[](void* ptr, void* vp) |
void* | TObject::operator new(size_t sz) |
void* | TObject::operator new(size_t sz, void* vp) |
void* | TObject::operator new[](size_t sz) |
void* | TObject::operator new[](size_t sz, void* vp) |
HParticleGeantEvent& | operator=(const HParticleGeantEvent&) |
virtual void | TObject::Paint(Option_t* option = "") |
virtual void | TObject::Pop() |
virtual void | TObject::Print(Option_t* option = "") const |
virtual Int_t | TObject::Read(const char* name) |
virtual void | TObject::RecursiveRemove(TObject* obj) |
void | TObject::ResetBit(UInt_t f) |
virtual void | TObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU |
virtual void | TObject::SavePrimitive(ostream& out, Option_t* option = "") |
void | TObject::SetBit(UInt_t f) |
void | TObject::SetBit(UInt_t f, Bool_t set) |
void | setConvertExtThermal(Bool_t convert) |
void | setCorrectGenInfo(Bool_t cor) |
virtual void | TObject::SetDrawOption(Option_t* option = "")MENU |
static void | TObject::SetDtorOnly(void* obj) |
static void | TObject::SetObjectStat(Bool_t stat) |
virtual void | TObject::SetUniqueID(UInt_t uid) |
virtual void | ShowMembers(TMemberInspector&) |
virtual void | Streamer(TBuffer&) |
void | StreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b) |
virtual void | TObject::SysError(const char* method, const char* msgfmt) const |
Bool_t | TObject::TestBit(UInt_t f) const |
Int_t | TObject::TestBits(UInt_t f) const |
virtual void | TObject::UseCurrentStyle() |
virtual void | TObject::Warning(const char* method, const char* msgfmt) const |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const |
virtual void | TObject::DoError(int level, const char* location, const char* fmt, va_list va) const |
void | TObject::MakeZombie() |
void | clear() |
enum TObject::EStatusBits { | kCanDelete | |
kMustCleanup | ||
kObjInCanvas | ||
kIsReferenced | ||
kHasUUID | ||
kCannotPick | ||
kNoContextMenu | ||
kInvalidObject | ||
}; | ||
enum TObject::[unnamed] { | kIsOnHeap | |
kNotDeleted | ||
kZombie | ||
kBitMask | ||
kSingleKey | ||
kOverwrite | ||
kWriteDelete | ||
}; |
Bool_t | bConvertExtThermal | (default: kTRUE) convert id for external thermal source (sourceID-500) |
Bool_t | bCorrectInfo | (default: kTRUE) correct geninfo bug from HGeant2 <= 3.2 |
Float_t | fBeamEnergy | [MeV] |
Float_t | fEventPlane | [deg] |
Float_t | fImpactParam | [fm] |
HGeomVector | feventVertex | [mm] |
map<HGeantKine*,vector<HGeantKine*> > | mToDaughters | kine -> vector of daughters |
map<Int_t,HParticleGeant*> | mToParticle | trackNr -> particle |
vector<HParticleGeantDecay*> | vDecays | vector of all decays |
vector<HParticleGeant*> | vParticles | vector of all particles |
vector<HGeantKine*> | vexternalKine | vector of all arteficial kine mother objects of external particle |
vector<HGeantKine*> | vexternalParticles | vector of all external (PLUTO) particles |
returns the decay for this daughter particle returns 0 if no matching decay is found
returns the decay for this kine daughter particle with tracknumber track returns 0 if no matching decay is found
returns the decay for this mother particle returns 0 if no matching decay is found
returns the decay for this kine mother particle with tracknumber track returns 0 if no matching decay is found
fills the vector of decays matching the conditions (vector is cleared automatically before filling). possible filters : motherid (ID of the mother), ignored if < 0 generation of the decay (-1 : arteficial ext, 0 : primay mother ....), ignored if < -1 med (medium where the decay was created), ignored if < 0 dist (distance of decay from primary vertex), ignored if ==0 , dist > 0 all decays < dist will be selected, dist < 0 all decays > dist will be selected
fills the vector of particles matching the conditions (vector is cleared automatically before filling). possible filters : id (id of the particle), ignored if < 0 motherid (ID of the mother), ignored if < 0 generation of the decay (0 : primay mother ....), ignored if < 0 med (medium where the decay was created), ignored if < 0 dist (distance of decay from primary vertex), ignored if ==0 , dist > 0 all decays < dist will be selected, dist < 0 all decays > dist will be selected
fills the vector of particles matching the conditions (vector is cleared automatically before filling). possible filters : id (id of the particle), ignored if < 0 motherid (ID of the mother), ignored if < 0 generation of the decay (0 : primay mother ....), ignored if < 0 med (medium where the decay was created), ignored if < 0 dist (distance of decay from primary vertex), ignored if ==0 , dist > 0 all decays < dist will be selected, dist < 0 all decays > dist will be selected
return the particle belonging to the tracknumber track return 0 if no matching particle is found
return the particle belonging to the kine track return 0 if no matching particle is found
return the kine particle belonging to the track return 0 if no matching particle is found
get particle multiplity id : id < 0 -> all IDs, (default) id >= 0 -> particles of the given id gen : gen < 0 -> all generations gen = 0 -> primaries (default) charge : charge = 0 -> all charged particles (default) charge = 1 -> all positive charged particles charge =-1 -> all negative charged particles charge =-2 -> all particles type : type = 0 -> 4pi type = 1 -> acceptance (default) type = 2 -> reconstructed (requires kIsUsed + !isGhostTrack() + isInInnerMDC|isInOuterMDC|isInMETA) detbits : detbits = 0 -> ignored detbits = kIsInInnerMDC|kIsInOuterMDC|kIsInMETA default