]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGJE/AliAnalysisTaskJetCore.h
76c67e35790e3c3f656f669a3af19874dbdbb677
[u/mrichter/AliRoot.git] / PWGJE / AliAnalysisTaskJetCore.h
1 #ifndef ALIANALYSISTASKJETCORE_H
2 #define ALIANALYSISTASKJETCORE_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 // **************************************
8 // This task computes several jet observables like 
9 // the fraction of energy in inner and outer coronnas,
10 // the distance from track to jet axis and a 
11 // correlation strength distribution of particles inside jets.    
12 // Author: lcunquei@cern.ch
13 // *******************************************
14
15 class TH1F;
16 class TH1I;
17 class TH2F;
18 class TH3F;
19 class THnSparse;
20 class AliESDEvent;
21 class AliAODExtension;
22 class AliAODEvent;
23
24 #include "AliAnalysisTaskSE.h"
25 #include "AliVEvent.h"
26
27 class AliAnalysisTaskJetCore : public AliAnalysisTaskSE {
28 public:
29    AliAnalysisTaskJetCore();
30    AliAnalysisTaskJetCore(const char *name);
31    virtual ~AliAnalysisTaskJetCore();
32    virtual void     LocalInit() {Init();}
33    virtual void     Init();
34    virtual void     UserCreateOutputObjects();
35    virtual void     UserExec(Option_t *option);
36    virtual void     Terminate(const Option_t*);
37
38    virtual Int_t      GetNInputTracks();
39      
40    Double_t RelativePhi(Double_t angle1,Double_t angle2);     
41     virtual THnSparse* NewTHnSparseF(const char* name, UInt_t entries);
42    virtual void       GetDimParams(Int_t iEntry,TString &label, Int_t &nbins, Double_t &xmin, Double_t &xmax);
43    virtual AliVEvent::EOfflineTriggerTypes GetOfflineTrgMask() const { return fOfflineTrgMask; }
44    virtual void     GetBranchNames(TString &branch1, TString &branch2) const { branch1 = fJetBranchName[0]; branch2 = fJetBranchName[1]; }
45    virtual Bool_t   GetIsPbPb() const { return fIsPbPb; }
46    virtual Int_t    GetMinContribVtx() const { return fMinContribVtx; };
47    virtual Float_t  GetVtxZMin() const { return fVtxZMin; }
48    virtual Float_t  GetVtxZMax() const { return fVtxZMax; }
49    virtual Int_t    GetEvtClassMin() const { return fEvtClassMin; }
50    virtual Int_t    GetEvtClassMax() const { return fEvtClassMax; }
51    virtual Float_t  GetCentMin() const { return fCentMin; }
52    virtual Float_t  GetCentMax() const { return fCentMax; }
53    virtual Int_t    GetNInputTracksMin() const { return fNInputTracksMin; }
54    virtual Int_t    GetNInputTracksMax() const { return fNInputTracksMax; } 
55    virtual Float_t  GetJetEtaMin() const { return fJetEtaMin; }
56    virtual Float_t  GetJetEtaMax() const { return fJetEtaMax; }
57    virtual Float_t  GetJetPtMin() const { return fJetPtMin; }
58    virtual Float_t  GetJetPtFractionMin() const { return fJetPtFractionMin; }
59    virtual Int_t    GetNMatchJets() const { return fNMatchJets; }
60    virtual void     SetBranchNames(const TString &branch1, const TString &branch2);
61    virtual void     SetBackgroundBranch(TString &branch) { fBackgroundBranch = branch;}
62    virtual void     SetIsPbPb(Bool_t b=kTRUE) { fIsPbPb = b; }
63    virtual void     SetOfflineTrgMask(AliVEvent::EOfflineTriggerTypes mask) { fOfflineTrgMask = mask; }
64    virtual void     SetMinContribVtx(Int_t n) { fMinContribVtx = n; }
65    virtual void     SetVtxZMin(Float_t z) { fVtxZMin = z; }
66    virtual void     SetVtxZMax(Float_t z) { fVtxZMax = z; }
67    virtual void     SetEvtClassMin(Int_t evtClass) { fEvtClassMin = evtClass; }
68    virtual void     SetEvtClassMax(Int_t evtClass) { fEvtClassMax = evtClass; }
69    virtual void     SetFilterMask(UInt_t i){fFilterMask = i;}
70    virtual void     SetRadioFrac(Float_t radiofrac) { fRadioFrac = radiofrac; }
71    virtual void     SetMinDist(Float_t minDist) { fMinDist = minDist; }
72    virtual void     SetCentMin(Float_t cent) { fCentMin = cent; }
73    virtual void     SetCentMax(Float_t cent) { fCentMax = cent; }
74    virtual void     SetNInputTracksMin(Int_t nTr) { fNInputTracksMin = nTr; }
75    virtual void     SetNInputTracksMax(Int_t nTr) { fNInputTracksMax = nTr; }
76    virtual void     SetAngStructCloseTracks(Int_t yesno){fAngStructCloseTracks=yesno;}
77    virtual void     SetCheckMethods(Int_t yesno){fCheckMethods=yesno;}
78    virtual void     SetEventMixing(Int_t yesno){fDoEventMixing=yesno;}
79    virtual void     SetJetEtaMin(Float_t eta) { fJetEtaMin = eta; }
80    virtual void     SetJetEtaMax(Float_t eta) { fJetEtaMax = eta; }
81    virtual void     SetJetPtMin(Float_t pt) { fJetPtMin = pt; }
82    virtual void     SetJetTriggerExclude(UChar_t i) { fJetTriggerExcludeMask = i; }
83    virtual void     SetJetPtFractionMin(Float_t frac) { fJetPtFractionMin = frac; }
84    virtual void     SetNMatchJets(Int_t n) { fNMatchJets = n; }
85    virtual void     SetFillEvent(Bool_t b) { fbEvent = b; }
86    virtual void     SetKeepJets(Bool_t b = kTRUE) { fKeepJets = b; }
87    virtual void     SetNonStdFile(char* c){fNonStdFile = c;} 
88
89
90 private:
91    // ESD/AOD events
92    AliESDEvent *fESD;    //! ESD object
93    AliAODEvent *fAOD;    //! AOD event
94     AliAODExtension  *fAODExtension; //! where we take the jets from can be input or output AOD
95    Int_t   GetListOfTracks(TList *list);
96    Int_t   GetHardestTrackBackToJet(AliAODJet *jet);
97    Int_t   GetListOfTracksCloseToJet(TList *list,AliAODJet *jet);
98    // jets to compare
99    TString fJetBranchName[2]; //  name of jet branches to compare
100    TList *fListJets[2];       //! jet lists
101
102    TString fBackgroundBranch;
103    TString       fNonStdFile; // name of delta aod file to catch the extension
104    // event selection
105    Bool_t fIsPbPb;         // is Pb-Pb (fast embedding) or p-p (detector response)
106    AliVEvent::EOfflineTriggerTypes fOfflineTrgMask; // mask of offline triggers to accept
107    Int_t   fMinContribVtx; // minimum number of track contributors for primary vertex
108    Float_t fVtxZMin;      // lower bound on vertex z
109    Float_t fVtxZMax;      // upper bound on vertex z
110    Int_t   fEvtClassMin;          // lower bound on event class
111    Int_t   fEvtClassMax;          // upper bound on event class
112    UInt_t  fFilterMask;            // filter bit for slecected tracks
113    Float_t fRadioFrac;                          //!size of the concentric cone
114    Float_t fMinDist;   
115    Float_t fCentMin;      // lower bound on centrality
116    Float_t fCentMax;      // upper bound on centrality
117    Int_t   fNInputTracksMin;  // lower bound of nb. of input tracks
118    Int_t   fNInputTracksMax;  // upper bound of nb. of input tracks
119    Int_t   fAngStructCloseTracks;//only constituents or all tracks with R<0.8 for the angular structure
120    Int_t   fCheckMethods;     //to look into more detail into the core
121    Int_t   fDoEventMixing;
122    Float_t fJetEtaMin;        // lower bound on eta for found jets
123    Float_t fJetEtaMax;        // upper bound on eta for found jets
124    Int_t   fNevents;          // number of events
125    Int_t   fTindex;           // index reference
126    Int_t   fTrigBufferIndex;  //index for the buffering
127    Float_t fJetPtMin;         // minimum jet pT
128    UChar_t fJetTriggerExcludeMask; // mask for jet triggeres to exclude
129    Float_t fJetPtFractionMin; // minimum fraction for positiv match of jets
130    Int_t   fNMatchJets;       // maximal nb. of jets taken for matching
131    Double_t fMatchMaxDist;     // maximal distance of matching jets
132    Bool_t  fKeepJets;          // keep jets with negative pt after background subtraction
133   
134
135    // output objects
136    const Int_t fkNbranches;                   //! number of branches to be read
137    const Int_t fkEvtClasses;                  //! number of event classes
138    
139    TList *fOutputList;                        //! output data container
140    Bool_t fbEvent;                            // fill fhnEvent
141    TH1I  *fHistEvtSelection;                  //! event selection statistic
142    THnSparse *fhnDeltaR;                     //! variables per jet
143    THnSparse *fhnMixedEvents;                //!mixed events matrix
144  
145
146    TH2F      *fh2JetCoreMethod1C10;          //Energy fraction in the core C10 method 1
147    TH2F      *fh2JetCoreMethod2C10;          //Energy fraction in the core C10 method 2
148    TH2F      *fh2JetCoreMethod1C20;          //Energy fraction in the core C20 method 1 
149    TH2F      *fh2JetCoreMethod2C20;          //Energy fraction in the core C20 method 2
150    TH2F      *fh2JetCoreMethod1C30;          //Energy fraction in the core C30 method 1
151    TH2F      *fh2JetCoreMethod2C30;          //Energy fraction in the core C30 method 2
152    TH2F      *fh2JetCoreMethod1C60;          //Energy fraction in the core C60 method 1
153    TH2F      *fh2JetCoreMethod2C60;          //Energy fraction in the core C60 method 2
154
155      TH2F*      fh2AngStructpt1C10;         //Average two particle correlation function:C10 pt1
156      TH2F*      fh2AngStructpt2C10;         //C10 pt2
157      TH2F*      fh2AngStructpt3C10;         //C10 pt3
158      TH2F*      fh2AngStructpt4C10;         //C10 pt4
159      TH2F*      fh2AngStructpt1C20;         //C20 pt1
160      TH2F*      fh2AngStructpt2C20;         //C20 pt2
161      TH2F*      fh2AngStructpt3C20;         //C20 pt3 
162      TH2F*      fh2AngStructpt4C20;         //C20 pt4
163      TH2F*      fh2AngStructpt1C30;         //C30 pt1
164      TH2F*      fh2AngStructpt2C30;         //C30 pt2
165      TH2F*      fh2AngStructpt3C30;         //C30 pt3
166      TH2F*      fh2AngStructpt4C30;         //C30 pt4
167      TH2F*      fh2AngStructpt1C60;         //C60 pt1
168      TH2F*      fh2AngStructpt2C60;         //C60 pt2
169      TH2F*      fh2AngStructpt3C60;         //C60 pt3
170      TH2F*      fh2AngStructpt4C60;         //C60 pt4
171      TH2F*      fh2JetsumHT1R2;             //jet shape 02
172      TH2F*      fh2JetsumHT4R2;             //jet shape 02
173      TH2F*      fh2JetsumHT8R2;             //jet shape 02
174      TH2F*      fh2JetsumHT1R4;             //jet shape 02
175      TH2F*      fh2JetsumHT4R4;             //jet shape 02
176      TH2F*      fh2JetsumHT8R4;             //jet shape 02
177      TH2F*      fh2JetsumHT1R6;             //jet shape 02
178      TH2F*      fh2JetsumHT4R6;             //jet shape 02
179      TH2F*      fh2JetsumHT8R6;             //jet shape 02
180      TH2F*      fh2JetsumHT1R8;             //jet shape 02
181      TH2F*      fh2JetsumHT4R8;             //jet shape 02
182      TH2F*      fh2JetsumHT8R8;             //jet shape 02
183      TH2F*      fh2JetsumHT1R10;             //jet shape 12
184      TH2F*      fh2JetsumHT4R10;             //jet shape 12
185      TH2F*      fh2JetsumHT8R10;             //jet shape 12
186
187      TH3F*      fh3spectriggered;           //triggered spectra
188      TH3F*      fh3specbiased;              //biased spectra
189      TH3F*      fh3spectot;                 //the two combined  
190      TH3F*      fh3spectotb;                 //the two combined    
191      
192      Double_t            fTrigBuffer[10][7];      //!buffer for triggers   
193
194    AliAnalysisTaskJetCore(const AliAnalysisTaskJetCore&); // not implemented
195    AliAnalysisTaskJetCore& operator=(const AliAnalysisTaskJetCore&); // not implemented
196
197    ClassDef(AliAnalysisTaskJetCore, 4);
198 };
199
200 #endif
201