Base classe to imported geometries. More...
#include <SToGS_RoomsDF.hh>
Public Member Functions | |
void | AssemblyRename (G4AssemblyVolume *assembly, const G4String &volume_to_find) const |
rename physical volume produced by the assembly More... | |
void | Clean () |
clear factory i.e. in memory collections of physicals and assemblies More... | |
G4int | DoMap (G4AssemblyVolume *assembly, G4VPhysicalVolume *volume_used_to_built_assembly, G4int copy_number_offset=0) const |
remap all the physical volumes produced by the Imprint method. More... | |
virtual G4VPhysicalVolume * | Get (G4String basename) |
search for a detector in DetectorFactory More... | |
G4AssemblyVolume * | GetAssembly (G4String basename) |
virtual void | GetAttributes (G4String basename, G4bool do_amap=true, G4bool do_dmap=false) |
Read the amap file and apply atributes to the detector. if not found, it creates a deefault one from the sensitive detector founds. More... | |
G4String | GetDetName (const G4String &path) const |
Get detector name from full path to the gdml file. More... | |
G4String | GetDetName (G4String name, G4String version) const |
G4String | GetFactoryName () const |
G4String | GetFileName (G4String detname, G4String extention) |
compute name of the file to store/read information More... | |
ImportsDF (G4String path="Imports/") | |
virtual G4VPhysicalVolume * | MakeAnArrayFromFactory (G4String input_file) |
built an array from the factory using the given input file More... | |
virtual void | MakeStore () |
Nothing to be built internally. More... | |
virtual G4int | ReMap (G4VPhysicalVolume *adetector, G4int offset) |
for the given volume, it changes all copy number of active volumes by starting with offset More... | |
G4int | Set (G4String basename, G4VPhysicalVolume *world, G4int copy_number_offset, const G4ThreeVector *T=0x0, const G4RotationMatrix *R=0x0, G4int main_copy_number=0) |
to be used once a detector is fully contructed to simply place it in the world More... | |
G4int | Set (G4String basename, G4VPhysicalVolume *world, G4int copy_number_offset, const G4Transform3D *Tr, G4int main_copy_number=0) |
virtual void | Store (G4VPhysicalVolume *) |
Store in the sub-factory the given physical volume. More... | |
virtual | ~ImportsDF () |
Static Public Member Functions | |
static G4int | AddGCopyNb () |
global copy number, used to set copy number once building detector. Not protected for MT since in principle init of geom done without MT More... | |
static void | ChangeCopyNb (G4VPhysicalVolume *top, G4String which_det, G4int which_nb) |
change copy number of the physical volume contained in the top volume More... | |
static void | ChangeSD (G4String opt, G4VPhysicalVolume *top=0x0) |
Change some SD detector into an other type of SD. Opt is used eventually to filter on the name of the volume and its material name. More... | |
static void | CollectVolumes (G4VPhysicalVolume *theDetector, std::vector< G4LogicalVolume * > &logical_stored, std::vector< G4VPhysicalVolume * > &physical_stored, std::vector< G4VPhysicalVolume * > &physical_active) |
From the given physical volume, it collects into collection all logical (sensitive) and physical volumes (including itself in first slot) More... | |
static DetectorFactory * | GetFactory (G4String fullname) |
get the specific factory for a full name to a file More... | |
static G4int | GetGCopyNb () |
static G4VSensitiveDetector * | GetSD (G4String opt, const char sd_type= 'S') |
Get a particular SD. S means a SD while s is for Scorers. More... | |
static G4VPhysicalVolume * | MakeVCR (G4String name, G4double HalfX=5.0 *CLHEP::m, G4double HalfY=5.0 *CLHEP::m, G4double HalfZ=5.0 *CLHEP::m, G4int copy=-1) |
make a cubic world More... | |
static void | SetActive (G4LogicalVolume *pv, const G4String &option="*|*|*|0.5;0.5;0.5;0.5") |
Set to the given logical volume some attributs (sensitive, color) depending of the given option. used @ the import level. More... | |
static G4int | SetGCopyNb (G4int val) |
static DetectorFactory * | theMainFactory () |
to get the main factory More... | |
Protected Member Functions | |
G4VPhysicalVolume * | Import (G4String gdmlfile, G4String detname, const G4String &opt_amap, const G4String &opt_dmap) |
import a gdml file (extention to ascii ?) into factory. See Active for opt_amap option More... | |
virtual G4VPhysicalVolume * | Make (G4String, G4String) |
Should be implemented in any sub factory. It built (C++) a detector and return it. More... | |
void | MakeInStore (G4String name, G4String version_string) |
build in store a particular detector from its names and version. i.e. call th Make method of the sub factory and then Store More... | |
void | StoreMap (std::ofstream &amap, std::ofstream &dmap, std::vector< G4LogicalVolume * > &logical_stored, std::vector< G4VPhysicalVolume * > &physical_stored, std::vector< G4VPhysicalVolume * > &physical_active, G4VPhysicalVolume *theDetector) |
recursively called in the tree struture More... | |
void | StreamTouchable (std::ofstream &dmap, G4String) |
extrac from the name of the detector the touchable part More... | |
Protected Attributes | |
std::vector< std::pair < G4String, G4AssemblyVolume * > > | fLoadedAssembly |
in case a gdml file has already by loaded, it allows to get the assembly quickly More... | |
std::vector< std::pair < G4String, G4VPhysicalVolume * > > | fLoadedPhysical |
in case it has been loaded, keep a trace More... | |
G4String | fPath |
Name of the factory, also used for the name of the directory containing the detectors handled by the factory. More... | |
Base classe to imported geometries.
Geometrie imported into SToGS through gdml are stored in a particular folder
Definition at line 54 of file SToGS_RoomsDF.hh.
|
inline |
Definition at line 57 of file SToGS_RoomsDF.hh.
|
inlinevirtual |
Definition at line 59 of file SToGS_RoomsDF.hh.
|
inlinestaticinherited |
global copy number, used to set copy number once building detector. Not protected for MT since in principle init of geom done without MT
Definition at line 122 of file SToGS_DetectorFactory.hh.
|
inherited |
rename physical volume produced by the assembly
Definition at line 428 of file SToGS_DetectorFactory.cc.
|
staticinherited |
change copy number of the physical volume contained in the top volume
|
staticinherited |
Change some SD detector into an other type of SD. Opt is used eventually to filter on the name of the volume and its material name.
if top is 0x0, tries with world
Definition at line 95 of file SToGS_DetectorFactory.cc.
|
inherited |
clear factory i.e. in memory collections of physicals and assemblies
Definition at line 1136 of file SToGS_DetectorFactory.cc.
|
staticinherited |
From the given physical volume, it collects into collection all logical (sensitive) and physical volumes (including itself in first slot)
recursive call.
Definition at line 334 of file SToGS_DetectorFactory.cc.
|
inherited |
remap all the physical volumes produced by the Imprint method.
Definition at line 455 of file SToGS_DetectorFactory.cc.
|
virtualinherited |
search for a detector in DetectorFactory
Get calls GetGeometry + GetAttributes. Separated since geant4.10 requires separation of geometrical part and attributes for Multi-Threading
it has to start with the subfactory name and then the name of the file. It adds autmoatically .gdml Ex:
Scintillators/ParisPW_2 –> DetectorFactory/Scintillators/ParisPW_2.gdml
Reimplemented in SToGS::GenericsDF.
Definition at line 693 of file SToGS_DetectorFactory.cc.
|
inherited |
Definition at line 1099 of file SToGS_DetectorFactory.cc.
|
virtualinherited |
Read the amap file and apply atributes to the detector. if not found, it creates a deefault one from the sensitive detector founds.
Reimplemented in SToGS::GenericsDF.
Definition at line 748 of file SToGS_DetectorFactory.cc.
|
inherited |
Get detector name from full path to the gdml file.
It removes the path and the gdml extention. This name is supposed to be equal to the one of the detector inside the gdml file
Definition at line 403 of file SToGS_DetectorFactory.cc.
|
inherited |
Definition at line 416 of file SToGS_DetectorFactory.cc.
|
staticinherited |
get the specific factory for a full name to a file
Definition at line 80 of file SToGS_DetectorFactory.cc.
|
inlineinherited |
Definition at line 203 of file SToGS_DetectorFactory.hh.
|
inherited |
compute name of the file to store/read information
Definition at line 161 of file SToGS_DetectorFactory.cc.
|
inlinestaticinherited |
Definition at line 133 of file SToGS_DetectorFactory.hh.
|
staticinherited |
Get a particular SD. S means a SD while s is for Scorers.
Definition at line 615 of file SToGS_DetectorFactory.cc.
|
protectedinherited |
import a gdml file (extention to ascii ?) into factory. See Active for opt_amap option
if opt_dmap == "T" touchable is done i.e. the physical name is changed to include the copy numnber PNAME:COPY#
Definition at line 638 of file SToGS_DetectorFactory.cc.
|
inlineprotectedvirtualinherited |
Should be implemented in any sub factory. It built (C++) a detector and return it.
Reimplemented in SToGS::ScintillatorDF, SToGS::PlainDF, SToGS::SemiConductorGeDF, and SToGS::ArraysDF.
Definition at line 178 of file SToGS_DetectorFactory.hh.
|
virtualinherited |
built an array from the factory using the given input file
Definition at line 1184 of file SToGS_DetectorFactory.cc.
|
protectedinherited |
build in store a particular detector from its names and version. i.e. call th Make method of the sub factory and then Store
The most important method is Make which, depending of the name and version calls the correct C++ methods with the right parameters. This methods just check is has not yet been made in store and if not call Make then Store
Definition at line 144 of file SToGS_DetectorFactory.cc.
|
inlinevirtual |
Nothing to be built internally.
Reimplemented from SToGS::DetectorFactory.
Definition at line 63 of file SToGS_RoomsDF.hh.
|
staticinherited |
make a cubic world
Definition at line 1158 of file SToGS_DetectorFactory.cc.
|
virtualinherited |
for the given volume, it changes all copy number of active volumes by starting with offset
It returns the number of actives volumes found in this detector
Definition at line 955 of file SToGS_DetectorFactory.cc.
|
inherited |
to be used once a detector is fully contructed to simply place it in the world
Definition at line 968 of file SToGS_DetectorFactory.cc.
|
inherited |
Definition at line 1089 of file SToGS_DetectorFactory.cc.
|
staticinherited |
Set to the given logical volume some attributs (sensitive, color) depending of the given option. used @ the import level.
option has the following format : Volumename|material|sensitivedetectorname|color
with color red;green;blue;alpha
Definition at line 525 of file SToGS_DetectorFactory.cc.
|
inlinestaticinherited |
Definition at line 127 of file SToGS_DetectorFactory.hh.
|
virtualinherited |
Store in the sub-factory the given physical volume.
Definition at line 373 of file SToGS_DetectorFactory.cc.
|
protectedinherited |
recursively called in the tree struture
Definition at line 180 of file SToGS_DetectorFactory.cc.
|
protectedinherited |
extrac from the name of the detector the touchable part
Definition at line 171 of file SToGS_DetectorFactory.cc.
|
staticinherited |
to get the main factory
Definition at line 69 of file SToGS_DetectorFactory.cc.
|
protectedinherited |
in case a gdml file has already by loaded, it allows to get the assembly quickly
Definition at line 84 of file SToGS_DetectorFactory.hh.
|
protectedinherited |
in case it has been loaded, keep a trace
Definition at line 86 of file SToGS_DetectorFactory.hh.
|
protectedinherited |
Name of the factory, also used for the name of the directory containing the detectors handled by the factory.
Definition at line 81 of file SToGS_DetectorFactory.hh.