AliPhysics  8d00e07 (8d00e07)
AliJetResponseMaker.h
Go to the documentation of this file.
1 #ifndef ALIJETRESPONSEMAKER_H
2 #define ALIJETRESPONSEMAKER_H
3 /**************************************************************************
4 * Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
5 * *
6 * Author: The ALICE Off-line Project. *
7 * Contributors are mentioned in the code where appropriate. *
8 * *
9 * Permission to use, copy, modify and distribute this software and its *
10 * documentation strictly for non-commercial purposes is hereby granted *
11 * without fee, provided that the above copyright notice appears in all *
12 * copies and that both the copyright notice and this permission notice *
13 * appear in the supporting documentation. The authors make no claims *
14 * about the suitability of this software for any purpose. It is *
15 * provided "as is" without express or implied warranty. *
16 **************************************************************************/
17 
18 //-----------------------------------------------------------------------
19 // Author : Salvatore Aiola, Yale University, salvatore.aiola@cern.ch
20 //-----------------------------------------------------------------------
21 
22 class TClonesArray;
23 class TH2;
24 class THnSparse;
25 class AliNamedArrayI;
26 
27 #include "AliEmcalJet.h"
29 #include "AliEmcalEmbeddingQA.h"
30 
32  public:
34  AliJetResponseMaker(const char *name);
35  virtual ~AliJetResponseMaker();
36 
40  kMCLabel = 2,
42  };
43 
45 
49  void SetMinJetMCPt(Float_t pt) { fMinJetMCPt = pt ; }
50  void SetHistoType(Int_t b) { fHistoType = b ; }
51  void SetDeltaPtAxis(Int_t b) { fDeltaPtAxis = b ; }
53  void SetNEFAxis(Int_t b) { fNEFAxis = b ; }
54  void SetZAxis(Int_t b) { fZAxis = b ; }
57  void SetZgAxis(Int_t b) { fZgAxis = b ; }
58  void SetdRAxis(Int_t b) { fdRAxis = b ; }
59  void SetPtgAxis(Int_t b) { fPtgAxis = b ; }
60  void SetDBCAxis(Int_t b) { fDBCAxis = b ; }
62 
64  const char *ntracks1 = "Tracks",
65  const char *nclusters1 = "CaloClusters",
66  const char *njets1 = "Jets",
67  const char *nrho1 = "Rho",
68  const Double_t jetradius1 = 0.2,
69  const char *ntracks2 = "MCParticles",
70  const char *nclusters2 = "",
71  const char *njets2 = "MCJets",
72  const char *nrho2 = "",
73  const Double_t jetradius2 = 0.2,
74  const Double_t jetptcut = 1,
75  const Double_t jetareacut = 0.557,
76  const Double_t jetBias = 5,
77  const Int_t biasType = 0, // 0 = charged, 1 = neutral, 2 = both
79  const Double_t maxDistance1 = 0.25,
80  const Double_t maxDistance2 = 0.25,
81  const char *cutType = "TPC",
82  const Int_t ptHardBin = -999,
83  const Double_t minCent = -999,
84  const Double_t maxCent = -999,
85  const char *taskname = "AliJetResponseMaker",
86  const Bool_t biggerMatrix = kFALSE,
87  AliJetResponseMaker* address = 0,
88  const Double_t nefmincut = -10,
89  const Double_t nefmaxcut = 10,
90  const Int_t jetTagging = 0,
91  const Double_t maxTrackPt = 100);
92 
93  protected:
94  void ExecOnce();
95  void DoJetLoop();
97  Bool_t Run();
99  void SetMatchingLevel(AliEmcalJet *jet1, AliEmcalJet *jet2, MatchingType matching);
100  void GetGeometricalMatchingLevel(AliEmcalJet *jet1, AliEmcalJet *jet2, Double_t &d) const;
101  void GetMCLabelMatchingLevel(AliEmcalJet *jet1, AliEmcalJet *jet2, Double_t &d1, Double_t &d2) const;
102  void GetSameCollectionsMatchingLevel(AliEmcalJet *jet1, AliEmcalJet *jet2, Double_t &d1, Double_t &d2) const;
103  void FillMatchingHistos(AliEmcalJet* jet1, AliEmcalJet* jet2, Double_t d, Double_t CE1, Double_t CE2);
104  void FillJetHisto(AliEmcalJet* jet, Int_t Set);
105  void AllocateTH2();
106  void AllocateTHnSparse();
107  Double_t GetRelativeEPAngle(Double_t jetAngle, Double_t epAngle) const;
108 
109  MatchingType fMatching; // matching type
110  Double_t fMatchingPar1; // matching parameter for jet1-jet2 matching
111  Double_t fMatchingPar2; // matching parameter for jet2-jet1 matching
112  Bool_t fUseCellsToMatch; // use cells instead of clusters to match jets (slower but sometimes needed)
113  Double_t fMinJetMCPt; // minimum jet MC pt
115  Int_t fHistoType; // histogram type (0=TH2, 1=THnSparse)
116  Int_t fDeltaPtAxis; // add delta pt axis in THnSparse (default=0)
117  Int_t fDeltaEtaDeltaPhiAxis; // add delta eta and delta phi axes in THnSparse (default=0)
118  Int_t fNEFAxis; // add NEF axis in matching THnSparse (default=0)
119  Int_t fZAxis; // add Z axis in matching THnSparse (default=0)
120  Int_t fFlavourZAxis; // add flavour Z axis in matching THnSparse (default=0)
121  Int_t fFlavourPtAxis; // add flavour pt axis in matching THnSparse (default=0)
122  Int_t fZgAxis; // add Zg axis in matching THnSparse (default=0)
123  Int_t fdRAxis; // add dR axis in matching THnSparse (default=0)
124  Int_t fPtgAxis; // add Ptg axis in matching THnSparse (default=0)
125  Int_t fDBCAxis; // add DBC (number of soft dropped branches) axis in matching THnSparse (default=0)
127 
130 
133 
134  // THnSparse
135  THnSparse *fHistJets1;
136  THnSparse *fHistJets2;
137  THnSparse *fHistMatching;
138 
139  // Jets 1
146 
147  // Jets 2
154 
155  // Jet1-Jet2 matching
164 
178 
190 
202 
203  private:
204  AliJetResponseMaker(const AliJetResponseMaker&); // not implemented
205  AliJetResponseMaker &operator=(const AliJetResponseMaker&); // not implemented
206 
207  ClassDef(AliJetResponseMaker, 29) // Jet response matrix producing task
208 };
209 #endif
TH2 * fHistJets2PtArea
phi-eta distribution of jets 2
TH2 * fHistRejectionReason1
whether the jet2 collection has to be average subtracted
TH2 * fHistJets2CorrPtArea
inclusive jet pt vs. area histogram 2
double Double_t
Definition: External.C:58
TH2 * fHistDeltaPtvsCommonEnergy1
delta pt between matched jets vs distance
TH2 * fHistJet2PtOverJet1PtvsJet2Pt
delta eta vs delta phi of matched jets
Bool_t FillHistograms()
Function filling histograms.
TH2 * fHistDeltaPtvsDeltaArea
delta pt between matched jets vs jet 2 area
void SetFlavourPtAxis(Int_t b)
TH2 * fHistJets2PhiEta
Constituent Pt over Jet Pt ratio vs. jet pt 1.
TH2 * fHistDeltaCorrPtvsArea2
delta pt corr between matched jets vs jet 1 area
void FillJetHisto(AliEmcalJet *jet, Int_t Set)
void SetDeltaPtAxis(Int_t b)
Int_t fJetRelativeEPAngle
add jet angle relative to the EP in matching THnSparse (default=0)
AliEmcalEmbeddingQA fEmbeddingQA
! Embedding QA hists (will only be added if embedding)
void GetSameCollectionsMatchingLevel(AliEmcalJet *jet1, AliEmcalJet *jet2, Double_t &d1, Double_t &d2) const
TH2 * fHistDeltaMCPtvsCommonEnergy2
jet 1 MC pt - jet2 pt vs common energy 1 (%)
void SetMinJetMCPt(Float_t pt)
TH2 * fHistJets1ZvsPt
Jet charged energy fraction vs. charged jet pt 1.
Double_t GetRelativeEPAngle(Double_t jetAngle, Double_t epAngle) const
THnSparse * fHistMatching
jet2 THnSparse
TH2 * fHistDeltaEtaDeltaPhi
common energy 1 (%) vs common energy 2 (%)
TH2 * fHistDeltaMCPtvsCommonEnergy1
jet 1 MC pt - jet2 pt vs distance
TH2 * fHistDeltaCorrPtOverJet2CorrPtvsJet2CorrPt
delta pt corr / jet 1 corr pt between matched jets vs jet 1 corr pt
TH2 * fHistCommonEnergy1vsCommonEnergy2
distance vs common energy 2 (%)
TH2 * fHistDeltaPtvsCommonEnergy2
delta pt between matched jets vs common energy 1 (%)
TH2 * fHistDeltaMCPtvsDistance
jet 1 MC pt - jet2 pt vs jet 2 pt
void SetJetRelativeEPAngleAxis(Int_t b)
QA Class for EMCal Embedding Framework.
TH2 * fHistJets1NEFvsPt
inclusive jet pt vs. area histogram 1
TH2 * fHistJets2ZvsPt
Jet charged energy fraction vs. charged jet pt 2.
Bool_t fIsJet2Rho
whether the jet1 collection has to be average subtracted
TH2 * fHistDeltaPtvsJet1Pt
jet 1 pt over jet 2 pt vs jet 1 pt
TH2 * fHistDeltaCorrPtvsCommonEnergy2
delta pt corr between matched jets vs common energy 1 (%)
TH2 * fHistDeltaPtvsJet2Pt
delta pt between matched jets vs jet 1 pt
TH2 * fHistJets1PhiEta
matching THnSparse
int Int_t
Definition: External.C:63
THnSparse * fHistJets1
Rejection reason vs. jet pt.
float Float_t
Definition: External.C:68
TH2 * fHistJet1PtOverJet2PtvsJet1Pt
jet 2 pt over jet 1 pt vs jet 2 pt
void SetPtHardBin(Int_t b)
TH2 * fHistDeltaCorrPtvsDistance
delta pt corr between matched jets vs jet 2 corr pt
void FillMatchingHistos(AliEmcalJet *jet1, AliEmcalJet *jet2, Double_t d, Double_t CE1, Double_t CE2)
void ExecOnce()
Perform steps needed to initialize the analysis.
TH2 * fHistJet1PtvsJet2Pt
delta pt between matched jets vs delta area
TH2 * fHistDeltaCorrPtvsJet1CorrPt
delta pt corr / jet 2 corr pt between matched jets vs jet 2 corr pt
TH2 * fHistDeltaMCPtOverJet2PtvsJet2Pt
jet 1 MC pt - jet2 pt / jet 1 MC pt vs jet 1 pt
TH2 * fHistDistancevsCommonEnergy2
distance vs common energy 1 (%)
void SetMatching(MatchingType t, Double_t p1=1, Double_t p2=1)
TH2 * fHistRejectionReason2
Rejection reason vs. jet pt.
TH2 * fHistDistancevsJet1Pt
common energy 2 (%) vs jet 2 pt
TH2 * fHistDeltaMCPtOverJet1MCPtvsJet1MCPt
correlation jet 1 corr pt vs jet 2 corr pt
Int_t fSelectPtHardBin
select one pt hard bin for analysis
static AliJetResponseMaker * AddTaskJetResponseMaker(const char *ntracks1="Tracks", const char *nclusters1="CaloClusters", const char *njets1="Jets", const char *nrho1="Rho", const Double_t jetradius1=0.2, const char *ntracks2="MCParticles", const char *nclusters2="", const char *njets2="MCJets", const char *nrho2="", const Double_t jetradius2=0.2, const Double_t jetptcut=1, const Double_t jetareacut=0.557, const Double_t jetBias=5, const Int_t biasType=0, const AliJetResponseMaker::MatchingType matching=AliJetResponseMaker::kGeometrical, const Double_t maxDistance1=0.25, const Double_t maxDistance2=0.25, const char *cutType="TPC", const Int_t ptHardBin=-999, const Double_t minCent=-999, const Double_t maxCent=-999, const char *taskname="AliJetResponseMaker", const Bool_t biggerMatrix=kFALSE, AliJetResponseMaker *address=0, const Double_t nefmincut=-10, const Double_t nefmaxcut=10, const Int_t jetTagging=0, const Double_t maxTrackPt=100)
TH2 * fHistDeltaPtOverJet1PtvsJet1Pt
delta pt between matched jets vs jet 2 pt
TH2 * fHistDeltaCorrPtvsArea1
delta pt corr between matched jets vs common energy 2 (%)
Bool_t Run()
Run function. This is the core function of the analysis and contains the user code. Therefore users have to implement this function.
TH2 * fHistCommonEnergy1vsJet1Pt
Constituent Pt over Jet Pt ratio vs. jet pt 2.
void SetMatchingLevel(AliEmcalJet *jet1, AliEmcalJet *jet2, MatchingType matching)
TH2 * fHistJets1CorrPtArea
inclusive jet pt vs. area histogram 1
TH2 * fHistDeltaMCPtvsJet1MCPt
jet 1 MC pt - jet2 pt / jet 2 pt vs jet 2 pt
TH2 * fHistDeltaMCPtvsArea2
jet 1 MC pt - jet2 pt vs jet 1 area
void SetHistoType(Int_t b)
TH2 * fHistDeltaMCPtvsJet2Pt
jet 1 MC pt - jet2 pt vs jet 1 MC pt
Definition: External.C:220
TH2 * fHistDistancevsJet2Pt
distance vs jet 1 pt
TH2 * fHistDeltaPtvsArea1
delta pt between matched jets vs common energy 2 (%)
TH2 * fHistDeltaCorrPtvsJet2CorrPt
delta pt corr between matched jets vs jet 1 corr pt
void GetGeometricalMatchingLevel(AliEmcalJet *jet1, AliEmcalJet *jet2, Double_t &d) const
THnSparse * fHistJets2
jet1 THnSparse
TH2 * fHistDeltaPtOverJet2PtvsJet2Pt
delta pt / jet 1 pt between matched jets vs jet 1 pt
TH2 * fHistDeltaPtvsArea2
delta pt between matched jets vs jet 1 area
TH2 * fHistJets2NEFvsPt
inclusive jet pt vs. area histogram 2
void SetDeltaEtaDeltaPhiAxis(Int_t b)
Base task in the EMCAL jet framework.
Represent a jet reconstructed using the EMCal jet framework.
Definition: AliEmcalJet.h:51
TH2 * fHistCommonEnergy2vsJet2Pt
common energy 1 (%) vs jet 1 pt
TH2 * fHistDeltaPtvsDistance
delta pt / jet 2 pt between matched jets vs jet 2 pt
TH2 * fHistJet1MCPtvsJet2Pt
jet 1 MC pt - jet2 pt vs delta area
TH2 * fHistJets2CEFvsCEFPt
Jet neutral energy fraction vs. jet pt 2.
TH2 * fHistDistancevsCommonEnergy1
distance vs jet 2 pt
TH2 * fHistJets1CEFvsCEFPt
Jet neutral energy fraction vs. jet pt 1.
bool Bool_t
Definition: External.C:53
void SetUseCellsToMatch(Bool_t i)
TH2 * fHistDeltaMCPtvsArea1
jet 1 MC pt - jet2 pt vs common energy 2 (%)
TH2 * fHistDeltaCorrPtOverJet1CorrPtvsJet1CorrPt
correlation jet 1 pt vs jet 2 pt
TH2 * fHistJets1PtArea
phi-eta distribution of jets 1
TH2 * fHistDeltaMCPtvsDeltaArea
jet 1 MC pt - jet2 pt vs jet 2 area
TH2 * fHistDeltaCorrPtvsCommonEnergy1
delta pt corr between matched jets vs distance
void GetMCLabelMatchingLevel(AliEmcalJet *jet1, AliEmcalJet *jet2, Double_t &d1, Double_t &d2) const
AliJetResponseMaker & operator=(const AliJetResponseMaker &)
void SetFlavourZAxis(Int_t b)
TH2 * fHistJet1CorrPtvsJet2CorrPt
delta pt corr between matched jets vs delta area
TH2 * fHistDeltaCorrPtvsDeltaArea
delta pt corr between matched jets vs jet 2 area