EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
|
#include <EicRoot/blob/master/base/FairModule.h>
Public Member Functions | |
FairModule () | |
FairModule (const char *Name, const char *title, Bool_t Active=kFALSE) | |
virtual | ~FairModule () |
virtual void | Print (Option_t *option="") const |
virtual void | SetGeometryFileName (TString fname, TString geoVer="0") |
virtual TString | GetGeometryFileName () |
virtual TString | GetGeometryFileVer () |
virtual void | ConstructGeometry () |
virtual void | ConstructOpGeometry () |
virtual void | ConstructRootGeometry () |
virtual void | ConstructASCIIGeometry () |
virtual Bool_t | CheckIfSensitive (std::string name) |
virtual void | ExpandNode (TGeoNode *Node) |
virtual Int_t | getVolId (const TString &vname) 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 () |
TList * | GetListOfGeoPar () |
FairVolume * | getFairVolume (FairGeoNode *fNode) |
void | AddSensitiveVolume (TGeoVolume *v) |
void | ImportRootMaterials () |
Public Attributes | |
TString | fMotherVolumeName |
Static Public Attributes | |
static FairVolumeList * | vList =0 |
static Int_t | fNbOfVolumes =0 |
static TRefArray * | svList =0 |
static TArrayI * | volNumber =0 |
Protected Attributes | |
TString | fgeoVer |
TString | fgeoName |
Int_t | fModId |
Bool_t | fActive |
Int_t | fNbOfSensitiveVol |
Int_t | fVerboseLevel |
TList * | flGeoPar |
Bool_t | kGeoSaved |
list of Detector Geometry parameters | |
FairLogger * | fLogger |
flag for initialisation | |
Bool_t | fRootMaterialImportFlag |
Private Member Functions | |
FairModule (const FairModule &) | |
FairModule & | operator= (const FairModule &) |
void | SetDefaultMatrixName (TGeoMatrix *matrix) |
void | AssignMediumAtImport (TGeoVolume *v) |
Private Attributes | |
std::set< TGeoVolume * > | fGeoVolumeLut |
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 32 of file FairModule.h.
View newest version in sPHENIX GitHub at line 32 of file FairModule.h
FairModule::FairModule | ( | ) |
default ctor
Definition at line 87 of file FairModule.cxx.
View newest version in sPHENIX GitHub at line 87 of file FairModule.cxx
FairModule::FairModule | ( | const char * | Name, |
const char * | title, | ||
Bool_t | Active = kFALSE |
||
) |
Standard ctor
Definition at line 66 of file FairModule.cxx.
View newest version in sPHENIX GitHub at line 66 of file FairModule.cxx
|
virtual |
default dtor
Definition at line 61 of file FairModule.cxx.
View newest version in sPHENIX GitHub at line 61 of file FairModule.cxx
|
private |
void FairModule::AddSensitiveVolume | ( | TGeoVolume * | v | ) |
Definition at line 192 of file FairModule.cxx.
View newest version in sPHENIX GitHub at line 192 of file FairModule.cxx
References FairVolumeList::addVolume(), FairLogger::Debug2(), FairVolumeList::findObject(), fLogger, fModId, fNbOfSensitiveVol, fNbOfVolumes, MESSAGE_ORIGIN, FairVolume::setModId(), FairVolume::SetModule(), svList, vList, and Acts::Test::volume.
Referenced by ExpandNode(), and CbmRich::ExpandNodeForGdml().
|
private |
Assign medium to the the volume v, this has to be done in all cases: case 1: For CAD converted volumes they have no mediums (only names) case 2: TGeoVolumes, we need to be sure that the material is defined in this session
The Material is not defined in the TGeoManager, we try to create one if we have enough information about it
Material is already available in the TGeoManager and we can set it
Definition at line 433 of file FairModule.cxx.
View newest version in sPHENIX GitHub at line 433 of file FairModule.cxx
References FairGeoMedium::calcRadiationLength(), FairGeoBuilder::createMedium(), FairGeoMedium::epsil, FairLogger::Fatal(), FairGeoMedium::fld, FairGeoMedium::fldFlag, fLogger, fRootMaterialImportFlag, FairGeoLoader::getGeoBuilder(), FairGeoLoader::getGeoInterface(), FairGeoInterface::getMedia(), FairGeoMedia::getMedium(), FairGeoLoader::Instance(), FairGeoMedium::madfld, FairGeoMedium::maxde, FairGeoMedium::maxstep, MESSAGE_ORIGIN, FairGeoMedium::minstep, FairGeoMedium::sensFlag, FairGeoMedium::setComponent(), FairGeoMedium::setDensity(), FairGeoMedium::setNComponents(), and z.
Referenced by ConstructRootGeometry(), and ExpandNode().
|
virtual |
Set the sensitivity flag fro volumes, called from ConstructASCIIRootGeometry(), and has to be implimented for detectors which use ConstructASCIIRootGeometry() to build the geometry
Reimplemented in CbmRich, EicDetector, PndMagnet, and PndPipe.
Definition at line 358 of file FairModule.cxx.
View newest version in sPHENIX GitHub at line 358 of file FairModule.cxx
References fLogger, MESSAGE_ORIGIN, and FairLogger::Warning().
Referenced by ExpandNode().
|
virtual |
construct geometry from standard ASSCII files (Hades Format)
Reimplemented in PndMagnet.
Definition at line 352 of file FairModule.cxx.
View newest version in sPHENIX GitHub at line 352 of file FairModule.cxx
References fLogger, MESSAGE_ORIGIN, and FairLogger::Warning().
Referenced by PndPipe::ConstructGeometry().
|
virtual |
method called from the MC application to construct the geometry, has to be implimented by user
Reimplemented in CbmRich, EicDetector, EicCadFile, CbmModule, EicFieldGradDetector, EicFieldMapDetector, PndPipe, PndMagnet, PndCave, and PndTarget.
Definition at line 49 of file FairModule.cxx.
View newest version in sPHENIX GitHub at line 49 of file FairModule.cxx
References fLogger, MESSAGE_ORIGIN, and FairLogger::Warning().
Referenced by FairMCApplication::ConstructGeometry().
|
virtual |
method called from the MC application to set optical geometry properties
Reimplemented in CbmRich.
Definition at line 55 of file FairModule.cxx.
View newest version in sPHENIX GitHub at line 55 of file FairModule.cxx
References FairLogger::Debug2(), fLogger, and MESSAGE_ORIGIN.
Referenced by FairMCApplication::ConstructOpGeometry().
|
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
Every thing 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 226 of file FairModule.cxx.
View newest version in sPHENIX GitHub at line 226 of file FairModule.cxx
References AssignMediumAtImport(), ExpandNode(), FairLogger::Fatal(), fLogger, fMotherVolumeName, GetGeometryFileName(), M, MESSAGE_ORIGIN, n, SetDefaultMatrixName(), v1, and Acts::Test::volume.
Referenced by PndMagnet::ConstructGeometry(), PndPipe::ConstructGeometry(), EicDetector::ConstructGeometry(), and CbmRich::ConstructGeometry().
|
virtual |
called from ConstructRootGeometry()
Definition at line 365 of file FairModule.cxx.
View newest version in sPHENIX GitHub at line 365 of file FairModule.cxx
References AddSensitiveVolume(), AssignMediumAtImport(), CheckIfSensitive(), FairLogger::Debug2(), fGeoVolumeLut, fLogger, M, MESSAGE_ORIGIN, SetDefaultMatrixName(), v, and v1.
Referenced by ConstructRootGeometry().
FairVolume * FairModule::getFairVolume | ( | FairGeoNode * | fNode | ) |
Definition at line 211 of file FairModule.cxx.
View newest version in sPHENIX GitHub at line 211 of file FairModule.cxx
References FairVolumeList::At(), fv(), FairVolumeList::getEntries(), FairVolume::getGeoNode(), and vList.
|
inlinevirtual |
Get the Geometry file name
Definition at line 46 of file FairModule.h.
View newest version in sPHENIX GitHub at line 46 of file FairModule.h
References fgeoName.
Referenced by PndMagnet::ConstructASCIIGeometry(), CbmRich::ConstructAsciiGeometry(), CbmRich::ConstructGdmlGeometry(), PndTarget::ConstructGeometry(), PndMagnet::ConstructGeometry(), PndPipe::ConstructGeometry(), EicCadFile::ConstructGeometry(), EicDetector::ConstructGeometry(), CbmRich::ConstructGeometry(), and ConstructRootGeometry().
|
inlinevirtual |
Get the geometry file version if used
Definition at line 48 of file FairModule.h.
View newest version in sPHENIX GitHub at line 48 of file FairModule.h
References fgeoVer.
|
inline |
return the geo parameter of this detector/module
Definition at line 81 of file FairModule.h.
View newest version in sPHENIX GitHub at line 81 of file FairModule.h
References flGeoPar.
|
inline |
return the detector/Module id (which was set in the sim macro for the detector)
Definition at line 65 of file FairModule.h.
View newest version in sPHENIX GitHub at line 65 of file FairModule.h
References fModId.
Referenced by FairMCApplication::ConstructGeometry(), and FairDetector::Initialize().
|
inlinevirtual |
return the MC id of a volume named vname
Definition at line 63 of file FairModule.h.
View newest version in sPHENIX GitHub at line 63 of file FairModule.h
|
inline |
Definition at line 94 of file FairModule.h.
View newest version in sPHENIX GitHub at line 94 of file FairModule.h
References fRootMaterialImportFlag.
|
inline |
return the detector status
Definition at line 69 of file FairModule.h.
View newest version in sPHENIX GitHub at line 69 of file FairModule.h
References fActive.
Referenced by EicFieldGradDetector::ConstructGeometry(), EicFieldMapDetector::ConstructGeometry(), and FairMCApplication::FairMCApplication().
|
private |
|
inlinevirtual |
Print method sould be implimented in detector or module
Definition at line 42 of file FairModule.h.
View newest version in sPHENIX GitHub at line 42 of file FairModule.h
void FairModule::ProcessNodes | ( | TList * | aList | ) |
called from ConstuctASCIIGeometry
Definition at line 154 of file FairModule.cxx.
View newest version in sPHENIX GitHub at line 154 of file FairModule.cxx
References FairVolumeList::addVolume(), FairGeoNode::calcLabTransform(), fActive, fModId, fNbOfSensitiveVol, fNbOfVolumes, FairRuntimeDb::getContainer(), FairGeoNode::getCopyNo(), FairBaseParSet::GetGeoNodes(), FairGeoVolume::getMCid(), FairGeoNode::getMotherNode(), FairRun::GetRuntimeDb(), FairGeoNode::getTruncName(), FairRun::Instance(), FairGeoNode::isSensitive(), FairVolume::setCopyNo(), FairVolume::setGeoNode(), FairVolume::setModId(), FairVolume::SetModule(), FairVolume::setMotherCopyNo(), FairVolume::setMotherId(), FairVolume::setRealName(), svList, vList, and Acts::Test::volume.
Referenced by PndMagnet::ConstructASCIIGeometry(), CbmRich::ConstructAsciiGeometry(), PndTarget::ConstructGeometry(), and EicDetector::ConstructGeometry().
|
private |
Re-implimented from ROOT: TGeoMatrix::SetDefaultName()
Definition at line 405 of file FairModule.cxx.
View newest version in sPHENIX GitHub at line 405 of file FairModule.cxx
Referenced by ConstructRootGeometry(), and ExpandNode().
|
virtual |
Set the geometry file name o be used
Reimplemented in EicDetector.
Definition at line 124 of file FairModule.cxx.
View newest version in sPHENIX GitHub at line 124 of file FairModule.cxx
References FairLogger::Fatal(), fgeoName, fgeoVer, fLogger, FairLogger::Info(), MESSAGE_ORIGIN, and FairLogger::Warning().
Referenced by EicRunSim::AddModule(), EicDetector::SetGeometryFileName(), and simulation().
|
inline |
set the detector/module id
Definition at line 71 of file FairModule.h.
View newest version in sPHENIX GitHub at line 71 of file FairModule.h
References fModId.
Referenced by FairRunSim::AddModule().
|
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 75 of file FairModule.h.
View newest version in sPHENIX GitHub at line 75 of file FairModule.h
References fMotherVolumeName.
|
inlinevirtual |
Set the parameter containers
Definition at line 79 of file FairModule.h.
View newest version in sPHENIX GitHub at line 79 of file FairModule.h
Referenced by FairMCApplication::SetParTask().
|
inline |
Set the verbose level in this detector
Definition at line 67 of file FairModule.h.
View newest version in sPHENIX GitHub at line 67 of file FairModule.h
References fVerboseLevel.
|
protected |
Definition at line 111 of file FairModule.h.
View newest version in sPHENIX GitHub at line 111 of file FairModule.h
Referenced by IsActive(), and ProcessNodes().
|
protected |
Definition at line 109 of file FairModule.h.
View newest version in sPHENIX GitHub at line 109 of file FairModule.h
Referenced by GetGeometryFileName(), SetGeometryFileName(), and EicDetector::SetGeometryFileName().
|
protected |
Definition at line 108 of file FairModule.h.
View newest version in sPHENIX GitHub at line 108 of file FairModule.h
Referenced by GetGeometryFileVer(), and SetGeometryFileName().
|
private |
Definition at line 105 of file FairModule.h.
View newest version in sPHENIX GitHub at line 105 of file FairModule.h
Referenced by ExpandNode().
|
protected |
Definition at line 114 of file FairModule.h.
View newest version in sPHENIX GitHub at line 114 of file FairModule.h
Referenced by FairDetector::FairDetector(), GetListOfGeoPar(), FairDetector::SaveGeoParams(), and FairDetector::~FairDetector().
|
protected |
flag for initialisation
Fair Logger
Definition at line 117 of file FairModule.h.
View newest version in sPHENIX GitHub at line 117 of file FairModule.h
Referenced by AddSensitiveVolume(), AssignMediumAtImport(), CheckIfSensitive(), ConstructASCIIGeometry(), ConstructGeometry(), ConstructOpGeometry(), ConstructRootGeometry(), ExpandNode(), and SetGeometryFileName().
|
protected |
Definition at line 110 of file FairModule.h.
View newest version in sPHENIX GitHub at line 110 of file FairModule.h
Referenced by AddSensitiveVolume(), GetModId(), ProcessNodes(), and SetModId().
TString FairModule::fMotherVolumeName |
Definition at line 90 of file FairModule.h.
View newest version in sPHENIX GitHub at line 90 of file FairModule.h
Referenced by ConstructRootGeometry(), and SetMotherVolume().
|
protected |
Definition at line 112 of file FairModule.h.
View newest version in sPHENIX GitHub at line 112 of file FairModule.h
Referenced by AddSensitiveVolume(), and ProcessNodes().
|
static |
total number of volumes in a simulaion session
Definition at line 85 of file FairModule.h.
View newest version in sPHENIX GitHub at line 85 of file FairModule.h
Referenced by AddSensitiveVolume(), and ProcessNodes().
|
protected |
Definition at line 124 of file FairModule.h.
View newest version in sPHENIX GitHub at line 124 of file FairModule.h
Referenced by AssignMediumAtImport(), and ImportRootMaterials().
|
protected |
Definition at line 113 of file FairModule.h.
View newest version in sPHENIX GitHub at line 113 of file FairModule.h
Referenced by CbmRich::CbmRich(), EicDetector::EicDetector(), CbmRich::EndOfEvent(), EicDetector::EndOfEvent(), CbmRich::Print(), EicDetector::Print(), and SetVerboseLevel().
|
protected |
list of Detector Geometry parameters
Definition at line 115 of file FairModule.h.
View newest version in sPHENIX GitHub at line 115 of file FairModule.h
Referenced by FairDetector::FairDetector(), and FairDetector::SaveGeoParams().
|
static |
list of all sensitive volumes in a simulaion session
Definition at line 87 of file FairModule.h.
View newest version in sPHENIX GitHub at line 87 of file FairModule.h
Referenced by AddSensitiveVolume(), FairMCApplication::ConstructGeometry(), FairModule(), FairDetector::Initialize(), and ProcessNodes().
|
static |
list of volumes in a simulation session
Definition at line 83 of file FairModule.h.
View newest version in sPHENIX GitHub at line 83 of file FairModule.h
Referenced by AddSensitiveVolume(), FairModule(), getFairVolume(), and ProcessNodes().
|
static |
Definition at line 89 of file FairModule.h.
View newest version in sPHENIX GitHub at line 89 of file FairModule.h