]>
Commit | Line | Data |
---|---|---|
1c5acb87 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
1c5acb87 | 15 | |
16 | //_________________________________________________________________________ | |
17 | // Class that contains the algorithm for the reconstruction of jet, cone around leading particle | |
18 | // The seed is a backward particle (direct photon) | |
78219bac | 19 | // 1) Take the trigger particle stored in AliAODPWG4ParticleCorrelation, |
1c5acb87 | 20 | // 2) Search for the highest pt leading particle opposite to the photon within a phi, pt window |
21 | // 3) Take all particles around leading in a cone R with pt larger than threshold and construct the jet | |
22 | // | |
2db10729 | 23 | // Class created from old AliPHOSGammaJet |
1c5acb87 | 24 | // (see AliRoot versions previous Release 4-09) |
25 | // | |
2db10729 | 26 | //*-- Author: Gustavo Conesa (LNF-INFN) |
1c5acb87 | 27 | ////////////////////////////////////////////////////////////////////////////// |
28 | ||
29 | ||
30 | // --- ROOT system --- | |
31 | #include "TH2F.h" | |
477d6cee | 32 | #include "TClonesArray.h" |
9415d854 | 33 | #include "TClass.h" |
34 | //#include "Riostream.h" | |
1c5acb87 | 35 | |
36 | //---- Analysis system ---- | |
88f9563f | 37 | #include "AliVTrack.h" |
0ae57829 | 38 | #include "AliVCluster.h" |
1c5acb87 | 39 | #include "AliCaloTrackReader.h" |
40 | #include "AliNeutralMesonSelection.h" | |
2db10729 | 41 | #include "AliAnaParticleJetLeadingConeCorrelation.h" |
1c5acb87 | 42 | #include "AliCaloPID.h" |
43 | #include "AliAODPWG4ParticleCorrelation.h" | |
ff45398a | 44 | #include "AliFiducialCut.h" |
1c5acb87 | 45 | |
46 | ClassImp(AliAnaParticleJetLeadingConeCorrelation) | |
47 | ||
48 | ||
2db10729 | 49 | //_________________________________________________________________________________ |
50 | AliAnaParticleJetLeadingConeCorrelation::AliAnaParticleJetLeadingConeCorrelation() : | |
51 | AliAnaCaloTrackCorrBaseClass(), fJetsOnlyInCTS(kFALSE), fPbPb(kFALSE), | |
52 | fSeveralConeAndPtCuts(0), fReMakeJet(0), | |
53 | fDeltaPhiMaxCut(0.), fDeltaPhiMinCut(0.), | |
54 | fLeadingRatioMaxCut(0.), fLeadingRatioMinCut(0.), | |
55 | fJetCTSRatioMaxCut(0.), fJetCTSRatioMinCut(0.), | |
56 | fJetRatioMaxCut(0.), fJetRatioMinCut(0.), | |
57 | fJetNCone(0),fJetNPt(0), fJetCone(0), | |
58 | fJetPtThreshold(0),fJetPtThresPbPb(0), | |
59 | fPtTriggerSelectionCut(0.0), fSelect(0),fSelectIsolated(0), | |
60 | fTrackVector(),fBkgMom(),fJetMom(),fJetConstMom(), | |
61 | fLeadingMom(),fLeadingPi0Mom(),fLeadingPhoMom1(),fLeadingPhoMom2(),fLeadingChargeMom(), | |
62 | //Histograms | |
63 | fOutCont(0x0), | |
64 | //Leading | |
65 | fhChargedLeadingPt(0),fhChargedLeadingPhi(0),fhChargedLeadingEta(0), | |
66 | fhChargedLeadingDeltaPt(0),fhChargedLeadingDeltaPhi(0),fhChargedLeadingDeltaEta(0), | |
67 | fhChargedLeadingRatioPt(0), | |
68 | fhNeutralLeadingPt(0),fhNeutralLeadingPhi(0),fhNeutralLeadingEta(0), | |
69 | fhNeutralLeadingDeltaPt(0),fhNeutralLeadingDeltaPhi(0),fhNeutralLeadingDeltaEta(0), | |
70 | fhNeutralLeadingRatioPt(0),fhChargedLeadingXi(0), fhNeutralLeadingXi(0), | |
71 | fhChargedLeadingDeltaPhiRatioPt30(0), fhNeutralLeadingDeltaPhiRatioPt30(0), | |
72 | fhChargedLeadingDeltaPhiRatioPt50(0), fhNeutralLeadingDeltaPhiRatioPt50(0), | |
73 | //Jet | |
74 | fhJetPt(0),fhJetRatioPt(0),fhJetDeltaPhi(0), fhJetDeltaEta(0), | |
75 | fhJetLeadingRatioPt(0),fhJetLeadingDeltaPhi(0),fhJetLeadingDeltaEta(0), | |
76 | fhJetFFz(0),fhJetFFxi(0),fhJetFFpt(0),fhJetNTracksInCone(0), | |
77 | fhBkgPt(0),fhBkgRatioPt(0),fhBkgDeltaPhi(0), fhBkgDeltaEta(0), | |
78 | fhBkgLeadingRatioPt(0),fhBkgLeadingDeltaPhi(0),fhBkgLeadingDeltaEta(0), | |
79 | fhBkgFFz(0),fhBkgFFxi(0),fhBkgFFpt(0),fhBkgNTracksInCone(0), | |
80 | //Several cones and thres histograms | |
81 | fhJetPts(),fhJetRatioPts(),fhJetDeltaPhis(), fhJetDeltaEtas(), | |
82 | fhJetLeadingRatioPts(),fhJetLeadingDeltaPhis(),fhJetLeadingDeltaEtas(), | |
83 | fhJetFFzs(),fhJetFFxis(),fhJetFFpts(),fhJetNTracksInCones(), | |
84 | fhBkgPts(),fhBkgRatioPts(),fhBkgDeltaPhis(), fhBkgDeltaEtas(), | |
85 | fhBkgLeadingRatioPts(),fhBkgLeadingDeltaPhis(),fhBkgLeadingDeltaEtas(), | |
86 | fhBkgFFzs(),fhBkgFFxis(),fhBkgFFpts(),fhBkgNTracksInCones() | |
1c5acb87 | 87 | { |
88 | //Default Ctor | |
477d6cee | 89 | |
1c5acb87 | 90 | //Initialize parameters |
2db10729 | 91 | |
1c5acb87 | 92 | for(Int_t i = 0; i<6; i++){ |
93 | fJetXMin1[i] = 0.0 ; | |
94 | fJetXMin2[i] = 0.0 ; | |
95 | fJetXMax1[i] = 0.0 ; | |
96 | fJetXMax2[i] = 0.0 ; | |
97 | fBkgMean[i] = 0.0 ; | |
98 | fBkgRMS[i] = 0.0 ; | |
99 | if( i < 2 ){ | |
100 | fJetE1[i] = 0.0 ; | |
101 | fJetE2[i] = 0.0 ; | |
102 | fJetSigma1[i] = 0.0 ; | |
103 | fJetSigma2[i] = 0.0 ; | |
104 | } | |
105 | } | |
477d6cee | 106 | |
1c5acb87 | 107 | //Several cones and thres histograms |
108 | for(Int_t i = 0; i<5; i++){ | |
109 | fJetCones[i] = 0.0 ; | |
110 | fJetNameCones[i] = "" ; | |
111 | fJetPtThres[i] = 0.0 ; | |
112 | fJetNamePtThres[i] = "" ; | |
113 | for(Int_t j = 0; j<5; j++){ | |
114 | fhJetPts[i][j]=0 ; | |
115 | fhJetRatioPts[i][j]=0 ; | |
2db10729 | 116 | fhJetDeltaPhis[i][j]=0 ; |
1c5acb87 | 117 | fhJetDeltaEtas[i][j]=0 ; |
118 | fhJetLeadingRatioPts[i][j]=0 ; | |
119 | fhJetLeadingDeltaPhis[i][j]=0 ; | |
120 | fhJetLeadingDeltaEtas[i][j]=0 ; | |
121 | fhJetFFzs[i][j]=0 ; | |
122 | fhJetFFxis[i][j]=0 ; | |
123 | fhJetFFpts[i][j]=0 ; | |
124 | fhJetNTracksInCones[i][j]=0 ; | |
125 | fhBkgPts[i][j]=0 ; | |
126 | fhBkgRatioPts[i][j]=0 ; | |
2db10729 | 127 | fhBkgDeltaPhis[i][j]=0 ; |
1c5acb87 | 128 | fhBkgDeltaEtas[i][j]=0 ; |
129 | fhBkgLeadingRatioPts[i][j]=0 ; | |
130 | fhBkgLeadingDeltaPhis[i][j]=0 ; | |
131 | fhBkgLeadingDeltaEtas[i][j]=0 ; | |
132 | fhBkgFFzs[i][j]=0 ; | |
133 | fhBkgFFxis[i][j]=0 ; | |
134 | fhBkgFFpts[i][j]=0 ; | |
135 | fhBkgNTracksInCones[i][j]=0 ; | |
136 | } | |
137 | } | |
477d6cee | 138 | |
2db10729 | 139 | InitParameters(); |
1c5acb87 | 140 | |
1c5acb87 | 141 | } |
142 | ||
143 | //____________________________________________________________________________ | |
2db10729 | 144 | Double_t AliAnaParticleJetLeadingConeCorrelation::CalculateJetRatioLimit(Double_t ptg, const Double_t *par, const Double_t *x) const { |
1c5acb87 | 145 | //Calculate the ratio of the jet and trigger particle limit for the selection |
146 | //WARNING: need to check what it does | |
9415d854 | 147 | //printf("CalculateLimit: x1 %2.3f, x2%2.3f\n",x[0],x[1]); |
1c5acb87 | 148 | Double_t ePP = par[0] + par[1] * ptg ; |
149 | Double_t sPP = par[2] + par[3] * ptg ; | |
150 | Double_t f = x[0] + x[1] * ptg ; | |
151 | Double_t ePbPb = ePP + par[4] ; | |
152 | Double_t sPbPb = TMath::Sqrt(sPP*sPP+ par[5]*par[5]) ; | |
153 | Double_t rat = (ePbPb - sPbPb * f) / ptg ; | |
9415d854 | 154 | //printf("CalculateLimit: ePP %2.3f, sPP %2.3f, f %2.3f\n", ePP, sPP, f); |
155 | //printf("CalculateLimit: ePbPb %2.3f, sPbPb %2.3f, rat %2.3f\n", ePbPb, sPbPb, rat); | |
1c5acb87 | 156 | return rat ; |
157 | } | |
158 | ||
f50ae487 | 159 | //___________________________________________________________________________________________________ |
160 | void AliAnaParticleJetLeadingConeCorrelation::FillJetHistos(AliAODPWG4ParticleCorrelation * particle, | |
161 | const TLorentzVector jet, | |
162 | const TString & type, const TString & lastname) | |
1c5acb87 | 163 | { |
2db10729 | 164 | //Fill jet and background histograms |
f50ae487 | 165 | Double_t ptTrig = particle->Pt(); |
166 | Double_t ptJet = jet.Pt(); | |
167 | Double_t ptLead = fLeadingMom.Pt(); | |
1c5acb87 | 168 | Double_t phiTrig = particle->Phi(); |
f50ae487 | 169 | Double_t phiJet = jet.Phi(); |
9415d854 | 170 | if(phiJet < 0) phiJet+=TMath::TwoPi(); |
f50ae487 | 171 | Double_t phiLead = fLeadingMom.Phi(); |
9415d854 | 172 | if(phiLead < 0) phiLead+=TMath::TwoPi(); |
1c5acb87 | 173 | Double_t etaTrig = particle->Eta(); |
f50ae487 | 174 | Double_t etaJet = jet.Eta(); |
175 | Double_t etaLead = fLeadingMom.Eta(); | |
9415d854 | 176 | |
f8006433 | 177 | TH2F *h1 = 0x0; |
178 | h1 = dynamic_cast<TH2F*>(GetOutputContainer()->FindObject(Form("%s%sPt%s",GetAddedHistogramsStringToName().Data(),type.Data(),lastname.Data()))); | |
179 | if(h1)h1->Fill(ptTrig,ptJet); | |
180 | ||
181 | TH2F *h2 = 0x0; | |
182 | h2 = dynamic_cast<TH2F*>(GetOutputContainer()->FindObject(Form("%s%sRatioPt%s",GetAddedHistogramsStringToName().Data(),type.Data(),lastname.Data()))); | |
183 | if(h2) h2->Fill(ptTrig,ptJet/ptTrig); | |
184 | ||
185 | TH2F *h3 = 0x0; | |
186 | h3 = dynamic_cast<TH2F*>(GetOutputContainer()->FindObject(Form("%s%sLeadingRatioPt%s",GetAddedHistogramsStringToName().Data(),type.Data(),lastname.Data()))); | |
187 | if(h3)h3->Fill(ptTrig,ptLead/ptJet); | |
9415d854 | 188 | |
62ccac92 | 189 | // dynamic_cast<TH2F*>(GetOutputContainer()->FindObject(Form("%s%sPhi%s",GetAddedHistogramsStringToName().Data(),type.Data(),lastname.Data())))-> |
9415d854 | 190 | // Fill(ptTrig,phiJet); |
f8006433 | 191 | TH2F *h4 = 0x0; |
192 | h4 = dynamic_cast<TH2F*>(GetOutputContainer()->FindObject(Form("%s%sDeltaPhi%s",GetAddedHistogramsStringToName().Data(),type.Data(),lastname.Data()))); | |
193 | if(h4) h4->Fill(ptTrig,phiJet-phiTrig); | |
194 | TH2F *h5 = 0x0; | |
195 | h5 = dynamic_cast<TH2F*>(GetOutputContainer()->FindObject(Form("%s%sLeadingDeltaPhi%s",GetAddedHistogramsStringToName().Data(),type.Data(),lastname.Data()))); | |
196 | if(h5) h5->Fill(ptTrig,phiJet-phiLead); | |
9415d854 | 197 | |
62ccac92 | 198 | // dynamic_cast<TH2F*>(GetOutputContainer()->FindObject(Form("%s%sEta%s",GetAddedHistogramsStringToName().Data(),type.Data(),lastname.Data())))-> |
9415d854 | 199 | // Fill(ptTrig,etaJet); |
f8006433 | 200 | TH2F *h6 = 0x0; |
201 | h6 = dynamic_cast<TH2F*>(GetOutputContainer()->FindObject(Form("%s%sDeltaEta%s",GetAddedHistogramsStringToName().Data(),type.Data(),lastname.Data()))); | |
202 | if(h6) h6->Fill(ptTrig,etaJet-etaTrig); | |
203 | TH2F *h7 = 0x0; | |
204 | h7 = dynamic_cast<TH2F*>(GetOutputContainer()->FindObject(Form("%s%sLeadingDeltaEta%s",GetAddedHistogramsStringToName().Data(),type.Data(),lastname.Data()))); | |
205 | if(h7) h7->Fill(ptTrig,etaJet-etaLead); | |
1c5acb87 | 206 | |
207 | //Construct fragmentation function | |
591cc579 | 208 | TObjArray * pl = new TObjArray; |
9415d854 | 209 | |
591cc579 | 210 | if(type == "Jet") pl = particle->GetObjArray(Form("%sTracks",GetAODObjArrayName().Data())); |
211 | else if(type == "Bkg") particle->GetObjArray(Form("%sTracksBkg",GetAODObjArrayName().Data())); | |
9415d854 | 212 | |
213 | if(!pl) return ; | |
214 | ||
1c5acb87 | 215 | //Different pt cut for jet particles in different collisions systems |
216 | //Only needed when jet is recalculated from AODs | |
c2ae67d0 | 217 | //Float_t ptcut = fJetPtThreshold; |
218 | //if(fPbPb && !fSeveralConeAndPtCuts && ptTrig > fPtTriggerSelectionCut) ptcut = fJetPtThresPbPb ; | |
1c5acb87 | 219 | |
f50ae487 | 220 | Int_t nTracksInCone = 0; |
9415d854 | 221 | |
c2ae67d0 | 222 | for(Int_t ipr = 0;ipr < pl->GetEntriesFast() ; ipr ++ ) |
223 | { | |
88f9563f | 224 | AliVTrack* track = dynamic_cast<AliVTrack *>(pl->At(ipr)) ; |
f50ae487 | 225 | if(track)fTrackVector.SetXYZ(track->Px(),track->Py(),track->Pz()); |
2db10729 | 226 | else AliDebug(1,"Track not available"); |
1c5acb87 | 227 | |
228 | //Recheck if particle is in jet cone | |
229 | if(fReMakeJet || fSeveralConeAndPtCuts) | |
f50ae487 | 230 | if(!IsParticleInJetCone(fTrackVector.Eta(), fTrackVector.Phi(), fLeadingMom.Eta(), fLeadingMom.Phi()) ) continue ; |
1c5acb87 | 231 | |
2db10729 | 232 | nTracksInCone++; |
9415d854 | 233 | |
164a1d84 | 234 | TH2F *ha =dynamic_cast<TH2F*>(GetOutputContainer()->FindObject(Form("%s%sFFz%s",GetAddedHistogramsStringToName().Data(),type.Data(),lastname.Data()))); |
f50ae487 | 235 | if(ha) ha->Fill(ptTrig,fTrackVector.Pt()/ptTrig); |
164a1d84 | 236 | TH2F *hb =dynamic_cast<TH2F*>(GetOutputContainer()->FindObject(Form("%s%sFFxi%s",GetAddedHistogramsStringToName().Data(),type.Data(),lastname.Data()))); |
f50ae487 | 237 | if(hb) hb->Fill(ptTrig,TMath::Log(ptTrig/fTrackVector.Pt())); |
164a1d84 | 238 | TH2F *hc =dynamic_cast<TH2F*>(GetOutputContainer()->FindObject(Form("%s%sFFpt%s",GetAddedHistogramsStringToName().Data(),type.Data(),lastname.Data()))); |
f50ae487 | 239 | if(hc) hc->Fill(ptTrig,fTrackVector.Pt()); |
1c5acb87 | 240 | |
241 | }//track loop | |
9415d854 | 242 | |
c2ae67d0 | 243 | if(nTracksInCone > 0) |
244 | { | |
164a1d84 | 245 | TH2F *hd = dynamic_cast<TH2F*>(GetOutputContainer()->FindObject(Form("%s%sNTracksInCone%s",GetAddedHistogramsStringToName().Data(),type.Data(),lastname.Data()))); |
05782323 | 246 | if(hd)hd->Fill(ptTrig, nTracksInCone); |
164a1d84 | 247 | } |
1c5acb87 | 248 | |
249 | } | |
250 | ||
251 | //________________________________________________________________________ | |
252 | TList * AliAnaParticleJetLeadingConeCorrelation::GetCreateOutputObjects() | |
2db10729 | 253 | { |
254 | // Create histograms to be saved in output file and | |
1c5acb87 | 255 | // store them in fOutCont |
9415d854 | 256 | |
2db10729 | 257 | fOutCont = new TList() ; |
258 | fOutCont->SetName("ParticleJetLeadingInConeCorrelationHistograms") ; | |
477d6cee | 259 | |
745913ae | 260 | Int_t nptbins = GetHistogramRanges()->GetHistoPtBins(); |
261 | Int_t nphibins = GetHistogramRanges()->GetHistoPhiBins(); | |
262 | Int_t netabins = GetHistogramRanges()->GetHistoEtaBins(); | |
263 | Float_t ptmax = GetHistogramRanges()->GetHistoPtMax(); | |
264 | Float_t phimax = GetHistogramRanges()->GetHistoPhiMax(); | |
265 | Float_t etamax = GetHistogramRanges()->GetHistoEtaMax(); | |
266 | Float_t ptmin = GetHistogramRanges()->GetHistoPtMin(); | |
267 | Float_t phimin = GetHistogramRanges()->GetHistoPhiMin(); | |
2db10729 | 268 | Float_t etamin = GetHistogramRanges()->GetHistoEtaMin(); |
477d6cee | 269 | |
2db10729 | 270 | fhChargedLeadingPt = new TH2F("ChargedLeadingPt","p_{T leading charge} vs p_{T trigger}",nptbins,ptmin,ptmax,nptbins,ptmin,ptmax); |
9415d854 | 271 | fhChargedLeadingPt->SetYTitle("p_{T leading charge}"); |
477d6cee | 272 | fhChargedLeadingPt->SetXTitle("p_{T trigger} (GeV/c)"); |
273 | ||
2db10729 | 274 | fhChargedLeadingPhi = new TH2F("ChargedLeadingPhi","#phi_{h^{#pm}} vs p_{T trigger}", nptbins,ptmin,ptmax,nphibins,phimin,phimax); |
477d6cee | 275 | fhChargedLeadingPhi->SetYTitle("#phi_{h^{#pm}} (rad)"); |
276 | fhChargedLeadingPhi->SetXTitle("p_{T trigger} (GeV/c)"); | |
277 | ||
2db10729 | 278 | fhChargedLeadingEta = new TH2F("ChargedLeadingEta","#eta_{h^{#pm}} vs p_{T trigger}",nptbins,ptmin,ptmax,netabins,etamin,etamax); |
477d6cee | 279 | fhChargedLeadingEta->SetYTitle("#eta_{h^{#pm}} "); |
280 | fhChargedLeadingEta->SetXTitle("p_{T trigger} (GeV/c)"); | |
281 | ||
2db10729 | 282 | fhChargedLeadingDeltaPt = new TH2F("ChargedLeadingDeltaPt","p_{T trigger} - p_{T h^{#pm}} vs p_{T trigger}",nptbins,ptmin,ptmax,nptbins,ptmin,ptmax); |
477d6cee | 283 | fhChargedLeadingDeltaPt->SetYTitle("#Delta p_{T} (GeV/c)"); |
284 | fhChargedLeadingDeltaPt->SetXTitle("p_{T trigger} (GeV/c)"); | |
285 | ||
2db10729 | 286 | fhChargedLeadingDeltaPhi = new TH2F("ChargedLeadingDeltaPhi","#phi_{trigger} - #phi_{h^{#pm}} vs p_{T trigger}",nptbins,ptmin,ptmax,120,0,TMath::TwoPi()); |
477d6cee | 287 | fhChargedLeadingDeltaPhi->SetYTitle("#Delta #phi (rad)"); |
288 | fhChargedLeadingDeltaPhi->SetXTitle("p_{T trigger} (GeV/c)"); | |
289 | ||
2db10729 | 290 | fhChargedLeadingDeltaEta = new TH2F("ChargedLeadingDeltaEta","#eta_{trigger} - #eta_{h^{#pm}} vs p_{T trigger}",nptbins,ptmin,ptmax,120,-2,2); |
477d6cee | 291 | fhChargedLeadingDeltaEta->SetYTitle("#Delta #eta"); |
292 | fhChargedLeadingDeltaEta->SetXTitle("p_{T trigger} (GeV/c)"); | |
293 | ||
2db10729 | 294 | fhChargedLeadingRatioPt = new TH2F("ChargedLeadingRatioPt","p_{T leading charge} /p_{T trigger} vs p_{T trigger}",nptbins,ptmin,ptmax,120,0,2); |
477d6cee | 295 | fhChargedLeadingRatioPt->SetYTitle("p_{T lead charge} /p_{T trigger}"); |
296 | fhChargedLeadingRatioPt->SetXTitle("p_{T trigger} (GeV/c)"); | |
297 | ||
2db10729 | 298 | fhChargedLeadingXi = new TH2F("ChargedLeadingXi","ln(p_{T trigger} / p_{T leading charge} ) vs p_{T trigger}",nptbins,ptmin,ptmax,120,0,10); |
9415d854 | 299 | fhChargedLeadingXi->SetYTitle("#xi"); |
300 | fhChargedLeadingXi->SetXTitle("p_{T trigger} (GeV/c)"); | |
2db10729 | 301 | |
477d6cee | 302 | fOutCont->Add(fhChargedLeadingPt) ; |
303 | fOutCont->Add(fhChargedLeadingPhi) ; | |
304 | fOutCont->Add(fhChargedLeadingEta) ; | |
2db10729 | 305 | fOutCont->Add(fhChargedLeadingDeltaPt) ; |
306 | fOutCont->Add(fhChargedLeadingDeltaPhi) ; | |
307 | fOutCont->Add(fhChargedLeadingDeltaEta) ; | |
477d6cee | 308 | fOutCont->Add(fhChargedLeadingRatioPt) ; |
9415d854 | 309 | fOutCont->Add(fhChargedLeadingXi) ; |
2db10729 | 310 | |
311 | fhChargedLeadingDeltaPhiRatioPt30 = new TH2F("ChargedLeadingDeltaPhiRatioPt30","#phi_{trigger} - #phi_{#pi^{0}} vs p_{T leading}/p_{T trigger}, charged leading, p_{T trigger} > 30 GeV/c",120,0,TMath::TwoPi(),nptbins,0,1); | |
dde5a268 | 312 | fhChargedLeadingDeltaPhiRatioPt30->SetXTitle("#Delta #phi (rad)"); |
2db10729 | 313 | fhChargedLeadingDeltaPhiRatioPt30->SetYTitle("p_{T leading} / p_{T trigger}"); |
314 | ||
315 | fhChargedLeadingDeltaPhiRatioPt50 = new TH2F("ChargedLeadingDeltaPhiRatioPt50","#phi_{trigger} - #phi_{#pi^{0}} vs p_{T leading}/p_{T trigger}, charged leading, p_{T trigger} > 50 GeV/c",120,0,TMath::TwoPi(),nptbins,0,1); | |
dde5a268 | 316 | fhChargedLeadingDeltaPhiRatioPt50->SetXTitle("#Delta #phi (rad)"); |
2db10729 | 317 | fhChargedLeadingDeltaPhiRatioPt50->SetYTitle("p_{T leading} / p_{T trigger}"); |
318 | ||
319 | fOutCont->Add(fhChargedLeadingDeltaPhiRatioPt30) ; | |
320 | fOutCont->Add(fhChargedLeadingDeltaPhiRatioPt50) ; | |
321 | ||
477d6cee | 322 | if(!fJetsOnlyInCTS){ |
323 | ||
2db10729 | 324 | fhNeutralLeadingPt = new TH2F("NeutralLeadingPt","p_{T leading #pi^{0}} vs p_{T trigger}",nptbins,ptmin,ptmax,nptbins,ptmin,ptmax); |
9415d854 | 325 | fhNeutralLeadingPt->SetYTitle("p_{T leading #pi^{0}}"); |
477d6cee | 326 | fhNeutralLeadingPt->SetXTitle("p_{T trigger} (GeV/c)"); |
327 | ||
2db10729 | 328 | fhNeutralLeadingPhi = new TH2F("NeutralLeadingPhi","#phi_{#pi^{0}} vs p_{T trigger}",nptbins,ptmin,ptmax,nphibins,phimin,phimax); |
477d6cee | 329 | fhNeutralLeadingPhi->SetYTitle("#phi_{#pi^{0}} (rad)"); |
330 | fhNeutralLeadingPhi->SetXTitle("p_{T trigger} (GeV/c)"); | |
331 | ||
2db10729 | 332 | fhNeutralLeadingEta = new TH2F("NeutralLeadingEta","#eta_{#pi^{0}} vs p_{T trigger}",nptbins,ptmin,ptmax,netabins,etamin,etamax); |
477d6cee | 333 | fhNeutralLeadingEta->SetYTitle("#eta_{#pi^{0}} "); |
334 | fhNeutralLeadingEta->SetXTitle("p_{T trigger} (GeV/c)"); | |
335 | ||
2db10729 | 336 | fhNeutralLeadingDeltaPt = new TH2F("NeutralLeadingDeltaPt","p_{T trigger} - p_{T #pi^{0}} vs p_{T trigger}",nptbins,ptmin,ptmax,nptbins,ptmin,ptmax); |
477d6cee | 337 | fhNeutralLeadingDeltaPt->SetYTitle("#Delta p_{T} (GeV/c)"); |
338 | fhNeutralLeadingDeltaPt->SetXTitle("p_{T trigger} (GeV/c)"); | |
339 | ||
2db10729 | 340 | fhNeutralLeadingDeltaPhi = new TH2F("NeutralLeadingDeltaPhi","#phi_{trigger} - #phi_{#pi^{0}} vs p_{T trigger}",nptbins,ptmin,ptmax,120,0,TMath::TwoPi()); |
477d6cee | 341 | fhNeutralLeadingDeltaPhi->SetYTitle("#Delta #phi (rad)"); |
342 | fhNeutralLeadingDeltaPhi->SetXTitle("p_{T trigger} (GeV/c)"); | |
343 | ||
2db10729 | 344 | fhNeutralLeadingDeltaEta = new TH2F("NeutralLeadingDeltaEta","#eta_{trigger} - #eta_{#pi^{0}} vs p_{T trigger}",nptbins,ptmin,ptmax,120,-2,2); |
477d6cee | 345 | fhNeutralLeadingDeltaEta->SetYTitle("#Delta #eta"); |
346 | fhNeutralLeadingDeltaEta->SetXTitle("p_{T trigger} (GeV/c)"); | |
347 | ||
2db10729 | 348 | fhNeutralLeadingRatioPt = new TH2F("NeutralLeadingRatioPt","p_{T leading #pi^{0}} /p_{T trigger} vs p_{T trigger}",nptbins,ptmin,ptmax,120,0,2); |
477d6cee | 349 | fhNeutralLeadingRatioPt->SetYTitle("p_{T lead #pi^{0}} /p_{T trigger}"); |
350 | fhNeutralLeadingRatioPt->SetXTitle("p_{T trigger} (GeV/c)"); | |
351 | ||
2db10729 | 352 | fhNeutralLeadingXi = new TH2F("NeutralLeadingXi","ln(p_{T trigger} / p_{T leading #pi^{0}} ) vs p_{T trigger}",nptbins,ptmin,ptmax,120,0,10); |
9415d854 | 353 | fhNeutralLeadingXi->SetYTitle("#xi"); |
354 | fhNeutralLeadingXi->SetXTitle("p_{T trigger} (GeV/c)"); | |
355 | ||
477d6cee | 356 | fOutCont->Add(fhNeutralLeadingPt) ; |
357 | fOutCont->Add(fhNeutralLeadingPhi) ; | |
358 | fOutCont->Add(fhNeutralLeadingEta) ; | |
2db10729 | 359 | fOutCont->Add(fhNeutralLeadingDeltaPt) ; |
360 | fOutCont->Add(fhNeutralLeadingDeltaPhi) ; | |
361 | fOutCont->Add(fhNeutralLeadingDeltaEta) ; | |
477d6cee | 362 | fOutCont->Add(fhNeutralLeadingRatioPt) ; |
9415d854 | 363 | fOutCont->Add(fhNeutralLeadingXi) ; |
2db10729 | 364 | |
365 | fhNeutralLeadingDeltaPhiRatioPt30 = new TH2F("NeutralLeadingDeltaPhiRatioPt30","#phi_{trigger} - #phi_{#pi^{0}} vs p_{T leading}/p_{T trigger}, neutral leading, p_{T trigger} > 30 GeV/c",120,0,TMath::TwoPi(),nptbins,0,1); | |
366 | fhNeutralLeadingDeltaPhiRatioPt30->SetXTitle("#Delta #phi (rad)"); | |
367 | fhNeutralLeadingDeltaPhiRatioPt30->SetYTitle("p_{T leading} / p_{T trigger}"); | |
368 | ||
369 | fhNeutralLeadingDeltaPhiRatioPt50 = new TH2F("NeutralLeadingDeltaPhiRatioPt50","#phi_{trigger} - #phi_{#pi^{0}} vs p_{T leading}/p_{T trigger}, neutral leading, p_{T trigger} > 50 GeV/c",120,0,TMath::TwoPi(),nptbins,0,1); | |
370 | fhNeutralLeadingDeltaPhiRatioPt50->SetXTitle("#Delta #phi (rad)"); | |
371 | fhNeutralLeadingDeltaPhiRatioPt50->SetYTitle("p_{T leading} / p_{T trigger}"); | |
372 | fOutCont->Add(fhNeutralLeadingDeltaPhiRatioPt30) ; | |
373 | fOutCont->Add(fhNeutralLeadingDeltaPhiRatioPt50) ; | |
374 | ||
477d6cee | 375 | } |
376 | ||
377 | if(!fSeveralConeAndPtCuts){// not several cones | |
378 | ||
379 | //Jet Distributions | |
2db10729 | 380 | fhJetPt = new TH2F("JetPt","p_{T jet} vs p_{T trigger}",nptbins,ptmin,ptmax,nptbins,ptmin,ptmax); |
477d6cee | 381 | fhJetPt->SetYTitle("p_{T jet}"); |
382 | fhJetPt->SetXTitle("p_{T trigger} (GeV/c)"); | |
383 | ||
2db10729 | 384 | fhJetRatioPt = new TH2F("JetRatioPt","p_{T jet}/p_{T trigger} vs p_{T trigger}",nptbins,ptmin,ptmax,120,0,2); |
477d6cee | 385 | fhJetRatioPt->SetYTitle("p_{T jet}/p_{T trigger}"); |
386 | fhJetRatioPt->SetXTitle("p_{T trigger} (GeV/c)"); | |
387 | ||
2db10729 | 388 | fhJetDeltaPhi = new TH2F("JetDeltaPhi","#phi_{jet} - #phi_{trigger} vs p_{T trigger}",nptbins,ptmin,ptmax,120,0,TMath::TwoPi()); |
477d6cee | 389 | fhJetDeltaPhi->SetYTitle("#Delta #phi (rad)"); |
390 | fhJetDeltaPhi->SetXTitle("p_{T trigger} (GeV/c)"); | |
391 | ||
2db10729 | 392 | fhJetDeltaEta = new TH2F("JetDeltaEta","#eta_{jet} - #eta_{trigger} vs p_{T trigger}",nptbins,ptmin,ptmax,120,-2,2); |
477d6cee | 393 | fhJetDeltaEta->SetYTitle("#Delta #eta"); |
394 | fhJetDeltaEta->SetXTitle("p_{T trigger} (GeV/c)"); | |
395 | ||
2db10729 | 396 | fhJetLeadingRatioPt = new TH2F("JetLeadingRatioPt","p_{T jet} vs p_{T trigger}",nptbins,ptmin,ptmax,120,0,2); |
477d6cee | 397 | fhJetLeadingRatioPt->SetYTitle("p_{T leading}/p_{T jet}"); |
398 | fhJetLeadingRatioPt->SetXTitle("p_{T trigger} (GeV/c)"); | |
399 | ||
2db10729 | 400 | fhJetLeadingDeltaPhi = new TH2F("JetLeadingDeltaPhi","#phi_{jet} - #phi_{leading} vs p_{T trigger}",nptbins,ptmin,ptmax,120,-TMath::Pi(),TMath::Pi()); |
477d6cee | 401 | fhJetLeadingDeltaPhi->SetYTitle("#Delta #phi (rad)"); |
402 | fhJetLeadingDeltaPhi->SetXTitle("p_{T trigger} (GeV/c)"); | |
403 | ||
2db10729 | 404 | fhJetLeadingDeltaEta = new TH2F("JetLeadingDeltaEta","#eta_{jet} - #eta_{leading} vs p_{T trigger}",nptbins,ptmin,ptmax,120,-2,2); |
477d6cee | 405 | fhJetLeadingDeltaEta->SetYTitle("#Delta #eta"); |
406 | fhJetLeadingDeltaEta->SetXTitle("p_{T trigger} (GeV/c)"); | |
407 | ||
2db10729 | 408 | fhJetFFz = new TH2F("JetFFz","z = p_{T i charged}/p_{T trigger} vs p_{T trigger}",nptbins,ptmin,ptmax,200,0.,2); |
477d6cee | 409 | fhJetFFz->SetYTitle("z"); |
410 | fhJetFFz->SetXTitle("p_{T trigger}"); | |
411 | ||
2db10729 | 412 | fhJetFFxi = new TH2F("JetFFxi","#xi = ln(p_{T trigger}/p_{T i charged}) vs p_{T trigger}",nptbins,ptmin,ptmax,100,0.,10.); |
477d6cee | 413 | fhJetFFxi->SetYTitle("#xi"); |
414 | fhJetFFxi->SetXTitle("p_{T trigger}"); | |
415 | ||
2db10729 | 416 | fhJetFFpt = new TH2F("JetFFpt","#xi = p_{T i charged}) vs p_{T trigger}",nptbins,ptmin,ptmax,200,0.,50.); |
477d6cee | 417 | fhJetFFpt->SetYTitle("p_{T charged hadron}"); |
418 | fhJetFFpt->SetXTitle("p_{T trigger}"); | |
419 | ||
2db10729 | 420 | fhJetNTracksInCone = new TH2F("JetNTracksInCone","N particles in cone vs p_{T trigger}",nptbins,ptmin,ptmax,5000,0, 5000); |
477d6cee | 421 | fhJetNTracksInCone->SetYTitle("N tracks in jet cone"); |
422 | fhJetNTracksInCone->SetXTitle("p_{T trigger} (GeV/c)"); | |
423 | ||
2db10729 | 424 | fOutCont->Add(fhJetPt) ; |
425 | fOutCont->Add(fhJetRatioPt) ; | |
477d6cee | 426 | fOutCont->Add(fhJetDeltaPhi) ; |
427 | fOutCont->Add(fhJetDeltaEta) ; | |
428 | fOutCont->Add(fhJetLeadingRatioPt) ; | |
429 | fOutCont->Add(fhJetLeadingDeltaPhi) ; | |
430 | fOutCont->Add(fhJetLeadingDeltaEta) ; | |
431 | fOutCont->Add(fhJetFFz) ; | |
432 | fOutCont->Add(fhJetFFxi) ; | |
433 | fOutCont->Add(fhJetFFpt) ; | |
434 | fOutCont->Add(fhJetNTracksInCone) ; | |
435 | ||
436 | //Bkg Distributions | |
2db10729 | 437 | fhBkgPt = new TH2F("BkgPt","p_{T bkg} vs p_{T trigger}",nptbins,ptmin,ptmax,nptbins,ptmin,ptmax); |
477d6cee | 438 | fhBkgPt->SetYTitle("p_{T bkg}"); |
439 | fhBkgPt->SetXTitle("p_{T trigger} (GeV/c)"); | |
440 | ||
2db10729 | 441 | fhBkgRatioPt = new TH2F("BkgRatioPt","p_{T bkg}/p_{T trigger} vs p_{T trigger}",nptbins,ptmin,ptmax,120,0,2); |
477d6cee | 442 | fhBkgRatioPt->SetYTitle("p_{T bkg}/p_{T trigger}"); |
443 | fhBkgRatioPt->SetXTitle("p_{T trigger} (GeV/c)"); | |
444 | ||
2db10729 | 445 | fhBkgDeltaPhi = new TH2F("BkgDeltaPhi","#phi_{bkg} - #phi_{trigger} vs p_{T trigger}",nptbins,ptmin,ptmax,120,0,TMath::TwoPi()); |
477d6cee | 446 | fhBkgDeltaPhi->SetYTitle("#Delta #phi (rad)"); |
447 | fhBkgDeltaPhi->SetXTitle("p_{T trigger} (GeV/c)"); | |
448 | ||
2db10729 | 449 | fhBkgDeltaEta = new TH2F("BkgDeltaEta","#eta_{bkg} - #eta_{trigger} vs p_{T trigger}",nptbins,ptmin,ptmax,120,-2,2); |
477d6cee | 450 | fhBkgDeltaEta->SetYTitle("#Delta #eta"); |
451 | fhBkgDeltaEta->SetXTitle("p_{T trigger} (GeV/c)"); | |
452 | ||
2db10729 | 453 | fhBkgLeadingRatioPt = new TH2F("BkgLeadingRatioPt","p_{T bkg} vs p_{T trigger}",nptbins,ptmin,ptmax,120,0,2); |
477d6cee | 454 | fhBkgLeadingRatioPt->SetYTitle("p_{T leading}/p_{T bkg}"); |
455 | fhBkgLeadingRatioPt->SetXTitle("p_{T trigger} (GeV/c)"); | |
456 | ||
2db10729 | 457 | fhBkgLeadingDeltaPhi = new TH2F("BkgLeadingDeltaPhi","#phi_{bkg} - #phi_{leading} vs p_{T trigger}",nptbins,ptmin,ptmax,120,0,TMath::TwoPi()); |
477d6cee | 458 | fhBkgLeadingDeltaPhi->SetYTitle("#Delta #phi (rad)"); |
459 | fhBkgLeadingDeltaPhi->SetXTitle("p_{T trigger} (GeV/c)"); | |
460 | ||
2db10729 | 461 | fhBkgLeadingDeltaEta = new TH2F("BkgLeadingDeltaEta","#eta_{bkg} - #eta_{leading} vs p_{T trigger}",nptbins,ptmin,ptmax,120,-2,2); |
477d6cee | 462 | fhBkgLeadingDeltaEta->SetYTitle("#Delta #eta"); |
463 | fhBkgLeadingDeltaEta->SetXTitle("p_{T trigger} (GeV/c)"); | |
464 | ||
2db10729 | 465 | fhBkgFFz = new TH2F("BkgFFz","z = p_{T i charged}/p_{T trigger} vs p_{T trigger}", nptbins,ptmin,ptmax,200,0.,2); |
477d6cee | 466 | fhBkgFFz->SetYTitle("z"); |
467 | fhBkgFFz->SetXTitle("p_{T trigger}"); | |
468 | ||
2db10729 | 469 | fhBkgFFxi = new TH2F("BkgFFxi","#xi = ln(p_{T trigger}/p_{T i charged}) vs p_{T trigger}", nptbins,ptmin,ptmax,100,0.,10.); |
477d6cee | 470 | fhBkgFFxi->SetYTitle("#xi"); |
471 | fhBkgFFxi->SetXTitle("p_{T trigger}"); | |
472 | ||
2db10729 | 473 | fhBkgFFpt = new TH2F("BkgFFpt","p_{T charged hadron } vs p_{T trigger}", nptbins,ptmin,ptmax,200,0.,50.); |
477d6cee | 474 | fhBkgFFpt->SetYTitle("p_{T charged} hadron"); |
475 | fhBkgFFpt->SetXTitle("p_{T trigger}"); | |
476 | ||
2db10729 | 477 | fhBkgNTracksInCone = new TH2F("BkgNTracksInCone","N particles in cone vs p_{T trigger}",nptbins,ptmin,ptmax,5000,0, 5000); |
477d6cee | 478 | fhBkgNTracksInCone->SetYTitle("N tracks in bkg cone"); |
479 | fhBkgNTracksInCone->SetXTitle("p_{T trigger} (GeV/c)"); | |
480 | ||
2db10729 | 481 | fOutCont->Add(fhBkgPt) ; |
482 | fOutCont->Add(fhBkgRatioPt) ; | |
477d6cee | 483 | fOutCont->Add(fhBkgDeltaPhi) ; |
484 | fOutCont->Add(fhBkgDeltaEta) ; | |
485 | fOutCont->Add(fhBkgLeadingRatioPt) ; | |
486 | fOutCont->Add(fhBkgLeadingDeltaPhi) ; | |
487 | fOutCont->Add(fhBkgLeadingDeltaEta) ; | |
488 | fOutCont->Add(fhBkgFFz) ; | |
489 | fOutCont->Add(fhBkgFFxi) ; | |
490 | fOutCont->Add(fhBkgFFpt) ; | |
491 | fOutCont->Add(fhBkgNTracksInCone) ; | |
492 | ||
493 | }//not several cones | |
494 | else{ //If we want to study the jet for different cones and pt | |
495 | for(Int_t icone = 0; icone<fJetNCone; icone++){//icone | |
496 | for(Int_t ipt = 0; ipt<fJetNPt;ipt++){ //ipt | |
2db10729 | 497 | |
498 | TString lastnamehist ="Cone"+ fJetNameCones[icone]+"Pt"+ fJetNamePtThres[ipt]; | |
499 | TString lastnametitle =", cone ="+fJetNameCones[icone]+", pt > " +fJetNamePtThres[ipt]+" GeV/c"; | |
500 | ||
501 | //Jet Distributions | |
502 | fhJetPts[icone][ipt] = new TH2F(Form("JetPt%s",lastnamehist.Data()),Form("p_{T jet} vs p_{T trigger} %s",lastnametitle.Data()),nptbins,ptmin,ptmax,nptbins,ptmin,ptmax); | |
503 | fhJetPts[icone][ipt]->SetYTitle("p_{T jet}"); | |
504 | fhJetPts[icone][ipt]->SetXTitle("p_{T trigger} (GeV/c)"); | |
505 | ||
506 | fhJetRatioPts[icone][ipt] = new TH2F(Form("JetRatioPt%s",lastnamehist.Data()),Form("p_{T jet}/p_{T trigger} vs p_{T trigger} %s",lastnametitle.Data()),nptbins,ptmin,ptmax,120,0,2); | |
507 | fhJetRatioPts[icone][ipt]->SetYTitle("p_{T jet}/p_{T trigger}"); | |
508 | fhJetRatioPts[icone][ipt]->SetXTitle("p_{T trigger} (GeV/c)"); | |
509 | ||
510 | fhJetDeltaPhis[icone][ipt] = new TH2F(Form("JetDeltaPhi%s",lastnamehist.Data()),Form("#phi_{jet} - #phi_{trigger} vs p_{T trigger} %s",lastnametitle.Data()),nptbins,ptmin,ptmax,120,0,TMath::TwoPi()); | |
511 | fhJetDeltaPhis[icone][ipt]->SetYTitle("#Delta #phi (rad)"); | |
512 | fhJetDeltaPhis[icone][ipt]->SetXTitle("p_{T trigger} (GeV/c)"); | |
513 | ||
514 | fhJetDeltaEtas[icone][ipt] = new TH2F(Form("JetDeltaEta%s",lastnamehist.Data()),Form("#eta_{jet} - #eta_{trigger} vs p_{T trigger} %s",lastnametitle.Data()),nptbins,ptmin,ptmax,120,-2,2); | |
515 | fhJetDeltaEtas[icone][ipt]->SetYTitle("#Delta #eta"); | |
516 | fhJetDeltaEtas[icone][ipt]->SetXTitle("p_{T trigger} (GeV/c)"); | |
517 | ||
518 | fhJetLeadingRatioPts[icone][ipt] = new TH2F(Form("JetLeadingRatioPt%s",lastnamehist.Data()),Form("p_{T jet} vs p_{T trigger} %s",lastnametitle.Data()),nptbins,ptmin,ptmax,120,0,2); | |
519 | fhJetLeadingRatioPts[icone][ipt]->SetYTitle("p_{T leading}/p_{T jet}"); | |
520 | fhJetLeadingRatioPts[icone][ipt]->SetXTitle("p_{T trigger} (GeV/c)"); | |
521 | ||
522 | fhJetLeadingDeltaPhis[icone][ipt] = new TH2F(Form("JetLeadingDeltaPhi%s",lastnamehist.Data()),Form("#phi_{jet} - #phi_{leading} vs p_{T trigger} %s",lastnametitle.Data()),nptbins,ptmin,ptmax,120,0,TMath::TwoPi()); | |
523 | fhJetLeadingDeltaPhis[icone][ipt]->SetYTitle("#Delta #phi (rad)"); | |
524 | fhJetLeadingDeltaPhis[icone][ipt]->SetXTitle("p_{T trigger} (GeV/c)"); | |
525 | ||
526 | fhJetLeadingDeltaEtas[icone][ipt] = new TH2F(Form("JetLeadingDeltaEta%s",lastnamehist.Data()),Form("#eta_{jet} - #eta_{leading} vs p_{T trigger} %s",lastnametitle.Data()),nptbins,ptmin,ptmax,120,-2,2); | |
527 | fhJetLeadingDeltaEtas[icone][ipt]->SetYTitle("#Delta #eta"); | |
528 | fhJetLeadingDeltaEtas[icone][ipt]->SetXTitle("p_{T trigger} (GeV/c)"); | |
529 | ||
530 | fhJetFFzs[icone][ipt] = new TH2F(Form("JetFFz%s",lastnamehist.Data()),"z = p_{T i charged}/p_{T trigger} vs p_{T trigger}", 120,0.,120.,200,0.,2); | |
531 | fhJetFFzs[icone][ipt]->SetYTitle("z"); | |
532 | fhJetFFzs[icone][ipt]->SetXTitle("p_{T trigger}"); | |
533 | ||
534 | fhJetFFxis[icone][ipt] = new TH2F(Form("JetFFxi%s",lastnamehist.Data()),"#xi = ln(p_{T trigger}/p_{T i charged}) vs p_{T trigger}", 120,0.,120.,100,0.,10.); | |
535 | fhJetFFxis[icone][ipt]->SetYTitle("#xi"); | |
536 | fhJetFFxis[icone][ipt]->SetXTitle("p_{T trigger}"); | |
537 | ||
538 | fhJetFFpts[icone][ipt] = new TH2F(Form("JetFFpt%s",lastnamehist.Data()),"p_{T charged hadron } in jet vs p_{T trigger}", 120,0.,120.,200,0.,50.); | |
539 | fhJetFFpts[icone][ipt]->SetYTitle("p_{T charged hadron}"); | |
540 | fhJetFFpts[icone][ipt]->SetXTitle("p_{T trigger}"); | |
541 | ||
542 | fhJetNTracksInCones[icone][ipt] = new TH2F(Form("JetNTracksInCone%s",lastnamehist.Data()),Form("N particles in cone vs p_{T trigger} %s",lastnametitle.Data()),nptbins,ptmin,ptmax,5000,0, 5000); | |
543 | fhJetNTracksInCones[icone][ipt]->SetYTitle("N tracks in jet cone"); | |
544 | fhJetNTracksInCones[icone][ipt]->SetXTitle("p_{T trigger} (GeV/c)"); | |
545 | ||
546 | fOutCont->Add(fhJetPts[icone][ipt]) ; | |
547 | fOutCont->Add(fhJetRatioPts[icone][ipt]) ; | |
548 | fOutCont->Add(fhJetDeltaPhis[icone][ipt]) ; | |
549 | fOutCont->Add(fhJetDeltaEtas[icone][ipt]) ; | |
550 | fOutCont->Add(fhJetLeadingRatioPts[icone][ipt]) ; | |
551 | fOutCont->Add(fhJetLeadingDeltaPhis[icone][ipt]) ; | |
552 | fOutCont->Add(fhJetLeadingDeltaEtas[icone][ipt]) ; | |
553 | fOutCont->Add(fhJetFFzs[icone][ipt]) ; | |
554 | fOutCont->Add(fhJetFFxis[icone][ipt]) ; | |
555 | fOutCont->Add(fhJetFFpts[icone][ipt]) ; | |
556 | fOutCont->Add(fhJetNTracksInCones[icone][ipt]) ; | |
557 | ||
558 | //Bkg Distributions | |
559 | fhBkgPts[icone][ipt] = new TH2F(Form("BkgPt%s",lastnamehist.Data()),Form("p_{T bkg} vs p_{T trigger} %s",lastnametitle.Data()),nptbins,ptmin,ptmax,nptbins,ptmin,ptmax); | |
560 | fhBkgPts[icone][ipt]->SetYTitle("p_{T bkg}"); | |
561 | fhBkgPts[icone][ipt]->SetXTitle("p_{T trigger} (GeV/c)"); | |
562 | ||
563 | fhBkgRatioPts[icone][ipt] = new TH2F(Form("BkgRatioPt%s",lastnamehist.Data()),Form("p_{T bkg}/p_{T trigger} vs p_{T trigger} %s",lastnametitle.Data()),nptbins,ptmin,ptmax,120,0,2); | |
564 | fhBkgRatioPts[icone][ipt]->SetYTitle("p_{T bkg}/p_{T trigger}"); | |
565 | fhBkgRatioPts[icone][ipt]->SetXTitle("p_{T trigger} (GeV/c)"); | |
566 | ||
567 | fhBkgDeltaPhis[icone][ipt] = new TH2F(Form("BkgDeltaPhi%s",lastnamehist.Data()),Form("#phi_{bkg} - #phi_{trigger} vs p_{T trigger} %s",lastnametitle.Data()),nptbins,ptmin,ptmax,120,0,TMath::TwoPi()); | |
568 | fhBkgDeltaPhis[icone][ipt]->SetYTitle("#Delta #phi (rad)"); | |
569 | fhBkgDeltaPhis[icone][ipt]->SetXTitle("p_{T trigger} (GeV/c)"); | |
570 | ||
571 | fhBkgDeltaEtas[icone][ipt] = new TH2F(Form("BkgDeltaEta%s",lastnamehist.Data()),Form("#eta_{bkg} - #eta_{trigger} vs p_{T trigger} %s",lastnametitle.Data()),nptbins,ptmin,ptmax,120,-2,2); | |
572 | fhBkgDeltaEtas[icone][ipt]->SetYTitle("#Delta #eta"); | |
573 | fhBkgDeltaEtas[icone][ipt]->SetXTitle("p_{T trigger} (GeV/c)"); | |
574 | ||
575 | fhBkgLeadingRatioPts[icone][ipt] = new TH2F(Form("BkgLeadingRatioPt%s",lastnamehist.Data()),Form("p_{T bkg} vs p_{T trigger} %s",lastnametitle.Data()),nptbins,ptmin,ptmax,120,0,2); | |
576 | fhBkgLeadingRatioPts[icone][ipt]->SetYTitle("p_{T leading}/p_{T bkg}"); | |
577 | fhBkgLeadingRatioPts[icone][ipt]->SetXTitle("p_{T trigger} (GeV/c)"); | |
578 | ||
579 | fhBkgLeadingDeltaPhis[icone][ipt] = new TH2F(Form("BkgLeadingDeltaPhi%s",lastnamehist.Data()),Form("#phi_{bkg} - #phi_{leading} vs p_{T trigger} %s",lastnametitle.Data()),nptbins,ptmin,ptmax,120,0,TMath::TwoPi()); | |
580 | fhBkgLeadingDeltaPhis[icone][ipt]->SetYTitle("#Delta #phi (rad)"); | |
581 | fhBkgLeadingDeltaPhis[icone][ipt]->SetXTitle("p_{T trigger} (GeV/c)"); | |
582 | ||
583 | fhBkgLeadingDeltaEtas[icone][ipt] = new TH2F(Form("BkgLeadingDeltaEta%s",lastnamehist.Data()),Form("#eta_{bkg} - #eta_{leading} vs p_{T trigger} %s",lastnametitle.Data()),nptbins,ptmin,ptmax,120,-2,2); | |
584 | fhBkgLeadingDeltaEtas[icone][ipt]->SetYTitle("#Delta #eta"); | |
585 | fhBkgLeadingDeltaEtas[icone][ipt]->SetXTitle("p_{T trigger} (GeV/c)"); | |
586 | ||
587 | fhBkgFFzs[icone][ipt] = new TH2F(Form("BkgFFz%s",lastnamehist.Data()),"z = p_{T i charged}/p_{T trigger} vs p_{T trigger}", 120,0.,120.,200,0.,2); | |
588 | fhBkgFFzs[icone][ipt]->SetYTitle("z"); | |
589 | fhBkgFFzs[icone][ipt]->SetXTitle("p_{T trigger}"); | |
590 | ||
591 | fhBkgFFxis[icone][ipt] = new TH2F(Form("BkgFFxi%s",lastnamehist.Data()),"#xi = ln(p_{T trigger}/p_{T i charged}) vs p_{T trigger}", 120,0.,120.,100,0.,10.); | |
592 | fhBkgFFxis[icone][ipt]->SetYTitle("#xi"); | |
593 | fhBkgFFxis[icone][ipt]->SetXTitle("p_{T trigger}"); | |
594 | ||
595 | fhBkgFFpts[icone][ipt] = new TH2F(Form("BkgFFpt%s",lastnamehist.Data()),"p_{T charged hadron} in jet vs p_{T trigger}", 120,0.,120.,200,0.,50.); | |
596 | fhBkgFFpts[icone][ipt]->SetYTitle("p_{T charged hadron}"); | |
597 | fhBkgFFpts[icone][ipt]->SetXTitle("p_{T trigger}"); | |
598 | ||
599 | fhBkgNTracksInCones[icone][ipt] = new TH2F(Form("BkgNTracksInCone%s",lastnamehist.Data()),Form("N particles in cone vs p_{T trigger} %s",lastnametitle.Data()),nptbins,ptmin,ptmax,5000,0, 5000); | |
600 | fhBkgNTracksInCones[icone][ipt]->SetYTitle("N tracks in bkg cone"); | |
601 | fhBkgNTracksInCones[icone][ipt]->SetXTitle("p_{T trigger} (GeV/c)"); | |
602 | ||
603 | fOutCont->Add(fhBkgPts[icone][ipt]) ; | |
604 | fOutCont->Add(fhBkgRatioPts[icone][ipt]) ; | |
605 | fOutCont->Add(fhBkgDeltaPhis[icone][ipt]) ; | |
606 | fOutCont->Add(fhBkgDeltaEtas[icone][ipt]) ; | |
607 | fOutCont->Add(fhBkgLeadingRatioPts[icone][ipt]) ; | |
608 | fOutCont->Add(fhBkgLeadingDeltaPhis[icone][ipt]) ; | |
609 | fOutCont->Add(fhBkgLeadingDeltaEtas[icone][ipt]) ; | |
610 | fOutCont->Add(fhBkgFFzs[icone][ipt]) ; | |
611 | fOutCont->Add(fhBkgFFxis[icone][ipt]) ; | |
612 | fOutCont->Add(fhBkgFFpts[icone][ipt]) ; | |
613 | fOutCont->Add(fhBkgNTracksInCones[icone][ipt]) ; | |
614 | ||
477d6cee | 615 | }//ipt |
616 | } //icone | |
617 | }//If we want to study any cone or pt threshold | |
618 | ||
9415d854 | 619 | //Keep neutral meson selection histograms if requiered |
620 | //Setting done in AliNeutralMesonSelection | |
621 | if(GetNeutralMesonSelection()){ | |
622 | TList * nmsHistos = GetNeutralMesonSelection()->GetCreateOutputObjects() ; | |
623 | if(GetNeutralMesonSelection()->AreNeutralMesonSelectionHistosKept()) | |
624 | for(Int_t i = 0; i < nmsHistos->GetEntries(); i++) fOutCont->Add(nmsHistos->At(i)) ; | |
2db10729 | 625 | delete nmsHistos; |
9415d854 | 626 | } |
627 | ||
628 | ||
2db10729 | 629 | // if(GetDebug() > 2) |
630 | // { | |
631 | // printf("AliAnaParticleJetLeadingConeCorrelation::GetCreateOutputObjects() - All histograms names : \n"); | |
632 | // for(Int_t i = 0 ; i< fOutCont->GetEntries(); i++) | |
633 | // printf("Histo i %d name %s\n",i,((fOutCont->At(i))->GetName())); | |
634 | // //cout<< (fOutCont->At(i))->GetName()<<endl; | |
635 | // } | |
477d6cee | 636 | |
637 | return fOutCont; | |
2db10729 | 638 | |
1c5acb87 | 639 | } |
640 | ||
f50ae487 | 641 | //__________________________________________________________________________________________________________ |
642 | Bool_t AliAnaParticleJetLeadingConeCorrelation::GetLeadingParticle(AliAODPWG4ParticleCorrelation * particle) | |
decca433 | 643 | { |
1c5acb87 | 644 | //Search Charged or Neutral leading particle, select the highest one and fill AOD |
645 | ||
1c5acb87 | 646 | |
f50ae487 | 647 | GetLeadingCharge(particle) ; |
648 | if(!fJetsOnlyInCTS) GetLeadingPi0(particle) ; | |
1c5acb87 | 649 | |
f50ae487 | 650 | Double_t ptch = fLeadingChargeMom.Pt(); |
651 | Double_t ptpi = fLeadingPi0Mom .Pt(); | |
652 | ||
653 | if (ptch > 0 || ptpi > 0) | |
654 | { | |
655 | if((ptch >= ptpi)) | |
656 | { | |
2db10729 | 657 | AliDebug(1,"Leading found in CTS"); |
f50ae487 | 658 | |
659 | fLeadingMom = fLeadingChargeMom; | |
660 | ||
2db10729 | 661 | AliDebug(1,Form("Found Leading: pt %2.3f, phi %2.3f deg, eta %2.3f",fLeadingMom.Pt(),fLeadingMom.Phi()*TMath::RadToDeg(),fLeadingMom.Eta())) ; |
f50ae487 | 662 | |
1c5acb87 | 663 | //Put leading in AOD |
f50ae487 | 664 | particle->SetLeading(fLeadingChargeMom); |
667496a9 | 665 | particle->SetLeadingDetector(kCTS); |
477d6cee | 666 | return kTRUE; |
1c5acb87 | 667 | } |
f50ae487 | 668 | else |
669 | { | |
2db10729 | 670 | AliDebug(1,"Leading found in EMCAL"); |
f50ae487 | 671 | |
672 | fLeadingMom = fLeadingPi0Mom; | |
673 | ||
2db10729 | 674 | AliDebug(1,Form("Found Leading: pt %2.3f, phi %2.3f, eta %2.3f",fLeadingMom.Pt(),fLeadingMom.Phi()*TMath::RadToDeg(),fLeadingMom.Eta())) ; |
1c5acb87 | 675 | //Put leading in AOD |
f50ae487 | 676 | particle->SetLeading(fLeadingPi0Mom); |
667496a9 | 677 | particle->SetLeadingDetector(kEMCAL); |
f50ae487 | 678 | return kTRUE; |
1c5acb87 | 679 | } |
f50ae487 | 680 | } |
1c5acb87 | 681 | |
2db10729 | 682 | AliDebug(1,"NO LEADING PARTICLE FOUND"); |
1c5acb87 | 683 | |
f50ae487 | 684 | return kFALSE; |
1c5acb87 | 685 | |
686 | } | |
687 | ||
f50ae487 | 688 | //_______________________________________________________________________________________________________ |
689 | void AliAnaParticleJetLeadingConeCorrelation::GetLeadingCharge(AliAODPWG4ParticleCorrelation * particle) | |
690 | { | |
691 | //Search for the charged particle with highest pt and with | |
692 | //Phi=Phi_trigger-Pi and pT=0.1E_gamma | |
693 | ||
694 | if(!GetCTSTracks()) return; | |
695 | ||
696 | Double_t ptTrig = particle->Pt(); | |
697 | Double_t phiTrig = particle->Phi(); | |
698 | Double_t rat = -100 ; | |
699 | Double_t ptl = -100 ; | |
700 | Double_t phil = -100 ; | |
701 | Double_t pt = -100.; | |
702 | Double_t phi = -100.; | |
703 | ||
704 | for(Int_t ipr = 0;ipr < GetCTSTracks()->GetEntriesFast() ; ipr ++ ) | |
705 | { | |
706 | AliVTrack* track = (AliVTrack *)(GetCTSTracks()->At(ipr)) ; | |
707 | fTrackVector.SetXYZ(track->Px(),track->Py(),track->Pz()); | |
708 | pt = fTrackVector.Pt(); | |
709 | phi = fTrackVector.Phi() ; | |
710 | if(phi < 0) phi+=TMath::TwoPi(); | |
711 | rat = pt/ptTrig ; | |
1c5acb87 | 712 | |
f50ae487 | 713 | //printf("AliAnaParticleJetLeadingConeCorrelation::GetLeadingCharge() - Tracks: pt %2.3f eta %2.3f phi %2.3f pt/ptTrig %2.3f \n", |
714 | // pt, fTrackVector.Eta(), phi,pt/ptTrig) ; | |
1c5acb87 | 715 | |
f50ae487 | 716 | Float_t deltaphi = TMath::Abs(phiTrig-phi); |
717 | if((deltaphi > fDeltaPhiMinCut) && (deltaphi < fDeltaPhiMaxCut) && | |
718 | (rat > fLeadingRatioMinCut) && (rat < fLeadingRatioMaxCut) && (pt > ptl)) | |
719 | { | |
720 | phil = phi ; | |
721 | ptl = pt ; | |
722 | fLeadingChargeMom.SetVect(fTrackVector); | |
723 | } | |
724 | }// track loop | |
725 | ||
2db10729 | 726 | if( ptl > 0 )AliDebug(1,Form("Leading in CTS: pt %2.3f eta %2.3f phi %2.3f pt/ptTrig %2.3f, |phiTrig-phi| %2.3f", |
727 | ptl, fLeadingChargeMom.Eta(), phil,ptl/ptTrig, TMath::Abs(phiTrig-phil))) ; | |
f50ae487 | 728 | |
1c5acb87 | 729 | } |
730 | ||
f50ae487 | 731 | //____________________________________________________________________________________________________ |
732 | void AliAnaParticleJetLeadingConeCorrelation::GetLeadingPi0(AliAODPWG4ParticleCorrelation * particle) | |
733 | { | |
734 | //Search for the neutral pion with highest pt and with | |
1c5acb87 | 735 | //Phi=Phi_trigger-Pi and pT=0.1E_gamma |
477d6cee | 736 | |
f50ae487 | 737 | if(!GetEMCALClusters()) return ; |
738 | ||
739 | Double_t ptTrig = particle->Pt(); | |
740 | Double_t phiTrig = particle->Phi(); | |
741 | Double_t rat = -100 ; | |
742 | Double_t ptl = -100 ; | |
743 | Double_t phil = -100 ; | |
744 | Double_t pt = -100.; | |
745 | Double_t phi = -100.; | |
746 | ||
747 | //Get vertex for photon momentum calculation | |
748 | Double_t vertex [] = {0,0,0} ; //vertex | |
749 | if(GetReader()->GetDataType() != AliCaloTrackReader::kMC) | |
750 | { | |
751 | GetVertex(vertex); | |
752 | } | |
753 | ||
754 | //Cluster loop, select pairs with good pt, phi and fill AODs or histograms | |
755 | for(Int_t iclus = 0;iclus < GetEMCALClusters()->GetEntriesFast() ; iclus ++ ) | |
756 | { | |
757 | AliVCluster * calo = (AliVCluster *)(GetEMCALClusters()->At(iclus)) ; | |
1c5acb87 | 758 | |
f50ae487 | 759 | //Cluster selection, not charged, with photon or pi0 id and in fiducial cut |
760 | Int_t pdgi=0; | |
761 | if(!SelectCluster(calo, vertex, fLeadingPhoMom1, pdgi)) continue ; | |
762 | ||
2db10729 | 763 | AliDebug(1,Form("Neutral cluster: pt %2.3f, phi %2.3f",fLeadingPhoMom1.Pt(),fLeadingPhoMom1.Phi())); |
f50ae487 | 764 | |
765 | //2 gamma overlapped, found with PID | |
766 | if(pdgi == AliCaloPID::kPi0) | |
f8006433 | 767 | { |
2db10729 | 768 | AliDebug(1,"Neutral cluster ID as Pi0"); |
1c5acb87 | 769 | |
f50ae487 | 770 | pt = fLeadingPhoMom1.Pt(); |
771 | rat = pt/ptTrig; | |
772 | phi = fLeadingPhoMom1.Phi(); | |
773 | if(phi < 0) phi+=TMath::TwoPi(); | |
1c5acb87 | 774 | |
f50ae487 | 775 | //Selection within angular and energy limits |
776 | Float_t deltaphi = TMath::Abs(phiTrig-phi); | |
777 | if(pt > ptl && rat > fLeadingRatioMinCut && rat < fLeadingRatioMaxCut && | |
778 | deltaphi > fDeltaPhiMinCut && deltaphi < fDeltaPhiMaxCut ) | |
779 | { | |
780 | phil = phi ; | |
781 | ptl = pt ; | |
782 | fLeadingPi0Mom.SetPxPyPzE(fLeadingPhoMom1.Px(),fLeadingPhoMom1.Py(),fLeadingPhoMom1.Pz(),fLeadingPhoMom1.E()); | |
783 | }// cuts | |
784 | }// pdg = AliCaloPID::kPi0 | |
785 | //Make invariant mass analysis | |
786 | else if(pdgi == AliCaloPID::kPhoton) | |
787 | { | |
788 | //Search the photon companion in case it comes from a Pi0 decay | |
789 | //Apply several cuts to select the good pair | |
790 | for(Int_t jclus = iclus+1; jclus < GetEMCALClusters()->GetEntriesFast() ; jclus++ ) | |
791 | { | |
792 | AliVCluster * calo2 = (AliVCluster *) (GetEMCALClusters()->At(jclus)) ; | |
f8006433 | 793 | |
f50ae487 | 794 | //Cluster selection, not charged with photon or pi0 id and in fiducial cut |
795 | Int_t pdgj=0; | |
f8006433 | 796 | |
f50ae487 | 797 | if (!SelectCluster(calo2, vertex, fLeadingPhoMom2, pdgj)) continue ; |
f8006433 | 798 | |
f50ae487 | 799 | if(pdgj == AliCaloPID::kPhoton ) |
f8006433 | 800 | { |
f50ae487 | 801 | pt = (fLeadingPhoMom1+fLeadingPhoMom2).Pt(); |
802 | phi = (fLeadingPhoMom1+fLeadingPhoMom2).Phi(); | |
803 | if(phi < 0) phi+=TMath::TwoPi(); | |
804 | rat = pt/ptTrig; | |
f8006433 | 805 | |
f50ae487 | 806 | //Selection within angular and energy limits |
807 | Float_t deltaphi = TMath::Abs(phiTrig-phi); | |
49b5c49b | 808 | |
2db10729 | 809 | AliDebug(1,Form("Neutral Hadron Correlation: gamma pair: pt %2.2f, phi %2.2f, eta %2.2f, |phiTrig-phi| %2.3f, pt/ptTrig %2.3f, M %2.3f", |
810 | pt,phi,(fLeadingPhoMom1+fLeadingPhoMom2).Eta(), deltaphi, rat, (fLeadingPhoMom1+fLeadingPhoMom2).M())); | |
f50ae487 | 811 | |
812 | if(pt > ptl && rat > fLeadingRatioMinCut && rat < fLeadingRatioMaxCut && | |
813 | deltaphi > fDeltaPhiMinCut && deltaphi < fDeltaPhiMaxCut ){ | |
814 | //Select good pair (aperture and invariant mass) | |
815 | if(GetNeutralMesonSelection()->SelectPair(fLeadingPhoMom1, fLeadingPhoMom2,kEMCAL)){ | |
816 | phil = phi ; | |
817 | ptl = pt ; | |
818 | fLeadingPi0Mom=(fLeadingPhoMom1+fLeadingPhoMom2); | |
819 | ||
2db10729 | 820 | AliDebug(1,Form("Neutral Hadron Correlation: Selected gamma pair: pt %2.2f, phi %2.2f, eta %2.2f, M %2.3f", |
821 | ptl,phil,(fLeadingPhoMom1+fLeadingPhoMom2).Eta(), (fLeadingPhoMom1+fLeadingPhoMom2).M())); | |
f50ae487 | 822 | }//pi0 selection |
f8006433 | 823 | |
f8006433 | 824 | |
f50ae487 | 825 | }//Pair selected as leading |
826 | }//if pair of gammas | |
827 | }//2nd loop | |
828 | }// if pdg = 22 | |
829 | }// 1st Loop | |
830 | ||
2db10729 | 831 | if(fLeadingPi0Mom.Pt() > 0 ) |
832 | AliDebug(1,Form("Leading EMCAL: pt %2.3f eta %2.3f phi %2.3f pt/Eg %2.3f", | |
833 | fLeadingPi0Mom.Pt(), fLeadingPi0Mom.Eta(), phil, fLeadingPi0Mom.Pt()/ptTrig)) ; | |
f50ae487 | 834 | |
1c5acb87 | 835 | } |
836 | ||
837 | //____________________________________________________________________________ | |
838 | void AliAnaParticleJetLeadingConeCorrelation::InitParameters() | |
839 | { | |
477d6cee | 840 | //Initialize the parameters of the analysis. |
a3aebfff | 841 | SetInputAODName("PWG4Particle"); |
2db10729 | 842 | SetAODObjArrayName("JetLeadingCone"); |
a3aebfff | 843 | AddToHistogramsName("AnaJetLCCorr_"); |
9415d854 | 844 | |
1c5acb87 | 845 | fJetsOnlyInCTS = kFALSE ; |
846 | fPbPb = kFALSE ; | |
847 | fReMakeJet = kFALSE ; | |
477d6cee | 848 | |
1c5acb87 | 849 | //Leading selection parameters |
850 | fDeltaPhiMinCut = 2.9 ; | |
2db10729 | 851 | fDeltaPhiMaxCut = 3.4 ; |
1c5acb87 | 852 | fLeadingRatioMinCut = 0.1; |
2db10729 | 853 | fLeadingRatioMaxCut = 1.5; |
9415d854 | 854 | |
1c5acb87 | 855 | //Jet selection parameters |
2db10729 | 856 | //Fixed cut |
857 | fJetRatioMaxCut = 1.2 ; | |
858 | fJetRatioMinCut = 0.3 ; | |
1c5acb87 | 859 | fJetCTSRatioMaxCut = 1.2 ; |
860 | fJetCTSRatioMinCut = 0.3 ; | |
861 | fSelect = 0 ; //0, Accept all jets, 1, selection depends on energy, 2 fixed selection | |
9415d854 | 862 | |
477d6cee | 863 | fSelectIsolated = kFALSE; |
9415d854 | 864 | |
1c5acb87 | 865 | //Cut depending on gamma energy |
866 | fPtTriggerSelectionCut = 10.; //For Low pt jets+BKG, another limits applied | |
2db10729 | 867 | //Reconstructed jet energy dependence parameters |
868 | //e_jet = a1+e_gamma b2. | |
1c5acb87 | 869 | //Index 0-> Pt>2 GeV r = 0.3; Index 1-> Pt>0.5 GeV r = 0.3 |
870 | fJetE1[0] = -5.75; fJetE1[1] = -4.1; | |
871 | fJetE2[0] = 1.005; fJetE2[1] = 1.05; | |
872 | ||
2db10729 | 873 | //Reconstructed sigma of jet energy dependence parameters |
874 | //s_jet = a1+e_gamma b2. | |
1c5acb87 | 875 | //Index 0-> Pt>2 GeV r = 0.3; Index 1-> Pt>0.5 GeV r = 0.3 |
876 | fJetSigma1[0] = 2.65; fJetSigma1[1] = 2.75; | |
877 | fJetSigma2[0] = 0.0018; fJetSigma2[1] = 0.033; | |
878 | ||
879 | //Background mean energy and RMS | |
2db10729 | 880 | //Index 0-> No BKG; Index 1-> BKG > 2 GeV; |
1c5acb87 | 881 | //Index 2-> (low pt jets)BKG > 0.5 GeV; |
882 | //Index > 2, same for CTS conf | |
883 | fBkgMean[0] = 0.; fBkgMean[1] = 8.8 ; fBkgMean[2] = 69.5; | |
884 | fBkgMean[3] = 0.; fBkgMean[4] = 6.4; fBkgMean[5] = 48.6; | |
2db10729 | 885 | fBkgRMS[0] = 0.; fBkgRMS[1] = 7.5; fBkgRMS[2] = 22.0; |
886 | fBkgRMS[3] = 0.; fBkgRMS[4] = 5.4; fBkgRMS[5] = 13.2; | |
887 | ||
1c5acb87 | 888 | //Factor x of min/max = E -+ x * sigma. Obtained after selecting the |
889 | //limits for monoenergetic jets. | |
2db10729 | 890 | //Index 0-> No BKG; Index 1-> BKG > 2 GeV; |
1c5acb87 | 891 | //Index 2-> (low pt jets) BKG > 0.5 GeV; |
892 | //Index > 2, same for CTS conf | |
2db10729 | 893 | |
894 | fJetXMin1[0] =-0.69 ; fJetXMin1[1] = 0.39 ; fJetXMin1[2] =-0.88 ; | |
1c5acb87 | 895 | fJetXMin1[3] =-2.0 ; fJetXMin1[4] =-0.442 ; fJetXMin1[5] =-1.1 ; |
2db10729 | 896 | fJetXMin2[0] = 0.066; fJetXMin2[1] = 0.038; fJetXMin2[2] = 0.034; |
1c5acb87 | 897 | fJetXMin2[3] = 0.25 ; fJetXMin2[4] = 0.113; fJetXMin2[5] = 0.077 ; |
2db10729 | 898 | fJetXMax1[0] =-3.8 ; fJetXMax1[1] =-0.76 ; fJetXMax1[2] =-3.6 ; |
1c5acb87 | 899 | fJetXMax1[3] =-2.7 ; fJetXMax1[4] =-1.21 ; fJetXMax1[5] =-3.7 ; |
2db10729 | 900 | fJetXMax2[0] =-0.012; fJetXMax2[1] =-0.022; fJetXMax2[2] = 0.016; |
1c5acb87 | 901 | fJetXMax2[3] =-0.024; fJetXMax2[4] =-0.008; fJetXMax2[5] = 0.027; |
2db10729 | 902 | |
903 | ||
1c5acb87 | 904 | //Different cones and pt thresholds to construct the jet |
2db10729 | 905 | |
1c5acb87 | 906 | fJetCone = 0.3 ; |
907 | fJetPtThreshold = 0.5 ; | |
908 | fJetPtThresPbPb = 2. ; | |
909 | fJetNCone = 4 ; | |
910 | fJetNPt = 4 ; | |
911 | fJetCones[0] = 0.2 ; fJetNameCones[0] = "02" ; | |
912 | fJetCones[1] = 0.3 ; fJetNameCones[1] = "03" ; | |
913 | fJetCones[2] = 0.4 ; fJetNameCones[2] = "04" ; | |
914 | fJetCones[2] = 0.5 ; fJetNameCones[2] = "05" ; | |
2db10729 | 915 | |
1c5acb87 | 916 | fJetPtThres[0] = 0.0 ; fJetNamePtThres[0] = "00" ; |
917 | fJetPtThres[1] = 0.5 ; fJetNamePtThres[1] = "05" ; | |
918 | fJetPtThres[2] = 1.0 ; fJetNamePtThres[2] = "10" ; | |
919 | fJetPtThres[3] = 2.0 ; fJetNamePtThres[3] = "20" ; | |
920 | } | |
921 | ||
2db10729 | 922 | //__________________________________________________________________________________________________ |
923 | Bool_t AliAnaParticleJetLeadingConeCorrelation::IsJetSelected(Double_t ptTrig, Double_t ptjet) const | |
924 | { | |
1c5acb87 | 925 | //Given the pt of the jet and the trigger particle, select the jet or not |
2db10729 | 926 | //3 options, fSelect=0 accepts all, fSelect=1 selects jets depending on a |
1c5acb87 | 927 | //function energy dependent and fSelect=2 selects on simple fixed cuts |
9415d854 | 928 | |
1c5acb87 | 929 | if(ptjet == 0) return kFALSE; |
477d6cee | 930 | |
1c5acb87 | 931 | Double_t rat = ptTrig / ptjet ; |
932 | ||
933 | //############################################################### | |
934 | if(fSelect == 0) | |
935 | return kTRUE; //Accept all jets, no restriction | |
936 | //############################################################### | |
937 | else if(fSelect == 1){ | |
938 | //Check if the energy of the reconstructed jet is within an energy window | |
939 | //WARNING: to be rechecked, don't remember what all the steps mean | |
940 | Double_t par[6]; | |
941 | Double_t xmax[2]; | |
942 | Double_t xmin[2]; | |
943 | ||
944 | Int_t iCTS = 0; | |
945 | if(fJetsOnlyInCTS) | |
946 | iCTS = 3 ; | |
947 | ||
948 | if(!fPbPb){ | |
2db10729 | 949 | //Phythia alone, jets with pt_th > 0.2, r = 0.3 |
950 | par[0] = fJetE1[0]; par[1] = fJetE2[0]; | |
1c5acb87 | 951 | //Energy of the jet peak |
952 | //e_jet = fJetE1[0]+fJetE2[0]*e_gamma, simulation fit | |
953 | par[2] = fJetSigma1[0]; par[3] = fJetSigma2[0]; | |
954 | //Sigma of the jet peak | |
955 | //sigma_jet = fJetSigma1[0]+fJetSigma2[0]*e_gamma, simulation fit | |
956 | par[4] = fBkgMean[0 + iCTS]; par[5] = fBkgRMS[0 + iCTS]; | |
957 | //Parameters reserved for PbPb bkg. | |
958 | xmax[0] = fJetXMax1[0 + iCTS]; xmax[1] = fJetXMax2[0 + iCTS]; | |
959 | xmin[0] = fJetXMin1[0 + iCTS]; xmin[1] = fJetXMin2[0 + iCTS]; | |
2db10729 | 960 | //Factor that multiplies sigma to obtain the best limits, |
1c5acb87 | 961 | //by observation, of mono jet ratios (ptjet/ptTrig) |
962 | //X_jet = fJetX1[0]+fJetX2[0]*e_gamma | |
963 | ||
964 | } | |
965 | else{ | |
966 | if(ptTrig > fPtTriggerSelectionCut){ | |
2db10729 | 967 | //Phythia +PbPb with pt_th > 2 GeV/c, r = 0.3 |
968 | par[0] = fJetE1[0]; par[1] = fJetE2[0]; | |
969 | //Energy of the jet peak, same as in pp | |
970 | //e_jet = fJetE1[0]+fJetE2[0]*e_gamma, simulation fit | |
971 | par[2] = fJetSigma1[0]; par[3] = fJetSigma2[0]; | |
972 | //Sigma of the jet peak, same as in pp | |
973 | //sigma_jet = fJetSigma1[0]+fJetSigma2[0]*e_gamma, simulation fit | |
974 | par[4] = fBkgMean[1 + iCTS]; par[5] = fBkgRMS[1 + iCTS]; | |
975 | //Mean value and RMS of PbPb Bkg | |
976 | xmax[0] = fJetXMax1[1 + iCTS]; xmax[1] = fJetXMax2[1 + iCTS]; | |
977 | xmin[0] = fJetXMin1[1 + iCTS]; xmin[1] = fJetXMin2[1 + iCTS]; | |
978 | //Factor that multiplies sigma to obtain the best limits, | |
979 | //by observation, of mono jet ratios (ptjet/ptTrig) mixed with PbPb Bkg, | |
980 | //pt_th > 2 GeV, r = 0.3 | |
981 | //X_jet = fJetX1[0]+fJetX2[0]*e_gamma | |
982 | ||
1c5acb87 | 983 | } |
984 | else{ | |
2db10729 | 985 | //Phythia + PbPb with pt_th > 0.5 GeV/c, r = 0.3 |
986 | par[0] = fJetE1[1]; par[1] = fJetE2[1]; | |
987 | //Energy of the jet peak, pt_th > 2 GeV/c, r = 0.3 | |
988 | //e_jet = fJetE1[0]+fJetE2[0]*e_gamma, simulation fit | |
989 | par[2] = fJetSigma1[1]; par[3] = fJetSigma2[1]; | |
990 | //Sigma of the jet peak, pt_th > 2 GeV/c, r = 0.3 | |
991 | //sigma_jet = fJetSigma1[0]+fJetSigma2[0]*e_gamma, simulation fit | |
992 | par[4] = fBkgMean[2 + iCTS]; par[5] = fBkgRMS[2 + iCTS]; | |
993 | //Mean value and RMS of PbPb Bkg in a 0.3 cone, pt > 2 GeV. | |
994 | xmax[0] = fJetXMax1[2 + iCTS]; xmax[1] = fJetXMax2[2 + iCTS]; | |
995 | xmin[0] = fJetXMin1[2 + iCTS]; xmin[1] = fJetXMin2[2 + iCTS]; | |
996 | //Factor that multiplies sigma to obtain the best limits, | |
997 | //by observation, of mono jet ratios (ptjet/ptTrig) mixed with PbPb Bkg, | |
998 | //pt_th > 2 GeV, r = 0.3 | |
999 | //X_jet = fJetX1[0]+fJetX2[0]*e_gamma | |
1000 | ||
1c5acb87 | 1001 | }//If low pt jet in bkg |
1002 | }//if Bkg | |
1003 | ||
1004 | //Calculate minimum and maximum limits of the jet ratio. | |
1005 | Double_t min = CalculateJetRatioLimit(ptTrig, par, xmin); | |
1006 | Double_t max = CalculateJetRatioLimit(ptTrig, par, xmax); | |
1007 | ||
2db10729 | 1008 | AliDebug(3,Form("Jet selection? : Limits min %2.3f, max %2.3f, pt_jet %2.3f, pt_gamma %2.3f, pt_jet / pt_gamma %2.3f",min,max,ptjet,ptTrig,rat)); |
1c5acb87 | 1009 | |
1010 | if(( min < rat ) && ( max > ptjet/rat)) | |
1011 | return kTRUE; | |
1012 | else | |
1013 | return kFALSE; | |
1014 | }//fSelect = 1 | |
1015 | //############################################################### | |
2db10729 | 1016 | else if(fSelect == 2) |
1017 | { | |
1c5acb87 | 1018 | //Simple selection |
2db10729 | 1019 | if(!fJetsOnlyInCTS) |
1020 | { | |
1c5acb87 | 1021 | if((rat < fJetRatioMaxCut) && (rat > fJetRatioMinCut )) return kTRUE; |
1022 | } | |
2db10729 | 1023 | else |
1024 | { | |
1c5acb87 | 1025 | if((rat < fJetCTSRatioMaxCut) && (rat > fJetCTSRatioMinCut )) return kTRUE; |
1026 | } | |
1027 | }// fSelect = 2 | |
1028 | //############################################################### | |
2db10729 | 1029 | else |
1030 | { | |
1031 | AliWarning(")Jet selection option larger than 2, DON'T SELECT JETS"); | |
1c5acb87 | 1032 | return kFALSE ; |
1033 | } | |
1034 | ||
1035 | return kFALSE; | |
1036 | ||
1037 | } | |
1038 | ||
1039 | //___________________________________________________________________ | |
2db10729 | 1040 | Bool_t AliAnaParticleJetLeadingConeCorrelation::IsParticleInJetCone(Double_t eta, Double_t phi, Double_t etal, Double_t phil) |
1041 | const { | |
1c5acb87 | 1042 | //Check if the particle is inside the cone defined by the leading particle |
1043 | //WARNING: To be rechecked | |
9415d854 | 1044 | |
1c5acb87 | 1045 | if(phi < 0) phi+=TMath::TwoPi(); |
2db10729 | 1046 | if(phil < 0) phil+=TMath::TwoPi(); |
1c5acb87 | 1047 | Double_t rad = 10000 + fJetCone; |
1048 | ||
1049 | if(TMath::Abs(phi-phil) <= (TMath::TwoPi() - fJetCone)) | |
1050 | rad = TMath::Sqrt(TMath::Power(eta-etal,2)+TMath::Power(phi-phil,2)); | |
1051 | else{ | |
1052 | if(phi-phil > TMath::TwoPi() - fJetCone) | |
1053 | rad = TMath::Sqrt(TMath::Power(eta-etal,2)+TMath::Power((phi-TMath::TwoPi())-phil,2)); | |
1054 | if(phi-phil < -(TMath::TwoPi() - fJetCone)) | |
1055 | rad = TMath::Sqrt(TMath::Power(eta-etal,2)+TMath::Power((phi+TMath::TwoPi())-phil,2)); | |
1056 | } | |
1057 | ||
1058 | if(rad < fJetCone) return kTRUE ; | |
1059 | else return kFALSE ; | |
1060 | ||
1061 | } | |
1062 | ||
1063 | //__________________________________________________________________ | |
2db10729 | 1064 | void AliAnaParticleJetLeadingConeCorrelation::MakeAnalysisFillAOD() |
1065 | { | |
1c5acb87 | 1066 | //Particle-Hadron Correlation Analysis, fill AODs |
1067 | ||
2db10729 | 1068 | if(!GetInputAODBranch()) |
1069 | { | |
1070 | AliFatal(Form("No input particles in AOD with name branch < %s >",GetInputAODName().Data())); | |
1071 | return;// coverity | |
1c5acb87 | 1072 | } |
1073 | ||
2db10729 | 1074 | if(strcmp(GetInputAODBranch()->GetClass()->GetName(), "AliAODPWG4ParticleCorrelation")) |
1075 | AliFatal(Form("Wrong type of AOD object, change AOD class name in input AOD: It should be <AliAODPWG4ParticleCorrelation> and not <%s>", | |
1076 | GetInputAODBranch()->GetClass()->GetName())); | |
1077 | ||
1078 | ||
1079 | AliDebug(1,"Begin jet leading cone correlation analysis, fill AODs"); | |
1080 | AliDebug(1,Form("In particle branch aod entries %d", GetInputAODBranch()->GetEntriesFast())); | |
1081 | AliDebug(1,Form("In CTS aod entries %d", GetCTSTracks() ->GetEntriesFast())); | |
1082 | AliDebug(1,Form("In EMCAL aod entries %d", GetEMCALClusters() ->GetEntriesFast())); | |
1c5acb87 | 1083 | |
1084 | //Loop on stored AOD particles, trigger | |
1085 | Int_t naod = GetInputAODBranch()->GetEntriesFast(); | |
f50ae487 | 1086 | for(Int_t iaod = 0; iaod < naod ; iaod++) |
1087 | { | |
2db10729 | 1088 | AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod)); |
9415d854 | 1089 | |
1090 | // printf("AliAnaParticleJetLeadingConeCorrelation::MakeAnalysisFillAOD() - Trigger : pt %3.2f, phi %2.2f, eta %2.2f\n",particle->Pt(), particle->Phi(), particle->Eta()); | |
1091 | ||
2db10729 | 1092 | //Search leading particles in CTS and EMCAL |
f50ae487 | 1093 | if(GetLeadingParticle(particle)) |
1094 | { | |
2db10729 | 1095 | //Construct the jet around the leading, Fill AOD jet particle list, select jet |
1096 | //and fill AOD with jet and background | |
f50ae487 | 1097 | MakeAODJet(particle); |
9415d854 | 1098 | |
1c5acb87 | 1099 | }//Leading found |
1100 | }//AOD trigger particle loop | |
1101 | ||
2db10729 | 1102 | AliDebug(1,"End of jet leading cone analysis, fill AODs"); |
1c5acb87 | 1103 | |
2db10729 | 1104 | } |
1c5acb87 | 1105 | |
f50ae487 | 1106 | //_________________________________________________________________________ |
1107 | void AliAnaParticleJetLeadingConeCorrelation::MakeAnalysisFillHistograms() | |
1c5acb87 | 1108 | { |
1109 | ||
1110 | //Particle-Hadron Correlation Analysis, fill histograms | |
1111 | ||
f50ae487 | 1112 | if(!GetInputAODBranch()) |
1113 | { | |
2db10729 | 1114 | printf("AliAnaParticleJetLeadingConeCorrelation::MakeAnalysisFillHistograms() - No input particles in AOD with name branch < %s >", |
f50ae487 | 1115 | GetInputAODName().Data()); |
2db10729 | 1116 | return; |
477d6cee | 1117 | } |
f50ae487 | 1118 | |
2db10729 | 1119 | AliDebug(1,"Begin jet leading cone correlation analysis, fill histograms"); |
1120 | AliDebug(1,Form("In particle branch aod entries %d", GetInputAODBranch()->GetEntriesFast())); | |
1121 | AliDebug(1,Form("In CTS aod entries %d", GetCTSTracks() ->GetEntriesFast())); | |
1122 | AliDebug(1,Form("In EMCAL aod entries %d", GetEMCALClusters() ->GetEntriesFast())); | |
477d6cee | 1123 | |
1c5acb87 | 1124 | //Loop on stored AOD particles, trigger |
1125 | Int_t naod = GetInputAODBranch()->GetEntriesFast(); | |
f50ae487 | 1126 | for(Int_t iaod = 0; iaod < naod ; iaod++) |
1127 | { | |
1c5acb87 | 1128 | AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod)); |
1129 | ||
477d6cee | 1130 | if(OnlyIsolated() && !particle->IsIsolated()) continue; |
1131 | ||
f50ae487 | 1132 | Double_t pt = particle->Pt(); |
1c5acb87 | 1133 | Double_t phi = particle->Phi(); |
1134 | Double_t eta = particle->Eta(); | |
1135 | ||
1136 | //Get leading particle, fill histograms | |
f50ae487 | 1137 | fLeadingMom = particle->GetLeading(); |
667496a9 | 1138 | Int_t det = particle->GetLeadingDetector(); |
477d6cee | 1139 | |
667496a9 | 1140 | if(det > 0 && fLeadingMom.Pt() > 0) |
f50ae487 | 1141 | { |
1142 | Double_t ptL = fLeadingMom.Pt(); | |
1143 | Double_t phiL = fLeadingMom.Phi(); | |
1c5acb87 | 1144 | if(phiL < 0 ) phiL+=TMath::TwoPi(); |
f50ae487 | 1145 | Double_t etaL = fLeadingMom.Eta(); |
1146 | ||
2db10729 | 1147 | AliDebug(1,Form("Trigger with pt %3.2f, phi %2.2f, eta %2.2f", pt, phi, eta)); |
1c5acb87 | 1148 | |
667496a9 | 1149 | if(det == kCTS) |
2db10729 | 1150 | { |
f50ae487 | 1151 | fhChargedLeadingPt->Fill(pt,ptL); |
1152 | fhChargedLeadingPhi->Fill(pt,phiL); | |
1153 | fhChargedLeadingEta->Fill(pt,etaL); | |
1154 | fhChargedLeadingDeltaPt->Fill(pt,pt-ptL); | |
1155 | fhChargedLeadingDeltaPhi->Fill(pt,TMath::Abs(phi-phiL)); | |
1156 | fhChargedLeadingDeltaEta->Fill(pt,eta-etaL); | |
1157 | fhChargedLeadingRatioPt->Fill(pt,ptL/pt); | |
1158 | fhChargedLeadingXi->Fill(pt,TMath::Log(pt/ptL)); | |
1159 | if(pt > 30) fhChargedLeadingDeltaPhiRatioPt30->Fill(TMath::Abs(phi-phiL),ptL/pt); | |
1160 | if(pt > 50) fhChargedLeadingDeltaPhiRatioPt50->Fill(TMath::Abs(phi-phiL),ptL/pt); | |
1c5acb87 | 1161 | } |
667496a9 | 1162 | else if(det== kEMCAL) |
2db10729 | 1163 | { |
f50ae487 | 1164 | fhNeutralLeadingPt->Fill(pt,ptL); |
1165 | fhNeutralLeadingPhi->Fill(pt,phiL); | |
1166 | fhNeutralLeadingEta->Fill(pt,etaL); | |
1167 | fhNeutralLeadingDeltaPt->Fill(pt,pt-ptL); | |
1168 | fhNeutralLeadingDeltaPhi->Fill(pt,TMath::Abs(phi-phiL)); | |
1169 | fhNeutralLeadingDeltaEta->Fill(pt,eta-etaL); | |
1170 | fhNeutralLeadingRatioPt->Fill(pt,ptL/pt); | |
1171 | fhNeutralLeadingXi->Fill(pt,TMath::Log(pt/ptL)); | |
1172 | if(pt > 30) fhNeutralLeadingDeltaPhiRatioPt30->Fill(TMath::Abs(phi-phiL),ptL/pt); | |
1173 | if(pt > 50) fhNeutralLeadingDeltaPhiRatioPt50->Fill(TMath::Abs(phi-phiL),ptL/pt); | |
1c5acb87 | 1174 | } |
1175 | ||
1176 | //Fill Jet histograms | |
f50ae487 | 1177 | |
1178 | if(!fSeveralConeAndPtCuts) | |
1179 | {//just fill histograms | |
1180 | if(!fReMakeJet) | |
1181 | { | |
1182 | fJetMom=particle->GetCorrelatedJet(); | |
1183 | fBkgMom=particle->GetCorrelatedBackground(); | |
1184 | } | |
1185 | else MakeJetFromAOD(particle); | |
1186 | ||
1187 | if(fJetMom.Pt() > 0) | |
1188 | {//Jet was found | |
1189 | FillJetHistos(particle, fJetMom,"Jet",""); | |
1190 | FillJetHistos(particle, fBkgMom,"Bkg",""); | |
1191 | } | |
1c5acb87 | 1192 | } |
f50ae487 | 1193 | else if(fSeveralConeAndPtCuts) |
1194 | { | |
1195 | for(Int_t icone = 0; icone<fJetNCone; icone++) | |
1196 | { | |
1197 | fJetCone=fJetCones[icone]; | |
1198 | for(Int_t ipt = 0; ipt<fJetNPt;ipt++) | |
1199 | { | |
1200 | TString lastname ="Cone"+ fJetNameCones[icone]+"Pt"+ fJetNamePtThres[ipt]; | |
1201 | fJetPtThreshold=fJetPtThres[ipt]; | |
1202 | ||
1203 | MakeJetFromAOD(particle); | |
1204 | ||
1205 | if(fJetMom.Pt() > 0) | |
1206 | {//Jet was found | |
1207 | FillJetHistos(particle, fJetMom,"Jet",lastname); | |
1208 | FillJetHistos(particle, fBkgMom,"Bkg",lastname); | |
1209 | } | |
1210 | }//icone | |
1211 | }//ipt | |
1c5acb87 | 1212 | }//fSeveralConeAndPtCuts |
1213 | }//Leading | |
1214 | }//AOD trigger particle loop | |
1215 | ||
2db10729 | 1216 | AliDebug(1,"End of jet leading cone analysis, fill histograms"); |
1c5acb87 | 1217 | |
2db10729 | 1218 | } |
1c5acb87 | 1219 | |
ad5fec38 | 1220 | //_______________________________________________________________________________________________ |
f50ae487 | 1221 | void AliAnaParticleJetLeadingConeCorrelation::MakeAODJet(AliAODPWG4ParticleCorrelation *particle) |
ad5fec38 | 1222 | { |
f50ae487 | 1223 | //Fill the jet with the particles around the leading particle with |
1224 | //R=fJetCone and pt_th = fJetPtThres. Calculate the energy of the jet and | |
1225 | //fill aod with found information | |
1c5acb87 | 1226 | |
477d6cee | 1227 | Double_t ptTrig = particle->Pt(); |
1228 | Double_t phiTrig = particle->Phi(); | |
f50ae487 | 1229 | Double_t phil = fLeadingMom.Phi(); |
1c5acb87 | 1230 | if(phil<0) phil+=TMath::TwoPi(); |
f50ae487 | 1231 | Double_t etal = fLeadingMom.Eta(); |
1232 | ||
1c5acb87 | 1233 | //Different pt cut for jet particles in different collisions systems |
1234 | Float_t ptcut = fJetPtThreshold; | |
1235 | if(fPbPb && !fSeveralConeAndPtCuts && ptTrig > fPtTriggerSelectionCut) ptcut = fJetPtThresPbPb ; | |
1236 | ||
1237 | //Add charged particles to jet if they are in cone around the leading particle | |
2db10729 | 1238 | if(!GetCTSTracks()) |
1239 | { | |
1240 | AliFatal("Cannot construct jets without tracks, STOP analysis"); | |
1c5acb87 | 1241 | return; |
1242 | } | |
1243 | ||
1244 | //Fill jet with tracks | |
a3aebfff | 1245 | //Initialize reference arrays that will contain jet and background tracks |
f50ae487 | 1246 | TObjArray * reftracks = new TObjArray; |
591cc579 | 1247 | TObjArray * reftracksbkg = new TObjArray; |
9415d854 | 1248 | |
be518ab0 | 1249 | for(Int_t ipr = 0;ipr < (GetCTSTracks())->GetEntriesFast() ; ipr ++ ){ |
88f9563f | 1250 | AliVTrack* track = (AliVTrack *)((GetCTSTracks())->At(ipr)) ; |
f50ae487 | 1251 | fTrackVector.SetXYZ(track->Px(),track->Py(),track->Pz()); |
1c5acb87 | 1252 | |
f50ae487 | 1253 | //Particles in jet |
1254 | if(IsParticleInJetCone(fTrackVector.Eta(), fTrackVector.Phi(), etal, phil)){ | |
477d6cee | 1255 | |
f50ae487 | 1256 | reftracks->Add(track); |
9415d854 | 1257 | |
f50ae487 | 1258 | if(fTrackVector.Pt() > ptcut ) |
1259 | { | |
1260 | fJetConstMom.SetVect(fTrackVector); | |
1261 | fJetMom+=fJetConstMom; | |
1c5acb87 | 1262 | } |
f50ae487 | 1263 | } |
1264 | ||
1c5acb87 | 1265 | //Background around (phi_gamma-pi, eta_leading) |
f50ae487 | 1266 | else if(IsParticleInJetCone(fTrackVector.Eta(),fTrackVector.Phi(),etal, phiTrig)) { |
9415d854 | 1267 | |
f50ae487 | 1268 | reftracksbkg->Add(track); |
1269 | ||
1270 | if(fTrackVector.Pt() > ptcut ){ | |
1271 | fJetConstMom.SetVect(fTrackVector); | |
1272 | fBkgMom+=fJetConstMom; | |
1c5acb87 | 1273 | } |
1274 | } | |
1275 | }//Track loop | |
1276 | ||
a3aebfff | 1277 | //Add referenced tracks to AOD |
f50ae487 | 1278 | if(reftracks->GetEntriesFast() > 0 ) |
1279 | { | |
591cc579 | 1280 | reftracks->SetName(Form("%sTracks",GetAODObjArrayName().Data())); |
1281 | particle->AddObjArray(reftracks); | |
a3aebfff | 1282 | } |
2db10729 | 1283 | else AliDebug(2,"No tracks in jet cone"); |
1284 | ||
f50ae487 | 1285 | if(reftracksbkg->GetEntriesFast() > 0 ) |
1286 | { | |
591cc579 | 1287 | reftracksbkg->SetName(Form("%sTracksBkg",GetAODObjArrayName().Data())); |
1288 | particle->AddObjArray(reftracksbkg); | |
a3aebfff | 1289 | } |
2db10729 | 1290 | else AliDebug(1,"No background tracks in jet cone"); |
9415d854 | 1291 | |
1c5acb87 | 1292 | //Add neutral particles to jet |
a3aebfff | 1293 | //Initialize reference arrays that will contain jet and background tracks |
f50ae487 | 1294 | TObjArray * refclusters = new TObjArray; |
591cc579 | 1295 | TObjArray * refclustersbkg = new TObjArray; |
be518ab0 | 1296 | if(!fJetsOnlyInCTS && GetEMCALClusters()){ |
1c5acb87 | 1297 | |
f50ae487 | 1298 | //Get vertex for photon momentum calculation |
1299 | Double_t vertex[] = {0,0,0} ; //vertex | |
1300 | if(GetReader()->GetDataType()!= AliCaloTrackReader::kMC) | |
1301 | { | |
1302 | GetReader()->GetVertex(vertex); | |
1303 | //if(GetReader()->GetSecondInputAODTree()) GetReader()->GetSecondInputAODVertex(vertex2); | |
1304 | } | |
1305 | ||
1306 | for(Int_t iclus = 0;iclus < (GetEMCALClusters())->GetEntriesFast() ; iclus ++ ) | |
1307 | { | |
be518ab0 | 1308 | AliVCluster * calo = (AliVCluster *) (GetEMCALClusters()->At(iclus)) ; |
1c5acb87 | 1309 | |
1310 | //Cluster selection, not charged | |
49b5c49b | 1311 | if(IsTrackMatched(calo,GetReader()->GetInputEvent())) continue ; |
1c5acb87 | 1312 | |
f50ae487 | 1313 | //Get Momentum vector, |
1314 | calo->GetMomentum(fJetConstMom,vertex) ;//Assume that come from vertex in straight line | |
1315 | ||
1316 | //Particles in jet | |
1317 | if(IsParticleInJetCone(fJetConstMom.Eta(),fJetConstMom.Phi(), etal, phil)){ | |
1318 | ||
1319 | refclusters->Add(calo); | |
1320 | ||
1321 | if(fJetConstMom.Pt() > ptcut ) fJetMom+=fJetConstMom; | |
1c5acb87 | 1322 | } |
1323 | //Background around (phi_gamma-pi, eta_leading) | |
f50ae487 | 1324 | else if(IsParticleInJetCone(fJetConstMom.Eta(),fJetConstMom.Phi(),etal, phiTrig)){ |
1325 | ||
1326 | ||
1327 | refclustersbkg->Add(calo); | |
1328 | ||
1329 | if(fJetConstMom.Pt() > ptcut ) fBkgMom+=fJetConstMom; | |
1c5acb87 | 1330 | } |
1331 | }//cluster loop | |
1332 | }//jets with neutral particles | |
1333 | ||
a3aebfff | 1334 | //Add referenced clusters to AOD |
2db10729 | 1335 | if(refclusters->GetEntriesFast() > 0 ) |
1336 | { | |
591cc579 | 1337 | refclusters->SetName(Form("%sClusters",GetAODObjArrayName().Data())); |
1338 | particle->AddObjArray(refclusters); | |
a3aebfff | 1339 | } |
2db10729 | 1340 | else AliDebug(2,"No clusters in jet cone"); |
1341 | ||
f50ae487 | 1342 | if(refclustersbkg->GetEntriesFast() > 0 ) |
1343 | { | |
591cc579 | 1344 | refclustersbkg->SetName(Form("%sClustersBkg",GetAODObjArrayName().Data())); |
1345 | particle->AddObjArray(refclustersbkg); | |
a3aebfff | 1346 | } |
2db10729 | 1347 | else AliDebug(1,"No background clusters in jet cone"); |
9415d854 | 1348 | |
f50ae487 | 1349 | //If there is any jet found, select after some criteria and |
1c5acb87 | 1350 | //and fill AOD with corresponding TLorentzVector kinematics |
f50ae487 | 1351 | if(IsJetSelected(particle->Pt(), fJetMom.Pt())) |
1352 | { | |
1353 | particle->SetCorrelatedJet(fJetMom); | |
1354 | particle->SetCorrelatedBackground(fBkgMom); | |
2db10729 | 1355 | AliDebug(1,Form("Found jet: Trigger pt %2.3f, Jet pt %2.3f, Bkg pt %2.3f",ptTrig,fJetMom.Pt(),fBkgMom.Pt())); |
1356 | } | |
1c5acb87 | 1357 | |
1358 | } | |
1359 | ||
49b5c49b | 1360 | //______________________________________________________________________________________________________ |
f50ae487 | 1361 | void AliAnaParticleJetLeadingConeCorrelation::MakeJetFromAOD(AliAODPWG4ParticleCorrelation *particle) |
49b5c49b | 1362 | { |
f50ae487 | 1363 | //Fill the jet with the particles around the leading particle with |
1364 | //R=fJetCone and pt_th = fJetPtThres. Calculate the energy of the jet and | |
1c5acb87 | 1365 | //fill aod tlorentzvectors with jet and bakcground found |
9415d854 | 1366 | |
1c5acb87 | 1367 | Double_t ptTrig = particle->Pt(); |
1368 | Double_t phiTrig = particle->Phi(); | |
f50ae487 | 1369 | Double_t etal = fLeadingMom.Eta(); |
1370 | Double_t phil = fLeadingMom.Phi(); | |
9415d854 | 1371 | if(phil < 0) phil+=TMath::TwoPi(); |
1c5acb87 | 1372 | |
2fa19d54 | 1373 | TObjArray * refclusters = particle->GetObjArray(Form("Clusters%s" ,GetAODObjArrayName().Data())); |
1374 | TObjArray * reftracks = particle->GetObjArray(Form("Tracks%s" ,GetAODObjArrayName().Data())); | |
1375 | TObjArray * refclustersbkg = particle->GetObjArray(Form("ClustersBkg%s",GetAODObjArrayName().Data())); | |
1376 | TObjArray * reftracksbkg = particle->GetObjArray(Form("TracksBkg%s" ,GetAODObjArrayName().Data())); | |
9415d854 | 1377 | |
1c5acb87 | 1378 | //Different pt cut for jet particles in different collisions systems |
1379 | Float_t ptcut = fJetPtThreshold; | |
1380 | if(fPbPb && !fSeveralConeAndPtCuts && ptTrig > fPtTriggerSelectionCut) ptcut = fJetPtThresPbPb ; | |
a3aebfff | 1381 | |
1c5acb87 | 1382 | //Fill jet with tracks |
f50ae487 | 1383 | //Particles in jet |
1384 | if(reftracks) | |
1385 | { | |
1386 | for(Int_t ipr = 0;ipr < reftracks->GetEntriesFast() ; ipr ++ ) | |
1387 | { | |
88f9563f | 1388 | AliVTrack* track = (AliVTrack *) reftracks->At(ipr) ; |
f50ae487 | 1389 | fTrackVector.SetXYZ(track->Px(),track->Py(),track->Pz()); |
1390 | Float_t phi = fTrackVector.Phi(); | |
9415d854 | 1391 | if(phi < 0) phi+=TMath::TwoPi(); |
f50ae487 | 1392 | if(fTrackVector.Pt() > ptcut && IsParticleInJetCone(fTrackVector.Eta(), phi, etal, phil) ) |
1393 | { | |
1394 | fJetConstMom.SetVect(fTrackVector); | |
1395 | fJetMom+=fJetConstMom; | |
a3aebfff | 1396 | } |
1397 | }//jet Track loop | |
1398 | } | |
f50ae487 | 1399 | //Particles in background |
a3aebfff | 1400 | if(reftracksbkg){ |
f50ae487 | 1401 | for(Int_t ipr = 0;ipr < reftracksbkg->GetEntriesFast() ; ipr ++ ) |
1402 | { | |
88f9563f | 1403 | AliVTrack* track = (AliVTrack *) reftracksbkg->At(ipr) ; |
f50ae487 | 1404 | fTrackVector.SetXYZ(track->Px(),track->Py(),track->Pz()); |
1405 | if(fTrackVector.Pt() > ptcut && IsParticleInJetCone(fTrackVector.Eta(),fTrackVector.Phi(),etal, phiTrig) ) | |
1406 | { | |
1407 | fJetConstMom.SetVect(fTrackVector); | |
1408 | fBkgMom+=fJetConstMom; | |
9415d854 | 1409 | } |
1410 | }//background Track loop | |
a3aebfff | 1411 | } |
9415d854 | 1412 | |
1c5acb87 | 1413 | //Add neutral particles to jet |
f50ae487 | 1414 | if(!fJetsOnlyInCTS && refclusters) |
1415 | { | |
49b5c49b | 1416 | //Get vertex for photon momentum calculation |
f50ae487 | 1417 | Double_t vertex[] = {0,0,0} ; //vertex |
1418 | if(GetReader()->GetDataType()!= AliCaloTrackReader::kMC) | |
49b5c49b | 1419 | { |
1420 | GetReader()->GetVertex(vertex); | |
1421 | } | |
f50ae487 | 1422 | |
1c5acb87 | 1423 | //Loop on jet particles |
9415d854 | 1424 | if(refclusters){ |
f50ae487 | 1425 | for(Int_t iclus = 0;iclus < refclusters->GetEntriesFast() ; iclus ++ ) |
1426 | { | |
49b5c49b | 1427 | AliVCluster * calo = (AliVCluster *) refclusters->At(iclus) ; |
1428 | ||
f50ae487 | 1429 | calo->GetMomentum(fJetConstMom,vertex) ;//Assume that come from vertex in straight line |
49b5c49b | 1430 | |
f50ae487 | 1431 | if(fJetConstMom.Pt() > ptcut && IsParticleInJetCone(fJetConstMom.Eta(),fJetConstMom.Phi(), etal, phil)) fJetMom+=fJetConstMom; |
9415d854 | 1432 | }//jet cluster loop |
1433 | } | |
1434 | ||
1435 | //Loop on background particles | |
f50ae487 | 1436 | if(refclustersbkg) |
1437 | { | |
1438 | for(Int_t iclus = 0;iclus < refclustersbkg->GetEntriesFast() ; iclus ++ ) | |
1439 | { | |
49b5c49b | 1440 | AliVCluster * calo = (AliVCluster *) refclustersbkg->At(iclus) ; |
1441 | ||
f50ae487 | 1442 | calo->GetMomentum(fJetConstMom,vertex) ;//Assume that come from vertex in straight line |
49b5c49b | 1443 | |
f50ae487 | 1444 | if( fJetConstMom.Pt() > ptcut && IsParticleInJetCone(fJetConstMom.Eta(),fJetConstMom.Phi(),etal, phiTrig)) fBkgMom+=fJetConstMom; |
1445 | }//background cluster loop | |
a3aebfff | 1446 | } |
1c5acb87 | 1447 | }//clusters in jet |
9415d854 | 1448 | |
f50ae487 | 1449 | //If there is any jet found, leave jet and bkg as they are, |
1c5acb87 | 1450 | //if not set them to 0. |
f50ae487 | 1451 | if(!IsJetSelected(particle->Pt(), fJetMom.Pt())) |
1452 | { | |
1453 | fJetMom.SetPxPyPzE(0.,0.,0.,0.); | |
1454 | fBkgMom.SetPxPyPzE(0.,0.,0.,0.); | |
1c5acb87 | 1455 | } |
2db10729 | 1456 | else AliDebug(1,Form("Found jet: Trigger pt %2.3f, Jet pt %2.3f, Bkg pt %2.3f",ptTrig,fJetMom.Pt(),fBkgMom.Pt())); |
1c5acb87 | 1457 | |
1458 | } | |
1459 | ||
1c5acb87 | 1460 | //__________________________________________________________________ |
1461 | void AliAnaParticleJetLeadingConeCorrelation::Print(const Option_t * opt) const | |
1462 | { | |
9415d854 | 1463 | |
1c5acb87 | 1464 | //Print some relevant parameters set for the analysis |
1465 | if(! opt) | |
1466 | return; | |
1467 | ||
a3aebfff | 1468 | printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ; |
745913ae | 1469 | AliAnaCaloTrackCorrBaseClass::Print(" "); |
9415d854 | 1470 | |
1c5acb87 | 1471 | if(fJetsOnlyInCTS)printf("Jets reconstructed in CTS \n"); |
1472 | else printf("Jets reconstructed in CTS+EMCAL \n"); | |
9415d854 | 1473 | |
1c5acb87 | 1474 | if(fPbPb) printf("PbPb events, pT cut in jet cone energy reconstruction %2.1f \n", fJetPtThreshold); |
1475 | else printf("pp events, pT cut in jet cone energy reconstruction %2.1f \n", fJetPtThresPbPb); | |
9415d854 | 1476 | |
1477 | printf("If pT of trigger < %2.3f, select jets as in pp? \n", fPtTriggerSelectionCut); | |
1478 | ||
2db10729 | 1479 | printf("Phi gamma-Leading < %3.2f\n", fDeltaPhiMaxCut) ; |
1c5acb87 | 1480 | printf("Phi gamma-Leading > %3.2f\n", fDeltaPhiMinCut) ; |
2db10729 | 1481 | printf("pT Leading / pT Trigger < %3.2f\n", fLeadingRatioMaxCut) ; |
1c5acb87 | 1482 | printf("pT Leading / pT Trigger > %3.2f\n", fLeadingRatioMinCut) ; |
1483 | ||
1484 | if(fSelect == 2){ | |
2db10729 | 1485 | printf("pT Jet / pT Gamma < %3.2f\n", fJetRatioMaxCut) ; |
1c5acb87 | 1486 | printf("pT Jet / pT Gamma > %3.2f\n", fJetRatioMinCut) ; |
1487 | printf("pT Jet (Only CTS)/ pT Trigger < %3.2f\n", fJetCTSRatioMaxCut) ; | |
1488 | printf("pT Jet (Only CTS)/ pT Trigger > %3.2f\n", fJetCTSRatioMinCut) ; | |
1489 | } | |
1490 | else if(fSelect == 0) | |
1491 | printf("Accept all reconstructed jets \n") ; | |
1492 | else if(fSelect == 1) | |
1493 | printf("Accept jets depending on trigger energy \n") ; | |
1494 | else | |
1495 | printf("Wrong jet selection option: %d \n", fSelect) ; | |
9415d854 | 1496 | |
477d6cee | 1497 | printf("Isolated Trigger? %d\n", fSelectIsolated) ; |
2db10729 | 1498 | |
1c5acb87 | 1499 | } |