]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/UserTasks/EmcalTasks/AliAnalysisTaskEMCALClusterizeFast.h
3619d6adcd73f38edf9cdae6e91d1214c829fb7b
[u/mrichter/AliRoot.git] / PWG4 / UserTasks / EmcalTasks / AliAnalysisTaskEMCALClusterizeFast.h
1 #ifndef ALIANALYSISTASKEMCALCLUSTERIZEFAST_H
2 #define ALIANALYSISTASKEMCALCLUSTERIZEFAST_H
3
4 // $Id$
5
6 class TObjArray;
7 class TClonesArray;
8 class AliAODEvent;
9 class AliESDEvent;
10 class AliEMCALCalibData;
11 class AliCaloCalibPedestal;
12 class AliEMCALClusterizer;
13 class AliEMCALAfterBurnerUF;
14 class AliEMCALRecParam;
15 class AliEMCALRecoUtils;
16
17 #include "AliAnalysisTaskSE.h"
18
19 class AliAnalysisTaskEMCALClusterizeFast : public AliAnalysisTaskSE {
20  public:
21   AliAnalysisTaskEMCALClusterizeFast();
22   AliAnalysisTaskEMCALClusterizeFast(const char *name);
23   virtual ~AliAnalysisTaskEMCALClusterizeFast();
24   
25  public:
26   virtual void           UserCreateOutputObjects();
27   virtual void           UserExec(Option_t *option);
28
29   Bool_t                 GetAttachClusters()                  const  { return fAttachClusters               ; }
30   Bool_t                 GetRecalibrateOnly()                 const  { return fRecalibOnly                  ; }
31   Bool_t                 GetSubBackground()                   const  { return fSubBackground                ; }
32   const TObjArray       *GetClusters()                        const  { return fClusterArr                   ; }
33   const TClonesArray    *GetDigits()                          const  { return fDigitsArr                    ; }
34   const TString         &GeometryName()                       const  { return fGeomName                     ; }  
35   AliEMCALRecParam      *GetRecParam()                        const  { return fRecParam                     ; }
36   AliEMCALRecoUtils     *GetRecoUtils()                       const  { return fRecoUtils                    ; }
37   AliEMCALCalibData     *GetCalibData()                       const  { return fCalibData                    ; }
38   AliCaloCalibPedestal  *GetPedData()                         const  { return fPedestalData                 ; }
39   TGeoHMatrix           *GetGeometryMatrix(Int_t i)           const  { return fGeomMatrix[i]                ; }
40   Bool_t                 GetCreatePattern()                   const  { return fCreatePattern                ; }
41   Bool_t                 GetOverwrite()                       const  { return fOverwrite                    ; }
42   const TString         &GetNewClusterArrayName()             const  { return fNewClusterArrayName          ; }
43   Int_t                  GetnPhi()                            const  { return fNPhi                         ; }
44   Int_t                  GetnEta()                            const  { return fNEta                         ; }
45   Int_t                  GetShiftPhi()                        const  { return fShiftPhi                     ; }
46   Int_t                  GetShiftEta()                        const  { return fShiftEta                     ; }
47   Bool_t                 GetTRUShift()                        const  { return fTRUShift                     ; }
48   Bool_t                 GetClusterizeFastORs()               const  { return fClusterizeFastORs            ; }
49   void                   JustUnfold(Bool_t yesno)                    { fJustUnfold                  = yesno ; }
50   void                   LoadOwnGeometryMatrices(Bool_t b)           { fLoadGeomMatrices            = b     ; }
51   void                   SetAODBranchName(const char *name)          { fOutputAODBrName             = name  ; }
52   void                   SetAttachClusters(Bool_t b)                 { fAttachClusters              = b     ; }
53   void                   SetCalibData(AliEMCALCalibData *d)          { fCalibData                   = d     ; }
54   void                   SetEMCALRecoUtils(AliEMCALRecoUtils *ru)    { fRecoUtils                   = ru    ; }
55   void                   SetGeometryMatrix(TGeoHMatrix* m, Int_t i)  { fGeomMatrix[i]               = m     ; }
56   void                   SetGeometryName(const char *name)           { fGeomName                    = name  ; }
57   void                   SetLoadCalib(Bool_t b)                      { fLoadCalib                   = b     ; }
58   void                   SetLoadPed(Bool_t b)                        { fLoadPed                     = b     ; }
59   void                   SetOCDBPath(const char *path)               { fOCDBpath                    = path  ; }
60   void                   SetPedestalData(AliCaloCalibPedestal *d)    { fPedestalData                = d     ; }
61   void                   SetRecalibrateCellsOnly(Bool_t b)           { fRecalibOnly                 = b     ; }
62   void                   SetSubBackground(Bool_t b)                  { fSubBackground               = b     ; }
63   void                   SetCreatePattern(Bool_t yes)                { fCreatePattern               = yes   ; if (yes) fOverwrite = kTRUE; }
64   void                   SetOverwrite(Bool_t yes)                    { fOverwrite                   = yes   ; if (yes) fOverwrite = kTRUE; }
65   void                   SetNewClusterArrayName(TString name)        { fNewClusterArrayName         = name  ; }
66   void                   SetnPhi(Int_t n)                            { fNPhi                        = n     ; }
67   void                   SetnEta(Int_t n)                            { fNEta                        = n     ; }
68   void                   SetShiftPhi(Int_t n)                        { fShiftPhi                    = n     ; }
69   void                   SetShiftEta(Int_t n)                        { fShiftEta                    = n     ; }
70   void                   SetTRUShift(Bool_t yes)                     { fTRUShift                    = yes   ; }
71   void                   SetClusterizeFastORs(Bool_t yes)            { fClusterizeFastORs           = yes   ; if (yes) fOverwrite = kFALSE; }
72
73  protected:
74   virtual void           Clusterize();
75   virtual void           FillDigitsArray();
76   virtual void           Init();
77   virtual void           RecPoints2Clusters(TClonesArray *clus);
78   virtual void           UpdateCells();
79   virtual void           UpdateClusters();
80
81   Int_t                  fRun;                            //!run number
82   TClonesArray          *fDigitsArr;                      //!digits array
83   TObjArray             *fClusterArr;                     //!recpoints array
84   AliEMCALRecParam      *fRecParam;                       // reconstruction parameters container
85   AliEMCALClusterizer   *fClusterizer;                    //!clusterizer
86   AliEMCALAfterBurnerUF *fUnfolder;                       //!unfolding procedure
87   Bool_t                 fJustUnfold;                     // just unfold, do not recluster
88   TString                fGeomName;                       // name of geometry to use.
89   Bool_t                 fGeomMatrixSet;                  // set geometry matrices only once, for the first event.         
90   Bool_t                 fLoadGeomMatrices;               // matrices from configuration, not geometry.root nor ESDs/AODs
91   TGeoHMatrix           *fGeomMatrix[12];                 // geometry matrices with alignments
92   TString                fOCDBpath;                       // path with OCDB location
93   AliEMCALCalibData     *fCalibData;                      // EMCAL calib data
94   AliCaloCalibPedestal  *fPedestalData;                   // EMCAL pedestal
95   TClonesArray          *fOutputAODBranch;                //!AOD Branch with output clusters  
96   TString                fOutputAODBrName;                // output AOD branch name (none by default)
97   AliEMCALRecoUtils     *fRecoUtils;                      // access to factorized reconstruction algorithms
98   Bool_t                 fLoadCalib;                      // access calib object from OCDB (def=off)
99   Bool_t                 fLoadPed;                        // access ped object from OCDB (def=off)
100   Bool_t                 fAttachClusters;                 // attach clusters to input event (AOD or ESD)
101   Bool_t                 fRecalibOnly;                    // only recalibrate cells if true (def=off)
102   Bool_t                 fSubBackground;                  // subtract background if true (def=off)
103   Bool_t                 fCreatePattern;                  // removes all cells and creates a cell pattern before running the clusterizer (for debug purposes)
104   Bool_t                 fOverwrite;                      // Overwrite existing clusters
105   TString                fNewClusterArrayName;            // If not overwriting, name of the new cluster array
106   Int_t                  fNPhi;                           // nPhi (for FixedWindowsClusterizer)
107   Int_t                  fNEta;                           // nEta (for FixedWinoswsClusterizer)
108   Int_t                  fShiftPhi;                       // ShiftPhi (for FixedWindowsClusterizer)
109   Int_t                  fShiftEta;                       // ShiftEta (for FixedWindowsClusterizer)
110   Bool_t                 fTRUShift;                       // Shifting inside a TRU (true) or through the whole calorimeter (false) (for FixedWindowsClusterizer)
111   Bool_t                 fClusterizeFastORs;              // If true, clusterize FastORs instead of cells
112
113  private:
114   AliAnalysisTaskEMCALClusterizeFast(const AliAnalysisTaskEMCALClusterizeFast&);            // not implemented
115   AliAnalysisTaskEMCALClusterizeFast &operator=(const AliAnalysisTaskEMCALClusterizeFast&); // not implemented
116
117   ClassDef(AliAnalysisTaskEMCALClusterizeFast, 5);
118 };
119 #endif //ALIANALYSISTASKEMCALCLUSTERIZEFAST_H