22 #include <TGeoManager.h>
26 #include <TRefArray.h>
28 #include <TVirtualMC.h>
36 TString lname(GetName());
45 , fLogger(rhs.fLogger)
75 LOG(info) <<
"FairDetector::DefineSensitiveVolumes";
76 TObjArray* volumes = gGeoManager->GetListOfVolumes();
79 while ((volume = static_cast<TGeoVolume*>(next()))) {
81 LOG(debug) <<
"Sensitive Volume " << volume->GetName();
97 std::cout <<
"Define sensitive volume " << std::endl;
101 Int_t NoOfEntries =
svList->GetEntries();
105 TString copysign =
"#";
106 for (Int_t i = 0; i < NoOfEntries; i++) {
108 cutName = aVol->GetName();
109 Ssiz_t pos = cutName.Index(copysign, 1);
114 fMCid = TVirtualMC::GetMC()->VolId(cutName.Data());
124 fMC = TVirtualMC::GetMC();
130 LOG(info) <<
"Detector: " << GetName() <<
" Geometry parameters saved ... ";
132 TFolder* stsf =
nullptr;
134 stsf =
dynamic_cast<TFolder*
>(mf->FindObjectAny(GetName()));
137 TFolder* newf = stsf->AddFolder(
"Parameters",
"Detector parameters",
nullptr);
void AddSensitiveVolume(TGeoVolume *v)
virtual void see Tutorial4 for examples LOG(warn)<< "This function is deprecated. Use FairAlignmentHandler instead
FairDetector & operator=(const FairDetector &)
static thread_local TRefArray * svList
FairGeoNode * getGeoNode()
ClassImp(FairEventBuilder)
Bool_t fGeoSaved
list of Detector Geometry parameters
TVirtualMC * fMC
flag for initialisation
virtual void Initialize()
FairModule & operator=(const FairModule &)
void DefineSensitiveVolumes()
static char * GetFolderName()
virtual Bool_t IsSensitive(const std::string &name)