Adding include path to allow compilation of CleanGeom task
[u/mrichter/AliRoot.git] / EMCAL / AliEMCAL.cxx
CommitLineData
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 29class 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"
050f9171 42#include "AliLog.h"
88cb7938 43#include "AliEMCAL.h"
85a5290f 44#include "AliRun.h"
050f9171 45#include "AliRunLoader.h"
46#include "AliCDBManager.h"
5dee926e 47#include "AliEMCALLoader.h"
85a5290f 48#include "AliEMCALSDigitizer.h"
49#include "AliEMCALDigitizer.h"
5dee926e 50#include "AliEMCALDigit.h"
ee299369 51#include "AliEMCALRawUtils.h"
3294dade 52#include "AliCDBManager.h"
53#include "AliCDBEntry.h"
6cc75819 54#include "AliEMCALRawUtils.h"
55#include "AliRawReader.h"
56#include "AliEMCALTriggerData.h"
57#include "AliEMCALRecParam.h"
58#include "AliRawEventHeaderBase.h"
3294dade 59
2012850d 60ClassImp(AliEMCAL)
4884333f 61
6cc75819 62//for embedding
63AliEMCALRawUtils* AliEMCAL::fgRawUtils = 0; // EMCAL raw utilities class
64
2012850d 65//____________________________________________________________________________
18a21c7c 66AliEMCAL::AliEMCAL()
67 : AliDetector(),
68 fBirkC0(0),
69 fBirkC1(0.),
70 fBirkC2(0.),
c2ef87c2 71 fGeometry(0),
6cc75819 72 fCheckRunNumberAndGeoVersion(kTRUE),
73 fTriggerData(0x0)
2012850d 74{
05a92d59 75 // Default ctor
046ae904 76 fName = "EMCAL" ;
7235aed2 77 InitConstants();
6cc75819 78
23ef18ac 79 // Should call AliEMCALGeometry::GetInstance(EMCAL->GetTitle(),"") for getting EMCAL geometry
2012850d 80}
05a92d59 81
2012850d 82//____________________________________________________________________________
28135539 83AliEMCAL::AliEMCAL(const char* name, const char* title,
84 const Bool_t checkGeoAndRun)
18a21c7c 85 : AliDetector(name,title),
86 fBirkC0(0),
87 fBirkC1(0.),
88 fBirkC2(0.),
c2ef87c2 89 fGeometry(0),
28135539 90 fCheckRunNumberAndGeoVersion(checkGeoAndRun),
6cc75819 91 fTriggerData(0x0)
05a92d59 92{
93 // ctor : title is used to identify the layout
7235aed2 94 InitConstants();
6cc75819 95
0a4cb131 96}
97
98//____________________________________________________________________________
05a92d59 99AliEMCAL::~AliEMCAL()
100{
14ce0a6e 101 //dtor
6cc75819 102 delete fgRawUtils;
103 delete fTriggerData;
2012850d 104}
105
106//____________________________________________________________________________
7235aed2 107void AliEMCAL::InitConstants()
0a4cb131 108{
109 //initialize EMCAL values
110 fBirkC0 = 1;
111 fBirkC1 = 0.013/1.032;
112 fBirkC2 = 9.6e-6/(1.032 * 1.032);
050f9171 113}
0a4cb131 114
b8a520ff 115//Not needed, modify $ALICE_ROOT/data/galice.cuts instead.
116//Load the modified one in the configuration file with SetTransPar
117// //____________________________________________________________________________
118// void AliEMCAL::DefineMediumParameters()
119// {
120// //
121// // EMCAL cuts (Geant3)
122// //
123// Int_t * idtmed = fIdtmed->GetArray() - 1599 ;
124// // --- Set decent energy thresholds for gamma and electron tracking
125
126// // Tracking threshold for photons and electrons in Lead
127// Float_t cutgam=10.e-5; // 100 kev;
128// Float_t cutele=10.e-5; // 100 kev;
129// TString ntmp(GetTitle());
130// ntmp.ToUpper();
131// if(ntmp.Contains("10KEV")) {
132// cutele = cutgam = 1.e-5;
133// } else if(ntmp.Contains("50KEV")) {
134// cutele = cutgam = 5.e-5;
135// } else if(ntmp.Contains("100KEV")) {
136// cutele = cutgam = 1.e-4;
137// } else if(ntmp.Contains("200KEV")) {
138// cutele = cutgam = 2.e-4;
139// } else if(ntmp.Contains("500KEV")) {
140// cutele = cutgam = 5.e-4;
141// }
142
2942f542 143// TVirtualMC::GetMC()->Gstpar(idtmed[1600],"CUTGAM", cutgam);
144// TVirtualMC::GetMC()->Gstpar(idtmed[1600],"CUTELE", cutele); // 1MEV -> 0.1MEV; 15-aug-05
145// TVirtualMC::GetMC()->Gstpar(idtmed[1600],"BCUTE", cutgam); // BCUTE and BCUTM start from GUTGUM
146// TVirtualMC::GetMC()->Gstpar(idtmed[1600],"BCUTM", cutgam); // BCUTE and BCUTM start from GUTGUM
b8a520ff 147// // --- Generate explicitly delta rays in Lead ---
2942f542 148// TVirtualMC::GetMC()->Gstpar(idtmed[1600], "LOSS", 3) ;
149// TVirtualMC::GetMC()->Gstpar(idtmed[1600], "DRAY", 1) ;
150// TVirtualMC::GetMC()->Gstpar(idtmed[1600], "DCUTE", cutele) ;
151// TVirtualMC::GetMC()->Gstpar(idtmed[1600], "DCUTM", cutele) ;
b8a520ff 152
153// // --- in aluminium parts ---
2942f542 154// TVirtualMC::GetMC()->Gstpar(idtmed[1602],"CUTGAM", cutgam) ;
155// TVirtualMC::GetMC()->Gstpar(idtmed[1602],"CUTELE", cutele) ;
156// TVirtualMC::GetMC()->Gstpar(idtmed[1602],"BCUTE", cutgam); // BCUTE and BCUTM start from GUTGUM
157// TVirtualMC::GetMC()->Gstpar(idtmed[1602],"BCUTM", cutgam); // BCUTE and BCUTM start from GUTGUM
158// TVirtualMC::GetMC()->Gstpar(idtmed[1602], "LOSS",3.) ;
159// TVirtualMC::GetMC()->Gstpar(idtmed[1602], "DRAY",1.) ;
160// TVirtualMC::GetMC()->Gstpar(idtmed[1602], "DCUTE", cutele) ;
161// TVirtualMC::GetMC()->Gstpar(idtmed[1602], "DCUTM", cutele) ;
b8a520ff 162
163// // --- and finally thresholds for photons and electrons in the scintillator ---
2942f542 164// TVirtualMC::GetMC()->Gstpar(idtmed[1601],"CUTGAM", cutgam) ;
165// TVirtualMC::GetMC()->Gstpar(idtmed[1601],"CUTELE", cutele) ;// 1MEV -> 0.1MEV; 15-aug-05
166// TVirtualMC::GetMC()->Gstpar(idtmed[1601],"BCUTE", cutgam); // BCUTE and BCUTM start from GUTGUM
167// TVirtualMC::GetMC()->Gstpar(idtmed[1601],"BCUTM", cutgam); // BCUTE and BCUTM start from GUTGUM
168// TVirtualMC::GetMC()->Gstpar(idtmed[1601], "LOSS",3) ; // generate delta rays
169// TVirtualMC::GetMC()->Gstpar(idtmed[1601], "DRAY",1) ;
170// TVirtualMC::GetMC()->Gstpar(idtmed[1601], "DCUTE", cutele) ;
171// TVirtualMC::GetMC()->Gstpar(idtmed[1601], "DCUTM", cutele) ;
b8a520ff 172
173// // S steel -
2942f542 174// TVirtualMC::GetMC()->Gstpar(idtmed[1603],"CUTGAM", cutgam);
175// TVirtualMC::GetMC()->Gstpar(idtmed[1603],"CUTELE", cutele);
176// TVirtualMC::GetMC()->Gstpar(idtmed[1603],"BCUTE", cutgam); // BCUTE and BCUTM start from GUTGUM
177// TVirtualMC::GetMC()->Gstpar(idtmed[1603],"BCUTM", cutgam); // BCUTE and BCUTM start from GUTGUM
b8a520ff 178// // --- Generate explicitly delta rays
2942f542 179// TVirtualMC::GetMC()->Gstpar(idtmed[1603], "LOSS",3);
180// TVirtualMC::GetMC()->Gstpar(idtmed[1603], "DRAY",1);
181// TVirtualMC::GetMC()->Gstpar(idtmed[1603], "DCUTE", cutele) ;
182// TVirtualMC::GetMC()->Gstpar(idtmed[1603], "DCUTM", cutele) ;
b8a520ff 183
184// AliEMCALGeometry* geom = GetGeometry();
185// if(geom->GetILOSS()>=0) {
2942f542 186// for(int i=1600; i<=1603; i++) TVirtualMC::GetMC()->Gstpar(idtmed[i], "LOSS", geom->GetILOSS()) ;
b8a520ff 187// }
188// if(geom->GetIHADR()>=0) {
2942f542 189// for(int i=1600; i<=1603; i++) TVirtualMC::GetMC()->Gstpar(idtmed[i], "HADR", geom->GetIHADR()) ;
b8a520ff 190// }
191// }
7235aed2 192
193//____________________________________________________________________________
f21fc003 194AliDigitizer* AliEMCAL::CreateDigitizer(AliDigitizationInput* digInput) const
7235aed2 195{
196 //create and return the digitizer
f21fc003 197 return new AliEMCALDigitizer(digInput);
7235aed2 198}
199
200//____________________________________________________________________________
201void AliEMCAL::CreateMaterials()
202{
203 // Definitions of materials to build EMCAL and associated tracking media.
204 // media number in idtmed are 1599 to 1698.
205 // --- Air ---
206 Float_t aAir[4]={12.0107,14.0067,15.9994,39.948};
207 Float_t zAir[4]={6.,7.,8.,18.};
208 Float_t wAir[4]={0.000124,0.755267,0.231781,0.012827};
209 Float_t dAir = 1.20479E-3;
210 AliMixture(0, "Air$", aAir, zAir, dAir, 4, wAir) ;
211
212 // --- Lead ---
213 AliMaterial(1, "Pb$", 207.2, 82, 11.35, 0.56, 0., 0, 0) ;
214
215
216 // --- The polysterene scintillator (CH) ---
217 Float_t aP[2] = {12.011, 1.00794} ;
218 Float_t zP[2] = {6.0, 1.0} ;
219 Float_t wP[2] = {1.0, 1.0} ;
220 Float_t dP = 1.032 ;
221
222 AliMixture(2, "Polystyrene$", aP, zP, dP, -2, wP) ;
223
224 // --- Aluminium ---
225 AliMaterial(3, "Al$", 26.98, 13., 2.7, 8.9, 999., 0, 0) ;
226 // --- Absorption length is ignored ^
227
228 // 25-aug-04 by PAI - see PMD/AliPMDv0.cxx for STEEL definition
229 Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 };
230 Float_t zsteel[4] = { 26.,24.,28.,14. };
231 Float_t wsteel[4] = { .715,.18,.1,.005 };
232 AliMixture(4, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel);
233
3d841a9f 234 // Oct 26,2010 : Multipurpose Copy Paper UNV-21200), weiht 75 g/m**2.
235 // *Cellulose C6H10O5
236 // Component C A=12.01 Z=6. W=6./21.
237 // Component H A=1. Z=1. W=10./21.
238 // Component O A=16. Z=8. W=5./21.
239 Float_t apaper[3] = { 12.01, 1.0, 16.0};
fb3bd607 240 Float_t zpaper[3] = { 6.0, 1.0, 8.0};
3d841a9f 241 Float_t wpaper[3] = {6./21., 10./21., 5./21.};
242 AliMixture(5, "BondPaper$", apaper, zpaper, 0.75, 3, wpaper);
243
7235aed2 244 // DEFINITION OF THE TRACKING MEDIA
ce540969 245 // Look to the $ALICE_ROOT/data/galice.cuts for particular values
246 // of cuts.
247 // Don't forget to add a new tracking medium with non-default cuts
7235aed2 248
249 // for EMCAL: idtmed[1599->1698] equivalent to fIdtmed[0->100]
f7a1cc68 250 Int_t isxfld = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Integ() ;
251 Float_t sxmgmx = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Max() ;
7235aed2 252
253 // Air -> idtmed[1599]
254 AliMedium(0, "Air$", 0, 0,
255 isxfld, sxmgmx, 10.0, 1.0, 0.1, 0.1, 10.0, 0, 0) ;
256
257 // The Lead -> idtmed[1600]
258
259 AliMedium(1, "Lead$", 1, 0,
260 isxfld, sxmgmx, 10.0, 0.1, 0.1, 0.1, 0.1, 0, 0) ;
261
262 // The scintillator of the CPV made of Polystyrene scintillator -> idtmed[1601]
ee299369 263 float deemax = 0.1; // maximum fractional energy loss in one step (0 < DEEMAX < deemax )
7235aed2 264 AliMedium(2, "Scintillator$", 2, 1,
265 isxfld, sxmgmx, 10.0, 0.001, deemax, 0.001, 0.001, 0, 0) ;
266
267 // Various Aluminium parts made of Al -> idtmed[1602]
268 AliMedium(3, "Al$", 3, 0,
269 isxfld, sxmgmx, 10.0, 0.1, 0.1, 0.001, 0.001, 0, 0) ;
270
271 // 25-aug-04 by PAI : see PMD/AliPMDv0.cxx for STEEL definition -> idtmed[1603]
272 AliMedium(4, "S steel$", 4, 0,
3d841a9f 273 isxfld, sxmgmx, 10.0, 0.01, 0.1, 0.001, 0.001, 0, 0) ;
274
ce540969 275 // Oct 26,2010; Nov 24,2010 -> idtmed[1604]
276 deemax = 0.01;
3d841a9f 277 AliMedium(5, "Paper$", 5, 0,
ce540969 278 isxfld, sxmgmx, 10.0, deemax, 0.1, 0.001, 0.001, 0, 0) ;
7235aed2 279
89557f6d 280
ab37d09c 281 //set constants for Birk's Law implentation
282 fBirkC0 = 1;
283 fBirkC1 = 0.013/dP;
284 fBirkC2 = 9.6e-6/(dP * dP);
285
2012850d 286}
dde0a601 287
288//____________________________________________________________________________
289void AliEMCAL::Init()
b8a520ff 290{
291 // Init
292 //Not needed, modify $ALICE_ROOT/data/galice.cuts instead.
293 //Load the modified one in the configuration file with SetTransPar
294 //DefineMediumParameters();
dde0a601 295}
296
f51151a0 297//____________________________________________________________________________
ee299369 298void AliEMCAL::Digits2Raw() {
65bdc82f 299
300 static AliEMCALRawUtils rawUtils;
301 rawUtils.Digits2Raw();
302
2d5d9e60 303}
2d5d9e60 304//____________________________________________________________________________
8367ce9a 305void AliEMCAL::Hits2SDigits()
306{
307// create summable digits
308
ddca522a 309 GetGeometry();
4d33c797 310 AliEMCALSDigitizer emcalDigitizer(fLoader->GetRunLoader()->GetFileName().Data()) ;
311 emcalDigitizer.SetEventRange(0, -1) ; // do all the events
f21fc003 312 emcalDigitizer.Digitize() ;
da480a28 313}
314
6cc75819 315//______________________________________________________________________
316Bool_t AliEMCAL::Raw2SDigits(AliRawReader* rawReader){
317
318 // Conversion from raw data to EMCAL sdigits.
319 // Does the same as AliEMCALReconstructor::ConvertDigits()
320 // Needed to embed real data and simulation
321 // Works on a single-event basis
322
323 rawReader->Reset() ;
324
325 //Get/create the sdigits tree and array
326 AliRunLoader *rl = AliRunLoader::Instance();
1c67f0f5 327 AliEMCALLoader *emcalLoader = dynamic_cast<AliEMCALLoader*>(rl->GetDetectorLoader("EMCAL"));
328
329 if(!emcalLoader){
330 AliFatal("NULL loader");
331 return kFALSE;
332 }
333
6cc75819 334 emcalLoader->GetEvent();
335 emcalLoader->LoadSDigits("UPDATE");
336
337 TTree * treeS = emcalLoader->TreeS();
338 if ( !treeS ) {
339 emcalLoader->MakeSDigitsContainer();
340 treeS = emcalLoader->TreeS();
341 }
342
343 if(!emcalLoader->SDigits()) {
344 AliFatal("No sdigits array available\n");
345 return kFALSE;
346 }
347
348 TClonesArray * sdigits = emcalLoader->SDigits();
349 sdigits->Clear("C");
350
351 //Trigger sdigits
352 if(!fTriggerData)fTriggerData = new AliEMCALTriggerData();
353 fTriggerData->SetMode(1);
8cc543cb 354 const Int_t nTRU = GetGeometry()->GetNTotalTRU();
355 TClonesArray *digitsTrg = new TClonesArray("AliEMCALTriggerRawDigit", nTRU * 96);
6cc75819 356 Int_t bufsize = 32000;
357 treeS->Branch("EMTRG", &digitsTrg, bufsize);
358
359
360 //Only physics events
361 if (rawReader->GetType()== AliRawEventHeaderBase::kPhysicsEvent) {
362
363 if(!fgRawUtils) fgRawUtils = new AliEMCALRawUtils;
364 //must be done here because, in constructor, option is not yet known
365 fgRawUtils->SetOption(GetOption());
366
367 // Set parameters from OCDB to raw utils
368 AliEMCALRecParam* recpar = emcalLoader->ReconstructionParameters(0);
369 // fgRawUtils->SetRawFormatHighLowGainFactor(recpar->GetHighLowGainFactor());
370 // fgRawUtils->SetRawFormatOrder(recpar->GetOrderParameter());
371 // fgRawUtils->SetRawFormatTau(recpar->GetTau());
372 fgRawUtils->SetNoiseThreshold(recpar->GetNoiseThreshold());
373 fgRawUtils->SetNPedSamples(recpar->GetNPedSamples());
374 fgRawUtils->SetRemoveBadChannels(recpar->GetRemoveBadChannels());
375 fgRawUtils->SetFittingAlgorithm(recpar->GetFittingAlgorithm());
376 fgRawUtils->SetFALTROUsage(recpar->UseFALTRO());
377 // fgRawUtils->SetTimeMin(recpar->GetTimeMin());
378 // fgRawUtils->SetTimeMax(recpar->GetTimeMax());
379
380 //Fit
381 fgRawUtils->Raw2Digits(rawReader,sdigits,emcalLoader->PedestalData(),digitsTrg,fTriggerData);
382
383 }//skip calibration event
384 else{
385 AliDebug(1," Calibration Event, skip!");
386 }
387
388 //Final arrangements of the array, set all sdigits as embedded
389 sdigits->Sort() ;
390 for (Int_t iSDigit = 0 ; iSDigit < sdigits->GetEntriesFast() ; iSDigit++) {
391 AliEMCALDigit * sdigit = dynamic_cast<AliEMCALDigit *>(sdigits->At(iSDigit)) ;
392 if(sdigit){
393 sdigit->SetIndexInList(iSDigit) ;
394 sdigit->SetType(AliEMCALDigit::kEmbedded);
395 }
396 else {
397 AliFatal("sdigit is NULL!");
398 }
399 }
400
401 AliDebug(1,Form("Embedded sdigits entries %d \n",sdigits->GetEntriesFast()));
402
403 //Write array, clean arrays, unload ..
404
405 Int_t bufferSize = 32000 ;
406 TBranch * sdigitsBranch = treeS->GetBranch("EMCAL");
407 if (sdigitsBranch)
408 sdigitsBranch->SetAddress(&sdigits);
409 else
410 treeS->Branch("EMCAL",&sdigits,bufferSize);
411
412 treeS->Fill();
413 emcalLoader->WriteSDigits("OVERWRITE");
414 emcalLoader->UnloadSDigits();
415
416 digitsTrg->Delete();
417 delete digitsTrg;
418
419 return kTRUE;
420
421}
422
da480a28 423//____________________________________________________________________________
5dee926e 424
8367ce9a 425AliLoader* AliEMCAL::MakeLoader(const char* topfoldername)
426{
427//different behaviour than standard (singleton getter)
428// --> to be discussed and made eventually coherent
429 fLoader = new AliEMCALLoader(GetName(),topfoldername);
430 return fLoader;
431}
050f9171 432
433//____________________________________________________________________________
434
435AliEMCALGeometry* AliEMCAL::GetGeometry() const
436{
437 //Initializes and returns geometry
438
126215a5 439 // Pass the transpor model name (Geant3, Geant4, Fluka) and title to the geometry
440 TString mcname = "";
441 TString mctitle = "";
2942f542 442 if(TVirtualMC::GetMC()){
443 mcname = TVirtualMC::GetMC()->GetName() ;
444 mctitle = TVirtualMC::GetMC()->GetTitle() ;
126215a5 445 }
8ebbeb2b 446
447 TString geoName(GetTitle());
126215a5 448
050f9171 449 //Check if run number and requested geometry correspond to the same geometry as
450 //in real data taking. To prevent errors in official simulation productions
451 if(!(AliEMCALGeometry::GetInstance()))
452 {
126215a5 453 // Check the transport model name and option, set sampling fraction depending on it
050f9171 454 if(!fCheckRunNumberAndGeoVersion){// Set geometry with the name used in the configuration file
8ebbeb2b 455 AliInfo(Form("Geometry name in use <<%s>>, requested via Config file", geoName.Data()));
126215a5 456 return AliEMCALGeometry::GetInstance(GetTitle(),"EMCAL",mcname,mctitle) ;
050f9171 457 }
d7f5c01a 458 else
459 {//Check run number and version and set the corresponding one.
050f9171 460 //Get run number
461 //AliRunLoader *rl = AliRunLoader::Instance();
462 //Int_t runNumber = rl->GetRunNumber();
463
464 AliCDBManager* man = AliCDBManager::Instance();
465 Int_t runNumber = man->GetRun();
466
467 //Instanciate geometry depending on the run number
d7f5c01a 468 if(runNumber >= 104064 && runNumber < 140000 ){//2009-2010 runs
050f9171 469 //First year geometry, 4 SM.
470
d7f5c01a 471 if(!geoName.Contains("FIRSTYEARV1"))
472 {
050f9171 473 AliInfo(Form("*** ATTENTION *** \n \t Specified geometry name <<%s>> for run %d is not considered! \n \t In use <<EMCAL_FIRSTYEARV1>>, check run number and year \n ",
d7f5c01a 474 geoName.Data(),runNumber));
475 }
476 else
477 {
478 AliDebug(1,"Initialized geometry with name <<EMCAL_FIRSTYEARV1>>");
479 }
d7f5c01a 480
126215a5 481 return AliEMCALGeometry::GetInstance("EMCAL_FIRSTYEARV1","EMCAL",mcname,mctitle) ;// Set geometry with the name used in the configuration file
050f9171 482 }
d7f5c01a 483 else if(runNumber >= 140000 && runNumber <= 170593)
76f52296 484 {
485 //Almost complete EMCAL geometry, 10 SM. Year 2011 configuration
d7f5c01a 486
487 if(!geoName.Contains("COMPLETEV1"))
488 {
050f9171 489 AliInfo(Form("*** ATTENTION *** \n \t Specified geometry name <<%s>> for run %d is not considered! \n \t In use <<EMCAL_COMPLETEV1>>, check run number and year \n ",
d7f5c01a 490 geoName.Data(),runNumber));
491 }
492 else
493 {
494 AliDebug(1,"Initialized geometry with name <<EMCAL_COMPLETEV1>>");
495 }
76f52296 496
126215a5 497 return AliEMCALGeometry::GetInstance("EMCAL_COMPLETEV1","EMCAL",mcname,mctitle) ;// Set geometry with the name used in the configuration file
050f9171 498 }
24689e77 499 else if(runNumber > 176000 && runNumber <= 197692)
500 {
76f52296 501 //Complete EMCAL geometry, 12 SM. Year 2012 and on
24689e77 502 if(!geoName.Contains("COMPLETE12SMV1"))
503 {
8cc543cb 504 AliInfo(Form("*** ATTENTION *** \n \t Specified geometry name <<%s>> for run %d is not considered! \n \t In use <<EMCAL_COMPLETE12SMV1>>, check run number and year \n ", geoName.Data(),runNumber));
505 } else {
d7f5c01a 506 AliDebug(1,"Initialized geometry with name <<EMCAL_COMPLETE12SMV1>>");
507 }
24689e77 508
d7f5c01a 509 return AliEMCALGeometry::GetInstance("EMCAL_COMPLETE12SMV1","EMCAL",mcname,mctitle) ;// Set geometry with the name used in the configuration file
24689e77 510
511 }
512 else
513 {
514 //EMCAL + DCAL geometry, 20 SM. Year 2014 and on
515
516 if(geoName.Contains("DCAL_DEV"))
517 {
518 AliInfo("*** ATTENTION *** \n \t Set geometry name <<EMCAL_COMPLETE12SMV1_DCAL_DEV>> \n ");
519 return AliEMCALGeometry::GetInstance("EMCAL_COMPLETE12SMV1_DCAL_DEV","EMCAL",mcname,mctitle) ;
520 }
521 else if(geoName.Contains("DCAL_8SM"))
522 {
523 AliInfo("*** ATTENTION *** \n \t Set geometry name <<EMCAL_COMPLETE12SMV1_DCAL_8SM>> \n ");
524 return AliEMCALGeometry::GetInstance("EMCAL_COMPLETE12SMV1_DCAL_8SM","EMCAL",mcname,mctitle) ;
525 }
526
527 if(!geoName.Contains("COMPLETE12SMV1"))
528 {
529 AliInfo(Form("*** ATTENTION *** \n \t Specified geometry name <<%s>> for run %d is not considered! \n \t In use <<EMCAL_COMPLETE12SMV1>>, check run number and year \n ", geoName.Data(),runNumber));
530 }
531 else
532 {
533 AliDebug(1,"Initialized geometry with name <<EMCAL_COMPLETE12SMV1>>");
534 }
535
536 return AliEMCALGeometry::GetInstance("EMCAL_COMPLETE12SMV1_DCAL","EMCAL",mcname,mctitle) ;// Set geometry with the name used in the configuration file
d7f5c01a 537 }
050f9171 538 }
539 }// Init geometry for the first time
540
126215a5 541
050f9171 542 return AliEMCALGeometry::GetInstance();
543
544}