Belle II Software development
Belle2::VXD Namespace Reference

Namespace to provide code needed by both Vertex Detectors, PXD and SVD, and also testbeam telescopes. More...

Classes

class  GeoCache
 Class to faciliate easy access to sensor information of the VXD like coordinate transformations or pitch size. More...
 
class  GeoHeavyMetalShieldCreator
 The creator for the HeavyMetalShield geometry of the Belle II detector. More...
 
class  GeoTools
 The class collects utility functions for numbering layers, sensors snd chips based on current VXD geometry. More...
 
class  GeoVXDAssembly
 Class to group some Geant4 volumes and place them all at once with a given transformation matrix. More...
 
class  GeoVXDCreator
 The creator for the VXD geometry of the Belle II detector. More...
 
class  GeoVXDServiceCreator
 The creator for the VXD Service geometry of the Belle II detector. More...
 
class  MisalignmentCache
 Class to hold misalignment information. More...
 
class  SensitiveDetector
 Sensitive Detector implementation of PXD and SVD. More...
 
class  SensitiveDetectorBase
 Base class for Sensitive Detector implementation of PXD and SVD. More...
 
class  SensitiveDetectorDebugHelper
 Small helper class to facilitate debugging of VXD::SensitiveDetector implementation. More...
 
class  SensorInfoBase
 Base class to provide Sensor Information for PXD and SVD. More...
 
class  SensorPlane
 A Finite plane of one VXD Sensor. More...
 
class  VXDMisalignmentModule
 The VXD misalignment module. More...
 

Functions

 TEST (SensorInfoBase, Rectangular)
 Check wether all the getters work for a normal, rectangular sensor with only one pixel/strip size.
 
 TEST (SensorInfoBase, Trapezoidal)
 Check wether all the getters work for a trapezoidal sensor with only one pixel/strip size.
 
 TEST (SensorInfoBase, Segmented)
 Check wether all the getters work for a trapezoidal sensor with two pixel sizes.
 
 TEST (SensorPlane, DISABLED_NotFound)
 Check that a SensorPlane bails if it cannot find the SensorInfo associated with the plane Disabled temporarily, 23/08/2016, P.
 

Variables

CreatorFactory< GeoHeavyMetalShieldCreatorGeoHeavyMetalShieldFactory ("HeavyMetalShieldCreator")
 Register the creator.
 
geometry::CreatorFactory< GeoVXDServiceCreatorGeoVXDServiceFactory ("VXDServiceCreator")
 Create factory instance so that the framework can instantiate the VXDServiceCreator.
 

Detailed Description

Namespace to provide code needed by both Vertex Detectors, PXD and SVD, and also testbeam telescopes.

Namespace to encapsulate common PXD and SVD code.

Namespace to provide code needed by both Vertex Detectors, PXD and SVD.

Namespace to encapsulate code needed for simulation and reconstrucion of the VXD.

Function Documentation

◆ TEST() [1/4]

TEST ( SensorInfoBase  ,
Rectangular   
)

Check wether all the getters work for a normal, rectangular sensor with only one pixel/strip size.

Definition at line 29 of file SensorInfo.cc.

30 {
31 SensorInfoBase rect(SensorInfoBase::PXD, VxdID(1, 2, 3), 1.0, 2.0, 3.0, 2, 4);
32 EXPECT_EQ(rect.getType(), SensorInfoBase::PXD);
33 EXPECT_EQ(rect.getID(), VxdID(1, 2, 3));
34 EXPECT_EQ(rect.getWidth(), 1.0);
35 EXPECT_EQ(rect.getLength(), 2.0);
36 EXPECT_EQ(rect.getThickness(), 3.0);
37 EXPECT_EQ(rect.getWidth(), rect.getUSize());
38 EXPECT_EQ(rect.getLength(), rect.getVSize());
39 EXPECT_EQ(rect.getThickness(), rect.getWSize());
40 EXPECT_EQ(rect.getUPitch(), 0.5);
41 EXPECT_EQ(rect.getVPitch(), 0.5);
42 EXPECT_EQ(rect.getUCellPosition(0), -0.25);
43 EXPECT_EQ(rect.getUCellPosition(1), 0.25);
44 EXPECT_EQ(rect.getVCellPosition(0), -0.75);
45 EXPECT_EQ(rect.getVCellPosition(1), -0.25);
46 EXPECT_EQ(rect.getVCellPosition(2), 0.25);
47 EXPECT_EQ(rect.getVCellPosition(3), 0.75);
48 for (double u = -1.0 + 0.05; u <= 1.0; u += 0.1) {
49 EXPECT_EQ(rect.getUCellID(u), (int)((u / 1.0 + 0.5) * 2));
50 if (u < -0.5) {EXPECT_EQ(rect.getUCellID(u, 0, true), 0); }
51 if (u > 0.5) {EXPECT_EQ(rect.getUCellID(u, 0, true), rect.getUCells() - 1);}
52 for (double v = -2.0 + 0.11; v <= 2.0; v += 0.2) {
53 EXPECT_EQ(rect.getVCellID(v), (int)((v / 2.0 + 0.5) * 4));
54 if (v < -1.0) {EXPECT_EQ(rect.getVCellID(v, true), 0);}
55 if (v > 1.0) {EXPECT_EQ(rect.getVCellID(v, true), rect.getVCells() - 1);}
56 EXPECT_EQ(rect.inside(u, v), fabs(u) <= 0.5 && fabs(v) <= 1.0);
57 }
58 }
59 EXPECT_EQ(rect.getUCells(), 2);
60 EXPECT_EQ(rect.getVCells(), 4);
61 }
Base class to provide Sensor Information for PXD and SVD.
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:33

