FairRoot/PandaRoot
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
PndGeoHandling Class Reference

Class to access the naming information of the MVD. More...

#include <PndGeoHandling.h>

Inheritance diagram for PndGeoHandling:

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< TStringGetNamesLevel (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< TStringGetSensorNamesWithString (TString value)
 
Int_t GetRunId (TString mcFile)
 
void GetGeoManager ()
 
TGeoManager * GetGeoMan ()
 
void GetSensorNamePar ()
 
void FillSensorMap ()
 
void InitRuntimeDb (TString parFileName)
 
PndGeoHandlingoperator= (const PndGeoHandling &)
 

Static Public Member Functions

static PndGeoHandlingInstance ()
 
static void Destroy ()
 

Protected Member Functions

InitStatus Init ()
 
virtual InitStatus ReInit ()
 

Private Member Functions

 PndGeoHandling (PndGeoHandling &gh)
 
void DiveDownToFillSensNamePar (std::vector< std::string > listOfSensitives)
 
 ClassDef (PndGeoHandling, 3)
 

Private Attributes

TGeoManager * fGeoMan
 
PndSensorNameParfSensorNamePar
 
FairRuntimeDb * fRtdb
 
std::vector< TStringfLevelNames
 
Int_t fLevel
 
bool fFullPath
 
Int_t fRunId
 
Int_t fVerbose
 

Static Private Attributes

static PndGeoHandlingfInstance = NULL
 

Detailed Description

Class to access the naming information of the MVD.

PndGeoHandling.h

Author
: t.stockmanns t.sto.nosp@m.ckma.nosp@m.ns@fz.nosp@m.-jue.nosp@m.lich..nosp@m.de

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.

Constructor & Destructor Documentation

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.

References fInstance, fRtdb, run, SetName, and SetTitle().

Referenced by Instance().

45 {
46  if(fInstance) return;
47  fInstance = this;
48  FairRun* run = FairRun::Instance();
49 // if (!run) Fatal("PndGeoHandling","No FairRun object found. If used in a macro take another constructor.");
50 // run->AddTask((FairTask*)this);
51  if (run) {
52  this->SetName("PndGeoHandling");
53  this->SetTitle("FairTask");
54  run->AddTask((FairTask*)this);
55  fRtdb = run->GetRuntimeDb();
56 
57  }
58  else {
59  std::cout << "PndGeoHandling. No FairRun object found. If used in a macro take another constructor." << std::endl;
60  }
61 
62 }
cout<< "-----------------------------------------------> Quarter VOLUME<<endl;name="QuarterShape";QuarterShape=newTGeoArb8(name,dz,vertQuar);name="Quarter4Vol";TStringmedium="air";QuarterVol=newTGeoVolumeAssembly(name);name="SubunitShape";SubunitShape=newTGeoArb8(name,dz,vertSub);TStringmedium="air";name="SubunitVol";name1="SubunitVol1";name2="SubunitVol2";name3="SubunitVol3";name4="SubunitVol4";name5="SubunitVol5";name6="SubunitVol6";name7="SubunitVol7";name8="SubunitVol8";name9="SubunitVol9";SubunitVol=newTGeoVolumeAssembly(name);SubunitVol1=newTGeoVolumeAssembly(name1);SubunitVol2=newTGeoVolumeAssembly(name2);SubunitVol3=newTGeoVolumeAssembly(name3);SubunitVol4=newTGeoVolumeAssembly(name4);SubunitVol5=newTGeoVolumeAssembly(name5);SubunitVol6=newTGeoVolumeAssembly(name6);SubunitVol7=newTGeoVolumeAssembly(name7);SubunitVol8=newTGeoVolumeAssembly(name8);SubunitVol9=newTGeoVolumeAssembly(name9);name="BoxShape";BoxShape=newTGeoArb8(name,dz,vertBox);TStringmedium="air";name="BoxVol";BoxVol=newTGeoVolumeAssembly(name);name1="BoxVol1";name2="BoxVol2";name3="BoxVol3";name4="BoxVol4";BoxVol1=newTGeoVolumeAssembly(name1);BoxVol2=newTGeoVolumeAssembly(name2);BoxVol3=newTGeoVolumeAssembly(name3);BoxVol4=newTGeoVolumeAssembly(name4);for(Int_tb=0;b<kNumOfBoxes;b++){cout<<""<<endl;cout<<"---------------->BOXnumber:"<<b<<endl;if(b==0){trBox=newTGeoTranslation(tr+kSpaceInSub+kAlveoleThickness+0.5*kSpaceInBox,tr+kSpaceInSub+kAlveoleThickness+0.5*kSpaceInBox,0.);rotBox=newTGeoRotation();rotBox.RotateX(0.465518);rotBox.RotateY(-0.465518);}if(b==1){trBox=newTGeoTranslation(-tr-kSpaceInSub-kAlveoleThickness-0.5*kSpaceInBox,-tr-kSpaceInSub-kAlveoleThickness-0.5*kSpaceInBox,0.);rotBox=newTGeoRotation();rotBox.RotateX(-0.465518);rotBox.RotateY(0.465518);}if(b==2){trBox=newTGeoTranslation(tr+kSpaceInSub+kAlveoleThickness+0.5*kSpaceInBox,-tr-kSpaceInSub-kAlveoleThickness-0.5*kSpaceInBox,0.);rotBox=newTGeoRotation();rotBox.RotateX(-0.465518);rotBox.RotateY(-0.465518);}if(b==3){trBox=newTGeoTranslation(-tr-kSpaceInSub-kAlveoleThickness-0.5*kSpaceInBox,tr+kSpaceInSub+kAlveoleThickness+0.5*kSpaceInBox,0.);rotBox=newTGeoRotation();rotBox.RotateX(0.465518);rotBox.RotateY(0.465518);}TGeoCombiTrans*trrotBox=newTGeoCombiTrans(trBox,rotBox);name="BoxVol";name+=b;trrotBox->SetName(name);trrotBox->RegisterYourself();SubunitVol->AddNode(BoxVol,b,trrotBox);if(b==1){name+=b;trrotBox->SetName(name);trrotBox->RegisterYourself();SubunitVol1->AddNode(BoxVol,b,trrotBox);}if(b==2){name+=b;trrotBox->SetName(name);trrotBox->RegisterYourself();SubunitVol2->AddNode(BoxVol1,b,trrotBox);}if(b==0){name+=b;trrotBox-> SetName(name)
Int_t run
Definition: autocutx.C:47
std::vector< TString > fLevelNames
FairRuntimeDb * fRtdb
static PndGeoHandling * fInstance
h_MC_angle SetTitle("MC truth: opening angle of #pi^{0}")
PndSensorNamePar * fSensorNamePar
TGeoManager * fGeoMan
PndGeoHandling::PndGeoHandling ( TString  mcFile,
TString  parFile 
)

Definition at line 91 of file PndGeoHandling.cxx.

References fGeoMan, fInstance, GetGeoManager(), GetRunId(), GetSensorNamePar(), gGeoManager, and InitRuntimeDb().

92 {
93  if(fInstance) return;
94  fInstance = this;
97  if (gGeoManager) {
99  } else
100  {
101  //Fatal("PndGeoHandling","No gGeoManager");
102  //return;
103  GetGeoManager();
105  }
106 
107 
109 }
Int_t GetRunId(TString mcFile)
std::vector< TString > fLevelNames
FairRuntimeDb * fRtdb
TGeoManager * gGeoManager
static PndGeoHandling * fInstance
TString parFile
Definition: hit_dirc.C:14
void InitRuntimeDb(TString parFileName)
TString mcFile
Definition: runMvdTpcReco.C:22
PndSensorNamePar * fSensorNamePar
TGeoManager * fGeoMan
PndGeoHandling::PndGeoHandling ( Int_t  runID,
TString  parFile 
)

Definition at line 111 of file PndGeoHandling.cxx.

References fGeoMan, fInstance, fRunId, GetGeoManager(), GetSensorNamePar(), gGeoManager, and InitRuntimeDb().

112 {
113  if(fInstance) return;
114  fInstance = this;
116  fRunId = runId;
117  if (gGeoManager) {
119  } else
120  {
121  //Fatal("PndGeoHandling","No gGeoManager");
122  //return;
123  GetGeoManager();
125  }
127 
128 }
std::vector< TString > fLevelNames
FairRuntimeDb * fRtdb
TGeoManager * gGeoManager
static PndGeoHandling * fInstance
TString parFile
Definition: hit_dirc.C:14
void InitRuntimeDb(TString parFileName)
PndSensorNamePar * fSensorNamePar
TGeoManager * fGeoMan
PndGeoHandling::PndGeoHandling ( PndSensorNamePar SensorNamePar)

Definition at line 65 of file PndGeoHandling.cxx.

References fInstance.

65  : fGeoMan(gGeoManager), fSensorNamePar(SensorNamePar),fRtdb(), fLevelNames(), fLevel(0),fFullPath(true), fRunId(0),fVerbose(0)
66 {
67  if (fInstance) return;
68  fInstance = this;
69 
70 }
std::vector< TString > fLevelNames
FairRuntimeDb * fRtdb
TGeoManager * gGeoManager
static PndGeoHandling * fInstance
PndSensorNamePar * fSensorNamePar
TGeoManager * fGeoMan
virtual PndGeoHandling::~PndGeoHandling ( )
inlinevirtual

Definition at line 64 of file PndGeoHandling.h.

64 {};
PndGeoHandling::PndGeoHandling ( PndGeoHandling gh)
inlineprivate

Definition at line 184 of file PndGeoHandling.h.

184  :
185  FairTask(),
186  fGeoMan(gh.fGeoMan),
188  fRtdb(gh.fRtdb),
190  fLevel(gh.fLevel),
191  fFullPath(gh.fFullPath),
192  fRunId(gh.fRunId),
193  fVerbose(gh.fVerbose)
194  {}
std::vector< TString > fLevelNames
FairRuntimeDb * fRtdb
PndSensorNamePar * fSensorNamePar
TGeoManager * fGeoMan

Member Function Documentation

Bool_t PndGeoHandling::cd ( Int_t  id)

as the cd command of TGeoManager just with the ID

Definition at line 265 of file PndGeoHandling.cxx.

References fGeoMan, and GetPath().

Referenced by PndLmdGeometryHelper::translateVolumePathToHitLocationInfo().

266 {
267  return fGeoMan->cd(GetPath(id).Data());
268 }
TString GetPath(Int_t shortID)
for a given shortID the path is returned
TGeoManager * fGeoMan
void PndGeoHandling::cd ( TGeoNode *  node)

as cd command with the a node, not performant

Definition at line 577 of file PndGeoHandling.cxx.

References DiveDownToNode(), and fGeoMan.

578 {
579  // go to a node in the gGeoManager without knowing the full path
580  // With many volumes this becomes surely slow.
581  fGeoMan->CdTop(); // dive down from top node
582  DiveDownToNode(node);
583  return;
584 }
void DiveDownToNode(TGeoNode *node)
TGeoManager * fGeoMan
PndGeoHandling::ClassDef ( PndGeoHandling  ,
 
)
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 586 of file PndGeoHandling.cxx.

References DiveDownToFillSensNamePar(), DiveDownToNodeContainingString(), fGeoMan, and fVerbose.

Referenced by PndStt::ConstructGeometry(), PndMvdConvertApvTask::Init(), PndRich::Initialize(), PndSciT::Initialize(), PndSdsDetector::Initialize(), and PndDrc::Initialize().

587 {
588  fGeoMan->CdTop();
590  if (fVerbose > 0)
591  std::cout << "-I- PndMvdGeoHandling::CreateUniqueSensorId: StartNode: " << fGeoMan->GetPath() << std::endl;
592  DiveDownToFillSensNamePar(listOfSensitives);
593 }
void DiveDownToNodeContainingString(TString name)
runs through the GeoManager until a path is found with a substring which matches to the given string ...
void DiveDownToFillSensNamePar(std::vector< std::string > listOfSensitives)
TGeoManager * fGeoMan
static void PndGeoHandling::Destroy ( )
inlinestatic

Definition at line 52 of file PndGeoHandling.h.

References fInstance.

52  {
53  if (fInstance){
54  delete fInstance;
55  fInstance = 0;
56  }
57  }
static PndGeoHandling * fInstance
void PndGeoHandling::DiveDownToFillSensNamePar ( std::vector< std::string >  listOfSensitives)
private

Definition at line 551 of file PndGeoHandling.cxx.

References PndSensorNamePar::AddSensorName(), fGeoMan, fSensorNamePar, PndStringSeparator::GetStringVector(), TString, and VolumeIsSensitive().

Referenced by CreateUniqueSensorId().

552 {
553  if (fSensorNamePar != 0){
554  TGeoNode *currentNode = fGeoMan->GetCurrentNode();
555  TString nodeName(currentNode->GetName());
556  //std::cout << nodeName.Data() << std::endl;
557 
558  if (VolumeIsSensitive(nodeName, listOfSensitives)){
559  PndStringSeparator sep(nodeName.Data(), "/");
560  std::vector<std::string> sepString = sep.GetStringVector();
561  if (sepString.size() > 0 && sepString[sepString.size() - 1].find("PartAss") == std::string::npos){
562  TObjString* myName = new TObjString(fGeoMan->GetPath());
563  fSensorNamePar->AddSensorName(myName);
564  }
565  }
566  for (Int_t iNod = 0; iNod < currentNode->GetNdaughters(); iNod++) {
567  fGeoMan->CdDown(iNod);
568  DiveDownToFillSensNamePar(listOfSensitives);
569 
570  fGeoMan->CdUp();
571  }
572  }
573  else
574  std::cout << "-E- PndMvdGeoHandling::DiveDownToFillSensNamePar: fSensorNamePar does not exist!" << std::endl;
575 }
std::vector< std::string > GetStringVector(void)
Int_t AddSensorName(TObjString *name)
void DiveDownToFillSensNamePar(std::vector< std::string > listOfSensitives)
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...
PndSensorNamePar * fSensorNamePar
TGeoManager * fGeoMan
void PndGeoHandling::DiveDownToNode ( TGeoNode *  node)

Definition at line 519 of file PndGeoHandling.cxx.

References fGeoMan.

Referenced by cd(), and FindNodePath().

520 {
521  // cd gGeoManager from the current node to a given node
522  TGeoNode *currentNode = fGeoMan->GetCurrentNode();
523  if (currentNode == node) return;
524  for (Int_t iNod=0; iNod<currentNode->GetNdaughters();iNod++)
525  {
526  fGeoMan->CdDown(iNod);
527  DiveDownToNode(node);
528  if (fGeoMan->GetCurrentNode() == node) return;
529  fGeoMan->CdUp();
530  }
531 }
void DiveDownToNode(TGeoNode *node)
TGeoManager * fGeoMan
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 533 of file PndGeoHandling.cxx.

References fGeoMan, and TString.

Referenced by CreateUniqueSensorId().

534 {
535  TGeoNode *currentNode = fGeoMan->GetCurrentNode();
536  TString nodeName(currentNode->GetName());
537  if (nodeName.Contains(name)){
538  return;
539  }
540  for (Int_t iNod = 0; iNod < currentNode->GetNdaughters(); iNod++) {
541  fGeoMan->CdDown(iNod);
543  nodeName = fGeoMan->GetCurrentNode()->GetName();
544  if (nodeName.Contains(name)){
545  return;
546  }
547  fGeoMan->CdUp();
548  }
549 }
void DiveDownToNodeContainingString(TString name)
runs through the GeoManager until a path is found with a substring which matches to the given string ...
TString name
TGeoManager * fGeoMan
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 301 of file PndGeoHandling.cxx.

References fFullPath, fGeoMan, fLevel, fLevelNames, and i.

Referenced by GetNamesLevel().

302 {
303  TGeoNode* myNode = fGeoMan->GetCurrentNode();
304  if (fLevel == fGeoMan->GetLevel()){
305  if (fFullPath)
306  fLevelNames.push_back(fGeoMan->GetPath());
307  else
308  fLevelNames.push_back(myNode->GetName());
309  }
310  else {
311  Int_t nDaughters = myNode->GetNdaughters();
312  for (Int_t i = 0; i < nDaughters; i++){
313  fGeoMan->CdDown(i);
314  FillLevelNames();
315  fGeoMan->CdUp();
316  }
317  }
318 }
Int_t i
Definition: run_full.C:25
std::vector< TString > fLevelNames
void FillLevelNames()
fills vector&lt;TString&gt; fLevelNames with the names (or the paths) of the volumes down to the level give...
TGeoManager * fGeoMan
void PndGeoHandling::FillSensorMap ( )
inline

Definition at line 167 of file PndGeoHandling.h.

References PndSensorNamePar::FillMap(), and fSensorNamePar.

Referenced by PndSdsStripClusterTask::InitMQ().

167  {
169  }
PndSensorNamePar * fSensorNamePar
TString PndGeoHandling::FindNodePath ( TGeoNode *  node)

Definition at line 507 of file PndGeoHandling.cxx.

References DiveDownToNode(), fGeoMan, and TString.

508 {
509  // Find a nodes full path by going there in the gGeoManager
510  // With many volumes this becomes surely slow.
511  const char* oldpath = fGeoMan->GetPath();
512  fGeoMan->CdTop(); // dive down from top node
513  DiveDownToNode(node);
514  TString pathname = fGeoMan->GetPath();
515  fGeoMan->cd(oldpath);
516  return pathname;
517 }
void DiveDownToNode(TGeoNode *node)
TGeoManager * fGeoMan
TMatrixD PndGeoHandling::GetCurrentRotationMatrix ( )

Definition at line 490 of file PndGeoHandling.cxx.

References fGeoMan, and rot.

Referenced by LocalToMasterErrorsPath(), and MasterToLocalErrorsPath().

491 {
492  TMatrixD rot(3,3,fGeoMan->GetCurrentMatrix()->GetRotationMatrix());
493 // TMatrixD rot(3,3);
494 // rot[0][0] = fGeoMan->GetCurrentMatrix()->GetRotationMatrix()[0];
495 // rot[0][1] = fGeoMan->GetCurrentMatrix()->GetRotationMatrix()[1];
496 // rot[0][2] = fGeoMan->GetCurrentMatrix()->GetRotationMatrix()[2];
497 // rot[1][0] = fGeoMan->GetCurrentMatrix()->GetRotationMatrix()[3];
498 // rot[1][1] = fGeoMan->GetCurrentMatrix()->GetRotationMatrix()[4];
499 // rot[1][2] = fGeoMan->GetCurrentMatrix()->GetRotationMatrix()[5];
500 // rot[2][0] = fGeoMan->GetCurrentMatrix()->GetRotationMatrix()[6];
501 // rot[2][1] = fGeoMan->GetCurrentMatrix()->GetRotationMatrix()[7];
502 // rot[2][2] = fGeoMan->GetCurrentMatrix()->GetRotationMatrix()[8];
503  return rot;
504 }
TGeoRotation rot
TGeoManager * fGeoMan
TMatrixT< double > TMatrixD
Definition: PndLmdDim.h:52
TGeoManager* PndGeoHandling::GetGeoMan ( )
inline

Definition at line 165 of file PndGeoHandling.h.

References fGeoMan.

165 {return fGeoMan;}
TGeoManager * fGeoMan
void PndGeoHandling::GetGeoManager ( )

Definition at line 166 of file PndGeoHandling.cxx.

References fRtdb, fRunId, fVerbose, and par.

Referenced by PndGeoHandling().

167 {
168  if (fRunId < 0)
169  return;
170  FairBaseParSet* par=(FairBaseParSet*)(fRtdb->getContainer("FairGeoParSet"));
171  fRtdb->initContainers(fRunId);
172  if(fVerbose>0) par->Print();
173 }
Double_t par[3]
FairRuntimeDb * fRtdb
TGeoHMatrix * PndGeoHandling::GetMatrixPath ( TString  path)

Definition at line 376 of file PndGeoHandling.cxx.

References fGeoMan.

Referenced by GetMatrixShortId(), and PndPidCorrelator::GetMvdInfo().

377 {
378 // TString actPath = fGeoMan->GetPath();
379  fGeoMan->cd(path);
380 
381  TGeoHMatrix* currMatrix = fGeoMan->GetCurrentMatrix();
382 // if(actPath!="" && actPath!=" ") fGeoMan->cd(actPath);
383 
384  return currMatrix;
385 
386 }
TGeoManager * fGeoMan
TGeoHMatrix* PndGeoHandling::GetMatrixShortId ( Int_t  shortId)
inline

Definition at line 88 of file PndGeoHandling.h.

References GetMatrixPath(), and GetPath().

Referenced by PndMvdDigiPixelDraw::Exec(), PndSttTubeCreator::GetTube(), PndSttMapCreator::GetTubeFromParametersToFillGeoType2(), and PndDrcAccuDigiPixelDraw::ReadAllHits().

88  {
89  return GetMatrixPath(GetPath(shortId));
90  }
TGeoHMatrix * GetMatrixPath(TString path)
TString GetPath(Int_t shortID)
for a given shortID the path is returned
std::vector< TString > PndGeoHandling::GetNamesLevel ( Int_t  level,
TString  startPath = "" 
)

Definition at line 281 of file PndGeoHandling.cxx.

References fGeoMan, FillLevelNames(), fLevel, fLevelNames, and TString.

282 {
283  TString actPath = fGeoMan->GetPath();
284  fLevelNames.clear();
285 
286  if (startPath == ""){
287  fGeoMan->CdTop();
288  fLevel = level;
289  }
290  else{
291  if (fGeoMan->cd(startPath.Data())== 0)
292  return fLevelNames;
293  else {
294  fLevel = fGeoMan->GetLevel() + level;
295  }
296  }
297  FillLevelNames();
298  return fLevelNames;
299 }
std::vector< TString > fLevelNames
void FillLevelNames()
fills vector&lt;TString&gt; fLevelNames with the names (or the paths) of the volumes down to the level give...
TGeoManager * fGeoMan
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 320 of file PndGeoHandling.cxx.

References Double_t, fGeoMan, and TString.

Referenced by PndTrkClean::FindMvdLayer(), and GetOUVShortId().

321 {
322  Double_t result[3];
323  Double_t* temp;
324  TString actPath = fGeoMan->GetPath();
325  fGeoMan->cd(path);
326 
327  TGeoHMatrix* currMatrix = fGeoMan->GetCurrentMatrix();
328  temp = currMatrix->GetTranslation();
329  o.SetXYZ(temp[0], temp[1], temp[2]);
330 
331  temp[0] = 1;
332  temp[1] = 0;
333  temp[2] = 0;
334  fGeoMan->LocalToMasterVect(temp, result);
335  u.SetXYZ(result[0], result[1], result[2]);
336 
337  temp[0] = 0;
338  temp[1] = 1;
339  temp[2] = 0;
340  fGeoMan->LocalToMasterVect(temp, result);
341  v.SetXYZ(result[0], result[1], result[2]);
342 
343  if(actPath!="" && actPath!=" ") fGeoMan->cd(actPath);
344 }
__m128 v
Definition: P4_F32vec4.h:4
Double_t
TGeoManager * fGeoMan
void PndGeoHandling::GetOUVShortId ( Int_t  shortId,
TVector3 &  o,
TVector3 &  u,
TVector3 &  v 
)
inline

Definition at line 81 of file PndGeoHandling.h.

References fSensorNamePar, GetOUVPath(), and GetPath().

Referenced by PndLmdLinFitTask::Exec(), PndMvdMSAnaTask::Exec(), PndLmdKalmanTask::Exec(), PndSdsRecoHit::PndSdsRecoHit(), and PndSdsRecoHit2::PndSdsRecoHit2().

81  {
82  if (fSensorNamePar != 0)
83  GetOUVPath(GetPath(shortId), o, u, v);
84  }
TString GetPath(Int_t shortID)
for a given shortID the path is returned
__m128 v
Definition: P4_F32vec4.h:4
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
PndSensorNamePar * fSensorNamePar
TString PndGeoHandling::GetPath ( Int_t  shortID)

for a given shortID the path is returned

Definition at line 222 of file PndGeoHandling.cxx.

References fSensorNamePar, and PndSensorNamePar::GetSensorName().

Referenced by PndSdsDetector::AddHit(), anaclust(), PndSdsStripClusterTask::CalcMeanCharge(), cd(), PndMvdAllDataEventAna::Create3DGeoHits(), PndLmdGeometryHelper::createMappingEntry(), PndMvdDigiEventAna::CreateMaxHitsHisto(), PndSttTubeMapCreatorRoot::CreateTubeMap(), PndMvdDigiPixelDraw::Exec(), PndMvdRadDamIonizingTask::Exec(), PndMvdRadDamTask::Exec(), PndMvdMSAnaTask::Exec(), PndMvdConvertApvTask::Exec(), PndLmdKalmanTask::Exec(), PndSdsHybridHitProducer::Exec(), PndSdsStripHitProducerDif::Exec(), PndSdsStripHitProducer::Exec(), PndSdsStripClusterTask::FillClusterFinders(), PndMvdAllDataEventAna::FillHitHistos(), PndTrkClean::FindMvdLayer(), PndMvdSttGemRiemannTrackFinder::GetLayerMvd(), PndMvdAllDataEventAna::GetLocalHitPoints(), PndLmdGeometryHelper::getMatrixPndGlobalToSensor(), GetMatrixShortId(), PndMvdAllDataEventAna::GetModulesHit(), PndPidCorrelator::GetMvdInfo(), GetOUVShortId(), PndMQSdsChargeWeightedPixelMapping::GetSensorDimensions(), PndSdsChargeWeightedPixelMapping::GetSensorDimensions(), PndDrcDigiTask::GetSensorDimensions(), PndDrcTimeDigiTask::GetSensorDimensions(), PndSdsHybridHitProducer::GetSensorDimensions(), GetSensorDimensionsShortId(), PndMQSdsChargeWeightedPixelMapping::GetTransformation(), PndSdsChargeWeightedPixelMapping::GetTransformation(), PndSdsHybridHitProducer::GetTransformation(), PndMvdIdealRecoTask::InitTransMat(), PndSdsIdealRecoTask::InitTransMat(), LocalToMasterErrorsShortId(), LocalToMasterShortId(), MasterToLocalErrorsShortId(), MasterToLocalShortId(), PndSdsRecoHit::PndSdsRecoHit(), PndSdsRecoHit2::PndSdsRecoHit2(), ReadHCal(), ReadHits(), ReadLines(), PndSdsStripClusterTask::SelectSensorParams(), PndSdsStripHitProducerDif::SelectSensorParams(), PndSdsStripHitProducer::SelectSensorParams(), and TrackHits().

223 {
224  if (fSensorNamePar != 0){
225  return (fSensorNamePar->GetSensorName(shortID));
226  }
227  else {
228  std::cout << "-E- PndGeoHandling::GetPath(Int_t shortID): Missing SensorNamePar" << std::endl;
229  abort();
230  }
231 }
TString GetSensorName(Int_t index)
PndSensorNamePar * fSensorNamePar
Int_t PndGeoHandling::GetRunId ( TString  mcFile)

Definition at line 130 of file PndGeoHandling.cxx.

References f, fRunId, and t.

Referenced by PndGeoHandling().

131 {
132  TFile f(mcFile.Data());
133  TTree* t = (TTree*)f.Get("pndsim");
134  FairMCEventHeader* header= new FairMCEventHeader();
135  t->SetBranchStatus("MCEventHeader.",1);
136  t->SetBranchAddress("MCEventHeader.", &header);
137  t->GetEntry(0);
138  fRunId = header->GetRunID();
139 
140  t->SetBranchStatus("MCEventHeader.",0);
141  return fRunId;
142 }
TFile * f
Definition: bump_analys.C:12
TString mcFile
Definition: runMvdTpcReco.C:22
TTree * t
Definition: bump_analys.C:13
TVector3 PndGeoHandling::GetSensorDimensionsPath ( TString  path)

Definition at line 353 of file PndGeoHandling.cxx.

References fGeoMan, gGeoManager, and TString.

Referenced by GetSensorDimensionsShortId().

354 {
355  TVector3 dim;
356  TString actPath = fGeoMan->GetPath();
357  fGeoMan->cd(path);
358 
359  TGeoVolume* actVolume = gGeoManager->GetCurrentVolume();
360  TGeoBBox* actBox = (TGeoBBox*)(actVolume->GetShape());
361  dim.SetX(actBox->GetDX());
362  dim.SetY(actBox->GetDY());
363  dim.SetZ(actBox->GetDZ());
364 
365  if(actPath!="" && actPath!=" ") fGeoMan->cd(actPath);
366  return dim;
367 }
TGeoManager * gGeoManager
TGeoManager * fGeoMan
TVector3 PndGeoHandling::GetSensorDimensionsShortId ( Int_t  shortId)
inline
void PndGeoHandling::GetSensorNamePar ( )

Definition at line 144 of file PndGeoHandling.cxx.

References fRtdb, fRunId, fSensorNamePar, fVerbose, and PndSensorNamePar::Print().

Referenced by PndGeoHandling().

145 {
146  fSensorNamePar = (PndSensorNamePar*) (fRtdb->getContainer("PndSensorNamePar"));
147 
148  fRtdb->initContainers(fRunId);
149 
150  if (fVerbose > 1){
151  std::cout << "PndGeoHandling::GetSensorNamePar()" << std::endl;
152  fRtdb->Print();
154  }
155 }
FairRuntimeDb * fRtdb
PndSensorNamePar * fSensorNamePar
Unique match between SensorID and path in TGeoManager.
TObjArray* PndGeoHandling::GetSensorNames ( )
inline

Definition at line 147 of file PndGeoHandling.h.

References fSensorNamePar, and PndSensorNamePar::GetSensorNames().

Referenced by PndLmdNoiseProducer::FillSensorLists(), PndMvdNoiseProducer::FillSensorLists(), PndSdsNoiseProducer::FillSensorLists(), and PndSttMapCreator::FillSttTubeParametersType2().

147  {
148  if (fSensorNamePar != 0)
149  return fSensorNamePar->GetSensorNames();
150  else
151  return 0;
152  }
TObjArray * GetSensorNames() const
PndSensorNamePar * fSensorNamePar
std::vector<TString> PndGeoHandling::GetSensorNamesWithString ( TString  value)
inline

Definition at line 154 of file PndGeoHandling.h.

References fSensorNamePar, and PndSensorNamePar::GetSensorNamesWithString().

Referenced by PndSttTubeIdMapCreatorRoot::CreateTubeMap(), and PndSttTubeMapCreatorRoot::CreateTubeMap().

154  {
155  if (fSensorNamePar != 0)
157  else {
158  std::vector<TString> empty;
159  return empty;
160  }
161  }
std::vector< TString > GetSensorNamesWithString(TString identifier)
PndSensorNamePar * fSensorNamePar
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 209 of file PndGeoHandling.cxx.

References fSensorNamePar, and PndSensorNamePar::SensorInList().

Referenced by PndLmdGeometryHelper::createMappingEntry(), PndSttTubeMapCreatorRoot::CreateTubeMap(), PndSttMapCreator::CreateTubeParametersGeoType2(), PndMvdConvertApvTask::Exec(), PndSciT::ProcessHits(), PndStt::ProcessHits(), PndDrc::ProcessHits(), and PndSdsDetector::ProcessHits().

210 {
211  TObjString myPath(path.Data());
212  if (fSensorNamePar != 0){
213 // std::cout << "PndGeoHandling::GetShortID: " << std::endl;
214 // fSensorNamePar->Print();
215  return fSensorNamePar->SensorInList(&myPath);
216  }
217  else
218  std::cout << "-E- PndGeoHandling::GetShortID: SensorNamePar is missing!" << std::endl;
219  return -1;
220 }
Int_t SensorInList(TObjString *name)
PndSensorNamePar * fSensorNamePar
TString PndGeoHandling::GetVolumeID ( TString  name)

returns the volume ID for a given volume name

Definition at line 271 of file PndGeoHandling.cxx.

References fGeoMan, and TString.

Referenced by drawMvdHistos(), and plotDC02AnalyzedData().

272 {
273  TString result;
274  TGeoVolume* vol = fGeoMan->FindVolumeFast(name);
275  if (vol == 0)
276  return result;
277  result += vol->GetNumber();
278  return result;
279 }
TString name
TGeoManager * fGeoMan
InitStatus PndGeoHandling::Init ( )
inlineprotected

Definition at line 175 of file PndGeoHandling.h.

References PndSensorNamePar::FillMap(), and fSensorNamePar.

175  {
177  return kSUCCESS;
178  }
PndSensorNamePar * fSensorNamePar
void PndGeoHandling::InitRuntimeDb ( TString  parFileName)

Definition at line 157 of file PndGeoHandling.cxx.

References fRtdb, and parInput1.

Referenced by PndGeoHandling().

158 {
159  fRtdb = FairRuntimeDb::instance();
160  FairParRootFileIo* parInput1 = new FairParRootFileIo(kTRUE);
161  parInput1->open(parFileName.Data(),"UPDATE");
162  fRtdb->setFirstInput(parInput1);
163  fRtdb->setOutput(parInput1);
164 }
FairRuntimeDb * fRtdb
FairParRootFileIo * parInput1
Definition: hit_dirc.C:67
PndGeoHandling * PndGeoHandling::Instance ( )
static

Definition at line 36 of file PndGeoHandling.cxx.

References fInstance, and PndGeoHandling().

Referenced by PndStt::ConstructGeometry(), PndLmdGeometryHelper::createMappingEntry(), PndSttTubeIdMapCreatorRoot::CreateTubeMap(), PndSttTubeMapCreatorRoot::CreateTubeMap(), PndSttMapCreator::CreateTubeParametersGeoType2(), PndCATracking::Exec(), PndSttMapCreator::FillSttTubeParametersType2(), PndLmdGeometryHelper::getMatrixPndGlobalToSensor(), PndSttTubeCreator::GetTube(), PndSttMapCreator::GetTubeFromParametersToFillGeoType2(), PndMvdDigiPixelDraw::Init(), PndDrcAccuDigiPixelDraw::Init(), PndLmdLinFitTask::Init(), PndLmdBPRungeKuttaTask::Init(), PndLmdBPtestTask::Init(), PndLmdGeaneTask::Init(), PndLmdSigCleanTask::Init(), PndDrcDigiTask::Init(), PndLmdPerformanceTask::Init(), PndPhoGunShort::Init(), PndPhoGunShortP::Init(), PndLmdKalmanTask::Init(), PndDrcTimeDigiTask::Init(), PndTrackingQualityBarrelAnalysisNewLinks::IsBarrelMVD(), IsBarrelMVD(), PndDrc::PndDrc(), PndHypDKalmanTask::PndHypDKalmanTask(), PndLmdKalmanTask::PndLmdKalmanTask(), PndLmdStripClusterTask::PndLmdStripClusterTask(), PndMQSdsPixelBackMapping::PndMQSdsPixelBackMapping(), PndMvdAllDataEventAna::PndMvdAllDataEventAna(), PndMvdConvertApv::PndMvdConvertApv(), PndMvdDigiEventAna::PndMvdDigiEventAna(), PndMvdMCEventAna::PndMvdMCEventAna(), PndMvdMSAnaTask::PndMvdMSAnaTask(), PndMvdRiemannTrackFinderTask::PndMvdRiemannTrackFinderTask(), PndMvdSttGemRiemannTrackFinder::PndMvdSttGemRiemannTrackFinder(), PndMvdSttGemRiemannTrackFinderTask::PndMvdSttGemRiemannTrackFinderTask(), PndPidCorrelator::PndPidCorrelator(), PndRecoDafFit::PndRecoDafFit(), PndRecoDafFit2::PndRecoDafFit2(), PndRecoKalmanFit::PndRecoKalmanFit(), PndRecoKalmanFit2::PndRecoKalmanFit2(), PndRich::PndRich(), PndSciT::PndSciT(), PndSdsRecoHit::PndSdsRecoHit(), PndSdsRecoHit2::PndSdsRecoHit2(), PndSdsStripHitProducerDif::PndSdsStripHitProducerDif(), PndTrkClean::PndTrkClean(), PndTrkCombiLegendreTask::PndTrkCombiLegendreTask(), PndTrkLegendreNew::PndTrkLegendreNew(), PndTrkLegendreSecTask::PndTrkLegendreSecTask(), PndTrkLegendreSecTask2::PndTrkLegendreSecTask2(), PndTrkLegendreTask::PndTrkLegendreTask(), PndTrkTrackFinder::PndTrkTrackFinder(), PndStt::ProcessHits(), PndLmdStripHitProducer::SetParContainers(), PndLmdNoiseProducer::SetParContainers(), PndSttRootGeometryInitTask::SetParContainers(), PndDrcHitFinder::SetParContainers(), PndRichHitFinder::SetParContainers(), PndCATracking::SetParContainers(), PndSciTDigiTask::SetParContainers(), PndSciTHitProducerIdeal::SetParContainers(), PndMvdNoiseProducer::SetParContainers(), PndLmdPairFinderTask::SetParContainers(), PndSdsNoiseProducer::SetParContainers(), PndSdsHybridHitProducer::SetParContainers(), PndDrcRecoLookupMapS::SetParContainers(), PndSdsStripHitProducer::SetParContainers(), PndSdsPixelClusterTask::SetParContainers(), PndSdsStripClusterTask::SetParContainers(), PndDrcRecoLookupMap::SetParContainers(), PndLmdGeometryHelper::translateVolumePathToHitLocationInfo(), and PndCATracking::WriteMVDHits().

36  {
37  if ( !fInstance){
38  std::cout<<"Info in (PndGeoHandling::Instance): Making a new instance using the framework."<<std::endl;
39  fInstance = new PndGeoHandling();
40  }
41  return fInstance;
42 }
static PndGeoHandling * fInstance
PndGeoHandling()
default constructor. Has to be called in SetParContainers if the support of shortId is needed...
TMatrixD PndGeoHandling::LocalToMasterErrorsPath ( const TMatrixD local,
const TString id 
)

Definition at line 471 of file PndGeoHandling.cxx.

References fGeoMan, fVerbose, GetCurrentRotationMatrix(), rot, and TString.

Referenced by LocalToMasterErrorsShortId().

472 {
473  TString actPath = fGeoMan->GetPath();
474  fGeoMan->cd(path);
476  TMatrixD result = rot;
477  result.T();
478  result*=local;
479  result*=rot;
480  if(fVerbose>1){
481  std::cout<<" -I- PndGeoHandling::LocalToMasterErrorsPath: print matrices: master, rotation, result=R^T*M*R"<<std::endl;
482  local.Print();
483  rot.Print();
484  result.Print();
485  }
486  if(actPath != "" && actPath != " ") fGeoMan->cd(actPath);
487  return result;
488 }
TMatrixD GetCurrentRotationMatrix()
TGeoRotation rot
TGeoManager * fGeoMan
TMatrixT< double > TMatrixD
Definition: PndLmdDim.h:52
TMatrixD PndGeoHandling::LocalToMasterErrorsShortId ( const TMatrixD local,
const Int_t &  shortId 
)
inline

Definition at line 119 of file PndGeoHandling.h.

References GetPath(), and LocalToMasterErrorsPath().

Referenced by PndLmdStripClusterTask::Backmap(), PndSdsStripClusterTask::Backmap(), PndMQSdsChargeWeightedPixelMapping::GetCluster(), and PndSdsChargeWeightedPixelMapping::GetCluster().

119  {
120  return LocalToMasterErrorsPath(local, GetPath(shortId));
121  }
TString GetPath(Int_t shortID)
for a given shortID the path is returned
TMatrixD LocalToMasterErrorsPath(const TMatrixD &local, const TString &id)
TVector3 PndGeoHandling::LocalToMasterPath ( const TVector3 &  local,
const TString id 
)

Definition at line 424 of file PndGeoHandling.cxx.

References Double_t, fGeoMan, and TString.

Referenced by LocalToMasterShortId().

425 {
426  Double_t result[3];
427  Double_t temp[3];
428 
429  temp[0] = local.X();
430  temp[1] = local.Y();
431  temp[2] = local.Z();
432 
433  TString actPath = fGeoMan->GetPath();
434  fGeoMan->cd(path);
435  fGeoMan->LocalToMaster(temp, result);
436  if(actPath != "" && actPath != " ") fGeoMan->cd(actPath);
437  return TVector3(result[0],result[1],result[2]);
438 }
Double_t
TGeoManager * fGeoMan
TVector3 PndGeoHandling::LocalToMasterShortId ( const TVector3 &  local,
const Int_t &  shortId 
)
inline
TMatrixD PndGeoHandling::MasterToLocalErrorsPath ( const TMatrixD master,
const TString id 
)

Definition at line 446 of file PndGeoHandling.cxx.

References fGeoMan, fVerbose, GetCurrentRotationMatrix(), rot, and TString.

Referenced by MasterToLocalErrorsShortId().

447 {
448  TString actPath = fGeoMan->GetPath();
449  fGeoMan->cd(path);
451  TMatrixD result = rot;
452  result*=master;
453  rot.T();
454  result*=rot;
455  if(fVerbose>1){
456  std::cout<<" -I- PndGeoHandling::MasterToLocalErrorsPath: print matrices: master, rotation, result=R*M*R^T"<<std::endl;
457  master.Print();
458  rot.Print();
459  result.Print();
460  }
461  if(actPath != "" && actPath != " ") fGeoMan->cd(actPath);
462  return result;
463 }
TMatrixD GetCurrentRotationMatrix()
TGeoRotation rot
TGeoManager * fGeoMan
TMatrixT< double > TMatrixD
Definition: PndLmdDim.h:52
TMatrixD PndGeoHandling::MasterToLocalErrorsShortId ( const TMatrixD master,
const Int_t &  shortId 
)
inline

Definition at line 113 of file PndGeoHandling.h.

References GetPath(), and MasterToLocalErrorsPath().

Referenced by PndSdsRecoHit::PndSdsRecoHit(), and PndSdsRecoHit2::PndSdsRecoHit2().

113  {
114  return MasterToLocalErrorsPath(master, GetPath(shortId));
115  }
TString GetPath(Int_t shortID)
for a given shortID the path is returned
TMatrixD MasterToLocalErrorsPath(const TMatrixD &master, const TString &id)
TVector3 PndGeoHandling::MasterToLocalPath ( const TVector3 &  master,
const TString id 
)

Definition at line 401 of file PndGeoHandling.cxx.

References Double_t, fGeoMan, and TString.

Referenced by MasterToLocalShortId().

402 {
403  // if(fVerbose>1) std::cout<<" -I- PndGeoHandling::MasterToLocalPath"<<std::endl;
404  Double_t result[3];
405  Double_t temp[3];
406 
407  temp[0] = master.X();
408  temp[1] = master.Y();
409  temp[2] = master.Z();
410 
411  TString actPath = fGeoMan->GetPath();
412  fGeoMan->cd(path);
413  fGeoMan->MasterToLocal(temp, result);
414  if(actPath != "" && actPath != " ") fGeoMan->cd(actPath);
415  return TVector3(result[0],result[1],result[2]);
416 }
Double_t
TGeoManager * fGeoMan
TVector3 PndGeoHandling::MasterToLocalShortId ( const TVector3 &  master,
const Int_t &  shortId 
)
inline
PndGeoHandling& PndGeoHandling::operator= ( const PndGeoHandling )
inline

Definition at line 172 of file PndGeoHandling.h.

172 {return *this;}
void PndGeoHandling::PrintSensorNames ( )
inline
virtual InitStatus PndGeoHandling::ReInit ( )
inlineprotectedvirtual

Definition at line 180 of file PndGeoHandling.h.

References fGeoMan, and gGeoManager.

180 {fGeoMan =0;fGeoMan=gGeoManager;return kSUCCESS;}
TGeoManager * gGeoManager
TGeoManager * fGeoMan
void PndGeoHandling::SetGeoManager ( TGeoManager *  geo)
inline

Definition at line 126 of file PndGeoHandling.h.

References fGeoMan.

126 {fGeoMan = geo;};
TGeoManager * fGeoMan
void PndGeoHandling::SetParContainers ( )
virtual

Definition at line 72 of file PndGeoHandling.cxx.

References fGeoMan, fRtdb, fRunId, fSensorNamePar, gGeoManager, and run.

Referenced by PndDrcDigiTask::Init(), PndPhoGunShort::Init(), PndPhoGunShortP::Init(), PndDrcTimeDigiTask::Init(), PndLmdStripHitProducer::SetParContainers(), PndLmdNoiseProducer::SetParContainers(), PndSttRootGeometryInitTask::SetParContainers(), PndCATracking::SetParContainers(), PndDrcHitFinder::SetParContainers(), PndRichHitFinder::SetParContainers(), PndSciTDigiTask::SetParContainers(), PndMvdIdealRecoTask::SetParContainers(), PndSciTHitProducerIdeal::SetParContainers(), PndMvdNoiseProducer::SetParContainers(), PndLmdPairFinderTask::SetParContainers(), PndSdsNoiseProducer::SetParContainers(), PndSdsHybridHitProducer::SetParContainers(), PndSdsIdealRecoTask::SetParContainers(), PndSdsIdealClusterTask::SetParContainers(), PndSdsStripHitProducerDif::SetParContainers(), PndDrcRecoLookupMapS::SetParContainers(), PndSdsStripHitProducer::SetParContainers(), PndSdsPixelClusterTask::SetParContainers(), PndSdsStripClusterTask::SetParContainers(), and PndDrcRecoLookupMap::SetParContainers().

73 {
74  if (fRunId != 0) return; //SetParContainers was already called
75  if (fSensorNamePar != 0) return;
76  FairRun* run = FairRun::Instance();
77  if (!run) Fatal("PndGeoHandling","No FairRun object found.");
78  fRtdb = run->GetRuntimeDb();
79  if (!fRtdb) Fatal("PndGeoHandling","No runtime database found.");
80  fRunId = run->GetRunId();
81  if (fRunId < 0) Error("PndGeoHandling", "No valid run ID? %i",fRunId);
82  //if (!gGeoManager) GetGeoManager();
84  if (!fGeoMan) Fatal("PndGeoHandling","No gGeoManager found.");
85  fSensorNamePar = (PndSensorNamePar*) (fRtdb->getContainer("PndSensorNamePar"));
86  if ( ! fSensorNamePar) Fatal("PndGeoHandling","No PndSensorNamePar parameters found.");
87  fRtdb->initContainers(fRunId);
88  FairTask::SetParContainers();
89 }
Int_t run
Definition: autocutx.C:47
FairRuntimeDb * fRtdb
TGeoManager * gGeoManager
PndSensorNamePar * fSensorNamePar
TGeoManager * fGeoMan
Unique match between SensorID and path in TGeoManager.
void PndGeoHandling::SetSensorNamePar ( PndSensorNamePar par)
inline

Definition at line 127 of file PndGeoHandling.h.

References fSensorNamePar, and par.

Referenced by PndMQMvdPixelDigiProcessorBursts::SetParameters().

127 {fSensorNamePar = par;}
Double_t par[3]
PndSensorNamePar * fSensorNamePar
void PndGeoHandling::SetVerbose ( Int_t  v)
inline
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 596 of file PndGeoHandling.cxx.

References i.

Referenced by DiveDownToFillSensNamePar().

597 {
598  for (unsigned int i = 0; i < listOfSensitives.size(); i++){
599  if (path.Contains(listOfSensitives[i].c_str()))
600  return true;
601  }
602  return false;
603 }
Int_t i
Definition: run_full.C:25

Member Data Documentation

bool PndGeoHandling::fFullPath
private

Definition at line 205 of file PndGeoHandling.h.

Referenced by FillLevelNames().

TGeoManager* PndGeoHandling::fGeoMan
private
PndGeoHandling * PndGeoHandling::fInstance = NULL
staticprivate

Definition at line 183 of file PndGeoHandling.h.

Referenced by Destroy(), Instance(), and PndGeoHandling().

Int_t PndGeoHandling::fLevel
private

Definition at line 204 of file PndGeoHandling.h.

Referenced by FillLevelNames(), and GetNamesLevel().

std::vector<TString> PndGeoHandling::fLevelNames
private

Definition at line 203 of file PndGeoHandling.h.

Referenced by FillLevelNames(), and GetNamesLevel().

FairRuntimeDb* PndGeoHandling::fRtdb
private
Int_t PndGeoHandling::fRunId
private
PndSensorNamePar* PndGeoHandling::fSensorNamePar
private
Int_t PndGeoHandling::fVerbose
private

The documentation for this class was generated from the following files: