AliPhysics  b1a33bd (b1a33bd)
 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  fhcalcEvtTime(0),
67  fhEventType(0),
69  fhTcellvsTOFT0(0),
71  fhTcellvsSM(0),
72  fhEneVsAbsIdHG(0),
73  fhEneVsAbsIdLG(0),
74  fhTimeVsBC(0),
75  fhTimeSumSq(),
76  fhTimeEnt(),
77  fhTimeSum(),
79  fhTimeDsup(),
80  fhTimeDsupBC(),
89  { ; }
90 
91  AliAnalysisTaskEMCALTimeCalib(const char *name);
93 
94  virtual void LocalInit();
95  virtual Bool_t Notify();
96  virtual void UserCreateOutputObjects();
97  virtual void UserExec(Option_t *option);
98  virtual void Terminate(Option_t *);
99 
100  // Getters and setters
101  Double_t GetMinClusterEnergy() { return fMinClusterEnergy ; }
102  Double_t GetMaxClusterEnergy() { return fMaxClusterEnergy ; }
103  Int_t GetMinNcells() { return fMinNcells ; }
104  Int_t GetMaxNcells() { return fMaxNcells ; }
105  Double_t GetMinLambda0() { return fMinLambda0 ; }
106  Double_t GetMaxLambda0() { return fMaxLambda0 ; }
107  Double_t GetMaxRtrack() { return fMaxRtrack ; }
108  Double_t GetMinCellEnergy() { return fMinCellEnergy ; }
110  TString GetGeometryName() { return fGeometryName ; }
111 
112  void SetMinClusterEnergy (Double_t v) { fMinClusterEnergy = v ; }
113  void SetMaxClusterEnergy (Double_t v) { fMaxClusterEnergy = v ; }
114  void SetMinNcells (Int_t v) { fMinNcells = v ; }
115  void SetMaxNcells (Int_t v) { fMaxNcells = v ; }
116  void SetMinLambda0 (Double_t v) { fMinLambda0 = v ; }
117  void SetMaxLambda0 (Double_t v) { fMaxLambda0 = v ; }
118  void SetMaxRtrack (Double_t v) { fMaxRtrack = v ; }
119  void SetMinCellEnergy (Double_t v) { fMinCellEnergy = v ; }
120  void SetReferenceFileName(TString v) { fReferenceFileName= v ; }
121  void SetGeometryName (TString v) { fGeometryName = v ; }
122 
123  void SetDefaultCuts();
124 
125  private:
126 
127  virtual void PrepareTOFT0maker();
128  Bool_t SetEMCalGeometry();
129  //Bool_t AcceptCluster(AliESDCaloCluster* clus);
130  Bool_t AcceptCluster(AliVCluster* clus);
131  Bool_t CheckCellRCU(Int_t nSupMod,Int_t icol,Int_t irow);
132  void ProduceCalibConsts(TString inputFile="time186319testWOL0.root",TString outputFile="Reference.root");
133 
134  // data members
135 
137  AliVEvent *fEvent ; //->
138  //AliESDEvent *fESD ; //->
139 
140  Int_t fRunNumber ;
141 
142  // Use the RemakePID method in the task::UserExec //
143  // Double_t* calcolot0; //
144  // calcolot0=fTOFmaker->RemakePID(fEvent); //
145  // calcolot0[0] = calculated event time //
146 
148  AliTOFT0maker *fTOFmaker; //->
149 
151  TList *fOutputList; //->
152 
154  AliEMCALGeometry *fgeom; //->
155  TString fGeometryName ;
156 
157  // setable variables for cuts
158 
159  Double_t fMinClusterEnergy ;
160  Double_t fMaxClusterEnergy ;
161 
162  Int_t fMinNcells ;
163  Int_t fMaxNcells ;
164 
165  Double_t fMinLambda0 ;
166  Double_t fMaxLambda0 ;
167 
168  Double_t fMaxRtrack ;
169 
170  Double_t fMinCellEnergy;
171 
173 
174  // histograms
176  TH1F *fhEventType;
180  TH2F *fhTcellvsSM;
183  TH2F *fhTimeVsBC;
184 
185  // histos for storing the time values per cell for further averaging;
187  TH1F *fhTimeEnt [kNBCmask];
188  TH1F *fhTimeSum [kNBCmask];
189 
190  // control histos
192  TH2F *fhTimeDsup [kNSM];
194 
195  //main histos
204 
207 
210 
212  ClassDef(AliAnalysisTaskEMCALTimeCalib, 1) ;
214 };
215 
216 #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]
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 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
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