]>
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 | // // | |
366f0bf5 | 22 | // This class contains the functions for final version of the ALICE Cosmic // |
23 | // Ray Trigger. This version will be used to simulation comic rays in alice // | |
24 | // with all the detectors. // | |
25 | // It include geometry and hits (position and momentum) // | |
b7b24482 | 26 | // // |
27 | // Send comments to: // | |
28 | // // | |
29 | // Arturo Fernandez Tellez <afernand@fcfm.buap.mx> // | |
b7b24482 | 30 | // Eleazar Cuautle Flores <ecuautle@nucleares.unam.mx> // |
31 | // Mario Rodriguez Cahuantzi <mrodrigu@mail.cern.ch> // | |
32 | // // | |
33 | // Puebla, Pue. Mexico December 2007 // | |
20868cc6 | 34 | // // |
366f0bf5 | 35 | // Last Update: Aug. 4th 2008 // |
b7b24482 | 36 | /////////////////////////////////////////////////////////////////////////////// |
37 | ||
38 | ||
b7b24482 | 39 | #include <Riostream.h> |
40 | #include <TGeoMatrix.h> | |
b7b24482 | 41 | #include <TMath.h> |
b7b24482 | 42 | #include <TString.h> |
43 | #include <TSystem.h> | |
44 | ||
45 | #include "AliConst.h" | |
46 | #include "AliRun.h" | |
47 | ||
48 | #include "TGeoManager.h" | |
49 | #include "TGeoVolume.h" | |
50 | #include "TGeoPcon.h" | |
b7b24482 | 51 | #include "TGeoPgon.h" |
52 | #include "TGeoTrd1.h" | |
53 | #include "TGeoCompositeShape.h" | |
54 | #include "TGeoPara.h" | |
b7b24482 | 55 | |
56 | #include "AliACORDEv1.h" | |
57 | #include <TClonesArray.h> | |
58 | #include <TLorentzVector.h> | |
59 | #include <TVirtualMC.h> | |
60 | #include <TPDGCode.h> | |
b7b24482 | 61 | |
62 | #include "AliRun.h" | |
63 | #include "AliConst.h" | |
64 | #include "AliACORDEhit.h" | |
65 | #include "AliACORDEConstants.h" | |
66 | #include "AliMC.h" | |
67 | #include "AliLog.h" | |
68 | ||
69 | ClassImp(AliACORDEv1) | |
70 | ||
71 | //_____________________________________________________________________________ | |
72 | AliACORDEv1::AliACORDEv1() | |
73 | : AliACORDE() | |
74 | { | |
75 | // | |
76 | // Default constructor | |
77 | fIshunt = 0; | |
78 | fHits = 0; | |
79 | // | |
80 | } | |
81 | //_____________________________________________________________________________ | |
82 | AliACORDEv1::AliACORDEv1(const char *name, const char *title) | |
83 | : AliACORDE(name, title) | |
84 | { | |
85 | // | |
86 | // Standard constructor | |
87 | // | |
88 | fIshunt = 1; // All hits are associated with primary particles | |
89 | fHits = new TClonesArray("AliACORDEhit",400); | |
90 | gAlice->GetMCApp()->AddHitList(fHits); | |
91 | } | |
92 | //_____________________________________________________________________________ | |
93 | AliACORDEv1::~AliACORDEv1() | |
94 | { | |
95 | // | |
96 | // Default destructor | |
97 | // | |
98 | } | |
b7b24482 | 99 | //_____________________________________________________________________________ |
100 | void AliACORDEv1::CreateGeometry() | |
101 | { | |
102 | CreateAcorde(); | |
b7b24482 | 103 | } |
b7b24482 | 104 | void AliACORDEv1::CreateAcorde() |
105 | { | |
106 | ||
107 | ||
108 | // _______________________________________________________________________________ | |
109 | // | | | |
110 | // | | | |
111 | // | **** Acorde's Geometry using the TGeo Class....January 2008 **** | | |
112 | // | | | |
113 | // | ACORDE--> Volume for ACORDE in Alice's Magnet | | |
114 | // | ACORDE1_a--> Volume for frame of Acorde's Module | | |
115 | // | ACORDE10--> Volume for frame of Acorde's Module | | |
116 | // | ACORDE2--> Volume for scintillators in Acorde's Module | | |
117 | // | ACORDE7--> Volume for bars | | |
118 | // | ACORDE7_1--> Volume for side's bars | | |
119 | // | ACORDE8--> Volume for supports | | |
120 | // | ACORDE9--> Volume for supports | | |
121 | // | ACORDE_SUPPORT--> Volume that contains a full Acorde's support | | |
4490d930 | 122 | // | ALL_ACORDE_MODULES--> Volume that contains ALL Acorde's module | |
123 | // | ACORDE_MODULE--> Volume that represents ONE Acorde-Module | | |
b7b24482 | 124 | // | ACORDE_1--> Volume that contains the bars&supports in-face | |
125 | // | ACORDE_2--> Volume that contains the bars&supports up-face | | |
126 | // | ACORDE_3--> Volume that contains the bars&supports out-face | | |
b7b24482 | 127 | // | | |
128 | // |_______________________________________________________________________________| | |
129 | ||
130 | ||
131 | // Call the global constants for the Modules | |
132 | ||
133 | AliACORDEConstants* constants = AliACORDEConstants::Instance(); | |
134 | ||
135 | // Get the Alice Volume | |
136 | ||
137 | TGeoVolume *alice = gGeoManager->GetVolume("ALIC"); | |
138 | ||
139 | // Define some materials & medium | |
140 | ||
141 | //*** Support & Bars*** | |
142 | ||
4ca41d2c | 143 | TGeoMedium* al = gGeoManager->GetMedium("ACORDE_ALU_C0"); |
144 | TGeoMedium* med6 = gGeoManager->GetMedium("ACORDE_CPV scint.1"); | |
b7b24482 | 145 | |
146 | //Define a FULL-ACORDE-VOLUME | |
147 | ||
329ce604 | 148 | TGeoVolume *aCORDE = new TGeoVolumeAssembly("ACORDE"); |
b7b24482 | 149 | |
150 | ||
151 | // Define 6 master volumes for ACORDE | |
152 | ||
329ce604 | 153 | TGeoVolume *inFace = new TGeoVolumeAssembly("ACORDE_1"); |
154 | TGeoVolume *upFace = new TGeoVolumeAssembly("ACORDE_2"); | |
155 | TGeoVolume *outFace = new TGeoVolumeAssembly("ACORDE_3"); | |
4490d930 | 156 | TGeoVolume *modules = new TGeoVolumeAssembly("ALL_ACORDE_MODULES"); |
b7b24482 | 157 | |
158 | // Define global variables | |
159 | ||
160 | Float_t box[3]; | |
161 | Int_t count; | |
162 | Float_t dy=10;//-->displacement of the support and bars of ACORDE | |
163 | Float_t dy2=66.5;//-->displacement of the support and bars of ACORDE | |
329ce604 | 164 | Float_t placedAt; |
b7b24482 | 165 | Float_t small=0.05; |
166 | ||
167 | // Define the position of support and bars for the sides faces | |
168 | ||
169 | Float_t des = 22*0.7071; | |
170 | ||
171 | // Define rotation Matrix for Side's faces in Alice | |
172 | ||
173 | TGeoRotation *idrotm231 = new TGeoRotation("idrotm231",90, 45, 90, 135, 0, 0); | |
174 | TGeoRotation *idrotm232 = new TGeoRotation("idrotm232",90, 315, 90, 45, 0, 0); | |
175 | ||
176 | // Begin the Geometry of the structure for ACORDE | |
177 | ||
178 | // *** Definition of ACORDE's Modules *** | |
179 | ||
180 | // Define Measures of ACORDE's Modules | |
181 | ||
182 | box[0] = constants->ModuleLength()/2; | |
183 | box[1] = constants->ModuleHeight()/2; | |
184 | box[2] = constants->ModuleWidth()/2; | |
185 | ||
186 | // Define Measures of Scintillators | |
187 | ||
188 | Float_t pbox[3]; | |
189 | pbox[0] = constants->PlasticLength()/2; | |
190 | pbox[1] = constants->PlasticHeight()/2; | |
191 | pbox[2] = constants->PlasticWidth()/2; | |
192 | ||
193 | ||
194 | // Create the Modules, Scintillators & Metallic Frame | |
195 | ||
196 | //*** Aluminium frame *** | |
197 | ||
198 | TGeoBBox *acorde1 = new TGeoBBox("acorde1",box[0],box[1],26/20+2); | |
199 | TGeoBBox *acorde10 = new TGeoBBox("acorde10",26/20,box[1],box[2]+3); | |
329ce604 | 200 | TGeoVolume *aCORDE1qa = new TGeoVolume("ACORDE1_a",acorde1,al); |
201 | TGeoVolume *aCORDE10 = new TGeoVolume("ACORDE10",acorde10,al); | |
b7b24482 | 202 | |
203 | //*** Scintillators *** | |
204 | ||
205 | TGeoBBox *acorde2 = new TGeoBBox("acorde2",pbox[0],pbox[1],pbox[2]); | |
329ce604 | 206 | TGeoVolume *aCORDE2 = new TGeoVolume("ACORDE2",acorde2,med6); |
b7b24482 | 207 | |
208 | ||
209 | // Here I define & construct a Master Volume ("ACORDE_MODULE") for one Module in ACORDE | |
210 | ||
4490d930 | 211 | TGeoVolume *acomodule = new TGeoVolumeAssembly("ACORDE_MODULE"); |
212 | acomodule->AddNode(aCORDE1qa,1,new TGeoTranslation("aco1",0,0,13)); | |
213 | acomodule->AddNode(aCORDE1qa,2,new TGeoTranslation("aco10",0,0,-13)); | |
214 | acomodule->AddNode(aCORDE10,3,new TGeoTranslation("aco10",293/2+5,0,0)); | |
215 | acomodule->AddNode(aCORDE10,4,new TGeoTranslation("aco10",-293/2-5,0,0)); | |
329ce604 | 216 | placedAt = pbox[1]+constants->ProfileThickness()-constants->ModuleHeight()/2+small; |
4490d930 | 217 | acomodule->AddNode(aCORDE2,5,new TGeoTranslation("aco2",placedAt,0,0)); |
329ce604 | 218 | placedAt = placedAt + 2.0*pbox[1]+small; |
4490d930 | 219 | acomodule->AddNode(aCORDE2,6,new TGeoTranslation("aco2",placedAt,-1,0)); |
b7b24482 | 220 | |
221 | // Put the Modules of In-Face | |
222 | ||
223 | count=1; | |
4490d930 | 224 | for(Int_t i=1;i<9;i++){ |
b7b24482 | 225 | |
4490d930 | 226 | Float_t posx = constants->ModulePositionX(i); |
227 | Float_t posy = constants->ModulePositionY(i); | |
228 | Float_t posz = constants->ModulePositionZ(i); | |
4490d930 | 229 | |
2e242e04 | 230 | modules->AddNode(acomodule,i, |
ee0da434 | 231 | new TGeoCombiTrans("aco01",posx,posy,posz,idrotm232)); |
b7b24482 | 232 | count++; |
233 | ||
234 | } | |
235 | ||
236 | count=9; | |
4490d930 | 237 | for(Int_t i=10;i<20;i++){ |
238 | Float_t posx = constants->ModulePositionX(i); | |
239 | Float_t posy = constants->ModulePositionY(i); | |
240 | Float_t posz = constants->ModulePositionZ(i); | |
b7b24482 | 241 | |
2e242e04 | 242 | modules->AddNode(acomodule,i, |
ee0da434 | 243 | new TGeoCombiTrans("aco01",posx,posy,posz,idrotm232)); |
b7b24482 | 244 | } |
245 | ||
246 | // Put he Modules of Up-Face | |
247 | ||
248 | count=1; | |
4490d930 | 249 | for(Int_t i=20;i<40;i++){ |
250 | Float_t posx = constants->ModulePositionX(i); | |
251 | Float_t posy = constants->ModulePositionY(i); | |
252 | Float_t posz = constants->ModulePositionZ(i); | |
b7b24482 | 253 | |
2e242e04 | 254 | modules->AddNode(acomodule,i,new TGeoTranslation("aco01",posx,posy,posz)); |
b7b24482 | 255 | count++; |
256 | } | |
257 | ||
258 | // Put the Modules of Out-Face | |
259 | ||
260 | count=1; | |
4490d930 | 261 | for(Int_t i=40;i<50;i++){ |
262 | Float_t posx = constants->ModulePositionX(i); | |
263 | Float_t posy = constants->ModulePositionY(i); | |
264 | Float_t posz = constants->ModulePositionZ(i); | |
b7b24482 | 265 | |
2e242e04 | 266 | modules->AddNode(acomodule,i, |
ee0da434 | 267 | new TGeoCombiTrans("aco01",posx,posy,posz,idrotm231)); |
b7b24482 | 268 | count++; |
269 | } | |
270 | ||
271 | // Put the Modules of Out-Face | |
272 | ||
273 | count=11; | |
4490d930 | 274 | for(Int_t i=51;i<59;i++){ |
275 | Float_t posx = constants->ModulePositionX(i); | |
276 | Float_t posy = constants->ModulePositionY(i); | |
277 | Float_t posz = constants->ModulePositionZ(i); | |
4490d930 | 278 | |
ee0da434 | 279 | if ((i==57) || (i==56)){ |
2e242e04 | 280 | modules->AddNode(acomodule,i, |
ee0da434 | 281 | new TGeoCombiTrans("aco01",posx,posy,posz,idrotm231)); |
282 | }else{ | |
2e242e04 | 283 | modules->AddNode(acomodule,i, |
ee0da434 | 284 | new TGeoCombiTrans("aco01",posx,posy,posz,idrotm231)); |
285 | }count++; | |
b7b24482 | 286 | } |
287 | ||
288 | ||
289 | // Put th Modules ITS-ACORDE | |
290 | ||
291 | if (GetITSGeometry()) { | |
292 | ||
2e242e04 | 293 | modules->AddNode(acomodule,0,new TGeoTranslation("ITS-3", |
b7b24482 | 294 | constants->ExtraModulePositionX(), |
295 | constants->ExtraModulePositionY(), | |
296 | constants->ExtraModulePositionZ(0))); | |
297 | ||
2e242e04 | 298 | modules->AddNode(acomodule,9,new TGeoTranslation("ITS-4", |
b7b24482 | 299 | constants->ExtraModulePositionX(), |
300 | constants->ExtraModulePositionY(), | |
301 | constants->ExtraModulePositionZ(1))); | |
302 | ||
2e242e04 | 303 | modules->AddNode(acomodule,50,new TGeoTranslation("ITS-1", |
b7b24482 | 304 | constants->ExtraModulePositionX(), |
305 | constants->ExtraModulePositionY(), | |
306 | constants->ExtraModulePositionZ(2))); | |
307 | ||
2e242e04 | 308 | modules->AddNode(acomodule,59,new TGeoTranslation("ITS-2", |
b7b24482 | 309 | constants->ExtraModulePositionX(), |
310 | constants->ExtraModulePositionY(), | |
311 | constants->ExtraModulePositionZ(3))); | |
312 | ||
313 | ||
314 | } | |
315 | else { | |
316 | ||
317 | ||
4490d930 | 318 | modules->AddNode(acomodule,61,new TGeoTranslation("its1", |
b7b24482 | 319 | constants->ModulePositionX(0), |
320 | constants->ModulePositionY(0), | |
321 | constants->ModulePositionZ(0))); | |
322 | ||
4490d930 | 323 | modules->AddNode(acomodule,62,new TGeoTranslation("its2", |
b7b24482 | 324 | constants->ModulePositionX(9), |
325 | constants->ModulePositionY(9), | |
326 | constants->ModulePositionZ(9))); | |
327 | ||
4490d930 | 328 | modules->AddNode(acomodule,63,new TGeoTranslation("its3", |
b7b24482 | 329 | constants->ModulePositionX(50), |
330 | constants->ModulePositionY(50), | |
331 | constants->ModulePositionZ(50))); | |
332 | ||
4490d930 | 333 | modules->AddNode(acomodule,64,new TGeoTranslation("its4", |
b7b24482 | 334 | constants->ModulePositionX(59), |
335 | constants->ModulePositionY(59), | |
336 | constants->ModulePositionZ(59))); | |
337 | ||
338 | } // end if (fITSGeometry) | |
339 | ||
340 | ||
341 | ||
342 | //*** Begin the structure of support & bars for ACORDE *** | |
343 | ||
344 | // Define a volume for the bars (up-face) | |
345 | ||
346 | box[0]=5; | |
d6ae5763 | 347 | // box[1]=40; |
348 | box[1]=33; | |
b7b24482 | 349 | box[2]=5; |
350 | Float_t z1 = 21 ; | |
351 | TGeoBBox *acorde00 = new TGeoBBox("acorde00",box[0],box[1],box[2]); | |
352 | ||
329ce604 | 353 | TGeoVolume *aCORDE00 = new TGeoVolume("ACORDE00",acorde00,al); |
b7b24482 | 354 | |
355 | count=25; | |
356 | for (Int_t ma=20;ma<=24;ma++) | |
357 | { | |
358 | TGeoTranslation *aco00=new TGeoTranslation("aco00", | |
ee0da434 | 359 | constants->SupportModulePositionX(ma)-0.5*293+dy2, |
360 | constants->SupportModulePositionY(ma)-box[1]-z1, | |
361 | constants->SupportModulePositionZ(ma)); | |
b7b24482 | 362 | |
329ce604 | 363 | upFace->AddNode(aCORDE00,count,aco00); |
b7b24482 | 364 | |
329ce604 | 365 | TGeoTranslation *aco00q1=new TGeoTranslation("aco00q1", |
ee0da434 | 366 | -(constants->SupportModulePositionX(ma)-0.5*293+dy2), |
367 | constants->SupportModulePositionY(ma)-box[1]-z1, | |
368 | constants->SupportModulePositionZ(ma)); | |
329ce604 | 369 | upFace->AddNode(aCORDE00,count+1,aco00q1); |
b7b24482 | 370 | |
329ce604 | 371 | TGeoTranslation *aco00q2=new TGeoTranslation("aco00q2", |
ee0da434 | 372 | constants->SupportModulePositionX(ma)+0.5*293-dy2, |
373 | constants->SupportModulePositionY(ma)-box[1]-z1, | |
374 | constants->SupportModulePositionZ(ma)); | |
329ce604 | 375 | upFace->AddNode(aCORDE00,count+2,aco00q2); |
b7b24482 | 376 | |
329ce604 | 377 | TGeoTranslation *aco00q3=new TGeoTranslation("aco00q3", |
ee0da434 | 378 | -(constants->SupportModulePositionX(ma)+0.5*293-dy2), |
379 | constants->SupportModulePositionY(ma)-box[1]-z1, | |
380 | constants->SupportModulePositionZ(ma)); | |
329ce604 | 381 | upFace->AddNode(aCORDE00,count+3,aco00q3); |
b7b24482 | 382 | count=count+4; |
383 | ||
384 | ma++; | |
385 | } | |
386 | ||
387 | count=41; | |
388 | for(Int_t ma=25;ma<=29;ma++) | |
389 | { | |
390 | TGeoTranslation *aco00=new TGeoTranslation("aco00", | |
ee0da434 | 391 | constants->SupportModulePositionX(ma)-0.5*293+dy2, |
392 | constants->SupportModulePositionY(ma)-box[1]-z1, | |
393 | constants->SupportModulePositionZ(ma)); | |
329ce604 | 394 | upFace->AddNode(aCORDE00,count,aco00); |
b7b24482 | 395 | |
329ce604 | 396 | TGeoTranslation *aco00q1=new TGeoTranslation("aco00q1", |
ee0da434 | 397 | -(constants->SupportModulePositionX(ma)-0.5*293+dy2), |
398 | constants->SupportModulePositionY(ma)-box[1]-z1, | |
399 | constants->SupportModulePositionZ(ma)); | |
329ce604 | 400 | upFace->AddNode(aCORDE00,count+1,aco00q1); |
b7b24482 | 401 | |
329ce604 | 402 | TGeoTranslation *aco00q2=new TGeoTranslation("aco00q2", |
ee0da434 | 403 | constants->SupportModulePositionX(ma)+0.5*293-dy2, |
404 | constants->SupportModulePositionY(ma)-box[1]-z1, | |
405 | constants->SupportModulePositionZ(ma)); | |
329ce604 | 406 | upFace->AddNode(aCORDE00,count+2,aco00q2); |
b7b24482 | 407 | |
329ce604 | 408 | TGeoTranslation *aco00q3=new TGeoTranslation("aco00q3", |
ee0da434 | 409 | -(constants->SupportModulePositionX(ma)+0.5*293-dy2), |
410 | constants->SupportModulePositionY(ma)-box[1]-z1, | |
411 | constants->SupportModulePositionZ(ma)); | |
329ce604 | 412 | upFace->AddNode(aCORDE00,count+3,aco00q3); |
b7b24482 | 413 | count=count+4; |
414 | ma++; | |
415 | } | |
416 | ||
417 | TGeoTranslation *c1 = new TGeoTranslation ("c1", | |
ee0da434 | 418 | constants->SupportModulePositionX(20)-0.5*293, |
419 | constants->SupportModulePositionY(20)-box[1]-z1, | |
420 | constants->SupportModulePositionZ(20)-40); | |
b7b24482 | 421 | TGeoTranslation *c2 = new TGeoTranslation ("c2", |
ee0da434 | 422 | constants->SupportModulePositionX(23)-0.5*293, |
423 | constants->SupportModulePositionY(23)-box[1]-z1, | |
424 | constants->SupportModulePositionZ(23)-40); | |
b7b24482 | 425 | TGeoTranslation *c3 = new TGeoTranslation ("c3", |
ee0da434 | 426 | constants->SupportModulePositionX(24)-0.5*293, |
427 | constants->SupportModulePositionY(24)-box[1]-z1, | |
428 | constants->SupportModulePositionZ(25)-40); | |
b7b24482 | 429 | TGeoTranslation *c4 = new TGeoTranslation ("c4", |
ee0da434 | 430 | constants->SupportModulePositionX(27)-0.5*293, |
431 | constants->SupportModulePositionY(27)-box[1]-z1, | |
432 | constants->SupportModulePositionZ(28)-40); | |
329ce604 | 433 | upFace->AddNode(aCORDE00,57,c1); |
434 | upFace->AddNode(aCORDE00,58,c2); | |
435 | upFace->AddNode(aCORDE00,59,c3); | |
436 | upFace->AddNode(aCORDE00,60,c4); | |
b7b24482 | 437 | |
438 | ||
439 | // Construct Bars for lateral supports (up-face) | |
440 | ||
441 | TGeoTranslation *aco00=new TGeoTranslation("aco00", | |
ee0da434 | 442 | constants->SupportModulePositionX(20)+0.5*293-dy, |
443 | constants->SupportModulePositionY(20)-box[1]-z1, | |
444 | constants->SupportModulePositionZ(20)-40); | |
329ce604 | 445 | upFace->AddNode(aCORDE00,61,aco00); |
b7b24482 | 446 | |
329ce604 | 447 | TGeoTranslation *aco00q1=new TGeoTranslation("aco00q1", |
ee0da434 | 448 | constants->SupportModulePositionX(23)+0.5*293-dy, |
449 | constants->SupportModulePositionY(23)-box[1]-z1, | |
450 | constants->SupportModulePositionZ(23)-40); | |
329ce604 | 451 | upFace->AddNode(aCORDE00,62,aco00q1); |
b7b24482 | 452 | |
329ce604 | 453 | TGeoTranslation *aco00q2=new TGeoTranslation("aco00q2", |
ee0da434 | 454 | constants->SupportModulePositionX(24)+0.5*293-dy, |
455 | constants->SupportModulePositionY(24)-box[1]-z1, | |
456 | constants->SupportModulePositionZ(25)-40); | |
329ce604 | 457 | upFace->AddNode(aCORDE00,63,aco00q2); |
b7b24482 | 458 | |
329ce604 | 459 | TGeoTranslation *aco00q3=new TGeoTranslation("aco00q3", |
ee0da434 | 460 | constants->SupportModulePositionX(27)+0.5*293-dy, |
461 | constants->SupportModulePositionY(27)-box[1]-z1, | |
462 | constants->SupportModulePositionZ(28)-40); | |
329ce604 | 463 | upFace->AddNode(aCORDE00,64,aco00q3); |
b7b24482 | 464 | |
465 | ||
466 | TGeoTranslation *aco01=new TGeoTranslation("aco01", | |
ee0da434 | 467 | constants->SupportModulePositionX(30)-0.5*293+dy, |
468 | constants->SupportModulePositionY(30)-box[1]-z1, | |
469 | constants->SupportModulePositionZ(30)-40); | |
329ce604 | 470 | upFace->AddNode(aCORDE00,65,aco01); |
b7b24482 | 471 | |
329ce604 | 472 | TGeoTranslation *aco01q1=new TGeoTranslation("aco01q1", |
ee0da434 | 473 | constants->SupportModulePositionX(33)-0.5*293+dy, |
474 | constants->SupportModulePositionY(33)-box[1]-z1, | |
475 | constants->SupportModulePositionZ(33)-40); | |
329ce604 | 476 | upFace->AddNode(aCORDE00,66,aco01q1); |
b7b24482 | 477 | |
329ce604 | 478 | TGeoTranslation *aco01q2=new TGeoTranslation("aco01q2", |
ee0da434 | 479 | constants->SupportModulePositionX(34)-0.5*293+dy, |
480 | constants->SupportModulePositionY(34)-box[1]-z1, | |
481 | constants->SupportModulePositionZ(35)-40); | |
329ce604 | 482 | upFace->AddNode(aCORDE00,67,aco01q2); |
b7b24482 | 483 | |
329ce604 | 484 | TGeoTranslation *aco01q3=new TGeoTranslation("aco01q3", |
ee0da434 | 485 | constants->SupportModulePositionX(37)-0.5*293+dy, |
486 | constants->SupportModulePositionY(37)-box[1]-z1, | |
487 | constants->SupportModulePositionZ(38)-40); | |
329ce604 | 488 | upFace->AddNode(aCORDE00,68,aco01q3); |
b7b24482 | 489 | |
490 | ||
491 | ||
492 | // Acorde's support bars (side's faces) | |
493 | ||
494 | //*** In Face *** | |
495 | ||
d6ae5763 | 496 | // box[0]=39; |
497 | box[0]=27; | |
b7b24482 | 498 | box[1]=5; |
499 | box[2]=5; | |
d6ae5763 | 500 | Float_t kro=3; |
b7b24482 | 501 | Float_t q1=0; |
ee0da434 | 502 | Float_t posx=constants->SupportModulePositionX(0)+0.5*293*0.7071-56*0.7071-18; |
503 | Float_t posy=constants->SupportModulePositionY(0)-0.5*293*0.7071-56*0.7071+3-q1+kro; | |
504 | Float_t posz=constants->SupportModulePositionZ(0); | |
b7b24482 | 505 | |
506 | TGeoBBox *acorde7 = new TGeoBBox("acorde7",box[0],box[1],box[2]); | |
507 | ||
329ce604 | 508 | TGeoVolume *aCORDE7 = new TGeoVolume("ACORDE7",acorde7,al); |
b7b24482 | 509 | |
510 | TGeoCombiTrans *aco7 = new TGeoCombiTrans("aco7",posx,posy,posz-4*dy,idrotm231); | |
329ce604 | 511 | TGeoCombiTrans *aco7q1 = new TGeoCombiTrans("aco7q1",posx,posy, |
b7b24482 | 512 | constants->ModulePositionZ(3)-4*dy,idrotm231); |
329ce604 | 513 | TGeoCombiTrans *aco7q2 = new TGeoCombiTrans("aco7q2",posx,posy, |
b7b24482 | 514 | constants->ModulePositionZ(5)-4*dy,idrotm231); |
329ce604 | 515 | TGeoCombiTrans *aco7q3 = new TGeoCombiTrans("aco7q3",posx,posy, |
b7b24482 | 516 | constants->ModulePositionZ(8)-4*dy,idrotm231); |
517 | ||
329ce604 | 518 | inFace->AddNode(aCORDE7,20,aco7); |
519 | inFace->AddNode(aCORDE7,21,aco7q1); | |
520 | inFace->AddNode(aCORDE7,22,aco7q2); | |
521 | inFace->AddNode(aCORDE7,23,aco7q3); | |
b7b24482 | 522 | |
523 | ||
524 | count=24; | |
5bfbf01f | 525 | for(Int_t dyA=0;dyA<=4;dyA++) |
b7b24482 | 526 | { |
527 | ||
ee0da434 | 528 | Float_t posx1=constants->SupportModulePositionX(dyA)+0.1*293*0.7071-56*0.7071-18+des; |
529 | Float_t posy1=constants->SupportModulePositionY(dyA)-0.1*293*0.7071-56*0.7071+3-des-q1+kro; | |
530 | Float_t posza=constants->SupportModulePositionZ(dyA); | |
531 | Float_t posx2=constants->SupportModulePositionX(dyA)-0.27*293*0.7071-56*0.7071-18+des; | |
532 | Float_t posy2=constants->SupportModulePositionY(dyA)+0.27*293*0.7071-56*0.7071+3-des-q1+kro; | |
5bfbf01f | 533 | TGeoCombiTrans *aco7q4 = new TGeoCombiTrans("aco7q4",posx1,posy1,posza,idrotm231); |
534 | TGeoCombiTrans *aco7q5 = new TGeoCombiTrans("aco7q5",posx2,posy2,posza,idrotm231); | |
329ce604 | 535 | inFace->AddNode(aCORDE7,count,aco7q4); |
536 | inFace->AddNode(aCORDE7,count+1,aco7q5); | |
b7b24482 | 537 | count=count+2; |
5bfbf01f | 538 | dyA++; |
b7b24482 | 539 | } |
540 | ||
541 | ||
542 | count=34; | |
5bfbf01f | 543 | for(Int_t dyb=5;dyb<=9;dyb++) |
b7b24482 | 544 | { |
545 | ||
ee0da434 | 546 | Float_t posx1=constants->SupportModulePositionX(dyb)+0.1*293*0.7071-56*0.7071-18+des; |
547 | Float_t posy1=constants->SupportModulePositionY(dyb)-0.1*293*0.7071-56*0.7071+3-des-q1+kro; | |
548 | Float_t poszb=constants->SupportModulePositionZ(dyb+10); | |
549 | Float_t posx2=constants->SupportModulePositionX(dyb)-0.27*293*0.7071-56*0.7071-18+des; | |
550 | Float_t posy2=constants->SupportModulePositionY(dyb)+0.27*293*0.7071-56*0.7071+3-des-q1+kro; | |
5bfbf01f | 551 | TGeoCombiTrans *aco7q6 = new TGeoCombiTrans("aco7q6",posx1,posy1,poszb,idrotm231); |
552 | TGeoCombiTrans *aco7q7 = new TGeoCombiTrans("aco7q7",posx2,posy2,poszb,idrotm231); | |
329ce604 | 553 | inFace->AddNode(aCORDE7,count,aco7q6); |
554 | inFace->AddNode(aCORDE7,count+1,aco7q7); | |
b7b24482 | 555 | count=count+2; |
5bfbf01f | 556 | dyb++; |
b7b24482 | 557 | } |
558 | ||
559 | ||
560 | ||
ee0da434 | 561 | Float_t posxq1=constants->SupportModulePositionX(10)+0.5*293*0.7071-56*0.7071-18; |
562 | Float_t posyq1=constants->SupportModulePositionY(10)-0.5*293*0.7071-56*0.7071+3-q1+kro; | |
563 | Float_t poszq1=constants->SupportModulePositionZ(10); | |
329ce604 | 564 | TGeoCombiTrans *aco7q8 = new TGeoCombiTrans("aco7q8",posxq1,posyq1,poszq1-4*dy,idrotm231); |
565 | TGeoCombiTrans *aco7q9 = new TGeoCombiTrans("aco7q9",posxq1,posyq1, | |
b7b24482 | 566 | constants->ModulePositionZ(13)-4*dy,idrotm231); |
329ce604 | 567 | TGeoCombiTrans *aco7q10 = new TGeoCombiTrans("aco7q10",posxq1,posyq1, |
b7b24482 | 568 | constants->ModulePositionZ(15)-4*dy,idrotm231); |
329ce604 | 569 | TGeoCombiTrans *aco7q11 = new TGeoCombiTrans("aco7q11",posxq1,posyq1, |
b7b24482 | 570 | constants->ModulePositionZ(18)-4*dy,idrotm231); |
329ce604 | 571 | inFace->AddNode(aCORDE7,44,aco7q8); |
572 | inFace->AddNode(aCORDE7,45,aco7q9); | |
573 | inFace->AddNode(aCORDE7,46,aco7q10); | |
574 | inFace->AddNode(aCORDE7,47,aco7q11); | |
b7b24482 | 575 | |
576 | ||
577 | count=48; | |
5bfbf01f | 578 | for(Int_t dyc=10;dyc<=14;dyc++) |
b7b24482 | 579 | |
580 | { | |
581 | ||
ee0da434 | 582 | Float_t posx1=constants->SupportModulePositionX(dyc)+0.1*293*0.7071-56*0.7071-18+des; |
583 | Float_t posy1=constants->SupportModulePositionY(dyc)-0.1*293*0.7071-56*0.7071+3-des-0.8+kro; | |
584 | Float_t poszc=constants->SupportModulePositionZ(dyc); | |
585 | Float_t posx2=constants->SupportModulePositionX(dyc)-0.27*293*0.7071-56*0.7071-18+des; | |
586 | Float_t posy2=constants->SupportModulePositionY(dyc)+0.27*293*0.7071-56*0.7071+3-des-1.5-0.8+kro; | |
b7b24482 | 587 | TGeoRotation *rot1 = new TGeoRotation(); |
588 | rot1->RotateZ(70); | |
5bfbf01f | 589 | TGeoCombiTrans *aco7q12 = new TGeoCombiTrans("aco7q12",posx1,posy1,poszc,idrotm231); |
590 | TGeoCombiTrans *aco7q13 = new TGeoCombiTrans("aco7q13",posx2+15,posy2-10,poszc,rot1); | |
329ce604 | 591 | inFace->AddNode(aCORDE7,count,aco7q12); |
592 | inFace->AddNode(aCORDE7,count+1,aco7q13);// bars 25 grades | |
b7b24482 | 593 | count=count+2; |
5bfbf01f | 594 | dyc++; |
b7b24482 | 595 | } |
596 | ||
597 | ||
598 | count=57; | |
5bfbf01f | 599 | for(Int_t dyd=15;dyd<=19;dyd++) |
b7b24482 | 600 | |
601 | { | |
602 | ||
ee0da434 | 603 | Float_t posx1=constants->SupportModulePositionX(dyd)+0.1*293*0.7071-56*0.7071-18+des; |
604 | Float_t posy1=constants->SupportModulePositionY(dyd)-0.1*293*0.7071-56*0.7071+3-des-q1-0.8+kro; | |
605 | Float_t poszd=constants->SupportModulePositionZ(dyd); | |
606 | Float_t posx2=constants->SupportModulePositionX(dyd)-0.27*293*0.7071-56*0.7071-18+des; | |
607 | Float_t posy2=constants->SupportModulePositionY(dyd)+0.27*293*0.7071-56*0.7071+3-des-1.5-q1-0.8+kro; | |
b7b24482 | 608 | TGeoRotation *rot1 = new TGeoRotation(); |
609 | rot1->RotateZ(70); | |
5bfbf01f | 610 | TGeoCombiTrans *aco7q14 = new TGeoCombiTrans("aco7q14",posx1,posy1,poszd,idrotm231); |
611 | TGeoCombiTrans *aco7q15 = new TGeoCombiTrans("aco7q15",posx2+15,posy2-10,poszd,rot1); | |
329ce604 | 612 | inFace->AddNode(aCORDE7,count,aco7q14); |
613 | inFace->AddNode(aCORDE7,count+1,aco7q15);// bars 25 grades | |
b7b24482 | 614 | count=count+2; |
5bfbf01f | 615 | dyd++; |
b7b24482 | 616 | } |
617 | ||
618 | ||
619 | //*** Out Face *** | |
620 | ||
d6ae5763 | 621 | // box[0]=39; |
622 | box[0]=27; | |
b7b24482 | 623 | box[1]=5; |
624 | box[2]=5; | |
625 | Float_t s1=2.5; | |
ee0da434 | 626 | Float_t posxqa=constants->SupportModulePositionX(50)-0.5*293*0.7071+56*0.7071+18; |
627 | Float_t posyqa=constants->SupportModulePositionY(50)-0.5*293*0.7071-56*0.7071+3-s1+kro; | |
628 | Float_t poszqa=constants->SupportModulePositionZ(50); | |
329ce604 | 629 | TGeoCombiTrans *aco7q16 = new TGeoCombiTrans("aco7q16", |
630 | posxqa,posyqa,poszqa-4*dy,idrotm232); | |
631 | TGeoCombiTrans *aco7q17 = new TGeoCombiTrans("aco7q17", | |
632 | posxqa,posyqa, | |
b7b24482 | 633 | constants->ModulePositionZ(43)-4*dy,idrotm232); |
329ce604 | 634 | TGeoCombiTrans *aco7q18 = new TGeoCombiTrans("aco7q18",posxqa,posyqa, |
b7b24482 | 635 | constants->ModulePositionZ(55)-4*dy,idrotm232); |
329ce604 | 636 | TGeoCombiTrans *aco7q19 = new TGeoCombiTrans("aco7q19",posxqa,posyqa, |
b7b24482 | 637 | constants->ModulePositionZ(58)-4*dy,idrotm232); |
329ce604 | 638 | TGeoCombiTrans *aco7q20 = new TGeoCombiTrans("aco7q20", |
ee0da434 | 639 | constants->SupportModulePositionX(50)-0.1*293*0.7071 |
b7b24482 | 640 | +56*0.7071+18-des, |
ee0da434 | 641 | constants->SupportModulePositionY |
b7b24482 | 642 | (50)-0.1*293*0.7071-56*0.7071+3-des-s1, |
ee0da434 | 643 | constants->SupportModulePositionZ(45),idrotm232); |
329ce604 | 644 | TGeoCombiTrans *aco7q21 = new TGeoCombiTrans("aco7q21", |
ee0da434 | 645 | constants->SupportModulePositionX(50)+0.27*293*0.7071 |
b7b24482 | 646 | +56*0.7071+18-des, |
ee0da434 | 647 | constants->SupportModulePositionY(50) |
b7b24482 | 648 | +0.27*293*0.7071-56*0.7071+3-des-s1, |
ee0da434 | 649 | constants->SupportModulePositionZ(45),idrotm232); |
329ce604 | 650 | outFace->AddNode(aCORDE7,19,aco7q16); |
651 | outFace->AddNode(aCORDE7,20,aco7q17); | |
652 | outFace->AddNode(aCORDE7,21,aco7q18); | |
653 | outFace->AddNode(aCORDE7,22,aco7q19); | |
654 | outFace->AddNode(aCORDE7,23,aco7q20); | |
655 | outFace->AddNode(aCORDE7,24,aco7q21); | |
b7b24482 | 656 | |
657 | ||
658 | count=25; | |
5bfbf01f | 659 | for(Int_t dye=50;dye<=54;dye++) |
b7b24482 | 660 | { |
661 | ||
ee0da434 | 662 | Float_t posx1=constants->SupportModulePositionX(dye)-0.1*293*0.7071+56*0.7071+18-des; |
663 | Float_t posy1=constants->SupportModulePositionY(dye)-0.1*293*0.7071-56*0.7071+3-des-s1+kro; | |
664 | Float_t posze=constants->SupportModulePositionZ(dye); | |
665 | Float_t posx2=constants->SupportModulePositionX(dye)+0.27*293*0.7071+56*0.7071+18-des; | |
666 | Float_t posy2=constants->SupportModulePositionY(dye)+0.27*293*0.7071-56*0.7071+3-des-s1+kro; | |
5bfbf01f | 667 | TGeoCombiTrans *aco7q22 = new TGeoCombiTrans("aco7q22",posx1,posy1,posze,idrotm232); |
668 | TGeoCombiTrans *aco7q23 = new TGeoCombiTrans("aco7q23",posx2,posy2,posze,idrotm232); | |
329ce604 | 669 | outFace->AddNode(aCORDE7,count,aco7q22); |
670 | outFace->AddNode(aCORDE7,count+1,aco7q23); | |
b7b24482 | 671 | count=count+2; |
5bfbf01f | 672 | dye++; |
b7b24482 | 673 | } |
674 | ||
675 | ||
676 | count=35; | |
5bfbf01f | 677 | for(Int_t dyf=57;dyf<=59;dyf++) |
b7b24482 | 678 | { |
679 | ||
ee0da434 | 680 | Float_t posx1=constants->SupportModulePositionX(dyf)-0.1*293*0.7071+56*0.7071+18-des; |
681 | Float_t posy1=constants->SupportModulePositionY(dyf)-0.1*293*0.7071-56*0.7071+3-des-s1+kro; | |
682 | Float_t poszf=constants->SupportModulePositionZ(dyf-10); | |
683 | Float_t posx2=constants->SupportModulePositionX(dyf)+0.27*293*0.7071+56*0.7071+18-des; | |
684 | Float_t posy2=constants->SupportModulePositionY(dyf)+0.27*293*0.7071-56*0.7071+3-des-s1+kro; | |
5bfbf01f | 685 | TGeoCombiTrans *aco7q24 = new TGeoCombiTrans("aco7q24",posx1,posy1,poszf,idrotm232); |
686 | TGeoCombiTrans *aco7q25 = new TGeoCombiTrans("aco7q25",posx2,posy2,poszf,idrotm232); | |
329ce604 | 687 | outFace->AddNode(aCORDE7,count,aco7q24); |
688 | outFace->AddNode(aCORDE7,count+1,aco7q25); | |
b7b24482 | 689 | count=count+2; |
5bfbf01f | 690 | dyf++; |
b7b24482 | 691 | } |
692 | ||
693 | ||
ee0da434 | 694 | Float_t posxqb=constants->SupportModulePositionX(40)-0.5*293*0.7071+56*0.7071+18; |
695 | Float_t posyqb=constants->SupportModulePositionY(40)-0.5*293*0.7071-56*0.7071+3-s1+kro; | |
696 | Float_t poszqb=constants->SupportModulePositionZ(40); | |
329ce604 | 697 | TGeoCombiTrans *aco7q26 = new TGeoCombiTrans("aco7q26", |
698 | posxqb,posyqb,poszqb-4*dy,idrotm232); | |
699 | TGeoCombiTrans *aco7q27 = new TGeoCombiTrans("aco7q27", | |
700 | posxqb,posyqb, | |
ee0da434 | 701 | constants->SupportModulePositionZ(43)-4*dy,idrotm232); |
329ce604 | 702 | TGeoCombiTrans *aco7q28 = new TGeoCombiTrans("aco7q28", |
703 | posxqb,posyqb, | |
ee0da434 | 704 | constants->SupportModulePositionZ(45)-4*dy,idrotm232); |
329ce604 | 705 | TGeoCombiTrans *aco7q29 = new TGeoCombiTrans("aco7q29",posxqb,posyqb, |
ee0da434 | 706 | constants->SupportModulePositionZ(48)-4*dy,idrotm232); |
329ce604 | 707 | outFace->AddNode(aCORDE7,41,aco7q26); |
708 | outFace->AddNode(aCORDE7,42,aco7q27); | |
709 | outFace->AddNode(aCORDE7,43,aco7q28); | |
710 | outFace->AddNode(aCORDE7,44,aco7q29); | |
b7b24482 | 711 | |
712 | count=45; | |
5bfbf01f | 713 | for(Int_t dyg=40;dyg<=44;dyg++) |
b7b24482 | 714 | { |
715 | ||
ee0da434 | 716 | Float_t posx1=constants->SupportModulePositionX(dyg)-0.1*293*0.7071+56*0.7071+18-des; |
717 | Float_t posy1=constants->SupportModulePositionY(dyg)-0.1*293*0.7071-56*0.7071+3-des-s1+kro; | |
718 | Float_t poszg=constants->SupportModulePositionZ(dyg); | |
719 | Float_t posx2=constants->SupportModulePositionX(dyg)+0.27*293*0.7071+56*0.7071+18-des; | |
720 | Float_t posy2=constants->SupportModulePositionY(dyg)+0.27*293*0.7071-56*0.7071+3-des-s1+kro; | |
b7b24482 | 721 | TGeoRotation *rot1 = new TGeoRotation(); |
722 | rot1->RotateZ(105); | |
5bfbf01f | 723 | TGeoCombiTrans *aco7q30 = new TGeoCombiTrans("aco7q30",posx1,posy1,poszg,idrotm232); |
724 | TGeoCombiTrans *aco7q31 = new TGeoCombiTrans("aco7q31",posx2-15,posy2-10,poszg,rot1); | |
329ce604 | 725 | outFace->AddNode(aCORDE7,count,aco7q30); |
726 | outFace->AddNode(aCORDE7,count+1,aco7q31);// bars 25 grades | |
b7b24482 | 727 | count=count+2; |
5bfbf01f | 728 | dyg++; |
b7b24482 | 729 | } |
730 | ||
731 | ||
732 | count=55; | |
5bfbf01f | 733 | for(Int_t dyh=45;dyh<=49;dyh++) |
b7b24482 | 734 | { |
735 | ||
ee0da434 | 736 | Float_t posx1=constants->SupportModulePositionX(dyh)-0.1*293*0.7071+56*0.7071+18-des; |
737 | Float_t posy1=constants->SupportModulePositionY(dyh)-0.1*293*0.7071-56*0.7071+3-des-s1+kro; | |
738 | Float_t poszh=constants->SupportModulePositionZ(dyh); | |
739 | Float_t posx2=constants->SupportModulePositionX(dyh)+0.27*293*0.7071+56*0.7071+18-des; | |
740 | Float_t posy2=constants->SupportModulePositionY(dyh)+0.27*293*0.7071-56*0.7071+3-des-s1+kro; | |
b7b24482 | 741 | TGeoRotation *rot1 = new TGeoRotation(); |
742 | rot1->RotateZ(105); | |
5bfbf01f | 743 | TGeoCombiTrans *aco7q32 = new TGeoCombiTrans("aco7q32",posx1,posy1,poszh,idrotm232); |
744 | TGeoCombiTrans *aco7q33 = new TGeoCombiTrans("aco7q33",posx2-15,posy2-10,poszh,rot1); | |
329ce604 | 745 | outFace->AddNode(aCORDE7,count,aco7q32); |
746 | outFace->AddNode(aCORDE7,count+1,aco7q33);// bars 25 grades | |
b7b24482 | 747 | count=count+2; |
5bfbf01f | 748 | dyh++; |
b7b24482 | 749 | } |
750 | ||
751 | ||
752 | ||
753 | // Set the bars non perpendicular at side faces | |
754 | ||
755 | //*** In-Face *** | |
756 | ||
757 | box[0]=5; | |
d6ae5763 | 758 | // box[1]=55.15; |
759 | box[1]=40; | |
b7b24482 | 760 | box[2]=5; |
761 | Float_t sm=2; | |
762 | Float_t re=1; | |
ee0da434 | 763 | Float_t posx1=constants->SupportModulePositionX(0)+0.5*293*0.7071-4*box[0]-8+re; |
764 | Float_t posy1=constants->SupportModulePositionY(0)-0.5*293*0.7071-box[1]-18-2+sm; | |
765 | Float_t posz1=constants->SupportModulePositionZ(0); | |
b7b24482 | 766 | |
329ce604 | 767 | TGeoBBox *acorde7q1 = new TGeoBBox("acorde7q1",box[0],box[1],box[2]); |
b7b24482 | 768 | |
329ce604 | 769 | TGeoVolume *aCORDE7q1 = new TGeoVolume("ACORDE7_1",acorde7q1,al); |
b7b24482 | 770 | TGeoTranslation *aco71 = new TGeoTranslation("aco71",posx1,posy1,posz1-4*dy); |
771 | TGeoTranslation *aco72 = new TGeoTranslation("aco72",posx1,posy1, | |
ee0da434 | 772 | constants->SupportModulePositionZ(3)-4*dy); |
b7b24482 | 773 | TGeoTranslation *aco73 = new TGeoTranslation("aco73",posx1,posy1, |
ee0da434 | 774 | constants->SupportModulePositionZ(5)-4*dy); |
b7b24482 | 775 | TGeoTranslation *aco74 = new TGeoTranslation("aco74",posx1,posy1, |
ee0da434 | 776 | constants->SupportModulePositionZ(8)-4*dy); |
329ce604 | 777 | inFace->AddNode(aCORDE7q1,67,aco71); |
778 | inFace->AddNode(aCORDE7q1,68,aco72); | |
779 | inFace->AddNode(aCORDE7q1,69,aco73); | |
780 | inFace->AddNode(aCORDE7q1,70,aco74); | |
b7b24482 | 781 | |
782 | ||
783 | count=71; | |
5bfbf01f | 784 | for(Int_t dyi=0;dyi<=4;dyi++) |
b7b24482 | 785 | { |
786 | ||
ee0da434 | 787 | Float_t posx1a=constants->SupportModulePositionX(dyi)+0.1*293*0.7071-4*box[0]-8+des+re; |
788 | Float_t posy1a=constants->SupportModulePositionY(dyi)-0.1*293*0.7071-box[1]-18-2-des+sm; | |
789 | Float_t posz1a=constants->SupportModulePositionZ(dyi); | |
790 | Float_t dyx2=constants->SupportModulePositionX(dyi)-0.27*293*0.7071-4*box[0]-8+des+re; | |
791 | Float_t dyy2=constants->SupportModulePositionY(dyi)+0.27*293*0.7071-box[1]-18-2-des+sm; | |
5bfbf01f | 792 | TGeoTranslation *aco75=new TGeoTranslation("aco75",posx1a,posy1a,posz1a); |
793 | TGeoTranslation *aco76=new TGeoTranslation("aco76",dyx2,dyy2,posz1a); | |
329ce604 | 794 | inFace->AddNode(aCORDE7q1,count,aco75); |
795 | inFace->AddNode(aCORDE7q1,count+1,aco76); | |
b7b24482 | 796 | count=count+2; |
5bfbf01f | 797 | dyi++; |
b7b24482 | 798 | } |
799 | ||
800 | ||
801 | count=81; | |
5bfbf01f | 802 | for(Int_t dyj=5;dyj<=9;dyj++) |
b7b24482 | 803 | { |
804 | ||
ee0da434 | 805 | Float_t posx1b=constants->SupportModulePositionX(dyj)+0.1*293*0.7071-4*box[0]-8+des+re; |
806 | Float_t posy1b=constants->SupportModulePositionY(dyj)-0.1*293*0.7071-box[1]-18-2-des+sm; | |
807 | Float_t posz1b=constants->SupportModulePositionZ(dyj+10); | |
808 | Float_t dyx2=constants->SupportModulePositionX(dyj)-0.27*293*0.7071-4*box[0]-8+des+re; | |
809 | Float_t dyy2=constants->SupportModulePositionY(dyj)+0.27*293*0.7071-box[1]-18-2-des+sm; | |
5bfbf01f | 810 | TGeoTranslation *aco75=new TGeoTranslation("aco75",posx1b,posy1b,posz1b); |
811 | TGeoTranslation *aco76=new TGeoTranslation("aco76",dyx2,dyy2,posz1b); | |
329ce604 | 812 | inFace->AddNode(aCORDE7q1,count,aco75); |
813 | inFace->AddNode(aCORDE7q1,count+1,aco76); | |
b7b24482 | 814 | count=count+2; |
5bfbf01f | 815 | dyj++; |
b7b24482 | 816 | } |
817 | ||
818 | ||
ee0da434 | 819 | Float_t posx1q1=constants->SupportModulePositionX(10)+0.5*293*0.7071-4*box[0]-8+re; |
820 | Float_t posy1q1=constants->SupportModulePositionY(10)-0.5*293*0.7071-box[1]-18-2+sm; | |
821 | Float_t posz1q1=constants->SupportModulePositionZ(10); | |
329ce604 | 822 | TGeoTranslation *aco77=new TGeoTranslation("aco77",posx1q1,posy1q1,posz1q1-4*dy); |
823 | TGeoTranslation *aco78=new TGeoTranslation("aco78",posx1q1,posy1q1, | |
ee0da434 | 824 | constants->SupportModulePositionZ(13)-4*dy); |
b7b24482 | 825 | |
329ce604 | 826 | TGeoTranslation *aco79=new TGeoTranslation("aco79",posx1q1,posy1q1, |
ee0da434 | 827 | constants->SupportModulePositionZ(15)-4*dy); |
329ce604 | 828 | TGeoTranslation *aco710=new TGeoTranslation("aco710",posx1q1,posy1q1, |
ee0da434 | 829 | constants->SupportModulePositionZ(18)-4*dy); |
329ce604 | 830 | inFace->AddNode(aCORDE7q1,91,aco77); |
831 | inFace->AddNode(aCORDE7q1,92,aco78); | |
832 | inFace->AddNode(aCORDE7q1,93,aco79); | |
833 | inFace->AddNode(aCORDE7q1,94,aco710); | |
b7b24482 | 834 | |
835 | count=95; | |
5bfbf01f | 836 | for(Int_t dyk=10;dyk<=14;dyk++) |
b7b24482 | 837 | { |
838 | ||
ee0da434 | 839 | Float_t posx1c=constants->SupportModulePositionX(dyk)+0.1*293*0.7071-4*box[0]-8+des+re+.83; |
840 | Float_t posy1c=constants->SupportModulePositionY(dyk)-0.1*293*0.7071-box[1]-18-2-des+sm; | |
841 | Float_t posz1c=constants->SupportModulePositionZ(dyk); | |
842 | Float_t dyx2=constants->SupportModulePositionX(dyk)-0.27*293*0.7071-4*box[0]-4+des+re+0.83; | |
843 | Float_t dyy2=constants->SupportModulePositionY(dyk)+0.27*293*0.7071-box[1]-18-5-des+sm; | |
5bfbf01f | 844 | TGeoTranslation *aco711=new TGeoTranslation("aco711",posx1c,posy1c,posz1c); |
845 | TGeoTranslation *aco712=new TGeoTranslation("aco712",dyx2,dyy2,posz1c); | |
329ce604 | 846 | inFace->AddNode(aCORDE7q1,count,aco711); |
847 | inFace->AddNode(aCORDE7q1,count+1,aco712); | |
b7b24482 | 848 | count=count+2; |
5bfbf01f | 849 | dyk++; |
b7b24482 | 850 | } |
851 | ||
852 | ||
853 | ||
854 | count=105; | |
5bfbf01f | 855 | for(Int_t dyl=15;dyl<=19;dyl++) |
b7b24482 | 856 | { |
857 | ||
ee0da434 | 858 | Float_t posx1d=constants->SupportModulePositionX(dyl)+0.1*293*0.7071-4*box[0]-8+des+re+0.83; |
859 | Float_t posy1d=constants->SupportModulePositionY(dyl)-0.1*293*0.7071-box[1]-18-2-des+sm; | |
860 | Float_t posz1d=constants->SupportModulePositionZ(dyl); | |
861 | Float_t dyx2=constants->SupportModulePositionX(dyl)-0.27*293*0.7071-4*box[0]-4+des+re+0.83; | |
862 | Float_t dyy2=constants->SupportModulePositionY(dyl)+0.27*293*0.7071-box[1]-18-5-des; | |
5bfbf01f | 863 | TGeoTranslation *aco713=new TGeoTranslation("aco713",posx1d,posy1d,posz1d); |
864 | TGeoTranslation *aco714=new TGeoTranslation("aco714",dyx2,dyy2,posz1d); | |
329ce604 | 865 | inFace->AddNode(aCORDE7q1,count,aco713); |
866 | inFace->AddNode(aCORDE7q1,count+1,aco714); | |
b7b24482 | 867 | count=count+2; |
5bfbf01f | 868 | dyl++; |
b7b24482 | 869 | } |
870 | ||
871 | //*** Out-Face *** | |
872 | ||
ee0da434 | 873 | Float_t posx1qa=constants->SupportModulePositionX(50)-0.5*293*0.7071+4*box[0]+8-re-1; |
874 | Float_t posy1qa=constants->SupportModulePositionY(50)-0.5*293*0.7071-box[1]-18-2+sm-2.5; | |
875 | Float_t posz1qa=constants->SupportModulePositionZ(50); | |
329ce604 | 876 | TGeoTranslation *aco715=new TGeoTranslation("aco715",posx1qa,posy1qa,posz1qa-4*dy); |
877 | TGeoTranslation *aco716=new TGeoTranslation("aco716",posx1qa,posy1qa, | |
ee0da434 | 878 | constants->SupportModulePositionZ(43)-4*dy); |
329ce604 | 879 | TGeoTranslation *aco717=new TGeoTranslation("aco717",posx1qa,posy1qa, |
ee0da434 | 880 | constants->SupportModulePositionZ(55)-4*dy); |
329ce604 | 881 | TGeoTranslation *aco718=new TGeoTranslation("aco718",posx1qa,posy1qa, |
ee0da434 | 882 | constants->SupportModulePositionZ(58)-4*dy); |
b7b24482 | 883 | TGeoTranslation *aco719=new TGeoTranslation("aco719", |
ee0da434 | 884 | constants->SupportModulePositionX(50)-0.1*293*0.7071+4*box[0]+8-des-re-1, |
885 | constants->SupportModulePositionY(50)-0.1*293*0.7071-box[1]-18-2-des+sm-2.5, | |
886 | constants->SupportModulePositionZ(45)); | |
b7b24482 | 887 | TGeoTranslation *aco720=new TGeoTranslation("aco720", |
ee0da434 | 888 | constants->SupportModulePositionX(50)+0.27*293*0.7071+4*box[0]+8-des-re-1, |
889 | constants->SupportModulePositionY(50)+0.27*293*0.7071-box[1]-18-2-des+sm-2.5, | |
890 | constants->SupportModulePositionZ(45)); | |
b7b24482 | 891 | |
892 | ||
329ce604 | 893 | outFace->AddNode(aCORDE7q1,115,aco715); |
894 | outFace->AddNode(aCORDE7q1,116,aco716); | |
895 | outFace->AddNode(aCORDE7q1,117,aco717); | |
896 | outFace->AddNode(aCORDE7q1,118,aco718); | |
897 | outFace->AddNode(aCORDE7q1,119,aco719); | |
898 | outFace->AddNode(aCORDE7q1,120,aco720); | |
b7b24482 | 899 | |
900 | ||
901 | ||
902 | ||
903 | count=65; | |
5bfbf01f | 904 | for(Int_t dym=50;dym<=54;dym++) |
b7b24482 | 905 | { |
906 | ||
ee0da434 | 907 | Float_t posx1e=constants->SupportModulePositionX(dym)-0.1*293*0.7071+4*box[0]+8-des-re-1; |
908 | Float_t posy1e=constants->SupportModulePositionY(dym)-0.1*293*0.7071-box[1]-18-2-des+sm-2.5; | |
909 | Float_t posz1e=constants->SupportModulePositionZ(dym); | |
910 | Float_t dyx2=constants->SupportModulePositionX(dym)+0.27*293*0.7071+4*box[0]+8-des-re-1; | |
911 | Float_t dyy2=constants->SupportModulePositionY(dym)+0.27*293*0.7071-box[1]-18-2-des+sm-2.5; | |
5bfbf01f | 912 | TGeoTranslation *aco721=new TGeoTranslation("aco721",posx1e,posy1e,posz1e); |
913 | TGeoTranslation *aco722=new TGeoTranslation("aco722",dyx2,dyy2,posz1e); | |
329ce604 | 914 | outFace->AddNode(aCORDE7q1,count,aco721); |
915 | outFace->AddNode(aCORDE7q1,count+1,aco722); | |
b7b24482 | 916 | count=count+2; |
5bfbf01f | 917 | dym++; |
b7b24482 | 918 | } |
919 | ||
920 | ||
921 | ||
922 | count=75; | |
5bfbf01f | 923 | for(Int_t dyn=57;dyn<=59;dyn++) |
b7b24482 | 924 | { |
925 | ||
ee0da434 | 926 | Float_t posx1f=constants->SupportModulePositionX(dyn)-0.1*293*0.7071+4*box[0]+8-des-re-1; |
927 | Float_t posy1f=constants->SupportModulePositionY(dyn)-0.1*293*0.7071-box[1]-18-2-des+sm-2.5; | |
928 | Float_t posz1f=constants->SupportModulePositionZ(dyn-10); | |
929 | Float_t dyx2=constants->SupportModulePositionX(dyn)+0.27*293*0.7071+4*box[0]+8-des-re-1; | |
930 | Float_t dyy2=constants->SupportModulePositionY(dyn)+0.27*293*0.7071-box[1]-18-2-des+sm-2.5; | |
5bfbf01f | 931 | TGeoTranslation *aco723=new TGeoTranslation("aco723",posx1f,posy1f,posz1f); |
932 | TGeoTranslation *aco724=new TGeoTranslation("aco724",dyx2,dyy2,posz1f); | |
329ce604 | 933 | outFace->AddNode(aCORDE7q1,count,aco723); |
934 | outFace->AddNode(aCORDE7q1,count+1,aco724); | |
b7b24482 | 935 | count=count+2; |
5bfbf01f | 936 | dyn++; |
b7b24482 | 937 | } |
938 | ||
939 | ||
ee0da434 | 940 | Float_t posx1qb=constants->SupportModulePositionX(40)-0.5*293*0.7071+4*box[0]+5; |
941 | Float_t posy1qb=constants->SupportModulePositionY(40)-0.5*293*0.7071-box[1]-18-2; | |
942 | Float_t posz1qb=constants->SupportModulePositionZ(40); | |
329ce604 | 943 | TGeoTranslation *aco725=new TGeoTranslation("aco725",posx1qb,posy1qb,posz1qb-4*dy); |
944 | TGeoTranslation *aco726=new TGeoTranslation("aco726",posx1qb,posy1qb, | |
ee0da434 | 945 | constants->SupportModulePositionZ(43)-4*dy); |
329ce604 | 946 | TGeoTranslation *aco727=new TGeoTranslation("aco727",posx1qb,posy1qb, |
ee0da434 | 947 | constants->SupportModulePositionZ(45)-4*dy); |
329ce604 | 948 | TGeoTranslation *aco728=new TGeoTranslation("aco728",posx1qb,posy1qb, |
ee0da434 | 949 | constants->SupportModulePositionZ(48)-4*dy); |
329ce604 | 950 | outFace->AddNode(aCORDE7q1,85,aco725); |
951 | outFace->AddNode(aCORDE7q1,86,aco726); | |
952 | outFace->AddNode(aCORDE7q1,87,aco727); | |
953 | outFace->AddNode(aCORDE7q1,88,aco728); | |
b7b24482 | 954 | |
955 | ||
956 | ||
957 | count=89; | |
5bfbf01f | 958 | for(Int_t dyo=40;dyo<=44;dyo++) |
b7b24482 | 959 | { |
960 | ||
ee0da434 | 961 | Float_t posx1g=constants->SupportModulePositionX(dyo)-0.1*293*0.7071+4*box[0]+8-des-re-1; |
962 | Float_t posy1g=constants->SupportModulePositionY(dyo)-0.1*293*0.7071-box[1]-18-2-des+sm-2.5; | |
963 | Float_t posz1g=constants->SupportModulePositionZ(dyo); | |
964 | Float_t dyx2=constants->SupportModulePositionX(dyo)+0.27*293*0.7071+4*box[0]+4-des-re-1+2.8; | |
965 | Float_t dyy2=constants->SupportModulePositionY(dyo)+0.27*293*0.7071-box[1]-18-5-des+sm-2.5+3; | |
5bfbf01f | 966 | TGeoTranslation *aco729=new TGeoTranslation("aco729",posx1g,posy1g,posz1g); |
967 | TGeoTranslation *aco730=new TGeoTranslation("aco730",dyx2,dyy2,posz1g); | |
329ce604 | 968 | outFace->AddNode(aCORDE7q1,count,aco729); |
969 | outFace->AddNode(aCORDE7q1,count+1,aco730); | |
b7b24482 | 970 | count=count+2; |
5bfbf01f | 971 | dyo++; |
b7b24482 | 972 | } |
973 | ||
974 | ||
975 | ||
976 | count=99; | |
5bfbf01f | 977 | for(Int_t dyp=45;dyp<=49;dyp++) |
b7b24482 | 978 | { |
979 | ||
ee0da434 | 980 | Float_t posx1h=constants->SupportModulePositionX(dyp)-0.1*293*0.7071+4*box[0]+8-des-re-1; |
981 | Float_t posy1h=constants->SupportModulePositionY(dyp)-0.1*293*0.7071-box[1]-18-2-des+sm-2.5; | |
982 | Float_t posz1h=constants->SupportModulePositionZ(dyp); | |
983 | Float_t dyx2=constants->SupportModulePositionX(dyp)+0.27*293*0.7071+4*box[0]+4-des-re-1+2.8; | |
984 | Float_t dyy2=constants->SupportModulePositionY(dyp)+0.27*293*0.7071-box[1]-18-5-des+sm-2.5+3; | |
5bfbf01f | 985 | TGeoTranslation *aco729=new TGeoTranslation("aco729",posx1h,posy1h,posz1h); |
986 | TGeoTranslation *aco730=new TGeoTranslation("aco730",dyx2,dyy2,posz1h); | |
329ce604 | 987 | outFace->AddNode(aCORDE7q1,count,aco729); |
988 | outFace->AddNode(aCORDE7q1,count+1,aco730); | |
b7b24482 | 989 | count=count+2; |
5bfbf01f | 990 | dyp++; |
b7b24482 | 991 | } |
992 | ||
993 | ||
994 | // Here I define a master volume "ACORDE_SUPPORT" for Acorde's support | |
995 | ||
996 | //---> Set the support of ACORDE alice MODULES | |
997 | ||
998 | ||
999 | Float_t dy1=20; | |
1000 | box[0]=10; | |
1001 | box[1]=0.5; | |
1002 | box[2]=500; | |
1003 | ||
ee0da434 | 1004 | Float_t sx=constants->SupportModulePositionX(24)-0.5*293; |
1005 | Float_t sy=constants->SupportModulePositionY(24)-box[1]; | |
b7b24482 | 1006 | Float_t sz=0; |
ee0da434 | 1007 | Float_t sx2=constants->SupportModulePositionX(24)+0.5*293-dy; |
1008 | Float_t sy2=constants->SupportModulePositionY(24)-box[1]; | |
1009 | Float_t sx4=constants->SupportModulePositionX(24)-0.5*293+dy2; | |
1010 | Float_t sy4=constants->SupportModulePositionY(24)-box[1]; | |
1011 | Float_t sx5=constants->SupportModulePositionX(24)+0.5*293-dy2; | |
1012 | Float_t sy5=constants->SupportModulePositionY(24)-box[1]; | |
1013 | ||
1014 | Float_t dyx=constants->SupportModulePositionX(4)+0.5*293*0.7071-box[0]; | |
1015 | Float_t dyy=constants->SupportModulePositionY(4)-0.5*293*0.7071-box[1]; | |
b7b24482 | 1016 | Float_t dyz=0; |
ee0da434 | 1017 | Float_t dyx1=constants->SupportModulePositionX(4)+0.1*293*0.7071-box[0]; |
1018 | Float_t dyy1=constants->SupportModulePositionY(4)-0.1*293*0.7071-box[1]; | |
1019 | Float_t dyx2=constants->SupportModulePositionX(4)-0.27*293*0.7071-box[0]; | |
1020 | Float_t dyy2=constants->SupportModulePositionY(4)+0.27*293*0.7071-box[1]; | |
b7b24482 | 1021 | |
1022 | ||
ee0da434 | 1023 | Float_t dx1=constants->SupportModulePositionX(14)+0.5*293*0.7071-box[0]; |
1024 | Float_t dy11=constants->SupportModulePositionY(14)-0.5*293*0.7071-box[1]; | |
1025 | Float_t dyx11=constants->SupportModulePositionX(14)+0.1*293*0.7071-box[0]; | |
1026 | Float_t dyy11=constants->SupportModulePositionY(14)-0.1*293*0.7071-box[1]; | |
1027 | Float_t dyx21=constants->SupportModulePositionX(14)-0.27*293*0.7071-box[0]; | |
1028 | Float_t dyy21=constants->SupportModulePositionY(14)+0.27*293*0.7071-box[1]; | |
b7b24482 | 1029 | |
1030 | ||
1031 | Float_t tbox[3]; | |
1032 | tbox[0]=1; | |
1033 | tbox[1]=7; | |
1034 | tbox[2]=500; | |
1035 | ||
1036 | TGeoVolume *support = new TGeoVolumeAssembly("ACORDE_SUPPORT"); | |
1037 | ||
1038 | TGeoBBox *acorde8 = new TGeoBBox("acorde8",box[0],box[1],box[2]); | |
329ce604 | 1039 | TGeoVolume *aCORDE8 = new TGeoVolume("ACORDE8",acorde8,al); |
b7b24482 | 1040 | |
1041 | TGeoBBox *acorde9 = new TGeoBBox("acorde9",tbox[0],tbox[1],tbox[2]); | |
329ce604 | 1042 | TGeoVolume *aCORDE9 = new TGeoVolume("ACORDE9",acorde9,al); |
b7b24482 | 1043 | |
329ce604 | 1044 | support->AddNode(aCORDE8,1,new TGeoTranslation(0,-5,0)); |
1045 | support->AddNode(aCORDE8,2,new TGeoTranslation(0,-dy1,0)); | |
1046 | support->AddNode(aCORDE9,3,new TGeoTranslation(0,-tbox[1]-5.5,0)); | |
b7b24482 | 1047 | |
1048 | ||
1049 | // Put "support" on Up-Face | |
1050 | ||
329ce604 | 1051 | upFace->AddNode(support,69,new TGeoTranslation("aco8",sx,sy,sz)); |
1052 | upFace->AddNode(support,70,new TGeoTranslation("aco8_2",sx2,sy2,sz)); | |
1053 | upFace->AddNode(support,71,new TGeoTranslation("aco8_4",sx4,sy4,sz)); | |
1054 | upFace->AddNode(support,72,new TGeoTranslation("aco8_6",sx5,sy5,sz)); | |
1055 | upFace->AddNode(support,73,new TGeoTranslation("aco8_2",-sx2,sy2,sz)); | |
1056 | upFace->AddNode(support,74,new TGeoTranslation("aco8_4",-sx4,sy4,sz)); | |
1057 | upFace->AddNode(support,75,new TGeoTranslation("aco8_6",-sx5,sy5,sz)); | |
b7b24482 | 1058 | |
1059 | // Put "support" on In-Face | |
1060 | Float_t ms = 1.3; | |
329ce604 | 1061 | inFace->AddNode(support,121,new TGeoCombiTrans("aco8_81",dyx,dyy+ms,dyz,idrotm232)); |
1062 | inFace->AddNode(support,122,new TGeoCombiTrans("aco8_121",dyx1+des,ms+dyy1-des,dyz,idrotm232)); | |
1063 | inFace->AddNode(support,123,new TGeoCombiTrans("aco8_161",dyx2+des,ms+dyy2-des,dyz,idrotm232)); | |
1064 | inFace->AddNode(support,124,new TGeoCombiTrans("aco8_82",dx1,ms+dy11,dyz,idrotm232)); | |
1065 | inFace->AddNode(support,125,new TGeoCombiTrans("aco8_122",dyx11+des,ms+dyy11-des,dyz,idrotm232)); | |
1066 | inFace->AddNode(support,126,new TGeoCombiTrans("aco8_162",dyx21+des,ms+dyy21-des,dyz,idrotm232)); | |
b7b24482 | 1067 | |
1068 | // Put "support" on Out-Face | |
1069 | ||
329ce604 | 1070 | outFace->AddNode(support,121,new TGeoCombiTrans("aco8_81",-dyx,dyy+ms,dyz,idrotm231)); |
1071 | outFace->AddNode(support,122,new TGeoCombiTrans("aco8_121",-dyx1-des,ms+dyy1-des,dyz,idrotm231)); | |
1072 | outFace->AddNode(support,123,new TGeoCombiTrans("aco8_161",-dyx2-des,ms+dyy2-des,dyz,idrotm231)); | |
1073 | outFace->AddNode(support,124,new TGeoCombiTrans("aco8_82",-dx1,dy11+ms,dyz,idrotm231)); | |
1074 | outFace->AddNode(support,125,new TGeoCombiTrans("aco8_122",-dyx11-des,ms+dyy11-des,dyz,idrotm231)); | |
1075 | outFace->AddNode(support,126,new TGeoCombiTrans("aco8_162",-dyx21-des,ms+dyy21-des,dyz,idrotm231)); | |
b7b24482 | 1076 | |
329ce604 | 1077 | aCORDE->AddNode(inFace,1);//---> volume of supports & bars in-face |
1078 | aCORDE->AddNode(upFace,2);//---> volume of supports & bars up-face | |
1079 | aCORDE->AddNode(outFace,3);//---> volume of supports & bars out-face | |
ee0da434 | 1080 | aCORDE->AddNode(modules,4);//---> volume of ALL ACORDE's Modules |
329ce604 | 1081 | alice->AddNode(aCORDE,1);//---> put volume of ACORDE over ALICE's volume |
b7b24482 | 1082 | |
1083 | ||
1084 | ||
1085 | } | |
ee0da434 | 1086 | //__________________________________________________________________________ |
b7b24482 | 1087 | |
1088 | void AliACORDEv1::Init() | |
1089 | { | |
1090 | // Initialise L3 magnet after it has been built | |
1091 | Int_t i; | |
1092 | if(AliLog::GetGlobalDebugLevel()>0) { | |
1093 | printf("\n%s: ",ClassName()); | |
1094 | for(i=0;i<35;i++) printf("*"); | |
1095 | printf(" ACORDEv1_INIT "); | |
1096 | for(i=0;i<35;i++) printf("*"); | |
1097 | printf("\n%s: ",ClassName()); | |
1098 | // Here the ACORDEv initialisation code (if any!) | |
1099 | for(i=0;i<80;i++) printf("*"); | |
1100 | printf("\n"); | |
1101 | } | |
1102 | // AliACORDE::Init(); | |
1103 | } | |
1104 | //____________________________________________________________________________ | |
1105 | void AliACORDEv1::StepManager() | |
1106 | { | |
1107 | ||
1108 | // | |
1109 | // Called for every step in the Cosmic Ray Trigger | |
1110 | // | |
1111 | ||
1112 | ||
1113 | // volume: | |
1114 | // [0] = module number 1-60 (1==>(0-0), 60 (5-9) | |
1115 | // [1] = Plastic number: 0 (down) to 1 (up) | |
1116 | static Int_t vol[2]; | |
1117 | // | |
1118 | // hit | |
1119 | // [0] = PID | |
1120 | // [1-3] = x, y, z | |
1121 | // [4] = time | |
1122 | // [5-7] = px, py, pz | |
1123 | // [8] = energy | |
1124 | // [9] = energy loss | |
1125 | // [10] = length of track through plastic | |
1126 | static Float_t hits[11]; | |
1127 | ||
1128 | // local static variables | |
1129 | static Float_t eloss; | |
1130 | static Float_t step; | |
1131 | // scintillator volume | |
f957acf5 | 1132 | static Int_t idScint = gMC->VolId("ACORDE2"); |
b7b24482 | 1133 | // local variables |
1134 | Int_t copy; | |
1135 | TLorentzVector pos; | |
1136 | TLorentzVector mom; | |
1137 | ||
1138 | // only charged tracks | |
1139 | if ( !gMC->TrackCharge() || !gMC->IsTrackAlive() ) return; | |
1140 | ||
1141 | // only in sensitive material | |
1142 | if (gMC->CurrentVolID(copy) == idScint) { | |
1143 | ||
b7b24482 | 1144 | step += gMC->TrackStep(); |
1145 | eloss += gMC->Edep(); | |
1146 | // set all hit variables except eloss which is resetted | |
1147 | // set volume variables | |
1148 | if (gMC->IsTrackEntering()) { | |
1149 | eloss = 0.0; | |
1150 | step = 0.0; | |
1151 | gMC->TrackPosition(pos); | |
1152 | gMC->TrackMomentum(mom); | |
1153 | // hit | |
1154 | // [0] = PID | |
1155 | // [1-3] = x, y, z | |
1156 | // [4] = time | |
1157 | // [5-7] = px, py, pz | |
1158 | // [8] = energy | |
1159 | // [9] = energy loss | |
1160 | hits[0] = (Float_t ) gMC->TrackPid(); | |
329ce604 | 1161 | |
1162 | ||
20868cc6 | 1163 | hits[1] = pos[0]; |
1164 | hits[2] = pos[1]; | |
1165 | hits[3] = pos[2]; | |
1166 | hits[4] = gMC->TrackTime(); | |
1167 | hits[5] = mom[0]; | |
1168 | hits[6] = mom[1]; | |
1169 | hits[7] = mom[2]; | |
1170 | hits[8] = gMC->Etot(); | |
b7b24482 | 1171 | // volume: |
1172 | // [0] = module number 1-60 (1==>(0-0), 60 (5-9) | |
1173 | // [1] = Plastic number: 0 (down) to 1 (up) | |
1174 | Int_t copyPlastic; // plastic: down=1, up=2 | |
1175 | Int_t copyModule; // module: 1-60 | |
1176 | gMC->CurrentVolID(copyPlastic); | |
1177 | gMC->CurrentVolOffID(1, copyModule); | |
1178 | // module | |
1179 | vol[0] = copyModule; | |
1180 | // plastic: 0 = down, 1 = up | |
70ae285c | 1181 | vol[1] = copyPlastic - 4 ; // !!!!!!! |
0b854350 | 1182 | // vol[1] = copyPlastic; |
b7b24482 | 1183 | } // end if gMC->IsTrackEntering() |
1184 | ||
1185 | // set hit[9] = total energy loss and book hit | |
1186 | if( gMC->IsTrackExiting() || | |
1187 | gMC->IsTrackStop() || | |
1188 | gMC->IsTrackDisappeared()){ | |
20868cc6 | 1189 | hits[9] = eloss; |
b7b24482 | 1190 | hits[10] = step; |
1191 | eloss = 0.0; | |
1192 | step = 0.0; | |
1193 | AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(),vol, hits); | |
f957acf5 | 1194 | } |
b7b24482 | 1195 | } |
1196 | ||
1197 | ||
329ce604 | 1198 | |
b7b24482 | 1199 | } |
1200 | ||
b7b24482 | 1201 | //_____________________________________________________________________________ |
1202 | void AliACORDEv1::AddHit(Int_t track, Int_t *vol, Float_t *hits) | |
1203 | { | |
1204 | // | |
f957acf5 | 1205 | // Add an ACORDE hit |
b7b24482 | 1206 | // |
1207 | TClonesArray &lhits = *fHits; | |
1208 | new(lhits[fNhits++]) AliACORDEhit(fIshunt,track,vol,hits); | |
1209 | } | |
1210 | ||
f957acf5 | 1211 | //_____________________________________________________________________________ |
1212 | void AliACORDEv1::AddDigits(Int_t* track, Int_t module, Float_t time) | |
f957acf5 | 1213 | { |
1214 | ||
1215 | // Adds Digit | |
1216 | ||
1217 | TClonesArray &ldigits = *fDigits; | |
1218 | new(ldigits[fNdigits++]) AliACORDEdigit(track,module,time); | |
1219 | } | |
1220 | //_____________________________________________________________________________ | |
1221 | ||
f957acf5 | 1222 | void AliACORDEv1::MakeBranch(Option_t *option) |
1223 | { | |
1224 | // Creates new branches in the current Root Tree | |
1225 | ||
1226 | char branchname[10]; | |
1227 | sprintf(branchname,"%s",GetName()); | |
1228 | AliDebug(2,Form("fBufferSize = %d",fBufferSize)); | |
1229 | const char *cH = strstr(option,"H"); | |
cb5b8b21 | 1230 | if (fHits && fLoader->TreeH() && cH) { |
1231 | fLoader->TreeH()->Branch(branchname,&fHits, fBufferSize); | |
f957acf5 | 1232 | AliDebug(2,Form("Making Branch %s for hits",branchname)); |
1233 | } | |
1234 | const char *cD = strstr(option,"D"); | |
1235 | if (fDigits && fLoader->TreeD() && cD) { | |
1236 | fLoader->TreeD()->Branch(branchname,&fDigits, fBufferSize); | |
1237 | AliDebug(2,Form("Making Branch %s for digits",branchname)); | |
1238 | } | |
1239 | } | |
1240 | ||
1241 | //_____________________________________________________________________________ | |
1242 | void AliACORDEv1::AddAlignableVolumes() const | |
1243 | { | |
1244 | // | |
1245 | // Create entries for alignable volumes associating the symbolic volume | |
1246 | // name with the corresponding volume path. Needs to be syncronized with | |
1247 | // eventual changes in the geometry. | |
1248 | // | |
1249 | ||
1250 | // The alignable volumes are only the "ACORDE_MODULE_%d" | |
1251 | // | |
1252 | // Structure of ACORDE's Geometry | |
1253 | // | |
1254 | // ALIC_1 | |
1255 | // |---> ACORDE_1 | |
1256 | // |----> ACORDE_1_1 (in_face) --- | |
1257 | // |----> ACORDE_2_2 (up_face) |--> BARS&SUPPORTS | |
1258 | // |----> ACORDE_3_3 (out_face)--- | |
1259 | // |----> ACORDE_MODULES_4 |--> ACORDE'S MODULES | |
1260 | // | |
1261 | // | |
1262 | // Send comments to: Mario Rodriguez Cahuantzi <mrodrigu@mail.cern.ch> | |
1263 | ||
4490d930 | 1264 | TString vpstr1 = "ALIC_1/ACORDE_1/ALL_ACORDE_MODULES_4/ACORDE_MODULE_"; |
f957acf5 | 1265 | TString snstr1 = "ACORDE/Array"; |
1266 | TString volpath, symname; | |
2e242e04 | 1267 | for(Int_t dy=0; dy<60 ; dy++) |
f957acf5 | 1268 | { |
1269 | volpath = vpstr1; | |
1270 | volpath += dy; | |
1271 | symname = snstr1; | |
1272 | symname += dy; | |
1273 | if(!gGeoManager->SetAlignableEntry(symname.Data(),volpath.Data())) | |
1274 | AliFatal(Form("Alignable entry %s not created. Volume path %s not valid", symname.Data(),volpath.Data())); | |
1275 | } | |
1276 | } |