◆ TEST() [2/4]

TEST ( SensorInfoBase  ,
Segmented   
)

Check wether all the getters work for a trapezoidal sensor with two pixel sizes.

Definition at line 99 of file SensorInfo.cc.

100 {
101 SensorInfoBase rect(SensorInfoBase::PXD, VxdID(3, 2, 1), 2.0, 2.0, 1.0, 2, 2, 1.0, 1.0, 4);
102 for (double v = -1.0; v < 1.0; v += 0.1) {
103 EXPECT_DOUBLE_EQ(rect.getWidth(v), 2.0 - (v / 2.0 + 0.5) * 1.0);
104 EXPECT_EQ(rect.getWidth(), rect.getUSize());
105 EXPECT_EQ(rect.getVPitch(v), v >= 0 ? 0.25 : 0.5);
106 }
107 EXPECT_EQ(rect.getLength(), 2.0);
108 EXPECT_EQ(rect.getThickness(), 1.0);
109 EXPECT_EQ(rect.getLength(), rect.getVSize());
110 EXPECT_EQ(rect.getThickness(), rect.getWSize());
111 EXPECT_EQ(rect.getUPitch(-1.0), 1.0);
112 EXPECT_EQ(rect.getUPitch(0.0), 0.75);
113 EXPECT_EQ(rect.getUPitch(1.0), 0.5);
114 EXPECT_EQ(rect.getVCellPosition(0), -0.75);
115 EXPECT_EQ(rect.getVCellPosition(1), -0.25);
116 EXPECT_EQ(rect.getVCellPosition(2), 0.125);
117 EXPECT_EQ(rect.getVCellPosition(3), 0.375);
118 EXPECT_EQ(rect.getVCellPosition(4), 0.625);
119 EXPECT_EQ(rect.getVCellPosition(5), 0.875);
120 for (double u = -2.0 + 0.1; u <= 2.0; u += 0.2) {
121 for (double v = -2.0 + 0.11; v <= 2.0; v += 0.2) {
122 EXPECT_EQ(rect.getUCellID(u, v), (int)((u / rect.getWidth(v) + 0.5) * 2));
123 if (v <= 0) {
124 EXPECT_EQ(rect.getVCellID(v), (int)((v / 2.0 + 0.5) * 4));
125 } else {
126 EXPECT_EQ(rect.getVCellID(v), (int)((v / 2.0 + 0.5) * 8) - 2);
127 }
128 EXPECT_EQ(rect.inside(u, v), fabs(u) <= rect.getWidth(v) / 2.0 && fabs(v) <= 1.0);
129 double iu(u), iv(v);
130 rect.forceInside(iu, iv);
131 EXPECT_TRUE(rect.inside(iu, iv));
132 }
133 }
134 EXPECT_EQ(rect.getUCells(), 2);
135 EXPECT_EQ(rect.getVCells(), 6);
136 }

◆ TEST() [3/4]

TEST ( SensorInfoBase  ,
Trapezoidal   
)

Check wether all the getters work for a trapezoidal sensor with only one pixel/strip size.

Definition at line 67 of file SensorInfo.cc.

68 {
69 SensorInfoBase rect(SensorInfoBase::PXD, VxdID(3, 2, 1), 2.0, 2.0, 1.0, 2, 4, 1.0);
70 EXPECT_EQ(rect.getType(), SensorInfoBase::PXD);
71 EXPECT_EQ(rect.getID(), VxdID(3, 2, 1));
72 for (double v = -1.0; v < 1.0; v += 0.1) {
73 EXPECT_DOUBLE_EQ(rect.getWidth(v), 2.0 - (v / 2.0 + 0.5) * 1.0);
74 EXPECT_EQ(rect.getWidth(), rect.getUSize());
75 }
76 EXPECT_EQ(rect.getLength(), 2.0);
77 EXPECT_EQ(rect.getThickness(), 1.0);
78 EXPECT_EQ(rect.getLength(), rect.getVSize());
79 EXPECT_EQ(rect.getThickness(), rect.getWSize());
80 EXPECT_EQ(rect.getUPitch(-1.0), 1.0);
81 EXPECT_EQ(rect.getUPitch(0.0), 0.75);
82 EXPECT_EQ(rect.getUPitch(1.0), 0.5);
83 EXPECT_EQ(rect.getVPitch(), 0.5);
84 for (double u = -2.0 + 0.1; u <= 2.0; u += 0.2) {
85 for (double v = -2.0 + 0.11; v <= 2.0; v += 0.2) {
86 EXPECT_EQ(rect.getUCellID(u, v), (int)((u / rect.getWidth(v) + 0.5) * 2));
87 EXPECT_EQ(rect.getVCellID(v), (int)((v / 2.0 + 0.5) * 4));
88 EXPECT_EQ(rect.inside(u, v), fabs(u) <= rect.getWidth(v) / 2.0 && fabs(v) <= 1.0);
89 }
90 }
91 EXPECT_EQ(rect.getUCells(), 2);
92 EXPECT_EQ(rect.getVCells(), 4);
93 }

◆ TEST() [4/4]

TEST ( SensorPlane  ,
DISABLED_NotFound   
)

Check that a SensorPlane bails if it cannot find the SensorInfo associated with the plane Disabled temporarily, 23/08/2016, P.

Kvasnicka

Definition at line 143 of file SensorInfo.cc.

144 {
145 SensorPlane plane(VxdID(1, 1, 1));
146 EXPECT_B2FATAL(plane.isInActive(0, 0));
147 }
A Finite plane of one VXD Sensor.
Definition: SensorPlane.h:34