]>
Commit | Line | Data |
---|---|---|
ad869500 | 1 | #ifndef ALIANALYSISTASKJETCOREPP_H |
2 | #define ALIANALYSISTASKJETCOREPP_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 performs hadron-trigger recoil jet correlations | |
9 | // Output pT spectrum of jet given trigger pT | |
8e103a56 | 10 | // Author: filip krizek 16th March 2013 |
ad869500 | 11 | // ******************************************* |
12 | ||
13 | class TH1F; | |
14 | class TH1D; | |
15 | class TH1I; | |
16 | class TH2F; | |
17 | class TH3F; | |
80ac66f6 | 18 | class TList; |
ad869500 | 19 | class THnSparse; |
8e103a56 | 20 | class TRandom3; |
80ac66f6 | 21 | class TArrayI; |
ea603b64 | 22 | class TProfile; |
23 | class TFile; | |
24 | class TKey; | |
ad869500 | 25 | class AliESDEvent; |
26 | class AliAODExtension; | |
27 | class AliAODEvent; | |
ea603b64 | 28 | class AliGenPythiaEventHeader; |
ad869500 | 29 | |
30 | #include "AliAnalysisTaskSE.h" | |
31 | #include "AliVEvent.h" | |
32 | ||
33 | class AliAnalysisTaskJetCorePP : public AliAnalysisTaskSE { | |
34 | public: | |
35 | AliAnalysisTaskJetCorePP(); | |
36 | AliAnalysisTaskJetCorePP(const char *name); | |
37 | AliAnalysisTaskJetCorePP(const AliAnalysisTaskJetCorePP& a); | |
38 | AliAnalysisTaskJetCorePP& operator=(const AliAnalysisTaskJetCorePP& a); // not implemented | |
39 | virtual ~AliAnalysisTaskJetCorePP(); | |
40 | virtual void LocalInit() {Init();} | |
41 | virtual void Init(); | |
42 | virtual void UserCreateOutputObjects(); | |
43 | virtual void UserExec(Option_t *option); | |
44 | virtual void Terminate(const Option_t*); | |
ea603b64 | 45 | virtual Bool_t Notify(); |
ad869500 | 46 | |
47 | virtual void SetBranchName(const TString &name){ fJetBranchName = name; } | |
160dbdb8 | 48 | virtual void SetBranchNameMC(const TString &name){ |
49 | fJetBranchNameMC = name; | |
50 | if(fJetBranchNameMC.Contains("MC2")){ | |
51 | fJetBranchNameMCFull = fJetBranchNameMC; | |
52 | fJetBranchNameMCFull.ReplaceAll("MC2","MC"); | |
53 | } | |
54 | } | |
ad869500 | 55 | virtual void SetNonStdFile(char* c){fNonStdFile = c;} |
56 | virtual void SetSystem(Int_t sys) { fSystem = sys; } | |
57 | virtual void SetJetR(Float_t jR) { fJetParamR = jR; } | |
58 | virtual void SetOfflineTrgMask(AliVEvent::EOfflineTriggerTypes mask) { fOfflineTrgMask = mask; } | |
59 | virtual void SetMinContribVtx(Int_t n) { fMinContribVtx = n; } | |
60 | virtual void SetVtxZMin(Float_t z) { fVtxZMin = z; } | |
61 | virtual void SetVtxZMax(Float_t z) { fVtxZMax = z; } | |
62 | virtual void SetFilterMask(UInt_t i){fFilterMask = i;} | |
63 | virtual void SetCentMin(Float_t cent) { fCentMin = cent; } | |
64 | virtual void SetCentMax(Float_t cent) { fCentMax = cent; } | |
65 | virtual void SetJetEtaMin(Float_t eta) { fJetEtaMin = eta; } | |
66 | virtual void SetJetEtaMax(Float_t eta) { fJetEtaMax = eta; } | |
67 | virtual void SetTriggerEtaCut(Float_t eta) { fTriggerEtaCut = eta; } | |
68 | virtual void SetTrackEtaCut(Float_t eta) { fTrackEtaCut = eta; } | |
69 | virtual void SetTrackLowPtCut(Float_t pt) { fTrackLowPtCut=pt; } | |
8e103a56 | 70 | virtual void SetTriggerType(Int_t tt){ fHardest=tt;} |
71 | virtual void SetEventNumberRangeLow(Int_t rl){ fEventNumberRangeLow=rl;} | |
72 | virtual void SetEventNumberRangeHigh(Int_t rh){ fEventNumberRangeHigh=rh;} | |
73 | virtual void SetTriggerPtRangeLow(Float_t tl){ fTriggerPtRangeLow=tl;} | |
74 | virtual void SetTriggerPtRangeHigh(Float_t th){ fTriggerPtRangeHigh=th;} | |
75 | ||
ad869500 | 76 | |
77 | Double_t RelativePhi(Double_t angle1, Double_t angle2); | |
78 | ||
79 | private: | |
80 | //private member functions | |
81 | Int_t GetListOfTracks(TList *list); //returns index of trig and track list | |
80ac66f6 | 82 | //Double_t GetBackgroundInPerpCone(Float_t jetR, Double_t jetPhi, Double_t jetEta, TList* trkList); //sums pT in the cone perp in phi to jet |
83 | Bool_t SelectMCGenTracks(AliVParticle *trk, TList *trkList, Double_t &ptLeading, Int_t &index, Int_t counter); | |
84 | void FillEffHistos(TList *recList, TList *genList); | |
85 | ||
ad869500 | 86 | //private member objects |
87 | AliESDEvent *fESD; //! ESD object | |
88 | AliAODEvent *fAODIn; //! AOD event for AOD input tracks | |
89 | AliAODEvent *fAODOut; //! AOD event | |
90 | AliAODExtension *fAODExtension; //! where we take the jets from can be input or output AOD | |
91 | ||
92 | // jets to compare | |
93 | TString fJetBranchName; // name of jet branch | |
80ac66f6 | 94 | TString fJetBranchNameMC; // name of jet branch |
160dbdb8 | 95 | TString fJetBranchNameMCFull; // name of jet branch |
80ac66f6 | 96 | TList *fListJets; //! jet list reconstructed level |
160dbdb8 | 97 | TList *fListJetsGen; //! jet list generator level charged jet |
98 | TList *fListJetsGenFull; //! jet list generator level full jets | |
ad869500 | 99 | |
100 | TString fNonStdFile; // name of delta aod file to catch the extension | |
101 | ||
102 | // event selection | |
103 | Int_t fSystem; // collision system pp=0, pPb=1 | |
104 | Float_t fJetParamR; // jet cone resolution (radius) R | |
105 | AliVEvent::EOfflineTriggerTypes fOfflineTrgMask; // mask of offline trigs | |
106 | Int_t fMinContribVtx; // min numb of trk contrib for prim vertex | |
107 | Float_t fVtxZMin; // lower bound on vertex z | |
108 | Float_t fVtxZMax; // upper bound on vertex z | |
109 | UInt_t fFilterMask; // filter bit for slected tracks | |
110 | Float_t fCentMin; // lower bound on centrality | |
111 | Float_t fCentMax; // upper bound on centrality | |
112 | Float_t fJetEtaMin; // lower bound on eta for found jets | |
113 | Float_t fJetEtaMax; // upper bound on eta for found jets | |
114 | Float_t fTriggerEtaCut; // lower bound on eta for trigger track | |
115 | Float_t fTrackEtaCut; // upper bound on eta for trigger track | |
116 | Float_t fTrackLowPtCut; // upper bound on eta for trigger track | |
117 | ||
118 | ||
119 | TList *fOutputList; //! output data container | |
120 | TH1I *fHistEvtSelection; //! event selection statistic | |
121 | TH2F *fh2Ntriggers; //trigger pT versus centrality | |
122 | THnSparse *fHJetSpec; //Recoil jet spectrum | |
123 | ||
124 | //Diagnostics | |
125 | THnSparse *fHJetDensity; //density of jet with A>0.07 //fk | |
126 | THnSparse *fHJetDensityA4; //density of jets with A>0.4 //fk | |
7fc3d134 | 127 | TH2D *fhJetPhi; //Azimuthal distribution of jets |
128 | TH2D *fhTriggerPhi; //Azimuthal distribution of trigger hadron | |
129 | TH2D *fhJetEta; //Pseudorapidity distribution of jets | |
130 | TH2D *fhTriggerEta; //Pseudorapidity distribution of trigger hadron | |
ad869500 | 131 | TH1D *fhVertexZ; //z vertex distribution |
132 | TH1D *fhVertexZAccept; //z vertex distribution after cut | |
133 | TH1D *fhContribVtx; //contributors to vertex | |
134 | TH1D *fhContribVtxAccept; //contributors to vertex after cut | |
135 | TH1D *fhDphiTriggerJet; //Deltaphi between trigger and jet | |
136 | TH1D *fhDphiTriggerJetAccept; //Deltaphi between trigger and jet after cut | |
137 | TH1D *fhCentrality; //Deltaphi between trigger and jet | |
138 | TH1D *fhCentralityAccept; //Deltaphi between trigger and jet after cut | |
139 | ||
7fc3d134 | 140 | THnSparse *fHJetPtRaw; //bg unsubtr. vs bg subtr. pT spectrum of jets vs jet area |
141 | THnSparse *fHLeadingJetPtRaw; //bg unsubtr. vs bg. subtr. leading jet pT vs area | |
142 | THnSparse *fHDphiVsJetPtAll; //Dphitrigger-jet versus jet pt for all jets given pTtrigg | |
7fc3d134 | 143 | |
80ac66f6 | 144 | //MC generator level |
145 | TH2D *fhJetPtGenVsJetPtRec; //jet respose matrix | |
160dbdb8 | 146 | TH1D *fhJetPtGen; //generated pT spectrum of charged jets |
147 | TH2D *fhJetPtGenChargVsJetPtGenFull; //generated pT spectrum of full jets | |
148 | TH1D *fhJetPtGenFull; // generated pT spectrum of full jets | |
80ac66f6 | 149 | TH2F *fh2NtriggersGen; //trigger pT versus centrality in generator level |
150 | THnSparse *fHJetSpecGen; //Recoil jet spectrum in generator level | |
151 | TH2D *fhPtTrkTruePrimRec; // pt spectrum of true reconstructed primary tracks | |
152 | TH2D *fhPtTrkTruePrimGen; // pt spectrum of true generated primary track | |
153 | TH2D *fhPtTrkSecOrFakeRec; // pt spectrum of reconstructed fake or secondary tracks | |
154 | ||
155 | Bool_t fIsMC; //flag analysis on MC data with true and on the real data false | |
156 | TArrayI faGenIndex; // labels of particles on MC generator level | |
157 | TArrayI faRecIndex; // labels of particles on reconstructed track level | |
ad869500 | 158 | const Double_t fkAcceptance; //eta times phi Alice coverage |
80ac66f6 | 159 | const Double_t fkDeltaPhiCut; //Delta phi cut on trigger-jet distance in azimuth |
ea603b64 | 160 | |
161 | TProfile* fh1Xsec; //! pythia cross section and trials | |
162 | TH1F* fh1Trials; //! trials are added | |
163 | TH1F* fh1AvgTrials; //! trials are added | |
164 | TH1F* fh1PtHard; //! Pt har of the event... | |
165 | TH1F* fh1PtHardNoW; //! Pt har of the event without weigt | |
166 | TH1F* fh1PtHardTrials; //! Number of trials | |
167 | Float_t fAvgTrials; // Average number of trials | |
168 | ||
8e103a56 | 169 | |
170 | Int_t fHardest; // trigger type 0=single incl, 1=LP | |
171 | Int_t fEventNumberRangeLow; // lower range of selected event numbers | |
172 | Int_t fEventNumberRangeHigh; // high range of selected event numbers | |
173 | Float_t fTriggerPtRangeLow; // lower range of selected trigger pt | |
174 | Float_t fTriggerPtRangeHigh; // upper range of selected trigger pt | |
175 | ||
176 | TRandom3* fRandom; // TRandom3 | |
177 | ||
160dbdb8 | 178 | ClassDef(AliAnalysisTaskJetCorePP, 7); //has to end with number larger than 0 |
ad869500 | 179 | }; |
180 | ||
181 | #endif | |
182 |