FairRoot
|
#include <FairModule.h>
Public Member Functions | |
FairModule () | |
FairModule (const char *Name, const char *title, Bool_t Active=kFALSE) | |
virtual | ~FairModule () |
virtual void | Print (Option_t *) const |
virtual void | SetGeometryFileName (TString fname, TString geoVer="0") |
virtual TString | GetGeometryFileName () |
virtual TString | GetGeometryFileVer () |
virtual void | ConstructGeometry () |
virtual void | ConstructOpGeometry () |
virtual void | ConstructRootGeometry (TGeoMatrix *shiftM=nullptr) |
virtual void | ConstructASCIIGeometry () |
virtual void | ModifyGeometry () __attribute__((deprecated("Use FairAlignmentHandler instead |
virtual void see Tutorial4 for examples | LOG (warn)<< "This function is deprecated. Use FairAlignmentHandler instead |
virtual void | RegisterAlignmentMatrices () |
virtual void | ConstructGDMLGeometry (__attribute__((unused)) TGeoMatrix *posrot) |
virtual void | SetSpecialPhysicsCuts () |
virtual FairModule * | CloneModule () const |
virtual void | BeginWorkerRun () const |
virtual void | FinishWorkerRun () const |
template<class T , class U > | |
void | ConstructASCIIGeometry (T *dataType1, TString containerName="", U *datatype2=nullptr) |
virtual Bool_t | IsSensitive (const std::string &name) |
virtual Bool_t | CheckIfSensitive (__attribute__((unused)) std::string name) __attribute__((deprecated("The method CheckIfSensitive is deprecated. Implement IsSensitive in the detector classes."))) |
virtual void | ExpandNode (TGeoNode *Node) |
virtual void | ExpandNodeForGDML (__attribute__((unused)) TGeoNode *curNode) |
virtual Int_t | getVolId (const TString &) const |
Int_t | GetModId () |
void | SetVerboseLevel (Int_t level) |
Bool_t | IsActive () |
void | SetModId (Int_t id) |
void | SetMotherVolume (TString volName) |
void | ProcessNodes (TList *aList) |
virtual void | SetParContainers () |
virtual void | InitParContainers () |
TList * | GetListOfGeoPar () |
FairVolume * | getFairVolume (FairGeoNode *fNode) |
void | AddSensitiveVolume (TGeoVolume *v) |
Public Attributes | |
virtual void see Tutorial4 for examples see Tutorial4 for | examples |
TString | fMotherVolumeName |
Static Public Attributes | |
static thread_local FairVolumeList * | vList = 0 |
static thread_local Int_t | fNbOfVolumes = 0 |
static thread_local TRefArray * | svList = 0 |
static thread_local TArrayI * | volNumber = 0 |
Protected Member Functions | |
FairModule (const FairModule &) | |
FairModule & | operator= (const FairModule &) |
ClassDef (FairModule, 4) | |
cahed pointer to MC (available only after initialization) More... | |
Protected Attributes | |
TString | fgeoVer |
TString | fgeoName |
Int_t | fModId |
Bool_t | fActive |
Int_t | fNbOfSensitiveVol |
Int_t | fVerboseLevel |
TList * | flGeoPar |
Bool_t | fGeoSaved |
list of Detector Geometry parameters More... | |
TVirtualMC * | fMC |
flag for initialisation More... | |
Base class for constructing all detecors and passive volumes
Changelog: 29.02.2012 [O.Merle] Fixed missing material assignment for top volume. ... and please - add some documentation to your code.
Definition at line 46 of file FairModule.h.
FairModule::FairModule | ( | ) |
default ctor
Definition at line 135 of file FairModule.cxx.
FairModule::FairModule | ( | const char * | Name, |
const char * | title, | ||
Bool_t | Active = kFALSE |
||
) |
Standard ctor
Definition at line 74 of file FairModule.cxx.
|
virtual |
default dtor
Definition at line 72 of file FairModule.cxx.
|
protected |
Definition at line 95 of file FairModule.cxx.
void FairModule::AddSensitiveVolume | ( | TGeoVolume * | v | ) |
Definition at line 294 of file FairModule.cxx.
|
inlinevirtual |
Init worker run (used in MT mode only)
Definition at line 87 of file FairModule.h.
|
inlinevirtual |
The function below is depracated, please change to the new method above
Definition at line 99 of file FairModule.h.
|
protected |
cahed pointer to MC (available only after initialization)
|
virtual |
Clone this object (used in MT mode only)
Reimplemented in FairTutorialDet4, FairTutorialDet1, FairTutorialDet2, FairRutherford, Pixel, NewDetector, NewDetector, NewDetector, NewDetector, FairFastSimExample, FairFastSimExample2, MyMagnet, MyMagnet, MyCave, MyCave, MyPipe, MyPipe, FairMagnet, FairPipe, FairCave, and FairTarget.
Definition at line 711 of file FairModule.cxx.
|
virtual |
construct geometry from standard ASSCII files (Hades Format)
Reimplemented in FairMagnet.
Definition at line 552 of file FairModule.cxx.
void FairModule::ConstructASCIIGeometry | ( | T * | dataType1, |
TString | containerName = "" , |
||
U * | datatype2 = nullptr |
||
) |
template function to construct geometry. to be used in derived classes.
Definition at line 170 of file FairModule.h.
|
virtual |
construct geometry from GDML files
Definition at line 508 of file FairModule.cxx.
|
virtual |
method called from the MC application to construct the geometry, has to be implimented by user
Reimplemented in FairTutorialDet4, FairTutorialDet1, FairTutorialDet2, FairRutherford, FairTestDetector, Pixel, NewDetector, NewDetector, FairTutPropDet, NewDetector, NewDetector, FairFastSimExample, FairFastSimExample2, FairFastSimDetector, MyMagnet, MyMagnet, MyCave, MyCave, MyPipe, MyPipe, FairMagnet, FairPipe, FairCave, and FairTarget.
Definition at line 60 of file FairModule.cxx.
|
virtual |
method called from the MC application to set optical geometry properties
Definition at line 66 of file FairModule.cxx.
|
virtual |
construct geometry from root files (TGeo)
Construct the detector geometry from ROOT files, possible inputs are:
loop inside the delivered root file and try to fine a TGeoManager object the first TGeoManager found will be read
in case a TGeoManager was found get the top most volume and the node
The file does not contain any TGeoManager, so we assume to have a file with a TGeoVolume try to look for a TGeoVolume inside the file
Everything is OK, we have a TGeoVolume and now we add it to the simulation TGeoManager
Force rebuilding of voxels
To avoid having different names of the default matrices because we could have get the volume from another TGeoManager, we reset the default matrix name
Now we can remove the matrix so that the new geomanager will rebuild it properly
Now we can add the node to the existing cave
correction from O. Merle: in case of a TGeoVolume (v1) set the material properly
now go through the herachy and set the materials properly, this is important becase the CAD converter produce TGeoVolumes with materials that have only names and no properties
Definition at line 327 of file FairModule.cxx.
|
virtual |
called from ConstructRootGeometry()
Definition at line 569 of file FairModule.cxx.
|
virtual |
called from ConstructGDMLGeometry()
Definition at line 516 of file FairModule.cxx.
|
inlinevirtual |
Finish worker run (used in MT mode only)
Definition at line 89 of file FairModule.h.
FairVolume * FairModule::getFairVolume | ( | FairGeoNode * | fNode | ) |
Definition at line 312 of file FairModule.cxx.
|
inlinevirtual |
Get the Geometry file name
Definition at line 60 of file FairModule.h.
|
inlinevirtual |
Get the geometry file version if used
Definition at line 62 of file FairModule.h.
|
inline |
return the geo parameter of this detector/module
Definition at line 130 of file FairModule.h.
|
inline |
return the detector/Module id (which was set in the sim macro for the detector)
Definition at line 111 of file FairModule.h.
|
inlinevirtual |
return the MC id of a volume named vname
Definition at line 109 of file FairModule.h.
|
inlinevirtual |
Initialize everything which has to be done before the construction and modification of the geometry. Mostly this is needed to read data from the parameter containers.
Reimplemented in FairTutorialDet4.
Definition at line 128 of file FairModule.h.
|
inline |
return the detector status
Definition at line 115 of file FairModule.h.
|
virtual |
Set the sensitivity flag for volumes, called from ConstructASCIIRootGeometry(), and has to be implimented for detectors which use ConstructASCIIRootGeometry() to build the geometry
Reimplemented in FairTutorialDet4, FairTutorialDet1, Pixel, NewDetector, NewDetector, NewDetector, NewDetector, FairFastSimExample, FairFastSimExample2, and FairMagnet.
Definition at line 559 of file FairModule.cxx.
|
virtual |
Modify the geometry for the simulation run using methods of the Root geometry package
|
protected |
Definition at line 149 of file FairModule.cxx.
|
inlinevirtual |
Print method should be implemented in detector or module
Definition at line 56 of file FairModule.h.
void FairModule::ProcessNodes | ( | TList * | aList | ) |
called from ConstuctASCIIGeometry
Definition at line 244 of file FairModule.cxx.
|
inlinevirtual |
Reimplemented in FairTutorialDet4.
Definition at line 77 of file FairModule.h.
|
virtual |
Set the geometry file name o be used
Definition at line 199 of file FairModule.cxx.
|
inline |
set the detector/module id
Definition at line 117 of file FairModule.h.
|
inline |
Set the name of the mother volume to which a new geometry is added. This function is needed for geometries which are defined as ROOT geometry manager.
Definition at line 121 of file FairModule.h.
|
inlinevirtual |
Set the parameter containers
Reimplemented in FairTutorialDet4.
Definition at line 125 of file FairModule.h.
|
inlinevirtual |
custom settings of processes and cuts for media to be forwarded to the detector simulation
Reimplemented in FairTutorialDet4, FairTestDetector, FairTutorialDet1, FairTutorialDet2, FairRutherford, Pixel, FairTutPropDet, NewDetector, NewDetector, NewDetector, and NewDetector.
Definition at line 83 of file FairModule.h.
|
inline |
Set the verbose level in this detector
Definition at line 113 of file FairModule.h.
Definition at line 75 of file FairModule.h.
|
protected |
Definition at line 159 of file FairModule.h.
|
protected |
Definition at line 157 of file FairModule.h.
|
protected |
list of Detector Geometry parameters
Definition at line 163 of file FairModule.h.
|
protected |
Definition at line 156 of file FairModule.h.
|
protected |
Definition at line 162 of file FairModule.h.
|
protected |
flag for initialisation
Definition at line 164 of file FairModule.h.
|
protected |
Definition at line 158 of file FairModule.h.
TString FairModule::fMotherVolumeName |
Definition at line 140 of file FairModule.h.
|
protected |
Definition at line 160 of file FairModule.h.
|
static |
total number of volumes in a simulaion session
Definition at line 135 of file FairModule.h.
|
protected |
Definition at line 161 of file FairModule.h.
|
static |
list of all sensitive volumes in a simulaion session
Definition at line 137 of file FairModule.h.
|
static |
list of volumes in a simulation session
Definition at line 133 of file FairModule.h.
|
static |
Definition at line 139 of file FairModule.h.