AliPhysics  fde8a9f (fde8a9f)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliEmcalPicoTrackInGridMaker.h
Go to the documentation of this file.
1 #ifndef ALIEMCALPICOTRACKINGRIDMAKER_H
2 #define ALIEMCALPICOTRACKINGRIDMAKER_H
3 
4 class TClonesArray;
5 class AliVTrack;
6 class AliVParticle;
7 class TProfile;
8 class TH3F;
9 class AliEmcalJet;
10 
12 
14  public:
16  AliEmcalPicoTrackInGridMaker(const char *name);
18 
19  void SetTracksOutName(const char *name) { fTracksOutName = name; }
20 
21  void SetCellSize(Double_t a) { fCellSize = a; }
22  void SetMinCellE(Double_t e) { fMinCellE = e; }
23  void SetL1Slide(Bool_t b) { fL1Slide = b; }
24 
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; }
27 
29 
32  void SetMeanRho(Double_t r) { fRhoMean = r; }
33 
34  protected:
36  Bool_t Run();
37 
38  Bool_t InitCells();
41  void PrintAcceptance() const;
42 
45  Bool_t CreateGridPatches(const Int_t dim, const Int_t level);
46 
47  Bool_t InitPatches(const Int_t dim, const Int_t level); //give dimension in cell units
48 
49  AliEmcalJet* GetClosestJet(const Double_t eta, const Double_t phi, const Int_t icont = 0) const;
50 
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;
53 
54  //Getters
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());}
57 
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;
64 
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;
69 
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;
80 
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;
83 
84  TString fTracksOutName; // name of output track array
85  TClonesArray *fTracksOut;
86  Bool_t fL1Slide; // sliding window on
87 
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
95 
96  Int_t fPatchSub; // patch type to use for subtraction
97  Double_t fRhoMean; // mean rho
98 
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
109 
110  private:
113 
116  TProfile *fpMedianTypeEmcal[3];
117  TProfile *fpMedianTypeDcal[3];
118  TH1F *fh1RhoEmcal[5];
119  TH1F *fh1RhoDcal[5];
122 
123  TH1F *fPatchECorr[2][5];
124  TH1F *fPatchECorrPar[2][5];
125 
126  TH1F *fPatchERaw[2][5];
131 
132  //jet histos
134 
136 
137  ClassDef(AliEmcalPicoTrackInGridMaker, 3); // Task to make PicoTracks in a grid corresponding to EMCAL/DCAL acceptance
138 };
139 #endif
void GetEtaPhiFromMiniPatchID(const Int_t id, const Int_t type, Double_t &eta, Double_t &phi) const
Bool_t InitPatches(const Int_t dim, const Int_t level)
TH1F * fPatchECorrPar[2][5]
corrected patch energy for EMCal and DCal
double Double_t
Definition: External.C:58
Definition: External.C:260
Definition: External.C:236
void SetEMCalAcceptance(Double_t phiMin, Double_t phiMax, Double_t etaMin, Double_t etaMax)
void GetEtaPhiFromGridID(const Int_t id, const Int_t type, Double_t &eta, Double_t &phi) const
Int_t GetTriggerPatchID(const Int_t row, const Int_t col, const Int_t type, const Int_t dim, const Int_t patchType) const
ClassDef(AliEmcalPicoTrackInGridMaker, 3)
track multiplicity vs rho from EMCal
TProfile * fpMedianTypeDcal[3]
median vs patch type for 3 types of area calculation
Bool_t CreateGridPatches(const Int_t dim, const Int_t level)
Int_t GetMiniPatchID(const Int_t row, const Int_t col, const Int_t type) const
Int_t GetCellType(const AliVParticle *vp) const
Int_t GetPatchDim(const Int_t ipatch) const
Int_t GetNColTriggerPatches(const Int_t type, const Int_t dim, const Int_t patchType) const
TH1F * fh1RhoEmcal[5]
median vs patch type for 3 types of area calculation
void SetPatchTypeForSubtraction(Int_t dim, Int_t lev)
AliEmcalPicoTrackInGridMaker & operator=(const AliEmcalPicoTrackInGridMaker &)
TH2F * fPatchEnVsActivityDcal[5]
patch energy vs active cells
Int_t GetNRowTriggerPatches(const Int_t type, const Int_t dim, const Int_t patchType) const
Int_t GetSlidingStepSizeMiniPatches(const Int_t dim, const Int_t level=1) const
TH2F * fMultVsRho
jet pt vs leading patch energy
int Int_t
Definition: External.C:63
TH2F * fPatchEnVsActivityEmcal[5]
rho distributions for passive area
Double_t CalculateMedian(const Int_t patchType, const Int_t type, const Int_t areaType=0)
Int_t GetNCellsCol(const Int_t type) const
Int_t GetNCellsRow(const Int_t type) const
Int_t GetNTriggerPatches(const Int_t type, const Int_t dim, const Int_t level) const
AliEmcalJet * GetClosestJet(const Double_t eta, const Double_t phi, const Int_t icont=0) const
TH1F * fPatchECorr[2][5]
patch energy vs active cells
Int_t GetSlidingStepSizeCells(const Int_t dim, const Int_t level=1) const
TH2F * fh2PatchEtaPhiEmcal[5]
Ecorr,det1 vs Ecorr,det2 vs rho,det2 opposite side for dijet in acceptance like events.
Int_t GetNRowMiniPatches(const Int_t type) const
TH3F * fPatchECorrECorrRho[2][5]
corrected patch energy vs rho opposite side
Int_t GetCellType(const Double_t eta, const Double_t phi) const
TH2F * fh2MedianTypeDcal[3]
median vs patch type for 3 types of area calculation
Double_t GetPatchAreaActive(const Int_t id, const Int_t type, const Int_t ipatch, const Int_t atype) const
TH1F * fPatchERaw[2][5]
corrected patch energy with inclusive mean rho for EMCal and DCal
Base task in the EMCAL jet framework.
Represent a jet reconstructed using the EMCal jet framework.
Definition: AliEmcalJet.h:44
Double_t GetPatchArea(const Int_t ipatch) const
TProfile * fpMedianTypeEmcal[3]
median vs patch type for 3 types of area calculation
TH1F * fh1RhoDcal[5]
rho distributions for passive area
bool Bool_t
Definition: External.C:53
Int_t GetGridID(const AliVParticle *vp) const
TH2F * fh2JetPtPatchECorr[2][5]
patch positions in DCal
TH2F * fPatchECorrRho[2][5]
uncorrected patch energy for EMCal and DCal
Int_t GetTriggerPatchIdStepSizeNoOverlap(const Int_t dim, const Int_t level=1) const
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
Int_t GetNColMiniPatches(const Int_t type) const
Double_t CalculateSum(const Int_t patchType) const
void SetDCalAcceptance(Double_t phiMin, Double_t phiMax, Double_t etaMin, Double_t etaMax)
TH2F * fh2PatchEtaPhiDcal[5]
patch positions in EMCal
Int_t GetPatchType(const Int_t dim, const Int_t level) const