]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG4/CaloCalib/AliAnalysisTaskEMCALClusterize.h
check if emcal is active
[u/mrichter/AliRoot.git] / PWG4 / CaloCalib / AliAnalysisTaskEMCALClusterize.h
CommitLineData
37d2296c 1#ifndef ALIANALYSISTASKEMCALCLUSTERIZE_H
2#define ALIANALYSISTASKEMCALCLUSTERIZE_H
3
4// This analysis provides a new list of clusters to be used in other analysis
5// Author: Gustavo Conesa Balbastre,
6// Adapted from analysis class from Deepa Thomas
7
8//Root
9class TTree;
10class TClonesArray;
11
12//EMCAL
13class AliEMCALGeometry;
14class AliEMCALCalibData;
15class AliCaloCalibPedestal;
16class AliEMCALClusterizer;
17class AliEMCALAfterBurnerUF;
18class AliEMCALRecParam;
19class AliEMCALRecoUtils;
20
21
22#include "AliAnalysisTaskSE.h"
23
24class AliAnalysisTaskEMCALClusterize : public AliAnalysisTaskSE {
25 public:
26 AliAnalysisTaskEMCALClusterize();
27 AliAnalysisTaskEMCALClusterize(const char *name);
28 virtual ~AliAnalysisTaskEMCALClusterize();
29
30 private:
31 AliAnalysisTaskEMCALClusterize(const AliAnalysisTaskEMCALClusterize&);
32 AliAnalysisTaskEMCALClusterize& operator=(const AliAnalysisTaskEMCALClusterize&); // not implemented
33
34 public:
35 virtual void UserCreateOutputObjects();
36 virtual void UserExec(Option_t *option);
37 virtual void Init();
38 virtual void LocalInit() { Init() ; }
39 Bool_t AccessOCDB();
40
41 void SetOCDBPath(const char *path) { fOCDBpath = path ; }
42
43 //Geometry methods
44 void SetGeometryName(TString &name) { fGeomName = name ; }
45 TString GeometryName() const { return fGeomName ; }
46 void SwitchOnLoadOwnGeometryMatrices() { fLoadGeomMatrices = kTRUE ; }
47 void SwitchOffLoadOwnGeometryMatrices() { fLoadGeomMatrices = kFALSE ; }
48 void SetGeometryMatrixInSM(TGeoHMatrix* m, Int_t i) { fGeomMatrix[i] = m ; }
49
50 //AOD methods
51 void SetAODBranchName(TString &name) { fOutputAODBranchName = name ; }
52 void FillAODFile(Bool_t yesno) { fFillAODFile = yesno ; }
1f77507b 53 void FillAODCaloCells();
54 void FillAODHeader();
55 void SwitchOnFillAODHeader() { fFillAODHeader = kTRUE ; }
56 void SwitchOffFillAODHeader() { fFillAODHeader = kFALSE ; }
57 void SwitchOnFillAODCaloCells() { fFillAODCaloCells = kTRUE ; }
58 void SwitchOffFillAODCaloCells() { fFillAODCaloCells = kFALSE ; }
37d2296c 59
60 //Algorithms settings
61 void JustUnfold(Bool_t yesno) { fJustUnfold = yesno ; }
62 AliEMCALRecParam * GetRecParam() const { return fRecParam ; }
63 void InitClusterization();
64
1f77507b 65 void SetEMCALRecoUtils(AliEMCALRecoUtils * ru) { fRecoUtils = ru ; }
37d2296c 66 AliEMCALRecoUtils* GetRecoUtils() const { return fRecoUtils ; }
67
68 void SetConfigFileName(TString name) { fConfigName = name ; }
1f77507b 69 void SetMaxEvent(Int_t max) { fMaxEvent = max ; }
37d2296c 70
71 private:
72
73 virtual void RecPoints2Clusters(TClonesArray *fdigitsArr, TObjArray *fRecPoints, TObjArray *clusArray);
74
75 //Geometry
76 AliEMCALGeometry *fGeom; // EMCAL geometry
77 TString fGeomName; // Name of geometry to use.
78 TGeoHMatrix *fGeomMatrix[10]; // Geometry matrices with alignments
79 Bool_t fGeomMatrixSet; // Set geometry matrices only once, for the first event.
80 Bool_t fLoadGeomMatrices; // Matrices set from configuration, not get from geometry.root or from ESDs/AODs
81
82 //OCDB
83 AliEMCALCalibData *fCalibData; // EMCAL calib data
84 AliCaloCalibPedestal *fPedestalData; // EMCAL pedestal
85 TString fOCDBpath; // Path with OCDB location
86
87 //Temporal arrays
88 TClonesArray *fDigitsArr; //-> Digits array
89 TObjArray *fClusterArr; //-> Recpoints array
90 TObjArray *fCaloClusterArr; //-> CaloClusters array
91
92 //Clusterizers
93 AliEMCALRecParam *fRecParam; // Reconstruction parameters container
94 AliEMCALClusterizer *fClusterizer; //! EMCAL clusterizer
95 AliEMCALAfterBurnerUF *fUnfolder; //! Unfolding procedure
96 Bool_t fJustUnfold; // Just unfold, do not recluster
97
98 //AOD
99 TClonesArray *fOutputAODBranch; //! AOD Branch with output clusters
100 TString fOutputAODBranchName; // New of output AOD branch
101 Bool_t fFillAODFile; // Fill the output AOD file with the new clusters,
102 // if not they will be only available for the event they were generated
1f77507b 103 Bool_t fFillAODHeader; // Copy header to standard branch
104 Bool_t fFillAODCaloCells; // Copy calocells to standard branch
105
37d2296c 106 Int_t fRun; //!run number
107
108 AliEMCALRecoUtils* fRecoUtils; // Access to factorized reconstruction algorithms
109 TString fConfigName; // Name of analysis configuration file
110
111 Int_t fCellLabels[12672]; // Array with MC label to be passed to digit.
112 Int_t fCellSecondLabels[12672]; // Array with Second MC label to be passed to digit.
113
1f77507b 114 Int_t fMaxEvent; // Set a maximum event
115
116 ClassDef(AliAnalysisTaskEMCALClusterize, 6);
37d2296c 117};
118
119#endif //ALIANALYSISTASKEMCALCLUSTERIZE_H