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()
80 //_____________________________________________________________________________
81 void AliACORDEv0::BuildGeometry()
88 //_____________________________________________________________________________
89 void AliACORDEv0::CreateGeometry()
92 if (GetCreateCavern()) CreateCavern();
95 void AliACORDEv0::CreateCavern()
97 Int_t* idtmed = fIdtmed->GetArray() - 1099 ;
98 // Create the mother volume, the one which will contain all the material
101 pbox[0] = AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad);
103 pbox[1] = AliACORDEConstants::Instance()->Depth();
105 gMC->Gsvolu("ACORDE", "BOX", idtmed[1114], pbox, 3);
106 gMC->Gspos("ACORDE", 1, "ALIC", 0, 0, 0, 0, "ONLY");
111 void AliACORDEv0::CreateShafts()
116 Int_t idrotm[2499]; // The rotation matrix.
117 Int_t* idtmed = fIdtmed->GetArray() - 1099 ;
122 AliMatrix(idrotm[2001], 0, 0, 90, 0, 90, 90);
125 // Create a bing cilinder to hold the main structures in the shaft.
126 // All the structures relative to the shaft will be put into
128 // This shaft is composed by an open tube down in the hall, and
129 // a cilinder avobe the level of the ceiling.
131 ptube[0] = 0; // inner radius
132 ptube[1] = 1250; // outer radius
133 ptube[2] = 5150/2; // Half lenght in Z
134 gMC->Gsvolu("CSF1", "TUBE", idtmed[1114], ptube, 3);
137 // The open section of the PX24
138 ptubs[0] = 1150; // Inner radius
139 ptubs[1] = 1250; // Outer radius
140 ptubs[2] = 1300; // Half length
141 ptubs[3] = 180 + kRaddeg*TMath::ASin(1070/ptubs[0]); // starting angle
142 ptubs[4] = 180 - kRaddeg*TMath::ASin(1070/ptubs[0]);
143 gMC->Gsvolu("CSF2", "TUBS", idtmed[1116], ptubs, 5);
144 gMC->Gspos("CSF2", 1, "CSF1", 0, 0, -ptube[2] + ptubs[2], 0, "MANY");
146 // The other part of the shaft.
147 ptube[0] = ptubs[0]; // Inner radius
148 ptube[1] = ptubs[1]; // Outer radius
149 ptube[2] = 5150/2 - ptubs[2]; // Half lenght
150 gMC->Gsvolu("CSF3", "TUBE", idtmed[1116], ptube, 3);
151 gMC->Gspos("CSF3", 1, "CSF1", 0, 0, 5150/2 - ptube[2], 0, "MANY");
154 // Concrete walls along the shaft (next to the elevator.)
155 pbox[0] = 480/2; // Half length in X
156 pbox[1] = 120/2; // Half length in Y
157 pbox[2] = 5150/2; // Half length in Z
158 gMC->Gsvolu("CSW1", "BOX", idtmed[1116], pbox, 3);
159 gMC->Gspos("CSW1", 1, "CSF1", 820+pbox[0], 150+pbox[1], 0, 0, "MANY");
160 gMC->Gspos("CSW1", 2, "CSF1", 820+pbox[0], -300-pbox[1], 0, 0, "MANY");
163 pbox[0] = 120/2; // Half length in X
164 pbox[1] = 750/2; // Half length in Y
165 pbox[2] = 5150/2; // Half length in Z
166 gMC->Gsvolu("CSW2", "BOX", idtmed[1116], pbox, 3);
167 gMC->Gspos("CSW2", 1, "CSF1", 820-60, 150+pbox[1], 0, 0, "MANY");
170 pbox[0] = 120/2; // Half length in X
171 pbox[1] = 600/2; // Half lenght in Y
172 pbox[2] = 5150/2; // Half length in Z
173 gMC->Gsvolu("CSW3", "BOX", idtmed[1116], pbox, 3);
174 gMC->Gspos("CSW3", 1, "CSF1", 820-60, -300-pbox[1], 0, 0, "MANY");
176 // Material below the counting rooms.
180 gMC->Gsvolu("CSW4", "BOX", idtmed[1116], pbox, 3);
181 gMC->Gspos("CSW4",1,"CSF1",2300/2-pbox[0],0,3000-5150/2-pbox[2], 0, "MANY");
187 gMC->Gsvolu("CSW5", "BOX", idtmed[1116], pbox, 3);
188 gMC->Gspos("CSW5", 1, "CSF1", 0, 0, 3000-5150/2-130, 0, "MANY");
190 // The end of the support for the shielding plug.
194 gMC->Gsvolu("CSW6", "BOX", idtmed[1116], pbox, 3);
195 gMC->Gspos("CSW6",1,"CSF1",-1400/2-pbox[0],0,3000-5150/2-pbox[2],0,"MANY");
201 gMC->Gsvolu("CSW7", "BOX", idtmed[1116], pbox, 3);
202 gMC->Gspos("CSW7",1,"CSF1",-1400/2-170-pbox[0],0,3000-5150/2+pbox[2],0,"MANY");
204 // Material close to the pipe.
208 gMC->Gsvolu("CSW8", "BOX", idtmed[1116], pbox, 3);
209 gMC->Gspos("CSW8",1,"CSF1",-2300/2+pbox[0],0,2500-5150/2,0,"MANY");
211 // Now put the shaft into the mother volume.
212 gMC->Gspos("CSF1", 1, "ACORDE", 0, AliACORDEConstants::Instance()->Depth() - 5150/2, 2300, idrotm[2001], "MANY");
216 ptube[1] = ptube[0] + 100;
217 ptube[2] = (5150 - 1166)/2;
218 gMC->Gsvolu("CSF4", "TUBE", idtmed[1116], ptube, 3);
219 gMC->Gspos("CSF4", 1, "ACORDE", 2100, AliACORDEConstants::Instance()->Depth()-ptube[2], 0, idrotm[2001], "MANY");
223 ptube[1] = ptube[0] + 100;
224 ptube[2] = (5150 - 690)/2;
225 gMC->Gsvolu("CSF5", "TUBE", idtmed[1116], ptube, 3);
226 gMC->Gspos("CSF5", 1, "ACORDE", -375, AliACORDEConstants::Instance()->Depth()-ptube[2], -1900 - 2987.7, idrotm[2001], "MANY");
231 void AliACORDEv0::CreateMolasse()
236 Int_t idrotm[2499]; // The rotation matrix.
237 Int_t* idtmed = fIdtmed->GetArray() - 1099 ;
239 Float_t px24radius = 2300/2;
242 Float_t px24Z = 2300;
244 Float_t pm25radius = 910/2;
245 Float_t pm25X = 2100;
249 Float_t pgc2radius = 1100/2;
250 Float_t pgc2X = -375;
252 Float_t pgc2Z = -(1900 + 2987.7);
254 Float_t concreteWidth = 100; // Standard width of the hall walls.
257 // Create a local mother volume.
259 pbox[0] = AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad);
260 pbox[1] = AliACORDEConstants::Instance()->Depth()/2;
262 gMC->Gsvolu("CMO1", "BOX", idtmed[1114], pbox, 3);
264 // Now put the molasse exactly above the hall. OK
268 ptubs[1] = 2100 - pm25radius;
269 ptubs[2] = 1900/2 + px24radius;
272 gMC->Gsvolu("CMO2", "TUBS", idtmed[1123], ptubs, 5);
273 gMC->Gspos("CMO2", 1, "CMO1", 0, 500-AliACORDEConstants::Instance()->Depth()/2, ptubs[2]-1900, 0, "MANY");
275 // Molasse around the RB24/26 Wall. OK
276 ptubs[0] = 220 + 1600;
277 ptubs[1] = AliACORDEConstants::Instance()->Depth() - ptubs[0];
278 ptubs[2] = 2987.7/2 - 1100/4 - concreteWidth/2;
281 gMC->Gsvolu("CMO3", "TUBS", idtmed[1123], ptubs, 5);
282 gMC->Gspos("CMO3", 1, "CMO1", 70, 40-AliACORDEConstants::Instance()->Depth()/2, -1900 - ptubs[2], 0, "MANY");
284 // A big block above the RB24/26 wall. OK
285 pbox[0] = AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad);
286 pbox[1] = (AliACORDEConstants::Instance()->Depth() - 220 - 1600)/2;
287 pbox[2] = 2987.7/2 - 1100/4 - concreteWidth/2;
288 gMC->Gsvolu("CMO4", "BOX", idtmed[1123], pbox, 3);
289 gMC->Gspos("CMO4", 1, "CMO1", 0, AliACORDEConstants::Instance()->Depth()/2 - pbox[1], -1900 - pbox[2], 0, "MANY");
290 // Small blocks below the volume CMO4 on both sides of the wall RB24/26. OK
291 pbox[0] = (AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad) -
293 pbox[1] = AliACORDEConstants::Instance()->Depth()/2 - pbox[1];
294 gMC->Gsvolu("CM17", "BOX", idtmed[1123], pbox, 3);
295 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");
296 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");
298 // And a big block of molasse above the hall up to the surface. OK
299 pbox[0] = pm25X - pm25radius;
300 pbox[1] = (AliACORDEConstants::Instance()->Depth()-500-1170)/2;
301 pbox[2] = (1900 + 1150)/2;
302 gMC->Gsvolu("CMO5", "BOX", idtmed[1123], pbox, 3);
303 gMC->Gspos("CMO5", 1, "CMO1", 0,AliACORDEConstants::Instance()->Depth()/2-pbox[1], pbox[2]-1900, 0, "MANY");
304 // Small blocks of molasse betwen the blocks CMO2, CMO5 and PM25. Ok
305 pbox[0] = (pm25X - pm25radius - 1170)/2;
307 gMC->Gsvolu("CM16", "BOX", idtmed[1123], pbox, 3);
308 gMC->Gspos("CM16", 1, "CMO1", 1170 + pbox[0], -AliACORDEConstants::Instance()->Depth()/2+pbox[1], pbox[2] - 1900, 0, "MANY");
310 // Molasse around the shafts.
311 AliMatrix(idrotm[2003], 0, 0, 90, 0, 90, 90);
312 // Around the PX24, the open section. OK
313 ptubs[0] = px24radius + concreteWidth;
314 ptubs[1] = ptubs[0] + 1000;
315 ptubs[2] = (2300 - (5150 - AliACORDEConstants::Instance()->Depth()))/2;
316 ptubs[3] = 180 + kRaddeg*TMath::ASin(1070/ptubs[0]);
317 ptubs[4] = 180 - kRaddeg*TMath::ASin(1070/ptubs[0]);
318 gMC->Gsvolu("CMO6", "TUBS", idtmed[1123], ptubs, 5);
319 gMC->Gspos("CMO6", 1, "CMO1", px24X, ptubs[2] - AliACORDEConstants::Instance()->Depth()/2, px24Z, idrotm[2003], "MANY");
320 // Around the PX24, the closed section. OK
322 ptube[0] = px24radius + concreteWidth;
323 ptube[1] = ptube[0] + 1000;
324 ptube[2] = (5150 - 2300)/2;
325 gMC->Gsvolu("CMO7", "TUBE", idtmed[1123], ptube, 3);
326 gMC->Gspos("CMO7", 1, "CMO1", px24X, AliACORDEConstants::Instance()->Depth()/2 - ptube[2], px24Z, idrotm[2003], "MANY");
329 ptube[0] = pm25radius + concreteWidth;
330 ptube[1] = ptube[0] + 400;
331 ptube[2] = AliACORDEConstants::Instance()->Depth()/2;
332 gMC->Gsvolu("CMO8", "TUBE", idtmed[1123], ptube, 3);
333 gMC->Gspos("CMO8", 1, "CMO1", pm25X, 0, pm25Z, idrotm[2003], "MANY");
334 // On both sides of the PM25 along the HALL.
335 pbox[0] = (2100 + pm25radius - 1170)/2;
336 pbox[1] = AliACORDEConstants::Instance()->Depth()/2;
337 pbox[2] = (3*px24radius - pm25radius)/2;
338 gMC->Gsvolu("CM18", "BOX", idtmed[1123], pbox, 3);
339 gMC->Gspos("CM18", 1, "CMO1", 2100, 0, pbox[2] + pm25radius, 0, "MANY");
341 pbox[2] = (1900 - pm25radius)/2;
342 gMC->Gsvolu("CM19", "BOX", idtmed[1123], pbox, 3);
343 gMC->Gspos("CM19", 1, "CMO1", 2100, 0, -pbox[2] - pm25radius, 0, "MANY");
345 // Around the PGC2. OK
346 ptube[0] = pgc2radius + concreteWidth;
347 ptube[1] = 2987.7 - 740;
348 ptube[2] = AliACORDEConstants::Instance()->Depth()/2;
349 gMC->Gsvolu("CMO9", "TUBE", idtmed[1123], ptube, 3);
350 gMC->Gspos("CMO9", 1, "CMO1", pgc2X, 0, pgc2Z, idrotm[2003], "MANY");
352 // On both sides of the PGC2.OK
353 pbox[0] = (AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad) -
355 pbox[1] = AliACORDEConstants::Instance()->Depth()/2;
356 pbox[2] = pgc2radius + concreteWidth;
357 gMC->Gsvolu("CM10", "BOX", idtmed[1123], pbox, 3);
358 gMC->Gspos("CM10", 1, "CMO1", AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad) - pbox[0], 0, pgc2Z, 0, "MANY");
359 gMC->Gspos("CM10", 2, "CMO1", -AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad) + pbox[0], 0, pgc2Z, 0, "MANY");
361 // big block of molasse behind the PX24. OK
362 pbox[0] = AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad);
363 pbox[1] = AliACORDEConstants::Instance()->Depth()/2;
364 pbox[2] = (pbox[0] - (2300 + 1150 + 100))/2;
365 gMC->Gsvolu("CM12", "BOX", idtmed[1123], pbox, 3);
366 gMC->Gspos("CM12", 1, "CMO1", px24X, 0, px24Z + px24radius + concreteWidth + pbox[2], 0, "MANY");
368 // big block of molasse in the opposite side of the PM25. OK
369 pbox[0] = (AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad) -
371 pbox[1] = AliACORDEConstants::Instance()->Depth()/2;
372 pbox[2] = (1900 + 2300 + 1150)/2;
373 gMC->Gsvolu("CM13", "BOX", idtmed[1123], pbox, 3);
374 gMC->Gspos("CM13", 1, "CMO1", -1150 - pbox[0], 0, pbox[2] - 1900, 0, "MANY");
376 // big block of molasse behind the PM25. OK
377 pbox[0] = (AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad) -
378 (2100 + 910/2 + 100))/2;
379 pbox[1] = AliACORDEConstants::Instance()->Depth()/2;
380 pbox[2] = (1900 + 2300 + 1150)/2;
381 gMC->Gsvolu("CM14", "BOX", idtmed[1123], pbox, 3);
382 gMC->Gspos("CM14", 1, "CMO1", pm25X + pm25radius + concreteWidth + pbox[0], 0, pbox[2] - 1900, 0, "MANY");
384 // big block of molasse behind the PGC2. OK
385 pbox[0] = AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad);
386 pbox[1] = AliACORDEConstants::Instance()->Depth()/2;
387 pbox[2] = (pbox[0] - (2987.7 + 1900 + 1100/2 + 100))/2;
388 gMC->Gsvolu("CM15", "BOX", idtmed[1123], pbox, 3);
389 gMC->Gspos("CM15", 1, "CMO1", 0, 0, -pbox[0] + pbox[2], 0, "MANY");
391 gMC->Gspos("CMO1",1,"ACORDE",0,AliACORDEConstants::Instance()->Depth()/2,0,0,"MANY");
395 void AliACORDEv0::CreateAcorde()
398 // Create geometry for the ACORDE array
399 // done in two main steps
400 // 1.- definition of the modules
401 // 2.- placement of the modules
403 Int_t idrotm[2499]; // The rotation matrix.
404 Int_t* idtmed = fIdtmed->GetArray() - 1099;
405 AliACORDEConstants* constants = AliACORDEConstants::Instance();
409 Float_t small = 0.05; // to separate slightly some volumes
410 // by half a mm so that they do not overlap
413 // 1.- Definition of a module
414 // * ACORDE1 => volume filled with air, representing a module
415 // it contains all other volumes defining the module
416 // there are 60 copies of it
417 // * ACORDE2 => volume defining one scintillator pad
418 // there are 2 copies of it per module
419 // * ACORDE3-6 => volumes representing the Al walls of box
420 // surrounding the plastic
421 // 3: long wall, 2 copies (front, back)
422 // 4: end caps, 2 copies (left, right)
423 // 5: long stripe to model the profile
424 // 4 copies (upper front and back, lower)
425 // 6: short stripe to model the profile
426 // 4 copies (upper left, right; lower)
428 // The full module volume.
429 // This volume will be ocupied by all the material of the module
430 // the scintillators, the aluminium frame, etc.
431 box[0] = constants->ModuleLength()/2;
432 box[1] = constants->ModuleHeight()/2;
433 box[2] = constants->ModuleWidth()/2;
434 gMC->Gsvolu("ACORDE1", "BOX", idtmed[1114], box, 3);
437 box[0] = constants->PlasticLength()/2;
438 box[1] = constants->PlasticHeight()/2;
439 box[2] = constants->PlasticWidth()/2;
440 gMC->Gsvolu("ACORDE2", "BOX", idtmed[1112], box, 3);
442 // it is important to keep this order for easy assignment of
443 // a volume to a physical module:
444 placed_at = box[1]+constants->ProfileThickness()
445 - constants->ModuleHeight()/2+small;
446 gMC->Gspos("ACORDE2", 1, "ACORDE1", 0, placed_at, 0, 0, "MANY");
447 placed_at = placed_at + 2.0*box[1]+small;
448 gMC->Gspos("ACORDE2", 2, "ACORDE1", 0, placed_at, 0, 0, "MANY");
451 // The metallic frame: long walls of box
452 // back,front,left,right, defined looking
453 // from the + z diraction into alice; i.e.
454 // back ==> z<0, front ==> z>0
455 // left ==> x<0, right ==> x>0
456 // up ==> increasing y, down ==> decreasing y
457 box[0] = constants->ModuleLength()/2;
458 box[1] = constants->ModuleHeight()/2;
459 box[2] = constants->ProfileThickness()/2.0;
460 gMC->Gsvolu("ACORDE3", "BOX", idtmed[1108], box, 3);
462 placed_at = constants->ModuleWidth()/2-constants->ProfileThickness()/2.0;
463 gMC->Gspos("ACORDE3", 1, "ACORDE1", 0, 0, placed_at, 0, "MANY");
465 gMC->Gspos("ACORDE3", 2, "ACORDE1", 0, 0, -placed_at , 0, "MANY");
467 // The metallic frame: end caps
468 box[0] = constants->ProfileThickness()/2.0;
469 box[1] = constants->ModuleHeight()/2;
470 box[2] = constants->ModuleWidth()/2;
471 gMC->Gsvolu("ACORDE4", "BOX", idtmed[1108], box, 3);
473 placed_at = constants->ModuleLength()/2-constants->ProfileThickness()/2.0;
474 gMC->Gspos("ACORDE4", 1, "ACORDE1", placed_at, 0, 0, 0, "MANY");
476 gMC->Gspos("ACORDE4", 2, "ACORDE1", -placed_at, 0, 0, 0, "MANY");
478 // The metallic frame: the profile, long stripes
479 box[0] = constants->ModuleLength()/2.0;
480 box[1] = constants->ProfileThickness()/2;
481 box[2] = constants->ProfileWidth()/2;
482 gMC->Gsvolu("ACORDE5", "BOX", idtmed[1108], box, 3);
484 placed_at = constants->ModuleHeight()/2-box[1];
485 placed_at2 = constants->ModuleWidth()/2-
486 constants->ProfileThickness()-box[2];
487 gMC->Gspos("ACORDE5", 1, "ACORDE1",0,placed_at,placed_at2, 0, "MANY");
489 gMC->Gspos("ACORDE5", 2, "ACORDE1",0,placed_at,-placed_at2, 0, "MANY");
491 gMC->Gspos("ACORDE5", 3, "ACORDE1",0,-placed_at,placed_at2, 0, "MANY");
493 gMC->Gspos("ACORDE5", 4, "ACORDE1",0,-placed_at,-placed_at2, 0, "MANY");
495 // The metallic frame: the profile, long stripes
496 box[0] = constants->ProfileWidth()/2.0;
497 box[1] = constants->ProfileThickness()/2;
498 box[2] = constants->ModuleWidth()/2-constants->ProfileWidth();
499 gMC->Gsvolu("ACORDE6", "BOX", idtmed[1108], box, 3);
501 placed_at = constants->ModuleHeight()/2-box[1];
502 placed_at2 = constants->ModuleLength()/2-
503 constants->ProfileThickness()-box[0];
504 gMC->Gspos("ACORDE6", 1, "ACORDE1",placed_at2,placed_at,0, 0, "MANY");
506 gMC->Gspos("ACORDE6", 2, "ACORDE1",-placed_at2,placed_at,0, 0, "MANY");
508 gMC->Gspos("ACORDE6", 3, "ACORDE1",placed_at2,-placed_at,0, 0, "MANY");
510 gMC->Gspos("ACORDE6", 4, "ACORDE1",-placed_at2,-placed_at,0, 0, "MANY");
512 // End of MODULE definition
514 ////////////////////////////////////////////////////////////////////
515 ////////////////////////////////////////////////////////////////////
517 // 2.- placement of the module
518 // Now put all of them in the right position in
519 // master volume ALIC
521 // rotation matrices (see Geant manual for conventions)
522 // for columns 4 and 5
523 AliMatrix(idrotm[231], 90, 45, 90, 135, 0, 0);
524 // for columns 0 and 1
525 AliMatrix(idrotm[232], 90, 315, 90, 45, 0, 0);
527 // place each one of the 6 columns in turn
528 // for the first and the last column the position
529 // of the two last modules depends on the value
530 // of the fITSGeometry variable
532 // it is important to keep this order because
533 // the copy number defines the module!
535 // first column, except first and last modules
536 for (Int_t copy = 2; copy < 10; 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");
543 for (Int_t copy = 11; copy < 21; copy++)
544 gMC->Gspos("ACORDE1",copy,"ALIC",
545 constants->ModulePositionX(copy-1),
546 constants->ModulePositionY(copy-1),
547 constants->ModulePositionZ(copy-1),
548 idrotm[232], "MANY");
549 // third and fourth columns
550 for (Int_t copy = 21; copy < 41; copy++)
551 gMC->Gspos("ACORDE1",copy,"ALIC",
552 constants->ModulePositionX(copy-1),
553 constants->ModulePositionY(copy-1),
554 constants->ModulePositionZ(copy-1),
557 for (Int_t copy = 41; copy < 51; 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 // last column, except first and last modules
564 for (Int_t copy = 52; copy < 60; copy++)
565 gMC->Gspos("ACORDE1",copy,"ALIC",
566 constants->ModulePositionX(copy-1),
567 constants->ModulePositionY(copy-1),
568 constants->ModulePositionZ(copy-1),
569 idrotm[231], "MANY");
570 // the last four modules
571 if (GetITSGeometry()) {
572 gMC->Gspos("ACORDE1",1,"ALIC",
573 constants->ExtraModulePositionX(),
574 constants->ExtraModulePositionY(),
575 constants->ExtraModulePositionZ(0),
577 gMC->Gspos("ACORDE1",10,"ALIC",
578 constants->ExtraModulePositionX(),
579 constants->ExtraModulePositionY(),
580 constants->ExtraModulePositionZ(1),
582 gMC->Gspos("ACORDE1",51,"ALIC",
583 constants->ExtraModulePositionX(),
584 constants->ExtraModulePositionY(),
585 constants->ExtraModulePositionZ(2),
587 gMC->Gspos("ACORDE1",60,"ALIC",
588 constants->ExtraModulePositionX(),
589 constants->ExtraModulePositionY(),
590 constants->ExtraModulePositionZ(3),
593 gMC->Gspos("ACORDE1",1,"ALIC",
594 constants->ModulePositionX(0),
595 constants->ModulePositionY(0),
596 constants->ModulePositionZ(0),
597 idrotm[232], "MANY");
598 gMC->Gspos("ACORDE1",10,"ALIC",
599 constants->ModulePositionX(9),
600 constants->ModulePositionY(9),
601 constants->ModulePositionZ(9),
602 idrotm[232], "MANY");
603 gMC->Gspos("ACORDE1",51,"ALIC",
604 constants->ModulePositionX(50),
605 constants->ModulePositionY(50),
606 constants->ModulePositionZ(50),
607 idrotm[231], "MANY");
608 gMC->Gspos("ACORDE1",60,"ALIC",
609 constants->ModulePositionX(59),
610 constants->ModulePositionY(59),
611 constants->ModulePositionZ(59),
612 idrotm[231], "MANY");
613 } // end if (fITSGeometry)
616 //_____________________________________________________________________________
617 void AliACORDEv0::DrawDetector() const
620 // not needed anymore
624 //____________________________________________________________________________
626 void AliACORDEv0::Init()
628 // Initialise L3 magnet after it has been built
630 if(AliLog::GetGlobalDebugLevel()>0) {
631 printf("\n%s: ",ClassName());
632 for(i=0;i<35;i++) printf("*");
633 printf(" ACORDEv0_INIT ");
634 for(i=0;i<35;i++) printf("*");
635 printf("\n%s: ",ClassName());
636 // Here the ACORDEv initialisation code (if any!)
637 for(i=0;i<80;i++) printf("*");
640 // AliACORDE::Init();
642 //____________________________________________________________________________
643 void AliACORDEv0::StepManager()
646 // Called for every step in the Cosmic Ray Trigger
651 // [0] = module number 1-60 (1==>(0-0), 60 (5-9)
652 // [1] = Plastic number: 0 (down) to 1 (up)
659 // [5-7] = px, py, pz
662 // [10] = length of track through plastic
663 static Float_t hits[11];
665 // local static variables
666 static Float_t eloss;
668 // scintillator volume
669 static Int_t idScint = gMC->VolId("ACORDE2");
676 // only charged tracks
677 if ( !gMC->TrackCharge() || !gMC->IsTrackAlive() ) return;
679 // only in sensitive material
680 if (gMC->CurrentVolID(copy) == idScint) {
681 step += gMC->TrackStep();
682 eloss += gMC->Edep();
683 // set all hit variables except eloss which is resetted
684 // set volume variables
685 if (gMC->IsTrackEntering()) {
688 gMC->TrackPosition(pos);
689 gMC->TrackMomentum(mom);
694 // [5-7] = px, py, pz
697 hits[0] = (Float_t ) gMC->TrackPid();
701 hits[4] = gMC->TrackTime();
705 hits[8] = gMC->Etot();
707 // [0] = module number 1-60 (1==>(0-0), 60 (5-9)
708 // [1] = Plastic number: 0 (down) to 1 (up)
709 Int_t copyPlastic; // plastic: down=1, up=2
710 Int_t copyModule; // module: 1-60
711 gMC->CurrentVolID(copyPlastic);
712 gMC->CurrentVolOffID(1, copyModule);
715 // plastic: 0 = down, 1 = up
716 vol[1] = copyPlastic;
717 } // end if gMC->IsTrackEntering()
719 // set hit[9] = total energy loss and book hit
720 if( gMC->IsTrackExiting() ||
721 gMC->IsTrackStop() ||
722 gMC->IsTrackDisappeared()){
727 AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(),vol, hits);
729 } // end if in scintillator
733 //_____________________________________________________________________________
734 void AliACORDEv0::AddHit(Int_t track, Int_t *vol, Float_t *hits)
739 TClonesArray &lhits = *fHits;
740 new(lhits[fNhits++]) AliACORDEhit(fIshunt,track,vol,hits);