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>
42 #include "AliACORDEhit.h"
43 #include "AliACORDEConstants.h"
49 //_____________________________________________________________________________
50 AliACORDEv0::AliACORDEv0()
54 // Default constructor
59 //_____________________________________________________________________________
60 AliACORDEv0::AliACORDEv0(const char *name, const char *title)
61 : AliACORDE(name, title)
64 // Standard constructor
66 fIshunt = 1; // All hits are associated with primary particles
67 fHits = new TClonesArray("AliACORDEhit",400);
68 gAlice->GetMCApp()->AddHitList(fHits);
70 //_____________________________________________________________________________
71 AliACORDEv0::~AliACORDEv0()
78 //_____________________________________________________________________________
79 void AliACORDEv0::CreateGeometry()
82 if (GetCreateCavern()) CreateCavern();
85 void AliACORDEv0::CreateCavern()
87 Int_t* idtmed = fIdtmed->GetArray() - 1099 ;
88 // Create the mother volume, the one which will contain all the material
91 pbox[0] = AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad);
93 pbox[1] = AliACORDEConstants::Instance()->Depth();
95 gMC->Gsvolu("ACORDE", "BOX", idtmed[1114], pbox, 3);
96 gMC->Gspos("ACORDE", 1, "ALIC", 0, 0, 0, 0, "ONLY");
101 void AliACORDEv0::CreateShafts()
106 Int_t idrotm[2499]; // The rotation matrix.
107 Int_t* idtmed = fIdtmed->GetArray() - 1099 ;
112 AliMatrix(idrotm[2001], 0, 0, 90, 0, 90, 90);
115 // Create a bing cilinder to hold the main structures in the shaft.
116 // All the structures relative to the shaft will be put into
118 // This shaft is composed by an open tube down in the hall, and
119 // a cilinder avobe the level of the ceiling.
121 ptube[0] = 0; // inner radius
122 ptube[1] = 1250; // outer radius
123 ptube[2] = 5150/2; // Half lenght in Z
124 gMC->Gsvolu("CSF1", "TUBE", idtmed[1114], ptube, 3);
127 // The open section of the PX24
128 ptubs[0] = 1150; // Inner radius
129 ptubs[1] = 1250; // Outer radius
130 ptubs[2] = 1300; // Half length
131 ptubs[3] = 180 + kRaddeg*TMath::ASin(1070/ptubs[0]); // starting angle
132 ptubs[4] = 180 - kRaddeg*TMath::ASin(1070/ptubs[0]);
133 gMC->Gsvolu("CSF2", "TUBS", idtmed[1116], ptubs, 5);
134 gMC->Gspos("CSF2", 1, "CSF1", 0, 0, -ptube[2] + ptubs[2], 0, "MANY");
136 // The other part of the shaft.
137 ptube[0] = ptubs[0]; // Inner radius
138 ptube[1] = ptubs[1]; // Outer radius
139 ptube[2] = 5150/2 - ptubs[2]; // Half lenght
140 gMC->Gsvolu("CSF3", "TUBE", idtmed[1116], ptube, 3);
141 gMC->Gspos("CSF3", 1, "CSF1", 0, 0, 5150/2 - ptube[2], 0, "MANY");
144 // Concrete walls along the shaft (next to the elevator.)
145 pbox[0] = 480/2; // Half length in X
146 pbox[1] = 120/2; // Half length in Y
147 pbox[2] = 5150/2; // Half length in Z
148 gMC->Gsvolu("CSW1", "BOX", idtmed[1116], pbox, 3);
149 gMC->Gspos("CSW1", 1, "CSF1", 820+pbox[0], 150+pbox[1], 0, 0, "MANY");
150 gMC->Gspos("CSW1", 2, "CSF1", 820+pbox[0], -300-pbox[1], 0, 0, "MANY");
153 pbox[0] = 120/2; // Half length in X
154 pbox[1] = 750/2; // Half length in Y
155 pbox[2] = 5150/2; // Half length in Z
156 gMC->Gsvolu("CSW2", "BOX", idtmed[1116], pbox, 3);
157 gMC->Gspos("CSW2", 1, "CSF1", 820-60, 150+pbox[1], 0, 0, "MANY");
160 pbox[0] = 120/2; // Half length in X
161 pbox[1] = 600/2; // Half lenght in Y
162 pbox[2] = 5150/2; // Half length in Z
163 gMC->Gsvolu("CSW3", "BOX", idtmed[1116], pbox, 3);
164 gMC->Gspos("CSW3", 1, "CSF1", 820-60, -300-pbox[1], 0, 0, "MANY");
166 // Material below the counting rooms.
170 gMC->Gsvolu("CSW4", "BOX", idtmed[1116], pbox, 3);
171 gMC->Gspos("CSW4",1,"CSF1",2300/2-pbox[0],0,3000-5150/2-pbox[2], 0, "MANY");
177 gMC->Gsvolu("CSW5", "BOX", idtmed[1116], pbox, 3);
178 gMC->Gspos("CSW5", 1, "CSF1", 0, 0, 3000-5150/2-130, 0, "MANY");
180 // The end of the support for the shielding plug.
184 gMC->Gsvolu("CSW6", "BOX", idtmed[1116], pbox, 3);
185 gMC->Gspos("CSW6",1,"CSF1",-1400/2-pbox[0],0,3000-5150/2-pbox[2],0,"MANY");
191 gMC->Gsvolu("CSW7", "BOX", idtmed[1116], pbox, 3);
192 gMC->Gspos("CSW7",1,"CSF1",-1400/2-170-pbox[0],0,3000-5150/2+pbox[2],0,"MANY");
194 // Material close to the pipe.
198 gMC->Gsvolu("CSW8", "BOX", idtmed[1116], pbox, 3);
199 gMC->Gspos("CSW8",1,"CSF1",-2300/2+pbox[0],0,2500-5150/2,0,"MANY");
201 // Now put the shaft into the mother volume.
202 gMC->Gspos("CSF1", 1, "ACORDE", 0, AliACORDEConstants::Instance()->Depth() - 5150/2, 2300, idrotm[2001], "MANY");
206 ptube[1] = ptube[0] + 100;
207 ptube[2] = (5150 - 1166)/2;
208 gMC->Gsvolu("CSF4", "TUBE", idtmed[1116], ptube, 3);
209 gMC->Gspos("CSF4", 1, "ACORDE", 2100, AliACORDEConstants::Instance()->Depth()-ptube[2], 0, idrotm[2001], "MANY");
213 ptube[1] = ptube[0] + 100;
214 ptube[2] = (5150 - 690)/2;
215 gMC->Gsvolu("CSF5", "TUBE", idtmed[1116], ptube, 3);
216 gMC->Gspos("CSF5", 1, "ACORDE", -375, AliACORDEConstants::Instance()->Depth()-ptube[2], -1900 - 2987.7, idrotm[2001], "MANY");
221 void AliACORDEv0::CreateMolasse()
226 Int_t idrotm[2499]; // The rotation matrix.
227 Int_t* idtmed = fIdtmed->GetArray() - 1099 ;
229 Float_t px24radius = 2300/2;
232 Float_t px24Z = 2300;
234 Float_t pm25radius = 910/2;
235 Float_t pm25X = 2100;
239 Float_t pgc2radius = 1100/2;
240 Float_t pgc2X = -375;
242 Float_t pgc2Z = -(1900 + 2987.7);
244 Float_t concreteWidth = 100; // Standard width of the hall walls.
247 // Create a local mother volume.
249 pbox[0] = AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad);
250 pbox[1] = AliACORDEConstants::Instance()->Depth()/2;
252 gMC->Gsvolu("CMO1", "BOX", idtmed[1114], pbox, 3);
254 // Now put the molasse exactly above the hall. OK
258 ptubs[1] = 2100 - pm25radius;
259 ptubs[2] = 1900/2 + px24radius;
262 gMC->Gsvolu("CMO2", "TUBS", idtmed[1123], ptubs, 5);
263 gMC->Gspos("CMO2", 1, "CMO1", 0, 500-AliACORDEConstants::Instance()->Depth()/2, ptubs[2]-1900, 0, "MANY");
265 // Molasse around the RB24/26 Wall. OK
266 ptubs[0] = 220 + 1600;
267 ptubs[1] = AliACORDEConstants::Instance()->Depth() - ptubs[0];
268 ptubs[2] = 2987.7/2 - 1100/4 - concreteWidth/2;
271 gMC->Gsvolu("CMO3", "TUBS", idtmed[1123], ptubs, 5);
272 gMC->Gspos("CMO3", 1, "CMO1", 70, 40-AliACORDEConstants::Instance()->Depth()/2, -1900 - ptubs[2], 0, "MANY");
274 // A big block above the RB24/26 wall. OK
275 pbox[0] = AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad);
276 pbox[1] = (AliACORDEConstants::Instance()->Depth() - 220 - 1600)/2;
277 pbox[2] = 2987.7/2 - 1100/4 - concreteWidth/2;
278 gMC->Gsvolu("CMO4", "BOX", idtmed[1123], pbox, 3);
279 gMC->Gspos("CMO4", 1, "CMO1", 0, AliACORDEConstants::Instance()->Depth()/2 - pbox[1], -1900 - pbox[2], 0, "MANY");
280 // Small blocks below the volume CMO4 on both sides of the wall RB24/26. OK
281 pbox[0] = (AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad) -
283 pbox[1] = AliACORDEConstants::Instance()->Depth()/2 - pbox[1];
284 gMC->Gsvolu("CM17", "BOX", idtmed[1123], pbox, 3);
285 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");
286 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");
288 // And a big block of molasse above the hall up to the surface. OK
289 pbox[0] = pm25X - pm25radius;
290 pbox[1] = (AliACORDEConstants::Instance()->Depth()-500-1170)/2;
291 pbox[2] = (1900 + 1150)/2;
292 gMC->Gsvolu("CMO5", "BOX", idtmed[1123], pbox, 3);
293 gMC->Gspos("CMO5", 1, "CMO1", 0,AliACORDEConstants::Instance()->Depth()/2-pbox[1], pbox[2]-1900, 0, "MANY");
294 // Small blocks of molasse betwen the blocks CMO2, CMO5 and PM25. Ok
295 pbox[0] = (pm25X - pm25radius - 1170)/2;
297 gMC->Gsvolu("CM16", "BOX", idtmed[1123], pbox, 3);
298 gMC->Gspos("CM16", 1, "CMO1", 1170 + pbox[0], -AliACORDEConstants::Instance()->Depth()/2+pbox[1], pbox[2] - 1900, 0, "MANY");
300 // Molasse around the shafts.
301 AliMatrix(idrotm[2003], 0, 0, 90, 0, 90, 90);
302 // Around the PX24, the open section. OK
303 ptubs[0] = px24radius + concreteWidth;
304 ptubs[1] = ptubs[0] + 1000;
305 ptubs[2] = (2300 - (5150 - AliACORDEConstants::Instance()->Depth()))/2;
306 ptubs[3] = 180 + kRaddeg*TMath::ASin(1070/ptubs[0]);
307 ptubs[4] = 180 - kRaddeg*TMath::ASin(1070/ptubs[0]);
308 gMC->Gsvolu("CMO6", "TUBS", idtmed[1123], ptubs, 5);
309 gMC->Gspos("CMO6", 1, "CMO1", px24X, ptubs[2] - AliACORDEConstants::Instance()->Depth()/2, px24Z, idrotm[2003], "MANY");
310 // Around the PX24, the closed section. OK
312 ptube[0] = px24radius + concreteWidth;
313 ptube[1] = ptube[0] + 1000;
314 ptube[2] = (5150 - 2300)/2;
315 gMC->Gsvolu("CMO7", "TUBE", idtmed[1123], ptube, 3);
316 gMC->Gspos("CMO7", 1, "CMO1", px24X, AliACORDEConstants::Instance()->Depth()/2 - ptube[2], px24Z, idrotm[2003], "MANY");
319 ptube[0] = pm25radius + concreteWidth;
320 ptube[1] = ptube[0] + 400;
321 ptube[2] = AliACORDEConstants::Instance()->Depth()/2;
322 gMC->Gsvolu("CMO8", "TUBE", idtmed[1123], ptube, 3);
323 gMC->Gspos("CMO8", 1, "CMO1", pm25X, 0, pm25Z, idrotm[2003], "MANY");
324 // On both sides of the PM25 along the HALL.
325 pbox[0] = (2100 + pm25radius - 1170)/2;
326 pbox[1] = AliACORDEConstants::Instance()->Depth()/2;
327 pbox[2] = (3*px24radius - pm25radius)/2;
328 gMC->Gsvolu("CM18", "BOX", idtmed[1123], pbox, 3);
329 gMC->Gspos("CM18", 1, "CMO1", 2100, 0, pbox[2] + pm25radius, 0, "MANY");
331 pbox[2] = (1900 - pm25radius)/2;
332 gMC->Gsvolu("CM19", "BOX", idtmed[1123], pbox, 3);
333 gMC->Gspos("CM19", 1, "CMO1", 2100, 0, -pbox[2] - pm25radius, 0, "MANY");
335 // Around the PGC2. OK
336 ptube[0] = pgc2radius + concreteWidth;
337 ptube[1] = 2987.7 - 740;
338 ptube[2] = AliACORDEConstants::Instance()->Depth()/2;
339 gMC->Gsvolu("CMO9", "TUBE", idtmed[1123], ptube, 3);
340 gMC->Gspos("CMO9", 1, "CMO1", pgc2X, 0, pgc2Z, idrotm[2003], "MANY");
342 // On both sides of the PGC2.OK
343 pbox[0] = (AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad) -
345 pbox[1] = AliACORDEConstants::Instance()->Depth()/2;
346 pbox[2] = pgc2radius + concreteWidth;
347 gMC->Gsvolu("CM10", "BOX", idtmed[1123], pbox, 3);
348 gMC->Gspos("CM10", 1, "CMO1", AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad) - pbox[0], 0, pgc2Z, 0, "MANY");
349 gMC->Gspos("CM10", 2, "CMO1", -AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad) + pbox[0], 0, pgc2Z, 0, "MANY");
351 // big block of molasse behind the PX24. OK
352 pbox[0] = AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad);
353 pbox[1] = AliACORDEConstants::Instance()->Depth()/2;
354 pbox[2] = (pbox[0] - (2300 + 1150 + 100))/2;
355 gMC->Gsvolu("CM12", "BOX", idtmed[1123], pbox, 3);
356 gMC->Gspos("CM12", 1, "CMO1", px24X, 0, px24Z + px24radius + concreteWidth + pbox[2], 0, "MANY");
358 // big block of molasse in the opposite side of the PM25. OK
359 pbox[0] = (AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad) -
361 pbox[1] = AliACORDEConstants::Instance()->Depth()/2;
362 pbox[2] = (1900 + 2300 + 1150)/2;
363 gMC->Gsvolu("CM13", "BOX", idtmed[1123], pbox, 3);
364 gMC->Gspos("CM13", 1, "CMO1", -1150 - pbox[0], 0, pbox[2] - 1900, 0, "MANY");
366 // big block of molasse behind the PM25. OK
367 pbox[0] = (AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad) -
368 (2100 + 910/2 + 100))/2;
369 pbox[1] = AliACORDEConstants::Instance()->Depth()/2;
370 pbox[2] = (1900 + 2300 + 1150)/2;
371 gMC->Gsvolu("CM14", "BOX", idtmed[1123], pbox, 3);
372 gMC->Gspos("CM14", 1, "CMO1", pm25X + pm25radius + concreteWidth + pbox[0], 0, pbox[2] - 1900, 0, "MANY");
374 // big block of molasse behind the PGC2. OK
375 pbox[0] = AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad);
376 pbox[1] = AliACORDEConstants::Instance()->Depth()/2;
377 pbox[2] = (pbox[0] - (2987.7 + 1900 + 1100/2 + 100))/2;
378 gMC->Gsvolu("CM15", "BOX", idtmed[1123], pbox, 3);
379 gMC->Gspos("CM15", 1, "CMO1", 0, 0, -pbox[0] + pbox[2], 0, "MANY");
381 gMC->Gspos("CMO1",1,"ACORDE",0,AliACORDEConstants::Instance()->Depth()/2,0,0,"MANY");
385 void AliACORDEv0::CreateAcorde()
388 // Create geometry for the ACORDE array
389 // done in two main steps
390 // 1.- definition of the modules
391 // 2.- placement of the modules
393 Int_t idrotm[2499]; // The rotation matrix.
394 Int_t* idtmed = fIdtmed->GetArray() - 1099;
395 AliACORDEConstants* constants = AliACORDEConstants::Instance();
399 Float_t small = 0.05; // to separate slightly some volumes
400 // by half a mm so that they do not overlap
403 // 1.- Definition of a module
404 // * ACORDE1 => volume filled with air, representing a module
405 // it contains all other volumes defining the module
406 // there are 60 copies of it
407 // * ACORDE2 => volume defining one scintillator pad
408 // there are 2 copies of it per module
409 // * ACORDE3-6 => volumes representing the Al walls of box
410 // surrounding the plastic
411 // 3: long wall, 2 copies (front, back)
412 // 4: end caps, 2 copies (left, right)
413 // 5: long stripe to model the profile
414 // 4 copies (upper front and back, lower)
415 // 6: short stripe to model the profile
416 // 4 copies (upper left, right; lower)
418 // The full module volume.
419 // This volume will be ocupied by all the material of the module
420 // the scintillators, the aluminium frame, etc.
421 box[0] = constants->ModuleLength()/2;
422 box[1] = constants->ModuleHeight()/2;
423 box[2] = constants->ModuleWidth()/2;
424 gMC->Gsvolu("ACORDE1", "BOX", idtmed[1114], box, 3);
427 box[0] = constants->PlasticLength()/2;
428 box[1] = constants->PlasticHeight()/2;
429 box[2] = constants->PlasticWidth()/2;
430 gMC->Gsvolu("ACORDE2", "BOX", idtmed[1112], box, 3);
432 // it is important to keep this order for easy assignment of
433 // a volume to a physical module:
434 placed_at = box[1]+constants->ProfileThickness()
435 - constants->ModuleHeight()/2+small;
436 gMC->Gspos("ACORDE2", 1, "ACORDE1", 0, placed_at, 0, 0, "MANY");
437 placed_at = placed_at + 2.0*box[1]+small;
438 gMC->Gspos("ACORDE2", 2, "ACORDE1", 0, placed_at, 0, 0, "MANY");
441 // The metallic frame: long walls of box
442 // back,front,left,right, defined looking
443 // from the + z diraction into alice; i.e.
444 // back ==> z<0, front ==> z>0
445 // left ==> x<0, right ==> x>0
446 // up ==> increasing y, down ==> decreasing y
447 box[0] = constants->ModuleLength()/2;
448 box[1] = constants->ModuleHeight()/2;
449 box[2] = constants->ProfileThickness()/2.0;
450 gMC->Gsvolu("ACORDE3", "BOX", idtmed[1108], box, 3);
452 placed_at = constants->ModuleWidth()/2-constants->ProfileThickness()/2.0;
453 gMC->Gspos("ACORDE3", 1, "ACORDE1", 0, 0, placed_at, 0, "MANY");
455 gMC->Gspos("ACORDE3", 2, "ACORDE1", 0, 0, -placed_at , 0, "MANY");
457 // The metallic frame: end caps
458 box[0] = constants->ProfileThickness()/2.0;
459 box[1] = constants->ModuleHeight()/2;
460 box[2] = constants->ModuleWidth()/2;
461 gMC->Gsvolu("ACORDE4", "BOX", idtmed[1108], box, 3);
463 placed_at = constants->ModuleLength()/2-constants->ProfileThickness()/2.0;
464 gMC->Gspos("ACORDE4", 1, "ACORDE1", placed_at, 0, 0, 0, "MANY");
466 gMC->Gspos("ACORDE4", 2, "ACORDE1", -placed_at, 0, 0, 0, "MANY");
468 // The metallic frame: the profile, long stripes
469 box[0] = constants->ModuleLength()/2.0;
470 box[1] = constants->ProfileThickness()/2;
471 box[2] = constants->ProfileWidth()/2;
472 gMC->Gsvolu("ACORDE5", "BOX", idtmed[1108], box, 3);
474 placed_at = constants->ModuleHeight()/2-box[1];
475 placed_at2 = constants->ModuleWidth()/2-
476 constants->ProfileThickness()-box[2];
477 gMC->Gspos("ACORDE5", 1, "ACORDE1",0,placed_at,placed_at2, 0, "MANY");
479 gMC->Gspos("ACORDE5", 2, "ACORDE1",0,placed_at,-placed_at2, 0, "MANY");
481 gMC->Gspos("ACORDE5", 3, "ACORDE1",0,-placed_at,placed_at2, 0, "MANY");
483 gMC->Gspos("ACORDE5", 4, "ACORDE1",0,-placed_at,-placed_at2, 0, "MANY");
485 // The metallic frame: the profile, long stripes
486 box[0] = constants->ProfileWidth()/2.0;
487 box[1] = constants->ProfileThickness()/2;
488 box[2] = constants->ModuleWidth()/2-constants->ProfileWidth();
489 gMC->Gsvolu("ACORDE6", "BOX", idtmed[1108], box, 3);
491 placed_at = constants->ModuleHeight()/2-box[1];
492 placed_at2 = constants->ModuleLength()/2-
493 constants->ProfileThickness()-box[0];
494 gMC->Gspos("ACORDE6", 1, "ACORDE1",placed_at2,placed_at,0, 0, "MANY");
496 gMC->Gspos("ACORDE6", 2, "ACORDE1",-placed_at2,placed_at,0, 0, "MANY");
498 gMC->Gspos("ACORDE6", 3, "ACORDE1",placed_at2,-placed_at,0, 0, "MANY");
500 gMC->Gspos("ACORDE6", 4, "ACORDE1",-placed_at2,-placed_at,0, 0, "MANY");
502 // End of MODULE definition
504 ////////////////////////////////////////////////////////////////////
505 ////////////////////////////////////////////////////////////////////
507 // 2.- placement of the module
508 // Now put all of them in the right position in
509 // master volume ALIC
511 // rotation matrices (see Geant manual for conventions)
512 // for columns 4 and 5
513 AliMatrix(idrotm[231], 90, 45, 90, 135, 0, 0);
514 // for columns 0 and 1
515 AliMatrix(idrotm[232], 90, 315, 90, 45, 0, 0);
517 // place each one of the 6 columns in turn
518 // for the first and the last column the position
519 // of the two last modules depends on the value
520 // of the fITSGeometry variable
522 // it is important to keep this order because
523 // the copy number defines the module!
525 // first column, except first and last modules
526 for (Int_t copy = 2; copy < 10; copy++)
527 gMC->Gspos("ACORDE1",copy,"ALIC",
528 constants->ModulePositionX(copy-1),
529 constants->ModulePositionY(copy-1),
530 constants->ModulePositionZ(copy-1),
531 idrotm[232], "MANY");
533 for (Int_t copy = 11; copy < 21; copy++)
534 gMC->Gspos("ACORDE1",copy,"ALIC",
535 constants->ModulePositionX(copy-1),
536 constants->ModulePositionY(copy-1),
537 constants->ModulePositionZ(copy-1),
538 idrotm[232], "MANY");
539 // third and fourth columns
540 for (Int_t copy = 21; copy < 41; copy++)
541 gMC->Gspos("ACORDE1",copy,"ALIC",
542 constants->ModulePositionX(copy-1),
543 constants->ModulePositionY(copy-1),
544 constants->ModulePositionZ(copy-1),
547 for (Int_t copy = 41; copy < 51; copy++)
548 gMC->Gspos("ACORDE1",copy,"ALIC",
549 constants->ModulePositionX(copy-1),
550 constants->ModulePositionY(copy-1),
551 constants->ModulePositionZ(copy-1),
552 idrotm[231], "MANY");
553 // last column, except first and last modules
554 for (Int_t copy = 52; copy < 60; copy++)
555 gMC->Gspos("ACORDE1",copy,"ALIC",
556 constants->ModulePositionX(copy-1),
557 constants->ModulePositionY(copy-1),
558 constants->ModulePositionZ(copy-1),
559 idrotm[231], "MANY");
560 // the last four modules
561 if (GetITSGeometry()) {
562 gMC->Gspos("ACORDE1",1,"ALIC",
563 constants->ExtraModulePositionX(),
564 constants->ExtraModulePositionY(),
565 constants->ExtraModulePositionZ(0),
567 gMC->Gspos("ACORDE1",10,"ALIC",
568 constants->ExtraModulePositionX(),
569 constants->ExtraModulePositionY(),
570 constants->ExtraModulePositionZ(1),
572 gMC->Gspos("ACORDE1",51,"ALIC",
573 constants->ExtraModulePositionX(),
574 constants->ExtraModulePositionY(),
575 constants->ExtraModulePositionZ(2),
577 gMC->Gspos("ACORDE1",60,"ALIC",
578 constants->ExtraModulePositionX(),
579 constants->ExtraModulePositionY(),
580 constants->ExtraModulePositionZ(3),
583 gMC->Gspos("ACORDE1",1,"ALIC",
584 constants->ModulePositionX(0),
585 constants->ModulePositionY(0),
586 constants->ModulePositionZ(0),
587 idrotm[232], "MANY");
588 gMC->Gspos("ACORDE1",10,"ALIC",
589 constants->ModulePositionX(9),
590 constants->ModulePositionY(9),
591 constants->ModulePositionZ(9),
592 idrotm[232], "MANY");
593 gMC->Gspos("ACORDE1",51,"ALIC",
594 constants->ModulePositionX(50),
595 constants->ModulePositionY(50),
596 constants->ModulePositionZ(50),
597 idrotm[231], "MANY");
598 gMC->Gspos("ACORDE1",60,"ALIC",
599 constants->ModulePositionX(59),
600 constants->ModulePositionY(59),
601 constants->ModulePositionZ(59),
602 idrotm[231], "MANY");
603 } // end if (fITSGeometry)
606 //_____________________________________________________________________________
607 void AliACORDEv0::DrawDetector() const
610 // not needed anymore
614 //____________________________________________________________________________
616 void AliACORDEv0::Init()
618 // Initialise L3 magnet after it has been built
620 if(AliLog::GetGlobalDebugLevel()>0) {
621 printf("\n%s: ",ClassName());
622 for(i=0;i<35;i++) printf("*");
623 printf(" ACORDEv0_INIT ");
624 for(i=0;i<35;i++) printf("*");
625 printf("\n%s: ",ClassName());
626 // Here the ACORDEv initialisation code (if any!)
627 for(i=0;i<80;i++) printf("*");
630 // AliACORDE::Init();
632 //____________________________________________________________________________
633 void AliACORDEv0::StepManager()
636 // Called for every step in the Cosmic Ray Trigger
641 // [0] = module number 1-60 (1==>(0-0), 60 (5-9)
642 // [1] = Plastic number: 0 (down) to 1 (up)
649 // [5-7] = px, py, pz
652 // [10] = length of track through plastic
653 static Float_t hits[11];
655 // local static variables
656 static Float_t eloss;
658 // scintillator volume
659 static Int_t idScint = gMC->VolId("ACORDE2");
666 // only charged tracks
667 if ( !gMC->TrackCharge() || !gMC->IsTrackAlive() ) return;
669 // only in sensitive material
670 if (gMC->CurrentVolID(copy) == idScint) {
671 step += gMC->TrackStep();
672 eloss += gMC->Edep();
673 // set all hit variables except eloss which is resetted
674 // set volume variables
675 if (gMC->IsTrackEntering()) {
678 gMC->TrackPosition(pos);
679 gMC->TrackMomentum(mom);
684 // [5-7] = px, py, pz
687 hits[0] = (Float_t ) gMC->TrackPid();
691 hits[4] = gMC->TrackTime();
695 hits[8] = gMC->Etot();
697 // [0] = module number 1-60 (1==>(0-0), 60 (5-9)
698 // [1] = Plastic number: 0 (down) to 1 (up)
699 Int_t copyPlastic; // plastic: down=1, up=2
700 Int_t copyModule; // module: 1-60
701 gMC->CurrentVolID(copyPlastic);
702 gMC->CurrentVolOffID(1, copyModule);
705 // plastic: 0 = down, 1 = up
706 vol[1] = copyPlastic;
707 } // end if gMC->IsTrackEntering()
709 // set hit[9] = total energy loss and book hit
710 if( gMC->IsTrackExiting() ||
711 gMC->IsTrackStop() ||
712 gMC->IsTrackDisappeared()){
717 AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(),vol, hits);
719 } // end if in scintillator
723 //_____________________________________________________________________________
724 void AliACORDEv0::AddHit(Int_t track, Int_t *vol, Float_t *hits)
729 TClonesArray &lhits = *fHits;
730 new(lhits[fNhits++]) AliACORDEhit(fIshunt,track,vol,hits);