AliPhysics  b11e70a (b11e70a)
 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 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice */
5 
6 class TClonesArray;
7 class TString;
8 
9 class AliEMCALGeometry;
10 class AliEmcalJet;
11 class AliVEvent;
15 
16 #include <TMath.h>
17 #include <TLorentzVector.h>
18 #include "AliRhoParameter.h"
19 #include "AliParticleContainer.h"
20 #include "AliLog.h"
21 #include "AliVEvent.h"
22 #include "AliEmcalJet.h"
23 
25 
35  public:
36 
37  enum EJetType_t {
41  };
42 
43  enum EJetAlgo_t {
52  };
53 
55  E_scheme = 0,
56  pt_scheme = 1,
58  Et_scheme = 3,
63  };
64 
66  kTPC , // TPC acceptance
67  kTPCfid , // TPC fiducial acceptance
68  kEMCAL , // EMCal acceptance
69  kEMCALfid , // EMCal fiducial acceptance
70  kDCAL , // DCal acceptance
71  kDCALfid , // DCal fiducial acceptance
72  kUser // User defined acceptance
73  };
74 
76  AliJetContainer(const char *name);
77  AliJetContainer(EJetType_t jetType, EJetAlgo_t jetAlgo, ERecoScheme_t recoScheme, Double_t radius, AliParticleContainer* partCont, AliClusterContainer* clusCont, TString tag);
78  virtual ~AliJetContainer() {;}
79 
80  void LoadRho(const AliVEvent *event);
81  void LoadLocalRho(const AliVEvent *event);
82  void LoadRhoMass(const AliVEvent *event);
83 
85  void PrintCuts();
86  void ResetCuts();
87  void SetJetEtaLimits(Float_t min, Float_t max) { SetEtaLimits(min, max) ; }
88  void SetJetPhiLimits(Float_t min, Float_t max) { SetPhiLimits(min, max) ; }
89  void SetJetPtCut(Float_t cut) { SetMinPt(cut) ; }
90  void SetJetPtCutMax(Float_t cut) { SetMaxPt(cut) ; }
91  void SetJetEtaPhiEMCAL(Double_t r=0.) ;
92  void SetJetEtaPhiDCAL(Double_t r=0.) ;
93  void SetJetEtaPhiTPC(Double_t r=0.) ;
94  void SetRunNumber(Int_t r) { fRunNumber = r; }
95  void SetJetRadius(Float_t r) { fJetRadius = r ; }
96  void SetJetAreaCut(Float_t cut) { fJetAreaCut = cut ; }
97  void SetPercAreaCut(Float_t p) { if(fJetRadius==0.) AliWarning("JetRadius not set. Area cut will be 0");
98  fJetAreaCut = p*TMath::Pi()*fJetRadius*fJetRadius; }
99  void SetAreaEmcCut(Double_t a = 0.99) { fAreaEmcCut = a ; }
100  void SetZLeadingCut(Float_t zemc, Float_t zch) { fZLeadingEmcCut = zemc; fZLeadingChCut = zch ; }
101  void SetNEFCut(Float_t min = 0., Float_t max = 1.) { fNEFMinCut = min; fNEFMaxCut = max; }
102  void SetFlavourCut(Int_t myflavour) { fFlavourSelection = myflavour;}
103  void SetMinClusterPt(Float_t b) { fMinClusterPt = b ; }
104  void SetMaxClusterPt(Float_t b) { fMaxClusterPt = b ; }
105  void SetMinTrackPt(Float_t b) { fMinTrackPt = b ; }
106  void SetMaxTrackPt(Float_t b) { fMaxTrackPt = b ; }
107  void SetPtBiasJetClus(Float_t b) { SetMinClusterPt(b) ; }
108  void SetNLeadingJets(Int_t t) { fNLeadingJets = t ; }
109  void SetMinNConstituents(Int_t n) { fMinNConstituents = n ; }
110  void SetPtBiasJetTrack(Float_t b) { SetMinTrackPt(b) ; }
111  void SetLeadingHadronType(Int_t t) { fLeadingHadronType = t ; }
112  void SetJetTrigger(UInt_t t=AliVEvent::kEMCEJE) { fJetTrigger = t ; }
113  void SetTagStatus(Int_t i) { fTagStatus = i ; }
114 
115  void SetRhoName(const char *n) { fRhoName = n ; }
116  void SetLocalRhoName(const char *n) { fLocalRhoName = n ; }
117  void SetRhoMassName(const char *n) { fRhoMassName = n ; }
118 
119  void SetTpcHolePos(Double_t b) {fTpcHolePos = b ;}
120  void SetTpcHoleWidth(Double_t b) {fTpcHoleWidth = b ;}
121 
122 
125 
126  AliEmcalJet *GetLeadingJet(const char* opt="") ;
127  AliEmcalJet *GetJet(Int_t i) const;
128  AliEmcalJet *GetAcceptJet(Int_t i) const;
131  Bool_t GetMomentumFromJet(TLorentzVector &mom, const AliEmcalJet* jet, Double_t mass) const;
132  Bool_t GetMomentumFromJet(TLorentzVector &mom, const AliEmcalJet* jet) const;
133  Bool_t GetMomentum(TLorentzVector &mom, Int_t i) const;
134  Bool_t GetAcceptMomentum(TLorentzVector &mom, Int_t i) const;
135  Bool_t GetNextMomentum(TLorentzVector &mom);
136  Bool_t GetNextAcceptMomentum(TLorentzVector &mom);
137  virtual Bool_t AcceptObject(Int_t i, UInt_t &rejectionReason) const { return AcceptJet(i, rejectionReason);}
138  virtual Bool_t AcceptObject(const TObject* obj, UInt_t &rejectionReason) const { return AcceptJet(dynamic_cast<const AliEmcalJet*>(obj), rejectionReason);}
139  virtual Bool_t AcceptJet(Int_t i, UInt_t &rejectionReason) const;
140  virtual Bool_t AcceptJet(const AliEmcalJet* jet, UInt_t &rejectionReason) const;
141  virtual Bool_t ApplyJetCuts(const AliEmcalJet* clus, UInt_t &rejectionReason) const;
142  virtual Bool_t CheckTpcHolesOverlap(const AliEmcalJet* clus,UInt_t &rejectionReason) const;
143  Int_t GetFlavourCut() const {return fFlavourSelection;}
144  Int_t GetNJets() const {return GetNEntries();}
145  Int_t GetNAcceptedJets() ;
146 
147  Double_t GetLeadingHadronPt(const AliEmcalJet* jet) const;
148  void GetLeadingHadronMomentum(TLorentzVector &mom, const AliEmcalJet* jet) const;
149  Double_t GetZ(const AliEmcalJet *jet, const TLorentzVector& mom) const;
150  Double_t GetZLeadingEmc(const AliEmcalJet *jet) const;
151  Double_t GetZLeadingCharged(const AliEmcalJet *jet) const;
153  Double_t GetRhoVal() const {if (fRho) return fRho->GetVal(); else return 0;}
154  const TString& GetRhoName() const {return fRhoName;}
156  const TString& GetLocalRhoName() const {return fLocalRhoName;}
158  Double_t GetRhoMassVal() const {if (fRhoMass) return fRhoMass->GetVal(); else return 0;}
159  const TString& GetRhoMassName() const {return fRhoMassName;}
160  Double_t GetJetPtCorr(Int_t i) const;
161  Double_t GetJetPtCorrLocal(Int_t i) const;
162  Float_t GetJetRadius() const {return fJetRadius ; }
163  Double_t GetJetEtaMin() const {return GetMinEta(); }
164  Double_t GetJetEtaMax() const {return GetMaxEta(); }
165  Double_t GetJetPhiMin() const {return GetMinPhi(); }
166  Double_t GetJetPhiMax() const {return GetMaxPhi(); }
167  Double_t GetJetPtCut() const {return GetMinPt() ; }
168  Double_t GetJetPtCutMax() const {return GetMaxPt() ; }
169 
170  void SetArray(const AliVEvent *event);
173  Double_t GetFractionSharedPt(const AliEmcalJet *jet, AliParticleContainer *cont2 = 0x0) const;
174 
175  const char* GetTitle() const;
176 
177  static TString GenerateJetName(EJetType_t jetType, EJetAlgo_t jetAlgo, ERecoScheme_t recoScheme, Double_t radius, AliParticleContainer* partCont, AliClusterContainer* clusCont, TString tag);
178 
179  const AliJetIterableContainer all() const;
180  const AliJetIterableContainer accepted() const;
181 
186 
188  AliJetIterableContainer::iterator end() const { return all().end() ; }
191 
192  protected:
193  void SetEMCALGeometry();
194  void SetAcceptanceCuts();
195 
197  Float_t fJetRadius;
198  TString fRhoName;
199  TString fLocalRhoName;
200  TString fRhoMassName;
202  Float_t fJetAreaCut;
203  Float_t fAreaEmcCut;
204  Float_t fMinClusterPt;
205  Float_t fMaxClusterPt;
206  Float_t fMinTrackPt;
207  Float_t fMaxTrackPt;
208  Float_t fZLeadingEmcCut;
209  Float_t fZLeadingChCut;
210  Float_t fNEFMinCut;
211  Float_t fNEFMaxCut;
215  UInt_t fJetTrigger;
216  Int_t fTagStatus;
222  AliEMCALGeometry *fGeom;
223  Int_t fRunNumber;
224  Double_t fTpcHolePos;
225  Double_t fTpcHoleWidth;
226  private:
227  AliJetContainer(const AliJetContainer& obj); // copy constructor
228  AliJetContainer& operator=(const AliJetContainer& other); // assignment
229 
231 };
232 
233 #endif
void SetAreaEmcCut(Double_t a=0.99)
UInt_t fJetTrigger
minimum number of constituents in jet
Float_t fMinTrackPt
maximum cluster constituent pt to accept the jet
Float_t fJetAreaCut
selection on jet flavour
Double_t GetRhoVal() const
Float_t fJetRadius
acceptance type
const TString & GetRhoName() const
AliJetIterableContainer::iterator accept_end() const
void LoadRho(const AliVEvent *event)
Double_t GetJetEtaMin() const
AliRhoParameter * fRhoMass
! event rho mass for these jets
virtual Bool_t ApplyJetCuts(const AliEmcalJet *clus, UInt_t &rejectionReason) const
AliRhoParameter * fRho
cluster container (jet constituents)
Double_t GetJetPhiMax() 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
Double_t GetJetPtCorrLocal(Int_t i) const
AliJetContainer & operator=(const AliJetContainer &other)
virtual Bool_t AcceptJet(Int_t i, UInt_t &rejectionReason) const
Double_t GetJetPtCutMax() const
void LoadRhoMass(const AliVEvent *event)
void SetPercAreaCut(Float_t p)
AliParticleContainer * fParticleContainer
jet tag status
virtual Bool_t CheckTpcHolesOverlap(const AliEmcalJet *clus, UInt_t &rejectionReason) 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)
bidirectional stl iterator over the EMCAL iterable container
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
Double_t fTpcHoleWidth
position(in radians) of the malfunctioning TPC sector
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 GetJetPhiMin() const
ClassDef(AliJetContainer, 16)
Int_t fRunNumber
! run number
void SetJetRadius(Float_t r)
void SetJetPtCut(Float_t cut)
Double_t GetLeadingHadronPt(const AliEmcalJet *jet) const
void SetNLeadingJets(Int_t t)
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
AliJetIterableContainer::iterator accept_rend() const
Int_t GetNJets() const
void SetMinClusterPt(Float_t b)
Float_t fMinClusterPt
minimum cut on jet emcal area
void SetRhoMassName(const char *n)
TString fLocalRhoName
Name of rho object.
void SetTpcHolePos(Double_t b)
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)
AliJetIterableContainer::iterator begin() const
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
AliJetIterableContainer::iterator rbegin() const
AliEmcalIterableContainerT< AliEmcalJet > AliJetIterableContainer
void SetArray(const AliVEvent *event)
void LoadLocalRho(const AliVEvent *event)
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)
Represent a jet reconstructed using the EMCal jet framework.
Definition: AliEmcalJet.h:44
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)
void SetTpcHoleWidth(Double_t b)
AliRhoParameter * GetRhoMassParameter()
const AliJetIterableContainer accepted() const
AliJetIterableContainer::iterator accept_rbegin() const
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)
AliJetIterableContainer::iterator end() const
Container structure for EMCAL clusters.
void SetZLeadingCut(Float_t zemc, Float_t zch)
Int_t fMinNConstituents
how many jets are to be considered the leading jet(s)
Container for jet within the EMCAL jet framework.
AliJetIterableContainer::iterator rend() const
void SetFlavourCut(Int_t myflavour)
void SetJetPtCutMax(Float_t cut)
Double_t GetZ(const AliEmcalJet *jet, const TLorentzVector &mom) const
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
const AliJetIterableContainer all() const
Double_t GetJetPtCorr(Int_t i) const
Int_t fFlavourSelection
Name of rho mass object.
AliJetIterableContainer::iterator accept_begin() const