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