]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/CaloCalib/AliAnalysisTaskEMCALPi0CalibSelection.h
set geometry matrices if not yet set
[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   void SwitchOnLoadOwnGeometryMatrices()              { fLoadMatrices = kTRUE  ; }
66   void SwitchOffLoadOwnGeometryMatrices()             { fLoadMatrices = kFALSE ; }
67   void SetGeometryMatrixInSM(TGeoHMatrix* m, Int_t i) { fMatrix[i]    = m      ; }
68
69   void SetEMCALRecoUtils(AliEMCALRecoUtils * ru) {fRecoUtils = ru;}
70   AliEMCALRecoUtils* GetEMCALRecoUtils() const   {return fRecoUtils;}
71   
72   void SetInvariantMassHistoBinRange(Int_t nBins, Float_t minbin, Float_t maxbin){
73         fNbins = nBins; fMinBin = minbin; fMaxBin = maxbin; }
74           
75   void GetMaxEnergyCellPosAndClusterPos(AliVCaloCells* cells, AliVCluster* clu, Int_t& iSM, Int_t& ieta, Int_t& iphi);
76
77   void UseFilteredEventAsInput() {fFilteredInput = kTRUE;}
78   void UseNormalEventAsInput()   {fFilteredInput = kFALSE;}
79
80   
81   void PrintInfo();
82   
83 private:
84
85   AliEMCALGeometry * fEMCALGeo;  //! EMCAL geometry
86   //AliEMCALCalibData* fCalibData; // corrections to CC from the previous iteration
87         
88   Float_t fEmin;           // min. cluster energy
89   Float_t fEmax;           // max. cluster energy
90   Float_t fAsyCut;         // Asymmetry cut
91   Int_t   fMinNCells;      // min. ncells in cluster
92   Int_t   fGroupNCells;    // group n cells
93   Float_t fLogWeight;      // log weight used in cluster recalibration
94   Bool_t  fSameSM;         // Combine clusters in channels on same SM
95   Bool_t  fOldAOD;         // Reading Old AODs, created before release 4.20
96   Bool_t  fFilteredInput;  // Read input produced with filter.
97   Bool_t  fCorrectClusters;// Correct clusters energy, position etc.
98   TString fEMCALGeoName;   // Name of geometry to use.
99
100   AliEMCALRecoUtils * fRecoUtils;  // Access to reconstruction utilities
101   
102   //Output histograms   
103   Int_t   fNbins;  // N       mass bins of invariant mass histograms
104   Float_t fMinBin; // Minimum mass bins of invariant mass histograms
105   Float_t fMaxBin; // Maximum mass bins of invariant mass histograms
106
107   TList*  fOutputContainer; //!histogram container
108   TH1F*   fHmpi0[AliEMCALGeoParams::fgkEMCALModules][AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows];//! two-cluster inv. mass assigned to each cell.
109
110   TH2F*   fHmgg;             //! two-cluster inv.mass vs pt of pair
111   TH2F*   fHmggDifferentSM;  //! two-cluster inv.mass vs pt of pair, each cluster in different SM
112   TH2F*   fHmggSM[AliEMCALGeoParams::fgkEMCALModules];       //! two-cluster inv.mass per SM
113   TH2F*   fHmggPairSameSectorSM[AliEMCALGeoParams::fgkEMCALModules/2];   //! two-cluster inv.mass per Pair
114   TH2F*   fHmggPairSameSideSM  [AliEMCALGeoParams::fgkEMCALModules-2];   //! two-cluster inv.mass per Pair
115
116   TH2F*   fHOpeningAngle;             //! two-cluster opening angle vs pt of pair, with mass close to pi0
117   TH2F*   fHOpeningAngleDifferentSM;  //! two-cluster opening angle vs pt of pair, each cluster in different SM, with mass close to pi0
118   TH2F*   fHOpeningAngleSM[AliEMCALGeoParams::fgkEMCALModules];       //! two-cluster opening angle vs pt per SM,with mass close to pi0
119   TH2F*   fHOpeningAnglePairSM[AliEMCALGeoParams::fgkEMCALModules];   //! two-cluster opening angle vs pt per Pair,with mass close to pi0
120
121   TH2F*   fHIncidentAngle;             //! cluster incident angle vs pt of pair, with mass close to pi0
122   TH2F*   fHIncidentAngleDifferentSM;  //! cluster incident angle vs pt of pair, each cluster in different SM, with mass close to pi0
123   TH2F*   fHIncidentAngleSM[AliEMCALGeoParams::fgkEMCALModules];       //! cluster incident angle vs pt per SM,with mass close to pi0
124   TH2F*   fHIncidentAnglePairSM[AliEMCALGeoParams::fgkEMCALModules];   //! cluster incident angle vs pt per Pair,with mass close to pi0
125   
126   TH2F*   fHAsymmetry;             //! two-cluster asymmetry vs pt of pair, with mass close to pi0
127   TH2F*   fHAsymmetryDifferentSM;  //! two-cluster asymmetry vs pt of pair, each cluster in different SM, with mass close to pi0
128   TH2F*   fHAsymmetrySM[AliEMCALGeoParams::fgkEMCALModules];       //! two-cluster asymmetry vs pt per SM,with mass close to pi0
129   TH2F*   fHAsymmetryPairSM[AliEMCALGeoParams::fgkEMCALModules];   //! two-cluster asymmetry vs pt per Pair,with mass close to pi0
130   
131   TH2F*   fhTowerDecayPhotonHit[AliEMCALGeoParams::fgkEMCALModules] ;       //! Cells ordered in column/row for different module, number of times a decay photon hits
132   TH2F*   fhTowerDecayPhotonEnergy[AliEMCALGeoParams::fgkEMCALModules] ;    //! Cells ordered in column/row for different module, accumulated energy in the tower by decay photons.
133   TH2F*   fhTowerDecayPhotonAsymmetry[AliEMCALGeoParams::fgkEMCALModules] ; //! Cells ordered in column/row for different module, accumulated asymmetry in the tower by decay photons.
134
135   TH1I*         fhNEvents;     //! Number of events counter histogram
136   TList *       fCuts ;        //! List with analysis cuts
137   Bool_t        fLoadMatrices; // Matrices set from configuration, not get from geometry.root or from ESDs/AODs
138   TGeoHMatrix * fMatrix[AliEMCALGeoParams::fgkEMCALModules];    // Geometry matrices with alignments
139   
140   ClassDef(AliAnalysisTaskEMCALPi0CalibSelection,12);
141
142 };
143
144 #endif //ALIANALYSISTASKEMCALPI0CALIBSELECTION_H