Belle II Software  release-05-01-25
Fei4Creator Class Reference

The creator for the FEI4 geometry. More...

#include <Fei4Creator.h>

Inheritance diagram for Fei4Creator:
Collaboration diagram for Fei4Creator:

Public Member Functions

virtual void create (const GearDir &content, G4LogicalVolume &topVolume, geometry::GeometryTypes type)
 Function to actually create the geometry, has to be overridden by derived classes. 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 29 of file Fei4Creator.h.

Member Function Documentation

◆ create()

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

Function to actually create the geometry, has to be overridden by derived classes.

Parameters
contentGearDir pointing to the parameters which should be used for construction
topVolumeTop volume in which the geometry has to be placed
typeType of geometry to be build

Implements CreatorBase.

Definition at line 56 of file Fei4Creator.cc.

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

◆ 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 GeoEKLMCreator, GeoFarBeamLineCreator, GeoCryostatCreator, MyDBCreator, GeoARICHCreator, GeoBeamPipeCreator, GeoServiceMaterialCreator, GeoBKLMCreator, GeoPXDCreator, GeoSVDCreator, GeoTOPCreator, GeoSTRCreator, GeoHeavyMetalShieldCreator, GeoCDCCreator, GeoCOILCreator, GeoVXDServiceCreator, GeoKLMCreator, GeoECLCreator, and GeoMagneticField.

Definition at line 27 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 GeoEKLMCreator, GeoFarBeamLineCreator, GeoCryostatCreator, MyDBCreator, GeoARICHCreator, GeoTOPCreator, GeoCDCCreator, GeoBeamPipeCreator, GeoServiceMaterialCreator, GeoMagneticField, GeoBKLMCreator, GeoKLMCreator, GeoECLCreator, GeoPXDCreator, GeoSVDCreator, GeoSTRCreator, GeoCOILCreator, GeoHeavyMetalShieldCreator, and GeoVXDServiceCreator.

Definition at line 34 of file CreatorBase.cc.


The documentation for this class was generated from the following files:
Belle2::geometry::Materials::get
static G4Material * get(const std::string &name)
Find given material.
Definition: Materials.h:65
Belle2::srsensor::Fei4Creator::m_sensitive
SensitiveDetector * m_sensitive
SensitiveDetector FEI4.
Definition: Fei4Creator.h:36