27 #ifndef PNDGEOHANDLING_H 28 #define PNDGEOHANDLING_H 34 #include "FairRuntimeDb.h" 37 #include "TGeoManager.h" 38 #include "TGeoMatrix.h" 81 std::vector<TString>
GetNamesLevel(Int_t level, TString startPath =
"");
82 void GetOUVPath(TString path, TVector3 &o, TVector3 &u, TVector3 &
v);
84 void GetOUVShortId(Int_t shortId, TVector3 &o, TVector3 &u, TVector3 &v)
86 if (fSensorNamePar != 0)
127 void cd(TGeoNode *node);
134 std::vector<std::string> &listOfSensitives);
139 fSensorNamePar->
Print();
144 if (fSensorNamePar !=
nullptr)
152 if (fSensorNamePar !=
nullptr)
155 std::vector<TString> empty;
183 fGeoMan = gGeoManager;
190 : FairTask(), fGeoMan(gh.fGeoMan), fSensorNamePar(gh.fSensorNamePar), fRtdb(gh.fRtdb), fLevelNames(gh.fLevelNames), fLevel(gh.fLevel), fFullPath(gh.fFullPath),
191 fRunId(gh.fRunId), fVerbose(gh.fVerbose)
195 void DiveDownToFillSensNamePar(std::vector<std::string> listOfSensitives);
197 TGeoManager *fGeoMan{
nullptr};
199 FairRuntimeDb *fRtdb{
nullptr};
202 std::vector<TString> fLevelNames{};
204 bool fFullPath{
true};
TString FindNodePath(TGeoNode *node)
Int_t GetRunId(TString mcFile)
void SetGeoManager(TGeoManager *geo)
void DiveDownToNode(TGeoNode *node)
virtual InitStatus ReInit()
void DiveDownToNodeContainingString(TString name)
runs through the GeoManager until a path is found with a substring which matches to the given string ...
void SetSensorNamePar(PndSensorNamePar *par)
void GetOUVShortId(Int_t shortId, TVector3 &o, TVector3 &u, TVector3 &v)
virtual ~PndGeoHandling()
std::vector< TString > GetSensorNamesWithString(TString identifier)
void CreateUniqueSensorId(TString startName, std::vector< std::string > listOfSensitives)
Has to be called during simulation to create unique sensor id.
static PndGeoHandling * Instance()
TVector3 GetSensorDimensionsPath(TString path)
TVector3 MasterToLocalPath(const TVector3 &master, const TString &id)
void FillLevelNames()
fills vector<TString> fLevelNames with the names (or the paths) of the volumes down to the level give...
TMatrixD MasterToLocalErrorsShortId(const TMatrixD &master, const Int_t &shortId)
std::vector< TString > GetSensorNamesWithString(TString value)
std::vector< TString > GetNamesLevel(Int_t level, TString startPath="")
TString GetPath(Int_t shortID)
for a given shortID the path is returned
TVector3 GetSensorDimensionsShortId(Int_t shortId)
TGeoHMatrix * GetMatrixShortId(Int_t shortId)
TMatrixD LocalToMasterErrorsShortId(const TMatrixD &local, const Int_t &shortId)
Class to access the naming information of the MVD.
TString GetVolumeID(TString name)
returns the volume ID for a given volume name
Base class for NameIdMaps used by the EmcGeoHandling singleton to retrieve a detector id from a name ...
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
TMatrixD GetCurrentRotationMatrix()
void InitRuntimeDb(TString parFileName)
TMatrixD LocalToMasterErrorsPath(const TMatrixD &local, const TString &id)
Bool_t cd(Int_t id)
as the cd command of TGeoManager just with the ID
TObjArray * GetSensorNames()
Int_t GetIdForSensor(TString &sensName) const
Int_t GetShortID(TString path)
for a given path the (unique) position of the sensor path in the fSensorNamePar-List is given...
TVector3 LocalToMasterPath(const TVector3 &local, const TString &id)
TVector3 MasterToLocalShortId(const TVector3 &master, const Int_t &shortId)
TMatrixD MasterToLocalErrorsPath(const TMatrixD &master, const TString &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...
virtual void SetParContainers()
PndGeoHandling & operator=(const PndGeoHandling &)
TGeoManager * GetGeoMan()
TVector3 LocalToMasterShortId(const TVector3 &local, const Int_t &shortId)
TGeoHMatrix * GetMatrixPath(TString path)
TObjArray * GetSensorNames() const
TMatrixT< double > TMatrixD
PndGeoHandling()
default constructor. Has to be called in SetParContainers if the support of shortId is needed...
Unique match between SensorID and path in TGeoManager.