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 //_________________________________________________________________________
19 // Base Class for EMCAL description:
22 //*-- Author: Yves Schutz (SUBATECH)
24 //*-- Additional Contributions: Sahal Yacoob (LBNL/UCT)
26 //////////////////////////////////////////////////////////////////////////////
28 // --- Standard library ---
29 #include <strstream.h>
31 // --- ROOT system ---
34 #include "TClonesArray.h"
37 // --- AliRoot header files ---
40 #include "AliEMCALGeometry.h"
47 //____________________________________________________________________________
48 AliEMCAL::AliEMCAL():AliDetector()
51 //We do not create objects, because these pointers will be overwritten during reading from file.
54 //____________________________________________________________________________
55 AliEMCAL::AliEMCAL(const char* name, const char* title): AliDetector(name,title) {
56 // ctor : title is used to identify the layout
58 // gets an instance of the geometry parameters class
60 //____________________________________________________________________________
61 AliEMCAL::~AliEMCAL(){
66 //____________________________________________________________________________
67 void AliEMCAL::CreateMaterials(){
68 // Definitions of materials to build EMCAL and associated tracking media.
69 // media number in idtmed are 1599 to 1698.
72 AliMaterial(0, "Air$", 14.61, 7.3, 0.001205, 30420., 67500., 0, 0) ;
76 AliMaterial(1, "Pb$", 207.2, 82, 11.35, 0.56, 0., 0, 0) ;
79 // --- The polysterene scintillator (CH) ---
80 Float_t aP[2] = {12.011, 1.00794} ;
81 Float_t zP[2] = {6.0, 1.0} ;
82 Float_t wP[2] = {1.0, 1.0} ;
85 AliMixture(2, "Polystyrene$", aP, zP, dP, -2, wP) ;
88 AliMaterial(3, "Al$", 26.98, 13., 2.7, 8.9, 999., 0, 0) ;
89 // --- Absorption length is ignored ^
93 // DEFINITION OF THE TRACKING MEDIA
95 // for EMCAL: idtmed[1599->1698] equivalent to fIdtmed[0->100]
96 Int_t * idtmed = fIdtmed->GetArray() - 1599 ;
97 Int_t isxfld = gAlice->Field()->Integ() ;
98 Float_t sxmgmx = gAlice->Field()->Max() ;
102 // Air -> idtmed[1599]
103 AliMedium(0, "Air $", 0, 0,
104 isxfld, sxmgmx, 10.0, 1.0, 0.1, 0.1, 10.0, 0, 0) ;
106 // The Lead -> idtmed[1600]
108 AliMedium(1, "Lead $", 1, 0,
109 isxfld, sxmgmx, 10.0, 0.1, 0.1, 0.1, 0.1, 0, 0) ;
112 // The scintillator of the CPV made of Polystyrene scintillator -> idtmed[1601]
113 AliMedium(2, "CPV scint. $", 2, 1,
114 isxfld, sxmgmx, 10.0, 0.001, 0.1, 0.001, 0.001, 0, 0) ;
116 // Various Aluminium parts made of Al -> idtmed[1602]
117 AliMedium(3, "Al parts $", 3, 0,
118 isxfld, sxmgmx, 10.0, 0.1, 0.1, 0.001, 0.001, 0, 0) ;
123 // --- Set decent energy thresholds for gamma and electron tracking
125 // Tracking threshold for photons and electrons in Lead
126 // gMC->Gstpar(idtmed[1600], "CUTGAM",0.5E-4) ;
127 // gMC->Gstpar(idtmed[1600], "CUTELE",1.0E-4) ;
129 // --- Generate explicitly delta rays in Lead ---
130 gMC->Gstpar(idtmed[1600], "LOSS",3.) ;
131 gMC->Gstpar(idtmed[1600], "DRAY",1.) ;
133 gMC->Gstpar(idtmed[1600],"CUTGAM",0.00008) ;
134 gMC->Gstpar(idtmed[1600],"CUTELE",0.001) ;
135 gMC->Gstpar(idtmed[1600],"BCUTE",0.0001) ;
137 // --- and in aluminium parts ---
138 gMC->Gstpar(idtmed[1602], "LOSS",3.) ;
139 gMC->Gstpar(idtmed[1602], "DRAY",1.) ;
142 // --- and finally in the scintillator ---
143 gMC->Gstpar(idtmed[1601],"CUTGAM",0.00008) ;
144 gMC->Gstpar(idtmed[1601],"CUTELE",0.001) ;
145 gMC->Gstpar(idtmed[1601],"BCUTE",0.0001) ;
149 //____________________________________________________________________________
150 void AliEMCAL::SetTreeAddress()
155 sprintf(branchname,"%s",GetName());
157 // Branch address for hit tree
158 TTree *treeH = gAlice->TreeH();
159 if (treeH && fHits) {
160 branch = treeH->GetBranch(branchname);
161 if (branch) branch->SetAddress(&fHits);