Belle II Software development
Fei4Creator Class Reference

The creator for the FEI4 geometry. More...

#include <Fei4Creator.h>

Inheritance diagram for Fei4Creator:
CreatorBase

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).
 
 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.
 
virtual void createPayloads (const GearDir &content, const IntervalOfValidity &iov)
 Function to create the geometry database.
 

Protected Attributes

SensitiveDetectorm_sensitive
 SensitiveDetector FEI4.
 

Detailed Description

The creator for the FEI4 geometry.

Definition at line 27 of file Fei4Creator.h.

Constructor & Destructor Documentation

◆ Fei4Creator()

Constructor.

Definition at line 44 of file Fei4Creator.cc.

44 : m_sensitive(0)
45 {
46 //m_sensitive = new SensitiveDetector();
47 }
SensitiveDetector * m_sensitive
SensitiveDetector FEI4.
Definition: Fei4Creator.h:46

◆ ~Fei4Creator()

~Fei4Creator ( )
virtual

Destructor.

Definition at line 49 of file Fei4Creator.cc.

50 {
51 if (m_sensitive) delete m_sensitive;
52 }

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

Definition at line 17 of file CreatorBase.cc.

18 {
19 //Do nothing but raise exception that we don't do anything
20 throw DBNotImplemented();
21 }

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

Definition at line 24 of file CreatorBase.cc.

24{}

Member Data Documentation

◆ m_sensitive

SensitiveDetector* m_sensitive
protected

SensitiveDetector FEI4.

Definition at line 46 of file Fei4Creator.h.


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