AcceptJet, AcceptParticle and AcceptCluster now return the rejection reason in a...
[u/mrichter/AliRoot.git] / PWGJE / EMCALJetTasks / AliJetContainer.h
CommitLineData
421b12a3 1#ifndef AliJetContainer_H
2#define AliJetContainer_H
3
9239b066 4// $Id$
421b12a3 5
421b12a3 6class TClonesArray;
7class TString;
6421eeb0 8
421b12a3 9class AliEMCALGeometry;
10class AliEmcalJet;
11class AliVEvent;
6421eeb0 12class AliParticleContainer;
13class AliClusterContainer;
9e5eee5d 14class AliLocalRhoParameter;
cfa7b4df 15class AliStackPartonInfo;
421b12a3 16
421b12a3 17#include "AliRhoParameter.h"
421b12a3 18
6421eeb0 19#include "AliEmcalContainer.h"
421b12a3 20
21class AliJetContainer : public AliEmcalContainer {
22 public:
6421eeb0 23
421b12a3 24 enum JetAcceptanceType {
25 kTPC = 0, // TPC acceptance
26 kEMCAL = 1, // EMCal acceptance
4c9493a7 27 kUser = 2 // User defined acceptance
421b12a3 28 };
29
30
31 AliJetContainer();
32 AliJetContainer(const char *name);
6421eeb0 33 virtual ~AliJetContainer() {;}
421b12a3 34
421b12a3 35 void SetEMCALGeometry();
36 void SetEMCALGeometry(AliEMCALGeometry *p) {fGeom = p;}
37 void LoadRho(AliVEvent *event);
9e5eee5d 38 void LoadLocalRho(AliVEvent *event);
4d3b366f 39 void LoadRhoMass(AliVEvent *event);
cfa7b4df 40 void LoadPartonsInfo(AliVEvent *event);
421b12a3 41
42 void SetJetAcceptanceType(JetAcceptanceType type) { fJetAcceptanceType = type ; }
6c3dc2d6 43 void PrintCuts();
421b12a3 44 void ResetCuts();
421b12a3 45 void SetJetEtaPhiEMCAL() ;
46 void SetJetEtaPhiTPC() ;
56f370b0 47 void SetRunNumber(Int_t r) { fRunNumber = r; }
421b12a3 48 void SetJetEtaLimits(Float_t min, Float_t max) { fJetMinEta = min, fJetMaxEta = max ; }
49 void SetJetPhiLimits(Float_t min, Float_t max) { fJetMinPhi = min, fJetMaxPhi = max ; }
7a615dc4 50 void SetJetPtCut(Float_t cut) { fJetPtCut = cut ; }
51 void SetJetRadius(Float_t r) { fJetRadius = r ; }
421b12a3 52 void SetJetAreaCut(Float_t cut) { fJetAreaCut = cut ; }
9239b066 53 void SetPercAreaCut(Float_t p) { if(fJetRadius==0.) AliWarning("JetRadius not set. Area cut will be 0");
54 fJetAreaCut = p*TMath::Pi()*fJetRadius*fJetRadius; }
7a615dc4 55 void SetAreaEmcCut(Double_t a = 0.99) { fAreaEmcCut = a ; }
413ab3a3 56 void SetZLeadingCut(Float_t zemc, Float_t zch) { fZLeadingEmcCut = zemc; fZLeadingChCut = zch ; }
9e5eee5d 57 void SetNEFCut(Float_t min = 0., Float_t max = 1.) { fNEFMinCut = min; fNEFMaxCut = max; }
3c9775d9 58 void SetFlavourCut(Int_t myflavour) { fFlavourSelection = myflavour;}
421b12a3 59 void SetMaxClusterPt(Float_t b) { fMaxClusterPt = b ; }
60 void SetMaxTrackPt(Float_t b) { fMaxTrackPt = b ; }
61 void SetPtBiasJetClus(Float_t b) { fPtBiasJetClus = b ; }
62 void SetNLeadingJets(Int_t t) { fNLeadingJets = t ; }
63 void SetPtBiasJetTrack(Float_t b) { fPtBiasJetTrack = b ; }
421b12a3 64 void SetLeadingHadronType(Int_t t) { fLeadingHadronType = t ; }
65 void SetJetBitMap(UInt_t m) { fJetBitMap = m ; }
6421eeb0 66 void SetJetTrigger(UInt_t t=AliVEvent::kEMCEJE) { fJetTrigger = t ; }
7a615dc4 67 void SetTagStatus(Int_t i) { fTagStatus = i ; }
68
69 virtual void SetRhoName(const char *n) { fRhoName = n ; }
70 virtual void SetLocalRhoName(const char *n) { fLocalRhoName = n ; }
4d3b366f 71 virtual void SetRhoMassName(const char *n) { fRhoMassName = n ; }
cfa7b4df 72 virtual void SetPartonInfoName(const char *n) { fPartonInfoName = n; }
73
7cd832c7 74 void ConnectParticleContainer(AliParticleContainer *c) { fParticleContainer = c ; }
75 void ConnectClusterContainer(AliClusterContainer *c) { fClusterContainer = c ; }
ba7663ad 76
b6f970ad 77 AliEmcalJet *GetLeadingJet(const char* opt="") ;
6421eeb0 78 AliEmcalJet *GetJet(Int_t i) const;
6504c17f 79 AliEmcalJet *GetAcceptJet(Int_t i) ;
7cd832c7 80 AliEmcalJet *GetJetWithLabel(Int_t lab) const;
6504c17f 81 AliEmcalJet *GetAcceptJetWithLabel(Int_t lab) ;
b6f970ad 82 AliEmcalJet *GetNextAcceptJet(Int_t i=-1) ;
7cd832c7 83 AliEmcalJet *GetNextJet(Int_t i=-1) ;
6421eeb0 84 void GetMomentum(TLorentzVector &mom, Int_t i) const;
6504c17f 85 Bool_t AcceptJet(AliEmcalJet* jet) ;
3c9775d9 86 Bool_t AcceptBiasJet(AliEmcalJet* jet) const;
87 Int_t GetFlavourCut() const {return fFlavourSelection;}
421b12a3 88 Int_t GetNJets() const {return GetNEntries();}
89 Double_t GetLeadingHadronPt(AliEmcalJet* jet) const;
6421eeb0 90 void GetLeadingHadronMomentum(TLorentzVector &mom, AliEmcalJet* jet) const;
413ab3a3 91 Double_t GetZ(AliEmcalJet *jet, TLorentzVector mom) const;
92 Double_t GetZLeadingEmc(AliEmcalJet *jet) const;
93 Double_t GetZLeadingCharged(AliEmcalJet *jet) const;
421b12a3 94 AliRhoParameter *GetRhoParameter() {return fRho;}
3c9775d9 95 Double_t GetRhoVal() const {if (fRho) return fRho->GetVal(); else return 0;}
421b12a3 96 const TString& GetRhoName() const {return fRhoName;}
9e5eee5d 97 AliLocalRhoParameter *GetLocalRhoParameter() const {return fLocalRho;}
98 const TString& GetLocalRhoName() const {return fLocalRhoName;}
4d3b366f 99 AliRhoParameter *GetRhoMassParameter() {return fRhoMass;}
100 Double_t GetRhoMassVal() const {if (fRhoMass) return fRhoMass->GetVal(); else return 0;}
101 const TString& GetRhoMassName() const {return fRhoMassName;}
cfa7b4df 102 const TString& GetPartonInfoName() const {return fPartonInfoName;}
103 AliStackPartonInfo *GetStackPartonInfo() const {return fPartonsInfo;}
421b12a3 104 Double_t GetJetPtCorr(Int_t i) const;
9e5eee5d 105 Double_t GetJetPtCorrLocal(Int_t i) const;
56f370b0 106 Float_t GetJetRadius() const {return fJetRadius;}
4c9493a7 107 Float_t GetJetEtaMin() const {return fJetMinEta;}
108 Float_t GetJetEtaMax() const {return fJetMaxEta;}
109 Float_t GetJetPhiMin() const {return fJetMinPhi;}
110 Float_t GetJetPhiMax() const {return fJetMaxPhi;}
b6f970ad 111 void SetClassName(const char *clname);
112 void SetArray(AliVEvent *event);
7cd832c7 113 AliParticleContainer *GetParticleContainer() {return fParticleContainer;}
114 AliClusterContainer *GetClusterContainer() {return fClusterContainer;}
ba7663ad 115 Double_t GetFractionSharedPt(AliEmcalJet *jet) const;
cfa7b4df 116
421b12a3 117
118 protected:
119 JetAcceptanceType fJetAcceptanceType; // acceptance type
120 Float_t fJetRadius; // jet radius
121 TString fRhoName; // Name of rho object
9e5eee5d 122 TString fLocalRhoName; // Name of local rho object
4d3b366f 123 TString fRhoMassName; // Name of rho mass object
cfa7b4df 124 TString fPartonInfoName; // Name of parton info object
3c9775d9 125 Int_t fFlavourSelection; // selection on jet flavour
421b12a3 126 Float_t fPtBiasJetTrack; // select jets with a minimum pt track
127 Float_t fPtBiasJetClus; // select jets with a minimum pt cluster
128 Float_t fJetPtCut; // cut on jet pt
129 Float_t fJetAreaCut; // cut on jet area
130 Float_t fAreaEmcCut; // minimum cut on jet emcal area
131 Float_t fJetMinEta; // minimum eta jet acceptance
132 Float_t fJetMaxEta; // maximum eta jet acceptance
133 Float_t fJetMinPhi; // minimum phi jet acceptance
134 Float_t fJetMaxPhi; // maximum phi jet acceptance
135 Float_t fMaxClusterPt; // maximum cluster constituent pt to accept the jet
136 Float_t fMaxTrackPt; // maximum track constituent pt to accept the jet
413ab3a3 137 Float_t fZLeadingEmcCut; // maximum z,leading neutral
138 Float_t fZLeadingChCut; // maximum z,leading charged
9e5eee5d 139 Float_t fNEFMinCut; // minimum NEF in a jet
140 Float_t fNEFMaxCut; // maximum NEF in a jet
421b12a3 141 Int_t fLeadingHadronType; // 0 = charged, 1 = neutral, 2 = both
142 Int_t fNLeadingJets; // how many jets are to be considered the leading jet(s)
143 UInt_t fJetBitMap; // bit map of accepted jets
6421eeb0 144 UInt_t fJetTrigger; // jet trigger
7a615dc4 145 Int_t fTagStatus; // jet tag status
7cd832c7 146 AliParticleContainer *fParticleContainer; // particle container (jet constituents)
147 AliClusterContainer *fClusterContainer; // cluster container (jet constituents)
6421eeb0 148 AliRhoParameter *fRho; //! event rho for these jets
9e5eee5d 149 AliLocalRhoParameter *fLocalRho; //! event local rho for these jets
4d3b366f 150 AliRhoParameter *fRhoMass; //! event rho mass for these jets
cfa7b4df 151 AliStackPartonInfo *fPartonsInfo; //! event parton info
6421eeb0 152 AliEMCALGeometry *fGeom; //! emcal geometry
153 Int_t fRunNumber; //! run number
421b12a3 154
155 private:
156 AliJetContainer(const AliJetContainer& obj); // copy constructor
157 AliJetContainer& operator=(const AliJetContainer& other); // assignment
158
4d3b366f 159 ClassDef(AliJetContainer,9);
421b12a3 160
161};
162
163#endif