3 #include <phparameter/PHParameters.h>
9 #include <Geant4/G4Box.hh>
10 #include <Geant4/G4Element.hh>
11 #include <Geant4/G4LogicalVolume.hh>
12 #include <Geant4/G4Material.hh>
13 #include <Geant4/G4PVPlacement.hh>
14 #include <Geant4/G4PhysicalConstants.hh>
15 #include <Geant4/G4String.hh>
16 #include <Geant4/G4SubtractionSolid.hh>
17 #include <Geant4/G4SystemOfUnits.hh>
18 #include <Geant4/G4ThreeVector.hh>
19 #include <Geant4/G4Tubs.hh>
20 #include <Geant4/G4UnionSolid.hh>
21 #include <Geant4/G4UserLimits.hh>
22 #include <Geant4/G4VisAttributes.hh>
40 , m_Params(parameters)
41 , m_CylinderPhysicalVolume(nullptr)
65 set<G4VPhysicalVolume *>::const_iterator iter =
79 set<G4VPhysicalVolume *>::const_iterator iter =
97 std::cout <<
"Error: Can not set Micromegas Gas" << std::endl;
134 map<int, float>
thick;
135 thick[coverlay] = 0.0050000 *
cm;
136 thick[CuGround] = 0.0001580 *
cm;
137 thick[PCB] = 0.0100000 *
cm;
138 thick[CuStrips] = 0.0012000 *
cm;
139 thick[KaptonStrips] = 0.0075000 *
cm;
140 thick[ResistiveStrips] = 0.0020000 *
cm;
143 thick[Mesh] = 0.0018000 *
cm;
146 thick[DriftCuElectrode] = 0.0005000 *
cm;
147 thick[DriftKapton] = 0.0250000 *
cm;
148 thick[DriftCuGround] = 0.0000410 *
cm;
151 map<int, G4Material *> media;
158 media[Gas1] = TrackerMaterial;
160 media[Gas2] = TrackerMaterial;
166 map<int, G4Colour>
color;
167 color[coverlay] =
G4Colour(204 / 255., 153 / 255., 0);
178 color[DriftCuGround] =
G4Colour(51 / 255., 26 / 255., 0);
199 map<int, float> thick_meca;
200 thick_meca[Cu1_meca] = 25 *
um;
201 thick_meca[FR4_1_meca] = 100 *
um;
202 thick_meca[Cu2_meca] = 25 *
um;
203 thick_meca[FR4_2_meca] = 100 *
um;
204 thick_meca[Cu3_meca] = 9 *
um;
207 map<int, G4Material *> media_meca;
215 map<int, G4Colour> color_meca;
236 thick[CuStrips] = 9 *
um;
237 else if (nCZlayer == 1)
238 thick[CuStrips] = 25 *
um;
241 for (map<int, float>::iterator iter = thick.begin(); iter != thick.end(); ++iter)
246 cout <<
"The tile thickness is " <<
thickness /
mm <<
" mm" << endl;
255 radius = radius - gap / 2. -
thickness / 2. * nCZlayer;
257 double spaceforhollowbar = 6 *
mm;
260 radius - 0.001 *
mm - spaceforhollowbar / 2,
261 radius +
thickness * nCZlayer + gap + 0.001 *
mm + spaceforhollowbar / 2,
270 cylinder_logic->SetVisAttributes(vis);
279 float maxTileWidth = 50. *
cm;
280 float spacer = 2. *
cm;
283 int Ntiles = ceil(circumference / (maxTileWidth + spacer));
285 float tileW = (circumference - Ntiles * spacer) / Ntiles;
287 cout << setw(10) << radius << setw(10) <<
"Ntiles: " << Ntiles << setw(20) <<
"tileW: " << tileW << endl;
292 float deltaPhi = tileW / radius * TMath::RadToDeg();
293 spacer = radius * 360. / Ntiles *
deg - tileW;
302 radius - 0.001 * mm - spaceforhollowbar / 2,
303 radius +
thickness * nCZlayer + gap + 0.001 * mm + spaceforhollowbar / 2,
308 tile_o_logic->SetVisAttributes(vis);
310 double thickness_mecaPCB = 25 *
um + 100 *
um + 25 *
um + 100 *
um + 9 *
um;
311 double radius_mecaPCB = radius +
thickness / 2. - thickness_mecaPCB / 2.;
314 radius_mecaPCB - 0.1 * um,
315 radius_mecaPCB + thickness_mecaPCB + 0.1 * um,
318 (spacer - 2 *
barwidth) / (radius_mecaPCB) *radian);
324 deltaPhi *
deg + 0.5 * mm / radius *
radian);
332 rotang_bar2 = 360. / Ntiles *
deg + rotang_bar2 - ((spacer -
barwidth) / radius * radian) - 0.5 * mm / radius *
radian;
338 u1 =
new G4UnionSolid(
"MM+bar1+bar2+arch1+arch2+meca", u1, mecaPCB_solid);
357 float Rm_meca = radius_mecaPCB;
358 float RM_meca = Rm_meca;
363 for (
int ic = 0; ic < kNcomponents; ic++)
367 g4userlimits_gas = g4userlimits;
382 for (
int ii = 0; ii < nhit; ii++)
385 tile_o_comp =
new G4Tubs(cname +
"_solid",
395 tile_o_comp_logic->SetVisAttributes(vis);
406 tile_o_comp =
new G4Tubs(cname +
"_solid",
416 tile_o_comp_logic->SetVisAttributes(vis);
427 for (
int ic = 0; ic < kNcomponents_meca; ic++)
431 RM_meca = Rm_meca + thick_meca[ic];
433 tile_o_comp =
new G4Tubs(cname +
"_solid",
446 tile_o_comp_logic->SetVisAttributes(vis);
448 zrot_tmp->
rotateZ(360. / Ntiles *
deg - (spacer - 2 *
barwidth + 1 * mm) / radius_mecaPCB * radian);
468 Rm_meca = radius_mecaPCB;
483 for (
int ic = 0; ic < kNcomponents; ic++)
487 g4userlimits_gas = g4userlimits;
496 for (
int ii = 0; ii < nhit; ii++)
499 tile_o_comp =
new G4Tubs(cname +
"_solid",
515 tile_o_comp =
new G4Tubs(cname +
"_solid",
540 for (
int ic = 0; ic < kNcomponents_meca; ic++)
544 RM_meca = Rm_meca + thick_meca[ic];
546 tile_o_comp =
new G4Tubs(cname +
"_solid",
559 tile_o_comp_logic->SetVisAttributes(vis);
561 zrot_tmp2->
rotateZ(360. / Ntiles *
deg - (spacer - 2 *
barwidth + 1 * mm) / radius_mecaPCB * radian);
575 for (
int i = 0; i < Ntiles; i++)
680 cout << myMMStrips->
GetName() << endl;
687 cout << myMMResistivePaste->
GetName() << endl;
694 cout << myCopper->
GetName() << endl;
701 cout << myCfiber->
GetName() << endl;