![]() |
PandaRoot
|
Class to access the naming information of the MVD. More...
#include <PndGeoHandling.h>
Public Member Functions | |
PndGeoHandling () | |
default constructor. Has to be called in SetParContainers if the support of shortId is needed. More... | |
PndGeoHandling (TString mcFile, TString parFile) | |
PndGeoHandling (Int_t runID, TString parFile) | |
PndGeoHandling (PndSensorNamePar *SensorNamePar) | |
virtual | ~PndGeoHandling () |
virtual void | SetParContainers () |
TString | GetPath (Int_t shortID) |
for a given shortID the path is returned More... | |
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. More... | |
TString | GetVolumeID (TString name) |
returns the volume ID for a given volume name More... | |
std::vector< TString > | GetNamesLevel (Int_t level, TString startPath="") |
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 More... | |
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 More... | |
void | FillLevelNames () |
fills vector<TString> fLevelNames with the names (or the paths) of the volumes down to the level given by fLevel More... | |
TString | FindNodePath (TGeoNode *node) |
void | DiveDownToNode (TGeoNode *node) |
void | cd (TGeoNode *node) |
as cd command with the a node, not performant More... | |
void | DiveDownToNodeContainingString (TString name) |
runs through the GeoManager until a path is found with a substring which matches to the given string More... | |
void | CreateUniqueSensorId (TString startName, std::vector< std::string > listOfSensitives) |
Has to be called during simulation to create unique sensor id. More... | |
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. More... | |
void | PrintSensorNames () |
TObjArray * | GetSensorNames () |
std::vector< TString > | GetSensorNamesWithString (TString value) |
Int_t | GetRunId (TString mcFile) |
void | GetGeoManager () |
TGeoManager * | GetGeoMan () |
void | GetSensorNamePar () |
void | FillSensorMap () |
void | InitRuntimeDb (TString parFileName) |
PndGeoHandling & | operator= (const PndGeoHandling &) |
void | CreateUniqueSensorId (const TString &startName, const std::vector< std::string > &listOfSensitives, PndSensorNameIdMap *idmap) |
Static Public Member Functions | |
static PndGeoHandling * | Instance () |
static void | Destroy () |
Protected Member Functions | |
Int_t | GetIdForSensor (TString &sensName) const |
InitStatus | Init () |
virtual InitStatus | ReInit () |
Class to access the naming information of the MVD.
To save memory not 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 converting the encrypted ID into the path information and vice versa. It needs the information 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 47 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
PndGeoHandling::PndGeoHandling | ( | TString | mcFile, |
TString | parFile | ||
) |
PndGeoHandling::PndGeoHandling | ( | Int_t | runID, |
TString | parFile | ||
) |
PndGeoHandling::PndGeoHandling | ( | PndSensorNamePar * | SensorNamePar | ) |
|
inlinevirtual |
Definition at line 67 of file PndGeoHandling.h.
References GetNamesLevel(), GetOUVPath(), GetPath(), GetShortID(), GetVolumeID(), SetParContainers(), and v.
Bool_t PndGeoHandling::cd | ( | Int_t | id | ) |
as the cd command of TGeoManager just with the ID
Referenced by SetSensorNamePar().
void PndGeoHandling::cd | ( | TGeoNode * | node | ) |
as cd command with the a node, not performant
void PndGeoHandling::CreateUniqueSensorId | ( | TString | startName, |
std::vector< std::string > | listOfSensitives | ||
) |
Has to be called during simulation to create unique sensor id.
Referenced by operator=(), and SetSensorNamePar().
void PndGeoHandling::CreateUniqueSensorId | ( | const TString & | startName, |
const std::vector< std::string > & | listOfSensitives, | ||
PndSensorNameIdMap * | idmap | ||
) |
|
inlinestatic |
Definition at line 54 of file PndGeoHandling.h.
References PndGeoHandling().
void PndGeoHandling::DiveDownToNode | ( | TGeoNode * | node | ) |
Referenced by SetSensorNamePar().
void PndGeoHandling::DiveDownToNodeContainingString | ( | TString | name | ) |
runs through the GeoManager until a path is found with a substring which matches to the given string
Referenced by SetSensorNamePar().
void PndGeoHandling::FillLevelNames | ( | ) |
fills vector<TString> fLevelNames with the names (or the paths) of the volumes down to the level given by fLevel
Referenced by SetSensorNamePar().
|
inline |
Definition at line 164 of file PndGeoHandling.h.
References PndSensorNamePar::FillMap(), and InitRuntimeDb().
TString PndGeoHandling::FindNodePath | ( | TGeoNode * | node | ) |
Referenced by SetSensorNamePar().
TMatrixD PndGeoHandling::GetCurrentRotationMatrix | ( | ) |
Referenced by LocalToMasterErrorsShortId().
|
inline |
Definition at line 162 of file PndGeoHandling.h.
References GetSensorNamePar().
void PndGeoHandling::GetGeoManager | ( | ) |
Referenced by GetSensorNamesWithString().
|
protected |
Referenced by operator=().
TGeoHMatrix* PndGeoHandling::GetMatrixPath | ( | TString | path | ) |
Referenced by GetMatrixShortId(), and GetOUVShortId().
|
inline |
Definition at line 92 of file PndGeoHandling.h.
References GetMatrixPath(), GetPath(), and GetSensorDimensionsPath().
std::vector<TString> PndGeoHandling::GetNamesLevel | ( | Int_t | level, |
TString | startPath = "" |
||
) |
Referenced by ~PndGeoHandling().
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
Referenced by GetOUVShortId(), and ~PndGeoHandling().
|
inline |
Definition at line 84 of file PndGeoHandling.h.
References GetMatrixPath(), GetOUVPath(), and GetPath().
TString PndGeoHandling::GetPath | ( | Int_t | shortID | ) |
for a given shortID the path is returned
Referenced by GetMatrixShortId(), GetOUVShortId(), GetSensorDimensionsShortId(), LocalToMasterErrorsShortId(), LocalToMasterShortId(), MasterToLocalErrorsShortId(), MasterToLocalShortId(), and ~PndGeoHandling().
Int_t PndGeoHandling::GetRunId | ( | TString | mcFile | ) |
Referenced by GetSensorNamesWithString().
TVector3 PndGeoHandling::GetSensorDimensionsPath | ( | TString | path | ) |
Referenced by GetMatrixShortId(), and GetSensorDimensionsShortId().
|
inline |
Definition at line 96 of file PndGeoHandling.h.
References GetPath(), GetSensorDimensionsPath(), and MasterToLocalPath().
void PndGeoHandling::GetSensorNamePar | ( | ) |
Referenced by GetGeoMan().
|
inline |
|
inline |
Definition at line 150 of file PndGeoHandling.h.
References GetGeoManager(), GetRunId(), and PndSensorNamePar::GetSensorNamesWithString().
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.
Referenced by ~PndGeoHandling().
TString PndGeoHandling::GetVolumeID | ( | TString | name | ) |
returns the volume ID for a given volume name
Referenced by ~PndGeoHandling().
|
inlineprotected |
Definition at line 174 of file PndGeoHandling.h.
References PndSensorNamePar::FillMap().
void PndGeoHandling::InitRuntimeDb | ( | TString | parFileName | ) |
Referenced by FillSensorMap().
|
static |
Referenced by LocalToMasterErrorsShortId(), and MasterToLocalErrorsShortId().
|
inline |
Definition at line 113 of file PndGeoHandling.h.
References GetCurrentRotationMatrix(), GetPath(), and LocalToMasterErrorsPath().
TVector3 PndGeoHandling::LocalToMasterPath | ( | const TVector3 & | local, |
const TString & | id | ||
) |
Referenced by LocalToMasterShortId(), and MasterToLocalShortId().
|
inline |
Definition at line 104 of file PndGeoHandling.h.
References GetPath(), LocalToMasterPath(), and MasterToLocalErrorsPath().
Referenced by LocalToMasterShortId(), and MasterToLocalErrorsShortId().
|
inline |
Definition at line 109 of file PndGeoHandling.h.
References GetPath(), LocalToMasterErrorsPath(), and MasterToLocalErrorsPath().
TVector3 PndGeoHandling::MasterToLocalPath | ( | const TVector3 & | master, |
const TString & | id | ||
) |
Referenced by GetSensorDimensionsShortId(), and MasterToLocalShortId().
|
inline |
Definition at line 100 of file PndGeoHandling.h.
References GetPath(), LocalToMasterPath(), and MasterToLocalPath().
|
inline |
Definition at line 167 of file PndGeoHandling.h.
References CreateUniqueSensorId(), and GetIdForSensor().
|
inline |
Definition at line 136 of file PndGeoHandling.h.
References PndSensorNamePar::Print().
|
inlineprotectedvirtual |
Definition at line 180 of file PndGeoHandling.h.
References PndGeoHandling().
|
inline |
Definition at line 118 of file PndGeoHandling.h.
|
virtual |
Referenced by ~PndGeoHandling().
|
inline |
Definition at line 119 of file PndGeoHandling.h.
References cd(), CreateUniqueSensorId(), DiveDownToNode(), DiveDownToNodeContainingString(), FillLevelNames(), FindNodePath(), and VolumeIsSensitive().
|
inline |
Definition at line 117 of file PndGeoHandling.h.
References v.
Referenced by PndSdsDetector::SetVerboseLevel().
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.
Referenced by SetSensorNamePar().