EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
|
Class to access the naming information of the MVD. More...
#include <EicRoot/blob/master/PndTools/generalTools/PndGeoHandling.h>
Public Member Functions | |
PndGeoHandling () | |
default constructor. Has to be called in SetParContainers if the support of shortId is needed. | |
PndGeoHandling (TString mcFile, TString parFile) | |
PndGeoHandling (Int_t runID, TString parFile) | |
virtual | ~PndGeoHandling () |
virtual void | SetParContainers () |
TString | GetPath (Int_t shortID) |
for a given shortID the path is returned | |
Int_t | GetShortID (TString path) |
for a given path the (unique) position of the sensor path in the fSensorNamePar-List is given. If it is not found -1 is returned. | |
TString | GetVolumeID (TString name) |
returns the volume ID for a given volume name | |
std::vector< TString > | GetNamesLevel (Int_t level, TString startPath="", bool fullPath=false) |
void | GetOUVPath (TString path, TVector3 &o, TVector3 &u, TVector3 &v) |
for a volume given by its path the o, u, v vectors for the plane are returned | |
void | GetOUVShortId (Int_t shortId, TVector3 &o, TVector3 &u, TVector3 &v) |
TGeoHMatrix * | GetMatrixPath (TString path) |
TGeoHMatrix * | GetMatrixShortId (Int_t shortId) |
TVector3 | GetSensorDimensionsPath (TString path) |
TVector3 | GetSensorDimensionsShortId (Int_t shortId) |
TVector3 | MasterToLocalPath (const TVector3 &master, const TString &id) |
TVector3 | MasterToLocalShortId (const TVector3 &master, const Int_t &shortId) |
TVector3 | LocalToMasterPath (const TVector3 &local, const TString &id) |
TVector3 | LocalToMasterShortId (const TVector3 &local, const Int_t &shortId) |
TMatrixD | MasterToLocalErrorsPath (const TMatrixD &master, const TString &id) |
TMatrixD | MasterToLocalErrorsShortId (const TMatrixD &master, const Int_t &shortId) |
TMatrixD | LocalToMasterErrorsPath (const TMatrixD &local, const TString &id) |
TMatrixD | LocalToMasterErrorsShortId (const TMatrixD &local, const Int_t &shortId) |
TMatrixD | GetCurrentRotationMatrix () |
void | SetVerbose (Int_t v) |
void | SetGeoManager (TGeoManager *geo) |
void | SetSensorNamePar (PndSensorNamePar *par) |
Bool_t | cd (Int_t id) |
as the cd command of TGeoManager just with the ID | |
void | FillLevelNames () |
fills vector<TString> fLevelNames with the names (or the paths) of the volumes down to the level given by fLevel | |
TString | FindNodePath (TGeoNode *node) |
void | DiveDownToNode (TGeoNode *node) |
void | cd (TGeoNode *node) |
as cd command with the a node, not performant | |
void | DiveDownToNodeContainingString (TString name) |
runs through the GeoManager until a path is found with a substring which matches to the given string | |
void | CreateUniqueSensorId (TString startName, std::vector< std::string > listOfSensitives) |
Has to be called during simulation to create unique sensor id. | |
bool | VolumeIsSensitive (TString &path, std::vector< std::string > &listOfSensitives) |
Checks if the path contains a substring which matches one of the given strings in listOfSensitives. If not false is returned. | |
void | PrintSensorNames () |
TObjArray * | GetSensorNames () |
Int_t | GetRunId (TString mcFile) |
void | GetGeoManager () |
void | GetSensorNamePar () |
void | InitRuntimeDb (TString parFileName) |
InitStatus | Init () |
virtual InitStatus | ReInit () |
PndGeoHandling & | operator= (const PndGeoHandling &) |
Public Member Functions inherited from FairTask | |
FairTask () | |
FairTask (const char *name, Int_t iVerbose=1) | |
virtual | ~FairTask () |
void | InitTask () |
void | ReInitTask () |
void | SetParTask () |
virtual void | FinishTask () |
virtual void | FinishEvent () |
void | SetVerbose (Int_t iVerbose) |
void | SetInputPersistance (Bool_t val) |
void | CheckInputPersistance (TString branchName) |
Static Public Member Functions | |
static PndGeoHandling * | Instance () |
static void | Destroy () |
Private Member Functions | |
PndGeoHandling (PndGeoHandling &gh) | |
void | DiveDownToFillSensNamePar (std::vector< std::string > listOfSensitives) |
ClassDef (PndGeoHandling, 3) | |
Private Attributes | |
TGeoManager * | fGeoMan |
PndSensorNamePar * | fSensorNamePar |
FairRuntimeDb * | fRtdb |
std::vector< TString > | fLevelNames |
Int_t | fLevel |
bool | fFullPath |
Int_t | fVerbose |
Int_t | fRunId |
Static Private Attributes | |
static PndGeoHandling * | fInstance = NULL |
Additional Inherited Members | |
Protected Member Functions inherited from FairTask | |
virtual void | Finish () |
void | InitTasks () |
void | ReInitTasks () |
void | SetParTasks () |
void | FinishTasks () |
void | FinishEvents () |
Protected Attributes inherited from FairTask | |
Int_t | fVerbose |
Int_t | fInputPersistance |
Indicates if input branch is persistant. | |
FairLogger * | fLogger |
Class to access the naming information of the MVD.
To save memory not any longer the full path of a volume is stored in each hit but an encrypted form of it (f.e. /1_1/34_2/101_1/). The first number is the volumeID coming from the GeoManager and the second number is the copy number. This class helps you converting the encrypted ID into the path information and vice versa. It needs the informations of the GeoManager. Therefore one has to ensure that either an initialized TGeoManager pointer is given in the constructor with the correct geometry or a filename with the correct geometry ("FAIRGeom")
30.03.2010: To reduce the data size a shortId is introduced. The shortId is generated with the command CreateUniqueSensorId and the match between the path in the GeoManager and the shortId is stored in the ParameterDatabase. To use the shortID the constructor of the PndGeoHandling has to be called in the method SetParContainers of a Task!
Definition at line 44 of file PndGeoHandling.h.
View newest version in sPHENIX GitHub at line 44 of file PndGeoHandling.h
PndGeoHandling::PndGeoHandling | ( | ) |
default constructor. Has to be called in SetParContainers if the support of shortId is needed.
PndGeoHandling::Instance() has to be called the first time in the constructor of a task otherwise the Sensor names are not available from the database
Definition at line 44 of file PndGeoHandling.cxx.
View newest version in sPHENIX GitHub at line 44 of file PndGeoHandling.cxx
References FairRun::AddTask(), fInstance, FairRun::Instance(), and Acts::PrimitivesView3DTest::run().
Referenced by Instance().
PndGeoHandling::PndGeoHandling | ( | TString | mcFile, |
TString | parFile | ||
) |
Definition at line 79 of file PndGeoHandling.cxx.
View newest version in sPHENIX GitHub at line 79 of file PndGeoHandling.cxx
References fGeoMan, fInstance, GetGeoManager(), GetRunId(), GetSensorNamePar(), and InitRuntimeDb().
PndGeoHandling::PndGeoHandling | ( | Int_t | runID, |
TString | parFile | ||
) |
Definition at line 99 of file PndGeoHandling.cxx.
View newest version in sPHENIX GitHub at line 99 of file PndGeoHandling.cxx
References fGeoMan, fInstance, fRunId, GetGeoManager(), GetSensorNamePar(), and InitRuntimeDb().
|
inlinevirtual |
Definition at line 63 of file PndGeoHandling.h.
View newest version in sPHENIX GitHub at line 63 of file PndGeoHandling.h
|
inlineprivate |
Definition at line 169 of file PndGeoHandling.h.
View newest version in sPHENIX GitHub at line 169 of file PndGeoHandling.h
Bool_t PndGeoHandling::cd | ( | Int_t | id | ) |
as the cd command of TGeoManager just with the ID
Definition at line 253 of file PndGeoHandling.cxx.
View newest version in sPHENIX GitHub at line 253 of file PndGeoHandling.cxx
References fGeoMan, and GetPath().
void PndGeoHandling::cd | ( | TGeoNode * | node | ) |
as cd command with the a node, not performant
Definition at line 565 of file PndGeoHandling.cxx.
View newest version in sPHENIX GitHub at line 565 of file PndGeoHandling.cxx
References DiveDownToNode(), and fGeoMan.
|
private |
void PndGeoHandling::CreateUniqueSensorId | ( | TString | startName, |
std::vector< std::string > | listOfSensitives | ||
) |
Has to be called during simulation to create unique sensor id.
Definition at line 574 of file PndGeoHandling.cxx.
View newest version in sPHENIX GitHub at line 574 of file PndGeoHandling.cxx
References DiveDownToFillSensNamePar(), DiveDownToNodeContainingString(), fGeoMan, and fVerbose.
|
inlinestatic |
Definition at line 52 of file PndGeoHandling.h.
View newest version in sPHENIX GitHub at line 52 of file PndGeoHandling.h
References fInstance.
|
private |
Definition at line 539 of file PndGeoHandling.cxx.
View newest version in sPHENIX GitHub at line 539 of file PndGeoHandling.cxx
References PndSensorNamePar::AddSensorName(), fGeoMan, fSensorNamePar, PndStringSeparator::GetStringVector(), and VolumeIsSensitive().
Referenced by CreateUniqueSensorId().
void PndGeoHandling::DiveDownToNode | ( | TGeoNode * | node | ) |
Definition at line 507 of file PndGeoHandling.cxx.
View newest version in sPHENIX GitHub at line 507 of file PndGeoHandling.cxx
References fGeoMan.
Referenced by cd(), and FindNodePath().
void PndGeoHandling::DiveDownToNodeContainingString | ( | TString | name | ) |
runs through the GeoManager until a path is found with a substring which matches to the given string
Definition at line 521 of file PndGeoHandling.cxx.
View newest version in sPHENIX GitHub at line 521 of file PndGeoHandling.cxx
References fGeoMan.
Referenced by CreateUniqueSensorId().
void PndGeoHandling::FillLevelNames | ( | ) |
fills vector<TString> fLevelNames with the names (or the paths) of the volumes down to the level given by fLevel
Definition at line 289 of file PndGeoHandling.cxx.
View newest version in sPHENIX GitHub at line 289 of file PndGeoHandling.cxx
References fFullPath, fGeoMan, fLevel, and fLevelNames.
Referenced by GetNamesLevel().
TString PndGeoHandling::FindNodePath | ( | TGeoNode * | node | ) |
Definition at line 495 of file PndGeoHandling.cxx.
View newest version in sPHENIX GitHub at line 495 of file PndGeoHandling.cxx
References DiveDownToNode(), and fGeoMan.
TMatrixD PndGeoHandling::GetCurrentRotationMatrix | ( | ) |
Definition at line 478 of file PndGeoHandling.cxx.
View newest version in sPHENIX GitHub at line 478 of file PndGeoHandling.cxx
References fGeoMan.
Referenced by LocalToMasterErrorsPath(), and MasterToLocalErrorsPath().
void PndGeoHandling::GetGeoManager | ( | ) |
Definition at line 154 of file PndGeoHandling.cxx.
View newest version in sPHENIX GitHub at line 154 of file PndGeoHandling.cxx
References fRtdb, fRunId, fVerbose, FairRuntimeDb::getContainer(), and FairRuntimeDb::initContainers().
Referenced by PndGeoHandling().
TGeoHMatrix * PndGeoHandling::GetMatrixPath | ( | TString | path | ) |
Definition at line 364 of file PndGeoHandling.cxx.
View newest version in sPHENIX GitHub at line 364 of file PndGeoHandling.cxx
References fGeoMan.
Referenced by GetMatrixShortId().
|
inline |
Definition at line 87 of file PndGeoHandling.h.
View newest version in sPHENIX GitHub at line 87 of file PndGeoHandling.h
References GetMatrixPath(), and GetPath().
std::vector< TString > PndGeoHandling::GetNamesLevel | ( | Int_t | level, |
TString | startPath = "" , |
||
bool | fullPath = false |
||
) |
Definition at line 269 of file PndGeoHandling.cxx.
View newest version in sPHENIX GitHub at line 269 of file PndGeoHandling.cxx
References fGeoMan, FillLevelNames(), fLevel, and fLevelNames.
void PndGeoHandling::GetOUVPath | ( | TString | path, |
TVector3 & | o, | ||
TVector3 & | u, | ||
TVector3 & | v | ||
) |
for a volume given by its path the o, u, v vectors for the plane are returned
Definition at line 308 of file PndGeoHandling.cxx.
View newest version in sPHENIX GitHub at line 308 of file PndGeoHandling.cxx
References fGeoMan.
Referenced by GetOUVShortId().
|
inline |
Definition at line 80 of file PndGeoHandling.h.
View newest version in sPHENIX GitHub at line 80 of file PndGeoHandling.h
References fSensorNamePar, GetOUVPath(), and GetPath().
TString PndGeoHandling::GetPath | ( | Int_t | shortID | ) |
for a given shortID the path is returned
Definition at line 210 of file PndGeoHandling.cxx.
View newest version in sPHENIX GitHub at line 210 of file PndGeoHandling.cxx
References fSensorNamePar, and PndSensorNamePar::GetSensorName().
Referenced by cd(), GetMatrixShortId(), GetOUVShortId(), GetSensorDimensionsShortId(), LocalToMasterErrorsShortId(), LocalToMasterShortId(), MasterToLocalErrorsShortId(), and MasterToLocalShortId().
Int_t PndGeoHandling::GetRunId | ( | TString | mcFile | ) |
Definition at line 118 of file PndGeoHandling.cxx.
View newest version in sPHENIX GitHub at line 118 of file PndGeoHandling.cxx
References fRunId, FairMCEventHeader::GetRunID(), and t.
Referenced by PndGeoHandling().
TVector3 PndGeoHandling::GetSensorDimensionsPath | ( | TString | path | ) |
Definition at line 341 of file PndGeoHandling.cxx.
View newest version in sPHENIX GitHub at line 341 of file PndGeoHandling.cxx
References Acts::Test::dim, and fGeoMan.
Referenced by GetSensorDimensionsShortId().
|
inline |
Definition at line 93 of file PndGeoHandling.h.
View newest version in sPHENIX GitHub at line 93 of file PndGeoHandling.h
References GetPath(), and GetSensorDimensionsPath().
void PndGeoHandling::GetSensorNamePar | ( | ) |
Definition at line 132 of file PndGeoHandling.cxx.
View newest version in sPHENIX GitHub at line 132 of file PndGeoHandling.cxx
References fRtdb, fRunId, fSensorNamePar, fVerbose, FairRuntimeDb::getContainer(), FairRuntimeDb::initContainers(), and PndSensorNamePar::Print().
Referenced by PndGeoHandling().
|
inline |
Definition at line 146 of file PndGeoHandling.h.
View newest version in sPHENIX GitHub at line 146 of file PndGeoHandling.h
References fSensorNamePar, and PndSensorNamePar::GetSensorNames().
Int_t PndGeoHandling::GetShortID | ( | TString | path | ) |
for a given path the (unique) position of the sensor path in the fSensorNamePar-List is given. If it is not found -1 is returned.
Definition at line 197 of file PndGeoHandling.cxx.
View newest version in sPHENIX GitHub at line 197 of file PndGeoHandling.cxx
References fSensorNamePar, and PndSensorNamePar::SensorInList().
TString PndGeoHandling::GetVolumeID | ( | TString | name | ) |
returns the volume ID for a given volume name
Definition at line 259 of file PndGeoHandling.cxx.
View newest version in sPHENIX GitHub at line 259 of file PndGeoHandling.cxx
References fGeoMan.
|
inlinevirtual |
Intialisation at begin of run. To be implemented in the derived class. Success If not kSUCCESS, task will be set inactive.
Reimplemented from FairTask.
Definition at line 158 of file PndGeoHandling.h.
View newest version in sPHENIX GitHub at line 158 of file PndGeoHandling.h
References PndSensorNamePar::FillMap(), fSensorNamePar, and kSUCCESS.
void PndGeoHandling::InitRuntimeDb | ( | TString | parFileName | ) |
Definition at line 145 of file PndGeoHandling.cxx.
View newest version in sPHENIX GitHub at line 145 of file PndGeoHandling.cxx
References fRtdb, FairRuntimeDb::instance(), FairParRootFileIo::open(), FairRuntimeDb::setFirstInput(), and FairRuntimeDb::setOutput().
Referenced by PndGeoHandling().
|
static |
Definition at line 36 of file PndGeoHandling.cxx.
View newest version in sPHENIX GitHub at line 36 of file PndGeoHandling.cxx
References fInstance, and PndGeoHandling().
Referenced by PndPidCorrelator::PndPidCorrelator(), PndRecoDafFit::PndRecoDafFit(), and PndRecoKalmanFit::PndRecoKalmanFit().
TMatrixD PndGeoHandling::LocalToMasterErrorsPath | ( | const TMatrixD & | local, |
const TString & | id | ||
) |
Definition at line 459 of file PndGeoHandling.cxx.
View newest version in sPHENIX GitHub at line 459 of file PndGeoHandling.cxx
References fGeoMan, fVerbose, and GetCurrentRotationMatrix().
Referenced by LocalToMasterErrorsShortId().
|
inline |
Definition at line 118 of file PndGeoHandling.h.
View newest version in sPHENIX GitHub at line 118 of file PndGeoHandling.h
References GetPath(), and LocalToMasterErrorsPath().
TVector3 PndGeoHandling::LocalToMasterPath | ( | const TVector3 & | local, |
const TString & | id | ||
) |
Definition at line 412 of file PndGeoHandling.cxx.
View newest version in sPHENIX GitHub at line 412 of file PndGeoHandling.cxx
References fGeoMan.
Referenced by LocalToMasterShortId().
|
inline |
Definition at line 105 of file PndGeoHandling.h.
View newest version in sPHENIX GitHub at line 105 of file PndGeoHandling.h
References GetPath(), and LocalToMasterPath().
TMatrixD PndGeoHandling::MasterToLocalErrorsPath | ( | const TMatrixD & | master, |
const TString & | id | ||
) |
Definition at line 434 of file PndGeoHandling.cxx.
View newest version in sPHENIX GitHub at line 434 of file PndGeoHandling.cxx
References fGeoMan, fVerbose, and GetCurrentRotationMatrix().
Referenced by MasterToLocalErrorsShortId().
|
inline |
Definition at line 112 of file PndGeoHandling.h.
View newest version in sPHENIX GitHub at line 112 of file PndGeoHandling.h
References GetPath(), and MasterToLocalErrorsPath().
TVector3 PndGeoHandling::MasterToLocalPath | ( | const TVector3 & | master, |
const TString & | id | ||
) |
Definition at line 389 of file PndGeoHandling.cxx.
View newest version in sPHENIX GitHub at line 389 of file PndGeoHandling.cxx
References fGeoMan.
Referenced by MasterToLocalShortId().
|
inline |
Definition at line 99 of file PndGeoHandling.h.
View newest version in sPHENIX GitHub at line 99 of file PndGeoHandling.h
References GetPath(), and MasterToLocalPath().
|
inline |
Definition at line 165 of file PndGeoHandling.h.
View newest version in sPHENIX GitHub at line 165 of file PndGeoHandling.h
|
inline |
Definition at line 141 of file PndGeoHandling.h.
View newest version in sPHENIX GitHub at line 141 of file PndGeoHandling.h
References fSensorNamePar, and PndSensorNamePar::Print().
|
inlinevirtual |
Reinitialisation. To be implemented in the derived class. Success If not kSUCCESS, task will be set inactive.
Reimplemented from FairTask.
Definition at line 163 of file PndGeoHandling.h.
View newest version in sPHENIX GitHub at line 163 of file PndGeoHandling.h
|
inline |
Definition at line 125 of file PndGeoHandling.h.
View newest version in sPHENIX GitHub at line 125 of file PndGeoHandling.h
References fGeoMan.
|
virtual |
Intialise parameter containers. To be implemented in the derived class.
Reimplemented from FairTask.
Definition at line 62 of file PndGeoHandling.cxx.
View newest version in sPHENIX GitHub at line 62 of file PndGeoHandling.cxx
References fGeoMan, fRtdb, fRunId, fSensorNamePar, FairRuntimeDb::getContainer(), FairRun::GetRunId(), FairRun::GetRuntimeDb(), FairRun::Instance(), Acts::PrimitivesView3DTest::run(), and FairTask::SetParContainers().
|
inline |
Definition at line 126 of file PndGeoHandling.h.
View newest version in sPHENIX GitHub at line 126 of file PndGeoHandling.h
References fSensorNamePar.
|
inline |
Definition at line 124 of file PndGeoHandling.h.
View newest version in sPHENIX GitHub at line 124 of file PndGeoHandling.h
bool PndGeoHandling::VolumeIsSensitive | ( | TString & | path, |
std::vector< std::string > & | listOfSensitives | ||
) |
Checks if the path contains a substring which matches one of the given strings in listOfSensitives. If not false is returned.
Definition at line 584 of file PndGeoHandling.cxx.
View newest version in sPHENIX GitHub at line 584 of file PndGeoHandling.cxx
Referenced by DiveDownToFillSensNamePar().
|
private |
Definition at line 189 of file PndGeoHandling.h.
View newest version in sPHENIX GitHub at line 189 of file PndGeoHandling.h
Referenced by FillLevelNames().
|
private |
Definition at line 182 of file PndGeoHandling.h.
View newest version in sPHENIX GitHub at line 182 of file PndGeoHandling.h
Referenced by cd(), CreateUniqueSensorId(), DiveDownToFillSensNamePar(), DiveDownToNode(), DiveDownToNodeContainingString(), FillLevelNames(), FindNodePath(), GetCurrentRotationMatrix(), GetMatrixPath(), GetNamesLevel(), GetOUVPath(), GetSensorDimensionsPath(), GetVolumeID(), LocalToMasterErrorsPath(), LocalToMasterPath(), MasterToLocalErrorsPath(), MasterToLocalPath(), PndGeoHandling(), ReInit(), SetGeoManager(), and SetParContainers().
|
staticprivate |
Definition at line 168 of file PndGeoHandling.h.
View newest version in sPHENIX GitHub at line 168 of file PndGeoHandling.h
Referenced by Destroy(), Instance(), and PndGeoHandling().
|
private |
Definition at line 188 of file PndGeoHandling.h.
View newest version in sPHENIX GitHub at line 188 of file PndGeoHandling.h
Referenced by FillLevelNames(), and GetNamesLevel().
|
private |
Definition at line 187 of file PndGeoHandling.h.
View newest version in sPHENIX GitHub at line 187 of file PndGeoHandling.h
Referenced by FillLevelNames(), and GetNamesLevel().
|
private |
Definition at line 184 of file PndGeoHandling.h.
View newest version in sPHENIX GitHub at line 184 of file PndGeoHandling.h
Referenced by GetGeoManager(), GetSensorNamePar(), InitRuntimeDb(), and SetParContainers().
|
private |
Definition at line 191 of file PndGeoHandling.h.
View newest version in sPHENIX GitHub at line 191 of file PndGeoHandling.h
Referenced by GetGeoManager(), GetRunId(), GetSensorNamePar(), PndGeoHandling(), and SetParContainers().
|
private |
Definition at line 183 of file PndGeoHandling.h.
View newest version in sPHENIX GitHub at line 183 of file PndGeoHandling.h
Referenced by DiveDownToFillSensNamePar(), GetOUVShortId(), GetPath(), GetSensorNamePar(), GetSensorNames(), GetShortID(), Init(), PrintSensorNames(), SetParContainers(), and SetSensorNamePar().
|
private |
Definition at line 190 of file PndGeoHandling.h.
View newest version in sPHENIX GitHub at line 190 of file PndGeoHandling.h
Referenced by CreateUniqueSensorId(), GetGeoManager(), GetSensorNamePar(), LocalToMasterErrorsPath(), MasterToLocalErrorsPath(), and SetVerbose().