]>
Commit | Line | Data |
---|---|---|
2012850d | 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$ */ | |
2012850d | 17 | //_________________________________________________________________________ |
18 | // Base Class for EMCAL description: | |
ffa6d63b | 19 | // This class contains material definitions |
20 | // for the EMCAL - It does not place the detector in Alice | |
2012850d | 21 | //*-- Author: Yves Schutz (SUBATECH) |
b13bbe81 | 22 | // |
23 | //*-- Additional Contributions: Sahal Yacoob (LBNL/UCT) | |
3d841a9f | 24 | // : Alexei Pavlinov (WSU) |
b13bbe81 | 25 | // |
2012850d | 26 | ////////////////////////////////////////////////////////////////////////////// |
27 | ||
2012850d | 28 | // --- ROOT system --- |
b13bbe81 | 29 | class TFile; |
88cb7938 | 30 | #include <TFolder.h> |
f7a1cc68 | 31 | #include <TGeoGlobalMagField.h> |
32 | #include <TGraph.h> | |
046ae904 | 33 | #include <TH1F.h> |
046ae904 | 34 | #include <TRandom.h> |
f7a1cc68 | 35 | #include <TTree.h> |
36 | #include <TVirtualMC.h> | |
2012850d | 37 | |
05a92d59 | 38 | // --- Standard library --- |
2012850d | 39 | |
05a92d59 | 40 | // --- AliRoot header files --- |
2012850d | 41 | #include "AliMagF.h" |
88cb7938 | 42 | #include "AliEMCAL.h" |
85a5290f | 43 | #include "AliRun.h" |
5dee926e | 44 | #include "AliEMCALLoader.h" |
85a5290f | 45 | #include "AliEMCALSDigitizer.h" |
46 | #include "AliEMCALDigitizer.h" | |
5dee926e | 47 | #include "AliEMCALDigit.h" |
ee299369 | 48 | #include "AliEMCALRawUtils.h" |
3294dade | 49 | #include "AliCDBManager.h" |
50 | #include "AliCDBEntry.h" | |
51 | ||
2012850d | 52 | ClassImp(AliEMCAL) |
4884333f | 53 | |
2012850d | 54 | //____________________________________________________________________________ |
18a21c7c | 55 | AliEMCAL::AliEMCAL() |
56 | : AliDetector(), | |
57 | fBirkC0(0), | |
58 | fBirkC1(0.), | |
59 | fBirkC2(0.), | |
c2ef87c2 | 60 | fGeometry(0), |
61 | fCheckRunNumberAndGeoVersion(kTRUE) | |
62 | ||
2012850d | 63 | { |
05a92d59 | 64 | // Default ctor |
046ae904 | 65 | fName = "EMCAL" ; |
7235aed2 | 66 | InitConstants(); |
65bdc82f | 67 | |
23ef18ac | 68 | // Should call AliEMCALGeometry::GetInstance(EMCAL->GetTitle(),"") for getting EMCAL geometry |
2012850d | 69 | } |
05a92d59 | 70 | |
2012850d | 71 | //____________________________________________________________________________ |
18a21c7c | 72 | AliEMCAL::AliEMCAL(const char* name, const char* title) |
73 | : AliDetector(name,title), | |
74 | fBirkC0(0), | |
75 | fBirkC1(0.), | |
76 | fBirkC2(0.), | |
c2ef87c2 | 77 | fGeometry(0), |
78 | fCheckRunNumberAndGeoVersion(kTRUE) | |
79 | ||
05a92d59 | 80 | { |
81 | // ctor : title is used to identify the layout | |
7235aed2 | 82 | InitConstants(); |
0a4cb131 | 83 | } |
84 | ||
2012850d | 85 | //____________________________________________________________________________ |
05a92d59 | 86 | AliEMCAL::~AliEMCAL() |
87 | { | |
14ce0a6e | 88 | //dtor |
2012850d | 89 | } |
90 | ||
0a4cb131 | 91 | //____________________________________________________________________________ |
7235aed2 | 92 | void AliEMCAL::InitConstants() |
0a4cb131 | 93 | { |
94 | //initialize EMCAL values | |
95 | fBirkC0 = 1; | |
96 | fBirkC1 = 0.013/1.032; | |
97 | fBirkC2 = 9.6e-6/(1.032 * 1.032); | |
ee299369 | 98 | } |
0a4cb131 | 99 | |
b8a520ff | 100 | //Not needed, modify $ALICE_ROOT/data/galice.cuts instead. |
101 | //Load the modified one in the configuration file with SetTransPar | |
102 | // //____________________________________________________________________________ | |
103 | // void AliEMCAL::DefineMediumParameters() | |
104 | // { | |
105 | // // | |
106 | // // EMCAL cuts (Geant3) | |
107 | // // | |
108 | // Int_t * idtmed = fIdtmed->GetArray() - 1599 ; | |
109 | // // --- Set decent energy thresholds for gamma and electron tracking | |
110 | ||
111 | // // Tracking threshold for photons and electrons in Lead | |
112 | // Float_t cutgam=10.e-5; // 100 kev; | |
113 | // Float_t cutele=10.e-5; // 100 kev; | |
114 | // TString ntmp(GetTitle()); | |
115 | // ntmp.ToUpper(); | |
116 | // if(ntmp.Contains("10KEV")) { | |
117 | // cutele = cutgam = 1.e-5; | |
118 | // } else if(ntmp.Contains("50KEV")) { | |
119 | // cutele = cutgam = 5.e-5; | |
120 | // } else if(ntmp.Contains("100KEV")) { | |
121 | // cutele = cutgam = 1.e-4; | |
122 | // } else if(ntmp.Contains("200KEV")) { | |
123 | // cutele = cutgam = 2.e-4; | |
124 | // } else if(ntmp.Contains("500KEV")) { | |
125 | // cutele = cutgam = 5.e-4; | |
126 | // } | |
127 | ||
128 | // gMC->Gstpar(idtmed[1600],"CUTGAM", cutgam); | |
129 | // gMC->Gstpar(idtmed[1600],"CUTELE", cutele); // 1MEV -> 0.1MEV; 15-aug-05 | |
130 | // gMC->Gstpar(idtmed[1600],"BCUTE", cutgam); // BCUTE and BCUTM start from GUTGUM | |
131 | // gMC->Gstpar(idtmed[1600],"BCUTM", cutgam); // BCUTE and BCUTM start from GUTGUM | |
132 | // // --- Generate explicitly delta rays in Lead --- | |
133 | // gMC->Gstpar(idtmed[1600], "LOSS", 3) ; | |
134 | // gMC->Gstpar(idtmed[1600], "DRAY", 1) ; | |
135 | // gMC->Gstpar(idtmed[1600], "DCUTE", cutele) ; | |
136 | // gMC->Gstpar(idtmed[1600], "DCUTM", cutele) ; | |
137 | ||
138 | // // --- in aluminium parts --- | |
139 | // gMC->Gstpar(idtmed[1602],"CUTGAM", cutgam) ; | |
140 | // gMC->Gstpar(idtmed[1602],"CUTELE", cutele) ; | |
141 | // gMC->Gstpar(idtmed[1602],"BCUTE", cutgam); // BCUTE and BCUTM start from GUTGUM | |
142 | // gMC->Gstpar(idtmed[1602],"BCUTM", cutgam); // BCUTE and BCUTM start from GUTGUM | |
143 | // gMC->Gstpar(idtmed[1602], "LOSS",3.) ; | |
144 | // gMC->Gstpar(idtmed[1602], "DRAY",1.) ; | |
145 | // gMC->Gstpar(idtmed[1602], "DCUTE", cutele) ; | |
146 | // gMC->Gstpar(idtmed[1602], "DCUTM", cutele) ; | |
147 | ||
148 | // // --- and finally thresholds for photons and electrons in the scintillator --- | |
149 | // gMC->Gstpar(idtmed[1601],"CUTGAM", cutgam) ; | |
150 | // gMC->Gstpar(idtmed[1601],"CUTELE", cutele) ;// 1MEV -> 0.1MEV; 15-aug-05 | |
151 | // gMC->Gstpar(idtmed[1601],"BCUTE", cutgam); // BCUTE and BCUTM start from GUTGUM | |
152 | // gMC->Gstpar(idtmed[1601],"BCUTM", cutgam); // BCUTE and BCUTM start from GUTGUM | |
153 | // gMC->Gstpar(idtmed[1601], "LOSS",3) ; // generate delta rays | |
154 | // gMC->Gstpar(idtmed[1601], "DRAY",1) ; | |
155 | // gMC->Gstpar(idtmed[1601], "DCUTE", cutele) ; | |
156 | // gMC->Gstpar(idtmed[1601], "DCUTM", cutele) ; | |
157 | ||
158 | // // S steel - | |
159 | // gMC->Gstpar(idtmed[1603],"CUTGAM", cutgam); | |
160 | // gMC->Gstpar(idtmed[1603],"CUTELE", cutele); | |
161 | // gMC->Gstpar(idtmed[1603],"BCUTE", cutgam); // BCUTE and BCUTM start from GUTGUM | |
162 | // gMC->Gstpar(idtmed[1603],"BCUTM", cutgam); // BCUTE and BCUTM start from GUTGUM | |
163 | // // --- Generate explicitly delta rays | |
164 | // gMC->Gstpar(idtmed[1603], "LOSS",3); | |
165 | // gMC->Gstpar(idtmed[1603], "DRAY",1); | |
166 | // gMC->Gstpar(idtmed[1603], "DCUTE", cutele) ; | |
167 | // gMC->Gstpar(idtmed[1603], "DCUTM", cutele) ; | |
168 | ||
169 | // AliEMCALGeometry* geom = GetGeometry(); | |
170 | // if(geom->GetILOSS()>=0) { | |
171 | // for(int i=1600; i<=1603; i++) gMC->Gstpar(idtmed[i], "LOSS", geom->GetILOSS()) ; | |
172 | // } | |
173 | // if(geom->GetIHADR()>=0) { | |
174 | // for(int i=1600; i<=1603; i++) gMC->Gstpar(idtmed[i], "HADR", geom->GetIHADR()) ; | |
175 | // } | |
176 | // } | |
7235aed2 | 177 | |
178 | //____________________________________________________________________________ | |
179 | AliDigitizer* AliEMCAL::CreateDigitizer(AliRunDigitizer* manager) const | |
180 | { | |
181 | //create and return the digitizer | |
182 | return new AliEMCALDigitizer(manager); | |
183 | } | |
184 | ||
185 | //____________________________________________________________________________ | |
186 | void AliEMCAL::CreateMaterials() | |
187 | { | |
188 | // Definitions of materials to build EMCAL and associated tracking media. | |
189 | // media number in idtmed are 1599 to 1698. | |
190 | // --- Air --- | |
191 | Float_t aAir[4]={12.0107,14.0067,15.9994,39.948}; | |
192 | Float_t zAir[4]={6.,7.,8.,18.}; | |
193 | Float_t wAir[4]={0.000124,0.755267,0.231781,0.012827}; | |
194 | Float_t dAir = 1.20479E-3; | |
195 | AliMixture(0, "Air$", aAir, zAir, dAir, 4, wAir) ; | |
196 | ||
197 | // --- Lead --- | |
198 | AliMaterial(1, "Pb$", 207.2, 82, 11.35, 0.56, 0., 0, 0) ; | |
199 | ||
200 | ||
201 | // --- The polysterene scintillator (CH) --- | |
202 | Float_t aP[2] = {12.011, 1.00794} ; | |
203 | Float_t zP[2] = {6.0, 1.0} ; | |
204 | Float_t wP[2] = {1.0, 1.0} ; | |
205 | Float_t dP = 1.032 ; | |
206 | ||
207 | AliMixture(2, "Polystyrene$", aP, zP, dP, -2, wP) ; | |
208 | ||
209 | // --- Aluminium --- | |
210 | AliMaterial(3, "Al$", 26.98, 13., 2.7, 8.9, 999., 0, 0) ; | |
211 | // --- Absorption length is ignored ^ | |
212 | ||
213 | // 25-aug-04 by PAI - see PMD/AliPMDv0.cxx for STEEL definition | |
214 | Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 }; | |
215 | Float_t zsteel[4] = { 26.,24.,28.,14. }; | |
216 | Float_t wsteel[4] = { .715,.18,.1,.005 }; | |
217 | AliMixture(4, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel); | |
218 | ||
3d841a9f | 219 | // Oct 26,2010 : Multipurpose Copy Paper UNV-21200), weiht 75 g/m**2. |
220 | // *Cellulose C6H10O5 | |
221 | // Component C A=12.01 Z=6. W=6./21. | |
222 | // Component H A=1. Z=1. W=10./21. | |
223 | // Component O A=16. Z=8. W=5./21. | |
224 | Float_t apaper[3] = { 12.01, 1.0, 16.0}; | |
fb3bd607 | 225 | Float_t zpaper[3] = { 6.0, 1.0, 8.0}; |
3d841a9f | 226 | Float_t wpaper[3] = {6./21., 10./21., 5./21.}; |
227 | AliMixture(5, "BondPaper$", apaper, zpaper, 0.75, 3, wpaper); | |
228 | ||
7235aed2 | 229 | // DEFINITION OF THE TRACKING MEDIA |
ce540969 | 230 | // Look to the $ALICE_ROOT/data/galice.cuts for particular values |
231 | // of cuts. | |
232 | // Don't forget to add a new tracking medium with non-default cuts | |
7235aed2 | 233 | |
234 | // for EMCAL: idtmed[1599->1698] equivalent to fIdtmed[0->100] | |
f7a1cc68 | 235 | Int_t isxfld = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Integ() ; |
236 | Float_t sxmgmx = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Max() ; | |
7235aed2 | 237 | |
238 | // Air -> idtmed[1599] | |
239 | AliMedium(0, "Air$", 0, 0, | |
240 | isxfld, sxmgmx, 10.0, 1.0, 0.1, 0.1, 10.0, 0, 0) ; | |
241 | ||
242 | // The Lead -> idtmed[1600] | |
243 | ||
244 | AliMedium(1, "Lead$", 1, 0, | |
245 | isxfld, sxmgmx, 10.0, 0.1, 0.1, 0.1, 0.1, 0, 0) ; | |
246 | ||
247 | // The scintillator of the CPV made of Polystyrene scintillator -> idtmed[1601] | |
ee299369 | 248 | float deemax = 0.1; // maximum fractional energy loss in one step (0 < DEEMAX < deemax ) |
7235aed2 | 249 | AliMedium(2, "Scintillator$", 2, 1, |
250 | isxfld, sxmgmx, 10.0, 0.001, deemax, 0.001, 0.001, 0, 0) ; | |
251 | ||
252 | // Various Aluminium parts made of Al -> idtmed[1602] | |
253 | AliMedium(3, "Al$", 3, 0, | |
254 | isxfld, sxmgmx, 10.0, 0.1, 0.1, 0.001, 0.001, 0, 0) ; | |
255 | ||
256 | // 25-aug-04 by PAI : see PMD/AliPMDv0.cxx for STEEL definition -> idtmed[1603] | |
257 | AliMedium(4, "S steel$", 4, 0, | |
3d841a9f | 258 | isxfld, sxmgmx, 10.0, 0.01, 0.1, 0.001, 0.001, 0, 0) ; |
259 | ||
ce540969 | 260 | // Oct 26,2010; Nov 24,2010 -> idtmed[1604] |
261 | deemax = 0.01; | |
3d841a9f | 262 | AliMedium(5, "Paper$", 5, 0, |
ce540969 | 263 | isxfld, sxmgmx, 10.0, deemax, 0.1, 0.001, 0.001, 0, 0) ; |
7235aed2 | 264 | |
89557f6d | 265 | |
ab37d09c | 266 | //set constants for Birk's Law implentation |
267 | fBirkC0 = 1; | |
268 | fBirkC1 = 0.013/dP; | |
269 | fBirkC2 = 9.6e-6/(dP * dP); | |
270 | ||
2012850d | 271 | } |
dde0a601 | 272 | |
273 | //____________________________________________________________________________ | |
274 | void AliEMCAL::Init() | |
b8a520ff | 275 | { |
276 | // Init | |
277 | //Not needed, modify $ALICE_ROOT/data/galice.cuts instead. | |
278 | //Load the modified one in the configuration file with SetTransPar | |
279 | //DefineMediumParameters(); | |
dde0a601 | 280 | } |
281 | ||
2d5d9e60 | 282 | //____________________________________________________________________________ |
ee299369 | 283 | void AliEMCAL::Digits2Raw() { |
65bdc82f | 284 | |
285 | static AliEMCALRawUtils rawUtils; | |
286 | rawUtils.Digits2Raw(); | |
287 | ||
2d5d9e60 | 288 | } |
8367ce9a | 289 | //____________________________________________________________________________ |
290 | void AliEMCAL::Hits2SDigits() | |
291 | { | |
292 | // create summable digits | |
293 | ||
ddca522a | 294 | GetGeometry(); |
4d33c797 | 295 | AliEMCALSDigitizer emcalDigitizer(fLoader->GetRunLoader()->GetFileName().Data()) ; |
296 | emcalDigitizer.SetEventRange(0, -1) ; // do all the events | |
297 | emcalDigitizer.ExecuteTask() ; | |
da480a28 | 298 | } |
299 | ||
8367ce9a | 300 | //____________________________________________________________________________ |
5dee926e | 301 | |
8367ce9a | 302 | AliLoader* AliEMCAL::MakeLoader(const char* topfoldername) |
303 | { | |
304 | //different behaviour than standard (singleton getter) | |
305 | // --> to be discussed and made eventually coherent | |
306 | fLoader = new AliEMCALLoader(GetName(),topfoldername); | |
307 | return fLoader; | |
308 | } |