]>
Commit | Line | Data |
---|---|---|
4c039060 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
b2a60966 | 16 | /* $Id$ */ |
17 | ||
d15a28e7 | 18 | //_________________________________________________________________________ |
b2a60966 | 19 | // Implementation version v0 of PHOS Manager class |
20 | // Layout EMC + PPSD has name GPS2 | |
a3dfe79c | 21 | // Layout EMC + CPV has name IHEP |
5f20d3fb | 22 | // An object of this class does not produce hits nor digits |
23 | // It is the one to use if you do not want to produce outputs in TREEH or TREED | |
b2a60966 | 24 | // |
25 | //*-- Author: Yves Schutz (SUBATECH) | |
26 | ||
d2cf0e38 | 27 | |
fe4da5cc | 28 | // --- ROOT system --- |
d15a28e7 | 29 | |
fe4da5cc | 30 | #include "TBRIK.h" |
31 | #include "TNode.h" | |
0869cea5 | 32 | #include "TRandom.h" |
94de3818 | 33 | #include "TGeometry.h" |
fe4da5cc | 34 | |
81e92872 | 35 | |
d15a28e7 | 36 | // --- Standard library --- |
37 | ||
de9ec31b | 38 | #include <stdio.h> |
39 | #include <string.h> | |
40 | #include <stdlib.h> | |
41 | #include <strstream.h> | |
d15a28e7 | 42 | |
43 | // --- AliRoot header files --- | |
44 | ||
fe4da5cc | 45 | #include "AliPHOSv0.h" |
46 | #include "AliRun.h" | |
d15a28e7 | 47 | #include "AliConst.h" |
94de3818 | 48 | #include "AliMC.h" |
fe4da5cc | 49 | |
50 | ClassImp(AliPHOSv0) | |
51 | ||
d15a28e7 | 52 | //____________________________________________________________________________ |
53 | AliPHOSv0::AliPHOSv0(const char *name, const char *title): | |
54 | AliPHOS(name,title) | |
55 | { | |
b2a60966 | 56 | // ctor : title is used to identify the layout |
57 | // GPS2 = 5 modules (EMC + PPSD) | |
fe4da5cc | 58 | |
d15a28e7 | 59 | // gets an instance of the geometry parameters class |
e04976bd | 60 | |
61 | if (strcmp(GetTitle(),"") != 0 ) | |
62 | fGeom = AliPHOSGeometry::GetInstance(GetTitle(), "") ; | |
63 | ||
d15a28e7 | 64 | } |
65 | ||
d15a28e7 | 66 | //____________________________________________________________________________ |
67 | void AliPHOSv0::BuildGeometry() | |
fe4da5cc | 68 | { |
b2a60966 | 69 | // Build the PHOS geometry for the ROOT display |
70 | //BEGIN_HTML | |
71 | /* | |
72 | <H2> | |
73 | PHOS in ALICE displayed by root | |
74 | </H2> | |
75 | <UL> | |
76 | <LI> All Views | |
77 | <P> | |
78 | <CENTER> | |
79 | <IMG Align=BOTTOM ALT="All Views" SRC="../images/AliPHOSv0AllViews.gif"> | |
80 | </CENTER></P></LI> | |
81 | <LI> Front View | |
82 | <P> | |
83 | <CENTER> | |
84 | <IMG Align=BOTTOM ALT="Front View" SRC="../images/AliPHOSv0FrontView.gif"> | |
85 | </CENTER></P></LI> | |
86 | <LI> 3D View 1 | |
87 | <P> | |
88 | <CENTER> | |
89 | <IMG Align=BOTTOM ALT="3D View 1" SRC="../images/AliPHOSv03DView1.gif"> | |
90 | </CENTER></P></LI> | |
91 | <LI> 3D View 2 | |
92 | <P> | |
93 | <CENTER> | |
94 | <IMG Align=BOTTOM ALT="3D View 2" SRC="../images/AliPHOSv03DView2.gif"> | |
95 | </CENTER></P></LI> | |
96 | </UL> | |
97 | */ | |
98 | //END_HTML | |
d15a28e7 | 99 | |
100 | this->BuildGeometryforPHOS() ; | |
bacd0b23 | 101 | if ( ( strcmp(fGeom->GetName(), "GPS2" ) == 0 ) ) |
d15a28e7 | 102 | this->BuildGeometryforPPSD() ; |
bacd0b23 | 103 | else if ( ( strcmp(fGeom->GetName(), "IHEP" ) == 0 ) ) |
104 | this->BuildGeometryforCPV() ; | |
d15a28e7 | 105 | else |
106 | cout << "AliPHOSv0::BuildGeometry : no charged particle identification system installed" << endl; | |
107 | ||
fe4da5cc | 108 | } |
d15a28e7 | 109 | |
110 | //____________________________________________________________________________ | |
111 | void AliPHOSv0:: BuildGeometryforPHOS(void) | |
112 | { | |
b2a60966 | 113 | // Build the PHOS-EMC geometry for the ROOT display |
d15a28e7 | 114 | |
115 | const Int_t kColorPHOS = kRed ; | |
116 | const Int_t kColorXTAL = kBlue ; | |
117 | ||
92862013 | 118 | Double_t const kRADDEG = 180.0 / kPI ; |
d15a28e7 | 119 | |
120 | new TBRIK( "OuterBox", "PHOS box", "void", fGeom->GetOuterBoxSize(0)/2, | |
121 | fGeom->GetOuterBoxSize(1)/2, | |
122 | fGeom->GetOuterBoxSize(2)/2 ); | |
123 | ||
124 | // Textolit Wall box, position inside PHOS | |
125 | ||
126 | new TBRIK( "TextolitBox", "PHOS Textolit box ", "void", fGeom->GetTextolitBoxSize(0)/2, | |
127 | fGeom->GetTextolitBoxSize(1)/2, | |
128 | fGeom->GetTextolitBoxSize(2)/2); | |
129 | ||
130 | // Polystyrene Foam Plate | |
131 | ||
132 | new TBRIK( "UpperFoamPlate", "PHOS Upper foam plate", "void", fGeom->GetTextolitBoxSize(0)/2, | |
133 | fGeom->GetSecondUpperPlateThickness()/2, | |
134 | fGeom->GetTextolitBoxSize(2)/2 ) ; | |
135 | ||
136 | // Air Filled Box | |
fe4da5cc | 137 | |
d15a28e7 | 138 | new TBRIK( "AirFilledBox", "PHOS air filled box", "void", fGeom->GetAirFilledBoxSize(0)/2, |
139 | fGeom->GetAirFilledBoxSize(1)/2, | |
140 | fGeom->GetAirFilledBoxSize(2)/2 ); | |
141 | ||
142 | // Crystals Box | |
143 | ||
92862013 | 144 | Float_t xtlX = fGeom->GetCrystalSize(0) ; |
145 | Float_t xtlY = fGeom->GetCrystalSize(1) ; | |
146 | Float_t xtlZ = fGeom->GetCrystalSize(2) ; | |
d15a28e7 | 147 | |
92862013 | 148 | Float_t xl = fGeom->GetNPhi() * ( xtlX + 2 * fGeom->GetGapBetweenCrystals() ) / 2.0 + fGeom->GetModuleBoxThickness() ; |
149 | Float_t yl = ( xtlY + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() + fGeom->GetCrystalHolderThickness() ) / 2.0 | |
d15a28e7 | 150 | + fGeom->GetModuleBoxThickness() / 2.0 ; |
92862013 | 151 | Float_t zl = fGeom->GetNZ() * ( xtlZ + 2 * fGeom->GetGapBetweenCrystals() ) / 2.0 + fGeom->GetModuleBoxThickness() ; |
d15a28e7 | 152 | |
92862013 | 153 | new TBRIK( "CrystalsBox", "PHOS crystals box", "void", xl, yl, zl ) ; |
d15a28e7 | 154 | |
155 | // position PHOS into ALICE | |
156 | ||
92862013 | 157 | Float_t r = fGeom->GetIPtoOuterCoverDistance() + fGeom->GetOuterBoxSize(1) / 2.0 ; |
d15a28e7 | 158 | Int_t number = 988 ; |
159 | Float_t pphi = TMath::ATan( fGeom->GetOuterBoxSize(0) / ( 2.0 * fGeom->GetIPtoOuterCoverDistance() ) ) ; | |
92862013 | 160 | pphi *= kRADDEG ; |
161 | TNode * top = gAlice->GetGeometry()->GetNode("alice") ; | |
d15a28e7 | 162 | |
163 | char * nodename = new char[20] ; | |
164 | char * rotname = new char[20] ; | |
165 | ||
166 | for( Int_t i = 1; i <= fGeom->GetNModules(); i++ ) { | |
167 | Float_t angle = pphi * 2 * ( i - fGeom->GetNModules() / 2.0 - 0.5 ) ; | |
168 | sprintf(rotname, "%s%d", "rot", number++) ; | |
169 | new TRotMatrix(rotname, rotname, 90, angle, 90, 90 + angle, 0, 0); | |
92862013 | 170 | top->cd(); |
d15a28e7 | 171 | sprintf(nodename,"%s%d", "Module", i) ; |
92862013 | 172 | Float_t x = r * TMath::Sin( angle / kRADDEG ) ; |
173 | Float_t y = -r * TMath::Cos( angle / kRADDEG ) ; | |
174 | TNode * outerboxnode = new TNode(nodename, nodename, "OuterBox", x, y, 0, rotname ) ; | |
175 | outerboxnode->SetLineColor(kColorPHOS) ; | |
176 | fNodes->Add(outerboxnode) ; | |
177 | outerboxnode->cd() ; | |
d15a28e7 | 178 | // now inside the outer box the textolit box |
92862013 | 179 | y = ( fGeom->GetOuterBoxThickness(1) - fGeom->GetUpperPlateThickness() ) / 2. ; |
d15a28e7 | 180 | sprintf(nodename,"%s%d", "TexBox", i) ; |
92862013 | 181 | TNode * textolitboxnode = new TNode(nodename, nodename, "TextolitBox", 0, y, 0) ; |
182 | textolitboxnode->SetLineColor(kColorPHOS) ; | |
183 | fNodes->Add(textolitboxnode) ; | |
d15a28e7 | 184 | // upper foam plate inside outre box |
92862013 | 185 | outerboxnode->cd() ; |
d15a28e7 | 186 | sprintf(nodename, "%s%d", "UFPlate", i) ; |
92862013 | 187 | y = ( fGeom->GetTextolitBoxSize(1) - fGeom->GetSecondUpperPlateThickness() ) / 2.0 ; |
188 | TNode * upperfoamplatenode = new TNode(nodename, nodename, "UpperFoamPlate", 0, y, 0) ; | |
189 | upperfoamplatenode->SetLineColor(kColorPHOS) ; | |
190 | fNodes->Add(upperfoamplatenode) ; | |
d15a28e7 | 191 | // air filled box inside textolit box (not drawn) |
92862013 | 192 | textolitboxnode->cd(); |
193 | y = ( fGeom->GetTextolitBoxSize(1) - fGeom->GetAirFilledBoxSize(1) ) / 2.0 - fGeom->GetSecondUpperPlateThickness() ; | |
d15a28e7 | 194 | sprintf(nodename, "%s%d", "AFBox", i) ; |
92862013 | 195 | TNode * airfilledboxnode = new TNode(nodename, nodename, "AirFilledBox", 0, y, 0) ; |
196 | fNodes->Add(airfilledboxnode) ; | |
d15a28e7 | 197 | // crystals box inside air filled box |
92862013 | 198 | airfilledboxnode->cd() ; |
199 | y = fGeom->GetAirFilledBoxSize(1) / 2.0 - yl | |
d15a28e7 | 200 | - ( fGeom->GetIPtoCrystalSurface() - fGeom->GetIPtoOuterCoverDistance() - fGeom->GetModuleBoxThickness() |
201 | - fGeom->GetUpperPlateThickness() - fGeom->GetSecondUpperPlateThickness() ) ; | |
202 | sprintf(nodename, "%s%d", "XTBox", i) ; | |
92862013 | 203 | TNode * crystalsboxnode = new TNode(nodename, nodename, "CrystalsBox", 0, y, 0) ; |
204 | crystalsboxnode->SetLineColor(kColorXTAL) ; | |
205 | fNodes->Add(crystalsboxnode) ; | |
d15a28e7 | 206 | } |
b27d82c8 | 207 | |
208 | delete[] rotname ; | |
209 | delete[] nodename ; | |
d15a28e7 | 210 | } |
211 | ||
212 | //____________________________________________________________________________ | |
213 | void AliPHOSv0:: BuildGeometryforPPSD(void) | |
fe4da5cc | 214 | { |
b2a60966 | 215 | // Build the PHOS-PPSD geometry for the ROOT display |
216 | //BEGIN_HTML | |
217 | /* | |
218 | <H2> | |
219 | PPSD displayed by root | |
220 | </H2> | |
221 | <UL> | |
222 | <LI> Zoom on PPSD: Front View | |
223 | <P> | |
224 | <CENTER> | |
225 | <IMG Align=BOTTOM ALT="PPSD Front View" SRC="../images/AliPHOSv0PPSDFrontView.gif"> | |
226 | </CENTER></P></LI> | |
227 | <LI> Zoom on PPSD: Perspective View | |
228 | <P> | |
229 | <CENTER> | |
230 | <IMG Align=BOTTOM ALT="PPSD Prespective View" SRC="../images/AliPHOSv0PPSDPerspectiveView.gif"> | |
231 | </CENTER></P></LI> | |
232 | </UL> | |
233 | */ | |
234 | //END_HTML | |
92862013 | 235 | Double_t const kRADDEG = 180.0 / kPI ; |
d15a28e7 | 236 | |
237 | const Int_t kColorPHOS = kRed ; | |
238 | const Int_t kColorPPSD = kGreen ; | |
239 | const Int_t kColorGas = kBlue ; | |
240 | const Int_t kColorAir = kYellow ; | |
241 | ||
242 | // Box for a full PHOS module | |
243 | ||
bacd0b23 | 244 | new TBRIK( "PPSDBox", "PPSD box", "void", fGeom->GetCPVBoxSize(0)/2, |
245 | fGeom->GetCPVBoxSize(1)/2, | |
246 | fGeom->GetCPVBoxSize(2)/2 ); | |
d15a28e7 | 247 | |
248 | // Box containing one micromegas module | |
249 | ||
250 | new TBRIK( "PPSDModule", "PPSD module", "void", fGeom->GetPPSDModuleSize(0)/2, | |
251 | fGeom->GetPPSDModuleSize(1)/2, | |
252 | fGeom->GetPPSDModuleSize(2)/2 ); | |
253 | // top lid | |
254 | ||
255 | new TBRIK ( "TopLid", "Micromegas top lid", "void", fGeom->GetPPSDModuleSize(0)/2, | |
256 | fGeom->GetLidThickness()/2, | |
257 | fGeom->GetPPSDModuleSize(2)/2 ) ; | |
258 | // composite panel (top and bottom) | |
259 | ||
260 | new TBRIK ( "TopPanel", "Composite top panel", "void", ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() )/2, | |
261 | fGeom->GetCompositeThickness()/2, | |
262 | ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() )/2 ) ; | |
263 | ||
264 | new TBRIK ( "BottomPanel", "Composite bottom panel", "void", ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() )/2, | |
265 | fGeom->GetCompositeThickness()/2, | |
266 | ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() )/2 ) ; | |
267 | // gas gap (conversion and avalanche) | |
268 | ||
269 | new TBRIK ( "GasGap", "gas gap", "void", ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() )/2, | |
270 | ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() )/2, | |
271 | ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() )/2 ) ; | |
272 | ||
273 | // anode and cathode | |
274 | ||
275 | new TBRIK ( "Anode", "Anode", "void", ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() )/2, | |
276 | fGeom->GetAnodeThickness()/2, | |
277 | ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() )/2 ) ; | |
278 | ||
279 | new TBRIK ( "Cathode", "Cathode", "void", ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() )/2, | |
280 | fGeom->GetCathodeThickness()/2, | |
281 | ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() )/2 ) ; | |
282 | // PC | |
283 | ||
284 | new TBRIK ( "PCBoard", "Printed Circuit", "void", ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() )/2, | |
285 | fGeom->GetPCThickness()/2, | |
286 | ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() )/2 ) ; | |
287 | // Gap between Lead and top micromegas | |
288 | ||
bacd0b23 | 289 | new TBRIK ( "LeadToM", "Air Gap top", "void", fGeom->GetCPVBoxSize(0)/2, |
d15a28e7 | 290 | fGeom->GetMicro1ToLeadGap()/2, |
bacd0b23 | 291 | fGeom->GetCPVBoxSize(2)/2 ) ; |
d15a28e7 | 292 | |
293 | // Gap between Lead and bottom micromegas | |
294 | ||
bacd0b23 | 295 | new TBRIK ( "MToLead", "Air Gap bottom", "void", fGeom->GetCPVBoxSize(0)/2, |
d15a28e7 | 296 | fGeom->GetLeadToMicro2Gap()/2, |
bacd0b23 | 297 | fGeom->GetCPVBoxSize(2)/2 ) ; |
d15a28e7 | 298 | // Lead converter |
299 | ||
bacd0b23 | 300 | new TBRIK ( "Lead", "Lead converter", "void", fGeom->GetCPVBoxSize(0)/2, |
d15a28e7 | 301 | fGeom->GetLeadConverterThickness()/2, |
bacd0b23 | 302 | fGeom->GetCPVBoxSize(2)/2 ) ; |
d15a28e7 | 303 | |
304 | // position PPSD into ALICE | |
305 | ||
306 | char * nodename = new char[20] ; | |
307 | char * rotname = new char[20] ; | |
308 | ||
bacd0b23 | 309 | Float_t r = fGeom->GetIPtoTopLidDistance() + fGeom->GetCPVBoxSize(1) / 2.0 ; |
d15a28e7 | 310 | Int_t number = 988 ; |
92862013 | 311 | TNode * top = gAlice->GetGeometry()->GetNode("alice") ; |
d15a28e7 | 312 | |
313 | for( Int_t i = 1; i <= fGeom->GetNModules(); i++ ) { // the number of PHOS modules | |
314 | Float_t angle = fGeom->GetPHOSAngle(i) ; | |
315 | sprintf(rotname, "%s%d", "rotg", number++) ; | |
316 | new TRotMatrix(rotname, rotname, 90, angle, 90, 90 + angle, 0, 0); | |
92862013 | 317 | top->cd(); |
d15a28e7 | 318 | sprintf(nodename, "%s%d", "Moduleg", i) ; |
92862013 | 319 | Float_t x = r * TMath::Sin( angle / kRADDEG ) ; |
320 | Float_t y = -r * TMath::Cos( angle / kRADDEG ) ; | |
321 | TNode * ppsdboxnode = new TNode(nodename , nodename ,"PPSDBox", x, y, 0, rotname ) ; | |
322 | ppsdboxnode->SetLineColor(kColorPPSD) ; | |
323 | fNodes->Add(ppsdboxnode) ; | |
324 | ppsdboxnode->cd() ; | |
d15a28e7 | 325 | // inside the PPSD box: |
326 | // 1. fNumberOfModulesPhi x fNumberOfModulesZ top micromegas | |
bacd0b23 | 327 | x = ( fGeom->GetCPVBoxSize(0) - fGeom->GetPPSDModuleSize(0) ) / 2. ; |
31aa6d6c | 328 | { |
329 | for ( Int_t iphi = 1; iphi <= fGeom->GetNumberOfModulesPhi(); iphi++ ) { // the number of micromegas modules in phi per PHOS module | |
bacd0b23 | 330 | Float_t z = ( fGeom->GetCPVBoxSize(2) - fGeom->GetPPSDModuleSize(2) ) / 2. ; |
31aa6d6c | 331 | TNode * micro1node ; |
332 | for ( Int_t iz = 1; iz <= fGeom->GetNumberOfModulesZ(); iz++ ) { // the number of micromegas modules in z per PHOS module | |
bacd0b23 | 333 | y = ( fGeom->GetCPVBoxSize(1) - fGeom->GetMicromegas1Thickness() ) / 2. ; |
31aa6d6c | 334 | sprintf(nodename, "%s%d%d%d", "Mic1", i, iphi, iz) ; |
335 | micro1node = new TNode(nodename, nodename, "PPSDModule", x, y, z) ; | |
336 | micro1node->SetLineColor(kColorPPSD) ; | |
337 | fNodes->Add(micro1node) ; | |
338 | // inside top micromegas | |
339 | micro1node->cd() ; | |
340 | // a. top lid | |
341 | y = ( fGeom->GetMicromegas1Thickness() - fGeom->GetLidThickness() ) / 2. ; | |
342 | sprintf(nodename, "%s%d%d%d", "Lid", i, iphi, iz) ; | |
343 | TNode * toplidnode = new TNode(nodename, nodename, "TopLid", 0, y, 0) ; | |
344 | toplidnode->SetLineColor(kColorPPSD) ; | |
345 | fNodes->Add(toplidnode) ; | |
346 | // b. composite panel | |
347 | y = y - fGeom->GetLidThickness() / 2. - fGeom->GetCompositeThickness() / 2. ; | |
348 | sprintf(nodename, "%s%d%d%d", "CompU", i, iphi, iz) ; | |
349 | TNode * compupnode = new TNode(nodename, nodename, "TopPanel", 0, y, 0) ; | |
350 | compupnode->SetLineColor(kColorPPSD) ; | |
351 | fNodes->Add(compupnode) ; | |
352 | // c. anode | |
353 | y = y - fGeom->GetCompositeThickness() / 2. - fGeom->GetAnodeThickness() / 2. ; | |
354 | sprintf(nodename, "%s%d%d%d", "Ano", i, iphi, iz) ; | |
355 | TNode * anodenode = new TNode(nodename, nodename, "Anode", 0, y, 0) ; | |
356 | anodenode->SetLineColor(kColorPHOS) ; | |
357 | fNodes->Add(anodenode) ; | |
358 | // d. gas | |
359 | y = y - fGeom->GetAnodeThickness() / 2. - ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() ) / 2. ; | |
360 | sprintf(nodename, "%s%d%d%d", "GGap", i, iphi, iz) ; | |
361 | TNode * ggapnode = new TNode(nodename, nodename, "GasGap", 0, y, 0) ; | |
362 | ggapnode->SetLineColor(kColorGas) ; | |
363 | fNodes->Add(ggapnode) ; | |
d15a28e7 | 364 | // f. cathode |
31aa6d6c | 365 | y = y - ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() ) / 2. - fGeom->GetCathodeThickness() / 2. ; |
366 | sprintf(nodename, "%s%d%d%d", "Cathode", i, iphi, iz) ; | |
367 | TNode * cathodenode = new TNode(nodename, nodename, "Cathode", 0, y, 0) ; | |
368 | cathodenode->SetLineColor(kColorPHOS) ; | |
369 | fNodes->Add(cathodenode) ; | |
370 | // g. printed circuit | |
371 | y = y - fGeom->GetCathodeThickness() / 2. - fGeom->GetPCThickness() / 2. ; | |
372 | sprintf(nodename, "%s%d%d%d", "PC", i, iphi, iz) ; | |
373 | TNode * pcnode = new TNode(nodename, nodename, "PCBoard", 0, y, 0) ; | |
374 | pcnode->SetLineColor(kColorPPSD) ; | |
375 | fNodes->Add(pcnode) ; | |
376 | // h. composite panel | |
377 | y = y - fGeom->GetPCThickness() / 2. - fGeom->GetCompositeThickness() / 2. ; | |
378 | sprintf(nodename, "%s%d%d%d", "CompDown", i, iphi, iz) ; | |
379 | TNode * compdownnode = new TNode(nodename, nodename, "BottomPanel", 0, y, 0) ; | |
380 | compdownnode->SetLineColor(kColorPPSD) ; | |
381 | fNodes->Add(compdownnode) ; | |
382 | z = z - fGeom->GetPPSDModuleSize(2) ; | |
383 | ppsdboxnode->cd() ; | |
384 | } // end of Z module loop | |
385 | x = x - fGeom->GetPPSDModuleSize(0) ; | |
92862013 | 386 | ppsdboxnode->cd() ; |
31aa6d6c | 387 | } // end of phi module loop |
388 | } | |
d15a28e7 | 389 | // 2. air gap |
92862013 | 390 | ppsdboxnode->cd() ; |
bacd0b23 | 391 | y = ( fGeom->GetCPVBoxSize(1) - 2 * fGeom->GetMicromegas1Thickness() - fGeom->GetMicro1ToLeadGap() ) / 2. ; |
d15a28e7 | 392 | sprintf(nodename, "%s%d", "GapUp", i) ; |
92862013 | 393 | TNode * gapupnode = new TNode(nodename, nodename, "LeadToM", 0, y, 0) ; |
394 | gapupnode->SetLineColor(kColorAir) ; | |
395 | fNodes->Add(gapupnode) ; | |
d15a28e7 | 396 | // 3. lead converter |
92862013 | 397 | y = y - fGeom->GetMicro1ToLeadGap() / 2. - fGeom->GetLeadConverterThickness() / 2. ; |
d15a28e7 | 398 | sprintf(nodename, "%s%d", "LeadC", i) ; |
92862013 | 399 | TNode * leadcnode = new TNode(nodename, nodename, "Lead", 0, y, 0) ; |
400 | leadcnode->SetLineColor(kColorPPSD) ; | |
401 | fNodes->Add(leadcnode) ; | |
d15a28e7 | 402 | // 4. air gap |
92862013 | 403 | y = y - fGeom->GetLeadConverterThickness() / 2. - fGeom->GetLeadToMicro2Gap() / 2. ; |
d15a28e7 | 404 | sprintf(nodename, "%s%d", "GapDown", i) ; |
92862013 | 405 | TNode * gapdownnode = new TNode(nodename, nodename, "MToLead", 0, y, 0) ; |
406 | gapdownnode->SetLineColor(kColorAir) ; | |
407 | fNodes->Add(gapdownnode) ; | |
d15a28e7 | 408 | // 5. fNumberOfModulesPhi x fNumberOfModulesZ bottom micromegas |
bacd0b23 | 409 | x = ( fGeom->GetCPVBoxSize(0) - fGeom->GetPPSDModuleSize(0) ) / 2. - fGeom->GetPhiDisplacement() ; |
31aa6d6c | 410 | { |
411 | for ( Int_t iphi = 1; iphi <= fGeom->GetNumberOfModulesPhi(); iphi++ ) { | |
bacd0b23 | 412 | Float_t z = ( fGeom->GetCPVBoxSize(2) - fGeom->GetPPSDModuleSize(2) ) / 2. - fGeom->GetZDisplacement() ;; |
31aa6d6c | 413 | TNode * micro2node ; |
414 | for ( Int_t iz = 1; iz <= fGeom->GetNumberOfModulesZ(); iz++ ) { | |
bacd0b23 | 415 | y = - ( fGeom->GetCPVBoxSize(1) - fGeom->GetMicromegas2Thickness() ) / 2. ; |
31aa6d6c | 416 | sprintf(nodename, "%s%d%d%d", "Mic2", i, iphi, iz) ; |
417 | micro2node = new TNode(nodename, nodename, "PPSDModule", x, y, z) ; | |
418 | micro2node->SetLineColor(kColorPPSD) ; | |
419 | fNodes->Add(micro2node) ; | |
420 | // inside bottom micromegas | |
421 | micro2node->cd() ; | |
d15a28e7 | 422 | // a. top lid |
92862013 | 423 | y = ( fGeom->GetMicromegas2Thickness() - fGeom->GetLidThickness() ) / 2. ; |
d15a28e7 | 424 | sprintf(nodename, "%s%d", "Lidb", i) ; |
92862013 | 425 | TNode * toplidbnode = new TNode(nodename, nodename, "TopLid", 0, y, 0) ; |
426 | toplidbnode->SetLineColor(kColorPPSD) ; | |
427 | fNodes->Add(toplidbnode) ; | |
d15a28e7 | 428 | // b. composite panel |
92862013 | 429 | y = y - fGeom->GetLidThickness() / 2. - fGeom->GetCompositeThickness() / 2. ; |
d15a28e7 | 430 | sprintf(nodename, "%s%d", "CompUb", i) ; |
92862013 | 431 | TNode * compupbnode = new TNode(nodename, nodename, "TopPanel", 0, y, 0) ; |
432 | compupbnode->SetLineColor(kColorPPSD) ; | |
433 | fNodes->Add(compupbnode) ; | |
d15a28e7 | 434 | // c. anode |
92862013 | 435 | y = y - fGeom->GetCompositeThickness() / 2. - fGeom->GetAnodeThickness() / 2. ; |
d15a28e7 | 436 | sprintf(nodename, "%s%d", "Anob", i) ; |
92862013 | 437 | TNode * anodebnode = new TNode(nodename, nodename, "Anode", 0, y, 0) ; |
438 | anodebnode->SetLineColor(kColorPPSD) ; | |
439 | fNodes->Add(anodebnode) ; | |
d15a28e7 | 440 | // d. conversion gas |
92862013 | 441 | y = y - fGeom->GetAnodeThickness() / 2. - ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() ) / 2. ; |
d15a28e7 | 442 | sprintf(nodename, "%s%d", "GGapb", i) ; |
92862013 | 443 | TNode * ggapbnode = new TNode(nodename, nodename, "GasGap", 0, y, 0) ; |
444 | ggapbnode->SetLineColor(kColorGas) ; | |
445 | fNodes->Add(ggapbnode) ; | |
d15a28e7 | 446 | // f. cathode |
92862013 | 447 | y = y - ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() ) / 2. - fGeom->GetCathodeThickness() / 2. ; |
d15a28e7 | 448 | sprintf(nodename, "%s%d", "Cathodeb", i) ; |
92862013 | 449 | TNode * cathodebnode = new TNode(nodename, nodename, "Cathode", 0, y, 0) ; |
450 | cathodebnode->SetLineColor(kColorPPSD) ; | |
451 | fNodes->Add(cathodebnode) ; | |
d15a28e7 | 452 | // g. printed circuit |
92862013 | 453 | y = y - fGeom->GetCathodeThickness() / 2. - fGeom->GetPCThickness() / 2. ; |
d15a28e7 | 454 | sprintf(nodename, "%s%d", "PCb", i) ; |
92862013 | 455 | TNode * pcbnode = new TNode(nodename, nodename, "PCBoard", 0, y, 0) ; |
456 | pcbnode->SetLineColor(kColorPPSD) ; | |
457 | fNodes->Add(pcbnode) ; | |
d15a28e7 | 458 | // h. composite pane |
92862013 | 459 | y = y - fGeom->GetPCThickness() / 2. - fGeom->GetCompositeThickness() / 2. ; |
d15a28e7 | 460 | sprintf(nodename, "%s%d", "CompDownb", i) ; |
92862013 | 461 | TNode * compdownbnode = new TNode(nodename, nodename, "BottomPanel", 0, y, 0) ; |
462 | compdownbnode->SetLineColor(kColorPPSD) ; | |
463 | fNodes->Add(compdownbnode) ; | |
464 | z = z - fGeom->GetPPSDModuleSize(2) ; | |
465 | ppsdboxnode->cd() ; | |
d15a28e7 | 466 | } // end of Z module loop |
92862013 | 467 | x = x - fGeom->GetPPSDModuleSize(0) ; |
468 | ppsdboxnode->cd() ; | |
31aa6d6c | 469 | } // end of phi module loop |
470 | } | |
471 | } // PHOS modules | |
472 | ||
e126816e | 473 | delete[] rotname ; |
474 | delete[] nodename ; | |
31aa6d6c | 475 | |
fe4da5cc | 476 | } |
477 | ||
bacd0b23 | 478 | //____________________________________________________________________________ |
479 | void AliPHOSv0:: BuildGeometryforCPV(void) | |
480 | { | |
481 | // Build the PHOS-CPV geometry for the ROOT display | |
482 | // Author: Yuri Kharlov 11 September 2000 | |
483 | // | |
484 | //BEGIN_HTML | |
485 | /* | |
486 | <H2> | |
487 | CPV displayed by root | |
488 | </H2> | |
489 | <table width=700> | |
490 | ||
491 | <tr> | |
492 | <td>CPV perspective view</td> | |
493 | <td>CPV front view </td> | |
494 | </tr> | |
495 | ||
496 | <tr> | |
497 | <td> <img height=300 width=290 src="../images/CPVRootPersp.gif"> </td> | |
498 | <td> <img height=300 width=290 src="../images/CPVRootFront.gif"> </td> | |
499 | </tr> | |
500 | ||
501 | </table> | |
502 | ||
503 | */ | |
504 | //END_HTML | |
505 | ||
506 | const Double_t kRADDEG = 180.0 / kPI ; | |
507 | const Int_t kColorCPV = kGreen ; | |
508 | const Int_t kColorFrame = kYellow ; | |
509 | const Int_t kColorGassiplex = kRed; | |
510 | const Int_t kColorPCB = kCyan; | |
511 | ||
512 | // Box for a full PHOS module | |
513 | ||
514 | new TBRIK ("CPVBox", "CPV box", "void", fGeom->GetCPVBoxSize(0)/2, | |
515 | fGeom->GetCPVBoxSize(1)/2, | |
516 | fGeom->GetCPVBoxSize(2)/2 ); | |
517 | new TBRIK ("CPVFrameLR", "CPV frame Left-Right", "void", fGeom->GetCPVFrameSize(0)/2, | |
518 | fGeom->GetCPVFrameSize(1)/2, | |
519 | fGeom->GetCPVBoxSize(2)/2 ); | |
520 | new TBRIK ("CPVFrameUD", "CPV frame Up-Down", "void", fGeom->GetCPVBoxSize(0)/2 - fGeom->GetCPVFrameSize(0), | |
521 | fGeom->GetCPVFrameSize(1)/2, | |
522 | fGeom->GetCPVFrameSize(2)/2); | |
523 | new TBRIK ("CPVPCB", "CPV PCB", "void", fGeom->GetCPVActiveSize(0)/2, | |
524 | fGeom->GetCPVTextoliteThickness()/2, | |
525 | fGeom->GetCPVActiveSize(1)/2); | |
526 | new TBRIK ("CPVGassiplex", "CPV Gassiplex PCB", "void", fGeom->GetGassiplexChipSize(0)/2, | |
527 | fGeom->GetGassiplexChipSize(1)/2, | |
528 | fGeom->GetGassiplexChipSize(2)/2); | |
529 | ||
530 | // position CPV into ALICE | |
531 | ||
532 | char * nodename = new char[25] ; | |
533 | char * rotname = new char[25] ; | |
534 | ||
535 | Float_t r = fGeom->GetIPtoCPVDistance() + fGeom->GetCPVBoxSize(1) / 2.0 ; | |
536 | Int_t number = 988 ; | |
537 | TNode * top = gAlice->GetGeometry()->GetNode("alice") ; | |
538 | for( Int_t i = 1; i <= fGeom->GetNModules(); i++ ) { // the number of PHOS modules | |
539 | ||
540 | // One CPV module | |
541 | ||
542 | Float_t angle = fGeom->GetPHOSAngle(i) ; | |
543 | sprintf(rotname, "%s%d", "rotg", number++) ; | |
544 | new TRotMatrix(rotname, rotname, 90, angle, 90, 90 + angle, 0, 0); | |
545 | top->cd(); | |
546 | sprintf(nodename, "%s%d", "CPVModule", i) ; | |
547 | Float_t x = r * TMath::Sin( angle / kRADDEG ) ; | |
548 | Float_t y = -r * TMath::Cos( angle / kRADDEG ) ; | |
549 | Float_t z; | |
550 | TNode * cpvBoxNode = new TNode(nodename , nodename ,"CPVBox", x, y, 0, rotname ) ; | |
551 | cpvBoxNode->SetLineColor(kColorCPV) ; | |
552 | fNodes->Add(cpvBoxNode) ; | |
553 | cpvBoxNode->cd() ; | |
554 | ||
555 | // inside each CPV box: | |
556 | ||
557 | // Frame around CPV | |
558 | for (Int_t j=0; j<=1; j++) { | |
559 | sprintf(nodename, "CPVModule%d Frame%d", i, j+1) ; | |
560 | x = TMath::Sign(1,2*j-1) * (fGeom->GetCPVBoxSize(0) - fGeom->GetCPVFrameSize(0)) / 2; | |
561 | TNode * cpvFrameNode = new TNode(nodename , nodename ,"CPVFrameLR", x, 0, 0) ; | |
562 | cpvFrameNode->SetLineColor(kColorFrame) ; | |
563 | fNodes->Add(cpvFrameNode) ; | |
564 | ||
565 | sprintf(nodename, "CPVModule%d Frame%d", i, j+3) ; | |
566 | z = TMath::Sign(1,2*j-1) * (fGeom->GetCPVBoxSize(2) - fGeom->GetCPVFrameSize(2)) / 2; | |
567 | cpvFrameNode = new TNode(nodename , nodename ,"CPVFrameUD", 0, 0, z) ; | |
568 | cpvFrameNode->SetLineColor(kColorFrame) ; | |
569 | fNodes->Add(cpvFrameNode) ; | |
570 | } | |
571 | ||
572 | // 4 printed circuit boards | |
573 | for (Int_t j=0; j<4; j++) { | |
574 | sprintf(nodename, "CPVModule%d PCB%d", i, j+1) ; | |
575 | y = fGeom->GetCPVFrameSize(1) / 2 - fGeom->GetFTPosition(j) + fGeom->GetCPVTextoliteThickness()/2; | |
576 | TNode * cpvPCBNode = new TNode(nodename , nodename ,"CPVPCB", 0, y, 0) ; | |
577 | cpvPCBNode->SetLineColor(kColorPCB) ; | |
578 | fNodes->Add(cpvPCBNode) ; | |
579 | } | |
580 | ||
581 | // Gassiplex chips | |
582 | Float_t xStep = fGeom->GetCPVActiveSize(0) / (fGeom->GetNumberOfCPVChipsPhi() + 1); | |
583 | Float_t zStep = fGeom->GetCPVActiveSize(1) / (fGeom->GetNumberOfCPVChipsZ() + 1); | |
584 | y = fGeom->GetCPVFrameSize(1)/2 - fGeom->GetFTPosition(0) + | |
585 | fGeom->GetCPVTextoliteThickness() / 2 + fGeom->GetGassiplexChipSize(1) / 2 + 0.1; | |
586 | for (Int_t ix=0; ix<fGeom->GetNumberOfCPVChipsPhi(); ix++) { | |
587 | x = xStep * (ix+1) - fGeom->GetCPVActiveSize(0)/2; | |
588 | for (Int_t iz=0; iz<fGeom->GetNumberOfCPVChipsZ(); iz++) { | |
589 | z = zStep * (iz+1) - fGeom->GetCPVActiveSize(1)/2; | |
590 | sprintf(nodename, "CPVModule%d Chip(%dx%d)", i, ix+1,iz+1) ; | |
591 | TNode * cpvGassiplexNode = new TNode(nodename , nodename ,"CPVGassiplex", x, y, z) ; | |
592 | cpvGassiplexNode->SetLineColor(kColorGassiplex) ; | |
593 | fNodes->Add(cpvGassiplexNode) ; | |
594 | } | |
595 | } | |
596 | ||
597 | } // PHOS modules | |
598 | ||
599 | delete[] rotname ; | |
600 | delete[] nodename ; | |
601 | } | |
602 | ||
d15a28e7 | 603 | //____________________________________________________________________________ |
fe4da5cc | 604 | void AliPHOSv0::CreateGeometry() |
605 | { | |
b2a60966 | 606 | // Create the PHOS geometry for Geant |
d15a28e7 | 607 | |
92862013 | 608 | AliPHOSv0 *phostmp = (AliPHOSv0*)gAlice->GetModule("PHOS") ; |
d15a28e7 | 609 | |
92862013 | 610 | if ( phostmp == NULL ) { |
d15a28e7 | 611 | |
612 | fprintf(stderr, "PHOS detector not found!\n") ; | |
613 | return; | |
fe4da5cc | 614 | |
d15a28e7 | 615 | } |
d15a28e7 | 616 | // Get pointer to the array containing media indeces |
92862013 | 617 | Int_t *idtmed = fIdtmed->GetArray() - 699 ; |
d15a28e7 | 618 | |
92862013 | 619 | Float_t bigbox[3] ; |
620 | bigbox[0] = fGeom->GetOuterBoxSize(0) / 2.0 ; | |
bacd0b23 | 621 | bigbox[1] = ( fGeom->GetOuterBoxSize(1) + fGeom->GetCPVBoxSize(1) ) / 2.0 ; |
92862013 | 622 | bigbox[2] = fGeom->GetOuterBoxSize(2) / 2.0 ; |
d15a28e7 | 623 | |
92862013 | 624 | gMC->Gsvolu("PHOS", "BOX ", idtmed[798], bigbox, 3) ; |
d15a28e7 | 625 | |
626 | this->CreateGeometryforPHOS() ; | |
bacd0b23 | 627 | if ( strcmp( fGeom->GetName(), "GPS2") == 0 ) |
d15a28e7 | 628 | this->CreateGeometryforPPSD() ; |
bacd0b23 | 629 | else if ( strcmp( fGeom->GetName(), "IHEP") == 0 ) |
630 | this->CreateGeometryforCPV() ; | |
d15a28e7 | 631 | else |
632 | cout << "AliPHOSv0::CreateGeometry : no charged particle identification system installed" << endl; | |
633 | ||
634 | // --- Position PHOS mdules in ALICE setup --- | |
635 | ||
92862013 | 636 | Int_t idrotm[99] ; |
637 | Double_t const kRADDEG = 180.0 / kPI ; | |
d15a28e7 | 638 | |
639 | for( Int_t i = 1; i <= fGeom->GetNModules(); i++ ) { | |
640 | ||
641 | Float_t angle = fGeom->GetPHOSAngle(i) ; | |
92862013 | 642 | AliMatrix(idrotm[i-1], 90.0, angle, 90.0, 90.0+angle, 0.0, 0.0) ; |
d15a28e7 | 643 | |
bacd0b23 | 644 | Float_t r = fGeom->GetIPtoOuterCoverDistance() + ( fGeom->GetOuterBoxSize(1) + fGeom->GetCPVBoxSize(1) ) / 2.0 ; |
d15a28e7 | 645 | |
92862013 | 646 | Float_t xP1 = r * TMath::Sin( angle / kRADDEG ) ; |
647 | Float_t yP1 = -r * TMath::Cos( angle / kRADDEG ) ; | |
d15a28e7 | 648 | |
92862013 | 649 | gMC->Gspos("PHOS", i, "ALIC", xP1, yP1, 0.0, idrotm[i-1], "ONLY") ; |
d15a28e7 | 650 | |
651 | } // for GetNModules | |
652 | ||
fe4da5cc | 653 | } |
d15a28e7 | 654 | |
655 | //____________________________________________________________________________ | |
656 | void AliPHOSv0::CreateGeometryforPHOS() | |
657 | { | |
b2a60966 | 658 | // Create the PHOS-EMC geometry for GEANT |
659 | //BEGIN_HTML | |
660 | /* | |
661 | <H2> | |
662 | Geant3 geometry tree of PHOS-EMC in ALICE | |
663 | </H2> | |
664 | <P><CENTER> | |
665 | <IMG Align=BOTTOM ALT="EMC geant tree" SRC="../images/EMCinAlice.gif"> | |
666 | </CENTER><P> | |
667 | */ | |
668 | //END_HTML | |
669 | ||
670 | // Get pointer to the array containing media indexes | |
92862013 | 671 | Int_t *idtmed = fIdtmed->GetArray() - 699 ; |
d15a28e7 | 672 | |
673 | // --- | |
674 | // --- Define PHOS box volume, fPUFPill with thermo insulating foam --- | |
675 | // --- Foam Thermo Insulating outer cover dimensions --- | |
92862013 | 676 | // --- Put it in bigbox = PHOS |
d15a28e7 | 677 | |
92862013 | 678 | Float_t dphos[3] ; |
679 | dphos[0] = fGeom->GetOuterBoxSize(0) / 2.0 ; | |
680 | dphos[1] = fGeom->GetOuterBoxSize(1) / 2.0 ; | |
681 | dphos[2] = fGeom->GetOuterBoxSize(2) / 2.0 ; | |
d15a28e7 | 682 | |
92862013 | 683 | gMC->Gsvolu("EMCA", "BOX ", idtmed[706], dphos, 3) ; |
d15a28e7 | 684 | |
bacd0b23 | 685 | Float_t yO = - fGeom->GetCPVBoxSize(1) / 2.0 ; |
d15a28e7 | 686 | |
92862013 | 687 | gMC->Gspos("EMCA", 1, "PHOS", 0.0, yO, 0.0, 0, "ONLY") ; |
d15a28e7 | 688 | |
689 | // --- | |
690 | // --- Define Textolit Wall box, position inside EMCA --- | |
691 | // --- Textolit Wall box dimentions --- | |
692 | ||
693 | ||
92862013 | 694 | Float_t dptxw[3]; |
695 | dptxw[0] = fGeom->GetTextolitBoxSize(0) / 2.0 ; | |
696 | dptxw[1] = fGeom->GetTextolitBoxSize(1) / 2.0 ; | |
697 | dptxw[2] = fGeom->GetTextolitBoxSize(2) / 2.0 ; | |
d15a28e7 | 698 | |
92862013 | 699 | gMC->Gsvolu("PTXW", "BOX ", idtmed[707], dptxw, 3); |
d15a28e7 | 700 | |
92862013 | 701 | yO = ( fGeom->GetOuterBoxThickness(1) - fGeom->GetUpperPlateThickness() ) / 2. ; |
d15a28e7 | 702 | |
92862013 | 703 | gMC->Gspos("PTXW", 1, "EMCA", 0.0, yO, 0.0, 0, "ONLY") ; |
d15a28e7 | 704 | |
705 | // --- | |
706 | // --- Define Upper Polystyrene Foam Plate, place inside PTXW --- | |
707 | // --- immediately below Foam Thermo Insulation Upper plate --- | |
708 | ||
709 | // --- Upper Polystyrene Foam plate thickness --- | |
710 | ||
92862013 | 711 | Float_t dpufp[3] ; |
712 | dpufp[0] = fGeom->GetTextolitBoxSize(0) / 2.0 ; | |
713 | dpufp[1] = fGeom->GetSecondUpperPlateThickness() / 2. ; | |
714 | dpufp[2] = fGeom->GetTextolitBoxSize(2) /2.0 ; | |
d15a28e7 | 715 | |
92862013 | 716 | gMC->Gsvolu("PUFP", "BOX ", idtmed[703], dpufp, 3) ; |
d15a28e7 | 717 | |
92862013 | 718 | yO = ( fGeom->GetTextolitBoxSize(1) - fGeom->GetSecondUpperPlateThickness() ) / 2.0 ; |
d15a28e7 | 719 | |
92862013 | 720 | gMC->Gspos("PUFP", 1, "PTXW", 0.0, yO, 0.0, 0, "ONLY") ; |
d15a28e7 | 721 | |
722 | // --- | |
723 | // --- Define air-filled box, place inside PTXW --- | |
724 | // --- Inner AIR volume dimensions --- | |
fe4da5cc | 725 | |
d15a28e7 | 726 | |
92862013 | 727 | Float_t dpair[3] ; |
728 | dpair[0] = fGeom->GetAirFilledBoxSize(0) / 2.0 ; | |
729 | dpair[1] = fGeom->GetAirFilledBoxSize(1) / 2.0 ; | |
730 | dpair[2] = fGeom->GetAirFilledBoxSize(2) / 2.0 ; | |
d15a28e7 | 731 | |
92862013 | 732 | gMC->Gsvolu("PAIR", "BOX ", idtmed[798], dpair, 3) ; |
d15a28e7 | 733 | |
92862013 | 734 | yO = ( fGeom->GetTextolitBoxSize(1) - fGeom->GetAirFilledBoxSize(1) ) / 2.0 - fGeom->GetSecondUpperPlateThickness() ; |
d15a28e7 | 735 | |
92862013 | 736 | gMC->Gspos("PAIR", 1, "PTXW", 0.0, yO, 0.0, 0, "ONLY") ; |
d15a28e7 | 737 | |
738 | // --- Dimensions of PbWO4 crystal --- | |
739 | ||
92862013 | 740 | Float_t xtlX = fGeom->GetCrystalSize(0) ; |
741 | Float_t xtlY = fGeom->GetCrystalSize(1) ; | |
742 | Float_t xtlZ = fGeom->GetCrystalSize(2) ; | |
d15a28e7 | 743 | |
92862013 | 744 | Float_t dptcb[3] ; |
745 | dptcb[0] = fGeom->GetNPhi() * ( xtlX + 2 * fGeom->GetGapBetweenCrystals() ) / 2.0 + fGeom->GetModuleBoxThickness() ; | |
746 | dptcb[1] = ( xtlY + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() + fGeom->GetCrystalHolderThickness() ) / 2.0 | |
d15a28e7 | 747 | + fGeom->GetModuleBoxThickness() / 2.0 ; |
92862013 | 748 | dptcb[2] = fGeom->GetNZ() * ( xtlZ + 2 * fGeom->GetGapBetweenCrystals() ) / 2.0 + fGeom->GetModuleBoxThickness() ; |
d15a28e7 | 749 | |
92862013 | 750 | gMC->Gsvolu("PTCB", "BOX ", idtmed[706], dptcb, 3) ; |
d15a28e7 | 751 | |
92862013 | 752 | yO = fGeom->GetAirFilledBoxSize(1) / 2.0 - dptcb[1] |
d15a28e7 | 753 | - ( fGeom->GetIPtoCrystalSurface() - fGeom->GetIPtoOuterCoverDistance() - fGeom->GetModuleBoxThickness() |
754 | - fGeom->GetUpperPlateThickness() - fGeom->GetSecondUpperPlateThickness() ) ; | |
755 | ||
92862013 | 756 | gMC->Gspos("PTCB", 1, "PAIR", 0.0, yO, 0.0, 0, "ONLY") ; |
d15a28e7 | 757 | |
758 | // --- | |
759 | // --- Define Crystal BLock filled with air, position it inside PTCB --- | |
92862013 | 760 | Float_t dpcbl[3] ; |
d15a28e7 | 761 | |
92862013 | 762 | dpcbl[0] = fGeom->GetNPhi() * ( xtlX + 2 * fGeom->GetGapBetweenCrystals() ) / 2.0 ; |
763 | dpcbl[1] = ( xtlY + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() + fGeom->GetCrystalHolderThickness() ) / 2.0 ; | |
764 | dpcbl[2] = fGeom->GetNZ() * ( xtlZ + 2 * fGeom->GetGapBetweenCrystals() ) / 2.0 ; | |
d15a28e7 | 765 | |
92862013 | 766 | gMC->Gsvolu("PCBL", "BOX ", idtmed[798], dpcbl, 3) ; |
d15a28e7 | 767 | |
768 | // --- Divide PCBL in X (phi) and Z directions -- | |
769 | gMC->Gsdvn("PROW", "PCBL", Int_t (fGeom->GetNPhi()), 1) ; | |
770 | gMC->Gsdvn("PCEL", "PROW", Int_t (fGeom->GetNZ()), 3) ; | |
771 | ||
92862013 | 772 | yO = -fGeom->GetModuleBoxThickness() / 2.0 ; |
d15a28e7 | 773 | |
92862013 | 774 | gMC->Gspos("PCBL", 1, "PTCB", 0.0, yO, 0.0, 0, "ONLY") ; |
d15a28e7 | 775 | |
776 | // --- | |
777 | // --- Define STeel (actually, it's titanium) Cover volume, place inside PCEL | |
92862013 | 778 | Float_t dpstc[3] ; |
d15a28e7 | 779 | |
92862013 | 780 | dpstc[0] = ( xtlX + 2 * fGeom->GetCrystalWrapThickness() ) / 2.0 ; |
781 | dpstc[1] = ( xtlY + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() + fGeom->GetCrystalHolderThickness() ) / 2.0 ; | |
782 | dpstc[2] = ( xtlZ + 2 * fGeom->GetCrystalWrapThickness() + 2 * fGeom->GetCrystalHolderThickness() ) / 2.0 ; | |
d15a28e7 | 783 | |
92862013 | 784 | gMC->Gsvolu("PSTC", "BOX ", idtmed[704], dpstc, 3) ; |
d15a28e7 | 785 | |
786 | gMC->Gspos("PSTC", 1, "PCEL", 0.0, 0.0, 0.0, 0, "ONLY") ; | |
787 | ||
788 | // --- | |
789 | // --- Define Tyvek volume, place inside PSTC --- | |
92862013 | 790 | Float_t dppap[3] ; |
d15a28e7 | 791 | |
92862013 | 792 | dppap[0] = xtlX / 2.0 + fGeom->GetCrystalWrapThickness() ; |
793 | dppap[1] = ( xtlY + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() ) / 2.0 ; | |
794 | dppap[2] = xtlZ / 2.0 + fGeom->GetCrystalWrapThickness() ; | |
d15a28e7 | 795 | |
92862013 | 796 | gMC->Gsvolu("PPAP", "BOX ", idtmed[702], dppap, 3) ; |
d15a28e7 | 797 | |
92862013 | 798 | yO = ( xtlY + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() ) / 2.0 |
799 | - ( xtlY + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() + fGeom->GetCrystalHolderThickness() ) / 2.0 ; | |
d15a28e7 | 800 | |
92862013 | 801 | gMC->Gspos("PPAP", 1, "PSTC", 0.0, yO, 0.0, 0, "ONLY") ; |
d15a28e7 | 802 | |
803 | // --- | |
804 | // --- Define PbWO4 crystal volume, place inside PPAP --- | |
92862013 | 805 | Float_t dpxtl[3] ; |
d15a28e7 | 806 | |
92862013 | 807 | dpxtl[0] = xtlX / 2.0 ; |
808 | dpxtl[1] = xtlY / 2.0 ; | |
809 | dpxtl[2] = xtlZ / 2.0 ; | |
d15a28e7 | 810 | |
92862013 | 811 | gMC->Gsvolu("PXTL", "BOX ", idtmed[699], dpxtl, 3) ; |
d15a28e7 | 812 | |
92862013 | 813 | yO = ( xtlY + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() ) / 2.0 - xtlY / 2.0 - fGeom->GetCrystalWrapThickness() ; |
d15a28e7 | 814 | |
92862013 | 815 | gMC->Gspos("PXTL", 1, "PPAP", 0.0, yO, 0.0, 0, "ONLY") ; |
d15a28e7 | 816 | |
817 | // --- | |
818 | // --- Define crystal support volume, place inside PPAP --- | |
92862013 | 819 | Float_t dpsup[3] ; |
d15a28e7 | 820 | |
92862013 | 821 | dpsup[0] = xtlX / 2.0 + fGeom->GetCrystalWrapThickness() ; |
822 | dpsup[1] = fGeom->GetCrystalSupportHeight() / 2.0 ; | |
823 | dpsup[2] = xtlZ / 2.0 + fGeom->GetCrystalWrapThickness() ; | |
d15a28e7 | 824 | |
92862013 | 825 | gMC->Gsvolu("PSUP", "BOX ", idtmed[798], dpsup, 3) ; |
d15a28e7 | 826 | |
92862013 | 827 | yO = fGeom->GetCrystalSupportHeight() / 2.0 - ( xtlY + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() ) / 2.0 ; |
d15a28e7 | 828 | |
92862013 | 829 | gMC->Gspos("PSUP", 1, "PPAP", 0.0, yO, 0.0, 0, "ONLY") ; |
d15a28e7 | 830 | |
831 | // --- | |
832 | // --- Define PIN-diode volume and position it inside crystal support --- | |
833 | // --- right behind PbWO4 crystal | |
834 | ||
835 | // --- PIN-diode dimensions --- | |
836 | ||
837 | ||
92862013 | 838 | Float_t dppin[3] ; |
839 | dppin[0] = fGeom->GetPinDiodeSize(0) / 2.0 ; | |
840 | dppin[1] = fGeom->GetPinDiodeSize(1) / 2.0 ; | |
841 | dppin[2] = fGeom->GetPinDiodeSize(2) / 2.0 ; | |
d15a28e7 | 842 | |
92862013 | 843 | gMC->Gsvolu("PPIN", "BOX ", idtmed[705], dppin, 3) ; |
d15a28e7 | 844 | |
92862013 | 845 | yO = fGeom->GetCrystalSupportHeight() / 2.0 - fGeom->GetPinDiodeSize(1) / 2.0 ; |
d15a28e7 | 846 | |
92862013 | 847 | gMC->Gspos("PPIN", 1, "PSUP", 0.0, yO, 0.0, 0, "ONLY") ; |
d15a28e7 | 848 | |
849 | // --- | |
850 | // --- Define Upper Cooling Panel, place it on top of PTCB --- | |
92862013 | 851 | Float_t dpucp[3] ; |
d15a28e7 | 852 | // --- Upper Cooling Plate thickness --- |
853 | ||
92862013 | 854 | dpucp[0] = dptcb[0] ; |
855 | dpucp[1] = fGeom->GetUpperCoolingPlateThickness() ; | |
856 | dpucp[2] = dptcb[2] ; | |
d15a28e7 | 857 | |
92862013 | 858 | gMC->Gsvolu("PUCP", "BOX ", idtmed[701], dpucp,3) ; |
d15a28e7 | 859 | |
92862013 | 860 | yO = ( fGeom->GetAirFilledBoxSize(1) - fGeom->GetUpperCoolingPlateThickness() ) / 2. |
d15a28e7 | 861 | - ( fGeom->GetIPtoCrystalSurface() - fGeom->GetIPtoOuterCoverDistance() - fGeom->GetModuleBoxThickness() |
862 | - fGeom->GetUpperPlateThickness() - fGeom->GetSecondUpperPlateThickness() - fGeom->GetUpperCoolingPlateThickness() ) ; | |
863 | ||
92862013 | 864 | gMC->Gspos("PUCP", 1, "PAIR", 0.0, yO, 0.0, 0, "ONLY") ; |
d15a28e7 | 865 | |
866 | // --- | |
867 | // --- Define Al Support Plate, position it inside PAIR --- | |
868 | // --- right beneath PTCB --- | |
869 | // --- Al Support Plate thickness --- | |
870 | ||
92862013 | 871 | Float_t dpasp[3] ; |
872 | dpasp[0] = fGeom->GetAirFilledBoxSize(0) / 2.0 ; | |
873 | dpasp[1] = fGeom->GetSupportPlateThickness() / 2.0 ; | |
874 | dpasp[2] = fGeom->GetAirFilledBoxSize(2) / 2.0 ; | |
d15a28e7 | 875 | |
92862013 | 876 | gMC->Gsvolu("PASP", "BOX ", idtmed[701], dpasp, 3) ; |
d15a28e7 | 877 | |
92862013 | 878 | yO = ( fGeom->GetAirFilledBoxSize(1) - fGeom->GetSupportPlateThickness() ) / 2. |
d15a28e7 | 879 | - ( fGeom->GetIPtoCrystalSurface() - fGeom->GetIPtoOuterCoverDistance() |
92862013 | 880 | - fGeom->GetUpperPlateThickness() - fGeom->GetSecondUpperPlateThickness() + dpcbl[1] * 2 ) ; |
d15a28e7 | 881 | |
92862013 | 882 | gMC->Gspos("PASP", 1, "PAIR", 0.0, yO, 0.0, 0, "ONLY") ; |
d15a28e7 | 883 | |
884 | // --- | |
885 | // --- Define Thermo Insulating Plate, position it inside PAIR --- | |
886 | // --- right beneath PASP --- | |
887 | // --- Lower Thermo Insulating Plate thickness --- | |
888 | ||
92862013 | 889 | Float_t dptip[3] ; |
890 | dptip[0] = fGeom->GetAirFilledBoxSize(0) / 2.0 ; | |
891 | dptip[1] = fGeom->GetLowerThermoPlateThickness() / 2.0 ; | |
892 | dptip[2] = fGeom->GetAirFilledBoxSize(2) / 2.0 ; | |
d15a28e7 | 893 | |
92862013 | 894 | gMC->Gsvolu("PTIP", "BOX ", idtmed[706], dptip, 3) ; |
d15a28e7 | 895 | |
92862013 | 896 | yO = ( fGeom->GetAirFilledBoxSize(1) - fGeom->GetLowerThermoPlateThickness() ) / 2. |
d15a28e7 | 897 | - ( fGeom->GetIPtoCrystalSurface() - fGeom->GetIPtoOuterCoverDistance() - fGeom->GetUpperPlateThickness() |
92862013 | 898 | - fGeom->GetSecondUpperPlateThickness() + dpcbl[1] * 2 + fGeom->GetSupportPlateThickness() ) ; |
d15a28e7 | 899 | |
92862013 | 900 | gMC->Gspos("PTIP", 1, "PAIR", 0.0, yO, 0.0, 0, "ONLY") ; |
d15a28e7 | 901 | |
902 | // --- | |
903 | // --- Define Textolit Plate, position it inside PAIR --- | |
904 | // --- right beneath PTIP --- | |
905 | // --- Lower Textolit Plate thickness --- | |
906 | ||
92862013 | 907 | Float_t dptxp[3] ; |
908 | dptxp[0] = fGeom->GetAirFilledBoxSize(0) / 2.0 ; | |
909 | dptxp[1] = fGeom->GetLowerTextolitPlateThickness() / 2.0 ; | |
910 | dptxp[2] = fGeom->GetAirFilledBoxSize(2) / 2.0 ; | |
d15a28e7 | 911 | |
92862013 | 912 | gMC->Gsvolu("PTXP", "BOX ", idtmed[707], dptxp, 3) ; |
d15a28e7 | 913 | |
92862013 | 914 | yO = ( fGeom->GetAirFilledBoxSize(1) - fGeom->GetLowerTextolitPlateThickness() ) / 2. |
d15a28e7 | 915 | - ( fGeom->GetIPtoCrystalSurface() - fGeom->GetIPtoOuterCoverDistance() - fGeom->GetUpperPlateThickness() |
92862013 | 916 | - fGeom->GetSecondUpperPlateThickness() + dpcbl[1] * 2 + fGeom->GetSupportPlateThickness() |
d15a28e7 | 917 | + fGeom->GetLowerThermoPlateThickness() ) ; |
918 | ||
92862013 | 919 | gMC->Gspos("PTXP", 1, "PAIR", 0.0, yO, 0.0, 0, "ONLY") ; |
d15a28e7 | 920 | |
921 | } | |
922 | ||
923 | //____________________________________________________________________________ | |
924 | void AliPHOSv0::CreateGeometryforPPSD() | |
fe4da5cc | 925 | { |
b2a60966 | 926 | // Create the PHOS-PPSD geometry for GEANT |
b2a60966 | 927 | //BEGIN_HTML |
928 | /* | |
929 | <H2> | |
930 | Geant3 geometry tree of PHOS-PPSD in ALICE | |
931 | </H2> | |
932 | <P><CENTER> | |
933 | <IMG Align=BOTTOM ALT="PPSD geant tree" SRC="../images/PPSDinAlice.gif"> | |
934 | </CENTER><P> | |
935 | */ | |
936 | //END_HTML | |
937 | ||
938 | // Get pointer to the array containing media indexes | |
92862013 | 939 | Int_t *idtmed = fIdtmed->GetArray() - 699 ; |
d15a28e7 | 940 | |
92862013 | 941 | // The box containing all ppsd's for one PHOS module filled with air |
942 | Float_t ppsd[3] ; | |
bacd0b23 | 943 | ppsd[0] = fGeom->GetCPVBoxSize(0) / 2.0 ; |
944 | ppsd[1] = fGeom->GetCPVBoxSize(1) / 2.0 ; | |
945 | ppsd[2] = fGeom->GetCPVBoxSize(2) / 2.0 ; | |
fe4da5cc | 946 | |
92862013 | 947 | gMC->Gsvolu("PPSD", "BOX ", idtmed[798], ppsd, 3) ; |
d15a28e7 | 948 | |
92862013 | 949 | Float_t yO = fGeom->GetOuterBoxSize(1) / 2.0 ; |
d15a28e7 | 950 | |
92862013 | 951 | gMC->Gspos("PPSD", 1, "PHOS", 0.0, yO, 0.0, 0, "ONLY") ; |
d15a28e7 | 952 | |
953 | // Now we build a micromegas module | |
954 | // The box containing the whole module filled with epoxy (FR4) | |
955 | ||
92862013 | 956 | Float_t mppsd[3] ; |
957 | mppsd[0] = fGeom->GetPPSDModuleSize(0) / 2.0 ; | |
958 | mppsd[1] = fGeom->GetPPSDModuleSize(1) / 2.0 ; | |
959 | mppsd[2] = fGeom->GetPPSDModuleSize(2) / 2.0 ; | |
d15a28e7 | 960 | |
92862013 | 961 | gMC->Gsvolu("MPPS", "BOX ", idtmed[708], mppsd, 3) ; |
d15a28e7 | 962 | |
92862013 | 963 | // Inside mppsd : |
d15a28e7 | 964 | // 1. The Top Lid made of epoxy (FR4) |
965 | ||
92862013 | 966 | Float_t tlppsd[3] ; |
967 | tlppsd[0] = fGeom->GetPPSDModuleSize(0) / 2.0 ; | |
968 | tlppsd[1] = fGeom->GetLidThickness() / 2.0 ; | |
969 | tlppsd[2] = fGeom->GetPPSDModuleSize(2) / 2.0 ; | |
d15a28e7 | 970 | |
92862013 | 971 | gMC->Gsvolu("TLPS", "BOX ", idtmed[708], tlppsd, 3) ; |
d15a28e7 | 972 | |
92862013 | 973 | Float_t y0 = ( fGeom->GetMicromegas1Thickness() - fGeom->GetLidThickness() ) / 2. ; |
d15a28e7 | 974 | |
92862013 | 975 | gMC->Gspos("TLPS", 1, "MPPS", 0.0, y0, 0.0, 0, "ONLY") ; |
d15a28e7 | 976 | |
977 | // 2. the upper panel made of composite material | |
978 | ||
92862013 | 979 | Float_t upppsd[3] ; |
980 | upppsd[0] = ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; | |
981 | upppsd[1] = fGeom->GetCompositeThickness() / 2.0 ; | |
982 | upppsd[2] = ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; | |
d15a28e7 | 983 | |
92862013 | 984 | gMC->Gsvolu("UPPS", "BOX ", idtmed[709], upppsd, 3) ; |
d15a28e7 | 985 | |
92862013 | 986 | y0 = y0 - fGeom->GetLidThickness() / 2. - fGeom->GetCompositeThickness() / 2. ; |
d15a28e7 | 987 | |
92862013 | 988 | gMC->Gspos("UPPS", 1, "MPPS", 0.0, y0, 0.0, 0, "ONLY") ; |
d15a28e7 | 989 | |
990 | // 3. the anode made of Copper | |
991 | ||
92862013 | 992 | Float_t anppsd[3] ; |
993 | anppsd[0] = ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; | |
994 | anppsd[1] = fGeom->GetAnodeThickness() / 2.0 ; | |
995 | anppsd[2] = ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; | |
d15a28e7 | 996 | |
92862013 | 997 | gMC->Gsvolu("ANPS", "BOX ", idtmed[710], anppsd, 3) ; |
d15a28e7 | 998 | |
92862013 | 999 | y0 = y0 - fGeom->GetCompositeThickness() / 2. - fGeom->GetAnodeThickness() / 2. ; |
d15a28e7 | 1000 | |
92862013 | 1001 | gMC->Gspos("ANPS", 1, "MPPS", 0.0, y0, 0.0, 0, "ONLY") ; |
d15a28e7 | 1002 | |
1003 | // 4. the conversion gap + avalanche gap filled with gas | |
1004 | ||
92862013 | 1005 | Float_t ggppsd[3] ; |
1006 | ggppsd[0] = ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; | |
1007 | ggppsd[1] = ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() ) / 2.0 ; | |
1008 | ggppsd[2] = ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; | |
d15a28e7 | 1009 | |
92862013 | 1010 | gMC->Gsvolu("GGPS", "BOX ", idtmed[715], ggppsd, 3) ; |
d15a28e7 | 1011 | |
1012 | // --- Divide GGPP in X (phi) and Z directions -- | |
1013 | gMC->Gsdvn("GROW", "GGPS", fGeom->GetNumberOfPadsPhi(), 1) ; | |
1014 | gMC->Gsdvn("GCEL", "GROW", fGeom->GetNumberOfPadsZ() , 3) ; | |
1015 | ||
92862013 | 1016 | y0 = y0 - fGeom->GetAnodeThickness() / 2. - ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() ) / 2. ; |
d15a28e7 | 1017 | |
92862013 | 1018 | gMC->Gspos("GGPS", 1, "MPPS", 0.0, y0, 0.0, 0, "ONLY") ; |
d15a28e7 | 1019 | |
1020 | ||
1021 | // 6. the cathode made of Copper | |
1022 | ||
92862013 | 1023 | Float_t cappsd[3] ; |
1024 | cappsd[0] = ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; | |
1025 | cappsd[1] = fGeom->GetCathodeThickness() / 2.0 ; | |
1026 | cappsd[2] = ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; | |
d15a28e7 | 1027 | |
92862013 | 1028 | gMC->Gsvolu("CAPS", "BOX ", idtmed[710], cappsd, 3) ; |
d15a28e7 | 1029 | |
39544c2e | 1030 | y0 = y0 - ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() ) / 2. - fGeom->GetCathodeThickness() / 2. ; |
d15a28e7 | 1031 | |
92862013 | 1032 | gMC->Gspos("CAPS", 1, "MPPS", 0.0, y0, 0.0, 0, "ONLY") ; |
d15a28e7 | 1033 | |
1034 | // 7. the printed circuit made of G10 | |
1035 | ||
92862013 | 1036 | Float_t pcppsd[3] ; |
1037 | pcppsd[0] = ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() ) / 2,.0 ; | |
1038 | pcppsd[1] = fGeom->GetPCThickness() / 2.0 ; | |
1039 | pcppsd[2] = ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; | |
d15a28e7 | 1040 | |
92862013 | 1041 | gMC->Gsvolu("PCPS", "BOX ", idtmed[711], cappsd, 3) ; |
d15a28e7 | 1042 | |
92862013 | 1043 | y0 = y0 - fGeom->GetCathodeThickness() / 2. - fGeom->GetPCThickness() / 2. ; |
d15a28e7 | 1044 | |
92862013 | 1045 | gMC->Gspos("PCPS", 1, "MPPS", 0.0, y0, 0.0, 0, "ONLY") ; |
d15a28e7 | 1046 | |
1047 | // 8. the lower panel made of composite material | |
1048 | ||
92862013 | 1049 | Float_t lpppsd[3] ; |
1050 | lpppsd[0] = ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; | |
1051 | lpppsd[1] = fGeom->GetCompositeThickness() / 2.0 ; | |
1052 | lpppsd[2] = ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; | |
d15a28e7 | 1053 | |
92862013 | 1054 | gMC->Gsvolu("LPPS", "BOX ", idtmed[709], lpppsd, 3) ; |
d15a28e7 | 1055 | |
92862013 | 1056 | y0 = y0 - fGeom->GetPCThickness() / 2. - fGeom->GetCompositeThickness() / 2. ; |
d15a28e7 | 1057 | |
92862013 | 1058 | gMC->Gspos("LPPS", 1, "MPPS", 0.0, y0, 0.0, 0, "ONLY") ; |
d15a28e7 | 1059 | |
92862013 | 1060 | // Position the fNumberOfModulesPhi x fNumberOfModulesZ modules (mppsd) inside PPSD to cover a PHOS module |
d15a28e7 | 1061 | // the top and bottom one's (which are assumed identical) : |
1062 | ||
bacd0b23 | 1063 | Float_t yt = ( fGeom->GetCPVBoxSize(1) - fGeom->GetMicromegas1Thickness() ) / 2. ; |
1064 | Float_t yb = - ( fGeom->GetCPVBoxSize(1) - fGeom->GetMicromegas2Thickness() ) / 2. ; | |
d15a28e7 | 1065 | |
92862013 | 1066 | Int_t copyNumbertop = 0 ; |
1067 | Int_t copyNumberbot = fGeom->GetNumberOfModulesPhi() * fGeom->GetNumberOfModulesZ() ; | |
d15a28e7 | 1068 | |
bacd0b23 | 1069 | Float_t x = ( fGeom->GetCPVBoxSize(0) - fGeom->GetPPSDModuleSize(0) ) / 2. ; |
d15a28e7 | 1070 | |
1071 | for ( Int_t iphi = 1; iphi <= fGeom->GetNumberOfModulesPhi(); iphi++ ) { // the number of micromegas modules in phi per PHOS module | |
bacd0b23 | 1072 | Float_t z = ( fGeom->GetCPVBoxSize(2) - fGeom->GetPPSDModuleSize(2) ) / 2. ; |
d15a28e7 | 1073 | |
1074 | for ( Int_t iz = 1; iz <= fGeom->GetNumberOfModulesZ(); iz++ ) { // the number of micromegas modules in z per PHOS module | |
92862013 | 1075 | gMC->Gspos("MPPS", ++copyNumbertop, "PPSD", x, yt, z, 0, "ONLY") ; |
1076 | gMC->Gspos("MPPS", ++copyNumberbot, "PPSD", x, yb, z, 0, "ONLY") ; | |
1077 | z = z - fGeom->GetPPSDModuleSize(2) ; | |
d15a28e7 | 1078 | } // end of Z module loop |
92862013 | 1079 | x = x - fGeom->GetPPSDModuleSize(0) ; |
d15a28e7 | 1080 | } // end of phi module loop |
1081 | ||
1082 | // The Lead converter between two air gaps | |
1083 | // 1. Upper air gap | |
1084 | ||
92862013 | 1085 | Float_t uappsd[3] ; |
bacd0b23 | 1086 | uappsd[0] = fGeom->GetCPVBoxSize(0) / 2.0 ; |
92862013 | 1087 | uappsd[1] = fGeom->GetMicro1ToLeadGap() / 2.0 ; |
bacd0b23 | 1088 | uappsd[2] = fGeom->GetCPVBoxSize(2) / 2.0 ; |
d15a28e7 | 1089 | |
92862013 | 1090 | gMC->Gsvolu("UAPPSD", "BOX ", idtmed[798], uappsd, 3) ; |
d15a28e7 | 1091 | |
bacd0b23 | 1092 | y0 = ( fGeom->GetCPVBoxSize(1) - 2 * fGeom->GetMicromegas1Thickness() - fGeom->GetMicro1ToLeadGap() ) / 2. ; |
d15a28e7 | 1093 | |
92862013 | 1094 | gMC->Gspos("UAPPSD", 1, "PPSD", 0.0, y0, 0.0, 0, "ONLY") ; |
d15a28e7 | 1095 | |
1096 | // 2. Lead converter | |
1097 | ||
92862013 | 1098 | Float_t lcppsd[3] ; |
bacd0b23 | 1099 | lcppsd[0] = fGeom->GetCPVBoxSize(0) / 2.0 ; |
92862013 | 1100 | lcppsd[1] = fGeom->GetLeadConverterThickness() / 2.0 ; |
bacd0b23 | 1101 | lcppsd[2] = fGeom->GetCPVBoxSize(2) / 2.0 ; |
d15a28e7 | 1102 | |
92862013 | 1103 | gMC->Gsvolu("LCPPSD", "BOX ", idtmed[712], lcppsd, 3) ; |
d15a28e7 | 1104 | |
92862013 | 1105 | y0 = y0 - fGeom->GetMicro1ToLeadGap() / 2. - fGeom->GetLeadConverterThickness() / 2. ; |
d15a28e7 | 1106 | |
92862013 | 1107 | gMC->Gspos("LCPPSD", 1, "PPSD", 0.0, y0, 0.0, 0, "ONLY") ; |
d15a28e7 | 1108 | |
1109 | // 3. Lower air gap | |
1110 | ||
92862013 | 1111 | Float_t lappsd[3] ; |
bacd0b23 | 1112 | lappsd[0] = fGeom->GetCPVBoxSize(0) / 2.0 ; |
92862013 | 1113 | lappsd[1] = fGeom->GetLeadToMicro2Gap() / 2.0 ; |
bacd0b23 | 1114 | lappsd[2] = fGeom->GetCPVBoxSize(2) / 2.0 ; |
d15a28e7 | 1115 | |
92862013 | 1116 | gMC->Gsvolu("LAPPSD", "BOX ", idtmed[798], lappsd, 3) ; |
fe4da5cc | 1117 | |
92862013 | 1118 | y0 = y0 - fGeom->GetLeadConverterThickness() / 2. - fGeom->GetLeadToMicro2Gap() / 2. ; |
d15a28e7 | 1119 | |
92862013 | 1120 | gMC->Gspos("LAPPSD", 1, "PPSD", 0.0, y0, 0.0, 0, "ONLY") ; |
d15a28e7 | 1121 | |
fe4da5cc | 1122 | } |
1123 | ||
d15a28e7 | 1124 | |
bacd0b23 | 1125 | //____________________________________________________________________________ |
1126 | void AliPHOSv0::CreateGeometryforCPV() | |
1127 | { | |
1128 | // Create the PHOS-CPV geometry for GEANT | |
1129 | // Author: Yuri Kharlov 11 September 2000 | |
bacd0b23 | 1130 | //BEGIN_HTML |
1131 | /* | |
1132 | <H2> | |
1133 | Geant3 geometry of PHOS-CPV in ALICE | |
1134 | </H2> | |
1135 | <table width=700> | |
1136 | ||
1137 | <tr> | |
1138 | <td>CPV perspective view</td> | |
1139 | <td>CPV front view </td> | |
1140 | </tr> | |
1141 | ||
1142 | <tr> | |
1143 | <td> <img height=300 width=290 src="../images/CPVallPersp.gif"> </td> | |
1144 | <td> <img height=300 width=290 src="../images/CPVallFront.gif"> </td> | |
1145 | </tr> | |
1146 | ||
1147 | <tr> | |
1148 | <td>One CPV module, perspective view </td> | |
1149 | <td>One CPV module, front view (extended in vertical direction) </td> | |
1150 | </tr> | |
1151 | ||
1152 | <tr> | |
1153 | <td><img height=300 width=290 src="../images/CPVmodulePers.gif"></td> | |
1154 | <td><img height=300 width=290 src="../images/CPVmoduleSide.gif"></td> | |
1155 | </tr> | |
1156 | ||
1157 | </table> | |
1158 | ||
1159 | <H2> | |
1160 | Geant3 geometry tree of PHOS-CPV in ALICE | |
1161 | </H2> | |
1162 | <center> | |
1163 | <img height=300 width=290 src="../images/CPVtree.gif"> | |
1164 | </center> | |
1165 | */ | |
1166 | //END_HTML | |
1167 | ||
1168 | Float_t par[3], x,y,z; | |
1169 | ||
1170 | // Get pointer to the array containing media indexes | |
1171 | Int_t *idtmed = fIdtmed->GetArray() - 699 ; | |
1172 | ||
1173 | // The box containing all CPV for one PHOS module filled with air | |
1174 | par[0] = fGeom->GetCPVBoxSize(0) / 2.0 ; | |
1175 | par[1] = fGeom->GetCPVBoxSize(1) / 2.0 ; | |
1176 | par[2] = fGeom->GetCPVBoxSize(2) / 2.0 ; | |
1177 | gMC->Gsvolu("CPV ", "BOX ", idtmed[798], par, 3) ; | |
1178 | ||
1179 | y = fGeom->GetOuterBoxSize(1) / 2.0 ; | |
1180 | gMC->Gspos("CPV ", 1, "PHOS", 0.0, y, 0.0, 0, "ONLY") ; | |
1181 | ||
1182 | // Gassiplex board | |
1183 | ||
1184 | par[0] = fGeom->GetGassiplexChipSize(0)/2.; | |
1185 | par[1] = fGeom->GetGassiplexChipSize(1)/2.; | |
1186 | par[2] = fGeom->GetGassiplexChipSize(2)/2.; | |
1187 | gMC->Gsvolu("CPVC","BOX ",idtmed[707],par,3); | |
1188 | ||
1189 | // Cu+Ni foil covers Gassiplex board | |
1190 | ||
1191 | par[1] = fGeom->GetCPVCuNiFoilThickness()/2; | |
1192 | gMC->Gsvolu("CPVD","BOX ",idtmed[710],par,3); | |
1193 | y = -(fGeom->GetGassiplexChipSize(1)/2 - par[1]); | |
1194 | gMC->Gspos("CPVD",1,"CPVC",0,y,0,0,"ONLY"); | |
1195 | ||
1196 | // Position of the chip inside CPV | |
1197 | ||
1198 | Float_t xStep = fGeom->GetCPVActiveSize(0) / (fGeom->GetNumberOfCPVChipsPhi() + 1); | |
1199 | Float_t zStep = fGeom->GetCPVActiveSize(1) / (fGeom->GetNumberOfCPVChipsZ() + 1); | |
1200 | Int_t copy = 0; | |
1201 | y = fGeom->GetCPVFrameSize(1)/2 - fGeom->GetFTPosition(0) + | |
1202 | fGeom->GetCPVTextoliteThickness() / 2 + fGeom->GetGassiplexChipSize(1) / 2 + 0.1; | |
1203 | for (Int_t ix=0; ix<fGeom->GetNumberOfCPVChipsPhi(); ix++) { | |
1204 | x = xStep * (ix+1) - fGeom->GetCPVActiveSize(0)/2; | |
1205 | for (Int_t iz=0; iz<fGeom->GetNumberOfCPVChipsZ(); iz++) { | |
1206 | copy++; | |
1207 | z = zStep * (iz+1) - fGeom->GetCPVActiveSize(1)/2; | |
1208 | gMC->Gspos("CPVC",copy,"CPV",x,y,z,0,"ONLY"); | |
1209 | } | |
1210 | } | |
1211 | ||
1212 | // Foiled textolite (1 mm of textolite + 50 mkm of Cu + 6 mkm of Ni) | |
1213 | ||
1214 | par[0] = fGeom->GetCPVActiveSize(0) / 2; | |
1215 | par[1] = fGeom->GetCPVTextoliteThickness() / 2; | |
1216 | par[2] = fGeom->GetCPVActiveSize(1) / 2; | |
1217 | gMC->Gsvolu("CPVF","BOX ",idtmed[707],par,3); | |
1218 | ||
1219 | // Argon gas volume | |
1220 | ||
1221 | par[1] = (fGeom->GetFTPosition(2) - fGeom->GetFTPosition(1) - fGeom->GetCPVTextoliteThickness()) / 2; | |
1222 | gMC->Gsvolu("CPVG","BOX ",idtmed[715],par,3); | |
1223 | ||
1224 | for (Int_t i=0; i<4; i++) { | |
1225 | y = fGeom->GetCPVFrameSize(1) / 2 - fGeom->GetFTPosition(i) + fGeom->GetCPVTextoliteThickness()/2; | |
1226 | gMC->Gspos("CPVF",i+1,"CPV",0,y,0,0,"ONLY"); | |
1227 | if(i==1){ | |
1228 | y-= (fGeom->GetFTPosition(2) - fGeom->GetFTPosition(1)) / 2; | |
1229 | gMC->Gspos("CPVG",1,"CPV ",0,y,0,0,"ONLY"); | |
1230 | } | |
1231 | } | |
1232 | ||
1233 | // Dummy sensitive plane in the middle of argone gas volume | |
1234 | ||
1235 | par[1]=0.001; | |
1236 | gMC->Gsvolu("CPVQ","BOX ",idtmed[715],par,3); | |
1237 | gMC->Gspos ("CPVQ",1,"CPVG",0,0,0,0,"ONLY"); | |
1238 | ||
1239 | // Cu+Ni foil covers textolite | |
1240 | ||
1241 | par[1] = fGeom->GetCPVCuNiFoilThickness() / 2; | |
1242 | gMC->Gsvolu("CPV1","BOX ",idtmed[710],par,3); | |
1243 | y = fGeom->GetCPVTextoliteThickness()/2 - par[1]; | |
1244 | gMC->Gspos ("CPV1",1,"CPVF",0,y,0,0,"ONLY"); | |
1245 | ||
1246 | // Aluminum frame around CPV | |
1247 | ||
1248 | par[0] = fGeom->GetCPVFrameSize(0)/2; | |
1249 | par[1] = fGeom->GetCPVFrameSize(1)/2; | |
1250 | par[2] = fGeom->GetCPVBoxSize(2) /2; | |
1251 | gMC->Gsvolu("CFR1","BOX ",idtmed[701],par,3); | |
1252 | ||
1253 | par[0] = fGeom->GetCPVBoxSize(0)/2 - fGeom->GetCPVFrameSize(0); | |
1254 | par[1] = fGeom->GetCPVFrameSize(1)/2; | |
1255 | par[2] = fGeom->GetCPVFrameSize(2)/2; | |
1256 | gMC->Gsvolu("CFR2","BOX ",idtmed[701],par,3); | |
1257 | ||
1258 | for (Int_t j=0; j<=1; j++) { | |
1259 | x = TMath::Sign(1,2*j-1) * (fGeom->GetCPVBoxSize(0) - fGeom->GetCPVFrameSize(0)) / 2; | |
1260 | gMC->Gspos("CFR1",j+1,"CPV", x,0,0,0,"ONLY"); | |
1261 | z = TMath::Sign(1,2*j-1) * (fGeom->GetCPVBoxSize(2) - fGeom->GetCPVFrameSize(2)) / 2; | |
1262 | gMC->Gspos("CFR2",j+1,"CPV",0, 0,z,0,"ONLY"); | |
1263 | } | |
1264 | ||
1265 | } | |
1266 | ||
1267 | ||
d15a28e7 | 1268 | //____________________________________________________________________________ |
1269 | void AliPHOSv0::Init(void) | |
1270 | { | |
b2a60966 | 1271 | // Just prints an information message |
1272 | ||
d15a28e7 | 1273 | Int_t i; |
1274 | ||
1275 | printf("\n"); | |
1276 | for(i=0;i<35;i++) printf("*"); | |
1277 | printf(" PHOS_INIT "); | |
1278 | for(i=0;i<35;i++) printf("*"); | |
1279 | printf("\n"); | |
1280 | ||
1281 | // Here the PHOS initialisation code (if any!) | |
1282 | ||
e04976bd | 1283 | if (fGeom!=0) |
1284 | cout << "AliPHOS" << Version() << " : PHOS geometry intialized for " << fGeom->GetName() << endl ; | |
1285 | else | |
1286 | cout << "AliPHOS" << Version() << " : PHOS geometry initialization failed !" << endl ; | |
1287 | ||
d15a28e7 | 1288 | for(i=0;i<80;i++) printf("*"); |
1289 | printf("\n"); | |
1290 | ||
1291 | } | |
1292 |