Belle II Software development

Modules

 vxd data objects
 
 vxd modules
 

Namespaces

namespace  Belle2::VXD
 Namespace to provide code needed by both Vertex Detectors, PXD and SVD, and also testbeam telescopes.
 
namespace  Belle2::SVD
 Namespace to encapsulate code needed for simulation and reconstrucion of the SVD.
 

Classes

class  HeavyMetalShieldGeometryPar
 The Class for VXD Heavy Metal Shield. More...
 
class  VXDAlignmentPar
 The Class for VXD Alignment payload. More...
 
class  VXDEnvelopePar
 The Class for VXD Envelope parameters. More...
 
class  VXDGeoComponentPar
 The Class for VXD geometry component. More...
 
class  VXDGeoLadderPar
 The Class for VXD Ladder payload. More...
 
class  VXDGeometryPar
 The Class for VXD geometry. More...
 
class  VXDGeoPlacementPar
 The Class for VXD placement payload. More...
 
class  VXDGeoRadiationSensorsPositionPar
 The Class for VXD Radiation Sensor Position parameters. More...
 
class  VXDGeoRadiationSensorsPar
 The Class for VXD Radiation Sensor parameters. More...
 
class  VXDGeoSensorPar
 The Class for VXD Sensor payload. More...
 
class  VXDGeoSensorPlacementPar
 The Class for VXD Sensor Placement payload. More...
 
class  VXDGlobalPar
 The Class for VXD global paramter payload. More...
 
class  VXDHalfShellPar
 The Class for VXD half shell payload. More...
 
class  VXDPolyConePlanePar
 The Class for VXD Polycone Plane. More...
 
class  VXDPolyConePar
 The Class for VXD PolyCone, possibly with coutouts. More...
 
class  VXDRotationSolidPar
 The Class for VXD Envelope parameters. More...
 
class  VXDSensorInfoBasePar
 Namespace to provide code needed by both Vertex Detectors, PXD and SVD. More...
 
class  VXDBoxTypesPar
 The Class for VXD doc box. More...
 
class  VXDSlotsPar
 The Class for Slot types. More...
 
class  VXDBoxPositionsPar
 The Class for VXD doc box envelope. More...
 
class  VXDServiceGeometryPar
 The Class for VXD service geometry. More...
 
class  VXDGeoPlacement
 Class holding all parameters to place a VXD geometry subcomponent. More...
 
class  VXDGeoComponent
 Class holding all parameters for an VXD geometry component. More...
 
class  VXDGeoSensor
 Struct holding all parameters for a completeVXD Sensor. More...
 
class  VXDGeoSensorPlacement
 Struct holding the information where a sensor should be placed inside the ladder. More...
 
class  VXDGeoLadder
 Struct containing all parameters of one ladder. More...
 
class  GeoVXDRadiationSensors
 class to create the diamond radiation sensor geometry if defined More...
 
struct  StepInformation
 Simple struct to keep information about steps in the sensitive detector. More...
 
class  SensorTraversal
 Class to keep track of the traversal of the sensitive volume for one track. More...
 

Functions

 TEST (VxdID, Constructor)
 Check that both constructors yield the same result.
 
 TEST (VxdID, FromString)
 Check the string conversion of the VxdID in both directions.
 
 VXDGeoPlacement (const std::string &name="", double u=0, double v=0, std::string w="bottom", double woffset=0)
 Constructor.
 
void create (const GearDir &content, G4LogicalVolume &topVolume, G4LogicalVolume &envelopeVolume)
 create the Sensor geometry and assign the sensitive detector implementation.
 

Detailed Description

Function Documentation

◆ create()

void create ( const GearDir content,
G4LogicalVolume &  topVolume,
G4LogicalVolume &  envelopeVolume 
)

create the Sensor geometry and assign the sensitive detector implementation.

As the sensors are inside the SVD envelope but outside the PXD envelope we have to give both, the top volume and the envelope volume so that the appropriate volume can be chosen dependind on the parameters

Parameters
contentpointer to the parameters
topVolumetop volume of the simulation
envelopeVolumeenvelope volume of the pxd/svd

Definition at line 23 of file GeoVXDRadiationSensors.cc.

