only a printf changed
[u/mrichter/AliRoot.git] / PWGJE / EMCALJetTasks / AliJetContainer.h
CommitLineData
421b12a3 1#ifndef AliJetContainer_H
2#define AliJetContainer_H
3
4//
5// container with name, TClonesArray and cuts for jets
6//
7
421b12a3 8class TClonesArray;
9class TString;
6421eeb0 10
421b12a3 11class AliEMCALGeometry;
12class AliEmcalJet;
13class AliVEvent;
6421eeb0 14class AliParticleContainer;
15class AliClusterContainer;
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);
38
39 void SetJetAcceptanceType(JetAcceptanceType type) { fJetAcceptanceType = type ; }
40
41 void ResetCuts();
42
43 void SetJetEtaPhiEMCAL() ;
44 void SetJetEtaPhiTPC() ;
56f370b0 45 void SetRunNumber(Int_t r) { fRunNumber = r; }
421b12a3 46
47 void SetJetEtaLimits(Float_t min, Float_t max) { fJetMinEta = min, fJetMaxEta = max ; }
48 void SetJetPhiLimits(Float_t min, Float_t max) { fJetMinPhi = min, fJetMaxPhi = max ; }
49 void SetJetAreaCut(Float_t cut) { fJetAreaCut = cut ; }
50 void SetPercAreaCut(Float_t p) { if(fJetRadius==0.) AliWarning("JetRadius not set. Area cut will be 0"); fJetAreaCut = p*TMath::Pi()*fJetRadius*fJetRadius; }
51
52 void SetAreaEmcCut(Double_t a = 0.99) { fAreaEmcCut = a ; }
53 void SetJetPtCut(Float_t cut) { fJetPtCut = cut ; }
54 void SetJetRadius(Float_t r) { fJetRadius = r ; }
55 virtual void SetRhoName(const char *n) { fRhoName = n ; }
56 void SetMaxClusterPt(Float_t b) { fMaxClusterPt = b ; }
57 void SetMaxTrackPt(Float_t b) { fMaxTrackPt = b ; }
58 void SetPtBiasJetClus(Float_t b) { fPtBiasJetClus = b ; }
59 void SetNLeadingJets(Int_t t) { fNLeadingJets = t ; }
60 void SetPtBiasJetTrack(Float_t b) { fPtBiasJetTrack = b ; }
61
62 void SetLeadingHadronType(Int_t t) { fLeadingHadronType = t ; }
63 void SetJetBitMap(UInt_t m) { fJetBitMap = m ; }
6421eeb0 64 void SetJetTrigger(UInt_t t=AliVEvent::kEMCEJE) { fJetTrigger = t ; }
421b12a3 65
7cd832c7 66 void ConnectParticleContainer(AliParticleContainer *c) { fParticleContainer = c ; }
67 void ConnectClusterContainer(AliClusterContainer *c) { fClusterContainer = c ; }
6421eeb0 68
b6f970ad 69 AliEmcalJet *GetLeadingJet(const char* opt="") ;
6421eeb0 70 AliEmcalJet *GetJet(Int_t i) const;
421b12a3 71 AliEmcalJet *GetAcceptJet(Int_t i) const;
7cd832c7 72 AliEmcalJet *GetJetWithLabel(Int_t lab) const;
73 AliEmcalJet *GetAcceptJetWithLabel(Int_t lab) const;
b6f970ad 74 AliEmcalJet *GetNextAcceptJet(Int_t i=-1) ;
7cd832c7 75 AliEmcalJet *GetNextJet(Int_t i=-1) ;
6421eeb0 76 void GetMomentum(TLorentzVector &mom, Int_t i) const;
77 Bool_t AcceptJet(AliEmcalJet* jet) const;
421b12a3 78 Bool_t AcceptBiasJet(AliEmcalJet* jet) const;
79 Int_t GetNJets() const {return GetNEntries();}
80 Double_t GetLeadingHadronPt(AliEmcalJet* jet) const;
6421eeb0 81 void GetLeadingHadronMomentum(TLorentzVector &mom, AliEmcalJet* jet) const;
421b12a3 82 AliRhoParameter *GetRhoParameter() {return fRho;}
7cd832c7 83 Double_t GetRhoVal() const { if (fRho) return fRho->GetVal(); else return 0;}
421b12a3 84 const TString& GetRhoName() const {return fRhoName;}
85 Double_t GetJetPtCorr(Int_t i) const;
56f370b0 86 Float_t GetJetRadius() const {return fJetRadius;}
4c9493a7 87 Float_t GetJetEtaMin() const {return fJetMinEta;}
88 Float_t GetJetEtaMax() const {return fJetMaxEta;}
89 Float_t GetJetPhiMin() const {return fJetMinPhi;}
90 Float_t GetJetPhiMax() const {return fJetMaxPhi;}
b6f970ad 91 void SetClassName(const char *clname);
92 void SetArray(AliVEvent *event);
7cd832c7 93 AliParticleContainer *GetParticleContainer() {return fParticleContainer;}
94 AliClusterContainer *GetClusterContainer() {return fClusterContainer;}
421b12a3 95
96 protected:
97 JetAcceptanceType fJetAcceptanceType; // acceptance type
98 Float_t fJetRadius; // jet radius
99 TString fRhoName; // Name of rho object
100 Float_t fPtBiasJetTrack; // select jets with a minimum pt track
101 Float_t fPtBiasJetClus; // select jets with a minimum pt cluster
102 Float_t fJetPtCut; // cut on jet pt
103 Float_t fJetAreaCut; // cut on jet area
104 Float_t fAreaEmcCut; // minimum cut on jet emcal area
105 Float_t fJetMinEta; // minimum eta jet acceptance
106 Float_t fJetMaxEta; // maximum eta jet acceptance
107 Float_t fJetMinPhi; // minimum phi jet acceptance
108 Float_t fJetMaxPhi; // maximum phi jet acceptance
109 Float_t fMaxClusterPt; // maximum cluster constituent pt to accept the jet
110 Float_t fMaxTrackPt; // maximum track constituent pt to accept the jet
111 Int_t fLeadingHadronType; // 0 = charged, 1 = neutral, 2 = both
112 Int_t fNLeadingJets; // how many jets are to be considered the leading jet(s)
113 UInt_t fJetBitMap; // bit map of accepted jets
6421eeb0 114 UInt_t fJetTrigger; // jet trigger
7cd832c7 115 AliParticleContainer *fParticleContainer; // particle container (jet constituents)
116 AliClusterContainer *fClusterContainer; // cluster container (jet constituents)
421b12a3 117
6421eeb0 118 AliRhoParameter *fRho; //! event rho for these jets
119 AliEMCALGeometry *fGeom; //! emcal geometry
120 Int_t fRunNumber; //! run number
421b12a3 121
122 private:
123 AliJetContainer(const AliJetContainer& obj); // copy constructor
124 AliJetContainer& operator=(const AliJetContainer& other); // assignment
125
7cd832c7 126 ClassDef(AliJetContainer,3);
421b12a3 127
128};
129
130#endif
131
132