]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/CaloCalib/AliAnalysisTaskEMCALPi0CalibSelection.h
Move some methods from EMCALcalibration task and CalorimterUtils class to AliEMCALRec...
[u/mrichter/AliRoot.git] / PWG4 / CaloCalib / AliAnalysisTaskEMCALPi0CalibSelection.h
1 #ifndef ALIANALYSISTASKEMCALPI0CALIBSELECTION_H
2 #define ALIANALYSISTASKEMCALPI0CALIBSELECTION_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 //---------------------------------------------------------------------------// 
8 // Fill histograms with two-cluster invariant mass                           //
9 // using calibration coefficients of the previous iteration.                 //
10 //---------------------------------------------------------------------------//
11
12 // Root includes
13 class TH1F;
14 #include "TH2I.h"
15 #include "TObjArray.h"
16
17 // AliRoot includes
18 #include "AliAnalysisTaskSE.h"
19 class AliEMCALGeometry;
20 //class AliEMCALCalibData ;
21 #include "AliEMCALGeoParams.h"
22 class AliEMCALRecoUtils;
23
24 class AliAnalysisTaskEMCALPi0CalibSelection : public AliAnalysisTaskSE
25 {
26 public:
27
28   AliAnalysisTaskEMCALPi0CalibSelection(const char* name);
29   virtual ~AliAnalysisTaskEMCALPi0CalibSelection();
30
31 private:
32   
33   AliAnalysisTaskEMCALPi0CalibSelection(const AliAnalysisTaskEMCALPi0CalibSelection&); 
34   AliAnalysisTaskEMCALPi0CalibSelection& operator=(const AliAnalysisTaskEMCALPi0CalibSelection&); 
35   
36 public:
37   
38   // Implementation of interface methods
39   virtual void UserCreateOutputObjects();
40   virtual void UserExec(Option_t * opt);
41   virtual void LocalInit() ;
42   
43   void SetAsymmetryCut(Float_t asy)      {fAsyCut      = asy ;}
44   void SetClusterMinEnergy(Float_t emin) {fEmin        = emin;}
45   void SetClusterMaxEnergy(Float_t emax) {fEmax        = emax;}
46   void SetClusterMinNCells(Int_t n)      {fMinNCells   = n   ;}
47   void SetNCellsGroup(Int_t n)           {fGroupNCells = n   ;}
48   void SetLogWeight(Float_t w)           {fLogWeight   = w   ;}
49   
50   //void SetCalibCorrections(AliEMCALCalibData* const cdata);
51         
52   void SwitchOnClusterCorrection()    {fCorrectClusters = kTRUE  ; }
53   void SwitchOffClusterCorrection()   {fCorrectClusters = kFALSE ; }
54   
55   void SwitchOnSameSM()    {fSameSM = kTRUE  ; }
56   void SwitchOffSameSM()   {fSameSM = kFALSE ; }
57   
58   Int_t  GetEMCALClusters(AliVEvent* event, TRefArray *clusters) const;
59   Bool_t IsEMCALCluster(AliVCluster *clus) const;
60   void SwitchOnOldAODs()   {fOldAOD = kTRUE  ; }
61   void SwitchOffOldAODs()  {fOldAOD = kFALSE ; }  
62   
63   void SetGeometryName(TString name) { fEMCALGeoName = name ; }
64   TString GeometryName() const       { return fEMCALGeoName ; }
65                   
66   void SetEMCALRecoUtils(AliEMCALRecoUtils * ru) {fRecoUtils = ru;}
67   AliEMCALRecoUtils* GetEMCALRecoUtils() const   {return fRecoUtils;}
68   
69   void SetInvariantMassHistoBinRange(Int_t nBins, Float_t minbin, Float_t maxbin){
70         fNbins = nBins; fMinBin = minbin; fMaxBin = maxbin; }
71           
72   void GetMaxEnergyCellPosAndClusterPos(AliVCaloCells* cells, AliVCluster* clu, Int_t& iSM, Int_t& ieta, Int_t& iphi);
73
74   void UseFilteredEventAsInput() {fFilteredInput = kTRUE;}
75   void UseNormalEventAsInput()   {fFilteredInput = kFALSE;}
76
77 private:
78
79   AliEMCALGeometry * fEMCALGeo;  //! EMCAL geometry
80   //AliEMCALCalibData* fCalibData; // corrections to CC from the previous iteration
81         
82   Float_t fEmin;           // min. cluster energy
83   Float_t fEmax;           // max. cluster energy
84   Float_t fAsyCut;         // Asymmetry cut
85   Int_t   fMinNCells;      // min. ncells in cluster
86   Int_t   fGroupNCells;    // group n cells
87   Float_t fLogWeight;      // log weight used in cluster recalibration
88   Bool_t  fSameSM;         // Combine clusters in channels on same SM
89   Bool_t  fOldAOD;         // Reading Old AODs, created before release 4.20
90   Bool_t  fFilteredInput;  // Read input produced with filter.
91   Bool_t  fCorrectClusters;// Correct clusters energy, position etc.
92   TString fEMCALGeoName;   // Name of geometry to use.
93
94   AliEMCALRecoUtils * fRecoUtils;  // Access to reconstruction utilities
95   
96   //Output histograms   
97   Int_t   fNbins;  // N       mass bins of invariant mass histograms
98   Float_t fMinBin; // Minimum mass bins of invariant mass histograms
99   Float_t fMaxBin; // Maximum mass bins of invariant mass histograms
100
101   TList*  fOutputContainer; //!histogram container
102   TH1F*   fHmpi0[AliEMCALGeoParams::fgkEMCALModules][AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows];//! two-cluster inv. mass assigned to each cell.
103
104   TH2F*   fHmgg;            //! two-cluster inv.mass vs pt of pair
105   TH2F*   fHmggDifferentSM; //! two-cluster inv.mass vs pt of pair, each cluster in different SM
106   TH2F*   fHmggSM[4];       //! two-cluster inv.mass per SM
107   TH2F*   fHmggPairSM[4];   //! two-cluster inv.mass per Pair
108   
109   TH2F*   fHOpeningAngle;            //! two-cluster opening angle vs pt of pair, with mass close to pi0
110   TH2F*   fHOpeningAngleDifferentSM; //! two-cluster opening angle vs pt of pair, each cluster in different SM, with mass close to pi0
111   TH2F*   fHOpeningAngleSM[4];       //! two-cluster opening angle vs pt per SM,with mass close to pi0
112   TH2F*   fHOpeningAnglePairSM[4];   //! two-cluster opening angle vs pt per Pair,with mass close to pi0
113
114   TH2F*   fHIncidentAngle;            //! cluster incident angle vs pt of pair, with mass close to pi0
115   TH2F*   fHIncidentAngleDifferentSM; //! cluster incident angle vs pt of pair, each cluster in different SM, with mass close to pi0
116   TH2F*   fHIncidentAngleSM[4];       //! cluster incident angle vs pt per SM,with mass close to pi0
117   TH2F*   fHIncidentAnglePairSM[4];   //! cluster incident angle vs pt per Pair,with mass close to pi0
118   
119   TH2F*   fHAsymmetry;            //! two-cluster asymmetry vs pt of pair, with mass close to pi0
120   TH2F*   fHAsymmetryDifferentSM; //! two-cluster asymmetry vs pt of pair, each cluster in different SM, with mass close to pi0
121   TH2F*   fHAsymmetrySM[4];       //! two-cluster asymmetry vs pt per SM,with mass close to pi0
122   TH2F*   fHAsymmetryPairSM[4];   //! two-cluster asymmetry vs pt per Pair,with mass close to pi0
123   
124   TH2F*   fhTowerDecayPhotonHit[4] ;       //! Cells ordered in column/row for different module, number of times a decay photon hits
125   TH2F*   fhTowerDecayPhotonEnergy[4] ;    //! Cells ordered in column/row for different module, accumulated energy in the tower by decay photons.
126   TH2F*   fhTowerDecayPhotonAsymmetry[4] ; //! Cells ordered in column/row for different module, accumulated asymmetry in the tower by decay photons.
127
128   TH1I*   fhNEvents;        //! Number of events counter histogram
129   TList * fCuts ;           //! List with analysis cuts
130
131   ClassDef(AliAnalysisTaskEMCALPi0CalibSelection,10);
132
133 };
134
135 #endif //ALIANALYSISTASKEMCALPI0CALIBSELECTION_H