]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AOD/AliAODJet.h
drawCorrelation macro adapted for Toy Model (MW)
[u/mrichter/AliRoot.git] / STEER / AOD / AliAODJet.h
CommitLineData
df9db588 1#ifndef AliAODJet_H
2#define AliAODJet_H
3/* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
8//-------------------------------------------------------------------------
87102d3c 9// AOD jet class
10// Author: Andreas Morsch, CERN
df9db588 11//-------------------------------------------------------------------------
12
23abe6aa 13#include <TLorentzVector.h>
ff7c57dd 14#include "AliVParticle.h"
2e7293a2 15#include <TArrayI.h>
df9db588 16#include "AliAODVertex.h"
17
87102d3c 18
ff7c57dd 19class AliAODJet : public AliVParticle {
df9db588 20
21 public:
87102d3c 22 AliAODJet();
23 AliAODJet(Double_t px, Double_t py, Double_t pz, Double_t e);
a1708071 24 AliAODJet(TLorentzVector & p);
87102d3c 25 virtual ~AliAODJet();
26 AliAODJet(const AliAODJet& jet);
27 AliAODJet& operator=(const AliAODJet& jet);
ff7c57dd 28// AliVParticle methods
87102d3c 29 virtual Double_t Px() const { return fMomentum->Px(); }
30 virtual Double_t Py() const { return fMomentum->Py(); }
31 virtual Double_t Pz() const { return fMomentum->Pz(); }
32 virtual Double_t Pt() const { return fMomentum->Pt(); }
33 virtual Double_t P() const { return fMomentum->P(); }
34 virtual Double_t OneOverPt() const { return 1. / fMomentum->Pt(); }
c683ddc2 35 virtual Bool_t PxPyPz(Double_t p[3]) const { p[0] = Px(); p[1] = Py(); p[2] = Pz(); return kTRUE; }
4124c6c5 36 virtual Double_t Phi() const;
87102d3c 37 virtual Double_t Theta() const { return fMomentum->Theta(); }
38 virtual Double_t E() const { return fMomentum->E(); }
39 virtual Double_t M() const { return fMomentum->M(); }
40 virtual Double_t Eta() const { return fMomentum->Eta(); }
41 virtual Double_t Y() const { return fMomentum->Rapidity();}
c683ddc2 42 virtual Double_t Xv() const {return -999.;} // put reasonable values here
43 virtual Double_t Yv() const {return -999.;} //
44 virtual Double_t Zv() const {return -999.;} //
45 virtual Bool_t XvYvZv(Double_t x[3]) const { x[0] = Xv(); x[1] = Yv(); x[2] = Zv(); return kTRUE; }
a5817b6b 46 virtual Bool_t IsTriggeredEMCAL(){return (fTrigger&kEMCALTriggered)==kEMCALTriggered;}
47 virtual Bool_t IsTriggeredTRD(){return (fTrigger&kTRDTriggered)==kTRDTriggered;}
fe004456 48 virtual UInt_t Trigger(){return fTrigger;}
6938de9c 49
086d6981 50 virtual void AddTrack(TObject *tr);
51
2e7293a2 52 TObject* GetTrack(Int_t i) {return fRefTracks->At(i);}
6938de9c 53 virtual void SetPtSubtracted(Double_t ptCh, Double_t ptN){
54 fPtSubtracted[0] = ptCh;
55 fPtSubtracted[1] = ptN;
56 }
57 virtual Double_t GetPtSubtracted(Int_t i){return (i<2?fPtSubtracted[i]:0);}
87102d3c 58 virtual void SetBgEnergy(Double_t bgEnCh, Double_t bgEnNe)
59 {fBackgEnergy[0] = bgEnCh; fBackgEnergy[1] = bgEnNe;}
a5817b6b 60 virtual void SetEffArea(Double_t effACh, Double_t effANe, Double_t effAErrCh = 0, Double_t effAErrNe = 0)
61 {
62 fEffectiveArea[0] = effACh; fEffectiveArea[1] = effANe;
63 fEffectiveAreaError[0] = effAErrCh;
64 fEffectiveAreaError[1] = effAErrNe;
65 }
944efc80 66 virtual void SetPxPyPzE(Double_t px, Double_t py, Double_t pz, Double_t e);
6a845d4e 67 virtual void SetPtEtaPhiM(Double_t pt, Double_t eta, Double_t phi, Double_t m);
fe004456 68 virtual void SetTrigger(UInt_t f){fTrigger |= f;}
69 virtual void ResetTrigger(UInt_t f){fTrigger &= ~f;}
4d7c53f9 70 virtual void SetNEF(Double_t nef) {fNeutralFraction=nef;}
71 virtual Double_t GetNEF() const {return fNeutralFraction;}
944efc80 72
2e7293a2 73 virtual TRefArray* GetRefTracks() const { return fRefTracks;}
74 virtual Double_t ChargedBgEnergy() const { return fBackgEnergy[0];}
75 virtual Double_t NeutralBgEnergy() const { return fBackgEnergy[1];}
76 virtual Double_t TotalBgEnergy() const { return (fBackgEnergy[0] + fBackgEnergy[1]);}
87102d3c 77
2e7293a2 78 virtual Double_t EffectiveAreaCharged() const { return fEffectiveArea[0];}
79 virtual Double_t EffectiveAreaNeutral() const { return fEffectiveArea[1];}
3e03e74b 80 virtual void SetVectorAreaCharged(TLorentzVector *effVACh){
81 if(!fVectorAreaCharged)fVectorAreaCharged= new TLorentzVector(*effVACh);
82 else *fVectorAreaCharged = *effVACh;
83 }
84 virtual TLorentzVector* VectorAreaCharged() const {return fVectorAreaCharged;}
85
86
87
a5817b6b 88 virtual Double_t ErrorEffectiveAreaCharged() const { return fEffectiveAreaError[0];}
89 virtual Double_t ErrorEffectiveAreaNeutral() const { return fEffectiveAreaError[1];}
2735c4db 90 virtual Double_t DeltaR(const AliVParticle* part) const;
a19f293d 91
66ac9c97 92 TLorentzVector* MomentumVector() const {return fMomentum;}
17fdf3ee 93
94 virtual void SetPtLeading(Double_t pt) {fPtLeadingConstituent=pt;}
95 virtual Double_t GetPtLeading() const { return fPtLeadingConstituent;}
96
6c64f93e 97 virtual void Print(Option_t* option) const;
87102d3c 98
17fdf3ee 99 // Dummy
87102d3c 100 virtual Short_t Charge() const { return 0;}
101 virtual const Double_t* PID() const { return NULL;}
3c43fb2b 102 virtual Int_t GetLabel() const { return -1;}
17fdf3ee 103 // Dummy
6a8e543a 104 virtual Int_t PdgCode() const {return 0;}
105
17fdf3ee 106 //
3a4dcedf 107
a5817b6b 108 // first only one bit for EMCAL and TRD, leave space for more
109 // trigger types and/or other detectors
d7396b04 110 // use some of the bits to flag jets with high pT track
111 // and good high pT cut
a5817b6b 112 enum {kEMCALTriggered = 1<<0,
65c43de8 113 kTRDTriggered = 1<<2,
d7396b04 114 kHighTrackPtTriggered = 1<<7,
115 kHighTrackPtBest = 1<<8
116 };
a5817b6b 117
9333290e 118
a5817b6b 119 private:
086d6981 120 Double32_t fBackgEnergy[2]; // Subtracted background energy
121 Double32_t fEffectiveArea[2]; // Effective jet area used for background subtraction
a5817b6b 122 Double32_t fEffectiveAreaError[2]; //[0,1,10] relative error of jet areas, 10 bit precision
086d6981 123 Double32_t fNeutralFraction; //[0,1,12] Neutral fraction between 0 and 1 12 bit precision;
6938de9c 124 Double32_t fPtSubtracted[2]; //[0,0,12] pT after subtraction can be negative four momentum close to 0 in this case, 12 bit precision
17fdf3ee 125 Double32_t fPtLeadingConstituent; //[0,0,12] pT of leading constituent
126 UInt_t fTrigger; // Bit mask to flag jets triggered by a certain detector
086d6981 127 TLorentzVector* fMomentum; // Jet 4-momentum vector
3e03e74b 128 TLorentzVector* fVectorAreaCharged; // jet area four momentum
086d6981 129 TRefArray* fRefTracks; // array of references to the tracks belonging to the jet
9333290e 130
17fdf3ee 131
132 ClassDef(AliAODJet,14);
4124c6c5 133
df9db588 134};
135
4124c6c5 136inline Double_t AliAODJet::Phi() const
137{
138 // Return phi
139 Double_t phi = fMomentum->Phi();
140 if (phi < 0.) phi += 2. * TMath::Pi();
141 return phi;
142}
143
df9db588 144#endif