]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGJE/AliAnalysisTaskJetProperties.h
from Chris
[u/mrichter/AliRoot.git] / PWGJE / AliAnalysisTaskJetProperties.h
1 // *************************************************************************************
2 // * Task for Jetproperties and jet shape analysis in PWG4 Jet Task Force Train for pp *
3 // *************************************************************************************
4
5 #ifndef ALIANALYSISTASKJETPROPERTIES_H
6 #define ALIANALYSISTASKJETPROPERTIES_H
7
8 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
9  * See cxx source for full Copyright notice                               */
10
11 /* $Id$ */
12
13 class AliESDEvent;
14 class AliAODEvent;
15 class AliAODExtension;
16 class TList;
17 class TH1F;
18 class TH2F;
19 class TH3F;
20 class TProfile;
21 class THnSparse; 
22 class TRandom3;
23 class TArrayS;
24
25 #include "AliAnalysisTaskSE.h"
26
27 class AliAnalysisTaskJetProperties : public AliAnalysisTaskSE {
28   
29  public:
30   AliAnalysisTaskJetProperties(); 
31   AliAnalysisTaskJetProperties(const char *name);
32   virtual ~AliAnalysisTaskJetProperties();
33   
34   virtual Bool_t Notify();
35   virtual void   UserCreateOutputObjects();
36   virtual void   Init();
37   virtual void   UserExec(Option_t *option);
38   virtual void   Terminate(Option_t* );
39   
40   virtual void   SetJetBranch(const char* c){fBranchJets = c;}
41   virtual void   SetNonStdFile(char* c){fNonStdFile = c;}
42   virtual void   SetTrackType(Int_t i){fTrackType = i;}
43   virtual void   SetEventCuts(Float_t VtxZ=10.,Int_t nContributors=2)
44   {fMaxVertexZ = VtxZ; fNContributors = nContributors;}
45   virtual void   SetTrackCuts(Float_t trackPt = 0.15, Float_t trackEtaMin = -0.9, Float_t trackEtaMax = 0.9)
46   {fTrackPtCut = trackPt; fTrackEtaMin = trackEtaMin; fTrackEtaMax = trackEtaMax;}
47   virtual void   SetJetCuts(Float_t jetPt = 5., Float_t jetEtaMin = -0.5, Float_t jetEtaMax = 0.5) 
48   {fJetPtCut = jetPt; fJetEtaMin = jetEtaMin; fJetEtaMax = jetEtaMax;}
49   virtual void   SetJetRejectType(Int_t i){fJetRejectType = i;}
50   virtual void   SetFilterMask(UInt_t i) {fFilterMask = i;}
51   virtual void   UsePhysicsSelection(Bool_t b) {fUsePhysicsSelection = b;}
52   virtual void   SetJetRadius(Float_t r){fJetRadius = r;}
53   
54   enum {kTrackUndef=0, kTrackAOD, kTrackKine,kTrackAODMC};//for track selection
55   enum {kNoReject=0, kReject1Track};//for jet rejection
56   
57  protected:
58   Int_t    GetListOfJetTracks(TList* l, const AliAODJet* j);
59   Int_t    GetListOfJets(TList* list);
60   void     FillJetProperties(TList *jetlist);
61   void     FillJetShape(TList *jetlist);
62   void     FillJetShapeUE(TList *jetlist);
63   void     FillFFCorr(TList *jetlist);
64
65   void     GetTracksTiltedwrpJetAxis(Float_t alpha, TList* inputlist, TList* outputlist, const AliAODJet* jet, Double_t radius,Double_t& sumPt);
66   Int_t    GetListOfTracks(TList *list, Int_t type);
67   
68   AliESDEvent*     fESD;          // ESD event
69   AliAODEvent*     fAOD;          // AOD event
70   AliAODEvent*     fAODJets;      // AOD event with jet branch (case we have AOD both in input and output)
71   AliAODExtension* fAODExtension; //! where we take the jets from can be input or output AOD
72   //AliMCEvent*  fMCEvent;  // MC event
73   
74   TString fNonStdFile;          // name of delta aod file to catch the extension
75   TString fBranchJets;          // branch name for reconstructed jets
76   Int_t   fTrackType;           // type of generated tracks
77   Int_t   fJetRejectType;       // type of jets rejected
78   Bool_t  fUseAODInputJets;     // take jets from in/output - only relevant if AOD event both in input AND output and we want to use output
79   UInt_t  fFilterMask;          // filter bit for selected tracks
80   Bool_t  fUsePhysicsSelection; // switch for event selection
81   Float_t fMaxVertexZ;          // maximum abs(z) position of primiary vertex [cm]
82   Int_t   fNContributors;       // contributors to primary vertex
83   // track cuts
84   Float_t fTrackPtCut;          // track transverse momentum cut
85   Float_t fTrackEtaMin;         // track eta cut
86   Float_t fTrackEtaMax;         // track eta cut
87   // jet cuts
88   Float_t fJetPtCut;            // jet transverse momentum cut
89   Float_t fJetEtaMin;           // jet eta cut
90   Float_t fJetEtaMax;           // jet eta cut
91   Float_t fAvgTrials;           // average number of trials per event
92   Float_t fJetRadius;
93   
94   TList     *fJetList;                //! List of jets
95   TList     *fTrackList;              //! List of selected tracks
96   TList     *fTrackListUE;            //! List of tracks in jet cone UE
97   TList     *fTrackListJet;           //! List of tracks in a jet
98   TList     *fCommonHistList;         //! List of common histos
99   TH1F      *fh1EvtSelection;         //! event cuts 
100   TH1F      *fh1VertexNContributors;  //! NContributors to prim vertex
101   TH1F      *fh1VertexZ;              //! prim vertex z distribution
102   TProfile  *fh1Xsec;                 //! pythia cross section and trials
103   TH1F*     fh1Trials;                //! sum of trials
104   TH1F*     fh1PtHard;                //! pt hard of the event
105   TH1F*     fh1PtHardTrials;          //! pt hard of the event
106  
107   TH2F*     fh2EtaJet;                //!jet eta distribution
108   TH2F*     fh2PhiJet;                //!jet phi distribution
109   TH2F*     fh2PtJet;                 //!jet pt distribution
110   TH1F*     fh1PtJet;                 //!jet pt distribution 1D
111   TH2F*     fh2NtracksJet;            //!number of tracks in jet
112   TProfile* fProNtracksJet;           //!number of tracks in jet
113   TH2F*     fh2EtaTrack;              //!track eta distribution
114   TH2F*     fh2PhiTrack;              //!track phi distribution
115   TH2F*     fh2PtTrack;               //!track pt distribution
116   TH2F*     fh2FF;                    //!fragmentation function (z)
117   TH2F*     fh2Ksi;                   //!fragmentation function (Ksi)
118   TH2F*     fh2DelEta;                //!delta eta distribution
119   TH2F*     fh2DelPhi;                //!delta phi distribution
120   TH2F*     fh2DelR;                  //!delta R distribution
121   
122   TH1F*     fh1PtLeadingJet;          //!highest jet pt
123   TH2F*     fh2NtracksLeadingJet;     //!number of tracks in jet
124   TProfile* fProNtracksLeadingJet;    //!number of tracks in jet
125   TH2F*     fh2DelR80pcNch;           //!R containing 80% of Nch vs jet pt
126   TProfile* fProDelR80pcNch;          //!R containing 80% of Nch vs jet pt
127   TH2F*     fh2DelR80pcPt;            //!R containing 80% of pT vs jet pt
128   TProfile* fProDelR80pcPt;           //!R containing 80% of pT vs jet pt
129   TH2F*     fh2AreaCh;                //!charged jet area vs jet pT
130   TProfile* fProAreaCh;               //!charged jet area vs jet pT
131   TH3F*     fh3PtDelRNchSum;          //!Nch sum vs R
132   TH3F*     fh3PtDelRPtSum;           //!Pt sum vs R
133   TProfile* fProDiffJetShape;         //!Diff jet shape pT=20-100
134   TProfile* fProIntJetShape;          //!Int jet shape pT=20-100
135   TProfile* fProDelRNchSum[13];        //!Nch sum vs R
136   TProfile* fProDelRPtSum[13];         //!Pt sum vs R
137   TProfile* fProDiffJetShapeA[13];     //!Diff jet shape pT
138   TProfile* fProIntJetShapeA[13];      //!Int jet shape pT
139
140   TH1F*     fh1PtSumInJetConeUE;        //!pt sum of UE in cone R
141   TH2F*     fh2NtracksLeadingJetUE;     //!number of tracks in jet (UE)
142   TProfile* fProNtracksLeadingJetUE;    //!number of tracks in jet (UE)
143   TH2F*     fh2DelR80pcNchUE;           //!R containing 80% of Nch vs jet pt (UE)
144   TProfile* fProDelR80pcNchUE;          //!R containing 80% of Nch vs jet pt (UE)
145   TH2F*     fh2DelR80pcPtUE;            //!R containing 80% of pT vs jet pt (UE)
146   TProfile* fProDelR80pcPtUE;           //!R containing 80% of pT vs jet pt (UE)
147   TH2F*     fh2AreaChUE;                //!charged jet area vs jet pT (UE)
148   TProfile* fProAreaChUE;               //!charged jet area vs jet pT (UE)
149   TH3F*     fh3PtDelRNchSumUE;          //!Nch sum vs R (UE)
150   TH3F*     fh3PtDelRPtSumUE;           //!Pt sum vs R (UE)
151   TProfile* fProDiffJetShapeUE;         //!Diff jet shape pT=20-100 (UE)
152   TProfile* fProIntJetShapeUE;          //!Int jet shape pT=20-100 (UE)
153   TProfile* fProDelRNchSumUE[13];        //!Nch sum vs R (UE)
154   TProfile* fProDelRPtSumUE[13];         //!Pt sum vs R (UE)
155   TProfile* fProDiffJetShapeAUE[13];     //!Diff jet shape pT (UE)
156   TProfile* fProIntJetShapeAUE[13];      //!Int jet shape pT (UE)
157
158   TH1F* fh1CorrJetPt;                    //!jet pt in FillCorr
159   TH2F* fh2CorrPtTrack1;                 //!trk pt in FillCorr
160   TH2F* fh2CorrFF1;                      //!FF in FillCorr
161   TH2F* fh2CorrKsi1;                     //!Ksi in FillCorr
162   TH2F* fh2CorrjT1;                      //!jT in FillCorr
163   TH1F* fh1JetPtvsTrkSum;                //!QA plots to check jetPt-trkPtsum
164   TH2F* fh2CorrPt1Pt2[6];                //!pt1-pt2 in FillCorr
165   TH2F* fh2CorrZ1Z2[6];                  //!z1-z2 in FillCorr
166   TH2F* fh2CorrKsi1Ksi2[6];              //!ksi1-ksi2 in FillCorr
167   TH2F* fh2CorrjT1jT2[6];                //!jt1-jt2 in FillCorr
168   
169   AliAnalysisTaskJetProperties(const AliAnalysisTaskJetProperties&);// not implemented
170   AliAnalysisTaskJetProperties& operator=(const AliAnalysisTaskJetProperties&);// not implemented
171   ClassDef(AliAnalysisTaskJetProperties, 2);
172 };
173
174 #endif