AliPhysics  8bb951a (8bb951a)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliJetContainer.h
Go to the documentation of this file.
1 #ifndef AliJetContainer_H
2 #define AliJetContainer_H
3 
4 class TClonesArray;
5 class TString;
6 
7 class AliEMCALGeometry;
8 class AliEmcalJet;
9 class AliVEvent;
13 
14 #include <TMath.h>
15 #include <TLorentzVector.h>
16 #include "AliRhoParameter.h"
17 #include "AliParticleContainer.h"
18 #include "AliLog.h"
19 #include "AliVEvent.h"
20 #include "AliEmcalJet.h"
21 
23  public:
24 
25  enum EJetType_t {
29  };
30 
31  enum EJetAlgo_t {
40  };
41 
43  E_scheme = 0,
44  pt_scheme = 1,
46  Et_scheme = 3,
51  };
52 
54  kTPC , // TPC acceptance
55  kTPCfid , // TPC fiducial acceptance
56  kEMCAL , // EMCal acceptance
57  kEMCALfid , // EMCal fiducial acceptance
58  kDCAL , // DCal acceptance
59  kDCALfid , // DCal fiducial acceptance
60  kUser // User defined acceptance
61  };
62 
64  AliJetContainer(const char *name);
65  AliJetContainer(EJetType_t jetType, EJetAlgo_t jetAlgo, ERecoScheme_t recoScheme, Double_t radius, AliParticleContainer* partCont, AliClusterContainer* clusCont, TString tag);
66  virtual ~AliJetContainer() {;}
67 
68  void LoadRho(AliVEvent *event);
69  void LoadLocalRho(AliVEvent *event);
70  void LoadRhoMass(AliVEvent *event);
71 
73  void PrintCuts();
74  void ResetCuts();
75  void SetJetEtaLimits(Float_t min, Float_t max) { SetEtaLimits(min, max) ; }
76  void SetJetPhiLimits(Float_t min, Float_t max) { SetPhiLimits(min, max) ; }
77  void SetJetPtCut(Float_t cut) { SetMinPt(cut) ; }
78  void SetJetPtCutMax(Float_t cut) { SetMaxPt(cut) ; }
79  void SetJetEtaPhiEMCAL(Double_t r=0.) ;
80  void SetJetEtaPhiDCAL(Double_t r=0.) ;
81  void SetJetEtaPhiTPC(Double_t r=0.) ;
82  void SetRunNumber(Int_t r) { fRunNumber = r; }
83  void SetJetRadius(Float_t r) { fJetRadius = r ; }
84  void SetJetAreaCut(Float_t cut) { fJetAreaCut = cut ; }
85  void SetPercAreaCut(Float_t p) { if(fJetRadius==0.) AliWarning("JetRadius not set. Area cut will be 0");
86  fJetAreaCut = p*TMath::Pi()*fJetRadius*fJetRadius; }
87  void SetAreaEmcCut(Double_t a = 0.99) { fAreaEmcCut = a ; }
88  void SetZLeadingCut(Float_t zemc, Float_t zch) { fZLeadingEmcCut = zemc; fZLeadingChCut = zch ; }
89  void SetNEFCut(Float_t min = 0., Float_t max = 1.) { fNEFMinCut = min; fNEFMaxCut = max; }
90  void SetFlavourCut(Int_t myflavour) { fFlavourSelection = myflavour;}
91  void SetMinClusterPt(Float_t b) { fMinClusterPt = b ; }
92  void SetMaxClusterPt(Float_t b) { fMaxClusterPt = b ; }
93  void SetMinTrackPt(Float_t b) { fMinTrackPt = b ; }
94  void SetMaxTrackPt(Float_t b) { fMaxTrackPt = b ; }
95  void SetPtBiasJetClus(Float_t b) { SetMinClusterPt(b) ; }
96  void SetNLeadingJets(Int_t t) { fNLeadingJets = t ; }
97  void SetMinNConstituents(Int_t n) { fMinNConstituents = n ; }
98  void SetPtBiasJetTrack(Float_t b) { SetMinTrackPt(b) ; }
99  void SetLeadingHadronType(Int_t t) { fLeadingHadronType = t ; }
100  void SetJetTrigger(UInt_t t=AliVEvent::kEMCEJE) { fJetTrigger = t ; }
101  void SetTagStatus(Int_t i) { fTagStatus = i ; }
102 
103  void SetRhoName(const char *n) { fRhoName = n ; }
104  void SetLocalRhoName(const char *n) { fLocalRhoName = n ; }
105  void SetRhoMassName(const char *n) { fRhoMassName = n ; }
106 
109 
110  AliEmcalJet *GetLeadingJet(const char* opt="") ;
111  AliEmcalJet *GetJet(Int_t i) const;
112  AliEmcalJet *GetAcceptJet(Int_t i) const;
113  AliEmcalJet *GetJetWithLabel(Int_t lab) const;
114  AliEmcalJet *GetAcceptJetWithLabel(Int_t lab) const;
117  Bool_t GetMomentumFromJet(TLorentzVector &mom, const AliEmcalJet* jet, Double_t mass) const;
118  Bool_t GetMomentumFromJet(TLorentzVector &mom, const AliEmcalJet* jet) const;
119  Bool_t GetMomentum(TLorentzVector &mom, Int_t i) const;
120  Bool_t GetAcceptMomentum(TLorentzVector &mom, Int_t i) const;
121  Bool_t GetNextMomentum(TLorentzVector &mom);
122  Bool_t GetNextAcceptMomentum(TLorentzVector &mom);
123  virtual Bool_t AcceptObject(Int_t i, UInt_t &rejectionReason) const { return AcceptJet(i, rejectionReason);}
124  virtual Bool_t AcceptObject(const TObject* obj, UInt_t &rejectionReason) const { return AcceptJet(dynamic_cast<const AliEmcalJet*>(obj), rejectionReason);}
125  virtual Bool_t AcceptJet(Int_t i, UInt_t &rejectionReason) const;
126  virtual Bool_t AcceptJet(const AliEmcalJet* jet, UInt_t &rejectionReason) const;
127  virtual Bool_t ApplyJetCuts(const AliEmcalJet* clus, UInt_t &rejectionReason) const;
128  Int_t GetFlavourCut() const {return fFlavourSelection;}
129  Int_t GetNJets() const {return GetNEntries();}
130  Int_t GetNAcceptedJets() ;
131 
132  Double_t GetLeadingHadronPt(const AliEmcalJet* jet) const;
133  void GetLeadingHadronMomentum(TLorentzVector &mom, const AliEmcalJet* jet) const;
134  Double_t GetZ(const AliEmcalJet *jet, TLorentzVector mom) const;
135  Double_t GetZLeadingEmc(const AliEmcalJet *jet) const;
136  Double_t GetZLeadingCharged(const AliEmcalJet *jet) const;
138  Double_t GetRhoVal() const {if (fRho) return fRho->GetVal(); else return 0;}
139  const TString& GetRhoName() const {return fRhoName;}
141  const TString& GetLocalRhoName() const {return fLocalRhoName;}
143  Double_t GetRhoMassVal() const {if (fRhoMass) return fRhoMass->GetVal(); else return 0;}
144  const TString& GetRhoMassName() const {return fRhoMassName;}
145  Double_t GetJetPtCorr(Int_t i) const;
146  Double_t GetJetPtCorrLocal(Int_t i) const;
147  Float_t GetJetRadius() const {return fJetRadius ; }
148  Double_t GetJetEtaMin() const {return GetMinEta(); }
149  Double_t GetJetEtaMax() const {return GetMaxEta(); }
150  Double_t GetJetPhiMin() const {return GetMinPhi(); }
151  Double_t GetJetPhiMax() const {return GetMaxPhi(); }
152  Double_t GetJetPtCut() const {return GetMinPt() ; }
153  Double_t GetJetPtCutMax() const {return GetMaxPt() ; }
154 
155  void SetArray(AliVEvent *event);
158  Double_t GetFractionSharedPt(const AliEmcalJet *jet, AliParticleContainer *cont2 = 0x0) const;
159 
160  const char* GetTitle() const;
161 
162  static TString GenerateJetName(EJetType_t jetType, EJetAlgo_t jetAlgo, ERecoScheme_t recoScheme, Double_t radius, AliParticleContainer* partCont, AliClusterContainer* clusCont, TString tag);
163 
164  protected:
165  void SetEMCALGeometry();
166  void SetAcceptanceCuts();
167 
169  Float_t fJetRadius;
170  TString fRhoName;
171  TString fLocalRhoName;
172  TString fRhoMassName;
174  Float_t fJetAreaCut;
175  Float_t fAreaEmcCut;
176  Float_t fMinClusterPt;
177  Float_t fMaxClusterPt;
178  Float_t fMinTrackPt;
179  Float_t fMaxTrackPt;
180  Float_t fZLeadingEmcCut;
181  Float_t fZLeadingChCut;
182  Float_t fNEFMinCut;
183  Float_t fNEFMaxCut;
187  UInt_t fJetTrigger;
188  Int_t fTagStatus;
194  AliEMCALGeometry *fGeom;
195  Int_t fRunNumber;
196 
197  private:
198  AliJetContainer(const AliJetContainer& obj); // copy constructor
199  AliJetContainer& operator=(const AliJetContainer& other); // assignment
200 
202 };
203 
204 #endif
void SetAreaEmcCut(Double_t a=0.99)
UInt_t fJetTrigger
minimum number of constituents in jet
ClassDef(AliJetContainer, 15)
void SetArray(AliVEvent *event)
Float_t fMinTrackPt
maximum cluster constituent pt to accept the jet
Double_t GetZ(const AliEmcalJet *jet, TLorentzVector mom) const
Float_t fJetAreaCut
selection on jet flavour
Double_t GetRhoVal() const
Float_t fJetRadius
acceptance type
const TString & GetRhoName() const
Double_t GetJetEtaMin() const
AliRhoParameter * fRhoMass
! event rho mass for these jets
Double_t GetMinPhi() const
virtual Bool_t ApplyJetCuts(const AliEmcalJet *clus, UInt_t &rejectionReason) const
void LoadRhoMass(AliVEvent *event)
AliRhoParameter * fRho
cluster container (jet constituents)
Double_t GetJetPhiMax() const
Double_t GetMaxEta() const
void SetLeadingHadronType(Int_t t)
JetAcceptanceType fJetAcceptanceType
Double_t mass
void SetPtBiasJetTrack(Float_t b)
void SetMinNConstituents(Int_t n)
const TString & GetLocalRhoName() const
Float_t fNEFMinCut
maximum z,leading charged
Double_t GetJetEtaMax() const
AliClusterContainer * GetClusterContainer() const
void SetMinPt(Double_t min)
Double_t GetJetPtCorrLocal(Int_t i) const
AliJetContainer & operator=(const AliJetContainer &other)
virtual Bool_t AcceptJet(Int_t i, UInt_t &rejectionReason) const
void LoadLocalRho(AliVEvent *event)
Double_t GetJetPtCutMax() const
void SetPercAreaCut(Float_t p)
AliParticleContainer * fParticleContainer
jet tag status
void SetEtaLimits(Double_t min, Double_t max)
AliEmcalJet * GetAcceptJetWithLabel(Int_t lab) const
void SetPtBiasJetClus(Float_t b)
Bool_t GetMomentum(TLorentzVector &mom, Int_t i) const
static TString GenerateJetName(EJetType_t jetType, EJetAlgo_t jetAlgo, ERecoScheme_t recoScheme, Double_t radius, AliParticleContainer *partCont, AliClusterContainer *clusCont, TString tag)
Container for particles within the EMCAL framework.
AliLocalRhoParameter * fLocalRho
! event local rho for these jets
Float_t fAreaEmcCut
cut on jet area
const TString & GetRhoMassName() const
void SetRhoName(const char *n)
Int_t fLeadingHadronType
maximum NEF in a jet
AliParticleContainer * GetParticleContainer() const
AliEmcalJet * GetLeadingJet(const char *opt="")
void GetLeadingHadronMomentum(TLorentzVector &mom, const AliEmcalJet *jet) const
Bool_t GetAcceptMomentum(TLorentzVector &mom, Int_t i) const
void SetMinTrackPt(Float_t b)
Double_t GetMaxPhi() const
Double_t GetJetPhiMin() const
Int_t fRunNumber
! run number
void SetJetRadius(Float_t r)
void SetJetPtCut(Float_t cut)
Double_t GetMinEta() const
Double_t GetLeadingHadronPt(const AliEmcalJet *jet) const
void LoadRho(AliVEvent *event)
void SetNLeadingJets(Int_t t)
Double_t GetMinPt() const
void SetJetPhiLimits(Float_t min, Float_t max)
Float_t fMaxClusterPt
maximum cluster constituent pt to accept the jet
Bool_t GetNextAcceptMomentum(TLorentzVector &mom)
const char * GetTitle() const
Int_t GetNJets() const
void SetMinClusterPt(Float_t b)
AliEmcalJet * GetJetWithLabel(Int_t lab) const
Float_t fMinClusterPt
minimum cut on jet emcal area
void SetMaxPt(Double_t max)
void SetRhoMassName(const char *n)
TString fLocalRhoName
Name of rho object.
Double_t GetJetPtCut() const
Double_t GetRhoMassVal() const
Float_t fZLeadingChCut
maximum z,leading neutral
virtual Bool_t AcceptObject(Int_t i, UInt_t &rejectionReason) const
void SetJetAcceptanceType(JetAcceptanceType type)
AliEmcalJet * GetNextAcceptJet()
AliRhoParameter * GetRhoParameter()
virtual ~AliJetContainer()
void SetJetEtaPhiDCAL(Double_t r=0.)
void ConnectParticleContainer(AliParticleContainer *c)
AliEmcalJet * GetNextJet()
AliEMCALGeometry * fGeom
! emcal geometry
Float_t GetJetRadius() const
Int_t fNLeadingJets
0 = charged, 1 = neutral, 2 = both
TString fRhoMassName
Name of local rho object.
Double_t GetZLeadingCharged(const AliEmcalJet *jet) const
Int_t GetFlavourCut() const
AliLocalRhoParameter * GetLocalRhoParameter() const
Int_t fTagStatus
jet trigger
void SetJetTrigger(UInt_t t=AliVEvent::kEMCEJE)
void SetLocalRhoName(const char *n)
Float_t fZLeadingEmcCut
maximum track constituent pt to accept the jet
void SetTagStatus(Int_t i)
AliEmcalJet * GetAcceptJet(Int_t i) const
void SetRunNumber(Int_t r)
Double_t GetZLeadingEmc(const AliEmcalJet *jet) const
Float_t fMaxTrackPt
maximum track constituent pt to accept the jet
void SetJetEtaPhiTPC(Double_t r=0.)
Double_t GetFractionSharedPt(const AliEmcalJet *jet, AliParticleContainer *cont2=0x0) const
void SetJetEtaPhiEMCAL(Double_t r=0.)
void SetMaxClusterPt(Float_t b)
AliRhoParameter * GetRhoMassParameter()
Int_t GetNEntries() const
void SetPhiLimits(Double_t min, Double_t max)
Float_t fNEFMaxCut
minimum NEF in a jet
Bool_t GetMomentumFromJet(TLorentzVector &mom, const AliEmcalJet *jet, Double_t mass) const
void ConnectClusterContainer(AliClusterContainer *c)
void SetMaxTrackPt(Float_t b)
void SetJetEtaLimits(Float_t min, Float_t max)
AliClusterContainer * fClusterContainer
particle container (jet constituents)
Bool_t GetNextMomentum(TLorentzVector &mom)
Container structure for EMCAL clusters.
Double_t GetMaxPt() const
void SetZLeadingCut(Float_t zemc, Float_t zch)
Int_t fMinNConstituents
how many jets are to be considered the leading jet(s)
void SetFlavourCut(Int_t myflavour)
void SetJetPtCutMax(Float_t cut)
void SetJetAreaCut(Float_t cut)
void SetNEFCut(Float_t min=0., Float_t max=1.)
TString fRhoName
jet radius
virtual Bool_t AcceptObject(const TObject *obj, UInt_t &rejectionReason) const
AliEmcalJet * GetJet(Int_t i) const
Double_t GetJetPtCorr(Int_t i) const
Int_t fFlavourSelection
Name of rho mass object.