]>
Commit | Line | Data |
---|---|---|
b7b24482 | 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 | ||
16 | /* $Id: AliACORDEv1.cxx,v 1.2 2007/12/03 08:40:00 hristov Exp $ */ | |
17 | ||
18 | /////////////////////////////////////////////////////////////////////////////// | |
19 | // // | |
20 | // ALICE Cosmic Ray Trigger // | |
21 | // // | |
22 | // This class contains the functions for version 0 of the ALICE Cosmic Ray // | |
23 | // Trigger. This version will be used to simulation comic rays in alice with// | |
24 | // all the detectors. It include geometry and hits (position and momentum) // | |
25 | // // | |
26 | // Send comments to: // | |
27 | // // | |
28 | // Arturo Fernandez Tellez <afernand@fcfm.buap.mx> // | |
29 | // Enrique Gamez <egamez@fcfm.buap.mx> // | |
30 | // Eleazar Cuautle Flores <ecuautle@nucleares.unam.mx> // | |
31 | // Mario Rodriguez Cahuantzi <mrodrigu@mail.cern.ch> // | |
32 | // // | |
33 | // Puebla, Pue. Mexico December 2007 // | |
34 | /////////////////////////////////////////////////////////////////////////////// | |
35 | ||
36 | ||
37 | // | |
38 | #include <Riostream.h> | |
39 | #include <TGeoMatrix.h> | |
40 | #include <TGeometry.h> | |
41 | #include <TMath.h> | |
329ce604 | 42 | //#include <TNode.h> |
b7b24482 | 43 | #include <TTUBE.h> |
329ce604 | 44 | //#include <TVirtualMC.h> |
b7b24482 | 45 | #include <TString.h> |
46 | #include <TSystem.h> | |
47 | ||
48 | #include "AliConst.h" | |
49 | #include "AliRun.h" | |
50 | ||
51 | #include "TGeoManager.h" | |
52 | #include "TGeoVolume.h" | |
53 | #include "TGeoPcon.h" | |
329ce604 | 54 | //#include "TGeoTube.h" |
b7b24482 | 55 | #include "TGeoPgon.h" |
56 | #include "TGeoTrd1.h" | |
57 | #include "TGeoCompositeShape.h" | |
58 | #include "TGeoPara.h" | |
59 | // | |
60 | ||
61 | #include "AliACORDEv1.h" | |
62 | #include <TClonesArray.h> | |
63 | #include <TLorentzVector.h> | |
64 | #include <TVirtualMC.h> | |
65 | #include <TPDGCode.h> | |
329ce604 | 66 | //#include <TGeometry.h> |
b7b24482 | 67 | #include <TBRIK.h> |
68 | #include <TNode.h> | |
69 | ||
70 | ||
71 | #include "AliRun.h" | |
72 | #include "AliConst.h" | |
73 | #include "AliACORDEhit.h" | |
74 | #include "AliACORDEConstants.h" | |
75 | #include "AliMC.h" | |
76 | #include "AliLog.h" | |
77 | ||
78 | ClassImp(AliACORDEv1) | |
79 | ||
80 | //_____________________________________________________________________________ | |
81 | AliACORDEv1::AliACORDEv1() | |
82 | : AliACORDE() | |
83 | { | |
84 | // | |
85 | // Default constructor | |
86 | fIshunt = 0; | |
87 | fHits = 0; | |
88 | // | |
89 | } | |
90 | //_____________________________________________________________________________ | |
91 | AliACORDEv1::AliACORDEv1(const char *name, const char *title) | |
92 | : AliACORDE(name, title) | |
93 | { | |
94 | // | |
95 | // Standard constructor | |
96 | // | |
97 | fIshunt = 1; // All hits are associated with primary particles | |
98 | fHits = new TClonesArray("AliACORDEhit",400); | |
99 | gAlice->GetMCApp()->AddHitList(fHits); | |
100 | } | |
101 | //_____________________________________________________________________________ | |
102 | AliACORDEv1::~AliACORDEv1() | |
103 | { | |
104 | // | |
105 | // Default destructor | |
106 | // | |
107 | } | |
108 | //_____________________________________________________________________________ | |
109 | void AliACORDEv1::BuildGeometry() | |
110 | { | |
111 | ||
112 | // not needed anymore | |
113 | ||
114 | } | |
115 | ||
116 | //_____________________________________________________________________________ | |
117 | void AliACORDEv1::CreateGeometry() | |
118 | { | |
119 | CreateAcorde(); | |
120 | if (GetCreateCavern()) CreateCavern(); | |
121 | } | |
122 | ||
123 | ||
124 | void AliACORDEv1::CreateCavern() | |
125 | { | |
126 | ||
127 | // Create the mother volume, the one which contain all the material | |
128 | //above the hall | |
129 | ||
130 | TGeoManager *acorde = new TGeoManager("ACORDE", "Geometry of ACORDE"); | |
131 | ||
132 | //---> define some materials | |
133 | ||
134 | TGeoMaterial *matVacuum = new TGeoMaterial("Vacuum", 0,0,0); | |
135 | ||
136 | //---> define some media | |
137 | ||
329ce604 | 138 | TGeoMedium *vacuum = new TGeoMedium("Vacuum",1, matVacuum); |
b7b24482 | 139 | |
140 | //---> define the measures | |
141 | ||
142 | Double_t dx1 = AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad); | |
143 | Double_t dy1 = AliACORDEConstants::Instance()->Depth(); | |
144 | Double_t dz1 = dx1; | |
145 | ||
146 | //---> define the box for the mother volume | |
147 | ||
329ce604 | 148 | TGeoVolume *aCORDE = acorde->MakeBox("ACORDE", vacuum, dx1, dy1, dz1); |
149 | acorde->SetTopVolume(aCORDE); | |
b7b24482 | 150 | |
151 | //---> create shafts&molasse | |
152 | ||
153 | CreateShafts(); | |
154 | CreateMolasse(); | |
155 | } | |
156 | ||
4ca41d2c | 157 | |
b7b24482 | 158 | void AliACORDEv1::CreateShafts() |
159 | { | |
160 | ||
329ce604 | 161 | //---> This shaft is composes by an open tube down in the hall |
162 | //---> and a cilinder above the level of the celling | |
163 | //---> Every structure relative to the shaft will be put into this volume | |
164 | ||
b7b24482 | 165 | |
166 | TGeoManager *acorde = new TGeoManager("ACORDE2007", "Geometry of ACORDE"); | |
167 | ||
168 | //---> define some materials | |
169 | ||
170 | TGeoMaterial *matVacuum = new TGeoMaterial("Al", 0,0,0); | |
171 | ||
172 | //---> define some media | |
173 | ||
329ce604 | 174 | TGeoMedium *vacuum = new TGeoMedium("Vacuum",1, matVacuum); |
b7b24482 | 175 | TGeoMaterial *matAl = new TGeoMaterial("Al", 26.98,13,2.7); |
329ce604 | 176 | TGeoMedium *al = new TGeoMedium("Root Material",2, matAl); |
177 | ||
b7b24482 | 178 | |
b7b24482 | 179 | //---> Access to shafts |
180 | //---> define the Matrix Rotation&other variables | |
181 | ||
182 | TGeoRotation *rot1 = new TGeoRotation("rot1", 0.0, 0.0, 90.0, 0.0, 90.0, 90.0); | |
183 | ||
184 | Float_t ptube[5]; | |
185 | ptube[0]=0; | |
186 | ptube[1]=1250; | |
187 | ptube[2]=5150/2; | |
188 | ptube[3]=360; | |
189 | ptube[4]=360; | |
190 | ||
191 | Float_t ptubs[5]; | |
192 | ||
193 | //---> The open section of the PX24 | |
194 | ptubs[0] = 1150; //---> Inner radius | |
195 | ptubs[1] = 1250; //---> Outer radius | |
196 | ptubs[2] = 1300; //---> Half length | |
197 | ptubs[3] = 180 + kRaddeg*TMath::ASin(1070/ptubs[0]); //---> starting angle | |
198 | ptubs[4] = 180 - kRaddeg*TMath::ASin(1070/ptubs[0]); | |
199 | ||
200 | //---> Set position for the tubes | |
201 | ||
202 | TGeoTranslation *tr2 = new TGeoTranslation(0,0,-ptube[2]+ptubs[2]); | |
203 | ||
204 | //---> define the cilinders to hold the main structure in the shaft | |
205 | ||
329ce604 | 206 | TGeoVolume *o = acorde->MakeBox("O", vacuum, 25., 25., 5.); |
207 | TGeoVolume *cSF1 = acorde->MakeTubs("CSF1",al,ptube[0],ptube[1],ptube[2],ptube[3],ptube[4]); | |
208 | TGeoVolume *cSF2 = acorde->MakeTubs("CSF2",al,ptubs[0],ptubs[1],ptubs[2],ptubs[3],ptubs[4]); | |
209 | o->AddNode(cSF1, 1); | |
210 | cSF1->AddNode(cSF2,1,tr2); | |
b7b24482 | 211 | |
212 | //---> definition of the other part of the shaft | |
213 | ||
214 | ptube[0] = ptubs[0]; // Inner radius | |
215 | ptube[1] = ptubs[1]; // Outer radius | |
216 | ptube[2] = 5150/2 - ptubs[2]; // Half lenght | |
329ce604 | 217 | TGeoVolume *cSF3 = acorde->MakeTubs("CSF3",al,ptubs[0],ptubs[1],ptubs[2],ptubs[3],ptubs[4]); |
b7b24482 | 218 | TGeoTranslation *tr3 = new TGeoTranslation(0,0,5150/2-ptube[2]); |
329ce604 | 219 | cSF1->AddNode(cSF3,1,tr3); |
b7b24482 | 220 | |
221 | //---> define concrete walls along the shaft (next to the elevator) | |
222 | ||
223 | Float_t pbox[3]; | |
224 | pbox[0]=480/2; | |
225 | pbox[1]=120/2; | |
226 | pbox[2]=5150/2; | |
329ce604 | 227 | TGeoVolume *cSW1 = acorde->MakeBox("CSW1",vacuum,pbox[0],pbox[1],pbox[2]); |
b7b24482 | 228 | TGeoTranslation *br1 = new TGeoTranslation(820+pbox[0],150+pbox[1],0); |
329ce604 | 229 | TGeoTranslation *br1a = new TGeoTranslation(820+pbox[0],-300-pbox[1],0); |
230 | cSF1->AddNode(cSW1,1,br1); | |
231 | cSF1->AddNode(cSW1,1,br1a); | |
b7b24482 | 232 | |
233 | pbox[0] = 120/2; // Half length in X | |
234 | pbox[1] = 750/2; // Half length in Y | |
235 | pbox[2] = 5150/2; // Half length in Z | |
329ce604 | 236 | TGeoVolume *cSW2 = acorde->MakeBox("CSW2",vacuum,pbox[0],pbox[1],pbox[2]); |
b7b24482 | 237 | TGeoTranslation *br2 = new TGeoTranslation(820-60,150+pbox[1],0); |
329ce604 | 238 | cSF1->AddNode(cSW2,1,br2); |
b7b24482 | 239 | |
240 | ||
241 | pbox[0] = 120/2; // Half length in X | |
242 | pbox[1] = 600/2; // Half lenght in Y | |
243 | pbox[2] = 5150/2; // Half length in Z | |
329ce604 | 244 | TGeoVolume *cSW3 = acorde->MakeBox("CSW3",vacuum,pbox[0],pbox[1],pbox[2]); |
b7b24482 | 245 | TGeoTranslation *br3 = new TGeoTranslation(820-60,-300-pbox[1],0); |
329ce604 | 246 | cSF1->AddNode(cSW3,1,br3); |
b7b24482 | 247 | |
248 | pbox[0] = 400/2; // Half length in X | |
249 | pbox[1] = 2300/2; // Half lenght in Y | |
250 | pbox[2] = 300/2; // Half length in Z | |
329ce604 | 251 | TGeoVolume *cSW4 = acorde->MakeBox("CSW4",vacuum,pbox[0],pbox[1],pbox[2]); |
b7b24482 | 252 | TGeoTranslation *br4 = new TGeoTranslation(pbox[1]-pbox[0],0,3000-5150/2-pbox[2]); |
329ce604 | 253 | cSF1->AddNode(cSW4,1,br4); |
b7b24482 | 254 | |
255 | ||
256 | pbox[0] = 1400/2; // Half length in X | |
257 | pbox[1] = 2300/2; // Half lenght in Y | |
258 | pbox[2] = 170/2; // Half length in Z | |
329ce604 | 259 | TGeoVolume *cSW5 = acorde->MakeBox("CSW5",vacuum,pbox[0],pbox[1],pbox[2]); |
b7b24482 | 260 | TGeoTranslation *br5 = new TGeoTranslation(0,0,3000-5150/2-130); |
329ce604 | 261 | cSF1->AddNode(cSW5,1,br5); |
b7b24482 | 262 | |
263 | ||
264 | pbox[0] = 170/2; // Half length in X | |
265 | pbox[1] = 2300/2; // Half lenght in Y | |
266 | pbox[2] = 300/2; // Half length in Z | |
329ce604 | 267 | TGeoVolume *cSW6 = acorde->MakeBox("CSW6",vacuum,pbox[0],pbox[1],pbox[2]); |
b7b24482 | 268 | TGeoTranslation *br6 = new TGeoTranslation(-1400/2-pbox[0],0,3000-5150/2-pbox[2]); |
329ce604 | 269 | cSF1->AddNode(cSW6,1,br6); |
b7b24482 | 270 | |
271 | ||
272 | pbox[0] = 100/2; // Half length in X | |
273 | pbox[1] = 2300/2; // Half lenght in Y | |
274 | pbox[2] = 450/2; // Half length in Z | |
329ce604 | 275 | TGeoVolume *cSW7 = acorde->MakeBox("CSW7",vacuum,pbox[0],pbox[1],pbox[2]); |
b7b24482 | 276 | TGeoTranslation *br7 = new TGeoTranslation(-1400/2-170-pbox[0],0,3000-5150/2+pbox[2]); |
329ce604 | 277 | cSF1->AddNode(cSW7,1,br7); |
b7b24482 | 278 | |
279 | ||
280 | pbox[0] = 300/2; // Half length in X | |
281 | pbox[1] = 2300/2; // Half lenght in Y | |
282 | pbox[2] = 170/2; // Half length in Z | |
329ce604 | 283 | TGeoVolume *cSW8 = acorde->MakeBox("CSW8",vacuum,pbox[0],pbox[1],pbox[2]); |
b7b24482 | 284 | TGeoTranslation *br8 = new TGeoTranslation(-2300/2+pbox[0],0,2500-5150/2); |
329ce604 | 285 | cSF1->AddNode(cSW8,1,br8); |
b7b24482 | 286 | |
287 | //---> put the shaft into the mother volume | |
288 | ||
289 | TGeoCombiTrans *br = new TGeoCombiTrans(0,AliACORDEConstants::Instance()->Depth()-5150/2,2300,rot1); | |
329ce604 | 290 | cSF1->AddNode(cSF1,1,br); |
b7b24482 | 291 | |
292 | ||
293 | //---> PM25 Access Shafts | |
294 | ||
295 | ptube[0]=910/2; | |
296 | ptube[1]=ptube[0]+100; | |
297 | ptube[2]=(5150-1166)/2; | |
329ce604 | 298 | TGeoVolume *cSF4 = acorde->MakeTubs("CSF4",vacuum,pbox[0],pbox[1],pbox[2],360,360); |
b7b24482 | 299 | TGeoCombiTrans *tr4 = new TGeoCombiTrans(2100,AliACORDEConstants::Instance()->Depth()-ptube[2],0,rot1); |
329ce604 | 300 | cSF4->AddNode(cSF4,1,tr4); |
b7b24482 | 301 | |
302 | ||
303 | //---> PGC2 Access shaft | |
304 | ||
305 | ptube[0]=1100/2; | |
306 | ptube[1]=ptube[0]+100; | |
307 | ptube[2]=(5150-690)/2; | |
329ce604 | 308 | TGeoVolume *cSF5 = acorde->MakeTubs("CSF5",vacuum,pbox[0],pbox[1],pbox[2],360,360); |
b7b24482 | 309 | TGeoCombiTrans *tr5 = new TGeoCombiTrans(-375,AliACORDEConstants::Instance()->Depth()-ptube[2],-1900-2987.7,rot1); |
329ce604 | 310 | cSF5->AddNode(cSF5,1,tr5); |
b7b24482 | 311 | |
312 | } | |
313 | ||
314 | ||
315 | void AliACORDEv1::CreateMolasse() | |
316 | ||
317 | { | |
329ce604 | 318 | // create a big molasse for ACORDE detector |
b7b24482 | 319 | TGeoManager *acorde = new TGeoManager("ACORDE2007", "Geometry of ACORDE"); |
320 | ||
321 | //---> define some media | |
329ce604 | 322 | |
b7b24482 | 323 | |
324 | TGeoMaterial *matAl = new TGeoMaterial("Al", 26.98,13,2.7); | |
329ce604 | 325 | TGeoMedium *vacuum = new TGeoMedium("Root Material",2, matAl); |
b7b24482 | 326 | |
327 | Float_t px24radius = 2300/2; | |
328 | Float_t px24X = 0; | |
329 | Float_t px24Z = 2300; | |
330 | Float_t pm25radius = 910/2; | |
331 | Float_t pm25X = 2100; | |
332 | Float_t pm25Z = 0; | |
333 | Float_t pgc2radius = 1100/2; | |
334 | Float_t pgc2X = -375; | |
335 | Float_t pgc2Z = -(1900 + 2987.7); | |
336 | Float_t concreteWidth = 100; //---> Standard width of the hall walls. | |
337 | ||
338 | ||
339 | //---> Create a local mother volume. | |
340 | Float_t pbox[3]; | |
341 | pbox[0] = AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad); | |
342 | pbox[1] = AliACORDEConstants::Instance()->Depth()/2; | |
343 | pbox[2] = pbox[0]; | |
329ce604 | 344 | TGeoVolume *cM01 = acorde->MakeBox("CM01", vacuum, pbox[0],pbox[1],pbox[2]); |
b7b24482 | 345 | |
346 | //---> Now put the molasse exactly above the hall. OK | |
347 | //---> Above the ceiling | |
348 | ||
349 | Float_t ptubs[5]; | |
350 | ptubs[0] = 1170; | |
351 | ptubs[1] = 2100 - pm25radius; | |
352 | ptubs[2] = 1900/2 + px24radius; | |
353 | ptubs[3] = 0; | |
354 | ptubs[4] = 180; | |
329ce604 | 355 | TGeoVolume *cM02 = acorde->MakeTubs("CM02",vacuum,ptubs[0],ptubs[1],ptubs[2],ptubs[3],ptubs[4]); |
b7b24482 | 356 | TGeoTranslation *tr2 = new TGeoTranslation(0,500-AliACORDEConstants::Instance()->Depth()/2,ptubs[2]-1900); |
329ce604 | 357 | cM01->AddNode(cM02,1,tr2); |
b7b24482 | 358 | |
359 | ||
360 | //---> Molasse around the RB24/26 Wall. OK | |
361 | ||
362 | ptubs[0] = 220 + 1600; | |
363 | ptubs[1] = AliACORDEConstants::Instance()->Depth() - ptubs[0]; | |
364 | ptubs[2] = 2987.7/2 - 1100/4 - concreteWidth/2; | |
365 | ptubs[3] = 0; | |
366 | ptubs[4] = 180; | |
329ce604 | 367 | TGeoVolume *cM03 = acorde->MakeTubs("CM03",vacuum,ptubs[0],ptubs[1],ptubs[2],ptubs[3],ptubs[4]); |
b7b24482 | 368 | TGeoTranslation *tr3 = new TGeoTranslation(70,40-AliACORDEConstants::Instance()->Depth()/2,-ptubs[2]-1900); |
329ce604 | 369 | cM01->AddNode(cM03,1,tr3); |
b7b24482 | 370 | |
371 | ||
372 | //---> A big block above the RB24/26 wall. OK | |
373 | ||
374 | pbox[0] = AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad); | |
375 | pbox[1] = (AliACORDEConstants::Instance()->Depth() - 220 - 1600)/2; | |
376 | pbox[2] = 2987.7/2 - 1100/4 - concreteWidth/2; | |
329ce604 | 377 | TGeoVolume *cM04 = acorde->MakeBox("CM04", vacuum, pbox[0],pbox[1],pbox[2]); |
b7b24482 | 378 | TGeoTranslation *tr4 = new TGeoTranslation(0,AliACORDEConstants::Instance()->Depth()/2-pbox[1],-1900-pbox[2]); |
329ce604 | 379 | cM01->AddNode(cM04,1,tr4); |
380 | ||
b7b24482 | 381 | |
382 | ||
383 | ||
384 | //---> Small blocks below the volume CMO4 on both sides of the wall RB24/26. OK | |
385 | ||
386 | pbox[0] = (AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad)-ptubs[0])/2; | |
387 | pbox[1] = AliACORDEConstants::Instance()->Depth()/2 - pbox[1]; | |
329ce604 | 388 | TGeoVolume *cM17 = acorde->MakeBox("CM17", vacuum, pbox[0],pbox[1],pbox[2]); |
b7b24482 | 389 | TGeoTranslation *tr17 = new TGeoTranslation(AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad) - pbox[0],-AliACORDEConstants::Instance()->Depth()/2 + pbox[1],-1900 - pbox[2]); |
329ce604 | 390 | TGeoTranslation *tr17a = new TGeoTranslation(-AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad)+ pbox[0],-AliACORDEConstants::Instance()->Depth()/2 + pbox[1], -1900 - pbox[2]); |
391 | cM01->AddNode(cM17,1,tr17); | |
392 | cM01->AddNode(cM17,2,tr17a); | |
b7b24482 | 393 | |
394 | ||
395 | //---> And a big block of molasse above the hall up to the surface. OK | |
396 | ||
397 | pbox[0] = pm25X - pm25radius; | |
398 | pbox[1] = (AliACORDEConstants::Instance()->Depth()-500-1170)/2; | |
399 | pbox[2] = (1900 + 1150)/2; | |
329ce604 | 400 | TGeoVolume *cM05 = acorde->MakeBox("CM05", vacuum, pbox[0],pbox[1],pbox[2]); |
b7b24482 | 401 | TGeoTranslation *tr5 = new TGeoTranslation(0,AliACORDEConstants::Instance()->Depth()/2-pbox[1], pbox[2]-1900); |
329ce604 | 402 | cM01->AddNode(cM05,1,tr5); |
b7b24482 | 403 | |
404 | ||
405 | //---> Small blocks of molasse betwen the blocks CMO2, CMO5 and PM25. Ok | |
406 | ||
407 | pbox[0] = (pm25X - pm25radius - 1170)/2; | |
408 | pbox[1] = 1000; | |
329ce604 | 409 | TGeoVolume *cM16 = acorde->MakeBox("CM16", vacuum, pbox[0],pbox[1],pbox[2]); |
b7b24482 | 410 | TGeoTranslation *tr16 = new TGeoTranslation(1170 + pbox[0], -AliACORDEConstants::Instance()->Depth()/2+pbox[1], pbox[2] - 1900); |
329ce604 | 411 | cM01->AddNode(cM16,1,tr16); |
b7b24482 | 412 | |
413 | ||
414 | //---> Molasse around the shafts. | |
415 | ||
416 | TGeoRotation *rot2 = new TGeoRotation("rot1",0, 0, 90, 0, 90, 90 ); | |
417 | ||
418 | //---> Around the PX24, the open section. OK | |
419 | ||
420 | ptubs[0] = px24radius + concreteWidth; | |
421 | ptubs[1] = ptubs[0] + 1000; | |
422 | ptubs[2] = (2300 - (5150 - AliACORDEConstants::Instance()->Depth()))/2; | |
423 | ptubs[3] = 180 + kRaddeg*TMath::ASin(1070/ptubs[0]); | |
424 | ptubs[4] = 180 - kRaddeg*TMath::ASin(1070/ptubs[0]); | |
329ce604 | 425 | TGeoVolume *cM06 = acorde->MakeTubs("CM06", vacuum,ptubs[0],ptubs[1],ptubs[2],ptubs[3],ptubs[4]); |
b7b24482 | 426 | TGeoTranslation *tr6 = new TGeoTranslation(px24X, ptubs[2] - AliACORDEConstants::Instance()->Depth()/2, px24Z); |
329ce604 | 427 | cM01->AddNode(cM06,1,tr6); |
b7b24482 | 428 | |
429 | ||
430 | //---> Around the PX24, the closed section. OK | |
431 | ||
432 | Float_t ptube[3]; | |
433 | ptube[0] = px24radius + concreteWidth; | |
434 | ptube[1] = ptube[0] + 1000; | |
435 | ptube[2] = (5150 - 2300)/2; | |
329ce604 | 436 | TGeoVolume *cM07 = acorde->MakeTubs("CM07", vacuum,ptube[0],ptube[1],ptubs[2],ptube[3],ptube[4]); |
b7b24482 | 437 | TGeoTranslation *tr7 = new TGeoTranslation(px24X, AliACORDEConstants::Instance()->Depth()/2-ptube[2], px24Z); |
329ce604 | 438 | cM01->AddNode(cM07,1,tr7); |
b7b24482 | 439 | |
440 | ||
441 | //---> Around PM25. OK | |
442 | ||
443 | ptube[0] = pm25radius + concreteWidth; | |
444 | ptube[1] = ptube[0] + 400; | |
445 | ptube[2] = AliACORDEConstants::Instance()->Depth()/2; | |
329ce604 | 446 | TGeoVolume *cM08 = acorde->MakeTubs("CM08", vacuum,ptube[0],ptube[1],ptube[2],ptube[3],ptube[4]); |
b7b24482 | 447 | TGeoCombiTrans *tr8 = new TGeoCombiTrans(pm25X, 0, pm25Z,rot2); |
329ce604 | 448 | cM01->AddNode(cM08,1,tr8); |
b7b24482 | 449 | |
450 | ||
451 | //---> On both sides of the PM25 along the HALL. | |
452 | ||
453 | pbox[0] = (2100 + pm25radius - 1170)/2; | |
454 | pbox[1] = AliACORDEConstants::Instance()->Depth()/2; | |
455 | pbox[2] = (3*px24radius - pm25radius)/2; | |
329ce604 | 456 | TGeoVolume *cM18 = acorde->MakeBox("CM18",vacuum,pbox[0],pbox[1],pbox[2]); |
b7b24482 | 457 | TGeoTranslation *tr18 = new TGeoTranslation(2100, 0, pbox[2] + pm25radius); |
329ce604 | 458 | cM01->AddNode(cM18,1,tr18); |
b7b24482 | 459 | |
460 | pbox[2] = (1900 - pm25radius)/2; | |
329ce604 | 461 | TGeoVolume *cM19 = acorde->MakeBox("CM19",vacuum,pbox[0],pbox[1],pbox[2]); |
b7b24482 | 462 | TGeoTranslation *tr19 = new TGeoTranslation(2100, 0, -pbox[2] - pm25radius); |
329ce604 | 463 | cM01->AddNode(cM19,1,tr19); |
b7b24482 | 464 | |
465 | ||
466 | //---> Around the PGC2. OK | |
467 | ||
468 | ptube[0] = pgc2radius + concreteWidth; | |
469 | ptube[1] = 2987.7 - 740; | |
470 | ptube[2] = AliACORDEConstants::Instance()->Depth()/2; | |
329ce604 | 471 | TGeoVolume *cM09 = acorde->MakeTubs("CM09",vacuum,ptube[0],ptube[1],ptube[2],ptube[3],ptube[4]); |
b7b24482 | 472 | TGeoCombiTrans *tr09 = new TGeoCombiTrans(pgc2X, 0, pgc2Z,rot2); |
329ce604 | 473 | cM01->AddNode(cM09,1,tr09); |
b7b24482 | 474 | |
475 | //---> On both sides of the PGC2.OK | |
476 | ||
477 | pbox[0] = (AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad)-1100 - 375)/2; | |
478 | pbox[1] = AliACORDEConstants::Instance()->Depth()/2; | |
479 | pbox[2] = pgc2radius + concreteWidth; | |
329ce604 | 480 | TGeoVolume *cM10 = acorde->MakeBox("CM10",vacuum,pbox[0],pbox[1],pbox[2]); |
b7b24482 | 481 | TGeoTranslation *tr10 = new TGeoTranslation(AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad) - pbox[0], 0, pgc2Z); |
329ce604 | 482 | TGeoTranslation *tr10a = new TGeoTranslation(-AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad) + pbox[0], 0, pgc2Z); |
483 | cM01->AddNode(cM10,1,tr10); | |
484 | cM01->AddNode(cM10,2,tr10a); | |
b7b24482 | 485 | |
486 | ||
487 | //---> big block of molasse behind the PX24. OK | |
488 | ||
489 | pbox[0] = AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad); | |
490 | pbox[1] = AliACORDEConstants::Instance()->Depth()/2; | |
491 | pbox[2] = (pbox[0] - (2300 + 1150 + 100))/2; | |
329ce604 | 492 | TGeoVolume *cM12 = acorde->MakeBox("CM12",vacuum,pbox[0],pbox[1],pbox[2]); |
b7b24482 | 493 | TGeoTranslation *tr12 = new TGeoTranslation(px24X, 0, px24Z + px24radius + concreteWidth + pbox[2]); |
329ce604 | 494 | cM01->AddNode(cM12,1,tr12); |
b7b24482 | 495 | |
496 | ||
497 | //---> big block of molasse in the opposite side of the PM25. OK | |
498 | ||
499 | pbox[0] = (AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad)-1150)/2; | |
500 | pbox[1] = AliACORDEConstants::Instance()->Depth()/2; | |
501 | pbox[2] = (1900 + 2300 + 1150)/2; | |
329ce604 | 502 | TGeoVolume *cM13 = acorde->MakeBox("CM13",vacuum,pbox[0],pbox[1],pbox[2]); |
b7b24482 | 503 | TGeoTranslation *tr13 = new TGeoTranslation(-1150 - pbox[0], 0, pbox[2] - 1900); |
329ce604 | 504 | cM01->AddNode(cM13,1,tr13); |
b7b24482 | 505 | |
506 | ||
507 | //---> big block of molasse behind the PM25. OK | |
508 | ||
509 | pbox[0] = (AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad)-(2100 + 910/2 + 100))/2; | |
510 | pbox[1] = AliACORDEConstants::Instance()->Depth()/2; | |
511 | pbox[2] = (1900 + 2300 + 1150)/2; | |
329ce604 | 512 | TGeoVolume *cM14 = acorde->MakeBox("CM14",vacuum,pbox[0],pbox[1],pbox[2]); |
b7b24482 | 513 | TGeoTranslation *tr14 = new TGeoTranslation(pm25X + pm25radius + concreteWidth + pbox[0], 0, pbox[2] - 1900); |
329ce604 | 514 | cM01->AddNode(cM14,1,tr14); |
b7b24482 | 515 | |
516 | ||
517 | //---> big block of molasse behind the PGC2. OK | |
518 | ||
519 | pbox[0] = AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad); | |
520 | pbox[1] = AliACORDEConstants::Instance()->Depth()/2; | |
521 | pbox[2] = (pbox[0] - (2987.7 + 1900 + 1100/2 + 100))/2; | |
329ce604 | 522 | TGeoVolume *cM15 = acorde->MakeBox("CM15",vacuum,pbox[0],pbox[1],pbox[2]); |
b7b24482 | 523 | TGeoTranslation *tr15 = new TGeoTranslation(0, 0, -pbox[0] + pbox[2]); |
329ce604 | 524 | TGeoTranslation *tr15a = new TGeoTranslation(0,AliACORDEConstants::Instance()->Depth()/2,0); |
525 | cM01->AddNode(cM15,1,tr15); | |
526 | cM01->AddNode(cM01,1,tr15a); | |
b7b24482 | 527 | |
528 | } | |
529 | ||
530 | void AliACORDEv1::CreateAcorde() | |
531 | { | |
532 | ||
533 | ||
534 | // _______________________________________________________________________________ | |
535 | // | | | |
536 | // | | | |
537 | // | **** Acorde's Geometry using the TGeo Class....January 2008 **** | | |
538 | // | | | |
539 | // | ACORDE--> Volume for ACORDE in Alice's Magnet | | |
540 | // | ACORDE1_a--> Volume for frame of Acorde's Module | | |
541 | // | ACORDE10--> Volume for frame of Acorde's Module | | |
542 | // | ACORDE2--> Volume for scintillators in Acorde's Module | | |
543 | // | ACORDE7--> Volume for bars | | |
544 | // | ACORDE7_1--> Volume for side's bars | | |
545 | // | ACORDE8--> Volume for supports | | |
546 | // | ACORDE9--> Volume for supports | | |
547 | // | ACORDE_SUPPORT--> Volume that contains a full Acorde's support | | |
548 | // | ACORDE_MODULE--> Volume that contains a full Acorde's module | | |
549 | // | ACORDE_1--> Volume that contains the bars&supports in-face | | |
550 | // | ACORDE_2--> Volume that contains the bars&supports up-face | | |
551 | // | ACORDE_3--> Volume that contains the bars&supports out-face | | |
552 | // | ACORDE_4--> Volume that contains the modules of ACORDE in-face | | |
553 | // | ACORDE_5--> Volume that contains the modules of ACORDE up-face | | |
554 | // | ACORDE_6--> Volume that contains the modules of ACORDE out-face | | |
555 | // | | | |
556 | // |_______________________________________________________________________________| | |
557 | ||
558 | ||
559 | // Call the global constants for the Modules | |
560 | ||
561 | AliACORDEConstants* constants = AliACORDEConstants::Instance(); | |
562 | ||
563 | // Get the Alice Volume | |
564 | ||
565 | TGeoVolume *alice = gGeoManager->GetVolume("ALIC"); | |
566 | ||
567 | // Define some materials & medium | |
568 | ||
569 | //*** Support & Bars*** | |
570 | ||
4ca41d2c | 571 | TGeoMedium* al = gGeoManager->GetMedium("ACORDE_ALU_C0"); |
572 | TGeoMedium* med6 = gGeoManager->GetMedium("ACORDE_CPV scint.1"); | |
b7b24482 | 573 | |
574 | //Define a FULL-ACORDE-VOLUME | |
575 | ||
329ce604 | 576 | TGeoVolume *aCORDE = new TGeoVolumeAssembly("ACORDE"); |
b7b24482 | 577 | |
578 | ||
579 | // Define 6 master volumes for ACORDE | |
580 | ||
329ce604 | 581 | TGeoVolume *inFace = new TGeoVolumeAssembly("ACORDE_1"); |
582 | TGeoVolume *upFace = new TGeoVolumeAssembly("ACORDE_2"); | |
583 | TGeoVolume *outFace = new TGeoVolumeAssembly("ACORDE_3"); | |
b7b24482 | 584 | |
329ce604 | 585 | TGeoVolume *inFacem = new TGeoVolumeAssembly("ACORDE_4"); |
586 | TGeoVolume *upFacem = new TGeoVolumeAssembly("ACORDE_5"); | |
587 | TGeoVolume *outFacem = new TGeoVolumeAssembly("ACORDE_6"); | |
f957acf5 | 588 | TGeoVolume *modules = new TGeoVolumeAssembly("ACORDE_MODULES"); |
b7b24482 | 589 | |
590 | // Define global variables | |
591 | ||
592 | Float_t box[3]; | |
593 | Int_t count; | |
594 | Float_t dy=10;//-->displacement of the support and bars of ACORDE | |
595 | Float_t dy2=66.5;//-->displacement of the support and bars of ACORDE | |
329ce604 | 596 | Float_t placedAt; |
b7b24482 | 597 | Float_t small=0.05; |
598 | ||
599 | // Define the position of support and bars for the sides faces | |
600 | ||
601 | Float_t des = 22*0.7071; | |
602 | ||
603 | // Define rotation Matrix for Side's faces in Alice | |
604 | ||
605 | TGeoRotation *idrotm231 = new TGeoRotation("idrotm231",90, 45, 90, 135, 0, 0); | |
606 | TGeoRotation *idrotm232 = new TGeoRotation("idrotm232",90, 315, 90, 45, 0, 0); | |
607 | ||
608 | // Begin the Geometry of the structure for ACORDE | |
609 | ||
610 | // *** Definition of ACORDE's Modules *** | |
611 | ||
612 | // Define Measures of ACORDE's Modules | |
613 | ||
614 | box[0] = constants->ModuleLength()/2; | |
615 | box[1] = constants->ModuleHeight()/2; | |
616 | box[2] = constants->ModuleWidth()/2; | |
617 | ||
618 | // Define Measures of Scintillators | |
619 | ||
620 | Float_t pbox[3]; | |
621 | pbox[0] = constants->PlasticLength()/2; | |
622 | pbox[1] = constants->PlasticHeight()/2; | |
623 | pbox[2] = constants->PlasticWidth()/2; | |
624 | ||
625 | ||
626 | // Create the Modules, Scintillators & Metallic Frame | |
627 | ||
628 | //*** Aluminium frame *** | |
629 | ||
630 | TGeoBBox *acorde1 = new TGeoBBox("acorde1",box[0],box[1],26/20+2); | |
631 | TGeoBBox *acorde10 = new TGeoBBox("acorde10",26/20,box[1],box[2]+3); | |
329ce604 | 632 | TGeoVolume *aCORDE1qa = new TGeoVolume("ACORDE1_a",acorde1,al); |
633 | TGeoVolume *aCORDE10 = new TGeoVolume("ACORDE10",acorde10,al); | |
b7b24482 | 634 | |
635 | //*** Scintillators *** | |
636 | ||
637 | TGeoBBox *acorde2 = new TGeoBBox("acorde2",pbox[0],pbox[1],pbox[2]); | |
329ce604 | 638 | TGeoVolume *aCORDE2 = new TGeoVolume("ACORDE2",acorde2,med6); |
b7b24482 | 639 | |
640 | ||
641 | // Here I define & construct a Master Volume ("ACORDE_MODULE") for one Module in ACORDE | |
642 | ||
643 | TGeoVolume *module = new TGeoVolumeAssembly("ACORDE_MODULE"); | |
329ce604 | 644 | module->AddNode(aCORDE1qa,1,new TGeoTranslation("aco1",0,0,13)); |
645 | module->AddNode(aCORDE1qa,2,new TGeoTranslation("aco10",0,0,-13)); | |
646 | module->AddNode(aCORDE10,3,new TGeoTranslation("aco10",293/2+5,0,0)); | |
647 | module->AddNode(aCORDE10,4,new TGeoTranslation("aco10",-293/2-5,0,0)); | |
648 | placedAt = pbox[1]+constants->ProfileThickness()-constants->ModuleHeight()/2+small; | |
649 | module->AddNode(aCORDE2,5,new TGeoTranslation("aco2",placedAt,0,0)); | |
650 | placedAt = placedAt + 2.0*pbox[1]+small; | |
651 | module->AddNode(aCORDE2,6,new TGeoTranslation("aco2",placedAt,-1,0)); | |
b7b24482 | 652 | Float_t w1 = 8; |
653 | ||
654 | ||
655 | ||
656 | ||
657 | // Put the Modules of In-Face | |
658 | ||
659 | count=1; | |
660 | for(Int_t i=2;i<10;i++){ | |
661 | ||
662 | Float_t posx = constants->ModulePositionX(i-1); | |
663 | Float_t posy = constants->ModulePositionY(i-1); | |
664 | Float_t posz = constants->ModulePositionZ(i-1); | |
665 | ||
f957acf5 | 666 | modules->AddNode(module,i-1, |
b7b24482 | 667 | new TGeoCombiTrans("aco01",posx,posy-w1,posz,idrotm232)); |
668 | count++; | |
669 | ||
670 | } | |
671 | ||
672 | count=9; | |
673 | for(Int_t i=11;i<21;i++){ | |
674 | Float_t posx = constants->ModulePositionX(i-1); | |
675 | Float_t posy = constants->ModulePositionY(i-1); | |
676 | Float_t posz = constants->ModulePositionZ(i-1); | |
677 | ||
f957acf5 | 678 | modules->AddNode(module,i-1, |
b7b24482 | 679 | new TGeoCombiTrans("aco01",posx,posy-w1,posz,idrotm232)); |
680 | } | |
681 | ||
682 | // Put he Modules of Up-Face | |
683 | ||
684 | count=1; | |
685 | for(Int_t i=21;i<41;i++){ | |
686 | Float_t posx = constants->ModulePositionX(i-1); | |
687 | Float_t posy = constants->ModulePositionY(i-1); | |
688 | Float_t posz = constants->ModulePositionZ(i-1); | |
689 | ||
f957acf5 | 690 | modules->AddNode(module,i-1,new TGeoTranslation("aco01",posx,posy,posz)); |
b7b24482 | 691 | count++; |
692 | } | |
693 | ||
694 | // Put the Modules of Out-Face | |
695 | ||
696 | count=1; | |
697 | for(Int_t i=41;i<51;i++){ | |
698 | Float_t posx = constants->ModulePositionX(i-1); | |
699 | Float_t posy = constants->ModulePositionY(i-1); | |
700 | Float_t posz = constants->ModulePositionZ(i-1); | |
701 | ||
f957acf5 | 702 | modules->AddNode(module,i-1, |
b7b24482 | 703 | new TGeoCombiTrans("aco01",posx,posy-w1,posz,idrotm231)); |
704 | count++; | |
705 | } | |
706 | ||
707 | // Put the Modules of Out-Face | |
708 | ||
709 | count=11; | |
710 | for(Int_t i=52;i<60;i++){ | |
711 | Float_t posx = constants->ModulePositionX(i-1); | |
712 | Float_t posy = constants->ModulePositionY(i-1); | |
713 | Float_t posz = constants->ModulePositionZ(i-1); | |
714 | if ((i==57) || (i==56)) | |
f957acf5 | 715 | modules->AddNode(module,i-1, |
b7b24482 | 716 | new TGeoCombiTrans("aco01",posx,posy-w1,posz-w1,idrotm231)); |
717 | else | |
f957acf5 | 718 | modules->AddNode(module,i-1, |
b7b24482 | 719 | new TGeoCombiTrans("aco01",posx,posy-w1,posz,idrotm231)); |
720 | count++; | |
721 | } | |
722 | ||
723 | ||
724 | // Put th Modules ITS-ACORDE | |
725 | ||
726 | if (GetITSGeometry()) { | |
727 | ||
f957acf5 | 728 | modules->AddNode(module,9,new TGeoTranslation("its1", |
b7b24482 | 729 | constants->ExtraModulePositionX(), |
730 | constants->ExtraModulePositionY(), | |
731 | constants->ExtraModulePositionZ(0))); | |
732 | ||
f957acf5 | 733 | modules->AddNode(module,50,new TGeoTranslation("its2", |
b7b24482 | 734 | constants->ExtraModulePositionX(), |
735 | constants->ExtraModulePositionY(), | |
736 | constants->ExtraModulePositionZ(1))); | |
737 | ||
f957acf5 | 738 | modules->AddNode(module,59,new TGeoTranslation("its3", |
b7b24482 | 739 | constants->ExtraModulePositionX(), |
740 | constants->ExtraModulePositionY(), | |
741 | constants->ExtraModulePositionZ(2))); | |
742 | ||
f957acf5 | 743 | modules->AddNode(module,60,new TGeoTranslation("its4", |
b7b24482 | 744 | constants->ExtraModulePositionX(), |
745 | constants->ExtraModulePositionY(), | |
746 | constants->ExtraModulePositionZ(3))); | |
747 | ||
748 | ||
749 | } | |
750 | else { | |
751 | ||
752 | ||
f957acf5 | 753 | modules->AddNode(module,61,new TGeoTranslation("its1", |
b7b24482 | 754 | constants->ModulePositionX(0), |
755 | constants->ModulePositionY(0), | |
756 | constants->ModulePositionZ(0))); | |
757 | ||
f957acf5 | 758 | modules->AddNode(module,62,new TGeoTranslation("its2", |
b7b24482 | 759 | constants->ModulePositionX(9), |
760 | constants->ModulePositionY(9), | |
761 | constants->ModulePositionZ(9))); | |
762 | ||
f957acf5 | 763 | modules->AddNode(module,63,new TGeoTranslation("its3", |
b7b24482 | 764 | constants->ModulePositionX(50), |
765 | constants->ModulePositionY(50), | |
766 | constants->ModulePositionZ(50))); | |
767 | ||
f957acf5 | 768 | modules->AddNode(module,64,new TGeoTranslation("its4", |
b7b24482 | 769 | constants->ModulePositionX(59), |
770 | constants->ModulePositionY(59), | |
771 | constants->ModulePositionZ(59))); | |
772 | ||
773 | } // end if (fITSGeometry) | |
774 | ||
775 | ||
776 | ||
777 | //*** Begin the structure of support & bars for ACORDE *** | |
778 | ||
779 | // Define a volume for the bars (up-face) | |
780 | ||
781 | box[0]=5; | |
d6ae5763 | 782 | // box[1]=40; |
783 | box[1]=33; | |
b7b24482 | 784 | box[2]=5; |
785 | Float_t z1 = 21 ; | |
786 | TGeoBBox *acorde00 = new TGeoBBox("acorde00",box[0],box[1],box[2]); | |
787 | ||
329ce604 | 788 | TGeoVolume *aCORDE00 = new TGeoVolume("ACORDE00",acorde00,al); |
b7b24482 | 789 | |
790 | count=25; | |
791 | for (Int_t ma=20;ma<=24;ma++) | |
792 | { | |
793 | TGeoTranslation *aco00=new TGeoTranslation("aco00", | |
794 | constants->ModulePositionX(ma)-0.5*293+dy2, | |
795 | constants->ModulePositionY(ma)-box[1]-z1, | |
796 | constants->ModulePositionZ(ma)); | |
797 | ||
329ce604 | 798 | upFace->AddNode(aCORDE00,count,aco00); |
b7b24482 | 799 | |
329ce604 | 800 | TGeoTranslation *aco00q1=new TGeoTranslation("aco00q1", |
b7b24482 | 801 | -(constants->ModulePositionX(ma)-0.5*293+dy2), |
802 | constants->ModulePositionY(ma)-box[1]-z1, | |
803 | constants->ModulePositionZ(ma)); | |
329ce604 | 804 | upFace->AddNode(aCORDE00,count+1,aco00q1); |
b7b24482 | 805 | |
329ce604 | 806 | TGeoTranslation *aco00q2=new TGeoTranslation("aco00q2", |
b7b24482 | 807 | constants->ModulePositionX(ma)+0.5*293-dy2, |
808 | constants->ModulePositionY(ma)-box[1]-z1, | |
809 | constants->ModulePositionZ(ma)); | |
329ce604 | 810 | upFace->AddNode(aCORDE00,count+2,aco00q2); |
b7b24482 | 811 | |
329ce604 | 812 | TGeoTranslation *aco00q3=new TGeoTranslation("aco00q3", |
b7b24482 | 813 | -(constants->ModulePositionX(ma)+0.5*293-dy2), |
814 | constants->ModulePositionY(ma)-box[1]-z1, | |
815 | constants->ModulePositionZ(ma)); | |
329ce604 | 816 | upFace->AddNode(aCORDE00,count+3,aco00q3); |
b7b24482 | 817 | count=count+4; |
818 | ||
819 | ma++; | |
820 | } | |
821 | ||
822 | count=41; | |
823 | for(Int_t ma=25;ma<=29;ma++) | |
824 | { | |
825 | TGeoTranslation *aco00=new TGeoTranslation("aco00", | |
826 | constants->ModulePositionX(ma)-0.5*293+dy2, | |
827 | constants->ModulePositionY(ma)-box[1]-z1, | |
828 | constants->ModulePositionZ(ma)); | |
329ce604 | 829 | upFace->AddNode(aCORDE00,count,aco00); |
b7b24482 | 830 | |
329ce604 | 831 | TGeoTranslation *aco00q1=new TGeoTranslation("aco00q1", |
b7b24482 | 832 | -(constants->ModulePositionX(ma)-0.5*293+dy2), |
833 | constants->ModulePositionY(ma)-box[1]-z1, | |
834 | constants->ModulePositionZ(ma)); | |
329ce604 | 835 | upFace->AddNode(aCORDE00,count+1,aco00q1); |
b7b24482 | 836 | |
329ce604 | 837 | TGeoTranslation *aco00q2=new TGeoTranslation("aco00q2", |
b7b24482 | 838 | constants->ModulePositionX(ma)+0.5*293-dy2, |
839 | constants->ModulePositionY(ma)-box[1]-z1, | |
840 | constants->ModulePositionZ(ma)); | |
329ce604 | 841 | upFace->AddNode(aCORDE00,count+2,aco00q2); |
b7b24482 | 842 | |
329ce604 | 843 | TGeoTranslation *aco00q3=new TGeoTranslation("aco00q3", |
b7b24482 | 844 | -(constants->ModulePositionX(ma)+0.5*293-dy2), |
845 | constants->ModulePositionY(ma)-box[1]-z1, | |
846 | constants->ModulePositionZ(ma)); | |
329ce604 | 847 | upFace->AddNode(aCORDE00,count+3,aco00q3); |
b7b24482 | 848 | count=count+4; |
849 | ma++; | |
850 | } | |
851 | ||
852 | TGeoTranslation *c1 = new TGeoTranslation ("c1", | |
853 | constants->ModulePositionX(20)-0.5*293, | |
854 | constants->ModulePositionY(20)-box[1]-z1, | |
855 | constants->ModulePositionZ(20)-40); | |
856 | TGeoTranslation *c2 = new TGeoTranslation ("c2", | |
857 | constants->ModulePositionX(23)-0.5*293, | |
858 | constants->ModulePositionY(23)-box[1]-z1, | |
859 | constants->ModulePositionZ(23)-40); | |
860 | TGeoTranslation *c3 = new TGeoTranslation ("c3", | |
861 | constants->ModulePositionX(24)-0.5*293, | |
862 | constants->ModulePositionY(24)-box[1]-z1, | |
863 | constants->ModulePositionZ(25)-40); | |
864 | TGeoTranslation *c4 = new TGeoTranslation ("c4", | |
865 | constants->ModulePositionX(27)-0.5*293, | |
866 | constants->ModulePositionY(27)-box[1]-z1, | |
867 | constants->ModulePositionZ(28)-40); | |
329ce604 | 868 | upFace->AddNode(aCORDE00,57,c1); |
869 | upFace->AddNode(aCORDE00,58,c2); | |
870 | upFace->AddNode(aCORDE00,59,c3); | |
871 | upFace->AddNode(aCORDE00,60,c4); | |
b7b24482 | 872 | |
873 | ||
874 | // Construct Bars for lateral supports (up-face) | |
875 | ||
876 | TGeoTranslation *aco00=new TGeoTranslation("aco00", | |
877 | constants->ModulePositionX(20)+0.5*293-dy, | |
878 | constants->ModulePositionY(20)-box[1]-z1, | |
879 | constants->ModulePositionZ(20)-40); | |
329ce604 | 880 | upFace->AddNode(aCORDE00,61,aco00); |
b7b24482 | 881 | |
329ce604 | 882 | TGeoTranslation *aco00q1=new TGeoTranslation("aco00q1", |
b7b24482 | 883 | constants->ModulePositionX(23)+0.5*293-dy, |
884 | constants->ModulePositionY(23)-box[1]-z1, | |
885 | constants->ModulePositionZ(23)-40); | |
329ce604 | 886 | upFace->AddNode(aCORDE00,62,aco00q1); |
b7b24482 | 887 | |
329ce604 | 888 | TGeoTranslation *aco00q2=new TGeoTranslation("aco00q2", |
b7b24482 | 889 | constants->ModulePositionX(24)+0.5*293-dy, |
890 | constants->ModulePositionY(24)-box[1]-z1, | |
891 | constants->ModulePositionZ(25)-40); | |
329ce604 | 892 | upFace->AddNode(aCORDE00,63,aco00q2); |
b7b24482 | 893 | |
329ce604 | 894 | TGeoTranslation *aco00q3=new TGeoTranslation("aco00q3", |
b7b24482 | 895 | constants->ModulePositionX(27)+0.5*293-dy, |
896 | constants->ModulePositionY(27)-box[1]-z1, | |
897 | constants->ModulePositionZ(28)-40); | |
329ce604 | 898 | upFace->AddNode(aCORDE00,64,aco00q3); |
b7b24482 | 899 | |
900 | ||
901 | TGeoTranslation *aco01=new TGeoTranslation("aco01", | |
902 | constants->ModulePositionX(30)-0.5*293+dy, | |
903 | constants->ModulePositionY(30)-box[1]-z1, | |
904 | constants->ModulePositionZ(30)-40); | |
329ce604 | 905 | upFace->AddNode(aCORDE00,65,aco01); |
b7b24482 | 906 | |
329ce604 | 907 | TGeoTranslation *aco01q1=new TGeoTranslation("aco01q1", |
b7b24482 | 908 | constants->ModulePositionX(33)-0.5*293+dy, |
909 | constants->ModulePositionY(33)-box[1]-z1, | |
910 | constants->ModulePositionZ(33)-40); | |
329ce604 | 911 | upFace->AddNode(aCORDE00,66,aco01q1); |
b7b24482 | 912 | |
329ce604 | 913 | TGeoTranslation *aco01q2=new TGeoTranslation("aco01q2", |
b7b24482 | 914 | constants->ModulePositionX(34)-0.5*293+dy, |
915 | constants->ModulePositionY(34)-box[1]-z1, | |
916 | constants->ModulePositionZ(35)-40); | |
329ce604 | 917 | upFace->AddNode(aCORDE00,67,aco01q2); |
b7b24482 | 918 | |
329ce604 | 919 | TGeoTranslation *aco01q3=new TGeoTranslation("aco01q3", |
b7b24482 | 920 | constants->ModulePositionX(37)-0.5*293+dy, |
921 | constants->ModulePositionY(37)-box[1]-z1, | |
922 | constants->ModulePositionZ(38)-40); | |
329ce604 | 923 | upFace->AddNode(aCORDE00,68,aco01q3); |
b7b24482 | 924 | |
925 | ||
926 | ||
927 | // Acorde's support bars (side's faces) | |
928 | ||
929 | //*** In Face *** | |
930 | ||
d6ae5763 | 931 | // box[0]=39; |
932 | box[0]=27; | |
b7b24482 | 933 | box[1]=5; |
934 | box[2]=5; | |
d6ae5763 | 935 | Float_t kro=3; |
b7b24482 | 936 | Float_t q1=0; |
937 | Float_t posx=constants->ModulePositionX(0)+0.5*293*0.7071-56*0.7071-18; | |
d6ae5763 | 938 | Float_t posy=constants->ModulePositionY(0)-0.5*293*0.7071-56*0.7071+3-q1+kro; |
b7b24482 | 939 | Float_t posz=constants->ModulePositionZ(0); |
940 | ||
941 | TGeoBBox *acorde7 = new TGeoBBox("acorde7",box[0],box[1],box[2]); | |
942 | ||
329ce604 | 943 | TGeoVolume *aCORDE7 = new TGeoVolume("ACORDE7",acorde7,al); |
b7b24482 | 944 | |
945 | TGeoCombiTrans *aco7 = new TGeoCombiTrans("aco7",posx,posy,posz-4*dy,idrotm231); | |
329ce604 | 946 | TGeoCombiTrans *aco7q1 = new TGeoCombiTrans("aco7q1",posx,posy, |
b7b24482 | 947 | constants->ModulePositionZ(3)-4*dy,idrotm231); |
329ce604 | 948 | TGeoCombiTrans *aco7q2 = new TGeoCombiTrans("aco7q2",posx,posy, |
b7b24482 | 949 | constants->ModulePositionZ(5)-4*dy,idrotm231); |
329ce604 | 950 | TGeoCombiTrans *aco7q3 = new TGeoCombiTrans("aco7q3",posx,posy, |
b7b24482 | 951 | constants->ModulePositionZ(8)-4*dy,idrotm231); |
952 | ||
329ce604 | 953 | inFace->AddNode(aCORDE7,20,aco7); |
954 | inFace->AddNode(aCORDE7,21,aco7q1); | |
955 | inFace->AddNode(aCORDE7,22,aco7q2); | |
956 | inFace->AddNode(aCORDE7,23,aco7q3); | |
b7b24482 | 957 | |
958 | ||
959 | count=24; | |
960 | for(Int_t dy=0;dy<=4;dy++) | |
961 | { | |
962 | ||
963 | Float_t posx1=constants->ModulePositionX(dy)+0.1*293*0.7071-56*0.7071-18+des; | |
d6ae5763 | 964 | Float_t posy1=constants->ModulePositionY(dy)-0.1*293*0.7071-56*0.7071+3-des-q1+kro; |
b7b24482 | 965 | Float_t posz=constants->ModulePositionZ(dy); |
966 | Float_t posx2=constants->ModulePositionX(dy)-0.27*293*0.7071-56*0.7071-18+des; | |
d6ae5763 | 967 | Float_t posy2=constants->ModulePositionY(dy)+0.27*293*0.7071-56*0.7071+3-des-q1+kro; |
329ce604 | 968 | TGeoCombiTrans *aco7q4 = new TGeoCombiTrans("aco7q4",posx1,posy1,posz,idrotm231); |
969 | TGeoCombiTrans *aco7q5 = new TGeoCombiTrans("aco7q5",posx2,posy2,posz,idrotm231); | |
970 | inFace->AddNode(aCORDE7,count,aco7q4); | |
971 | inFace->AddNode(aCORDE7,count+1,aco7q5); | |
b7b24482 | 972 | count=count+2; |
973 | dy++; | |
974 | } | |
975 | ||
976 | ||
977 | count=34; | |
978 | for(Int_t dy=5;dy<=9;dy++) | |
979 | { | |
980 | ||
981 | Float_t posx1=constants->ModulePositionX(dy)+0.1*293*0.7071-56*0.7071-18+des; | |
d6ae5763 | 982 | Float_t posy1=constants->ModulePositionY(dy)-0.1*293*0.7071-56*0.7071+3-des-q1+kro; |
b7b24482 | 983 | Float_t posz=constants->ModulePositionZ(dy+10); |
984 | Float_t posx2=constants->ModulePositionX(dy)-0.27*293*0.7071-56*0.7071-18+des; | |
d6ae5763 | 985 | Float_t posy2=constants->ModulePositionY(dy)+0.27*293*0.7071-56*0.7071+3-des-q1+kro; |
329ce604 | 986 | TGeoCombiTrans *aco7q6 = new TGeoCombiTrans("aco7q6",posx1,posy1,posz,idrotm231); |
987 | TGeoCombiTrans *aco7q7 = new TGeoCombiTrans("aco7q7",posx2,posy2,posz,idrotm231); | |
988 | inFace->AddNode(aCORDE7,count,aco7q6); | |
989 | inFace->AddNode(aCORDE7,count+1,aco7q7); | |
b7b24482 | 990 | count=count+2; |
991 | dy++; | |
992 | } | |
993 | ||
994 | ||
995 | ||
329ce604 | 996 | Float_t posxq1=constants->ModulePositionX(10)+0.5*293*0.7071-56*0.7071-18; |
d6ae5763 | 997 | Float_t posyq1=constants->ModulePositionY(10)-0.5*293*0.7071-56*0.7071+3-q1+kro; |
329ce604 | 998 | Float_t poszq1=constants->ModulePositionZ(10); |
999 | TGeoCombiTrans *aco7q8 = new TGeoCombiTrans("aco7q8",posxq1,posyq1,poszq1-4*dy,idrotm231); | |
1000 | TGeoCombiTrans *aco7q9 = new TGeoCombiTrans("aco7q9",posxq1,posyq1, | |
b7b24482 | 1001 | constants->ModulePositionZ(13)-4*dy,idrotm231); |
329ce604 | 1002 | TGeoCombiTrans *aco7q10 = new TGeoCombiTrans("aco7q10",posxq1,posyq1, |
b7b24482 | 1003 | constants->ModulePositionZ(15)-4*dy,idrotm231); |
329ce604 | 1004 | TGeoCombiTrans *aco7q11 = new TGeoCombiTrans("aco7q11",posxq1,posyq1, |
b7b24482 | 1005 | constants->ModulePositionZ(18)-4*dy,idrotm231); |
329ce604 | 1006 | inFace->AddNode(aCORDE7,44,aco7q8); |
1007 | inFace->AddNode(aCORDE7,45,aco7q9); | |
1008 | inFace->AddNode(aCORDE7,46,aco7q10); | |
1009 | inFace->AddNode(aCORDE7,47,aco7q11); | |
b7b24482 | 1010 | |
1011 | ||
1012 | count=48; | |
1013 | for(Int_t dy=10;dy<=14;dy++) | |
1014 | ||
1015 | { | |
1016 | ||
1017 | Float_t posx1=constants->ModulePositionX(dy)+0.1*293*0.7071-56*0.7071-18+des; | |
d6ae5763 | 1018 | Float_t posy1=constants->ModulePositionY(dy)-0.1*293*0.7071-56*0.7071+3-des-0.8+kro; |
b7b24482 | 1019 | Float_t posz=constants->ModulePositionZ(dy); |
1020 | Float_t posx2=constants->ModulePositionX(dy)-0.27*293*0.7071-56*0.7071-18+des; | |
d6ae5763 | 1021 | Float_t posy2=constants->ModulePositionY(dy)+0.27*293*0.7071-56*0.7071+3-des-1.5-0.8+kro; |
b7b24482 | 1022 | TGeoRotation *rot1 = new TGeoRotation(); |
1023 | rot1->RotateZ(70); | |
329ce604 | 1024 | TGeoCombiTrans *aco7q12 = new TGeoCombiTrans("aco7q12",posx1,posy1,posz,idrotm231); |
1025 | TGeoCombiTrans *aco7q13 = new TGeoCombiTrans("aco7q13",posx2+15,posy2-10,posz,rot1); | |
1026 | inFace->AddNode(aCORDE7,count,aco7q12); | |
1027 | inFace->AddNode(aCORDE7,count+1,aco7q13);// bars 25 grades | |
b7b24482 | 1028 | count=count+2; |
1029 | dy++; | |
1030 | } | |
1031 | ||
1032 | ||
1033 | count=57; | |
1034 | for(Int_t dy=15;dy<=19;dy++) | |
1035 | ||
1036 | { | |
1037 | ||
1038 | Float_t posx1=constants->ModulePositionX(dy)+0.1*293*0.7071-56*0.7071-18+des; | |
d6ae5763 | 1039 | Float_t posy1=constants->ModulePositionY(dy)-0.1*293*0.7071-56*0.7071+3-des-q1-0.8+kro; |
b7b24482 | 1040 | Float_t posz=constants->ModulePositionZ(dy); |
1041 | Float_t posx2=constants->ModulePositionX(dy)-0.27*293*0.7071-56*0.7071-18+des; | |
d6ae5763 | 1042 | Float_t posy2=constants->ModulePositionY(dy)+0.27*293*0.7071-56*0.7071+3-des-1.5-q1-0.8+kro; |
b7b24482 | 1043 | TGeoRotation *rot1 = new TGeoRotation(); |
1044 | rot1->RotateZ(70); | |
329ce604 | 1045 | TGeoCombiTrans *aco7q14 = new TGeoCombiTrans("aco7q14",posx1,posy1,posz,idrotm231); |
1046 | TGeoCombiTrans *aco7q15 = new TGeoCombiTrans("aco7q15",posx2+15,posy2-10,posz,rot1); | |
1047 | inFace->AddNode(aCORDE7,count,aco7q14); | |
1048 | inFace->AddNode(aCORDE7,count+1,aco7q15);// bars 25 grades | |
b7b24482 | 1049 | count=count+2; |
1050 | dy++; | |
1051 | } | |
1052 | ||
1053 | ||
1054 | //*** Out Face *** | |
1055 | ||
d6ae5763 | 1056 | // box[0]=39; |
1057 | box[0]=27; | |
b7b24482 | 1058 | box[1]=5; |
1059 | box[2]=5; | |
1060 | Float_t s1=2.5; | |
329ce604 | 1061 | Float_t posxqa=constants->ModulePositionX(50)-0.5*293*0.7071+56*0.7071+18; |
d6ae5763 | 1062 | Float_t posyqa=constants->ModulePositionY(50)-0.5*293*0.7071-56*0.7071+3-s1+kro; |
329ce604 | 1063 | Float_t poszqa=constants->ModulePositionZ(50); |
1064 | TGeoCombiTrans *aco7q16 = new TGeoCombiTrans("aco7q16", | |
1065 | posxqa,posyqa,poszqa-4*dy,idrotm232); | |
1066 | TGeoCombiTrans *aco7q17 = new TGeoCombiTrans("aco7q17", | |
1067 | posxqa,posyqa, | |
b7b24482 | 1068 | constants->ModulePositionZ(43)-4*dy,idrotm232); |
329ce604 | 1069 | TGeoCombiTrans *aco7q18 = new TGeoCombiTrans("aco7q18",posxqa,posyqa, |
b7b24482 | 1070 | constants->ModulePositionZ(55)-4*dy,idrotm232); |
329ce604 | 1071 | TGeoCombiTrans *aco7q19 = new TGeoCombiTrans("aco7q19",posxqa,posyqa, |
b7b24482 | 1072 | constants->ModulePositionZ(58)-4*dy,idrotm232); |
329ce604 | 1073 | TGeoCombiTrans *aco7q20 = new TGeoCombiTrans("aco7q20", |
b7b24482 | 1074 | constants->ModulePositionX(50)-0.1*293*0.7071 |
1075 | +56*0.7071+18-des, | |
1076 | constants->ModulePositionY | |
1077 | (50)-0.1*293*0.7071-56*0.7071+3-des-s1, | |
1078 | constants->ModulePositionZ(45),idrotm232); | |
329ce604 | 1079 | TGeoCombiTrans *aco7q21 = new TGeoCombiTrans("aco7q21", |
b7b24482 | 1080 | constants->ModulePositionX(50)+0.27*293*0.7071 |
1081 | +56*0.7071+18-des, | |
1082 | constants->ModulePositionY(50) | |
1083 | +0.27*293*0.7071-56*0.7071+3-des-s1, | |
1084 | constants->ModulePositionZ(45),idrotm232); | |
329ce604 | 1085 | outFace->AddNode(aCORDE7,19,aco7q16); |
1086 | outFace->AddNode(aCORDE7,20,aco7q17); | |
1087 | outFace->AddNode(aCORDE7,21,aco7q18); | |
1088 | outFace->AddNode(aCORDE7,22,aco7q19); | |
1089 | outFace->AddNode(aCORDE7,23,aco7q20); | |
1090 | outFace->AddNode(aCORDE7,24,aco7q21); | |
b7b24482 | 1091 | |
1092 | ||
1093 | count=25; | |
1094 | for(Int_t dy=50;dy<=54;dy++) | |
1095 | { | |
1096 | ||
1097 | Float_t posx1=constants->ModulePositionX(dy)-0.1*293*0.7071+56*0.7071+18-des; | |
d6ae5763 | 1098 | Float_t posy1=constants->ModulePositionY(dy)-0.1*293*0.7071-56*0.7071+3-des-s1+kro; |
b7b24482 | 1099 | Float_t posz=constants->ModulePositionZ(dy); |
1100 | Float_t posx2=constants->ModulePositionX(dy)+0.27*293*0.7071+56*0.7071+18-des; | |
d6ae5763 | 1101 | Float_t posy2=constants->ModulePositionY(dy)+0.27*293*0.7071-56*0.7071+3-des-s1+kro; |
329ce604 | 1102 | TGeoCombiTrans *aco7q22 = new TGeoCombiTrans("aco7q22",posx1,posy1,posz,idrotm232); |
1103 | TGeoCombiTrans *aco7q23 = new TGeoCombiTrans("aco7q23",posx2,posy2,posz,idrotm232); | |
1104 | outFace->AddNode(aCORDE7,count,aco7q22); | |
1105 | outFace->AddNode(aCORDE7,count+1,aco7q23); | |
b7b24482 | 1106 | count=count+2; |
1107 | dy++; | |
1108 | } | |
1109 | ||
1110 | ||
1111 | count=35; | |
1112 | for(Int_t dy=57;dy<=59;dy++) | |
1113 | { | |
1114 | ||
1115 | Float_t posx1=constants->ModulePositionX(dy)-0.1*293*0.7071+56*0.7071+18-des; | |
d6ae5763 | 1116 | Float_t posy1=constants->ModulePositionY(dy)-0.1*293*0.7071-56*0.7071+3-des-s1+kro; |
b7b24482 | 1117 | Float_t posz=constants->ModulePositionZ(dy-10); |
1118 | Float_t posx2=constants->ModulePositionX(dy)+0.27*293*0.7071+56*0.7071+18-des; | |
d6ae5763 | 1119 | Float_t posy2=constants->ModulePositionY(dy)+0.27*293*0.7071-56*0.7071+3-des-s1+kro; |
329ce604 | 1120 | TGeoCombiTrans *aco7q24 = new TGeoCombiTrans("aco7q24",posx1,posy1,posz,idrotm232); |
1121 | TGeoCombiTrans *aco7q25 = new TGeoCombiTrans("aco7q25",posx2,posy2,posz,idrotm232); | |
1122 | outFace->AddNode(aCORDE7,count,aco7q24); | |
1123 | outFace->AddNode(aCORDE7,count+1,aco7q25); | |
b7b24482 | 1124 | count=count+2; |
1125 | dy++; | |
1126 | } | |
1127 | ||
1128 | ||
329ce604 | 1129 | Float_t posxqb=constants->ModulePositionX(40)-0.5*293*0.7071+56*0.7071+18; |
d6ae5763 | 1130 | Float_t posyqb=constants->ModulePositionY(40)-0.5*293*0.7071-56*0.7071+3-s1+kro; |
329ce604 | 1131 | Float_t poszqb=constants->ModulePositionZ(40); |
1132 | TGeoCombiTrans *aco7q26 = new TGeoCombiTrans("aco7q26", | |
1133 | posxqb,posyqb,poszqb-4*dy,idrotm232); | |
1134 | TGeoCombiTrans *aco7q27 = new TGeoCombiTrans("aco7q27", | |
1135 | posxqb,posyqb, | |
b7b24482 | 1136 | constants->ModulePositionZ(43)-4*dy,idrotm232); |
329ce604 | 1137 | TGeoCombiTrans *aco7q28 = new TGeoCombiTrans("aco7q28", |
1138 | posxqb,posyqb, | |
b7b24482 | 1139 | constants->ModulePositionZ(45)-4*dy,idrotm232); |
329ce604 | 1140 | TGeoCombiTrans *aco7q29 = new TGeoCombiTrans("aco7q29",posxqb,posyqb, |
b7b24482 | 1141 | constants->ModulePositionZ(48)-4*dy,idrotm232); |
329ce604 | 1142 | outFace->AddNode(aCORDE7,41,aco7q26); |
1143 | outFace->AddNode(aCORDE7,42,aco7q27); | |
1144 | outFace->AddNode(aCORDE7,43,aco7q28); | |
1145 | outFace->AddNode(aCORDE7,44,aco7q29); | |
b7b24482 | 1146 | |
1147 | count=45; | |
1148 | for(Int_t dy=40;dy<=44;dy++) | |
1149 | { | |
1150 | ||
1151 | Float_t posx1=constants->ModulePositionX(dy)-0.1*293*0.7071+56*0.7071+18-des; | |
d6ae5763 | 1152 | Float_t posy1=constants->ModulePositionY(dy)-0.1*293*0.7071-56*0.7071+3-des-s1+kro; |
b7b24482 | 1153 | Float_t posz=constants->ModulePositionZ(dy); |
1154 | Float_t posx2=constants->ModulePositionX(dy)+0.27*293*0.7071+56*0.7071+18-des; | |
d6ae5763 | 1155 | Float_t posy2=constants->ModulePositionY(dy)+0.27*293*0.7071-56*0.7071+3-des-s1+kro; |
b7b24482 | 1156 | TGeoRotation *rot1 = new TGeoRotation(); |
1157 | rot1->RotateZ(105); | |
329ce604 | 1158 | TGeoCombiTrans *aco7q30 = new TGeoCombiTrans("aco7q30",posx1,posy1,posz,idrotm232); |
1159 | TGeoCombiTrans *aco7q31 = new TGeoCombiTrans("aco7q31",posx2-15,posy2-10,posz,rot1); | |
1160 | outFace->AddNode(aCORDE7,count,aco7q30); | |
1161 | outFace->AddNode(aCORDE7,count+1,aco7q31);// bars 25 grades | |
b7b24482 | 1162 | count=count+2; |
1163 | dy++; | |
1164 | } | |
1165 | ||
1166 | ||
1167 | count=55; | |
1168 | for(Int_t dy=45;dy<=49;dy++) | |
1169 | { | |
1170 | ||
1171 | Float_t posx1=constants->ModulePositionX(dy)-0.1*293*0.7071+56*0.7071+18-des; | |
d6ae5763 | 1172 | Float_t posy1=constants->ModulePositionY(dy)-0.1*293*0.7071-56*0.7071+3-des-s1+kro; |
b7b24482 | 1173 | Float_t posz=constants->ModulePositionZ(dy); |
1174 | Float_t posx2=constants->ModulePositionX(dy)+0.27*293*0.7071+56*0.7071+18-des; | |
d6ae5763 | 1175 | Float_t posy2=constants->ModulePositionY(dy)+0.27*293*0.7071-56*0.7071+3-des-s1+kro; |
b7b24482 | 1176 | TGeoRotation *rot1 = new TGeoRotation(); |
1177 | rot1->RotateZ(105); | |
329ce604 | 1178 | TGeoCombiTrans *aco7q32 = new TGeoCombiTrans("aco7q32",posx1,posy1,posz,idrotm232); |
1179 | TGeoCombiTrans *aco7q33 = new TGeoCombiTrans("aco7q33",posx2-15,posy2-10,posz,rot1); | |
1180 | outFace->AddNode(aCORDE7,count,aco7q32); | |
1181 | outFace->AddNode(aCORDE7,count+1,aco7q33);// bars 25 grades | |
b7b24482 | 1182 | count=count+2; |
1183 | dy++; | |
1184 | } | |
1185 | ||
1186 | ||
1187 | ||
1188 | // Set the bars non perpendicular at side faces | |
1189 | ||
1190 | //*** In-Face *** | |
1191 | ||
1192 | box[0]=5; | |
d6ae5763 | 1193 | // box[1]=55.15; |
1194 | box[1]=40; | |
b7b24482 | 1195 | box[2]=5; |
1196 | Float_t sm=2; | |
1197 | Float_t re=1; | |
1198 | Float_t posx1=constants->ModulePositionX(0)+0.5*293*0.7071-4*box[0]-8+re; | |
1199 | Float_t posy1=constants->ModulePositionY(0)-0.5*293*0.7071-box[1]-18-2+sm; | |
1200 | Float_t posz1=constants->ModulePositionZ(0); | |
1201 | ||
329ce604 | 1202 | TGeoBBox *acorde7q1 = new TGeoBBox("acorde7q1",box[0],box[1],box[2]); |
b7b24482 | 1203 | |
329ce604 | 1204 | TGeoVolume *aCORDE7q1 = new TGeoVolume("ACORDE7_1",acorde7q1,al); |
b7b24482 | 1205 | TGeoTranslation *aco71 = new TGeoTranslation("aco71",posx1,posy1,posz1-4*dy); |
1206 | TGeoTranslation *aco72 = new TGeoTranslation("aco72",posx1,posy1, | |
1207 | constants->ModulePositionZ(3)-4*dy); | |
1208 | TGeoTranslation *aco73 = new TGeoTranslation("aco73",posx1,posy1, | |
1209 | constants->ModulePositionZ(5)-4*dy); | |
1210 | TGeoTranslation *aco74 = new TGeoTranslation("aco74",posx1,posy1, | |
1211 | constants->ModulePositionZ(8)-4*dy); | |
329ce604 | 1212 | inFace->AddNode(aCORDE7q1,67,aco71); |
1213 | inFace->AddNode(aCORDE7q1,68,aco72); | |
1214 | inFace->AddNode(aCORDE7q1,69,aco73); | |
1215 | inFace->AddNode(aCORDE7q1,70,aco74); | |
b7b24482 | 1216 | |
1217 | ||
1218 | count=71; | |
1219 | for(Int_t dy=0;dy<=4;dy++) | |
1220 | { | |
1221 | ||
1222 | Float_t posx1=constants->ModulePositionX(dy)+0.1*293*0.7071-4*box[0]-8+des+re; | |
1223 | Float_t posy1=constants->ModulePositionY(dy)-0.1*293*0.7071-box[1]-18-2-des+sm; | |
1224 | Float_t posz1=constants->ModulePositionZ(dy); | |
1225 | Float_t dyx2=constants->ModulePositionX(dy)-0.27*293*0.7071-4*box[0]-8+des+re; | |
1226 | Float_t dyy2=constants->ModulePositionY(dy)+0.27*293*0.7071-box[1]-18-2-des+sm; | |
1227 | TGeoTranslation *aco75=new TGeoTranslation("aco75",posx1,posy1,posz1); | |
1228 | TGeoTranslation *aco76=new TGeoTranslation("aco76",dyx2,dyy2,posz1); | |
329ce604 | 1229 | inFace->AddNode(aCORDE7q1,count,aco75); |
1230 | inFace->AddNode(aCORDE7q1,count+1,aco76); | |
b7b24482 | 1231 | count=count+2; |
1232 | dy++; | |
1233 | } | |
1234 | ||
1235 | ||
1236 | count=81; | |
1237 | for(Int_t dy=5;dy<=9;dy++) | |
1238 | { | |
1239 | ||
1240 | Float_t posx1=constants->ModulePositionX(dy)+0.1*293*0.7071-4*box[0]-8+des+re; | |
1241 | Float_t posy1=constants->ModulePositionY(dy)-0.1*293*0.7071-box[1]-18-2-des+sm; | |
1242 | Float_t posz1=constants->ModulePositionZ(dy+10); | |
1243 | Float_t dyx2=constants->ModulePositionX(dy)-0.27*293*0.7071-4*box[0]-8+des+re; | |
1244 | Float_t dyy2=constants->ModulePositionY(dy)+0.27*293*0.7071-box[1]-18-2-des+sm; | |
1245 | TGeoTranslation *aco75=new TGeoTranslation("aco75",posx1,posy1,posz1); | |
1246 | TGeoTranslation *aco76=new TGeoTranslation("aco76",dyx2,dyy2,posz1); | |
329ce604 | 1247 | inFace->AddNode(aCORDE7q1,count,aco75); |
1248 | inFace->AddNode(aCORDE7q1,count+1,aco76); | |
b7b24482 | 1249 | count=count+2; |
1250 | dy++; | |
1251 | } | |
1252 | ||
1253 | ||
329ce604 | 1254 | Float_t posx1q1=constants->ModulePositionX(10)+0.5*293*0.7071-4*box[0]-8+re; |
1255 | Float_t posy1q1=constants->ModulePositionY(10)-0.5*293*0.7071-box[1]-18-2+sm; | |
1256 | Float_t posz1q1=constants->ModulePositionZ(10); | |
1257 | TGeoTranslation *aco77=new TGeoTranslation("aco77",posx1q1,posy1q1,posz1q1-4*dy); | |
1258 | TGeoTranslation *aco78=new TGeoTranslation("aco78",posx1q1,posy1q1, | |
b7b24482 | 1259 | constants->ModulePositionZ(13)-4*dy); |
1260 | ||
329ce604 | 1261 | TGeoTranslation *aco79=new TGeoTranslation("aco79",posx1q1,posy1q1, |
b7b24482 | 1262 | constants->ModulePositionZ(15)-4*dy); |
329ce604 | 1263 | TGeoTranslation *aco710=new TGeoTranslation("aco710",posx1q1,posy1q1, |
b7b24482 | 1264 | constants->ModulePositionZ(18)-4*dy); |
329ce604 | 1265 | inFace->AddNode(aCORDE7q1,91,aco77); |
1266 | inFace->AddNode(aCORDE7q1,92,aco78); | |
1267 | inFace->AddNode(aCORDE7q1,93,aco79); | |
1268 | inFace->AddNode(aCORDE7q1,94,aco710); | |
b7b24482 | 1269 | |
1270 | count=95; | |
1271 | for(Int_t dy=10;dy<=14;dy++) | |
1272 | { | |
1273 | ||
1274 | Float_t posx1=constants->ModulePositionX(dy)+0.1*293*0.7071-4*box[0]-8+des+re+.83; | |
1275 | Float_t posy1=constants->ModulePositionY(dy)-0.1*293*0.7071-box[1]-18-2-des+sm; | |
1276 | Float_t posz1=constants->ModulePositionZ(dy); | |
1277 | Float_t dyx2=constants->ModulePositionX(dy)-0.27*293*0.7071-4*box[0]-4+des+re+0.83; | |
1278 | Float_t dyy2=constants->ModulePositionY(dy)+0.27*293*0.7071-box[1]-18-5-des+sm; | |
1279 | TGeoTranslation *aco711=new TGeoTranslation("aco711",posx1,posy1,posz1); | |
1280 | TGeoTranslation *aco712=new TGeoTranslation("aco712",dyx2,dyy2,posz1); | |
329ce604 | 1281 | inFace->AddNode(aCORDE7q1,count,aco711); |
1282 | inFace->AddNode(aCORDE7q1,count+1,aco712); | |
b7b24482 | 1283 | count=count+2; |
1284 | dy++; | |
1285 | } | |
1286 | ||
1287 | ||
1288 | ||
1289 | count=105; | |
1290 | for(Int_t dy=15;dy<=19;dy++) | |
1291 | { | |
1292 | ||
1293 | Float_t posx1=constants->ModulePositionX(dy)+0.1*293*0.7071-4*box[0]-8+des+re+0.83; | |
1294 | Float_t posy1=constants->ModulePositionY(dy)-0.1*293*0.7071-box[1]-18-2-des+sm; | |
1295 | Float_t posz1=constants->ModulePositionZ(dy); | |
1296 | Float_t dyx2=constants->ModulePositionX(dy)-0.27*293*0.7071-4*box[0]-4+des+re+0.83; | |
1297 | Float_t dyy2=constants->ModulePositionY(dy)+0.27*293*0.7071-box[1]-18-5-des; | |
1298 | TGeoTranslation *aco713=new TGeoTranslation("aco713",posx1,posy1,posz1); | |
1299 | TGeoTranslation *aco714=new TGeoTranslation("aco714",dyx2,dyy2,posz1); | |
329ce604 | 1300 | inFace->AddNode(aCORDE7q1,count,aco713); |
1301 | inFace->AddNode(aCORDE7q1,count+1,aco714); | |
b7b24482 | 1302 | count=count+2; |
1303 | dy++; | |
1304 | } | |
1305 | ||
1306 | //*** Out-Face *** | |
1307 | ||
329ce604 | 1308 | Float_t posx1qa=constants->ModulePositionX(50)-0.5*293*0.7071+4*box[0]+8-re-1; |
1309 | Float_t posy1qa=constants->ModulePositionY(50)-0.5*293*0.7071-box[1]-18-2+sm-2.5; | |
1310 | Float_t posz1qa=constants->ModulePositionZ(50); | |
1311 | TGeoTranslation *aco715=new TGeoTranslation("aco715",posx1qa,posy1qa,posz1qa-4*dy); | |
1312 | TGeoTranslation *aco716=new TGeoTranslation("aco716",posx1qa,posy1qa, | |
b7b24482 | 1313 | constants->ModulePositionZ(43)-4*dy); |
329ce604 | 1314 | TGeoTranslation *aco717=new TGeoTranslation("aco717",posx1qa,posy1qa, |
b7b24482 | 1315 | constants->ModulePositionZ(55)-4*dy); |
329ce604 | 1316 | TGeoTranslation *aco718=new TGeoTranslation("aco718",posx1qa,posy1qa, |
b7b24482 | 1317 | constants->ModulePositionZ(58)-4*dy); |
1318 | TGeoTranslation *aco719=new TGeoTranslation("aco719", | |
1319 | constants->ModulePositionX(50)-0.1*293*0.7071+4*box[0]+8-des-re-1, | |
1320 | constants->ModulePositionY(50)-0.1*293*0.7071-box[1]-18-2-des+sm-2.5, | |
1321 | constants->ModulePositionZ(45)); | |
1322 | TGeoTranslation *aco720=new TGeoTranslation("aco720", | |
1323 | constants->ModulePositionX(50)+0.27*293*0.7071+4*box[0]+8-des-re-1, | |
1324 | constants->ModulePositionY(50)+0.27*293*0.7071-box[1]-18-2-des+sm-2.5, | |
1325 | constants->ModulePositionZ(45)); | |
1326 | ||
1327 | ||
329ce604 | 1328 | outFace->AddNode(aCORDE7q1,115,aco715); |
1329 | outFace->AddNode(aCORDE7q1,116,aco716); | |
1330 | outFace->AddNode(aCORDE7q1,117,aco717); | |
1331 | outFace->AddNode(aCORDE7q1,118,aco718); | |
1332 | outFace->AddNode(aCORDE7q1,119,aco719); | |
1333 | outFace->AddNode(aCORDE7q1,120,aco720); | |
b7b24482 | 1334 | |
1335 | ||
1336 | ||
1337 | ||
1338 | count=65; | |
1339 | for(Int_t dy=50;dy<=54;dy++) | |
1340 | { | |
1341 | ||
1342 | Float_t posx1=constants->ModulePositionX(dy)-0.1*293*0.7071+4*box[0]+8-des-re-1; | |
1343 | Float_t posy1=constants->ModulePositionY(dy)-0.1*293*0.7071-box[1]-18-2-des+sm-2.5; | |
1344 | Float_t posz1=constants->ModulePositionZ(dy); | |
1345 | Float_t dyx2=constants->ModulePositionX(dy)+0.27*293*0.7071+4*box[0]+8-des-re-1; | |
1346 | Float_t dyy2=constants->ModulePositionY(dy)+0.27*293*0.7071-box[1]-18-2-des+sm-2.5; | |
1347 | TGeoTranslation *aco721=new TGeoTranslation("aco721",posx1,posy1,posz1); | |
1348 | TGeoTranslation *aco722=new TGeoTranslation("aco722",dyx2,dyy2,posz1); | |
329ce604 | 1349 | outFace->AddNode(aCORDE7q1,count,aco721); |
1350 | outFace->AddNode(aCORDE7q1,count+1,aco722); | |
b7b24482 | 1351 | count=count+2; |
1352 | dy++; | |
1353 | } | |
1354 | ||
1355 | ||
1356 | ||
1357 | count=75; | |
1358 | for(Int_t dy=57;dy<=59;dy++) | |
1359 | { | |
1360 | ||
1361 | Float_t posx1=constants->ModulePositionX(dy)-0.1*293*0.7071+4*box[0]+8-des-re-1; | |
1362 | Float_t posy1=constants->ModulePositionY(dy)-0.1*293*0.7071-box[1]-18-2-des+sm-2.5; | |
1363 | Float_t posz1=constants->ModulePositionZ(dy-10); | |
1364 | Float_t dyx2=constants->ModulePositionX(dy)+0.27*293*0.7071+4*box[0]+8-des-re-1; | |
1365 | Float_t dyy2=constants->ModulePositionY(dy)+0.27*293*0.7071-box[1]-18-2-des+sm-2.5; | |
1366 | TGeoTranslation *aco723=new TGeoTranslation("aco723",posx1,posy1,posz1); | |
1367 | TGeoTranslation *aco724=new TGeoTranslation("aco724",dyx2,dyy2,posz1); | |
329ce604 | 1368 | outFace->AddNode(aCORDE7q1,count,aco723); |
1369 | outFace->AddNode(aCORDE7q1,count+1,aco724); | |
b7b24482 | 1370 | count=count+2; |
1371 | dy++; | |
1372 | } | |
1373 | ||
1374 | ||
329ce604 | 1375 | Float_t posx1qb=constants->ModulePositionX(40)-0.5*293*0.7071+4*box[0]+5; |
1376 | Float_t posy1qb=constants->ModulePositionY(40)-0.5*293*0.7071-box[1]-18-2; | |
1377 | Float_t posz1qb=constants->ModulePositionZ(40); | |
1378 | TGeoTranslation *aco725=new TGeoTranslation("aco725",posx1qb,posy1qb,posz1qb-4*dy); | |
1379 | TGeoTranslation *aco726=new TGeoTranslation("aco726",posx1qb,posy1qb, | |
b7b24482 | 1380 | constants->ModulePositionZ(43)-4*dy); |
329ce604 | 1381 | TGeoTranslation *aco727=new TGeoTranslation("aco727",posx1qb,posy1qb, |
b7b24482 | 1382 | constants->ModulePositionZ(45)-4*dy); |
329ce604 | 1383 | TGeoTranslation *aco728=new TGeoTranslation("aco728",posx1qb,posy1qb, |
b7b24482 | 1384 | constants->ModulePositionZ(48)-4*dy); |
329ce604 | 1385 | outFace->AddNode(aCORDE7q1,85,aco725); |
1386 | outFace->AddNode(aCORDE7q1,86,aco726); | |
1387 | outFace->AddNode(aCORDE7q1,87,aco727); | |
1388 | outFace->AddNode(aCORDE7q1,88,aco728); | |
b7b24482 | 1389 | |
1390 | ||
1391 | ||
1392 | count=89; | |
1393 | for(Int_t dy=40;dy<=44;dy++) | |
1394 | { | |
1395 | ||
1396 | Float_t posx1=constants->ModulePositionX(dy)-0.1*293*0.7071+4*box[0]+8-des-re-1; | |
1397 | Float_t posy1=constants->ModulePositionY(dy)-0.1*293*0.7071-box[1]-18-2-des+sm-2.5; | |
1398 | Float_t posz1=constants->ModulePositionZ(dy); | |
1399 | Float_t dyx2=constants->ModulePositionX(dy)+0.27*293*0.7071+4*box[0]+4-des-re-1+2.8; | |
1400 | Float_t dyy2=constants->ModulePositionY(dy)+0.27*293*0.7071-box[1]-18-5-des+sm-2.5+3; | |
1401 | TGeoTranslation *aco729=new TGeoTranslation("aco729",posx1,posy1,posz1); | |
1402 | TGeoTranslation *aco730=new TGeoTranslation("aco730",dyx2,dyy2,posz1); | |
329ce604 | 1403 | outFace->AddNode(aCORDE7q1,count,aco729); |
1404 | outFace->AddNode(aCORDE7q1,count+1,aco730); | |
b7b24482 | 1405 | count=count+2; |
1406 | dy++; | |
1407 | } | |
1408 | ||
1409 | ||
1410 | ||
1411 | count=99; | |
1412 | for(Int_t dy=45;dy<=49;dy++) | |
1413 | { | |
1414 | ||
1415 | Float_t posx1=constants->ModulePositionX(dy)-0.1*293*0.7071+4*box[0]+8-des-re-1; | |
1416 | Float_t posy1=constants->ModulePositionY(dy)-0.1*293*0.7071-box[1]-18-2-des+sm-2.5; | |
1417 | Float_t posz1=constants->ModulePositionZ(dy); | |
1418 | Float_t dyx2=constants->ModulePositionX(dy)+0.27*293*0.7071+4*box[0]+4-des-re-1+2.8; | |
1419 | Float_t dyy2=constants->ModulePositionY(dy)+0.27*293*0.7071-box[1]-18-5-des+sm-2.5+3; | |
1420 | TGeoTranslation *aco729=new TGeoTranslation("aco729",posx1,posy1,posz1); | |
1421 | TGeoTranslation *aco730=new TGeoTranslation("aco730",dyx2,dyy2,posz1); | |
329ce604 | 1422 | outFace->AddNode(aCORDE7q1,count,aco729); |
1423 | outFace->AddNode(aCORDE7q1,count+1,aco730); | |
b7b24482 | 1424 | count=count+2; |
1425 | dy++; | |
1426 | } | |
1427 | ||
1428 | ||
1429 | // Here I define a master volume "ACORDE_SUPPORT" for Acorde's support | |
1430 | ||
1431 | //---> Set the support of ACORDE alice MODULES | |
1432 | ||
1433 | ||
1434 | Float_t dy1=20; | |
1435 | box[0]=10; | |
1436 | box[1]=0.5; | |
1437 | box[2]=500; | |
1438 | ||
1439 | Float_t sx=constants->ModulePositionX(24)-0.5*293; | |
1440 | Float_t sy=constants->ModulePositionY(24)-box[1]; | |
1441 | Float_t sz=0; | |
1442 | Float_t sx2=constants->ModulePositionX(24)+0.5*293-dy; | |
1443 | Float_t sy2=constants->ModulePositionY(24)-box[1]; | |
1444 | Float_t sx4=constants->ModulePositionX(24)-0.5*293+dy2; | |
1445 | Float_t sy4=constants->ModulePositionY(24)-box[1]; | |
1446 | Float_t sx5=constants->ModulePositionX(24)+0.5*293-dy2; | |
1447 | Float_t sy5=constants->ModulePositionY(24)-box[1]; | |
1448 | ||
1449 | Float_t dyx=constants->ModulePositionX(4)+0.5*293*0.7071-box[0]; | |
1450 | Float_t dyy=constants->ModulePositionY(4)-0.5*293*0.7071-box[1]; | |
1451 | Float_t dyz=0; | |
1452 | Float_t dyx1=constants->ModulePositionX(4)+0.1*293*0.7071-box[0]; | |
1453 | Float_t dyy1=constants->ModulePositionY(4)-0.1*293*0.7071-box[1]; | |
1454 | Float_t dyx2=constants->ModulePositionX(4)-0.27*293*0.7071-box[0]; | |
1455 | Float_t dyy2=constants->ModulePositionY(4)+0.27*293*0.7071-box[1]; | |
1456 | ||
1457 | ||
1458 | Float_t dx1=constants->ModulePositionX(14)+0.5*293*0.7071-box[0]; | |
1459 | Float_t dy11=constants->ModulePositionY(14)-0.5*293*0.7071-box[1]; | |
1460 | Float_t dyx11=constants->ModulePositionX(14)+0.1*293*0.7071-box[0]; | |
1461 | Float_t dyy11=constants->ModulePositionY(14)-0.1*293*0.7071-box[1]; | |
1462 | Float_t dyx21=constants->ModulePositionX(14)-0.27*293*0.7071-box[0]; | |
1463 | Float_t dyy21=constants->ModulePositionY(14)+0.27*293*0.7071-box[1]; | |
1464 | ||
1465 | ||
1466 | Float_t tbox[3]; | |
1467 | tbox[0]=1; | |
1468 | tbox[1]=7; | |
1469 | tbox[2]=500; | |
1470 | ||
1471 | TGeoVolume *support = new TGeoVolumeAssembly("ACORDE_SUPPORT"); | |
1472 | ||
1473 | TGeoBBox *acorde8 = new TGeoBBox("acorde8",box[0],box[1],box[2]); | |
329ce604 | 1474 | TGeoVolume *aCORDE8 = new TGeoVolume("ACORDE8",acorde8,al); |
b7b24482 | 1475 | |
1476 | TGeoBBox *acorde9 = new TGeoBBox("acorde9",tbox[0],tbox[1],tbox[2]); | |
329ce604 | 1477 | TGeoVolume *aCORDE9 = new TGeoVolume("ACORDE9",acorde9,al); |
b7b24482 | 1478 | |
329ce604 | 1479 | support->AddNode(aCORDE8,1,new TGeoTranslation(0,-5,0)); |
1480 | support->AddNode(aCORDE8,2,new TGeoTranslation(0,-dy1,0)); | |
1481 | support->AddNode(aCORDE9,3,new TGeoTranslation(0,-tbox[1]-5.5,0)); | |
b7b24482 | 1482 | |
1483 | ||
1484 | // Put "support" on Up-Face | |
1485 | ||
329ce604 | 1486 | upFace->AddNode(support,69,new TGeoTranslation("aco8",sx,sy,sz)); |
1487 | upFace->AddNode(support,70,new TGeoTranslation("aco8_2",sx2,sy2,sz)); | |
1488 | upFace->AddNode(support,71,new TGeoTranslation("aco8_4",sx4,sy4,sz)); | |
1489 | upFace->AddNode(support,72,new TGeoTranslation("aco8_6",sx5,sy5,sz)); | |
1490 | upFace->AddNode(support,73,new TGeoTranslation("aco8_2",-sx2,sy2,sz)); | |
1491 | upFace->AddNode(support,74,new TGeoTranslation("aco8_4",-sx4,sy4,sz)); | |
1492 | upFace->AddNode(support,75,new TGeoTranslation("aco8_6",-sx5,sy5,sz)); | |
b7b24482 | 1493 | |
1494 | // Put "support" on In-Face | |
1495 | Float_t ms = 1.3; | |
329ce604 | 1496 | inFace->AddNode(support,121,new TGeoCombiTrans("aco8_81",dyx,dyy+ms,dyz,idrotm232)); |
1497 | inFace->AddNode(support,122,new TGeoCombiTrans("aco8_121",dyx1+des,ms+dyy1-des,dyz,idrotm232)); | |
1498 | inFace->AddNode(support,123,new TGeoCombiTrans("aco8_161",dyx2+des,ms+dyy2-des,dyz,idrotm232)); | |
1499 | inFace->AddNode(support,124,new TGeoCombiTrans("aco8_82",dx1,ms+dy11,dyz,idrotm232)); | |
1500 | inFace->AddNode(support,125,new TGeoCombiTrans("aco8_122",dyx11+des,ms+dyy11-des,dyz,idrotm232)); | |
1501 | inFace->AddNode(support,126,new TGeoCombiTrans("aco8_162",dyx21+des,ms+dyy21-des,dyz,idrotm232)); | |
b7b24482 | 1502 | |
1503 | // Put "support" on Out-Face | |
1504 | ||
329ce604 | 1505 | outFace->AddNode(support,121,new TGeoCombiTrans("aco8_81",-dyx,dyy+ms,dyz,idrotm231)); |
1506 | outFace->AddNode(support,122,new TGeoCombiTrans("aco8_121",-dyx1-des,ms+dyy1-des,dyz,idrotm231)); | |
1507 | outFace->AddNode(support,123,new TGeoCombiTrans("aco8_161",-dyx2-des,ms+dyy2-des,dyz,idrotm231)); | |
1508 | outFace->AddNode(support,124,new TGeoCombiTrans("aco8_82",-dx1,dy11+ms,dyz,idrotm231)); | |
1509 | outFace->AddNode(support,125,new TGeoCombiTrans("aco8_122",-dyx11-des,ms+dyy11-des,dyz,idrotm231)); | |
1510 | outFace->AddNode(support,126,new TGeoCombiTrans("aco8_162",-dyx21-des,ms+dyy21-des,dyz,idrotm231)); | |
b7b24482 | 1511 | |
329ce604 | 1512 | aCORDE->AddNode(inFace,1);//---> volume of supports & bars in-face |
1513 | aCORDE->AddNode(upFace,2);//---> volume of supports & bars up-face | |
1514 | aCORDE->AddNode(outFace,3);//---> volume of supports & bars out-face | |
f957acf5 | 1515 | // aCORDE->AddNode(inFacem,4);//---> volume of modules in-face |
1516 | // aCORDE->AddNode(upFacem,5);//---> volume of modules up-face | |
1517 | // aCORDE->AddNode(outFacem,6);//---> volume of modules out-face | |
1518 | aCORDE->AddNode(modules,4);//---> volume of ALL ACORDE's Modules | |
329ce604 | 1519 | alice->AddNode(aCORDE,1);//---> put volume of ACORDE over ALICE's volume |
b7b24482 | 1520 | |
1521 | ||
1522 | ||
1523 | } | |
1524 | ||
1525 | ||
1526 | //_____________________________________________________________________________ | |
1527 | void AliACORDEv1::DrawDetector() const | |
1528 | { | |
1529 | ||
1530 | // not needed anymore | |
1531 | ||
1532 | } | |
1533 | ||
1534 | //____________________________________________________________________________ | |
1535 | ||
1536 | void AliACORDEv1::Init() | |
1537 | { | |
1538 | // Initialise L3 magnet after it has been built | |
1539 | Int_t i; | |
1540 | if(AliLog::GetGlobalDebugLevel()>0) { | |
1541 | printf("\n%s: ",ClassName()); | |
1542 | for(i=0;i<35;i++) printf("*"); | |
1543 | printf(" ACORDEv1_INIT "); | |
1544 | for(i=0;i<35;i++) printf("*"); | |
1545 | printf("\n%s: ",ClassName()); | |
1546 | // Here the ACORDEv initialisation code (if any!) | |
1547 | for(i=0;i<80;i++) printf("*"); | |
1548 | printf("\n"); | |
1549 | } | |
1550 | // AliACORDE::Init(); | |
1551 | } | |
1552 | //____________________________________________________________________________ | |
1553 | void AliACORDEv1::StepManager() | |
1554 | { | |
1555 | ||
1556 | // | |
1557 | // Called for every step in the Cosmic Ray Trigger | |
1558 | // | |
1559 | ||
1560 | ||
1561 | // volume: | |
1562 | // [0] = module number 1-60 (1==>(0-0), 60 (5-9) | |
1563 | // [1] = Plastic number: 0 (down) to 1 (up) | |
1564 | static Int_t vol[2]; | |
1565 | // | |
1566 | // hit | |
1567 | // [0] = PID | |
1568 | // [1-3] = x, y, z | |
1569 | // [4] = time | |
1570 | // [5-7] = px, py, pz | |
1571 | // [8] = energy | |
1572 | // [9] = energy loss | |
1573 | // [10] = length of track through plastic | |
1574 | static Float_t hits[11]; | |
1575 | ||
1576 | // local static variables | |
1577 | static Float_t eloss; | |
1578 | static Float_t step; | |
1579 | // scintillator volume | |
f957acf5 | 1580 | static Int_t idScint = gMC->VolId("ACORDE2"); |
b7b24482 | 1581 | // local variables |
1582 | Int_t copy; | |
1583 | TLorentzVector pos; | |
1584 | TLorentzVector mom; | |
1585 | ||
1586 | // only charged tracks | |
1587 | if ( !gMC->TrackCharge() || !gMC->IsTrackAlive() ) return; | |
1588 | ||
1589 | // only in sensitive material | |
1590 | if (gMC->CurrentVolID(copy) == idScint) { | |
1591 | ||
1592 | printf("Hay particula cargada en el volumen %d \n",idScint); | |
1593 | step += gMC->TrackStep(); | |
1594 | eloss += gMC->Edep(); | |
1595 | // set all hit variables except eloss which is resetted | |
1596 | // set volume variables | |
1597 | if (gMC->IsTrackEntering()) { | |
1598 | eloss = 0.0; | |
1599 | step = 0.0; | |
1600 | gMC->TrackPosition(pos); | |
1601 | gMC->TrackMomentum(mom); | |
1602 | // hit | |
1603 | // [0] = PID | |
1604 | // [1-3] = x, y, z | |
1605 | // [4] = time | |
1606 | // [5-7] = px, py, pz | |
1607 | // [8] = energy | |
1608 | // [9] = energy loss | |
1609 | hits[0] = (Float_t ) gMC->TrackPid(); | |
329ce604 | 1610 | |
1611 | ||
b7b24482 | 1612 | hits[1] = pos[0]; printf("PosX %f \n",hits[1]); |
1613 | hits[2] = pos[1]; printf("PosY %f \n",hits[2]); | |
1614 | hits[3] = pos[2]; printf("PosZ %f \n",hits[3]); | |
1615 | hits[4] = gMC->TrackTime();printf("TimeTracking %f \n",hits[4]); | |
1616 | hits[5] = mom[0]; printf("MomentoX %f \n",hits[5]); | |
1617 | hits[6] = mom[1]; printf("MomentoY %f \n",hits[6]); | |
1618 | hits[7] = mom[2]; printf("MomentoZ %f \n",hits[7]); | |
1619 | hits[8] = gMC->Etot();printf("EnergiaTotal %f \n",hits[8]); | |
1620 | // volume: | |
1621 | // [0] = module number 1-60 (1==>(0-0), 60 (5-9) | |
1622 | // [1] = Plastic number: 0 (down) to 1 (up) | |
1623 | Int_t copyPlastic; // plastic: down=1, up=2 | |
1624 | Int_t copyModule; // module: 1-60 | |
1625 | gMC->CurrentVolID(copyPlastic); | |
1626 | gMC->CurrentVolOffID(1, copyModule); | |
1627 | // module | |
1628 | vol[0] = copyModule; | |
1629 | // plastic: 0 = down, 1 = up | |
1630 | vol[1] = copyPlastic; | |
1631 | } // end if gMC->IsTrackEntering() | |
1632 | ||
1633 | // set hit[9] = total energy loss and book hit | |
1634 | if( gMC->IsTrackExiting() || | |
1635 | gMC->IsTrackStop() || | |
1636 | gMC->IsTrackDisappeared()){ | |
1637 | hits[9] = eloss;printf("Energia Perdida %f \n",hits[9]); | |
1638 | hits[10] = step; | |
1639 | eloss = 0.0; | |
1640 | step = 0.0; | |
1641 | AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(),vol, hits); | |
f957acf5 | 1642 | } |
b7b24482 | 1643 | } |
1644 | ||
1645 | ||
329ce604 | 1646 | |
b7b24482 | 1647 | } |
1648 | ||
b7b24482 | 1649 | //_____________________________________________________________________________ |
1650 | void AliACORDEv1::AddHit(Int_t track, Int_t *vol, Float_t *hits) | |
1651 | { | |
1652 | // | |
f957acf5 | 1653 | // Add an ACORDE hit |
b7b24482 | 1654 | // |
1655 | TClonesArray &lhits = *fHits; | |
1656 | new(lhits[fNhits++]) AliACORDEhit(fIshunt,track,vol,hits); | |
1657 | } | |
1658 | ||
f957acf5 | 1659 | //_____________________________________________________________________________ |
1660 | void AliACORDEv1::AddDigits(Int_t* track, Int_t module, Float_t time) | |
1661 | //void AliACORDEv1::AddDigits(Int_t track, Int_t *vol, Float_t *digits) | |
1662 | { | |
1663 | ||
1664 | // Adds Digit | |
1665 | ||
1666 | TClonesArray &ldigits = *fDigits; | |
1667 | new(ldigits[fNdigits++]) AliACORDEdigit(track,module,time); | |
1668 | } | |
1669 | //_____________________________________________________________________________ | |
1670 | ||
1671 | ||
1672 | ||
1673 | //_____________________________________________________________________________ | |
1674 | void AliACORDEv1::MakeBranch(Option_t *option) | |
1675 | { | |
1676 | // Creates new branches in the current Root Tree | |
1677 | ||
1678 | char branchname[10]; | |
1679 | sprintf(branchname,"%s",GetName()); | |
1680 | AliDebug(2,Form("fBufferSize = %d",fBufferSize)); | |
1681 | const char *cH = strstr(option,"H"); | |
1682 | if (fHits && TreeH() && cH) { | |
1683 | TreeH()->Branch(branchname,&fHits, fBufferSize); | |
1684 | AliDebug(2,Form("Making Branch %s for hits",branchname)); | |
1685 | } | |
1686 | const char *cD = strstr(option,"D"); | |
1687 | if (fDigits && fLoader->TreeD() && cD) { | |
1688 | fLoader->TreeD()->Branch(branchname,&fDigits, fBufferSize); | |
1689 | AliDebug(2,Form("Making Branch %s for digits",branchname)); | |
1690 | } | |
1691 | } | |
1692 | ||
1693 | //_____________________________________________________________________________ | |
1694 | void AliACORDEv1::AddAlignableVolumes() const | |
1695 | { | |
1696 | // | |
1697 | // Create entries for alignable volumes associating the symbolic volume | |
1698 | // name with the corresponding volume path. Needs to be syncronized with | |
1699 | // eventual changes in the geometry. | |
1700 | // | |
1701 | ||
1702 | // The alignable volumes are only the "ACORDE_MODULE_%d" | |
1703 | // | |
1704 | // Structure of ACORDE's Geometry | |
1705 | // | |
1706 | // ALIC_1 | |
1707 | // |---> ACORDE_1 | |
1708 | // |----> ACORDE_1_1 (in_face) --- | |
1709 | // |----> ACORDE_2_2 (up_face) |--> BARS&SUPPORTS | |
1710 | // |----> ACORDE_3_3 (out_face)--- | |
1711 | // |----> ACORDE_MODULES_4 |--> ACORDE'S MODULES | |
1712 | // | |
1713 | // | |
1714 | // Send comments to: Mario Rodriguez Cahuantzi <mrodrigu@mail.cern.ch> | |
1715 | ||
1716 | TString vpstr1 = "ALIC_1/ACORDE_1/ACORDE_MODULES_4/ACORDE_MODULE_"; | |
1717 | TString snstr1 = "ACORDE/Array"; | |
1718 | TString volpath, symname; | |
1719 | for(Int_t dy=1; dy<61 ; dy++) | |
1720 | { | |
1721 | volpath = vpstr1; | |
1722 | volpath += dy; | |
1723 | symname = snstr1; | |
1724 | symname += dy; | |
1725 | if(!gGeoManager->SetAlignableEntry(symname.Data(),volpath.Data())) | |
1726 | AliFatal(Form("Alignable entry %s not created. Volume path %s not valid", symname.Data(),volpath.Data())); | |
1727 | } | |
1728 | } |