86 {
87 GeoPhysVol *pvol = nullptr;
88 GeoLogVol *lvol = nullptr;
90 if (
name.compare(0, 3,
"CHV") == 0 ||
name.compare(0, 3,
"CRO") == 0 ||
name.compare(0, 3,
"CMI") == 0) {
91 double sinexc = 0.;
92 double cosexc = 1.;
94 if ((
name.compare(0, 3,
"CHV") == 0 ||
name.compare(0, 3,
"CRO") == 0) && !is_barrel) {
96 sinexc = std::abs(
excent) / ltemp;
99 }
100
102
104 const GeoShape *IBeamShape =
new GeoBox(
height / 2, volumelargeness / 2,
length / 2);
106 double yshift = volumelargeness / 4. +
thickness / 2.;
107 IBeamShape = &(IBeamShape->subtract((*sideBox) << GeoTrf::TranslateY3D(yshift)));
108 IBeamShape = &(IBeamShape->subtract((*sideBox) << GeoTrf::TranslateY3D(-yshift)));
109
110
112 IBeamShape = &(IBeamShape->subtract((*holeBox) << GeoTrf::TranslateZ3D(
m_hole_pos1 / cosexc)));
113 IBeamShape = &(IBeamShape->subtract((*holeBox) << GeoTrf::TranslateZ3D(
m_hole_pos2 / cosexc)));
114 lvol =
new GeoLogVol(
name, IBeamShape, mat);
115 pvol = new GeoPhysVol(lvol);
116
117 } else {
118
119
120 volumelargeness =
width;
121 const GeoBox *Cbox =
new GeoBox(
height / 2, volumelargeness / 2,
length / 2);
122 lvol =
new GeoLogVol(
name, Cbox, mat);
123 pvol = new GeoPhysVol(lvol);
124 }
125 return pvol;
126
127 }
else if (
name.compare(0, 2,
"LB") == 0) {
129
131 LBbox = &(LBbox->subtract((*innerBox)));
132 lvol =
new GeoLogVol(
name, LBbox, mat);
133 pvol = new GeoPhysVol(lvol);
134 return pvol;
135
136 } else {
137 return nullptr;
138 }
139 }
virtual const GeoMaterial * getMaterial(const std::string &name)=0