]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG4/CaloCalib/AliAnalysisTaskEMCALClusterize.h
Add switch to access OCBD only if needed, off by default
[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() ; }
e9dd2d80 39
40 //OCDB
37d2296c 41 Bool_t AccessOCDB();
e9dd2d80 42 void SwitchOnAccessOCDB() { fAccessOCDB = kTRUE ; }
43 void SwitchOffAccessOCDB() { fAccessOCDB = kFALSE ; }
37d2296c 44 void SetOCDBPath(const char *path) { fOCDBpath = path ; }
45
46 //Geometry methods
47 void SetGeometryName(TString &name) { fGeomName = name ; }
48 TString GeometryName() const { return fGeomName ; }
49 void SwitchOnLoadOwnGeometryMatrices() { fLoadGeomMatrices = kTRUE ; }
50 void SwitchOffLoadOwnGeometryMatrices() { fLoadGeomMatrices = kFALSE ; }
51 void SetGeometryMatrixInSM(TGeoHMatrix* m, Int_t i) { fGeomMatrix[i] = m ; }
52
53 //AOD methods
54 void SetAODBranchName(TString &name) { fOutputAODBranchName = name ; }
55 void FillAODFile(Bool_t yesno) { fFillAODFile = yesno ; }
1f77507b 56 void FillAODCaloCells();
57 void FillAODHeader();
58 void SwitchOnFillAODHeader() { fFillAODHeader = kTRUE ; }
59 void SwitchOffFillAODHeader() { fFillAODHeader = kFALSE ; }
60 void SwitchOnFillAODCaloCells() { fFillAODCaloCells = kTRUE ; }
61 void SwitchOffFillAODCaloCells() { fFillAODCaloCells = kFALSE ; }
37d2296c 62
63 //Algorithms settings
64 void JustUnfold(Bool_t yesno) { fJustUnfold = yesno ; }
65 AliEMCALRecParam * GetRecParam() const { return fRecParam ; }
66 void InitClusterization();
67
1f77507b 68 void SetEMCALRecoUtils(AliEMCALRecoUtils * ru) { fRecoUtils = ru ; }
37d2296c 69 AliEMCALRecoUtils* GetRecoUtils() const { return fRecoUtils ; }
70
e9dd2d80 71 void SetConfigFileName(TString name) { fConfigName = name ; }
72 void SetMaxEvent(Int_t max) { fMaxEvent = max ; }
37d2296c 73
74 private:
75
76 virtual void RecPoints2Clusters(TClonesArray *fdigitsArr, TObjArray *fRecPoints, TObjArray *clusArray);
77
78 //Geometry
79 AliEMCALGeometry *fGeom; // EMCAL geometry
80 TString fGeomName; // Name of geometry to use.
81 TGeoHMatrix *fGeomMatrix[10]; // Geometry matrices with alignments
82 Bool_t fGeomMatrixSet; // Set geometry matrices only once, for the first event.
83 Bool_t fLoadGeomMatrices; // Matrices set from configuration, not get from geometry.root or from ESDs/AODs
84
85 //OCDB
86 AliEMCALCalibData *fCalibData; // EMCAL calib data
87 AliCaloCalibPedestal *fPedestalData; // EMCAL pedestal
88 TString fOCDBpath; // Path with OCDB location
e9dd2d80 89 Bool_t fAccessOCDB; // Need to access info from OCDB (not really)
37d2296c 90
91 //Temporal arrays
92 TClonesArray *fDigitsArr; //-> Digits array
93 TObjArray *fClusterArr; //-> Recpoints array
94 TObjArray *fCaloClusterArr; //-> CaloClusters array
95
96 //Clusterizers
97 AliEMCALRecParam *fRecParam; // Reconstruction parameters container
98 AliEMCALClusterizer *fClusterizer; //! EMCAL clusterizer
99 AliEMCALAfterBurnerUF *fUnfolder; //! Unfolding procedure
100 Bool_t fJustUnfold; // Just unfold, do not recluster
101
102 //AOD
103 TClonesArray *fOutputAODBranch; //! AOD Branch with output clusters
104 TString fOutputAODBranchName; // New of output AOD branch
105 Bool_t fFillAODFile; // Fill the output AOD file with the new clusters,
106 // if not they will be only available for the event they were generated
1f77507b 107 Bool_t fFillAODHeader; // Copy header to standard branch
108 Bool_t fFillAODCaloCells; // Copy calocells to standard branch
109
37d2296c 110 Int_t fRun; //!run number
111
112 AliEMCALRecoUtils* fRecoUtils; // Access to factorized reconstruction algorithms
113 TString fConfigName; // Name of analysis configuration file
114
115 Int_t fCellLabels[12672]; // Array with MC label to be passed to digit.
116 Int_t fCellSecondLabels[12672]; // Array with Second MC label to be passed to digit.
117
1f77507b 118 Int_t fMaxEvent; // Set a maximum event
119
e9dd2d80 120 ClassDef(AliAnalysisTaskEMCALClusterize, 7);
37d2296c 121};
122
123#endif //ALIANALYSISTASKEMCALCLUSTERIZE_H