AliPhysics  vAN-20150630 (513c479)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
AliAnalysisTaskEMCALTimeCalib.h
Go to the documentation of this file.
1 #ifndef AliAnalysisTaskEMCALTimeCalib_h
2 #define AliAnalysisTaskEMCALTimeCalib_h
3 
4 //_________________________________________________________________________
28 //_________________________________________________________________________
29 
30 class TH1F;
31 class TH1D;
32 class TH2D;
33 
34 //class AliESDEvent;
35 //class AliESDCaloCluster;
36 //class AliAODCaloCluster;
37 class AliVCluster;
38 //class AliAODEvent;
39 class AliVEvent;
40 class AliTOFT0maker;
41 
42 #include "AliAnalysisTaskSE.h"
43 
44 class AliAnalysisTaskEMCALTimeCalib : public AliAnalysisTaskSE
45 {
46  public:
47 
48  enum { kNSM = 20, kNBCmask = 4 };
49 
50  AliAnalysisTaskEMCALTimeCalib() : AliAnalysisTaskSE(),
51  fEvent(0),
52  fRunNumber(-1),
53  fTOFmaker(0),
54  fOutputList(0),
55  fgeom(0),
56  fGeometryName(0),
59  fMinNcells(0),
60  fMaxNcells(0),
61  fMinLambda0(0),
62  fMaxLambda0(0),
63  fMaxRtrack(0),
64  fMinCellEnergy(0),
66  fPileupFromSPD(kFALSE),
67  fMinTime(0),
68  fMaxTime(0),
69  fhcalcEvtTime(0),
70  fhEventType(0),
72  fhTcellvsTOFT0(0),
74  fhTcellvsSM(0),
75  fhEneVsAbsIdHG(0),
76  fhEneVsAbsIdLG(0),
77  fhTimeVsBC(0),
78  fhTimeSumSq(),
79  fhTimeEnt(),
80  fhTimeSum(),
81  fhTimeLGSumSq(),
82  fhTimeLGEnt(),
83  fhTimeLGSum(),
85  fhTimeDsup(),
86  fhTimeDsupBC(),
95  { ; }
96 
97  AliAnalysisTaskEMCALTimeCalib(const char *name);
99 
100  virtual void LocalInit();
101  virtual Bool_t Notify();
102  virtual void UserCreateOutputObjects();
103  virtual void UserExec(Option_t *option);
104  virtual void Terminate(Option_t *);
105 
106  // Getters and setters
107  Double_t GetMinClusterEnergy() { return fMinClusterEnergy ; }
108  Double_t GetMaxClusterEnergy() { return fMaxClusterEnergy ; }
109  Int_t GetMinNcells() { return fMinNcells ; }
110  Int_t GetMaxNcells() { return fMaxNcells ; }
111  Double_t GetMinLambda0() { return fMinLambda0 ; }
112  Double_t GetMaxLambda0() { return fMaxLambda0 ; }
113  Double_t GetMaxRtrack() { return fMaxRtrack ; }
114  Double_t GetMinCellEnergy() { return fMinCellEnergy ; }
116  TString GetGeometryName() { return fGeometryName ; }
117  Double_t GetMinTime() { return fMinTime ; }
118  Double_t GetMaxTime() { return fMaxTime ; }
119 
120  void SetMinClusterEnergy (Double_t v) { fMinClusterEnergy = v ; }
121  void SetMaxClusterEnergy (Double_t v) { fMaxClusterEnergy = v ; }
122  void SetMinNcells (Int_t v) { fMinNcells = v ; }
123  void SetMaxNcells (Int_t v) { fMaxNcells = v ; }
124  void SetMinLambda0 (Double_t v) { fMinLambda0 = v ; }
125  void SetMaxLambda0 (Double_t v) { fMaxLambda0 = v ; }
126  void SetMaxRtrack (Double_t v) { fMaxRtrack = v ; }
127  void SetMinCellEnergy (Double_t v) { fMinCellEnergy = v ; }
128  void SetReferenceFileName(TString v) { fReferenceFileName= v ; }
129  void SetGeometryName (TString v) { fGeometryName = v ; }
130  void SetMinTime (Double_t v) { fMinTime = v ; }
131  void SetMaxTime (Double_t v) { fMaxTime = v ; }
132 
133  // Switches
136 
137 
138  void SetDefaultCuts();
139  void ProduceCalibConsts(TString inputFile="time186319testWOL0.root",TString outputFile="Reference.root");
140 
141  private:
142 
143  virtual void PrepareTOFT0maker();
144  Bool_t SetEMCalGeometry();
145  Bool_t AcceptCluster(AliVCluster* clus);
146  Bool_t CheckCellRCU(Int_t nSupMod,Int_t icol,Int_t irow);
147 
148  // data members
149 
151  AliVEvent *fEvent ; //->
152 
153  Int_t fRunNumber ;
154 
155  // Use the RemakePID method in the task::UserExec //
156  // Double_t* calcolot0; //
157  // calcolot0=fTOFmaker->RemakePID(fEvent); //
158  // calcolot0[0] = calculated event time //
159 
161  AliTOFT0maker *fTOFmaker; //->
162 
164  TList *fOutputList; //->
165 
167  AliEMCALGeometry *fgeom; //->
168  TString fGeometryName ;
169 
170  // setable variables for cuts
171 
172  Double_t fMinClusterEnergy ;
173  Double_t fMaxClusterEnergy ;
174 
175  Int_t fMinNcells ;
176  Int_t fMaxNcells ;
177 
178  Double_t fMinLambda0 ;
179  Double_t fMaxLambda0 ;
180 
181  Double_t fMaxRtrack ;
182 
183  Double_t fMinCellEnergy;
184 
186 
187  Bool_t fPileupFromSPD ;
188 
189  Double_t fMinTime ;
190  Double_t fMaxTime ;
191 
192 
193  // histograms
195  TH1F *fhEventType;
199  TH2F *fhTcellvsSM;
202  TH2F *fhTimeVsBC;
203 
204  // histos for storing the time values per cell for further averaging;
206  TH1F *fhTimeEnt [kNBCmask];
207  TH1F *fhTimeSum [kNBCmask];
211 
212  // control histos
214  TH2F *fhTimeDsup [kNSM];
216 
217  //main histos for raw time
226 
229 
232 
234  ClassDef(AliAnalysisTaskEMCALTimeCalib, 1) ;
236 };
237 
238 #endif
Bool_t SetEMCalGeometry()
Set the EMCal Geometry.
TH1F * fhRawTimeEntriesLGBC[kNBCmask]
! 4 BCmask LG
TH2F * fhEneVsAbsIdHG
! energy of each cell for high gain cells with strange time
TH1F * fhRawTimeSumLGBC[kNBCmask]
! 4 BCmask LG
Bool_t AcceptCluster(AliVCluster *clus)
Selection criteria of good cluster are set here.
TH2F * fhRawTimeVsIdBC[kNBCmask]
! 4 BCmask HG
TH1F * fhRawTimeSumSqBC[kNBCmask]
! 4 BCmask HG
Double_t fMinLambda0
minimum cluster lambda0
TH1F * fhcalcEvtTime
! spectrum calcolot0[0]
Double_t fMinTime
minimum cluster time after correction
AliTOFT0maker * fTOFmaker
pointer to get T0 from TOF
void SetDefaultCuts()
Set default cuts for calibration.
AliAnalysisTaskEMCALTimeCalib & operator=(const AliAnalysisTaskEMCALTimeCalib &)
Assignment operator not implemented.
TH1F * fhRawTimeSumSqLGBC[kNBCmask]
! 4 BCmask LG
Double_t fMaxRtrack
maximum cluster track distance
Double_t fMaxLambda0
maximum cluster lambda0
AliEMCALGeometry * fgeom
pointer to EMCal geometry
TH2F * fhTcellvsTOFT0HD
! time of cell vs TOF T0 time for higher energy threshold
Double_t fMaxTime
maximum cluster time after correction
Double_t fMinClusterEnergy
minimum cluster energy
TString fReferenceFileName
! name of reference file
Int_t fMaxNcells
maximum number of cells in cluster
virtual void UserExec(Option_t *option)
Main loop executed for each event.
virtual void PrepareTOFT0maker()
Get T0 time from TOF.
TH1F * fhTOFT0vsEventNumber
! TOF T0 evolution as a function of time
Bool_t fPileupFromSPD
flag to set PileupFromSPD
TH1F * fhRawTimeSumBC[kNBCmask]
! 4 BCmask HG
Double_t fMinCellEnergy
minimum cell energy
Int_t fMinNcells
minimum number of cells in cluster
Task to work on Time Calibration for EMCal/DCal.
AliVEvent * fEvent
pointer to ESD or AOD object
Double_t fMaxClusterEnergy
maximum cluster energy
TH2F * fhTcellvsTOFT0
! time of cell vs TOF T0 time
TH2F * fhEneVsAbsIdLG
! energy of each cell for low gain cells with strange time
TList * fOutputList
pointer to output list
TH1F * fhRawTimeEntriesBC[kNBCmask]
! 4 BCmask HG
TH1F * fhEventType
! spectrum calcolot0[0]
Bool_t CheckCellRCU(Int_t nSupMod, Int_t icol, Int_t irow)
Check RCU for cell given by Super Module, column index, row index.
TH2F * fhRawTimeVsIdLGBC[kNBCmask]
! 4 BCmask LG
void ProduceCalibConsts(TString inputFile="time186319testWOL0.root", TString outputFile="Reference.root")
TH1D * fhAllAverageBC[kNBCmask]
! 4 BCmask
TH2F * fhTimeDsupBC[kNSM][kNBCmask]
! 20 x 4