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