PndGeoHandling¶
-
class PndGeoHandling : public FairTask¶
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”)
- Author
: t.stockmanns t.stockmans@fz-juelich.de
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!
Public Functions
-
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(TString mcFile, TString parFile)¶
-
PndGeoHandling(Int_t runID, TString parFile)¶
-
PndGeoHandling(PndSensorNamePar *SensorNamePar)¶
-
inline 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 = "")¶
-
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
-
inline void GetOUVShortId(Int_t shortId, TVector3 &o, TVector3 &u, TVector3 &v)¶
-
TGeoHMatrix *GetMatrixPath(TString path)¶
-
inline TGeoHMatrix *GetMatrixShortId(Int_t shortId)¶
-
TVector3 GetSensorDimensionsPath(TString path)¶
-
inline TVector3 GetSensorDimensionsShortId(Int_t shortId)¶
-
TVector3 MasterToLocalPath(const TVector3 &master, const TString &id)¶
-
inline TVector3 MasterToLocalShortId(const TVector3 &master, const Int_t &shortId)¶
-
TVector3 LocalToMasterPath(const TVector3 &local, const TString &id)¶
-
inline TVector3 LocalToMasterShortId(const TVector3 &local, const Int_t &shortId)¶
-
TMatrixD MasterToLocalErrorsPath(const TMatrixD &master, const TString &id)¶
-
inline TMatrixD MasterToLocalErrorsShortId(const TMatrixD &master, const Int_t &shortId)¶
-
TMatrixD LocalToMasterErrorsPath(const TMatrixD &local, const TString &id)¶
-
inline TMatrixD LocalToMasterErrorsShortId(const TMatrixD &local, const Int_t &shortId)¶
-
TMatrixD GetCurrentRotationMatrix()¶
-
inline void SetVerbose(Int_t v)¶
-
inline void SetGeoManager(TGeoManager *geo)¶
-
inline 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.
-
inline void PrintSensorNames()¶
-
inline TObjArray *GetSensorNames()¶
-
inline std::vector<TString> GetSensorNamesWithString(TString value)¶
-
Int_t GetRunId(TString mcFile)¶
-
void GetGeoManager()¶
-
inline TGeoManager *GetGeoMan()¶
-
void GetSensorNamePar()¶
-
inline void FillSensorMap()¶
-
void InitRuntimeDb(TString parFileName)¶
-
inline PndGeoHandling &operator=(const PndGeoHandling&)¶
-
void CreateUniqueSensorId(const TString &startName, const std::vector<std::string> &listOfSensitives, PndSensorNameIdMap *idmap)¶