]>
Commit | Line | Data |
---|---|---|
f7d5860b | 1 | |
2 | /************************************************************************** | |
3 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * * | |
5 | * Author: The ALICE Off-line Project. * | |
6 | * Contributors are mentioned in the code where appropriate. * | |
7 | * * | |
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 | **************************************************************************/ | |
16 | ||
17 | ||
ee6b678f | 18 | /* $Id$ */ |
f7d5860b | 19 | |
20 | //_________________________________________________________________________ | |
21 | // Class for Filling JetFinder Plots | |
22 | // | |
23 | //*-- Author: Mark Horner (LBL/UCT) | |
24 | // | |
25 | // | |
26 | ||
27 | ||
28 | #include "TMath.h" | |
29 | #include "AliEMCALJetFinderPlots.h" | |
30 | ||
31 | ClassImp(AliEMCALJetFinderPlots) | |
32 | ||
33 | AliEMCALJetFinderPlots::AliEMCALJetFinderPlots() | |
34 | { | |
35 | fInitialised = kFALSE; | |
36 | fNominalEnergy = 0.0; | |
37 | fConeRadius = 0.5; | |
38 | } | |
39 | ||
40 | void AliEMCALJetFinderPlots::InitPlots() | |
41 | { | |
42 | ||
43 | hFragmFcn = new TH1F("hFragmFcn","Fragmentation Function",100,0,1); | |
44 | hFragmFcn->Sumw2(); | |
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.); | |
48 | hPartonJT->Sumw2(); | |
49 | hPartonPL = new TH1F("hPartonPL","Track Momentum Parallel to Parton Axis ",100,0.,100.); | |
50 | hPartonPL->Sumw2(); | |
51 | hJetJT = new TH1F("hJetJT","Track Momentum Perpendicular to Jet Axis",100,0.,10.); | |
52 | hJetJT->Sumw2(); | |
53 | hJetPL = new TH1F("hJetPL","Track Momentum Parallel to Jet Axis ",100,0.,100.); | |
54 | hJetPL->Sumw2(); | |
55 | hJetEt = new TH1F("hJetEt","E_{T}^{reco}",250,0.,250.); | |
56 | hJetEt->Sumw2(); | |
57 | hJetEta = new TH1F("hJetEta","#eta_{jet}^{reco}",180,-0.9,0.9); | |
58 | hJetEta->Sumw2(); | |
59 | hJetPhi = new TH1F("hJetPhi","#phi_{jet}^{reco}",62,0.,3.1); | |
60 | hJetPhi->Sumw2(); | |
61 | hPartonEta = new TH1F("hPartonEta","#eta_{Parton}",180,-0.9,0.9); | |
62 | hPartonEta->Sumw2(); | |
63 | hPartonPhi = new TH1F("hPartonPhi","#phi_{Parton}",62,0.,3.1); | |
64 | hPartonPhi->Sumw2(); | |
65 | hEtaDiff = new TH1F("hEtaDiff","#eta_{jet}^{reco}-#eta_{jet}^{input}",100,-0.5,0.5); | |
66 | hEtaDiff->Sumw2(); | |
67 | hPhiDiff = new TH1F("hPhiDiff","#phi_{jet}^{reco}-#phi_{jet}^{input}",100,-0.5,0.5); | |
68 | hPhiDiff->Sumw2(); | |
69 | hNJets = new TH1F("hNJets","N Reconstructed jets",11,-0.5,10.5); | |
70 | hNJets->Sumw2(); | |
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}"); | |
75 | ||
76 | //Jet properties | |
77 | hJetEt->SetFillColor(16); | |
78 | hJetEt->SetXTitle("E_{T}^{reco}"); | |
79 | ||
80 | hJetEta->SetFillColor(16); | |
81 | hJetEta->SetXTitle("#eta_{jet}^{reco}"); | |
82 | ||
83 | hJetPhi->SetFillColor(16); | |
84 | hJetPhi->SetXTitle("#phi_{jet}^{reco}"); | |
85 | ||
86 | hPartonEta->SetFillColor(16); | |
87 | hPartonEta->SetXTitle("#eta_{parton}"); | |
88 | ||
89 | hPartonPhi->SetFillColor(16); | |
90 | hPartonPhi->SetXTitle("#phi_{parton}"); | |
91 | ||
92 | hPartonPL->SetXTitle("p (GeV/c)"); | |
93 | hPartonJT->SetXTitle("p (GeV/c)"); | |
94 | ||
95 | hPartonFragmFcn->SetXTitle("Z = p_{T}^{Chg}/E_{T}^{parton}"); | |
96 | ||
97 | //Jet component properties | |
98 | ||
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}"); | |
103 | ||
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; | |
109 | ||
110 | } | |
111 | ||
112 | AliEMCALJetFinderPlots::~AliEMCALJetFinderPlots(){ | |
113 | ||
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; | |
128 | } | |
129 | ||
130 | void AliEMCALJetFinderPlots::FillFromOutput(AliEMCALJetFinderOutput* output) | |
131 | { | |
132 | if (!fInitialised) InitPlots(); | |
133 | fOutput = output; | |
134 | ||
135 | Int_t nPartons = fOutput->GetNPartons(); | |
136 | hNJets->Fill(fOutput->GetNJets()); | |
137 | if (fOutput->GetNJets()!=1) return; | |
138 | AliEMCALParton* parton; | |
139 | AliEMCALJet* jet; | |
140 | jet = fOutput->GetJet(0); | |
141 | ||
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() ); | |
149 | ||
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()); | |
154 | /* | |
155 | Float_t *pt,*phi,*eta; | |
156 | Int_t *pdg; | |
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()];*/ | |
161 | ||
162 | ||
163 | ||
164 | Float_t pt[2000]; | |
165 | Float_t eta[2000]; | |
166 | Float_t phi[2000]; | |
167 | Int_t pdg[2000]; | |
168 | ||
169 | parton->GetTrackList(pt,eta,phi,pdg); | |
170 | for(Int_t iT=0; iT< parton->GetNTracks() ; iT++ ) | |
171 | { | |
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() ); | |
192 | }else | |
193 | { | |
194 | hPartonFragmFcn->Fill(correctp*sin(tt)/fNominalEnergy); | |
195 | } | |
196 | }// loop over tracks | |
197 | ||
198 | /* | |
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++ ) | |
205 | { | |
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() ); | |
224 | } else | |
225 | { | |
226 | hFragmFcn->Fill( correctp*sin(tt)/fNominalEnergy ); | |
227 | } | |
228 | }// loop over tracks | |
229 | ||
230 | } | |
231 | ||
232 | ||
233 |