]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - EMCAL/AliEMCALLoader.h
Adapt macro of D meson v2 with event plane to new centrality binning + add syst unc...
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALLoader.h
... / ...
CommitLineData
1#ifndef ALIEMCALLOADER_H
2#define ALIEMCALLOADER_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
8//_________________________________________________________________________
9// The AliEMCALLoader gets the TClonesArray and TObjArray for reading
10// Hits, Dgits, SDigits and RecPoints. Filling is managed in the GetEvent()
11// method. The objects are retrived from the corresponding folders.
12//
13// It also provides acces methods to the calibration and simulation OCDB parameters
14//
15
16//*-- Author: Yves Schutz (SUBATECH) & Dmitri Peressounko (RRC KI & SUBATECH)
17//
18
19
20// --- ROOT system ---
21#include "TClonesArray.h"
22#include "TFolder.h"
23#include "TTree.h"
24class TString ;
25class TParticle ;
26
27// --- AliRoot header files ---
28#include "AliLoader.h"
29#include "AliEMCALCalibData.h"
30#include "AliCaloCalibPedestal.h"
31#include "AliEMCALSimParam.h"
32#include "AliEMCALRecParam.h"
33
34class AliLoader ;
35class AliEMCAL ;
36class AliEMCALDigit ;
37class AliEMCALSDigit ;
38class AliEMCALRecPoint ;
39
40class AliEMCALLoader : public AliLoader {
41
42 public:
43
44 AliEMCALLoader();
45 AliEMCALLoader(const Char_t *detname,const Char_t *eventfoldername);
46 AliEMCALLoader(const Char_t *name,TFolder *topfolder);
47
48 virtual ~AliEMCALLoader() ;
49
50 virtual Int_t GetEvent(); // Overload to fill TClonesArray
51
52 //Clean arrays methods
53 virtual void CleanHits() const {GetHitsDataLoader()->Clean();}
54 virtual void CleanSDigits() const {GetSDigitsDataLoader()->Clean();}
55 virtual void CleanDigits() const {GetDigitsDataLoader()->Clean();}
56 virtual void CleanRecPoints() const {GetRecPointsDataLoader()->Clean();}
57
58 // Initialize arrays methods
59 void MakeSDigitsArray() ;
60 void MakeDigitsArray() ;
61 void MakeRecPointsArray() ;
62
63 // ************ TClonesArrays Access functions
64
65 TClonesArray* SDigits() {return (TClonesArray*)GetDetectorData(fgkECASDigitsBranchName);} //const { return fSDigits;}
66 const AliEMCALDigit* SDigit(Int_t index) {
67 if (SDigits())return (const AliEMCALDigit*) SDigits()->At(index);
68 return 0x0;
69 }
70
71 TClonesArray* Digits() {return (TClonesArray*)GetDetectorData(fgkECADigitsBranchName);}//const { return fDigits;}
72 const AliEMCALDigit * Digit(Int_t index) {
73 if (Digits()) return (const AliEMCALDigit*) Digits()->At(index);
74 return 0x0;
75 }
76
77 TObjArray * RecPoints() {return (TObjArray*)GetDetectorData(fgkECARecPointsBranchName);}//const { return fRecPoints;}
78 const AliEMCALRecPoint * RecPoint(Int_t index) {
79 if (RecPoints())return (const AliEMCALRecPoint*) RecPoints()->At(index);
80 return 0x0;
81 }
82
83 void SetDebug(Int_t level) {fDebug = level;} // Set debug level
84
85 //OCDB access methods
86
87 void SetCalibData(AliEMCALCalibData* calibda) { fgCalibData = calibda; }
88 AliEMCALCalibData * CalibData(); // to get the calibration CDB object
89
90 void SetPedestalData(AliCaloCalibPedestal* caloped) { fgCaloPed = caloped; }
91 AliCaloCalibPedestal* PedestalData(); // to get the pedestal CDB object
92
93 void SetSimParam(AliEMCALSimParam* simparam) { fgSimParam = simparam; }
94 AliEMCALSimParam* SimulationParameters(); // to get the simulation parameter CDB object
95
96 void SetRecParam(AliEMCALRecParam* recparam) { fgRecParam = recparam; }
97 AliEMCALRecParam* ReconstructionParameters(Int_t eventType); // to get the reconstruction parameter CDB object
98
99 private:
100
101 // assignement operator requested by coding convention, but not needed
102 AliEMCALLoader(const AliEMCALLoader &); //Not implemented
103 const AliEMCALLoader & operator = (const AliEMCALLoader &); //Not implemented
104
105 static const TString fgkECASDigitsBranchName; //! Name of branch with ECA SDigits
106 static const TString fgkECADigitsBranchName; //! Name of branch with ECA Digits
107 static const TString fgkECARecPointsBranchName; //! Name of branch with ECA Reconstructed Points
108
109 Int_t fDebug ; // Debug level
110
111 static AliEMCALCalibData * fgCalibData; // calibration data
112 static AliCaloCalibPedestal * fgCaloPed; // dead map
113 static AliEMCALSimParam * fgSimParam; // sim param
114 static AliEMCALRecParam * fgRecParam; // rec param
115
116 ClassDef(AliEMCALLoader,7) // Algorithm class that provides methods to retrieve objects from a list knowing the index
117
118};
119
120#endif // AliEMCALLOADER_H