1 #ifndef ALIEMCALPICOTRACKINGRIDMAKER_H
2 #define ALIEMCALPICOTRACKINGRIDMAKER_H
11 #include "AliAnalysisTaskEmcalJet.h"
13 class AliEmcalPicoTrackInGridMaker : public AliAnalysisTaskEmcalJet {
15 AliEmcalPicoTrackInGridMaker();
16 AliEmcalPicoTrackInGridMaker(const char *name);
17 virtual ~AliEmcalPicoTrackInGridMaker();
19 void SetTracksOutName(const char *name) { fTracksOutName = name; }
21 void SetCellSize(Double_t a) { fCellSize = a; }
22 void SetMinCellE(Double_t e) { fMinCellE = e; }
23 void SetL1Slide(Bool_t b) { fL1Slide = b; }
25 void SetEMCalAcceptance(Double_t phiMin, Double_t phiMax, Double_t etaMin, Double_t etaMax) { fPhiMin[0]=phiMin; fPhiMax[0]=phiMax; fEtaMin[0]=etaMin; fEtaMax[0]=etaMax; }
26 void SetDCalAcceptance(Double_t phiMin, Double_t phiMax, Double_t etaMin, Double_t etaMax) { fPhiMin[1]=phiMin; fPhiMax[1]=phiMax; fEtaMin[1]=etaMin; fEtaMax[1]=etaMax; }
28 void SetExcludeLeadingPatch(Int_t i) { fExclLeadingPatch = i; }
30 void SetPatchTypeForSubtraction(Int_t i) { fPatchSub = i; }
31 void SetPatchTypeForSubtraction(Int_t dim, Int_t lev) { fPatchSub = GetPatchType(dim,lev); }
32 void SetMeanRho(Double_t r) { fRhoMean = r; }
35 void UserCreateOutputObjects();
39 Bool_t CreateGridCells();
41 void PrintAcceptance() const;
43 Bool_t InitMiniPatches();
44 Bool_t CreateGridMiniPatches();
45 Bool_t CreateGridPatches(const Int_t dim, const Int_t level);
47 Bool_t InitPatches(const Int_t dim, const Int_t level); //give dimension in cell units
49 AliEmcalJet* GetClosestJet(const Double_t eta, const Double_t phi, const Int_t icont = 0) const;
51 Double_t CalculateMedian(const Int_t patchType, const Int_t type, const Int_t areaType = 0);
52 Double_t CalculateSum(const Int_t patchType) const;
55 Int_t GetCellType(const Double_t eta, const Double_t phi) const;
56 Int_t GetCellType(const AliVParticle *vp) const {return GetCellType(vp->Eta(),vp->Phi());}
58 Int_t GetGridID(const AliVParticle *vp) const {return GetGridID(vp->Eta(),vp->Phi());}
59 Int_t GetGridID(const Double_t eta, const Double_t phi) const;
60 Int_t GetGridID(const Int_t row, const Int_t col, const Int_t type) const;
61 void GetEtaPhiFromGridID(const Int_t id, const Int_t type, Double_t &eta, Double_t &phi) const;
62 Int_t GetNCellsRow(const Int_t type) const;
63 Int_t GetNCellsCol(const Int_t type) const;
65 Int_t GetNRowMiniPatches(const Int_t type) const;
66 Int_t GetNColMiniPatches(const Int_t type) const;
67 Int_t GetMiniPatchID(const Int_t row, const Int_t col, const Int_t type) const;
68 void GetEtaPhiFromMiniPatchID(const Int_t id, const Int_t type, Double_t &eta, Double_t &phi) const;
70 Int_t GetPatchType(const Int_t dim, const Int_t level) const;
71 Int_t GetPatchDim(const Int_t ipatch) const;
72 Int_t GetSlidingStepSizeCells(const Int_t dim, const Int_t level = 1) const;
73 Int_t GetSlidingStepSizeMiniPatches(const Int_t dim, const Int_t level = 1) const;
74 Int_t GetTriggerPatchIdStepSizeNoOverlap(const Int_t dim, const Int_t level = 1) const;
75 Int_t GetNTriggerPatches(const Int_t type, const Int_t dim, const Int_t level) const;
76 Int_t GetNColTriggerPatches(const Int_t type, const Int_t dim, const Int_t patchType) const ;
77 Int_t GetNRowTriggerPatches(const Int_t type, const Int_t dim, const Int_t patchType) const;
78 Int_t GetTriggerPatchID(const Int_t row, const Int_t col, const Int_t type, const Int_t dim, const Int_t patchType) const;
79 void GetEtaPhiFromTriggerPatchID(const Int_t id, const Int_t type, const Int_t dim, const Int_t level, Double_t &eta, Double_t &phi) const;
81 Double_t GetPatchArea(const Int_t ipatch) const;
82 Double_t GetPatchAreaActive(const Int_t id, const Int_t type, const Int_t ipatch, const Int_t atype) const;
84 TString fTracksOutName; // name of output track array
85 TClonesArray *fTracksOut; //!track array out
86 Bool_t fL1Slide; // sliding window on
88 Double_t fPhiMin[2]; // min phi of EMCal an DCal
89 Double_t fPhiMax[2]; // max phi of EMCal an DCa
90 Double_t fEtaMin[2]; // min eta of EMCal an DCal
91 Double_t fEtaMax[2]; // max eta of EMCal an DCal
92 Double_t fCellSize; // size of cell (equal in eta and phi)
93 Double_t fMinCellE; // minimum cell energy
94 Int_t fExclLeadingPatch; // exclude leading patch from median calculation
96 Int_t fPatchSub; // patch type to use for subtraction
97 Double_t fRhoMean; // mean rho
99 Int_t fNCells; // total number of cells
100 Int_t fNCellsEMCal; // total number of EMCal cells
101 Int_t fNCellsDCal; // total number of DCal cells
102 TArrayD fCellGrid[2]; // grid of cells in EMCal and DCal
103 TArrayD fMiniPatchGrid[2]; // grid of mini patches in EMCal and DCal
104 TArrayI fActiveAreaMP[2]; // active area for each mini patch
105 TArrayD fPatchGrid[2][5]; // grid of trigger patches: 4x4 L0, 4x4 L1, 8x8 L1, 16x16 L1, 32x32 L1
106 TArrayI fActiveAreaMPP[2][5]; // active area in mini patches for each trigger patch
107 TArrayI fActiveAreaCP[2][5]; // active area in cells for each trigger patch
108 Int_t fNPatchesEMCal[5]; // number of patches in EMCal
111 AliEmcalPicoTrackInGridMaker(const AliEmcalPicoTrackInGridMaker&); // not implemented
112 AliEmcalPicoTrackInGridMaker &operator=(const AliEmcalPicoTrackInGridMaker&); // not implemented
114 TH2F *fh2MedianTypeEmcal[3]; //! median vs patch type for 3 types of area calculation
115 TH2F *fh2MedianTypeDcal[3]; //! median vs patch type for 3 types of area calculation
116 TProfile *fpMedianTypeEmcal[3]; //! median vs patch type for 3 types of area calculation
117 TProfile *fpMedianTypeDcal[3]; //! median vs patch type for 3 types of area calculation
118 TH1F *fh1RhoEmcal[5]; //! rho distributions for passive area
119 TH1F *fh1RhoDcal[5]; //! rho distributions for passive area
120 TH2F *fPatchEnVsActivityEmcal[5]; //! patch energy vs active cells
121 TH2F *fPatchEnVsActivityDcal[5]; //! patch energy vs active cells
123 TH1F *fPatchECorr[2][5]; //! corrected patch energy for EMCal and DCal
124 TH1F *fPatchECorrPar[2][5]; //! corrected patch energy with inclusive mean rho for EMCal and DCal
125 TH2F *fPatchECorrRho[2][5]; //! corrected patch energy vs rho opposite side
126 TH2F *fPatchECorrRhoDijet[2][5]; //! corrected patch energy vs rho opposite side
127 TH3F *fPatchECorrECorrRho[2][5]; //! Ecorr,det1 vs Ecorr,det2 vs rho,det2 opposite side for dijet in acceptance like events
128 TH2F *fh2PatchEtaPhiEmcal[5]; //! patch positions in EMCal
129 TH2F *fh2PatchEtaPhiDcal[5]; //! patch positions in DCal
132 TH2F *fh2JetPtPatchECorr[2][5]; //! jet pt vs leading patch energy
134 TH2F *fMultVsRho; //! track multiplicity vs rho from EMCal
136 ClassDef(AliEmcalPicoTrackInGridMaker, 2); // Task to make PicoTracks in a grid corresponding to EMCAL/DCAL acceptance