]>
Commit | Line | Data |
---|---|---|
375cec9b | 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; | |
6eb2a715 | 14 | #include "TH2I.h" |
15 | #include "TObjArray.h" | |
375cec9b | 16 | |
17 | // AliRoot includes | |
18 | #include "AliAnalysisTaskSE.h" | |
19 | class AliEMCALGeometry; | |
20 | class AliAODCaloCluster; | |
21 | class AliAODCaloCells; | |
6eb2a715 | 22 | //class AliEMCALCalibData ; |
375cec9b | 23 | #include "AliEMCALGeoParams.h" |
9584c261 | 24 | class AliEMCALRecoUtils; |
375cec9b | 25 | |
26 | class AliAnalysisTaskEMCALPi0CalibSelection : public AliAnalysisTaskSE | |
27 | { | |
28 | public: | |
29 | ||
375cec9b | 30 | AliAnalysisTaskEMCALPi0CalibSelection(const char* name); |
375cec9b | 31 | virtual ~AliAnalysisTaskEMCALPi0CalibSelection(); |
32 | ||
9584c261 | 33 | private: |
34 | ||
35 | AliAnalysisTaskEMCALPi0CalibSelection(const AliAnalysisTaskEMCALPi0CalibSelection&); | |
36 | AliAnalysisTaskEMCALPi0CalibSelection& operator=(const AliAnalysisTaskEMCALPi0CalibSelection&); | |
37 | ||
38 | public: | |
39 | ||
375cec9b | 40 | // Implementation of interface methods |
41 | virtual void UserCreateOutputObjects(); | |
42 | virtual void UserExec(Option_t * opt); | |
6eb2a715 | 43 | virtual void LocalInit() ; |
9fdaff9a | 44 | |
45 | void SetAsymmetryCut(Float_t asy) {fAsyCut = asy ;} | |
46 | void SetClusterMinEnergy(Float_t emin) {fEmin = emin;} | |
47 | void SetClusterMaxEnergy(Float_t emax) {fEmax = emax;} | |
48 | void SetClusterMinNCells(Int_t n) {fMinNCells = n ;} | |
49 | void SetNCellsGroup(Int_t n) {fGroupNCells = n ;} | |
50 | void SetLogWeight(Float_t w) {fLogWeight = w ;} | |
51 | ||
6eb2a715 | 52 | //void SetCalibCorrections(AliEMCALCalibData* const cdata); |
375cec9b | 53 | void CreateAODFromESD(); |
54 | void CreateAODFromAOD(); | |
55 | ||
9fdaff9a | 56 | void CopyAOD(Bool_t copy) { fCopyAOD = copy ; } |
375cec9b | 57 | Bool_t IsAODCopied() const { return fCopyAOD ; } |
58 | ||
2dfb1428 | 59 | void SwitchOnSameSM() {fSameSM = kTRUE ; } |
60 | void SwitchOffSameSM() {fSameSM = kFALSE ; } | |
61 | ||
62 | Int_t GetEMCALClusters(AliVEvent* event, TRefArray *clusters) const; | |
63 | Bool_t IsEMCALCluster(AliVCluster *clus) const; | |
64 | void SwitchOnOldAODs() {fOldAOD = kTRUE ; } | |
65 | void SwitchOffOldAODs() {fOldAOD = kFALSE ; } | |
66 | ||
9fdaff9a | 67 | void SetGeometryName(TString name) { fEMCALGeoName = name ; } |
68 | TString GeometryName() const { return fEMCALGeoName ; } | |
6eb2a715 | 69 | |
cfce8d44 | 70 | //Modules fiducial region |
71 | Bool_t CheckCellFiducialRegion(AliVCluster* cluster, AliVCaloCells* cells) ; | |
72 | void SetNumberOfCellsFromEMCALBorder(Int_t n) {fNCellsFromEMCALBorder = n; } | |
73 | Int_t GetNumberOfCellsFromEMCALBorder() const {return fNCellsFromEMCALBorder; } | |
74 | ||
6eb2a715 | 75 | // Bad channels, copy from PWG4/PartCorrBase/AliCalorimeterUtils |
76 | Bool_t IsBadChannelsRemovalSwitchedOn() const { return fRemoveBadChannels ; } | |
77 | void SwitchOnBadChannelsRemoval () {fRemoveBadChannels = kTRUE ; InitEMCALBadChannelStatusMap();} | |
78 | void SwitchOffBadChannelsRemoval() {fRemoveBadChannels = kFALSE ; } | |
79 | ||
80 | void InitEMCALBadChannelStatusMap() ; | |
81 | ||
82 | Int_t GetEMCALChannelStatus(Int_t iSM , Int_t iCol, Int_t iRow) const { | |
83 | if(fEMCALBadChannelMap) return (Int_t) ((TH2I*)fEMCALBadChannelMap->At(iSM))->GetBinContent(iCol,iRow); | |
84 | else return 0;}//Channel is ok by default | |
85 | ||
86 | void SetEMCALChannelStatus(Int_t iSM , Int_t iCol, Int_t iRow, Double_t c = 1) { | |
87 | if(!fEMCALBadChannelMap)InitEMCALBadChannelStatusMap() ; | |
88 | ((TH2I*)fEMCALBadChannelMap->At(iSM))->SetBinContent(iCol,iRow,c);} | |
89 | ||
90 | TH2I * GetEMCALChannelStatusMap(Int_t iSM) const {return (TH2I*)fEMCALBadChannelMap->At(iSM);} | |
9fdaff9a | 91 | void SetEMCALChannelStatusMap(TObjArray *map) {fEMCALBadChannelMap = map;} |
6eb2a715 | 92 | |
93 | Bool_t ClusterContainsBadChannel(UShort_t* cellList, Int_t nCells); | |
19db8f8c | 94 | |
9584c261 | 95 | void SetEMCALRecoUtils(AliEMCALRecoUtils * ru) {fRecoUtils = ru;} |
9fdaff9a | 96 | AliEMCALRecoUtils* GetEMCALRecoUtils() const {return fRecoUtils;} |
9584c261 | 97 | |
6eb2a715 | 98 | void SetInvariantMassHistoBinRange(Int_t nBins, Float_t minbin, Float_t maxbin){ |
99 | fNbins = nBins; fMinBin = minbin; fMaxBin = maxbin; } | |
9584c261 | 100 | |
9584c261 | 101 | void GetMaxEnergyCellPosAndClusterPos(AliVCaloCells* cells, AliVCluster* clu, Int_t& iSM, Int_t& ieta, Int_t& iphi); |
375cec9b | 102 | |
103 | private: | |
104 | ||
cf028690 | 105 | AliEMCALGeometry * fEMCALGeo; //! EMCAL geometry |
6eb2a715 | 106 | //AliEMCALCalibData* fCalibData; // corrections to CC from the previous iteration |
375cec9b | 107 | |
108 | Float_t fEmin; // min. cluster energy | |
cf028690 | 109 | Float_t fEmax; // max. cluster energy |
9fdaff9a | 110 | Float_t fAsyCut; // Asymmetry cut |
cf028690 | 111 | Int_t fMinNCells; // min. ncells in cluster |
70ae4900 | 112 | Int_t fGroupNCells; // group n cells |
375cec9b | 113 | Float_t fLogWeight; // log weight used in cluster recalibration |
114 | Bool_t fCopyAOD; // Copy calo information only to AOD? | |
2dfb1428 | 115 | Bool_t fSameSM; // Combine clusters in channels on same SM |
116 | Bool_t fOldAOD; // Reading Old AODs, created before release 4.20 | |
375cec9b | 117 | TString fEMCALGeoName; // Name of geometry to use. |
cfce8d44 | 118 | Int_t fNCellsFromEMCALBorder; // Number of cells from EMCAL border the cell with maximum amplitude has to be. |
119 | ||
6eb2a715 | 120 | Bool_t fRemoveBadChannels; // Check the channel status provided and remove clusters with bad channels |
121 | TObjArray *fEMCALBadChannelMap; // Array of histograms with map of bad channels, EMCAL | |
9584c261 | 122 | AliEMCALRecoUtils * fRecoUtils; // Access to reconstruction utilities |
123 | ||
375cec9b | 124 | //Output histograms |
6eb2a715 | 125 | Int_t fNbins; // N mass bins of invariant mass histograms |
126 | Float_t fMinBin; // Minimum mass bins of invariant mass histograms | |
127 | Float_t fMaxBin; // Maximum mass bins of invariant mass histograms | |
128 | ||
cf028690 | 129 | TList* fOutputContainer; //!histogram container |
130 | TH1F* fHmpi0[AliEMCALGeoParams::fgkEMCALModules][AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows];//! two-cluster inv. mass assigned to each cell. | |
9584c261 | 131 | |
132 | TH2F* fHmgg; //! two-cluster inv.mass vs pt of pair | |
133 | TH2F* fHmggDifferentSM; //! two-cluster inv.mass vs pt of pair, each cluster in different SM | |
2dfb1428 | 134 | TH2F* fHmggSM[4]; //! two-cluster inv.mass per SM |
135 | TH2F* fHmggPairSM[4]; //! two-cluster inv.mass per Pair | |
9584c261 | 136 | |
137 | TH2F* fHOpeningAngle; //! two-cluster opening angle vs pt of pair, with mass close to pi0 | |
138 | TH2F* fHOpeningAngleDifferentSM; //! two-cluster opening angle vs pt of pair, each cluster in different SM, with mass close to pi0 | |
139 | TH2F* fHOpeningAngleSM[4]; //! two-cluster opening angle vs pt per SM,with mass close to pi0 | |
140 | TH2F* fHOpeningAnglePairSM[4]; //! two-cluster opening angle vs pt per Pair,with mass close to pi0 | |
141 | ||
142 | TH2F* fHIncidentAngle; //! cluster incident angle vs pt of pair, with mass close to pi0 | |
143 | TH2F* fHIncidentAngleDifferentSM; //! cluster incident angle vs pt of pair, each cluster in different SM, with mass close to pi0 | |
144 | TH2F* fHIncidentAngleSM[4]; //! cluster incident angle vs pt per SM,with mass close to pi0 | |
145 | TH2F* fHIncidentAnglePairSM[4]; //! cluster incident angle vs pt per Pair,with mass close to pi0 | |
146 | ||
147 | TH2F* fHAsymmetry; //! two-cluster asymmetry vs pt of pair, with mass close to pi0 | |
148 | TH2F* fHAsymmetryDifferentSM; //! two-cluster asymmetry vs pt of pair, each cluster in different SM, with mass close to pi0 | |
149 | TH2F* fHAsymmetrySM[4]; //! two-cluster asymmetry vs pt per SM,with mass close to pi0 | |
150 | TH2F* fHAsymmetryPairSM[4]; //! two-cluster asymmetry vs pt per Pair,with mass close to pi0 | |
151 | ||
152 | TH2F* fhTowerDecayPhotonHit[4] ; //! Cells ordered in column/row for different module, number of times a decay photon hits | |
153 | TH2F* fhTowerDecayPhotonEnergy[4] ; //! Cells ordered in column/row for different module, accumulated energy in the tower by decay photons. | |
154 | TH2F* fhTowerDecayPhotonAsymmetry[4] ; //! Cells ordered in column/row for different module, accumulated asymmetry in the tower by decay photons. | |
155 | ||
6eb2a715 | 156 | TH1I* fhNEvents; //! Number of events counter histogram |
157 | TList * fCuts ; //! List with analysis cuts | |
375cec9b | 158 | |
19db8f8c | 159 | ClassDef(AliAnalysisTaskEMCALPi0CalibSelection,9); |
375cec9b | 160 | |
161 | }; | |
162 | ||
163 | #endif //ALIANALYSISTASKEMCALPI0CALIBSELECTION_H |