EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FairModule.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file FairModule.h
1 #ifndef FAIRMODULE_H
2 #define FAIRMODULE_H
3 
4 #include "FairLogger.h"
5 
6 #include "TString.h"
7 #include "TNamed.h"
8 #include "TRefArray.h"
9 #include "TGeoMatrix.h"
10 #include <map>
11 #include <set>
12 
13 class FairVolumeList;
14 class FairVolume;
15 class FairGeoNode;
16 class TGeoNode;
17 class TGeoMatrix;
18 class TGeoVolume;
19 class TList;
20 class TArrayI;
32 class FairModule: public TNamed
33 {
34  public:
36  FairModule();
38  FairModule(const char* Name, const char* title, Bool_t Active=kFALSE);
40  virtual ~FairModule();
42  virtual void Print(Option_t* option="") const {;}
44  virtual void SetGeometryFileName(TString fname, TString geoVer="0");
46  virtual TString GetGeometryFileName() {return fgeoName ;}
48  virtual TString GetGeometryFileVer() {return fgeoVer ;}
50  virtual void ConstructGeometry();
52  virtual void ConstructOpGeometry();
54  virtual void ConstructRootGeometry();
56  virtual void ConstructASCIIGeometry();
59  virtual Bool_t CheckIfSensitive(std::string name);
61  virtual void ExpandNode(TGeoNode* Node);
63  virtual Int_t getVolId( const TString& vname ) const {return 0;}
65  Int_t GetModId() {return fModId;}
67  void SetVerboseLevel(Int_t level) {fVerboseLevel=level;}
69  Bool_t IsActive() {return fActive;}
71  void SetModId(Int_t id) {fModId=id;}
75  void SetMotherVolume(TString volName) {fMotherVolumeName=volName;}
77  void ProcessNodes ( TList* aList );
79  virtual void SetParContainers() {;}
81  TList* GetListOfGeoPar() { return flGeoPar;}
84 
85  static Int_t fNbOfVolumes;
86 
87  static TRefArray* svList;
88 
89  static TArrayI* volNumber;
92  void AddSensitiveVolume(TGeoVolume* v);
93 
95 
96  private:
97  FairModule(const FairModule&);
100  void SetDefaultMatrixName(TGeoMatrix* matrix);
101  void AssignMediumAtImport(TGeoVolume* v); // O.Merle, 29.02.2012 - see impl.
102 
103  // Keep track of volumes already served in ExpandNode(); can greatly
104  // reduce start-up time for certain geometry types;
105  std::set<TGeoVolume*> fGeoVolumeLut;
106 
107  protected:
108  TString fgeoVer;
109  TString fgeoName;
110  Int_t fModId;
111  Bool_t fActive;
114  TList* flGeoPar;
115  Bool_t kGeoSaved;
116 
118 
119  // If true and 1) geometry is TGeo and 2) material for some volume is missing
120  // in media.geo, then re-create this material by hand and append to the geometry;
121  // yet need to check, that this will work upon simparams import in reconstruction
122  // phase; for now (Jul'2015) I need this for STAR geometry input in the
123  // simulation pass only;
125 
126  ClassDef( FairModule,3)
127 };
128 
129 #endif //FAIRMODULE_H