24 {
25 //Set the correct top volume to either global top or detector envelope
26 G4LogicalVolume* top = &topVolume;
27 if (content.getBool("insideEnvelope")) {
28 top = &envelopeVolume;
29 }
30
31 //shape and material are the same for all sensors so create them now
32 const double width = content.getLength("width");
33 const double length = content.getLength("length");
34 const double height = content.getLength("height");
35 G4Box* shape = 0;
36 G4Material* material = geometry::Materials::get(content.getString("material"));
37
38 //Now loop over all positions
39 for (GearDir& position : content.getNodes("position")) {
40 //get the radial and z position
41 const double r = position.getLength("radius");
42 const double z = position.getLength("z");
43 const double theta = position.getAngle("theta");
44 //and loop over all phi positions
45 for (GearDir& sensor : position.getNodes("phi")) {
46 //we need angle and Id
47 const double phi = sensor.getAngle();
48 const int id = sensor.getInt("@id");
49 //then we create a nice name
50 const std::string name = m_subdetector + ".DiamondSensor." + std::to_string(id);
51 //and create the sensor volume
52 if (not shape) shape = new G4Box("radiationSensorDiamond", width / 2 * CLHEP::cm, length / 2 * CLHEP::cm, height / 2 * CLHEP::cm);
53 G4LogicalVolume* volume = new G4LogicalVolume(shape, material, name);
54 //add a sensitive detector implementation
55 BkgSensitiveDetector* sensitive = new BkgSensitiveDetector(m_subdetector.c_str(), id);
56 volume->SetSensitiveDetector(sensitive);
57 //and place it at the correct position
58 G4Transform3D transform = G4RotateZ3D(phi - M_PI / 2) * G4Translate3D(0, r * CLHEP::cm,
59 z * CLHEP::cm) * G4RotateX3D(-M_PI / 2 - theta);
60 new G4PVPlacement(transform, volume, name, top, false, 1);
61 }
62 }
63 }
std::string m_subdetector
one of "PXD" or "SVD"
static G4Material * get(const std::string &name)
Find given material.
Definition: Materials.h:63

◆ TEST() [1/2]

TEST ( VxdID  ,
Constructor   
)

Check that both constructors yield the same result.

Definition at line 21 of file VxdID.cc.

22 {
23 VxdID s("1.1.1");
24 VxdID l(1, 1, 1);
25 EXPECT_EQ(l, s);
26 EXPECT_EQ((string)l, "1.1.1");
27 }

◆ TEST() [2/2]

TEST ( VxdID  ,
FromString   
)

Check the string conversion of the VxdID in both directions.

Definition at line 30 of file VxdID.cc.

31 {
32 //Check that all possible values can be converted back and forth
33 for (int layer = 0; layer <= VxdID::MaxLayer; ++layer) {
34 for (int ladder = 0; ladder <= VxdID::MaxLadder; ++ladder) {
35 for (int sensor = 0; sensor <= VxdID::MaxSensor; ++sensor) {
36 for (int segment = 0; segment <= VxdID::MaxSegment; ++segment) {
37 string sid = (string)VxdID(layer, ladder, sensor, segment);
38 VxdID id(layer, ladder, sensor, segment);
39 EXPECT_EQ(id, VxdID(sid));
40 EXPECT_EQ(id.getLayerNumber(), layer);
41 EXPECT_EQ(id.getLadderNumber(), ladder);
42 EXPECT_EQ(id.getSensorNumber(), sensor);
43 EXPECT_EQ(id.getSegmentNumber(), segment);
44 }
45 }
46 }
47 }
48
49 //Check some invalid ids
50 EXPECT_THROW(VxdID("1.f"), invalid_argument);
51 EXPECT_THROW(VxdID("1.1.f"), invalid_argument);
52 EXPECT_THROW(VxdID("1.*.f"), invalid_argument);
53 EXPECT_THROW(VxdID("1.1.1 and some more"), invalid_argument);
54 }

◆ VXDGeoPlacement()

VXDGeoPlacement ( const std::string &  name = "",
double  u = 0,
double  v = 0,
std::string  w = "bottom",
double  woffset = 0 
)

Constructor.

Definition at line 18 of file GeoVXDComponents.cc.

18 : m_name(name), m_u(u),
19 m_v(v), m_woffset(woffset)
20 {
21 boost::to_lower(w);
22 if (w == "below") m_w = c_below;
23 else if (w == "bottom") m_w = c_bottom;
24 else if (w == "center") m_w = c_center;
25 else if (w == "top") m_w = c_top;
26 else if (w == "above") m_w = c_above;
27 else B2FATAL("Unknown z-placement for VXD Component " << name << ": " << w << ", check xml file");
28
29 if (m_w != c_center && m_woffset < 0) {
30 B2FATAL("VXD Component " << name << ": Offset has to be positive except for centered placement");
31 }
32 }
double m_u
u coordinate where to place the component
double m_v
v coordinate where to place the component
@ c_bottom
Place the component at the bottom of the mother.
@ c_above
Place the component above the mother.
@ c_center
Place the component at the center of the mother.
@ c_top
Place the component at the top of the mother.
@ c_below
Place the component below the mother.
double m_woffset
Offset to the w placement of the component.
EPosW m_w
w coordinate where to place the component
std::string m_name
Name of the component.