1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
20 //_________________________________________________________________________
21 // Class for Filling JetFinder Plots
23 //*-- Author: Mark Horner (LBL/UCT)
29 #include "AliEMCALJetFinderPlots.h"
31 ClassImp(AliEMCALJetFinderPlots)
33 AliEMCALJetFinderPlots::AliEMCALJetFinderPlots() :
34 fDebug(0),fConeRadius(0.),fNominalEnergy(0.),fOutput(0),
35 fhFragmFcn(0),fhPartonFragmFcn(0),fhPartonJT(0),fhPartonPL(0),
36 fhJetJT(0),fhJetPL(0),fhJetEt(0),fhJetEtDiff(0),fhJetEta(0),fhJetPhi(0),
37 fhPartonEta(0),fhPartonPhi(0),fhEtaDiff(0),fhPhiDiff(0),fhEtaPhiSpread(0),
38 fhNJets(0),fhFragmFcn2(0),fhPartonFragmFcn2(0),fhPartonJT2(0),fhPartonPL2(0),
39 fhJetJT2(0),fhJetPL2(0),fhJetEt2(0),fhJetEtDiff2(0),fhJetEta2(0),fhJetPhi2(0),
40 fhPartonEta2(0),fhPartonPhi2(0),fhEtaDiff2(0),fhPhiDiff2(0),fhEtaPhiSpread2(0),
41 fhNJets2(0),fhJetEtSecond2(0),fhJetEtRatio2(0),fhEtaPhiDist2(0),fhInputOutput(0),
42 fhRecoBinPt(0),fhRecoBinPtNoBg(0),fhRecoBinPartonPt(0),fhRecoBinJetEt(0),fhRecoBinInputJetEt(0),
43 fhJetPT(0),fhPartonPT(0),fhJetPT2(0),fhPartonPT2(0),fhRecoBinFragmFcn(0),fhRecoBinFragmFcnNoBg(0),
44 fhRecoBinPartonFragmFcn(0),fhJetInvE(0),fhJetInvE2(0),fhBackHisto(0),fScaleFactor(0),fInitialised(0)
46 // Constructor to initialise variables
47 fInitialised = kFALSE;
52 fhFragmFcn=0;// = new TH1F("hFragmFcn","Fragmentation Function",100,0,1);
53 fhPartonFragmFcn=0;// = new TH1F("hPartonFragmFcn","Fragmentation Function",100,0,1);
54 fhPartonJT=0;// = new TH1F("hPartonJT","Track Momentum Perpendicular to Parton Axis",100,0.,10.);
55 fhPartonPL=0;// = new TH1F("hPartonPL","Track Momentum Parallel to Parton Axis ",100,0.,100.);
56 fhJetJT=0;// = new TH1F("hJetJT","Track Momentum Perpendicular to Jet Axis",100,0.,10.);
57 fhJetPL=0;// = new TH1F("hJetPL","Track Momentum Parallel to Jet Axis ",100,0.,100.);
58 fhJetEt=0;// = new TH1F("hJetEt","E_{T}^{reco}",250,0.,250.);
59 fhJetEta=0;// = new TH1F("hJetEta","#eta_{jet}^{reco}",180,-0.9,0.9);
60 fhJetPhi=0;// = new TH1F("hJetPhi","#phi_{jet}^{reco}",62,0.,3.1);
61 fhPartonEta=0;// = new TH1F("hPartonEta","#eta_{Parton}",180,-0.9,0.9);
62 fhPartonPhi=0;// = new TH1F("hPartonPhi","#phi_{Parton}",62,0.,3.1);
63 fhEtaDiff=0;// = new TH1F("hEtaDiff","#eta_{jet}^{reco}-#eta_{jet}^{input}",100,-0.5,0.5);
64 fhPhiDiff=0;// = new TH1F("hPhiDiff","#phi_{jet}^{reco}-#phi_{jet}^{input}",100,-0.5,0.5);
65 fhNJets=0;// = new TH1F("hNJets","N Reconstructed jets",11,-0.5,10.5);
68 fhFragmFcn2=0; // ("hFragmFcn2","Fragmentation Function",100,0,1);
69 fhPartonFragmFcn2=0;// ("hFragmFcn2","Parton Fragmentation Function",100,0,1);
70 fhPartonJT2=0; // ("hPartonJT2","Track Momentum Perpendicular to Parton Axis",100,0.,10.);
71 fhPartonPL2=0; // ("hPartonPL2","Track Momentum Parallel to Parton Axis ",100,0.,100.);
72 fhJetJT2=0; // ("hJetJT2","Track Momentum Perpendicular to Jet Axis",100,0.,10.);
73 fhJetPL2=0; // ("hJetPL2","Track Momentum Parallel to Jet Axis ",100,0.,100.);
74 fhJetEt2=0; // ("hJetEt2","E_{T}^{reco}",250,0.,250.);
75 fhJetEta2=0; // ("hJetEta2","#eta_{jet}^{reco}",180,-0.9,0.9);
76 fhJetPhi2=0; // ("hJetPhi2","#phi_{jet}^{reco}",62,0.,3.1);
77 fhPartonEta2=0; // ("hPartonEta2","#eta_{Parton}",180,-0.9,0.9);
78 fhPartonPhi2=0; // ("hPartonPhi2","#phi_{Parton}",62,0.,3.1);
79 fhEtaDiff2=0; // ("hEtaDiff2","#eta_{jet}^{reco}-#eta_{jet}^{input}",100,-0.5,0.5);
80 fhPhiDiff2=0; // ("hPhiDiff2","#phi_{jet}^{reco}-#phi_{jet}^{input}",100,-0.5,0.5);
81 fhEtaPhiSpread2=0; // ("hEtaPhiSpread2","#eta - #phi Distribution
82 //of Reconstructed Jets",192,-0.7,0.7,288,pi/3,pi);
83 fhNJets2=0; // ("hNJets2","N Reconstructed jets",11,-0.5,10.5);
84 fhJetEtSecond2=0; //("hJetEtSecond2","E_{T}^{reco}",250,0.,250.);
85 fhJetEtRatio2=0; //("hJetEtRatio2","Ratio of Second Highest to Highest",100,0,1);
86 fhEtaPhiDist2=0; //("hEtaPhiDist2","Angular Distance Between First and Second",100,0,3);
88 // TH2F *fhInputOutput; //("hJetEtRatio2","Ratio of Second Highest to Highest",100,0,1);
90 fhRecoBinPt=0; // ("fhRecoBinPt","Reconstructed Pt Distribution",100,0,1);
91 fhRecoBinPtNoBg=0; // ("fhRecoBinPt","Reconstructed Pt Distribution",100,0,1);
92 fhRecoBinPartonPt=0; // ("fhRecoBinPartonPt","Input Pt Distribution",100,0,1);
93 fhRecoBinJetEt=0; // ("fhRecoJetEt","E_{T}^{reco}",250,0.,250.);
94 fhRecoBinInputJetEt=0; // ("fhRecoInputJetEt","E_{T}^{reco}",250,0.,250.);
95 fhJetPT =0;// new TH1F("hJetPT","P_{T} Distribution",200,0,200);
96 fhPartonPT =0;// new TH1F("hPartonPT","Parton P_{T} Distribution",200,0,1);
97 fhJetPT2 =0;// new TH1F("hJetPT","P_{T} Distribution",200,0,200);
98 fhPartonPT2 =0;// new TH1F("hPartonPT","Parton P_{T} Distribution",200,0,1);
99 fhRecoBinFragmFcn =0;//new TH1F("fhRecoBinFragmFcn","Reconstructed Frag. Fcn",100,0,1);
100 fhRecoBinFragmFcnNoBg =0;//new TH1F("fhRecoBinFragmFcn","Reconstructed Frag. Fcn",100,0,1);
101 fhRecoBinPartonFragmFcn =0;// new TH1F("fhRecoBinPartonFragmFcn","Input Bin Fragm Fcn Distribution",100,0,1);
102 fhJetInvE=0;// = new TH1F("fhJetInvE","#frac{1}{E_{R}}",100,0,1);
103 fhJetInvE2=0;// = new TH1F("fhJetInvE","#frac{1}{E_{R}}",100,0,1);
104 fScaleFactor = 1.0/0.6731;
109 AliEMCALJetFinderPlots::AliEMCALJetFinderPlots(const AliEMCALJetFinderPlots& jfp)
110 : TObject(jfp), fDebug(jfp.fDebug),fConeRadius(jfp.fConeRadius),fNominalEnergy(jfp.fNominalEnergy),
111 fOutput(jfp.fOutput),fhFragmFcn(jfp.fhFragmFcn),fhPartonFragmFcn(jfp.fhPartonFragmFcn),
112 fhPartonJT(jfp.fhPartonJT),fhPartonPL(jfp.fhPartonPL),fhJetJT(jfp.fhJetJT),fhJetPL(jfp.fhJetPL),
113 fhJetEt(jfp.fhJetEt),fhJetEtDiff(jfp.fhJetEtDiff),fhJetEta(jfp.fhJetEta),fhJetPhi(jfp.fhJetPhi),
114 fhPartonEta(jfp.fhPartonEta),fhPartonPhi(jfp.fhPartonPhi),fhEtaDiff(jfp.fhEtaDiff),
115 fhPhiDiff(jfp.fhPhiDiff),fhEtaPhiSpread(jfp.fhEtaPhiSpread),fhNJets(jfp.fhNJets),
116 fhFragmFcn2(jfp.fhFragmFcn2),fhPartonFragmFcn2(jfp.fhPartonFragmFcn2),fhPartonJT2(jfp.fhPartonJT2),
117 fhPartonPL2(jfp.fhPartonPL2),fhJetJT2(jfp.fhJetJT2),fhJetPL2(jfp.fhJetPL2),fhJetEt2(jfp.fhJetEt2),
118 fhJetEtDiff2(jfp.fhJetEtDiff2),fhJetEta2(jfp.fhJetEta2),fhJetPhi2(jfp.fhJetPhi2), fhPartonEta2(jfp.fhPartonEta2),
119 fhPartonPhi2(jfp.fhPartonPhi2),fhEtaDiff2(jfp.fhEtaDiff2),fhPhiDiff2(jfp.fhPhiDiff2),
120 fhEtaPhiSpread2(jfp.fhEtaPhiSpread2),fhNJets2(jfp.fhNJets2),fhJetEtSecond2(jfp.fhJetEtSecond2),
121 fhJetEtRatio2(jfp.fhJetEtRatio2),fhEtaPhiDist2(jfp.fhEtaPhiDist2),fhInputOutput(jfp.fhInputOutput),
122 fhRecoBinPt(jfp.fhRecoBinPt),fhRecoBinPtNoBg(jfp.fhRecoBinPtNoBg),fhRecoBinPartonPt(jfp.fhRecoBinPartonPt),
123 fhRecoBinJetEt(jfp.fhRecoBinJetEt),fhRecoBinInputJetEt(jfp.fhRecoBinInputJetEt),fhJetPT(jfp.fhJetPT),
124 fhPartonPT(jfp.fhPartonPT),fhJetPT2(jfp.fhJetPT2),fhPartonPT2(jfp.fhPartonPT2),fhRecoBinFragmFcn(jfp.fhRecoBinFragmFcn),
125 fhRecoBinFragmFcnNoBg(jfp.fhRecoBinFragmFcnNoBg),fhRecoBinPartonFragmFcn(jfp.fhRecoBinPartonFragmFcn),
126 fhJetInvE(jfp.fhJetInvE),fhJetInvE2(jfp.fhJetInvE2),fhBackHisto(jfp.fhBackHisto),fScaleFactor(jfp.fScaleFactor),
127 fInitialised(jfp.fInitialised)
132 void AliEMCALJetFinderPlots::InitPlots()
134 //========================= CASE 1 =======================================
135 fhFragmFcn = new TH1F("hFragmFcn","Fragmentation Function",200,0,2);
137 fhJetPT = new TH1F("hJetPT","P_{T} Distribution",200,0,200);
139 fhPartonPT = new TH1F("hPartonPT","Parton P_{T} Distribution",200,0,200);
141 fhPartonFragmFcn = new TH1F("hPartonFragmFcn","Parton Fragmentation Function",200,0,2);
142 fhPartonFragmFcn->Sumw2();
143 fhPartonJT = new TH1F("hPartonJT","Track Momentum Perpendicular to Parton Axis",100,0.,10.);
145 fhPartonPL = new TH1F("hPartonPL","Track Momentum Parallel to Parton Axis ",100,0.,100.);
147 fhJetJT = new TH1F("hJetJT","Track Momentum Perpendicular to Jet Axis",100,0.,10.);
149 fhJetPL = new TH1F("hJetPL","Track Momentum Parallel to Jet Axis ",100,0.,100.);
151 fhJetEt = new TH1F("hJetEt","E_{T}^{reco}",250,0.,250.);
153 fhJetEtDiff = new TH1F("hJetEtDiff","E_{T}^{reco}-E_{T}^{Parton}",250,-124.,125.);
154 fhJetEtDiff->Sumw2();
155 fhJetEta = new TH1F("hJetEta","#eta_{jet}^{reco}",180,-0.9,0.9);
157 fhJetPhi = new TH1F("hJetPhi","#phi_{jet}^{reco}",62,0.,3.1);
159 fhPartonEta = new TH1F("hPartonEta","#eta_{Parton}",180,-0.9,0.9);
160 fhPartonEta->Sumw2();
161 fhPartonPhi = new TH1F("hPartonPhi","#phi_{Parton}",62,0.,3.1);
162 fhPartonPhi->Sumw2();
163 fhEtaDiff = new TH1F("hEtaDiff","#eta_{jet}^{reco}-#eta_{jet}^{input}",100,-0.5,0.5);
165 fhPhiDiff = new TH1F("hPhiDiff","#phi_{jet}^{reco}-#phi_{jet}^{input}",100,-0.5,0.5);
167 fhNJets = new TH1F("hNJets","N Reconstructed jets",11,-0.5,10.5);
169 fhEtaPhiSpread = new TH2F("hEtaPhiSpread","#eta - #phi Distribution of Reconstructed Jets",100,-0.5,0.5,100,-0.5,0.5);
170 fhEtaPhiSpread->Sumw2();
171 fhNJets->SetXTitle("N_{jets}^{reco}/event");
172 fhNJets->SetYTitle("N_{events}");
175 fhJetEt->SetFillColor(16);
176 fhJetEt->SetXTitle("E_{T}^{reco}");
178 fhJetEta->SetFillColor(16);
179 fhJetEta->SetXTitle("#eta_{jet}^{reco}");
181 fhJetPhi->SetFillColor(16);
182 fhJetPhi->SetXTitle("#phi_{jet}^{reco}");
184 fhPartonEta->SetFillColor(16);
185 fhPartonEta->SetXTitle("#eta_{parton}");
187 fhPartonPhi->SetFillColor(16);
188 fhPartonPhi->SetXTitle("#phi_{parton}");
190 fhPartonPL->SetXTitle("p (GeV/c)");
191 fhPartonJT->SetXTitle("p (GeV/c)");
193 fhPartonFragmFcn->SetXTitle("Z = p_{T}^{Chg}/E_{T}^{parton}");
195 //Jet component properties
197 fhJetPL->SetXTitle("p (GeV/c)");
198 fhJetJT->SetXTitle("p (GeV/c)");
199 fhFragmFcn->SetXTitle("Z = p_{T}^{Chg}/E_{T}^{reco}");
200 fhPartonFragmFcn->SetXTitle("Z = p_{T}^{Chg}/E_{T}^{reco}");
202 fhEtaDiff->SetXTitle("#eta_{jet}^{reco}-#eta_{jet}^{input}");
203 fhPhiDiff->SetXTitle("#phi_{jet}^{reco}-#phi_{jet}^{input}");
204 fhEtaPhiSpread->SetXTitle("#eta");
205 fhEtaPhiSpread->SetYTitle("#phi");
207 //======================= CASE 2 ======================================
210 fhFragmFcn2 = new TH1F("hFragmFcn2","Fragmentation Function",200,0,2);
211 fhFragmFcn2->Sumw2();
212 fhJetPT2 = new TH1F("hJetPT2","P_{T} Distribution",200,0,200);
214 fhPartonPT2 = new TH1F("hPartonPT2","Parton P_{T} Distribution",200,0,1);
215 fhPartonPT2->Sumw2();
216 fhPartonFragmFcn2 = new TH1F("hPartonFragmFcn2","Parton Fragmentation Function",200,0,2);
217 fhPartonFragmFcn2->Sumw2();
218 fhPartonJT2 = new TH1F("hPartonJT2","Track Momentum Perpendicular to Parton Axis",100,0.,10.);
219 fhPartonJT2->Sumw2();
220 fhPartonPL2 = new TH1F("hPartonPL2","Track Momentum Parallel to Parton Axis ",100,0.,100.);
221 fhPartonPL2->Sumw2();
222 fhJetJT2 = new TH1F("hJetJT2","Track Momentum Perpendicular to Jet Axis",100,0.,10.);
224 fhJetPL2 = new TH1F("hJetPL2","Track Momentum Parallel to Jet Axis ",100,0.,100.);
226 fhJetEt2 = new TH1F("hJetEt2","E_{T}^{reco}",250,0.,250.);
228 fhJetEtDiff2 = new TH1F("hJetEtDiff2","E_{T}^{reco}-E_{T}^{Parton}",250,-124.,125.);
229 fhJetEtDiff2->Sumw2();
230 fhJetEta2 = new TH1F("hJetEta2","#eta_{jet}^{reco}",180,-0.9,0.9);
232 fhJetPhi2 = new TH1F("hJetPhi2","#phi_{jet}^{reco}",62,0.,3.1);
234 fhPartonEta2 = new TH1F("hPartonEta2","#eta_{Parton}",180,-0.9,0.9);
235 fhPartonEta2->Sumw2();
236 fhPartonPhi2 = new TH1F("hPartonPhi2","#phi_{Parton}",62,0.,3.1);
237 fhPartonPhi2->Sumw2();
238 fhEtaDiff2 = new TH1F("hEtaDiff2","#eta_{jet}^{reco}-#eta_{jet}^{input}",100,-0.5,0.5);
240 fhPhiDiff2 = new TH1F("hPhiDiff2","#phi_{jet}^{reco}-#phi_{jet}^{input}",100,-0.5,0.5);
242 fhEtaPhiSpread2 = new TH2F("hEtaPhiSpread2","#eta - #phi Distribution of Reconstructed Jets",100,-0.5,0.5,100,-0.5,0.5);
243 fhEtaPhiSpread2->Sumw2();
244 fhNJets2 = new TH1F("hNJets2","N Reconstructed jets",11,-0.5,10.5);
246 fhJetEtSecond2 = new TH1F("hJetEtSecond2","E_{T}^{reco}",250,0.,250.);
247 fhJetEtSecond2->Sumw2();
248 fhJetEtRatio2 = new TH1F("hJetEtRatio2","Ratio of Second Highest to Highest",100,0,1);
249 fhJetEtRatio2->Sumw2();
250 fhEtaPhiDist2 = new TH1F("hEtaPhiDist2","Angular Distance Between First and Second",100,0,3);
251 fhEtaPhiDist2->Sumw2();
253 fhInputOutput= new TH2F("hInputOutput","Input and Reconstruction Correlations;Input;Output",200,0,200,200,0,200); //("hJetEtRatio2","Ratio of Second Highest to Highest",100,0,1);
255 //============================== Reconstruction Bin Comparison ============================================
257 fhRecoBinPt =new TH1F("fhRecoBinPt","Reconstructed Pt Distribution",200,0,200);
258 fhRecoBinPt->Sumw2();
259 fhRecoBinPtNoBg =new TH1F("fhRecoBinPtNoBg","Reconstructed Pt Distribution Background Subtracted",200,0,200);
260 fhRecoBinPtNoBg->Sumw2();
261 fhRecoBinPartonPt = new TH1F("fhRecoBinPartonPt","Input Pt Distribution",200,0,200);
262 fhRecoBinPartonPt->Sumw2();
263 fhRecoBinFragmFcn =new TH1F("fhRecoBinFragmFcn","Reconstructed Frag. Fcn",200,0,2);
264 fhRecoBinFragmFcn->Sumw2();
265 fhRecoBinFragmFcnNoBg =new TH1F("fhRecoBinFragmFcnNoBg","Reconstructed Frag. Fcn With Background Removed",200,0,2);
266 fhRecoBinFragmFcnNoBg->Sumw2();
267 fhRecoBinPartonFragmFcn = new TH1F("fhRecoBinPartonFragmFcn","Input Bin Fragm Fcn Distribution",200,0,2);
268 fhRecoBinPartonFragmFcn->Sumw2();
269 fhRecoBinJetEt = new TH1F("fhRecoJetEt","E_{T}^{reco}",250,0.,250.);
270 fhRecoBinJetEt->Sumw2();
271 fhRecoBinInputJetEt = new TH1F("fhRecoInputJetEt","E_{T}^{reco}",250,0.,250.);
272 fhRecoBinInputJetEt->Sumw2();
275 fhJetInvE = new TH1F("fhJetInvE","#frac{1}{E_{R}}",100,0,1);
277 fhJetInvE2 = new TH1F("fhJetInvE2","#frac{1}{E_{R}}",100,0,1);
282 fInitialised = kTRUE;
286 AliEMCALJetFinderPlots::~AliEMCALJetFinderPlots()
288 // To ensure that all requested memory is returned
289 delete fhFragmFcn;// = new TH1F("hFragmFcn","Fragmentation Function",100,0,1);
290 delete fhPartonFragmFcn;// = new TH1F("hFragmFcn","Fragmentation Function",100,0,1);
291 delete fhPartonJT;// = new TH1F("hPartonJT","Track Momentum Perpendicular to Parton Axis",100,0.,10.);
292 delete fhPartonPL;// = new TH1F("hPartonPL","Track Momentum Parallel to Parton Axis ",100,0.,100.);
293 delete fhJetJT;// = new TH1F("hJetJT","Track Momentum Perpendicular to Jet Axis",100,0.,10.);
294 delete fhJetPL;// = new TH1F("hJetPL","Track Momentum Parallel to Jet Axis ",100,0.,100.);
295 delete fhJetEt;// = new TH1F("hJetEt","E_{T}^{reco}",250,0.,250.);
296 delete fhJetEtDiff; // ("hJetEt2","E_{T}^{reco}",250,0.,250.);
297 delete fhJetEta;// = new TH1F("hJetEta","#eta_{jet}^{reco}",180,-0.9,0.9);
298 delete fhJetPhi;// = new TH1F("hJetPhi","#phi_{jet}^{reco}",62,0.,3.1);
299 delete fhPartonEta;// = new TH1F("hPartonEta","#eta_{Parton}",180,-0.9,0.9);
300 delete fhPartonPhi;// = new TH1F("hPartonPhi","#phi_{Parton}",62,0.,3.1);
301 delete fhEtaDiff;// = new TH1F("hEtaDiff","#eta_{jet}^{reco}-#eta_{jet}^{input}",100,-0.5,0.5);
302 delete fhPhiDiff;// = new TH1F("hPhiDiff","#phi_{jet}^{reco}-#phi_{jet}^{input}",100,-0.5,0.5);
303 delete fhNJets;// = new TH1F("hNJets","N Reconstructed jets",11,-0.5,10.5);
304 delete fhEtaPhiSpread;
306 delete fhFragmFcn2; // ("hFragmFcn2","Fragmentation Function",100,0,1);
307 delete fhPartonFragmFcn2;// ("hFragmFcn2","Parton Fragmentation Function",100,0,1);
308 delete fhPartonJT2; // ("hPartonJT2","Track Momentum Perpendicular to Parton Axis",100,0.,10.);
309 delete fhPartonPL2; // ("hPartonPL2","Track Momentum Parallel to Parton Axis ",100,0.,100.);
310 delete fhJetJT2; // ("hJetJT2","Track Momentum Perpendicular to Jet Axis",100,0.,10.);
311 delete fhJetPL2; // ("hJetPL2","Track Momentum Parallel to Jet Axis ",100,0.,100.);
312 delete fhJetEt2; // ("hJetEt2","E_{T}^{reco}",250,0.,250.);
313 delete fhJetEtDiff2; // ("hJetEt2","E_{T}^{reco}",250,0.,250.);
314 delete fhJetEta2; // ("hJetEta2","#eta_{jet}^{reco}",180,-0.9,0.9);
315 delete fhJetPhi2; // ("hJetPhi2","#phi_{jet}^{reco}",62,0.,3.1);
316 delete fhPartonEta2; // ("hPartonEta2","#eta_{Parton}",180,-0.9,0.9);
317 delete fhPartonPhi2; // ("hPartonPhi2","#phi_{Parton}",62,0.,3.1);
318 delete fhEtaDiff2; // ("hEtaDiff2","#eta_{jet}^{reco}-#eta_{jet}^{input}",100,-0.5,0.5);
319 delete fhPhiDiff2; // ("hPhiDiff2","#phi_{jet}^{reco}-#phi_{jet}^{input}",100,-0.5,0.5);
320 delete fhEtaPhiSpread2; // ("hEtaPhiSpread2","#eta - #phi Distribution
321 //of Reconstructed Jets",192,-0.7,0.7,288,pi/3,pi);
322 delete fhNJets2; // ("hNJets2","N Reconstructed jets",11,-0.5,10.5);
323 delete fhJetEtSecond2; //("hJetEtSecond2","E_{T}^{reco}",250,0.,250.);
324 delete fhJetEtRatio2; //("hJetEtRatio2","Ratio of Second Highest to Highest",100,0,1);
325 delete fhEtaPhiDist2; //("hEtaPhiDist2","Angular Distance Between First and Second",100,0,3);
327 delete fhRecoBinPt; // ("fhRecoBinPt","Reconstructed Pt Distribution",100,0,1);
328 delete fhRecoBinPtNoBg; // ("fhRecoBinPt","Reconstructed Pt Distribution",100,0,1);
329 delete fhRecoBinPartonPt; // ("fhRecoBinPartonPt","Input Pt Distribution",100,0,1);
330 delete fhRecoBinJetEt; // ("fhRecoJetEt","E_{T}^{reco}",250,0.,250.);
331 delete fhRecoBinInputJetEt; // ("fhRecoInputJetEt","E_{T}^{reco}",250,0.,250.);
333 delete fhJetPT ;// new TH1F("hJetPT","P_{T} Distribution",200,0,200);
334 delete fhPartonPT ;// new TH1F("hPartonPT","Parton P_{T} Distribution",200,0,1);
335 delete fhJetPT2 ;// new TH1F("hJetPT","P_{T} Distribution",200,0,200);
336 delete fhPartonPT2 ;// new TH1F("hPartonPT","Parton P_{T} Distribution",200,0,1);
337 delete fhRecoBinFragmFcn;//new TH1F("fhRecoBinFragmFcn","Reconstructed Frag. Fcn",100,0,1);
338 delete fhRecoBinFragmFcnNoBg;//new TH1F("fhRecoBinFragmFcn","Reconstructed Frag. Fcn",100,0,1);
339 delete fhRecoBinPartonFragmFcn;// new TH1F("fhRecoBinPartonFragmFcn","Input Bin Fragm Fcn Distribution",100,0,1);
340 delete fhJetInvE;// = new TH1F("fhJetInvE","#frac{1}{E_{R}}",100,0,1);
341 delete fhJetInvE2;// = new TH1F("fhJetInvE","#frac{1}{E_{R}}",100,0,1);
345 void AliEMCALJetFinderPlots::FillFromOutput(AliEMCALJetFinderOutput* output, Float_t weight)
347 // Fill histograms from an output object
348 if (!fInitialised) InitPlots();
350 if (!fOutput) return;
351 // Make some temporary histograms to make sure we subtract
352 // background properly
354 tempFragmFcnNoBg =new TH1F("tempFragmFcnNoBg","Reconstructed Frag. Fcn With Background Removed",200,0,2);
355 tempPtNoBg =new TH1F("tempPtNoBg","Reconstructed Frag. Fcn With Background Removed",200,0,200);
356 tempFragmFcnNoBg->Fill(count/(jethighest->Energy()*fScaleFactor),-fhBackHisto->GetBinContent(count));
357 tempPtNoBg->AddBinContent(count,-fhBackHisto->GetBinContent(count));
360 fhNJets->Fill(fOutput->GetNJets());
361 Bool_t doesJetMeetBinCriteria = 0;
362 AliEMCALJet* jethighest=0;
363 AliEMCALJet* jetsecond=0;
364 // Find Highest and Second Highest Jet
365 // (NB!!!!!!!) Pointing into the EMCAL!!!!!!
367 // =========================== All cases ===================================
370 // I will make a little array of jet indices for which jets are in
371 // the EMCAL then my counter can loop from 0 below - but it will
372 // be the index of the array of applicable jets
377 for (Int_t appc=0;appc<fOutput->GetNJets();appc++)
378 { // Check all jets for applicability
379 Float_t eta = fOutput->GetJet(appc)->Eta();
380 Float_t phi = fOutput->GetJet(appc)->Phi();
381 if (eta > -0.7 && eta < 0.7 && phi > 1./3.*TMath::Pi() && phi < TMath::Pi())
382 { // Then jet is applicable
383 appjet[numappjet]=appc;
392 Float_t theta = 2.0*atan(exp(-fOutput->GetParton(0)->Eta()));
393 et = fOutput->GetParton(0)->Energy() * TMath::Sin(theta);
394 if (fOutput->GetNJets()>1)
396 for (Int_t counter = 0; counter<numappjet;counter++)
400 jethighest = fOutput->GetJet(appjet[0]);
401 jetsecond = fOutput->GetJet(appjet[1]);
405 Float_t energyhighest = jethighest->Energy();
406 Float_t energysecond = jetsecond->Energy();
408 if ((fOutput->GetJet(appjet[counter]))->Energy()>energyhighest)
410 jetsecond=jethighest;
411 jethighest=fOutput->GetJet(appjet[counter]);
412 }else if ((fOutput->GetJet(appjet[counter]))->Energy()>energysecond)
414 jetsecond=fOutput->GetJet(appjet[counter]);
421 Float_t eta = fOutput->GetJet(0)->Eta();
422 Float_t phi = fOutput->GetJet(0)->Phi();
423 if (eta > -0.7 && eta < 0.7 && phi > 1./3.*TMath::Pi() && phi < TMath::Pi())
424 { // Then jet is applicable
425 jethighest=fOutput->GetJet(0);
429 Error("FillFromOutput","There is only one jet and it isn't in the area of applicability");
433 if ( 95.0 < jethighest->Energy()*fScaleFactor && jethighest->Energy()*fScaleFactor < 105.0 )
435 doesJetMeetBinCriteria = 1;
436 fhRecoBinJetEt->Fill(jethighest->Energy()*fScaleFactor,weight);
437 fhRecoBinInputJetEt->Fill(et,weight);
439 fhInputOutput->Fill(et,jethighest->Energy());
445 //========================= CASE 2 ===========================
446 Int_t nPartons = fOutput->GetNPartons();
447 fhNJets2->Fill(fOutput->GetNJets());
448 AliEMCALParton* parton;
450 // End finding highest and second highest and continue
451 fhJetEt2->Fill(jethighest->Energy()*fScaleFactor,weight);
452 fhJetEtDiff2->Fill(jethighest->Energy()*fScaleFactor-et,weight);
453 fhJetInvE2->Fill(1.0/(jethighest->Energy()*fScaleFactor),weight);
454 fhJetEta2->Fill(jethighest->Eta(),weight );
455 fhJetPhi2->Fill(jethighest->Phi(),weight );
456 if (nPartons ==0) return;
457 parton = fOutput->GetParton(0);
459 fhPartonEta2->Fill( parton->Eta(),weight );
460 fhPartonPhi2->Fill( parton->Phi(),weight );
462 //hJetEtDiff->Fill( jet->Energy() - parton->Energy() );
463 fhEtaDiff2->Fill( jethighest->Eta() - parton->Eta(),weight );
464 fhPhiDiff2->Fill( jethighest->Phi() - parton->Phi(),weight );
465 fhEtaPhiSpread2->Fill(jethighest->Eta()-parton->Eta(),jethighest->Phi() - parton->Phi());
466 fhJetEtSecond2->Fill(jetsecond->Energy()*fScaleFactor,weight);
467 fhJetEtRatio2->Fill(jetsecond->Energy()/jethighest->Energy(),weight);
468 fhEtaPhiDist2->Fill( TMath::Sqrt((jethighest->Eta() - jetsecond->Eta())*(jethighest->Eta() - jetsecond->Eta())
469 + (jethighest->Phi() - jetsecond->Phi())*(jethighest->Phi() - jetsecond->Phi()) ),weight);
471 Float_t *pt,*phi,*eta;
473 pt = new Float_t[parton->GetNTracks()];
474 eta = new Float_t[parton->GetNTracks()];
475 phi = new Float_t[parton->GetNTracks()];
476 pdg = new Int_t[parton->GetNTracks()];*/
485 parton->GetTrackList(pt,eta,phi,pdg);
486 for(Int_t iT=0; iT< parton->GetNTracks() ; iT++ )
488 if ( (eta[iT]-parton->Eta())*(eta[iT]-parton->Eta())+
489 (phi[iT]-parton->Phi())*(phi[iT]-parton->Phi()) >fConeRadius * fConeRadius ) continue;
490 Double_t tt = 2.0*atan(exp(-eta[iT])); // These names are short to make the equation manageable
491 Double_t rt = 2.0*atan(exp(-parton->Eta()));
492 Double_t ctt = cos(tt);
493 Double_t crt = cos(rt);
494 Double_t stt = sin(tt);
495 Double_t srt = sin(rt);
496 Double_t ctp = cos(phi[iT]);
497 Double_t crp = cos(parton->Phi());
498 Double_t stp = sin(phi[iT]);
499 Double_t srp = sin(parton->Phi());
500 //Double_t alpha = acos(crp*ctp*srt*stt+srp*stp*srt*stt+crt*ctt);
502 if (TMath::Abs(crp*ctp*srt*stt+srp*stp*srt*stt+crt*ctt) > 0.9990)
507 alpha = TMath::ACos(crp*ctp*srt*stt+srp*stp*srt*stt+crt*ctt);
509 Double_t correctp = pt[iT]/stt;
510 fhPartonPL2->Fill( correctp*cos(alpha),weight);
511 if ( (parton->Eta()-eta[iT])*(parton->Eta()-eta[iT]) +
512 (parton->Phi()-phi[iT])*(parton->Phi()-phi[iT]) < 0.2*0.2 )
513 fhPartonJT2->Fill( correctp*sin(alpha),weight);
514 fhPartonPT2->Fill(correctp*sin(tt),weight);
515 if (fNominalEnergy == 0.0) {
516 fhPartonFragmFcn2->Fill( correctp*sin(tt)/parton->Energy(),weight );
519 fhPartonFragmFcn2->Fill(correctp*sin(tt)/fNominalEnergy,weight);
521 if (doesJetMeetBinCriteria)
523 fhRecoBinPartonPt->Fill(correctp*sin(tt),weight); // ("fhRecoBinPt","Reconstructed Pt Distribution",100,0,1);
528 pt = new Float_t[jet->NTracks()];
529 eta = new Float_t[jet->NTracks()];
530 phi = new Float_t[jet->NTracks()];
531 pdg = new Int_t[jet->NTracks()];*/
532 jethighest->TrackList(pt,eta,phi,pdg);
533 for(Int_t iT=0; iT< jethighest->NTracks() ; iT++ )
535 Double_t tt = 2.0*atan(exp(-eta[iT])); // These names are short to make the equation manageable
536 Double_t rt = 2.0*atan(exp(-jethighest->Eta()));
537 Double_t ctt = cos(tt);
538 Double_t crt = cos(rt);
539 Double_t stt = sin(tt);
540 Double_t srt = sin(rt);
541 Double_t ctp = cos(phi[iT]);
542 Double_t crp = cos(jethighest->Phi());
543 Double_t stp = sin(phi[iT]);
544 Double_t srp = sin(jethighest->Phi());
545 // Double_t alpha = acos(crp*ctp*srt*stt+srp*stp*srt*stt+crt*ctt);
547 if (TMath::Abs(crp*ctp*srt*stt+srp*stp*srt*stt+crt*ctt) > 0.9990)
552 alpha = TMath::ACos(crp*ctp*srt*stt+srp*stp*srt*stt+crt*ctt);
554 Double_t correctp = pt[iT]/stt;
555 fhJetPL2->Fill( correctp*cos(alpha),weight);
556 if ( (jethighest->Eta()-eta[iT])*(jethighest->Eta()-eta[iT]) +
557 (jethighest->Phi()-phi[iT])*(jethighest->Phi()-phi[iT]) < 0.2*0.2 )
558 fhJetJT2->Fill( correctp*sin(alpha),weight);
559 fhJetPT2->Fill(correctp*sin(tt),weight);
560 if (fNominalEnergy==0.0){
561 fhFragmFcn2->Fill( correctp*sin(tt)/(jethighest->Energy()*fScaleFactor),weight );
564 fhFragmFcn2->Fill( correctp*sin(tt)/fNominalEnergy,weight );
566 if (doesJetMeetBinCriteria)
568 fhRecoBinPt->Fill(correctp*sin(tt),weight); // ("fhRecoBinPt","Reconstructed Pt Distribution",100,0,1);
569 fhRecoBinPtNoBg->Fill(correctp*sin(tt),weight); // ("fhRecoBinPt","Reconstructed Pt Distribution",100,0,1);
570 fhRecoBinFragmFcn->Fill( correctp*sin(tt)/(jethighest->Energy()*fScaleFactor),weight ); // This is the jet fragmentation function
571 fhRecoBinFragmFcnNoBg->Fill( correctp*sin(tt)/(jethighest->Energy()*fScaleFactor),weight ); // This is the jet fragmentation function
579 //========================= CASE 1 ===========================
580 Int_t nPartons = fOutput->GetNPartons();
581 if (fOutput->GetNJets()!=1) return;
582 AliEMCALParton* parton;
584 jet = jethighest;//fOutput->GetJet(0);
585 fhJetEt->Fill(jet->Energy()*fScaleFactor,weight);
586 fhJetEtDiff->Fill(jethighest->Energy()*fScaleFactor-et,weight);
587 fhJetInvE->Fill(1.0/(jethighest->Energy()*fScaleFactor),weight);
588 fhJetEta->Fill(jet->Eta(),weight );
589 fhJetPhi->Fill(jet->Phi(),weight );
590 if (nPartons ==0) return;
591 parton = fOutput->GetParton(0);
593 fhPartonEta->Fill( parton->Eta(),weight );
594 fhPartonPhi->Fill( parton->Phi(),weight );
596 //hJetEtDiff->Fill( jet->Energy() - parton->Energy() );
597 fhEtaDiff->Fill( jet->Eta() - parton->Eta(),weight );
598 fhPhiDiff->Fill( jet->Phi() - parton->Phi(),weight );
599 fhEtaPhiSpread->Fill(jet->Eta()-parton->Eta(),jet->Phi() - parton->Phi());
601 Float_t *pt,*phi,*eta;
603 pt = new Float_t[parton->GetNTracks()];
604 eta = new Float_t[parton->GetNTracks()];
605 phi = new Float_t[parton->GetNTracks()];
606 pdg = new Int_t[parton->GetNTracks()];*/
615 parton->GetTrackList(pt,eta,phi,pdg);
616 for(Int_t iT=0; iT< parton->GetNTracks() ; iT++ )
618 if ( (eta[iT]-parton->Eta())*(eta[iT]-parton->Eta())+
619 (phi[iT]-parton->Phi())*(phi[iT]-parton->Phi()) >fConeRadius * fConeRadius ) continue;
620 Double_t tt = 2.0*atan(exp(-eta[iT])); // These names are short to make the equation manageable
621 Double_t rt = 2.0*atan(exp(-parton->Eta()));
622 Double_t ctt = cos(tt);
623 Double_t crt = cos(rt);
624 Double_t stt = sin(tt);
625 Double_t srt = sin(rt);
626 Double_t ctp = cos(phi[iT]);
627 Double_t crp = cos(parton->Phi());
628 Double_t stp = sin(phi[iT]);
629 Double_t srp = sin(parton->Phi());
630 // Double_t alpha = acos(crp*ctp*srt*stt+srp*stp*srt*stt+crt*ctt);
632 if (TMath::Abs(crp*ctp*srt*stt+srp*stp*srt*stt+crt*ctt) > 0.9990)
637 alpha = TMath::ACos(crp*ctp*srt*stt+srp*stp*srt*stt+crt*ctt); }
638 Double_t correctp = pt[iT]/stt;
639 fhPartonPL->Fill( correctp*cos(alpha),weight);
640 if ( (parton->Eta()-eta[iT])*(parton->Eta()-eta[iT]) +
641 (parton->Phi()-phi[iT])*(parton->Phi()-phi[iT]) < 0.2*0.2 )
642 fhPartonJT->Fill( correctp*sin(alpha),weight);
643 if (fNominalEnergy == 0.0) {
644 fhPartonFragmFcn->Fill( correctp*sin(tt)/parton->Energy(),weight );
645 fhPartonPT->Fill(correctp*sin(tt),weight);
648 fhPartonFragmFcn->Fill(correctp*sin(tt)/fNominalEnergy,weight);
650 if (doesJetMeetBinCriteria)
652 fhRecoBinPartonPt->Fill(correctp*sin(tt),weight); // ("fhRecoBinPt","Reconstructed Pt Distribution",100,0,1);
657 pt = new Float_t[jet->NTracks()];
658 eta = new Float_t[jet->NTracks()];
659 phi = new Float_t[jet->NTracks()];
660 pdg = new Int_t[jet->NTracks()];*/
661 jet->TrackList(pt,eta,phi,pdg);
662 for(Int_t iT=0; iT< jet->NTracks() ; iT++ )
664 Double_t tt = 2.0*atan(exp(-eta[iT])); // These names are short to make the equation manageable
665 Double_t rt = 2.0*atan(exp(-jet->Eta()));
666 Double_t ctt = cos(tt);
667 Double_t crt = cos(rt);
668 Double_t stt = sin(tt);
669 Double_t srt = sin(rt);
670 Double_t ctp = cos(phi[iT]);
671 Double_t crp = cos(jet->Phi());
672 Double_t stp = sin(phi[iT]);
673 Double_t srp = sin(jet->Phi());
674 //Info("plots","acos(%1.16f)\nstt=%f\npt=%f",crp*ctp*srt*stt+srp*stp*srt*stt+crt*ctt,stt,pt[iT]);
675 //Info("plots","diff to 1 %f",1.0-crp*ctp*srt*stt+srp*stp*srt*stt+crt*ctt);
677 if (TMath::Abs(crp*ctp*srt*stt+srp*stp*srt*stt+crt*ctt) > 0.9990)
682 alpha = TMath::ACos(crp*ctp*srt*stt+srp*stp*srt*stt+crt*ctt);
684 Double_t correctp = pt[iT]/stt;
685 fhJetPL->Fill( correctp*cos(alpha),weight);
686 if ( (jet->Eta()-eta[iT])*(jet->Eta()-eta[iT]) +
687 (jet->Phi()-phi[iT])*(jet->Phi()-phi[iT]) < 0.2*0.2 )
688 fhJetJT->Fill( correctp*sin(alpha),weight);
689 fhJetPT->Fill(correctp*sin(tt),weight);
690 if (fNominalEnergy==0.0){
691 fhFragmFcn->Fill( correctp*sin(tt)/(jet->Energy()*fScaleFactor),weight ); // This is the jet fragmentation function
694 fhFragmFcn->Fill( correctp*sin(tt)/fNominalEnergy,weight );
696 if (doesJetMeetBinCriteria)
698 fhRecoBinPt->Fill(correctp*sin(tt),weight); // ("fhRecoBinPt","Reconstructed Pt Distribution",100,0,1);
699 fhRecoBinPtNoBg->Fill(correctp*sin(tt),weight); // ("fhRecoBinPt","Reconstructed Pt Distribution",100,0,1);
700 fhRecoBinFragmFcn->Fill( correctp*sin(tt)/(jet->Energy()*fScaleFactor),weight ); // This is the jet fragmentation function
701 fhRecoBinFragmFcnNoBg->Fill( correctp*sin(tt)/(jet->Energy()*fScaleFactor),weight ); // This is the jet fragmentation function
706 if (numappjet>=1 && fhBackHisto != 0 && doesJetMeetBinCriteria)
708 for (Int_t count=1;count<=100;count++)
710 fhRecoBinFragmFcnNoBg->Fill( ((Float_t)count)/(jethighest->Energy()*fScaleFactor),-fhBackHisto->GetBinContent(count)*weight);
711 fhRecoBinPtNoBg->AddBinContent(count,-fhBackHisto->GetBinContent(count)*weight);