2 /**************************************************************************
3 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * Author: The ALICE Off-line Project. *
6 * Contributors are mentioned in the code where appropriate. *
8 * Permission to use, copy, modify and distribute this software and its *
9 * documentation strictly for non-commercial purposes is hereby granted *
10 * without fee, provided that the above copyright notice appears in all *
11 * copies and that both the copyright notice and this permission notice *
12 * appear in the supporting documentation. The authors make no claims *
13 * about the suitability of this software for any purpose. It is *
14 * provided "as is" without express or implied warranty. *
15 **************************************************************************/
20 //_________________________________________________________________________
21 // Class for Filling JetFinder Plots
23 //*-- Author: Mark Horner (LBL/UCT)
29 #include "AliEMCALJetFinderPlots.h"
31 ClassImp(AliEMCALJetFinderPlots)
33 AliEMCALJetFinderPlots::AliEMCALJetFinderPlots()
35 fInitialised = kFALSE;
40 void AliEMCALJetFinderPlots::InitPlots()
43 hFragmFcn = new TH1F("hFragmFcn","Fragmentation Function",100,0,1);
45 hPartonFragmFcn = new TH1F("hPartonFragmFcn","Parton Fragmentation Function",100,0,1);
46 hPartonFragmFcn->Sumw2();
47 hPartonJT = new TH1F("hPartonJT","Track Momentum Perpendicular to Parton Axis",100,0.,10.);
49 hPartonPL = new TH1F("hPartonPL","Track Momentum Parallel to Parton Axis ",100,0.,100.);
51 hJetJT = new TH1F("hJetJT","Track Momentum Perpendicular to Jet Axis",100,0.,10.);
53 hJetPL = new TH1F("hJetPL","Track Momentum Parallel to Jet Axis ",100,0.,100.);
55 hJetEt = new TH1F("hJetEt","E_{T}^{reco}",250,0.,250.);
57 hJetEta = new TH1F("hJetEta","#eta_{jet}^{reco}",180,-0.9,0.9);
59 hJetPhi = new TH1F("hJetPhi","#phi_{jet}^{reco}",62,0.,3.1);
61 hPartonEta = new TH1F("hPartonEta","#eta_{Parton}",180,-0.9,0.9);
63 hPartonPhi = new TH1F("hPartonPhi","#phi_{Parton}",62,0.,3.1);
65 hEtaDiff = new TH1F("hEtaDiff","#eta_{jet}^{reco}-#eta_{jet}^{input}",100,-0.5,0.5);
67 hPhiDiff = new TH1F("hPhiDiff","#phi_{jet}^{reco}-#phi_{jet}^{input}",100,-0.5,0.5);
69 hNJets = new TH1F("hNJets","N Reconstructed jets",11,-0.5,10.5);
71 hEtaPhiSpread = new TH2F("hEtaPhiSpread","#eta - #phi Distribution of Reconstructed Jets",100,-0.5,0.5,100,-0.5,0.5);
72 hEtaPhiSpread->Sumw2();
73 hNJets->SetXTitle("N_{jets}^{reco}/event");
74 hNJets->SetYTitle("N_{events}");
77 hJetEt->SetFillColor(16);
78 hJetEt->SetXTitle("E_{T}^{reco}");
80 hJetEta->SetFillColor(16);
81 hJetEta->SetXTitle("#eta_{jet}^{reco}");
83 hJetPhi->SetFillColor(16);
84 hJetPhi->SetXTitle("#phi_{jet}^{reco}");
86 hPartonEta->SetFillColor(16);
87 hPartonEta->SetXTitle("#eta_{parton}");
89 hPartonPhi->SetFillColor(16);
90 hPartonPhi->SetXTitle("#phi_{parton}");
92 hPartonPL->SetXTitle("p (GeV/c)");
93 hPartonJT->SetXTitle("p (GeV/c)");
95 hPartonFragmFcn->SetXTitle("Z = p_{T}^{Chg}/E_{T}^{parton}");
97 //Jet component properties
99 hJetPL->SetXTitle("p (GeV/c)");
100 hJetJT->SetXTitle("p (GeV/c)");
101 hFragmFcn->SetXTitle("Z = p_{T}^{Chg}/E_{T}^{reco}");
102 hPartonFragmFcn->SetXTitle("Z = p_{T}^{Chg}/E_{T}^{reco}");
104 hEtaDiff->SetXTitle("#eta_{jet}^{reco}-#eta_{jet}^{input}");
105 hPhiDiff->SetXTitle("#phi_{jet}^{reco}-#phi_{jet}^{input}");
106 hEtaPhiSpread->SetXTitle("#eta");
107 hEtaPhiSpread->SetYTitle("#phi");
108 fInitialised = kTRUE;
112 AliEMCALJetFinderPlots::~AliEMCALJetFinderPlots(){
114 delete hFragmFcn;// = new TH1F("hFragmFcn","Fragmentation Function",100,0,1);
115 delete hPartonJT;// = new TH1F("hPartonJT","Track Momentum Perpendicular to Parton Axis",100,0.,10.);
116 delete hPartonPL;// = new TH1F("hPartonPL","Track Momentum Parallel to Parton Axis ",100,0.,100.);
117 delete hJetJT;// = new TH1F("hJetJT","Track Momentum Perpendicular to Jet Axis",100,0.,10.);
118 delete hJetPL;// = new TH1F("hJetPL","Track Momentum Parallel to Jet Axis ",100,0.,100.);
119 delete hJetEt;// = new TH1F("hJetEt","E_{T}^{reco}",250,0.,250.);
120 delete hJetEta;// = new TH1F("hJetEta","#eta_{jet}^{reco}",180,-0.9,0.9);
121 delete hJetPhi;// = new TH1F("hJetPhi","#phi_{jet}^{reco}",62,0.,3.1);
122 delete hPartonEta;// = new TH1F("hPartonEta","#eta_{Parton}",180,-0.9,0.9);
123 delete hPartonPhi;// = new TH1F("hPartonPhi","#phi_{Parton}",62,0.,3.1);
124 delete hEtaDiff;// = new TH1F("hEtaDiff","#eta_{jet}^{reco}-#eta_{jet}^{input}",100,-0.5,0.5);
125 delete hPhiDiff;// = new TH1F("hPhiDiff","#phi_{jet}^{reco}-#phi_{jet}^{input}",100,-0.5,0.5);
126 delete hNJets;// = new TH1F("hNJets","N Reconstructed jets",11,-0.5,10.5);
127 delete hEtaPhiSpread;
130 void AliEMCALJetFinderPlots::FillFromOutput(AliEMCALJetFinderOutput* output)
132 if (!fInitialised) InitPlots();
135 Int_t nPartons = fOutput->GetNPartons();
136 hNJets->Fill(fOutput->GetNJets());
137 if (fOutput->GetNJets()!=1) return;
138 AliEMCALParton* parton;
140 jet = fOutput->GetJet(0);
142 hJetEt->Fill(jet->Energy());
143 hJetEta->Fill(jet->Eta() );
144 hJetPhi->Fill(jet->Phi() );
145 if (nPartons ==0) return;
146 parton = fOutput->GetParton(0);
147 hPartonEta->Fill( parton->Eta() );
148 hPartonPhi->Fill( parton->Phi() );
150 //hJetEtDiff->Fill( jet->Energy() - parton->Energy() );
151 hEtaDiff->Fill( jet->Eta() - parton->Eta() );
152 hPhiDiff->Fill( jet->Phi() - parton->Phi() );
153 hEtaPhiSpread->Fill(jet->Eta()-parton->Eta(),jet->Phi() - parton->Phi());
155 Float_t *pt,*phi,*eta;
157 pt = new Float_t[parton->GetNTracks()];
158 eta = new Float_t[parton->GetNTracks()];
159 phi = new Float_t[parton->GetNTracks()];
160 pdg = new Int_t[parton->GetNTracks()];*/
169 parton->GetTrackList(pt,eta,phi,pdg);
170 for(Int_t iT=0; iT< parton->GetNTracks() ; iT++ )
172 if ( (eta[iT]-parton->Eta())*(eta[iT]-parton->Eta())+
173 (phi[iT]-parton->Phi())*(phi[iT]-parton->Phi()) >fConeRadius * fConeRadius ) continue;
174 Double_t tt = 2.0*atan(exp(-eta[iT])); // These names are short to make the equation manageable
175 Double_t rt = 2.0*atan(exp(-parton->Eta()));
176 Double_t ctt = cos(tt);
177 Double_t crt = cos(rt);
178 Double_t stt = sin(tt);
179 Double_t srt = sin(rt);
180 Double_t ctp = cos(phi[iT]);
181 Double_t crp = cos(parton->Phi());
182 Double_t stp = sin(phi[iT]);
183 Double_t srp = sin(parton->Phi());
184 Double_t alpha = acos(crp*ctp*srt*stt+srp*stp*srt*stt+crt*ctt);
185 Double_t correctp = pt[iT]/stt;
186 hPartonPL->Fill( correctp*cos(alpha));
187 if ( (parton->Eta()-eta[iT])*(parton->Eta()-eta[iT]) +
188 (parton->Phi()-phi[iT])*(parton->Phi()-phi[iT]) < 0.2*0.2 )
189 hPartonJT->Fill( correctp*sin(alpha));
190 if (fNominalEnergy == 0.0) {
191 hPartonFragmFcn->Fill( correctp*sin(tt)/parton->Energy() );
194 hPartonFragmFcn->Fill(correctp*sin(tt)/fNominalEnergy);
199 pt = new Float_t[jet->NTracks()];
200 eta = new Float_t[jet->NTracks()];
201 phi = new Float_t[jet->NTracks()];
202 pdg = new Int_t[jet->NTracks()];*/
203 jet->TrackList(pt,eta,phi,pdg);
204 for(Int_t iT=0; iT< jet->NTracks() ; iT++ )
206 Double_t tt = 2.0*atan(exp(-eta[iT])); // These names are short to make the equation manageable
207 Double_t rt = 2.0*atan(exp(-jet->Eta()));
208 Double_t ctt = cos(tt);
209 Double_t crt = cos(rt);
210 Double_t stt = sin(tt);
211 Double_t srt = sin(rt);
212 Double_t ctp = cos(phi[iT]);
213 Double_t crp = cos(jet->Phi());
214 Double_t stp = sin(phi[iT]);
215 Double_t srp = sin(jet->Phi());
216 Double_t alpha = acos(crp*ctp*srt*stt+srp*stp*srt*stt+crt*ctt);
217 Double_t correctp = pt[iT]/stt;
218 hJetPL->Fill( correctp*cos(alpha));
219 if ( (jet->Eta()-eta[iT])*(jet->Eta()-eta[iT]) +
220 (jet->Phi()-phi[iT])*(jet->Phi()-phi[iT]) < 0.2*0.2 )
221 hJetJT->Fill( correctp*sin(alpha));
222 if (fNominalEnergy==0.0){
223 hFragmFcn->Fill( correctp*sin(tt)/parton->Energy() );
226 hFragmFcn->Fill( correctp*sin(tt)/fNominalEnergy );