57 {
58 MMDetectorHelper mmHelper;
60 AGDDDetectorStore&
ds =
c->GetDetectorStore();
62
63 MM_Technology *
t =
static_cast<MM_Technology *
>(
ds.GetTechnology(
name));
65 double gasTck =
t->gasThickness;
66 double pcbTck =
t->pcbThickness;
67 double roTck =
t->roThickness;
71
72 minimalgeo =
t->geoLevel;
73
74
76
80
81 const GeoMaterial *mtrd = matManager.
getMaterial(
"std::FR4") !=
nullptr ?
83 GeoLogVol *ltrd =
new GeoLogVol(
logVolName, strd, mtrd);
84 GeoFullPhysVol *ptrd = new GeoFullPhysVol(ltrd);
85
86 if (!minimalgeo)
87 return ptrd;
88
90 ptrd->add(new GeoSerialIdentifier(0));
91
92 int igl = 0;
93
94
95 for (
int i = 0;
i <
t->nlayers;
i++) {
96
97 double widthActive;
98 double longWidthActive;
99 double lengthActive;
100
101
102 igl++;
103 ptrd->add(new GeoIdentifierTag(igl));
104
108
109 if (i == 0)
110 newpos += gasTck / 2.;
111 else
112 newpos += gasTck;
113 if ((i + 1) % 2)
114 newpos += pcbTck;
115 else
116 newpos += roTck;
117 double newXPos = newpos;
118
119 const GeoShape *sGasVolume = new GeoTrd(gasTck / 2, gasTck / 2, widthActive / 2, longWidthActive / 2, lengthActive / 2);
120
121 GeoLogVol *ltrdtmp =
new GeoLogVol(
"MM_Sensitive", sGasVolume, matManager.
getMaterial(
"muo::ArCO2"));
122 GeoPhysVol *ptrdtmp = new GeoPhysVol(ltrdtmp);
123 GeoNameTag *ntrdtmp =
new GeoNameTag(
name +
"muo::ArCO2");
124 GeoTransform *ttrdtmp = new GeoTransform(GeoTrf::TranslateX3D(newXPos));
125
126
127
128
129 ptrd->add(ntrdtmp);
130 ptrd->add(ttrdtmp);
131 ptrd->add(ptrdtmp);
132
135 const GeoShape *trd1 =
new GeoTrd(gasTck / 2, gasTck / 2,
width / 2,
longWidth / 2,
length / 2);
136 const GeoShape *trd2 =
new GeoTrd(gasTck, gasTck, W - f3, lW - f3,
length / 2 - (f1 + f2) / 2.);
137 GeoTrf::Translate3D
c(0, 0, (f2 - f1) / 2.);
138 trd1 = &(trd1->subtract((*trd2) << c));
139 GeoLogVol *ltrdframe =
new GeoLogVol(
"MM_Frame", trd1, matManager.
getMaterial(
"std::Aluminium"));
140 GeoPhysVol *ptrdframe = new GeoPhysVol(ltrdframe);
141
142 ptrdtmp->add(ptrdframe);
143
144 }
145
146 return ptrd;
147 }
CxxUtils::LockedPointer< AGDDController > LockedController
MMDetectorDescription * Get_MMDetectorSubType(const std::string &type)
IAGDDtoGeoSvc::LockedController Get_Controller()
virtual const GeoMaterial * getMaterial(const std::string &name)=0
@ f3
fraction of energy reconstructed in 3rd sampling