Belle II Software  release-08-01-10
Fei4Creator Class Reference

The creator for the FEI4 geometry. More...

#include <Fei4Creator.h>

Inheritance diagram for Fei4Creator:
Collaboration diagram for Fei4Creator:

Public Member Functions

 Fei4Creator ()
 Constructor.
 
virtual ~Fei4Creator ()
 Destructor.
 
virtual void create (const GearDir &content, G4LogicalVolume &topVolume, geometry::GeometryTypes type)
 Creation of the detector geometry from Gearbox (XML). More...
 
 BELLE2_DEFINE_EXCEPTION (DBNotImplemented, "Cannot create geometry from Database.")
 Exception that will be thrown in createFromDB if member is not yet implemented by creator.
 
virtual void createFromDB (const std::string &name, G4LogicalVolume &topVolume, GeometryTypes type)
 Function to create the geometry from the Database. More...
 
virtual void createPayloads (const GearDir &content, const IntervalOfValidity &iov)
 Function to create the geometry database. More...
 

Protected Attributes

SensitiveDetectorm_sensitive
 SensitiveDetector FEI4.
 

Detailed Description

The creator for the FEI4 geometry.

Definition at line 27 of file Fei4Creator.h.

Member Function Documentation

◆ create()

void create ( const GearDir content,
G4LogicalVolume &  topVolume,
geometry::GeometryTypes  type 
)
virtual

Creation of the detector geometry from Gearbox (XML).

Parameters
[in]contentXML data directory.
[in]topVolumeGeant world volume.
[in]typeGeometry type.

Implements CreatorBase.

Definition at line 54 of file Fei4Creator.cc.

55  {
56 
58 
59  //lets get the stepsize parameter with a default value of 5 µm
60  double stepSize = content.getLength("stepSize", 5 * CLHEP::um);
61 
62  //no get the array. Notice that the default framework unit is cm, so the
63  //values will be automatically converted
64  vector<double> bar_fei4 = content.getArray("bar_fei4");
65  B2INFO("Contents of bar_fei4: ");
66  BOOST_FOREACH(double value, bar_fei4) {
67  B2INFO("value: " << value);
68  }
69  int fei4Nb = 100;
70  //Lets loop over all the Active nodes
71  BOOST_FOREACH(const GearDir & activeParams, content.getNodes("Active")) {
72 
73  //create fei4 volume
74  G4Box* s_FEI4 = new G4Box("s_FEI4",
75  activeParams.getLength("fei4_dx")*CLHEP::cm,
76  activeParams.getLength("fei4_dy")*CLHEP::cm,
77  activeParams.getLength("fei4_dz")*CLHEP::cm);
78 
79  string matFEI4 = activeParams.getString("MaterialFEI4");
80  G4LogicalVolume* l_FEI4 = new G4LogicalVolume(s_FEI4, geometry::Materials::get(matFEI4), "l_FEI4", 0, m_sensitive);
81 
82  //Lets limit the Geant4 stepsize inside the volume
83  l_FEI4->SetUserLimits(new G4UserLimits(stepSize));
84 
85  //position fei4 volume
86  G4ThreeVector FEI4pos = G4ThreeVector(
87  activeParams.getLength("x_fei4") * CLHEP::cm,
88  activeParams.getLength("y_fei4") * CLHEP::cm,
89  activeParams.getLength("z_fei4") * CLHEP::cm
90  );
91 
92  G4RotationMatrix* rot_fei4 = new G4RotationMatrix();
93  rot_fei4->rotateX(activeParams.getAngle("AngleX"));
94  rot_fei4->rotateY(activeParams.getAngle("AngleY"));
95  rot_fei4->rotateZ(activeParams.getAngle("AngleZ"));
96  //geometry::setColor(*l_FEI4, "#006699");
97 
98  new G4PVPlacement(rot_fei4, FEI4pos, l_FEI4, "p_FEI4", &topVolume, false, fei4Nb);
99 
100  fei4Nb++;
101  }
102 
103  }
static G4Material * get(const std::string &name)
Find given material.
Definition: Materials.h:63
SensitiveDetector * m_sensitive
SensitiveDetector FEI4.
Definition: Fei4Creator.h:46
VXD::SensitiveDetector< PXDSimHit, PXDTrueHit > SensitiveDetector
The PXD Sensitive Detector class.

◆ createFromDB()

void createFromDB ( const std::string &  name,
G4LogicalVolume &  topVolume,
GeometryTypes  type 
)
virtualinherited

Function to create the geometry from the Database.

Parameters
namename of the component in the database, could be used to disambiguate multiple components created with the same creator
topVolumeTop volume in which the geometry has to be placed
typeType of geometry to be build

Reimplemented in GeoVXDServiceCreator, GeoHeavyMetalShieldCreator, GeoTOPCreator, GeoSVDCreator, GeoSTRCreator, GeoServiceMaterialCreator, GeoCOILCreator, GeoPXDCreator, GeoKLMCreator, GeoEKLMCreator, GeoBKLMCreator, GeoFarBeamLineCreator, GeoCryostatCreator, GeoBeamPipeCreator, MyDBCreator, GeoECLCreator, GeoCDCCreatorReducedCDC, GeoCDCCreator, BeamabortCreator, GeoARICHCreator, and GeoMagneticField.

Definition at line 17 of file CreatorBase.cc.

◆ createPayloads()

void createPayloads ( const GearDir content,
const IntervalOfValidity iov 
)
virtualinherited

Function to create the geometry database.

This function should be implemented to convert Gearbox parameters to one ore more database payloads

Parameters
contentGearDir pointing to the parameters which should be used for construction
iovinterval of validity to use when generating payloads

Reimplemented in GeoVXDServiceCreator, GeoHeavyMetalShieldCreator, GeoTOPCreator, GeoSVDCreator, GeoSTRCreator, GeoServiceMaterialCreator, GeoCOILCreator, GeoPXDCreator, GeoKLMCreator, GeoEKLMCreator, GeoBKLMCreator, GeoFarBeamLineCreator, GeoCryostatCreator, GeoBeamPipeCreator, MyDBCreator, GeoMagneticField, GeoECLCreator, GeoCDCCreatorReducedCDC, GeoCDCCreator, BeamabortCreator, and GeoARICHCreator.

Definition at line 24 of file CreatorBase.cc.


The documentation for this class was generated from the following files: