AliPhysics  a4b41ad (a4b41ad)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskEMCALClusterize.h
Go to the documentation of this file.
1 #ifndef ALIANALYSISTASKEMCALCLUSTERIZE_H
2 #define ALIANALYSISTASKEMCALCLUSTERIZE_H
3 
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice */
6 
7 //_________________________________________________________________________
17 //_________________________________________________________________________
18 
19 // Root
20 class TTree;
21 class TClonesArray;
22 
23 // EMCAL
24 class AliEMCALGeometry;
25 class AliEMCALClusterizer;
26 class AliEMCALAfterBurnerUF;
27 class AliEMCALRecPoint;
28 class AliAODCaloCluster;
29 class AliCentrality;
30 class AliMultSelection;
31 
32 #include "AliEMCALRecParam.h"
33 #include "AliEMCALRecoUtils.h"
34 
35 #include "AliAnalysisTaskSE.h"
36 
38 
39  public:
40 
42  AliAnalysisTaskEMCALClusterize(const char *name);
44 
45  virtual void UserCreateOutputObjects();
46  virtual void UserExec(Option_t *option);
47  virtual void Init();
48  virtual void LocalInit() { Init() ; }
49 
50  // Event methods, settings
51 
56  void SetEMCALNcellsCut(Int_t cut) { fEMCALNcellsCut = cut ; }
57 
60 
61  void CheckAndGetEvent();
62 
66 
67  Bool_t IsLEDEvent(const Int_t run);
70 
71  // OCDB, avoid acessing OCDB!
72 
74  void SwitchOnAccessOCDB() { fAccessOCDB = kTRUE ; }
75  void SwitchOffAccessOCDB() { fAccessOCDB = kFALSE ; }
76  void SetOCDBPath(const char *path) { fOCDBpath = path ; }
77 
78  // Geometry methods
79 
80  void InitGeometry();
81  void SetGeometryName(TString &name) { fGeomName = name ; }
82  TString GeometryName() const { return fGeomName ; }
85  void SetGeometryMatrixInSM(TGeoHMatrix* m, Int_t i) { fGeomMatrix[i] = m ; }
86 
88  TString pa = "") { fImportGeometryFromFile = im ;
89  fImportGeometryFilePath = pa ; }
90  // Outout AOD branch methods
91 
93  void FillAODFile(Bool_t yesno) { fFillAODFile = yesno ; }
94  void FillAODCaloCells();
95  void FillAODHeader();
97  void SwitchOffFillAODHeader() { fFillAODHeader = kFALSE ; }
100 
103 
104  // Algorithms settings
105 
106  AliEMCALRecParam * GetRecParam() { if(!fRecParam) fRecParam = new AliEMCALRecParam ;
107  return fRecParam ; }
108 
109  AliEMCALRecoUtils* GetRecoUtils() { if(!fRecoUtils) fRecoUtils = new AliEMCALRecoUtils ;
110  return fRecoUtils ; }
111 
112  void InitClusterization();
113  void ClusterizeCells();
114  void ClusterUnfolding();
115  void JustUnfold(Bool_t yesno) { fJustUnfold = yesno ; }
116 
117  void SetConfigFileName(TString name) { fConfigName = name ; }
118  void SetMaxEvent(Int_t max) { fMaxEvent = max ; }
119 
122 
123  // Cell selection after unfolding
124 
128  fSelectCellMinFrac = frac ; }
130 
131  // OADB options settings
132 
133  void AccessOADB() ;
134 
135  TString GetPass() ;
136 
137  void SwitchOnEMCALOADB() { fAccessOADB = kTRUE ; }
138  void SwitchOffEMCALOADB() { fAccessOADB = kFALSE ; }
139 
140  void SetOADBFilePath(TString path) { fOADBFilePath = path ; }
141 
143 
144  // Centrality selection
145 
146  AliCentrality* GetCentrality() const { return InputEvent()->GetCentrality() ; }
147  AliMultSelection* GetMultSelCen() const { return (AliMultSelection * ) InputEvent()->FindListObject("MultSelection") ; }
150 
153  Float_t GetEventCentrality() const ;
154  void SetCentralityBin(Int_t min, Int_t max) //Set the centrality bin to select the event. If used, then need to get percentile
155  { fCentralityBin[0]=min ; fCentralityBin[1]=max ; }
156  Float_t GetCentralityBin(Int_t i) const { if(i < 0 || i > 1) return -1 ;
157  else return fCentralityBin[i] ; }
158 
159  // MC label properly assignation methods
160 
161  void RemapMCLabelForAODs(Int_t &label);
164 
165  void SetClustersMCLabelFrom2SelectedLabels(AliEMCALRecPoint* recPoint, AliAODCaloCluster *clus) ;
166  void SetClustersMCLabelFromOriginalClusters(AliAODCaloCluster * clus) ;
167 
170 
174 
175 private:
176 
177  virtual void FillCaloClusterInEvent();
178 
179  virtual void RecPoints2Clusters();
180 
181  virtual void ResetArrays();
182 
183  AliVEvent *fEvent;
184 
185  // Geometry
186  AliEMCALGeometry *fGeom;
188  TGeoHMatrix *fGeomMatrix[22];
191 
192  // OCDB
195 
196  // Temporal arrays
197  TClonesArray *fDigitsArr;
200 
201  // Clusterizers
202  AliEMCALRecParam *fRecParam;
203  AliEMCALClusterizer *fClusterizer;
204  AliEMCALAfterBurnerUF *fUnfolder;
206 
207  // AOD
208  TClonesArray *fOutputAODBranch;
215 
217 
218  AliEMCALRecoUtils* fRecoUtils;
220 
221  static const Int_t fgkNEMCalCells = 17664;
222 
229 
231 
233 
241 
244 
249 
250  // Centrality
254 
255  // Event selection with some signal in EMCAL
259 
265 
269 
271 
273 
276 
279 
281  ClassDef(AliAnalysisTaskEMCALClusterize, 32) ;
283 
284 };
285 
286 #endif //ALIANALYSISTASKEMCALCLUSTERIZE_H
void FillAODCaloCells()
Put calo cells in standard branch.
double Double_t
Definition: External.C:58
virtual void ResetArrays()
Reset arrays containing information for all possible cells.
void SetCellCuts(Float_t e, Float_t frac)
TString GetPass()
Get or guess pass number/string from path of filename.
Bool_t fFillAODHeader
Copy header to standard branch.
TClonesArray * fDigitsArr
! Digits array
AliEMCALClusterizer * fClusterizer
! EMCAL clusterizer
Bool_t fJustUnfold
Just unfold, do not recluster.
Bool_t fImportGeometryFromFile
Import geometry settings in geometry.root file.
Bool_t fSelectCell
Reject cells from cluster if energy is too low and recalculate position/energy and other...
TString fConfigName
Name of analysis configuration file.
Int_t fCellSecondLabels[fgkNEMCalCells]
Array with Second MC label to be passed to digit.
void SetClustersMCLabelFrom2SelectedLabels(AliEMCALRecPoint *recPoint, AliAODCaloCluster *clus)
Float_t fCellMatchdEta[fgkNEMCalCells]
Array with cluster-track dPhi.
TClonesArray * fOutputAODBranch
! AOD Branch with output clusters
TString fOADBFilePath
Default path $ALICE_PHYSICS/OADB/EMCAL, if needed change.
TString fImportGeometryFilePath
path fo geometry.root file
Bool_t fSelectEMCALEvent
Process the event if there is some high energy cluster.
Float_t GetEventCentrality() const
Get centrality/multiplicity percentile.
Bool_t fInputFromFilter
Get the input from AODs from the filter.
TString fOutputAODBranchName
New of output AOD branch.
AliEMCALGeometry * fGeom
EMCAL geometry.
void ClusterUnfolding()
Take the event clusters and unfold them.
int Int_t
Definition: External.C:63
Bool_t fAccessOADB
Get calibration from OADB for EMCAL.
Bool_t fRemoveLEDEvents
Remove LED events, use only for LHC11a.
AliEMCALRecoUtils * fRecoUtils
Access to factorized reconstruction algorithms.
float Float_t
Definition: External.C:68
Bool_t fRejectBelowThreshold
split (false-default) or reject (true) cell energy below threshold after UF
Float_t fConstantTimeShift
Apply a 600 ns time shift in case of simulation, shift in ns.
void SetClustersMCLabelFromOriginalClusters(AliAODCaloCluster *clus)
Float_t fSelectCellMinE
Min energy cell threshold, after unfolding.
Bool_t fOADBSet
AODB parameters already set.
Int_t fCellLabels[fgkNEMCalCells]
Array with MC label to be passed to digit.
Bool_t fRemoveExoticEvents
Remove exotic events.
Bool_t fDoTrackMatching
On/Off the matching recalulation to speed up analysis in PbPb.
Float_t fCellMatchdPhi[fgkNEMCalCells]
Array with cluster-track dEta.
TGeoHMatrix * fGeomMatrix[22]
Geometry matrices with alignments.
Bool_t IsLEDEvent(const Int_t run)
Check if event is LED, is so remove it. Affected LHC11a runs.
AliEMCALRecParam * fRecParam
Reconstruction parameters container.
TString fGeomName
Name of geometry to use.
Bool_t fOutputAODBranchSet
Set the AOD clusters branch in the input event once.
TString fOCDBpath
Path with OCDB location.
AliEMCALAfterBurnerUF * fUnfolder
! Unfolding procedure
Bool_t fGeomMatrixSet
Set geometry matrices only once, for the first event.
Float_t fCentralityBin[2]
Minimum and maximum value of the centrality for the analysis.
Bool_t fFillAODCaloCells
Copy calocells to standard branch.
TObjArray * fCaloClusterArr
! CaloClusters array
Double_t fCellTime[fgkNEMCalCells]
Array with cluster time to be passed to digit in case of AODs.
TString fCentralityClass
Name of selected centrality class.
void SetImportGeometryFromFile(Bool_t im, TString pa="")
Bool_t fAccessOCDB
Need to access info from OCDB (not really)
AliAnalysisTaskEMCALClusterize & operator=(const AliAnalysisTaskEMCALClusterize &)
Assignment operator not implemented.
TObjArray * fClusterArr
! Recpoints array
Bool_t fRecalibrateWithClusterTime
Use fCellTime to store time of cells in cluster.
const char Option_t
Definition: External.C:48
bool Bool_t
Definition: External.C:53
void FillAODHeader()
Put event header information in standard AOD branch.
static const Int_t fgkNEMCalCells
Total number of cells in the calorimeter, 10*48*24 (EMCal) + 4*48*8 (EMCal/DCal 1/3) + 6*32*24 (DCal)...
Int_t fEMCALNcellsCut
At least an EMCAL cluster with fNCellsCut cells over fEnergyCut.
void SetGeometryMatrixInSM(TGeoHMatrix *m, Int_t i)
Reclusterize EMCal clusters, put them in a new branch for other following analysis.
Bool_t fLoadGeomMatrices
Matrices set from configuration, not get from geometry.root or from ESDs/AODs.
Float_t fEMCALEnergyCut
At least an EMCAL cluster with this energy in the event.
Bool_t fUseAliCentrality
Use the centrality estimator from AliCentrality or AliMultSelection.
Int_t fOrgClusterCellId[fgkNEMCalCells]
Array ID of cluster to wich the cell belongs in unmodified clusters.
Float_t fSelectCellMinFrac
Min fraction of cell energy after unfolding cut.
Bool_t reject
Bool_t fRemapMCLabelForAODs
Remap AOD cells MC label. Needed in old AOD productions.