4 #include "FairGeoLoader.h"
5 #include "FairGeoInterface.h"
7 #include "FairGeoRootBuilder.h"
8 #include "FairRuntimeDb.h"
10 #include "TObjArray.h"
12 #include "FairGeoVolume.h"
13 #include "FairGeoNode.h"
23 : FairModule(name ,Title)
29 TString fileName=GetGeometryFileName();
30 if (fileName.EndsWith(
".geo")) {
32 }
else if(fileName.EndsWith(
".root")) {
33 ConstructRootGeometry();
35 std::cout<<
"Geometry format not supported " <<std::endl;
46 FairGeoLoader *loader=FairGeoLoader::Instance();
47 FairGeoInterface *GeoInterface =loader->getGeoInterface();
49 MGeo->setGeomFile(GetGeometryFileName());
50 GeoInterface->addGeoModule(MGeo);
51 Bool_t rc = GeoInterface->readSet(MGeo);
52 if ( rc ) MGeo->create(loader->getGeoBuilder());
54 TList* volList = MGeo->getListOfVolumes();
56 FairRun *
fRun = FairRun::Instance();
57 FairRuntimeDb *
rtdb= FairRun::Instance()->GetRuntimeDb();
62 TListIter iter(volList);
63 FairGeoNode* node = NULL;
64 FairGeoVolume *aVol=NULL;
66 while( (node = (FairGeoNode*)iter.Next()) ) {
67 aVol =
dynamic_cast<FairGeoVolume*
> ( node );
68 if ( node->isSensitive() ) {
69 fSensNodes->AddLast( aVol );
71 fPassNodes->AddLast( aVol );
74 ProcessNodes( volList );
76 par->setInputVersion(fRun->GetRunId(),1);
TObjArray * GetGeoPassiveNodes()
Bool_t CheckIfSensitive(std::string name)
void ConstructASCIIGeometry()
TObjArray * GetGeoSensitiveNodes()