1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 ///////////////////////////////////////////////////////////////////////////////
20 // ALICE Cosmic Ray Trigger //
22 // This class contains the functions for version 0 of the ALICE Cosmic Ray //
23 // Trigger. This version will be used to simulation comic rays in alice with//
24 // all the detectors. It include geometry and hits (posicion and momentum) //
26 // Send comments to: //
27 // Arturo Fernandez <afernand@fcfm.buap.mx> //
28 // Enrique Gamez <egamez@fcfm.buap.mx> //
29 // Eleazar Cuautle <ecuautle@nucleares.unam.mx> //
30 ///////////////////////////////////////////////////////////////////////////////
33 #include "AliACORDEv0.h"
34 #include <TClonesArray.h>
35 #include <TLorentzVector.h>
36 #include <TVirtualMC.h>
38 #include <TGeometry.h>
45 #include "AliACORDEhit.h"
46 #include "AliACORDEConstants.h"
52 //_____________________________________________________________________________
53 AliACORDEv0::AliACORDEv0()
57 // Default constructor
62 //_____________________________________________________________________________
63 AliACORDEv0::AliACORDEv0(const char *name, const char *title)
64 : AliACORDE(name, title)
67 // Standard constructor
69 fIshunt = 1; // All hits are associated with primary particles
70 fHits = new TClonesArray("AliACORDEhit",400);
71 gAlice->GetMCApp()->AddHitList(fHits);
73 //_____________________________________________________________________________
74 AliACORDEv0::~AliACORDEv0()
81 //_____________________________________________________________________________
82 void AliACORDEv0::CreateGeometry()
85 if (GetCreateCavern()) CreateCavern();
88 void AliACORDEv0::CreateCavern()
90 Int_t* idtmed = fIdtmed->GetArray() - 1099 ;
91 // Create the mother volume, the one which will contain all the material
94 pbox[0] = AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad);
96 pbox[1] = AliACORDEConstants::Instance()->Depth();
98 gMC->Gsvolu("ACORDE", "BOX", idtmed[1114], pbox, 3);
99 gMC->Gspos("ACORDE", 1, "ALIC", 0, 0, 0, 0, "ONLY");
104 void AliACORDEv0::CreateShafts()
109 Int_t idrotm[2499]; // The rotation matrix.
110 Int_t* idtmed = fIdtmed->GetArray() - 1099 ;
115 AliMatrix(idrotm[2001], 0, 0, 90, 0, 90, 90);
118 // Create a bing cilinder to hold the main structures in the shaft.
119 // All the structures relative to the shaft will be put into
121 // This shaft is composed by an open tube down in the hall, and
122 // a cilinder avobe the level of the ceiling.
124 ptube[0] = 0; // inner radius
125 ptube[1] = 1250; // outer radius
126 ptube[2] = 5150/2; // Half lenght in Z
127 gMC->Gsvolu("CSF1", "TUBE", idtmed[1114], ptube, 3);
130 // The open section of the PX24
131 ptubs[0] = 1150; // Inner radius
132 ptubs[1] = 1250; // Outer radius
133 ptubs[2] = 1300; // Half length
134 ptubs[3] = 180 + kRaddeg*TMath::ASin(1070/ptubs[0]); // starting angle
135 ptubs[4] = 180 - kRaddeg*TMath::ASin(1070/ptubs[0]);
136 gMC->Gsvolu("CSF2", "TUBS", idtmed[1116], ptubs, 5);
137 gMC->Gspos("CSF2", 1, "CSF1", 0, 0, -ptube[2] + ptubs[2], 0, "MANY");
139 // The other part of the shaft.
140 ptube[0] = ptubs[0]; // Inner radius
141 ptube[1] = ptubs[1]; // Outer radius
142 ptube[2] = 5150/2 - ptubs[2]; // Half lenght
143 gMC->Gsvolu("CSF3", "TUBE", idtmed[1116], ptube, 3);
144 gMC->Gspos("CSF3", 1, "CSF1", 0, 0, 5150/2 - ptube[2], 0, "MANY");
147 // Concrete walls along the shaft (next to the elevator.)
148 pbox[0] = 480/2; // Half length in X
149 pbox[1] = 120/2; // Half length in Y
150 pbox[2] = 5150/2; // Half length in Z
151 gMC->Gsvolu("CSW1", "BOX", idtmed[1116], pbox, 3);
152 gMC->Gspos("CSW1", 1, "CSF1", 820+pbox[0], 150+pbox[1], 0, 0, "MANY");
153 gMC->Gspos("CSW1", 2, "CSF1", 820+pbox[0], -300-pbox[1], 0, 0, "MANY");
156 pbox[0] = 120/2; // Half length in X
157 pbox[1] = 750/2; // Half length in Y
158 pbox[2] = 5150/2; // Half length in Z
159 gMC->Gsvolu("CSW2", "BOX", idtmed[1116], pbox, 3);
160 gMC->Gspos("CSW2", 1, "CSF1", 820-60, 150+pbox[1], 0, 0, "MANY");
163 pbox[0] = 120/2; // Half length in X
164 pbox[1] = 600/2; // Half lenght in Y
165 pbox[2] = 5150/2; // Half length in Z
166 gMC->Gsvolu("CSW3", "BOX", idtmed[1116], pbox, 3);
167 gMC->Gspos("CSW3", 1, "CSF1", 820-60, -300-pbox[1], 0, 0, "MANY");
169 // Material below the counting rooms.
173 gMC->Gsvolu("CSW4", "BOX", idtmed[1116], pbox, 3);
174 gMC->Gspos("CSW4",1,"CSF1",2300/2-pbox[0],0,3000-5150/2-pbox[2], 0, "MANY");
180 gMC->Gsvolu("CSW5", "BOX", idtmed[1116], pbox, 3);
181 gMC->Gspos("CSW5", 1, "CSF1", 0, 0, 3000-5150/2-130, 0, "MANY");
183 // The end of the support for the shielding plug.
187 gMC->Gsvolu("CSW6", "BOX", idtmed[1116], pbox, 3);
188 gMC->Gspos("CSW6",1,"CSF1",-1400/2-pbox[0],0,3000-5150/2-pbox[2],0,"MANY");
194 gMC->Gsvolu("CSW7", "BOX", idtmed[1116], pbox, 3);
195 gMC->Gspos("CSW7",1,"CSF1",-1400/2-170-pbox[0],0,3000-5150/2+pbox[2],0,"MANY");
197 // Material close to the pipe.
201 gMC->Gsvolu("CSW8", "BOX", idtmed[1116], pbox, 3);
202 gMC->Gspos("CSW8",1,"CSF1",-2300/2+pbox[0],0,2500-5150/2,0,"MANY");
204 // Now put the shaft into the mother volume.
205 gMC->Gspos("CSF1", 1, "ACORDE", 0, AliACORDEConstants::Instance()->Depth() - 5150/2, 2300, idrotm[2001], "MANY");
209 ptube[1] = ptube[0] + 100;
210 ptube[2] = (5150 - 1166)/2;
211 gMC->Gsvolu("CSF4", "TUBE", idtmed[1116], ptube, 3);
212 gMC->Gspos("CSF4", 1, "ACORDE", 2100, AliACORDEConstants::Instance()->Depth()-ptube[2], 0, idrotm[2001], "MANY");
216 ptube[1] = ptube[0] + 100;
217 ptube[2] = (5150 - 690)/2;
218 gMC->Gsvolu("CSF5", "TUBE", idtmed[1116], ptube, 3);
219 gMC->Gspos("CSF5", 1, "ACORDE", -375, AliACORDEConstants::Instance()->Depth()-ptube[2], -1900 - 2987.7, idrotm[2001], "MANY");
224 void AliACORDEv0::CreateMolasse()
229 Int_t idrotm[2499]; // The rotation matrix.
230 Int_t* idtmed = fIdtmed->GetArray() - 1099 ;
232 Float_t px24radius = 2300/2;
235 Float_t px24Z = 2300;
237 Float_t pm25radius = 910/2;
238 Float_t pm25X = 2100;
242 Float_t pgc2radius = 1100/2;
243 Float_t pgc2X = -375;
245 Float_t pgc2Z = -(1900 + 2987.7);
247 Float_t concreteWidth = 100; // Standard width of the hall walls.
250 // Create a local mother volume.
252 pbox[0] = AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad);
253 pbox[1] = AliACORDEConstants::Instance()->Depth()/2;
255 gMC->Gsvolu("CMO1", "BOX", idtmed[1114], pbox, 3);
257 // Now put the molasse exactly above the hall. OK
261 ptubs[1] = 2100 - pm25radius;
262 ptubs[2] = 1900/2 + px24radius;
265 gMC->Gsvolu("CMO2", "TUBS", idtmed[1123], ptubs, 5);
266 gMC->Gspos("CMO2", 1, "CMO1", 0, 500-AliACORDEConstants::Instance()->Depth()/2, ptubs[2]-1900, 0, "MANY");
268 // Molasse around the RB24/26 Wall. OK
269 ptubs[0] = 220 + 1600;
270 ptubs[1] = AliACORDEConstants::Instance()->Depth() - ptubs[0];
271 ptubs[2] = 2987.7/2 - 1100/4 - concreteWidth/2;
274 gMC->Gsvolu("CMO3", "TUBS", idtmed[1123], ptubs, 5);
275 gMC->Gspos("CMO3", 1, "CMO1", 70, 40-AliACORDEConstants::Instance()->Depth()/2, -1900 - ptubs[2], 0, "MANY");
277 // A big block above the RB24/26 wall. OK
278 pbox[0] = AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad);
279 pbox[1] = (AliACORDEConstants::Instance()->Depth() - 220 - 1600)/2;
280 pbox[2] = 2987.7/2 - 1100/4 - concreteWidth/2;
281 gMC->Gsvolu("CMO4", "BOX", idtmed[1123], pbox, 3);
282 gMC->Gspos("CMO4", 1, "CMO1", 0, AliACORDEConstants::Instance()->Depth()/2 - pbox[1], -1900 - pbox[2], 0, "MANY");
283 // Small blocks below the volume CMO4 on both sides of the wall RB24/26. OK
284 pbox[0] = (AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad) -
286 pbox[1] = AliACORDEConstants::Instance()->Depth()/2 - pbox[1];
287 gMC->Gsvolu("CM17", "BOX", idtmed[1123], pbox, 3);
288 gMC->Gspos("CM17", 1, "CMO1", AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad) - pbox[0], -AliACORDEConstants::Instance()->Depth()/2 + pbox[1], -1900 - pbox[2], 0, "MANY");
289 gMC->Gspos("CM17", 2, "CMO1", -AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad)+ pbox[0], -AliACORDEConstants::Instance()->Depth()/2 + pbox[1], -1900 - pbox[2], 0, "MANY");
291 // And a big block of molasse above the hall up to the surface. OK
292 pbox[0] = pm25X - pm25radius;
293 pbox[1] = (AliACORDEConstants::Instance()->Depth()-500-1170)/2;
294 pbox[2] = (1900 + 1150)/2;
295 gMC->Gsvolu("CMO5", "BOX", idtmed[1123], pbox, 3);
296 gMC->Gspos("CMO5", 1, "CMO1", 0,AliACORDEConstants::Instance()->Depth()/2-pbox[1], pbox[2]-1900, 0, "MANY");
297 // Small blocks of molasse betwen the blocks CMO2, CMO5 and PM25. Ok
298 pbox[0] = (pm25X - pm25radius - 1170)/2;
300 gMC->Gsvolu("CM16", "BOX", idtmed[1123], pbox, 3);
301 gMC->Gspos("CM16", 1, "CMO1", 1170 + pbox[0], -AliACORDEConstants::Instance()->Depth()/2+pbox[1], pbox[2] - 1900, 0, "MANY");
303 // Molasse around the shafts.
304 AliMatrix(idrotm[2003], 0, 0, 90, 0, 90, 90);
305 // Around the PX24, the open section. OK
306 ptubs[0] = px24radius + concreteWidth;
307 ptubs[1] = ptubs[0] + 1000;
308 ptubs[2] = (2300 - (5150 - AliACORDEConstants::Instance()->Depth()))/2;
309 ptubs[3] = 180 + kRaddeg*TMath::ASin(1070/ptubs[0]);
310 ptubs[4] = 180 - kRaddeg*TMath::ASin(1070/ptubs[0]);
311 gMC->Gsvolu("CMO6", "TUBS", idtmed[1123], ptubs, 5);
312 gMC->Gspos("CMO6", 1, "CMO1", px24X, ptubs[2] - AliACORDEConstants::Instance()->Depth()/2, px24Z, idrotm[2003], "MANY");
313 // Around the PX24, the closed section. OK
315 ptube[0] = px24radius + concreteWidth;
316 ptube[1] = ptube[0] + 1000;
317 ptube[2] = (5150 - 2300)/2;
318 gMC->Gsvolu("CMO7", "TUBE", idtmed[1123], ptube, 3);
319 gMC->Gspos("CMO7", 1, "CMO1", px24X, AliACORDEConstants::Instance()->Depth()/2 - ptube[2], px24Z, idrotm[2003], "MANY");
322 ptube[0] = pm25radius + concreteWidth;
323 ptube[1] = ptube[0] + 400;
324 ptube[2] = AliACORDEConstants::Instance()->Depth()/2;
325 gMC->Gsvolu("CMO8", "TUBE", idtmed[1123], ptube, 3);
326 gMC->Gspos("CMO8", 1, "CMO1", pm25X, 0, pm25Z, idrotm[2003], "MANY");
327 // On both sides of the PM25 along the HALL.
328 pbox[0] = (2100 + pm25radius - 1170)/2;
329 pbox[1] = AliACORDEConstants::Instance()->Depth()/2;
330 pbox[2] = (3*px24radius - pm25radius)/2;
331 gMC->Gsvolu("CM18", "BOX", idtmed[1123], pbox, 3);
332 gMC->Gspos("CM18", 1, "CMO1", 2100, 0, pbox[2] + pm25radius, 0, "MANY");
334 pbox[2] = (1900 - pm25radius)/2;
335 gMC->Gsvolu("CM19", "BOX", idtmed[1123], pbox, 3);
336 gMC->Gspos("CM19", 1, "CMO1", 2100, 0, -pbox[2] - pm25radius, 0, "MANY");
338 // Around the PGC2. OK
339 ptube[0] = pgc2radius + concreteWidth;
340 ptube[1] = 2987.7 - 740;
341 ptube[2] = AliACORDEConstants::Instance()->Depth()/2;
342 gMC->Gsvolu("CMO9", "TUBE", idtmed[1123], ptube, 3);
343 gMC->Gspos("CMO9", 1, "CMO1", pgc2X, 0, pgc2Z, idrotm[2003], "MANY");
345 // On both sides of the PGC2.OK
346 pbox[0] = (AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad) -
348 pbox[1] = AliACORDEConstants::Instance()->Depth()/2;
349 pbox[2] = pgc2radius + concreteWidth;
350 gMC->Gsvolu("CM10", "BOX", idtmed[1123], pbox, 3);
351 gMC->Gspos("CM10", 1, "CMO1", AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad) - pbox[0], 0, pgc2Z, 0, "MANY");
352 gMC->Gspos("CM10", 2, "CMO1", -AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad) + pbox[0], 0, pgc2Z, 0, "MANY");
354 // big block of molasse behind the PX24. OK
355 pbox[0] = AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad);
356 pbox[1] = AliACORDEConstants::Instance()->Depth()/2;
357 pbox[2] = (pbox[0] - (2300 + 1150 + 100))/2;
358 gMC->Gsvolu("CM12", "BOX", idtmed[1123], pbox, 3);
359 gMC->Gspos("CM12", 1, "CMO1", px24X, 0, px24Z + px24radius + concreteWidth + pbox[2], 0, "MANY");
361 // big block of molasse in the opposite side of the PM25. OK
362 pbox[0] = (AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad) -
364 pbox[1] = AliACORDEConstants::Instance()->Depth()/2;
365 pbox[2] = (1900 + 2300 + 1150)/2;
366 gMC->Gsvolu("CM13", "BOX", idtmed[1123], pbox, 3);
367 gMC->Gspos("CM13", 1, "CMO1", -1150 - pbox[0], 0, pbox[2] - 1900, 0, "MANY");
369 // big block of molasse behind the PM25. OK
370 pbox[0] = (AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad) -
371 (2100 + 910/2 + 100))/2;
372 pbox[1] = AliACORDEConstants::Instance()->Depth()/2;
373 pbox[2] = (1900 + 2300 + 1150)/2;
374 gMC->Gsvolu("CM14", "BOX", idtmed[1123], pbox, 3);
375 gMC->Gspos("CM14", 1, "CMO1", pm25X + pm25radius + concreteWidth + pbox[0], 0, pbox[2] - 1900, 0, "MANY");
377 // big block of molasse behind the PGC2. OK
378 pbox[0] = AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad);
379 pbox[1] = AliACORDEConstants::Instance()->Depth()/2;
380 pbox[2] = (pbox[0] - (2987.7 + 1900 + 1100/2 + 100))/2;
381 gMC->Gsvolu("CM15", "BOX", idtmed[1123], pbox, 3);
382 gMC->Gspos("CM15", 1, "CMO1", 0, 0, -pbox[0] + pbox[2], 0, "MANY");
384 gMC->Gspos("CMO1",1,"ACORDE",0,AliACORDEConstants::Instance()->Depth()/2,0,0,"MANY");
388 void AliACORDEv0::CreateAcorde()
391 // Create geometry for the ACORDE array
392 // done in two main steps
393 // 1.- definition of the modules
394 // 2.- placement of the modules
396 Int_t idrotm[2499]; // The rotation matrix.
397 Int_t* idtmed = fIdtmed->GetArray() - 1099;
398 AliACORDEConstants* constants = AliACORDEConstants::Instance();
402 Float_t small = 0.05; // to separate slightly some volumes
403 // by half a mm so that they do not overlap
406 // 1.- Definition of a module
407 // * ACORDE1 => volume filled with air, representing a module
408 // it contains all other volumes defining the module
409 // there are 60 copies of it
410 // * ACORDE2 => volume defining one scintillator pad
411 // there are 2 copies of it per module
412 // * ACORDE3-6 => volumes representing the Al walls of box
413 // surrounding the plastic
414 // 3: long wall, 2 copies (front, back)
415 // 4: end caps, 2 copies (left, right)
416 // 5: long stripe to model the profile
417 // 4 copies (upper front and back, lower)
418 // 6: short stripe to model the profile
419 // 4 copies (upper left, right; lower)
421 // The full module volume.
422 // This volume will be ocupied by all the material of the module
423 // the scintillators, the aluminium frame, etc.
424 box[0] = constants->ModuleLength()/2;
425 box[1] = constants->ModuleHeight()/2;
426 box[2] = constants->ModuleWidth()/2;
427 gMC->Gsvolu("ACORDE1", "BOX", idtmed[1114], box, 3);
430 box[0] = constants->PlasticLength()/2;
431 box[1] = constants->PlasticHeight()/2;
432 box[2] = constants->PlasticWidth()/2;
433 gMC->Gsvolu("ACORDE2", "BOX", idtmed[1112], box, 3);
435 // it is important to keep this order for easy assignment of
436 // a volume to a physical module:
437 placed_at = box[1]+constants->ProfileThickness()
438 - constants->ModuleHeight()/2+small;
439 gMC->Gspos("ACORDE2", 1, "ACORDE1", 0, placed_at, 0, 0, "MANY");
440 placed_at = placed_at + 2.0*box[1]+small;
441 gMC->Gspos("ACORDE2", 2, "ACORDE1", 0, placed_at, 0, 0, "MANY");
444 // The metallic frame: long walls of box
445 // back,front,left,right, defined looking
446 // from the + z diraction into alice; i.e.
447 // back ==> z<0, front ==> z>0
448 // left ==> x<0, right ==> x>0
449 // up ==> increasing y, down ==> decreasing y
450 box[0] = constants->ModuleLength()/2;
451 box[1] = constants->ModuleHeight()/2;
452 box[2] = constants->ProfileThickness()/2.0;
453 gMC->Gsvolu("ACORDE3", "BOX", idtmed[1108], box, 3);
455 placed_at = constants->ModuleWidth()/2-constants->ProfileThickness()/2.0;
456 gMC->Gspos("ACORDE3", 1, "ACORDE1", 0, 0, placed_at, 0, "MANY");
458 gMC->Gspos("ACORDE3", 2, "ACORDE1", 0, 0, -placed_at , 0, "MANY");
460 // The metallic frame: end caps
461 box[0] = constants->ProfileThickness()/2.0;
462 box[1] = constants->ModuleHeight()/2;
463 box[2] = constants->ModuleWidth()/2;
464 gMC->Gsvolu("ACORDE4", "BOX", idtmed[1108], box, 3);
466 placed_at = constants->ModuleLength()/2-constants->ProfileThickness()/2.0;
467 gMC->Gspos("ACORDE4", 1, "ACORDE1", placed_at, 0, 0, 0, "MANY");
469 gMC->Gspos("ACORDE4", 2, "ACORDE1", -placed_at, 0, 0, 0, "MANY");
471 // The metallic frame: the profile, long stripes
472 box[0] = constants->ModuleLength()/2.0;
473 box[1] = constants->ProfileThickness()/2;
474 box[2] = constants->ProfileWidth()/2;
475 gMC->Gsvolu("ACORDE5", "BOX", idtmed[1108], box, 3);
477 placed_at = constants->ModuleHeight()/2-box[1];
478 placed_at2 = constants->ModuleWidth()/2-
479 constants->ProfileThickness()-box[2];
480 gMC->Gspos("ACORDE5", 1, "ACORDE1",0,placed_at,placed_at2, 0, "MANY");
482 gMC->Gspos("ACORDE5", 2, "ACORDE1",0,placed_at,-placed_at2, 0, "MANY");
484 gMC->Gspos("ACORDE5", 3, "ACORDE1",0,-placed_at,placed_at2, 0, "MANY");
486 gMC->Gspos("ACORDE5", 4, "ACORDE1",0,-placed_at,-placed_at2, 0, "MANY");
488 // The metallic frame: the profile, long stripes
489 box[0] = constants->ProfileWidth()/2.0;
490 box[1] = constants->ProfileThickness()/2;
491 box[2] = constants->ModuleWidth()/2-constants->ProfileWidth();
492 gMC->Gsvolu("ACORDE6", "BOX", idtmed[1108], box, 3);
494 placed_at = constants->ModuleHeight()/2-box[1];
495 placed_at2 = constants->ModuleLength()/2-
496 constants->ProfileThickness()-box[0];
497 gMC->Gspos("ACORDE6", 1, "ACORDE1",placed_at2,placed_at,0, 0, "MANY");
499 gMC->Gspos("ACORDE6", 2, "ACORDE1",-placed_at2,placed_at,0, 0, "MANY");
501 gMC->Gspos("ACORDE6", 3, "ACORDE1",placed_at2,-placed_at,0, 0, "MANY");
503 gMC->Gspos("ACORDE6", 4, "ACORDE1",-placed_at2,-placed_at,0, 0, "MANY");
505 // End of MODULE definition
507 ////////////////////////////////////////////////////////////////////
508 ////////////////////////////////////////////////////////////////////
510 // 2.- placement of the module
511 // Now put all of them in the right position in
512 // master volume ALIC
514 // rotation matrices (see Geant manual for conventions)
515 // for columns 4 and 5
516 AliMatrix(idrotm[231], 90, 45, 90, 135, 0, 0);
517 // for columns 0 and 1
518 AliMatrix(idrotm[232], 90, 315, 90, 45, 0, 0);
520 // place each one of the 6 columns in turn
521 // for the first and the last column the position
522 // of the two last modules depends on the value
523 // of the fITSGeometry variable
525 // it is important to keep this order because
526 // the copy number defines the module!
528 // first column, except first and last modules
529 for (Int_t copy = 2; copy < 10; copy++)
530 gMC->Gspos("ACORDE1",copy,"ALIC",
531 constants->ModulePositionX(copy-1),
532 constants->ModulePositionY(copy-1),
533 constants->ModulePositionZ(copy-1),
534 idrotm[232], "MANY");
536 for (Int_t copy = 11; copy < 21; copy++)
537 gMC->Gspos("ACORDE1",copy,"ALIC",
538 constants->ModulePositionX(copy-1),
539 constants->ModulePositionY(copy-1),
540 constants->ModulePositionZ(copy-1),
541 idrotm[232], "MANY");
542 // third and fourth columns
543 for (Int_t copy = 21; copy < 41; copy++)
544 gMC->Gspos("ACORDE1",copy,"ALIC",
545 constants->ModulePositionX(copy-1),
546 constants->ModulePositionY(copy-1),
547 constants->ModulePositionZ(copy-1),
550 for (Int_t copy = 41; copy < 51; copy++)
551 gMC->Gspos("ACORDE1",copy,"ALIC",
552 constants->ModulePositionX(copy-1),
553 constants->ModulePositionY(copy-1),
554 constants->ModulePositionZ(copy-1),
555 idrotm[231], "MANY");
556 // last column, except first and last modules
557 for (Int_t copy = 52; copy < 60; copy++)
558 gMC->Gspos("ACORDE1",copy,"ALIC",
559 constants->ModulePositionX(copy-1),
560 constants->ModulePositionY(copy-1),
561 constants->ModulePositionZ(copy-1),
562 idrotm[231], "MANY");
563 // the last four modules
564 if (GetITSGeometry()) {
565 gMC->Gspos("ACORDE1",1,"ALIC",
566 constants->ExtraModulePositionX(),
567 constants->ExtraModulePositionY(),
568 constants->ExtraModulePositionZ(0),
570 gMC->Gspos("ACORDE1",10,"ALIC",
571 constants->ExtraModulePositionX(),
572 constants->ExtraModulePositionY(),
573 constants->ExtraModulePositionZ(1),
575 gMC->Gspos("ACORDE1",51,"ALIC",
576 constants->ExtraModulePositionX(),
577 constants->ExtraModulePositionY(),
578 constants->ExtraModulePositionZ(2),
580 gMC->Gspos("ACORDE1",60,"ALIC",
581 constants->ExtraModulePositionX(),
582 constants->ExtraModulePositionY(),
583 constants->ExtraModulePositionZ(3),
586 gMC->Gspos("ACORDE1",1,"ALIC",
587 constants->ModulePositionX(0),
588 constants->ModulePositionY(0),
589 constants->ModulePositionZ(0),
590 idrotm[232], "MANY");
591 gMC->Gspos("ACORDE1",10,"ALIC",
592 constants->ModulePositionX(9),
593 constants->ModulePositionY(9),
594 constants->ModulePositionZ(9),
595 idrotm[232], "MANY");
596 gMC->Gspos("ACORDE1",51,"ALIC",
597 constants->ModulePositionX(50),
598 constants->ModulePositionY(50),
599 constants->ModulePositionZ(50),
600 idrotm[231], "MANY");
601 gMC->Gspos("ACORDE1",60,"ALIC",
602 constants->ModulePositionX(59),
603 constants->ModulePositionY(59),
604 constants->ModulePositionZ(59),
605 idrotm[231], "MANY");
606 } // end if (fITSGeometry)
609 //_____________________________________________________________________________
610 void AliACORDEv0::DrawDetector() const
613 // not needed anymore
617 //____________________________________________________________________________
619 void AliACORDEv0::Init()
621 // Initialise L3 magnet after it has been built
623 if(AliLog::GetGlobalDebugLevel()>0) {
624 printf("\n%s: ",ClassName());
625 for(i=0;i<35;i++) printf("*");
626 printf(" ACORDEv0_INIT ");
627 for(i=0;i<35;i++) printf("*");
628 printf("\n%s: ",ClassName());
629 // Here the ACORDEv initialisation code (if any!)
630 for(i=0;i<80;i++) printf("*");
633 // AliACORDE::Init();
635 //____________________________________________________________________________
636 void AliACORDEv0::StepManager()
639 // Called for every step in the Cosmic Ray Trigger
644 // [0] = module number 1-60 (1==>(0-0), 60 (5-9)
645 // [1] = Plastic number: 0 (down) to 1 (up)
652 // [5-7] = px, py, pz
655 // [10] = length of track through plastic
656 static Float_t hits[11];
658 // local static variables
659 static Float_t eloss;
661 // scintillator volume
662 static Int_t idScint = gMC->VolId("ACORDE2");
669 // only charged tracks
670 if ( !gMC->TrackCharge() || !gMC->IsTrackAlive() ) return;
672 // only in sensitive material
673 if (gMC->CurrentVolID(copy) == idScint) {
674 step += gMC->TrackStep();
675 eloss += gMC->Edep();
676 // set all hit variables except eloss which is resetted
677 // set volume variables
678 if (gMC->IsTrackEntering()) {
681 gMC->TrackPosition(pos);
682 gMC->TrackMomentum(mom);
687 // [5-7] = px, py, pz
690 hits[0] = (Float_t ) gMC->TrackPid();
694 hits[4] = gMC->TrackTime();
698 hits[8] = gMC->Etot();
700 // [0] = module number 1-60 (1==>(0-0), 60 (5-9)
701 // [1] = Plastic number: 0 (down) to 1 (up)
702 Int_t copyPlastic; // plastic: down=1, up=2
703 Int_t copyModule; // module: 1-60
704 gMC->CurrentVolID(copyPlastic);
705 gMC->CurrentVolOffID(1, copyModule);
708 // plastic: 0 = down, 1 = up
709 vol[1] = copyPlastic;
710 } // end if gMC->IsTrackEntering()
712 // set hit[9] = total energy loss and book hit
713 if( gMC->IsTrackExiting() ||
714 gMC->IsTrackStop() ||
715 gMC->IsTrackDisappeared()){
720 AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(),vol, hits);
722 } // end if in scintillator
726 //_____________________________________________________________________________
727 void AliACORDEv0::AddHit(Int_t track, Int_t *vol, Float_t *hits)
732 TClonesArray &lhits = *fHits;
733 new(lhits[fNhits++]) AliACORDEhit(fIshunt,track,vol,hits);