Belle II Software development
EffPlotsModule.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#include <tracking/modules/trackingPerformanceEvaluation/EffPlotsModule.h>
10
11#include <framework/datastore/RelationVector.h>
12
13#include <framework/geometry/BFieldManager.h>
14
15#include <framework/gearbox/Const.h>
16
17#include <tracking/dataobjects/MCParticleInfo.h>
18#include <tracking/dataobjects/RecoTrack.h>
19#include <tracking/dataobjects/V0ValidationVertex.h>
20
21#include <root/TObject.h>
22
23#include <vector>
24
25using namespace Belle2;
26
27//-----------------------------------------------------------------
28// Register the Module
29//-----------------------------------------------------------------
30
31REG_MODULE(EffPlots);
32
34 Module()
35{
36
37 setDescription("This module makes some plots related to V0 and saves them into a root file. For the efficiency plots: _noGeoAcc -> normalized to MCParticles; _withGeoAcc -> normalized to RecoTracks.");
38
39 addParam("outputFileName", m_rootFileName, "Name of output root file.",
40 std::string("EffPlots_output.root"));
41 addParam("V0sName", m_V0sName, "Name of V0 collection.", std::string("V0ValidationVertexs"));
42 addParam("MCParticlesName", m_MCParticlesName, "Name of MC Particle collection.", std::string(""));
43 addParam("TrackColName", m_TrackColName,
44 "Belle2::Track collection name (input). Note that the V0s use "
45 "pointers indices into these arrays, so all hell may break loose "
46 "if you change this.", std::string(""));
47 addParam("RecoTracksName", m_RecoTracksName, "Name of RecoTrack collection.", std::string("RecoTracks"));
48 addParam("MCRecoTracksName", m_MCRecoTracksName, "Name of MCRecoTrack collection.", std::string("MCRecoTracks"));
49
50 addParam("V0sType", m_V0sType, "Type of V0 to perform plots. Default is Lambda0, alternatively Ks", std::string("Lambda0"));
51 addParam("AllHistograms", m_allHistograms, "Create output for all histograms, not only efficiencies.", bool(false));
52 addParam("GeometricalAccettance", m_geometricalAccettance, "Create output for geometrical accettance.", bool(false));
53}
54
56{
57
58}
59
61{
63 StoreArray<V0ValidationVertex> v0ValidationVertices;
64 v0ValidationVertices.isRequired(m_V0sName);
65
67 trackFitResults.isRequired();
68
70 tracks.isRequired();
71
72 StoreArray<RecoTrack> recoTracks;
74
75 //create list of histograms to be saved in the rootfile
76 m_histoList = new TList;
77 m_histoList_MCParticles = new TList;
78 m_histoList_RecoTracks = new TList;
79 m_histoList_Tracks = new TList;
80 m_histoList_Efficiencies = new TList;
81 m_histoList_GA = new TList;
82 m_histoList_check = new TList;
83
84 //set the ROOT File
85 m_rootFilePtr = new TFile(m_rootFileName.c_str(), "RECREATE");
86
87 Double_t bins_pt_new[25 + 1] = {0., 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 1.2, 1.4, 1.6, 1.8, 2, 2.2, 2.4, 2.6, 2.8, 3., 3.2, 3.4};
88
89 Double_t bins_theta[10 + 1];
90 Double_t width_theta = TMath::Pi() / 10;
91 for (unsigned int bin = 0; bin < 10 + 1; bin++)
92 bins_theta[bin] = bin * width_theta;
93
94 Double_t bins_phi[14 + 1];
95 Double_t width_phi = 2 * TMath::Pi() / 14;
96 for (unsigned int bin = 0; bin < 14 + 1; bin++)
97 bins_phi[bin] = - TMath::Pi() + bin * width_phi;
98
99 Double_t bins_costheta[20 + 1];
100 Double_t width_cosTheta = 2. / 20;
101 for (unsigned int bin1 = 0; bin1 < 20 + 1; bin1++)
102 bins_costheta[bin1] = - 1 + bin1 * width_cosTheta;
103
104 //create histograms
105
106 //------------------------------------------------------------------//
107 // MC PARTICLES //
108 //------------------------------------------------------------------//
109
110 // MC dau0
111 m_h1_MC_dau0_d0 = createHistogram1D("h1MCdau0D0", "d0 dau_{0}", 100, -10, 10, "d0_{dau_{0}}", m_histoList_MCParticles);
112 m_h1_MC_dau0_z0 = createHistogram1D("h1MCdau0Z0", "z0 dau_{0}", 100, -10, 10, "z0_{dau_{0}}", m_histoList_MCParticles);
113 m_h1_MC_dau0_RMother = createHistogram1D("h1MCdau0RMother", "dau_{0}, R mother", 200, 0, 20, "R mother", m_histoList_MCParticles);
114 m_h3_MC_dau0 = createHistogram3D("h3MCdau0", "entry per MC dau_{0}",
115 25, bins_pt_new, "p_{t} (GeV/c)",
116 10, bins_theta, "#theta",
117 14, bins_phi, "#phi", m_histoList_MCParticles);
118 m_h1_MC_dau0_pt = createHistogram1D("h1MCdau0Pt", "dau_{0}, p_{T}", 25, bins_pt_new, "p_{T} (GeV/c)", m_histoList_MCParticles);
119 m_h1_MC_dau0_pz = createHistogram1D("h1MCdau0Pz", "dau_{0}, p_{z}", 25, bins_pt_new, "p_{z} (GeV/c)", m_histoList_MCParticles);
120 m_h1_MC_dau0_p = createHistogram1D("h1MCdau0P", "dau_{0}, p", 25, bins_pt_new, "p (GeV/c)", m_histoList_MCParticles);
121 m_h1_MC_dau0_theta = createHistogram1D("h1MCdau0Theta", "dau_{0}, #theta", 10, bins_theta, "#theta",
123 m_h1_MC_dau0_costheta = createHistogram1D("h1MCdau0CosTheta", "dau_{0}, cos#theta", 20, bins_costheta, "cos#theta",
125 m_h1_MC_dau0_Mother_cosAngle = createHistogram1D("h1MCdau0MothercosAngle", "cos#theta_{mother,dau_{0}}", 20,
126 bins_costheta, "cos#theta", m_histoList_MCParticles);
127 m_h1_MC_dau0_phi = createHistogram1D("h1MCdau0Phi", "dau_{0}, #phi", 14, bins_phi, "#phi", m_histoList_MCParticles);
128 m_h1_MC_dau0_phi_BW = createHistogram1D("h1MCdau0PhiBW", "dau_{0}, #phi", 14, bins_phi, "#phi", m_histoList_MCParticles);
129 m_h1_MC_dau0_phi_barrel = createHistogram1D("h1MCdau0Phibarrel", "dau_{0}, #phi", 14, bins_phi, "#phi",
131 m_h1_MC_dau0_phi_FW = createHistogram1D("h1MCdau0PhiFW", "dau_{0}, #phi", 14, bins_phi, "#phi", m_histoList_MCParticles);
132
133 m_h1_MC_dau0_phiMother_total = createHistogram1D("h1MCdau0phiMothertotal", "dau_{0}, #phi_{mother}", 14, bins_phi,
134 "#phi_{mother}", m_histoList_MCParticles);
135 m_h1_MC_dau0_phiMother_BW = createHistogram1D("h1MCdau0phiMotherBW", "dau_{0}, #phi_{mother}, BW", 14, bins_phi,
136 "#phi_{mother} BW", m_histoList_MCParticles);
137 m_h1_MC_dau0_phiMother_barrel = createHistogram1D("h1MCdau0phiMotherbarrel", "dau_{0}, #phi_{mother}, barrel", 14, bins_phi,
138 "#phi_{mother} barrel", m_histoList_MCParticles);
139 m_h1_MC_dau0_phiMother_FW = createHistogram1D("h1MCdau0phiMotherFW", "dau_{0}, #phi_{mother}, FW", 14, bins_phi,
140 "#phi_{mother} FW", m_histoList_MCParticles);
141
142 m_h1_MC_dau0_thetaMother = createHistogram1D("h1MCdau0ThetaMother", "dau_{0}, #theta_{mother}", 10, bins_theta,
143 "#theta_{mother}", m_histoList_MCParticles);
144 m_h1_MC_dau0_ptMother = createHistogram1D("h1MCdau0PtMother", "dau_{0}, p_{T,mother}", 25, bins_pt_new, "p_{T,mother} (GeV/c)",
146
147 m_h2_MC_dau0_2D = createHistogram2D("h2MCdau0", "entry per MC dau_{0}",
148 10, bins_theta, "#theta",
149 25, bins_pt_new, "p_{t} (GeV/c)", m_histoList_MCParticles);
150 m_h2_MC_dau0_2D_BP = createHistogram2D("h2MCdau0BP", "entry per MC dau_{0}, beam pipe",
151 10, bins_theta, "#theta",
152 25, bins_pt_new, "p_{t} (GeV/c)", m_histoList_MCParticles);
153
154 m_h2_MC_dau0_2DMother = createHistogram2D("h2MCdau0Mother", "entry mother per MC dau_{0}",
155 10, bins_theta, "#theta_{mother}",
156 25, bins_pt_new, "p_{T,mother} (GeV/c)", m_histoList_MCParticles);
157
158 m_h2_MC_dau0_pVScostheta = createHistogram2D("h2MCdau0pVScostheta", "p_{CM} VS cos(#theta)_{CM}, dau_{0}",
159 20, -1., 1.,
160 "cos(#theta)_{CM}",
161 50, 0., 5.,
162 "p_{CM} [GeV]", m_histoList_MCParticles);
163
164 m_h1_MC_dau0_PDG = createHistogram1D("h1MCdau0PDG", "PDG code, dau_{0}", 4600, -2300, 2300, "PDG", m_histoList_check);
165
166 //MC dau1
167 m_h1_MC_dau1_d0 = createHistogram1D("h1MCdau1D0", "d0 dau_{1}", 100, -10, 10, "d0_{dau_{1}}", m_histoList_MCParticles);
168 m_h1_MC_dau1_z0 = createHistogram1D("h1MCdau1Z0", "z0 dau_{1}", 100, -10, 10, "z0_{dau_{1}}", m_histoList_MCParticles);
169 m_h1_MC_dau1_RMother = createHistogram1D("h1MCdau1RMother", "dau_{1}, R mother", 200, 0, 20, "R mother", m_histoList_MCParticles);
170 m_h3_MC_dau1 = createHistogram3D("h3MCdau1", "entry per MC dau_{1}",
171 25, bins_pt_new, "p_{t} (GeV/c)",
172 10, bins_theta, "#theta",
173 14, bins_phi, "#phi", m_histoList_MCParticles);
174 m_h1_MC_dau1_pt = createHistogram1D("h1MCdau1Pt", "dau_{1}, p_{T}", 25, bins_pt_new, "p_{T} (GeV/c)", m_histoList_MCParticles);
175 m_h1_MC_dau1_pz = createHistogram1D("h1MCdau1Pz", "dau_{1}, p_{z}", 25, bins_pt_new, "p_{z} (GeV/c)", m_histoList_MCParticles);
176 m_h1_MC_dau1_p = createHistogram1D("h1MCdau1P", "dau_{1}, ", 25, bins_pt_new, "p (GeV/c)", m_histoList_MCParticles);
177 m_h1_MC_dau1_theta = createHistogram1D("h1MCdau1Theta", "dau_{1}, #theta", 10, bins_theta, "#theta",
179 m_h1_MC_dau1_costheta = createHistogram1D("h1MCdau1CosTheta", "dau_{1}, cos#theta", 20, bins_costheta, "cos#theta",
181 m_h1_MC_dau1_phi = createHistogram1D("h1MCdau1Phi", "dau_{1}, #phi", 14, bins_phi, "#phi", m_histoList_MCParticles);
182 m_h1_MC_dau1_phi_BW = createHistogram1D("h1MCdau1PhiBW", "dau_{1}, #phi", 14, bins_phi, "#phi", m_histoList_MCParticles);
183 m_h1_MC_dau1_phi_barrel = createHistogram1D("h1MCdau1Phibarrel", "dau_{1}, #phi", 14, bins_phi, "#phi",
185 m_h1_MC_dau1_phi_FW = createHistogram1D("h1MCdau1PhiFW", "dau_{1}, #phi", 14, bins_phi, "#phi", m_histoList_MCParticles);
186
187 m_h1_MC_dau1_Mother_cosAngle = createHistogram1D("h1MCdau1MothercosAngle", "cos#theta_{mother,p}", 20, bins_costheta,
188 "cos#theta", m_histoList_MCParticles);
189
190 m_h1_MC_dau1_phiMother_total = createHistogram1D("h1MCdau1phiMothertotal", "dau_{1}, #phi_{mother}", 14, bins_phi,
191 "#phi_{mother}", m_histoList_MCParticles);
192 m_h1_MC_dau1_phiMother_BW = createHistogram1D("h1MCdau1phiMotherBW", "dau_{1}, #phi_{mother}, BW", 14, bins_phi,
193 "#phi_{mother} BW", m_histoList_MCParticles);
194 m_h1_MC_dau1_phiMother_barrel = createHistogram1D("h1MCdau1phiMotherbarrel", "dau_{1}, #phi_{mother}, barrel", 14, bins_phi,
195 "#phi_{mother} barrel", m_histoList_MCParticles);
196 m_h1_MC_dau1_phiMother_FW = createHistogram1D("h1MCdau1phiMotherFW", "dau_{1}, #phi_{mother}, FW", 14, bins_phi,
197 "#phi_{mother} FW", m_histoList_MCParticles);
198
199 m_h1_MC_dau1_thetaMother = createHistogram1D("h1MCdau1ThetaMother", "dau_{1}, #theta_{mother}", 10, bins_theta,
200 "#theta_{mother}", m_histoList_MCParticles);
201 m_h1_MC_dau1_ptMother = createHistogram1D("h1MCdau1PtMother", "dau_{1}, p_{T,mother}", 25, bins_pt_new, "p_{T,mother} (GeV/c)",
203
204 m_h2_MC_dau1_2D = createHistogram2D("h2MCdau1", "entry per MC dau_{1}",
205 10, bins_theta, "#theta",
206 25, bins_pt_new, "p_{t} (GeV/c)", m_histoList_MCParticles);
207
208 m_h2_MC_dau1_2D_BP = createHistogram2D("h2MCdau1BP", "entry per MC dau_{1}, beam pipe",
209 10, bins_theta, "#theta",
210 25, bins_pt_new, "p_{t} (GeV/c)", m_histoList_MCParticles);
211
212 m_h2_MC_dau1_2DMother = createHistogram2D("h2MCdau1Mother", "entry mother per MC dau_{1}",
213 10, bins_theta, "#theta_{mother}",
214 25, bins_pt_new, "p_{T,mother} (GeV/c)", m_histoList_MCParticles);
215
216 m_h2_MC_dau1_pVScostheta = createHistogram2D("h2MCdau1pVScostheta", "p_{CM} VS cos(#theta)_{CM}, dau_{1}",
217 20, -1., 1.,
218 "cos(#theta)_{CM}",
219 50, 0., 5.,
220 "p_{CM} [GeV]", m_histoList_MCParticles);
221
222 m_h1_MC_dau1_PDG = createHistogram1D("h1MCdau1PDG", "PDG code, dau_{1}", 4600, -2300, 2300, "PDG", m_histoList_check);
223
224 //MC mother
225 m_h1_MC_Mother_RMother = createHistogram1D("h1MCMotherRMother", "mother, R mother", 200, 0, 20, "R mother",
227 m_h3_MC_Mother = createHistogram3D("h3MCMother", "entry per MCmother",
228 25, bins_pt_new, "p_{t} (GeV/c)",
229 10, bins_theta, "#theta",
230 14, bins_phi, "#phi", m_histoList_MCParticles);
231 m_h1_MC_Mother_pt = createHistogram1D("h1MCMotherPt", "mother, p_{T}", 25, bins_pt_new, "p_{T} (GeV/c)",
233 m_h1_MC_Mother_pz = createHistogram1D("h1MCMotherPz", "mother, p_{z}", 25, bins_pt_new, "p_{z} (GeV/c)",
235 m_h1_MC_Mother_p = createHistogram1D("h1MCMotherP", "mother, p", 25, bins_pt_new, "p (GeV/c)", m_histoList_MCParticles);
236 m_h1_MC_Mother_theta = createHistogram1D("h1MCMotherTheta", "mother, #theta", 10, bins_theta, "#theta",
238 m_h1_MC_Mother_costheta = createHistogram1D("h1MCMotherCosTheta", "mother, cos#theta", 20, bins_costheta, "cos#theta",
240 m_h1_MC_Mother_phi = createHistogram1D("h1MCMotherPhi", "mother, #phi", 14, bins_phi, "#phi", m_histoList_MCParticles);
241 m_h1_MC_Mother_phi_BW = createHistogram1D("h1MCMotherPhiBW", "mother, #phi", 14, bins_phi, "#phi", m_histoList_MCParticles);
242 m_h1_MC_Mother_phi_barrel = createHistogram1D("h1MCMotherPhibarrel", "mother, #phi", 14, bins_phi, "#phi",
244 m_h1_MC_Mother_phi_FW = createHistogram1D("h1MCMotherPhiFW", "mother, #phi", 14, bins_phi, "#phi", m_histoList_MCParticles);
245
246 m_h2_MC_Mother_2D = createHistogram2D("h2MCMother", "entry per MCmother",
247 10, bins_theta, "#theta",
248 25, bins_pt_new, "p_{t} (GeV/c)", m_histoList_MCParticles);
249
250 m_h2_MC_Mother_2D_BP = createHistogram2D("h2MCMotherBP", "entry per MCmother, beam pipe",
251 10, bins_theta, "#theta",
252 25, bins_pt_new, "p_{t} (GeV/c)", m_histoList_MCParticles);
253
254 m_h2_MC_Mother_pVScostheta = createHistogram2D("h2MCMotherpVScostheta", "p_{CM} VS cos(#theta)_{CM}, mother",
255 20, -1., 1.,
256 "cos(#theta)_{CM}",
257 50, 0., 5.,
258 "p_{CM} [GeV]", m_histoList_MCParticles);
259
260 m_h1_MC_Mother_PDG = createHistogram1D("h1MCMotherPDG", "PDG code, mother", 6400, -3200, 3200, "PDG", m_histoList_check);
261
262
263 //------------------------------------------------------------------//
264 // TRACKS //
265 //------------------------------------------------------------------//
266
267 //track dau0
268 m_h1_track_dau0_d0 = (TH1F*)duplicateHistogram("h1trackdau0D0", "d0 dau_{0}", m_h1_MC_dau0_d0, m_histoList_Tracks);
269 m_h1_track_dau0_z0 = (TH1F*)duplicateHistogram("h1trackdau0Z0", "z0 dau_{0}", m_h1_MC_dau0_z0, m_histoList_Tracks);
270 m_h1_track_dau0_RMother = (TH1F*)duplicateHistogram("h1trackdau0RMother", "dau_{0}, R mother", m_h1_MC_dau0_RMother,
272 m_h3_track_dau0 = (TH3F*)duplicateHistogram("h3trackdau0", "entry per track dau_{0}", m_h3_MC_dau0, m_histoList_Tracks);
273 m_h1_track_dau0_pt = (TH1F*)duplicateHistogram("h1trackdau0Pt", "p_{T} dau_{0}", m_h1_MC_dau0_pt, m_histoList_Tracks);
274 m_h1_track_dau0_pz = (TH1F*)duplicateHistogram("h1trackdau0Pz", "p_{z} dau_{0}", m_h1_MC_dau0_pz, m_histoList_Tracks);
275 m_h1_track_dau0_p = (TH1F*)duplicateHistogram("h1trackdau0P", "p dau_{0}", m_h1_MC_dau0_p, m_histoList_Tracks);
276 m_h1_track_dau0_theta = (TH1F*)duplicateHistogram("h1trackdau0Theta", "#theta dau_{0}", m_h1_MC_dau0_theta, m_histoList_Tracks);
277 m_h1_track_dau0_costheta = (TH1F*)duplicateHistogram("h1trackdau0CosTheta", "cos#theta dau_{0}", m_h1_MC_dau0_costheta,
279 m_h1_track_dau0_Mother_cosAngle = (TH1F*)duplicateHistogram("h1trackdau0MothercosAngle", "#alpha_{mother,dau_{0}}",
281 m_h1_track_dau0_phi = (TH1F*)duplicateHistogram("h1trackdau0Phi", "#phi dau_{0}", m_h1_MC_dau0_phi, m_histoList_Tracks);
282 m_h1_track_dau0_phi_BW = (TH1F*)duplicateHistogram("h1trackdau0PhiBW", "#phi dau_{0}", m_h1_MC_dau0_phi_BW, m_histoList_Tracks);
283 m_h1_track_dau0_phi_barrel = (TH1F*)duplicateHistogram("h1trackdau0Phibarrel", "#phi dau_{0}", m_h1_MC_dau0_phi_barrel,
285 m_h1_track_dau0_phi_FW = (TH1F*)duplicateHistogram("h1trackdau0PhiFW", "#phi dau_{0}", m_h1_MC_dau0_phi_FW, m_histoList_Tracks);
286
287 m_h1_track_dau0_phiMother_total = (TH1F*)duplicateHistogram("h1trackdau0PhiMothertotal", "dau_{0}, #phi_{mother}",
289 m_h1_track_dau0_phiMother_BW = (TH1F*)duplicateHistogram("h1trackdau0PhiMotherBW", "dau_{0}, #phi_{mother}, BW",
291 m_h1_track_dau0_phiMother_barrel = (TH1F*)duplicateHistogram("h1trackdau0PhiMotherbarrel", "dau_{0}, #phi_{mother}, barrel",
293 m_h1_track_dau0_phiMother_FW = (TH1F*)duplicateHistogram("h1trackdau0PhiMotherFW", "dau_{0}, #phi_{mother}, FW",
295
296 m_h1_track_dau0_thetaMother = (TH1F*)duplicateHistogram("h1trackdau0ThetaMother", "#theta_{mother} dau_{0}",
298 m_h1_track_dau0_ptMother = (TH1F*)duplicateHistogram("h1trackdau0PtMother", "p_{T,mother} dau_{0}", m_h1_MC_dau0_ptMother,
300
301 m_h2_track_dau0_2D = (TH2F*)duplicateHistogram("h2trackdau02D", "p_{T} VS #theta, dau_{0}", m_h2_MC_dau0_2D, m_histoList_Tracks);
302 m_h2_track_dau0_2D_BP = (TH2F*)duplicateHistogram("h2trackdau02dBP", "p_{T} VS #theta, dau_{0} BP", m_h2_MC_dau0_2D_BP,
304 m_h2_track_dau0_2DMother = (TH2F*)duplicateHistogram("h2trackdau02DMother", "p_{T,mother} VS #theta_{mother}, dau_{0}",
306
307 m_h2_track_dau0_pVScostheta = (TH2F*)duplicateHistogram("h2trackdau0pVScostheta", "p VS cos(#theta), dau_{0}",
309
310
311 //track dau1
312 m_h1_track_dau1_d0 = (TH1F*)duplicateHistogram("h1trackdau1D0", "d0 dau_{1}", m_h1_MC_dau1_d0, m_histoList_Tracks);
313 m_h1_track_dau1_z0 = (TH1F*)duplicateHistogram("h1trackdau1Z0", "z0 dau_{1}", m_h1_MC_dau1_z0, m_histoList_Tracks);
314 m_h1_track_dau1_RMother = (TH1F*)duplicateHistogram("h1trackdau1RMother", "p, R mother", m_h1_MC_dau1_RMother, m_histoList_Tracks);
315 m_h3_track_dau1 = (TH3F*)duplicateHistogram("h3trackdau1", "entry per track dau_{1}", m_h3_MC_dau1, m_histoList_Tracks);
316 m_h1_track_dau1_pt = (TH1F*)duplicateHistogram("h1trackdau1Pt", "p_{T} dau_{1}", m_h1_MC_dau1_pt, m_histoList_Tracks);
317 m_h1_track_dau1_pz = (TH1F*)duplicateHistogram("h1trackdau1Pz", "p_{z} dau_{1}", m_h1_MC_dau1_pz, m_histoList_Tracks);
318 m_h1_track_dau1_p = (TH1F*)duplicateHistogram("h1trackdau1P", "p dau_{1}", m_h1_MC_dau1_p, m_histoList_Tracks);
319 m_h1_track_dau1_theta = (TH1F*)duplicateHistogram("h1trackdau1Theta", "#theta dau_{1}", m_h1_MC_dau1_theta, m_histoList_Tracks);
320 m_h1_track_dau1_costheta = (TH1F*)duplicateHistogram("h1trackdau1CosTheta", "cos#theta dau_{1}", m_h1_MC_dau1_costheta,
322 m_h1_track_dau1_Mother_cosAngle = (TH1F*)duplicateHistogram("h1trackdau1MothercosAngle", "#alpha_{mother,p}",
324 m_h1_track_dau1_phi = (TH1F*)duplicateHistogram("h1trackdau1Phi", "#phi dau_{1}", m_h1_MC_dau1_phi, m_histoList_Tracks);
325 m_h1_track_dau1_phi_BW = (TH1F*)duplicateHistogram("h1trackdau1PhiBW", "#phi dau_{1}", m_h1_MC_dau1_phi_BW, m_histoList_Tracks);
326 m_h1_track_dau1_phi_barrel = (TH1F*)duplicateHistogram("h1trackdau1Phibarrel", "#phi dau_{1}", m_h1_MC_dau1_phi_barrel,
328 m_h1_track_dau1_phi_FW = (TH1F*)duplicateHistogram("h1trackdau1PhiFW", "#phi dau_{1}", m_h1_MC_dau1_phi_FW, m_histoList_Tracks);
329
330 m_h1_track_dau1_phiMother_total = (TH1F*)duplicateHistogram("h1trackdau1PhiMothertotal", "dau_{1}, #phi_{mother}",
332 m_h1_track_dau1_phiMother_BW = (TH1F*)duplicateHistogram("h1trackdau1PhiMotherBW", "dau_{1}, #phi_{mother}, BW",
334 m_h1_track_dau1_phiMother_barrel = (TH1F*)duplicateHistogram("h1trackdau1PhiMotherbarrel", "dau_{1}, #phi_{mother}, barrel",
336 m_h1_track_dau1_phiMother_FW = (TH1F*)duplicateHistogram("h1trackdau1PhiMotherFW", "dau_{1}, #phi_{mother}, FW",
338
339 m_h1_track_dau1_thetaMother = (TH1F*)duplicateHistogram("h1trackdau1ThetaMother", "#theta_{mother} dau_{1}",
341 m_h1_track_dau1_ptMother = (TH1F*)duplicateHistogram("h1trackdau1PtMother", "p_{T,mother} dau_{1}", m_h1_MC_dau1_ptMother,
343
344 m_h2_track_dau1_2D = (TH2F*)duplicateHistogram("h2trackdau12D", "p_{T} VS #theta, dau_{1}", m_h2_MC_dau1_2D, m_histoList_Tracks);
345 m_h2_track_dau1_2D_BP = (TH2F*)duplicateHistogram("h2trackdau12dBP", "p_{T} VS #theta, p BDAU_{1}", m_h2_MC_dau1_2D_BP,
347 m_h2_track_dau1_2DMother = (TH2F*)duplicateHistogram("h2trackdau12DMother", "p_{T,mother} VS #theta_{mother}, dau_{1}",
349
350 m_h2_track_dau1_pVScostheta = (TH2F*)duplicateHistogram("h2trackdau1pVScostheta", "p VS cos(#theta), dau_{1}",
352
353 //V0
354 m_h1_V0_RMother = (TH1F*)duplicateHistogram("h1V0RMother", "mother, R mother", m_h1_MC_Mother_RMother, m_histoList_Tracks);
355 m_h3_V0 = (TH3F*)duplicateHistogram("h3V0", "entry per V0", m_h3_MC_Mother, m_histoList_Tracks);
356 m_h1_V0_pt = (TH1F*)duplicateHistogram("h1V0Pt", "p_{T} mother", m_h1_MC_Mother_pt, m_histoList_Tracks);
357 m_h1_V0_pz = (TH1F*)duplicateHistogram("h1V0Pz", "p_{z} mother", m_h1_MC_Mother_pz, m_histoList_Tracks);
358 m_h1_V0_p = (TH1F*)duplicateHistogram("h1V0P", "p mother", m_h1_MC_Mother_p, m_histoList_Tracks);
359 m_h1_V0_theta = (TH1F*)duplicateHistogram("h1V0Theta", "#theta mother", m_h1_MC_Mother_theta, m_histoList_Tracks);
360 m_h1_V0_costheta = (TH1F*)duplicateHistogram("h1V0CosTheta", "cos#theta mother", m_h1_MC_Mother_costheta, m_histoList_Tracks);
361 m_h1_V0_phi = (TH1F*)duplicateHistogram("h1V0Phi", "#phi mother", m_h1_MC_Mother_phi, m_histoList_Tracks);
362 m_h1_V0_phi_BW = (TH1F*)duplicateHistogram("h1V0PhiBW", "#phi mother", m_h1_MC_Mother_phi_BW, m_histoList_Tracks);
364 m_h1_V0_phi_FW = (TH1F*)duplicateHistogram("h1V0PhiFW", "#phi mother", m_h1_MC_Mother_phi_FW, m_histoList_Tracks);
365
366 m_h2_V0_Mother_2D = (TH2F*)duplicateHistogram("h2V0Mother2D", "p_{T} VS #theta, mother", m_h2_MC_Mother_2D, m_histoList_Tracks);
367 m_h2_V0_Mother_2D_BP = (TH2F*)duplicateHistogram("h2V0Mother2dBP", "p_{T} VS #theta, mother BP", m_h2_MC_Mother_2D_BP,
369
370 m_h2_V0_Mother_pVScostheta = (TH2F*)duplicateHistogram("h2V0MotherpVScostheta", "p VS cos(#theta), mother",
372
373
374 //------------------------------------------------------------------//
375 // RECO TRACKS //
376 //------------------------------------------------------------------//
377
378 //RecoTrack dau0
379 m_h1_RecoTrack_dau0_d0 = (TH1F*)duplicateHistogram("h1RecoTrackdau0D0", "d0 dau_{0}", m_h1_MC_dau0_d0, m_histoList_RecoTracks);
380 m_h1_RecoTrack_dau0_z0 = (TH1F*)duplicateHistogram("h1RecoTrackdau0Z0", "z0 dau_{0}", m_h1_MC_dau0_z0, m_histoList_RecoTracks);
381 m_h1_RecoTrack_dau0_RMother = (TH1F*)duplicateHistogram("h1RecoTrackdau0RMother", "dau_{0}, R mother", m_h1_MC_dau0_RMother,
383 m_h3_RecoTrack_dau0 = (TH3F*)duplicateHistogram("h3RecoTrackdau0", "entry per RecoTrack dau_{0}", m_h3_MC_dau0,
385 m_h1_RecoTrack_dau0_pt = (TH1F*)duplicateHistogram("h1RecoTrackdau0Pt", "p_{T} dau_{0}", m_h1_MC_dau0_pt, m_histoList_RecoTracks);
386 m_h1_RecoTrack_dau0_pz = (TH1F*)duplicateHistogram("h1RecoTrackdau0Pz", "p_{z} dau_{0}", m_h1_MC_dau0_pz, m_histoList_RecoTracks);
387 m_h1_RecoTrack_dau0_p = (TH1F*)duplicateHistogram("h1RecoTrackdau0P", "p dau_{0}", m_h1_MC_dau0_p, m_histoList_RecoTracks);
388 m_h1_RecoTrack_dau0_theta = (TH1F*)duplicateHistogram("h1RecoTrackdau0Theta", "#theta dau_{0}", m_h1_MC_dau0_theta,
390 m_h1_RecoTrack_dau0_costheta = (TH1F*)duplicateHistogram("h1RecoTrackdau0CosTheta", "cos#theta dau_{0}", m_h1_MC_dau0_costheta,
392 m_h1_RecoTrack_dau0_Mother_cosAngle = (TH1F*)duplicateHistogram("h1RecoTrackdau0MothercosAngle", "#alpha_{mother,dau_{0}}",
394 m_h1_RecoTrack_dau0_phi = (TH1F*)duplicateHistogram("h1RecoTrackdau0Phi", "#phi dau_{0}", m_h1_MC_dau0_phi, m_histoList_RecoTracks);
395 m_h1_RecoTrack_dau0_phi_BW = (TH1F*)duplicateHistogram("h1RecoTrackdau0PhiBW", "#phi dau_{0}", m_h1_MC_dau0_phi_BW,
397 m_h1_RecoTrack_dau0_phi_barrel = (TH1F*)duplicateHistogram("h1RecoTrackdau0Phibarrel", "#phi dau_{0}", m_h1_MC_dau0_phi_barrel,
399 m_h1_RecoTrack_dau0_phi_FW = (TH1F*)duplicateHistogram("h1RecoTrackdau0PhiFW", "#phi dau_{0}", m_h1_MC_dau0_phi_FW,
401
402 m_h1_RecoTrack_dau0_phiMother_total = (TH1F*)duplicateHistogram("h1RecoTrackdau0PhiMothertotal", "dau_{0}, #phi_{mother}",
404 m_h1_RecoTrack_dau0_phiMother_BW = (TH1F*)duplicateHistogram("h1RecoTrackdau0PhiMotherBW", "dau_{0}, #phi_{mother}, BW",
406 m_h1_RecoTrack_dau0_phiMother_barrel = (TH1F*)duplicateHistogram("h1RecoTrackdau0PhiMotherbarrel", "dau_{0}, #phi_{mother}, barrel",
408 m_h1_RecoTrack_dau0_phiMother_FW = (TH1F*)duplicateHistogram("h1RecoTrackdau0PhiMotherFW", "dau_{0}, #phi_{mother}, FW",
410
411 m_h1_RecoTrack_dau0_thetaMother = (TH1F*)duplicateHistogram("h1RecoTrackdau0ThetaMother", "#theta_{mother} dau_{0}",
413 m_h1_RecoTrack_dau0_ptMother = (TH1F*)duplicateHistogram("h1RecoTrackdau0PtMother", "p_{T,mother} dau_{0}", m_h1_MC_dau0_pt,
415
416 m_h2_RecoTrack_dau0_2D = (TH2F*)duplicateHistogram("h2RecoTrackdau02D", "p_{T} VS #theta, dau_{0}", m_h2_MC_dau0_2D,
418 m_h2_RecoTrack_dau0_2D_BP = (TH2F*)duplicateHistogram("h2RecoTrackdau02dBP", "p_{T} VS #theta, dau_{0} BP", m_h2_MC_dau0_2D_BP,
420 m_h2_RecoTrack_dau0_2DMother = (TH2F*)duplicateHistogram("h2RecoTrackdau02DMother", "p_{T,mother} VS #theta_{mother}, dau_{0}",
422
423 m_h2_RecoTrack_dau0_pVScostheta = (TH2F*)duplicateHistogram("h2RecoTrackdau0pVscostheta", "p VS cos(#theta), dau_{0}",
425
426 //RecoTrack dau1
427 m_h1_RecoTrack_dau1_d0 = (TH1F*)duplicateHistogram("h1RecoTrackdau1D0", "d0 dau_{1}", m_h1_MC_dau1_d0, m_histoList_RecoTracks);
428 m_h1_RecoTrack_dau1_z0 = (TH1F*)duplicateHistogram("h1RecoTrackdau1Z0", "z0 dau_{1}", m_h1_MC_dau1_z0, m_histoList_RecoTracks);
429 m_h1_RecoTrack_dau1_RMother = (TH1F*)duplicateHistogram("h1RecoTrackdau1RMother", "dau_{1}, R mother", m_h1_MC_dau1_RMother,
431 m_h3_RecoTrack_dau1 = (TH3F*)duplicateHistogram("h3RecoTrackdau1", "entry per RecoTrack dau_{1}", m_h3_MC_dau1,
433 m_h1_RecoTrack_dau1_pt = (TH1F*)duplicateHistogram("h1RecoTrackdau1Pt", "p_{T} dau_{1}", m_h1_MC_dau1_pt, m_histoList_RecoTracks);
434 m_h1_RecoTrack_dau1_pz = (TH1F*)duplicateHistogram("h1RecoTrackdau1Pz", "p_{z} dau_{1}", m_h1_MC_dau1_pz, m_histoList_RecoTracks);
435 m_h1_RecoTrack_dau1_p = (TH1F*)duplicateHistogram("h1RecoTrackdau1P", "p dau_{1}", m_h1_MC_dau1_p, m_histoList_RecoTracks);
436 m_h1_RecoTrack_dau1_theta = (TH1F*)duplicateHistogram("h1RecoTrackdau1Theta", "#theta dau_{1}", m_h1_MC_dau1_theta,
438 m_h1_RecoTrack_dau1_costheta = (TH1F*)duplicateHistogram("h1RecoTrackdau1CosTheta", "cos#theta dau_{1}", m_h1_MC_dau1_costheta,
440 m_h1_RecoTrack_dau1_Mother_cosAngle = (TH1F*)duplicateHistogram("h1RecoTrackdau1MothercosAngle", "#alpha_{mother,p}",
442 m_h1_RecoTrack_dau1_phi = (TH1F*)duplicateHistogram("h1RecoTrackdau1Phi", "#phi dau_{1}", m_h1_MC_dau1_phi, m_histoList_RecoTracks);
443 m_h1_RecoTrack_dau1_phi_BW = (TH1F*)duplicateHistogram("h1RecoTrackdau1PhiBW", "#phi dau_{1}", m_h1_MC_dau1_phi_BW,
445 m_h1_RecoTrack_dau1_phi_barrel = (TH1F*)duplicateHistogram("h1RecoTrackdau1Phibarrel", "#phi dau_{1}", m_h1_MC_dau1_phi_barrel,
447 m_h1_RecoTrack_dau1_phi_FW = (TH1F*)duplicateHistogram("h1RecoTrackdau1PhiFW", "#phi dau_{1}", m_h1_MC_dau1_phi_FW,
449
450 m_h1_RecoTrack_dau1_phiMother_total = (TH1F*)duplicateHistogram("h1RecoTrackdau1PhiMothertotal", "dau_{1}, #phi_{mother}",
452 m_h1_RecoTrack_dau1_phiMother_BW = (TH1F*)duplicateHistogram("h1RecoTrackdau1PhiMotherBW", "dau_{1}, #phi_{mother}, BW",
454 m_h1_RecoTrack_dau1_phiMother_barrel = (TH1F*)duplicateHistogram("h1RecoTrackdau1PhiMotherbarrel", "dau_{1}, #phi_{mother}, barrel",
456 m_h1_RecoTrack_dau1_phiMother_FW = (TH1F*)duplicateHistogram("h1RecoTrackdau1PhiMotherFW", "dau_{1}, #phi_{mother}, FW",
458
459 m_h1_RecoTrack_dau1_thetaMother = (TH1F*)duplicateHistogram("h1RecoTrackdau1ThetaMother", "#theta_{mother} dau_{1}",
461 m_h1_RecoTrack_dau1_ptMother = (TH1F*)duplicateHistogram("h1RecoTrackdau1PtMother", "p_{T,mother} dau_{1}", m_h1_MC_dau1_pt,
463
464 m_h2_RecoTrack_dau1_2D = (TH2F*)duplicateHistogram("h2RecoTrackdau12D", "p_{T} VS #theta, dau_{1}", m_h2_MC_dau1_2D,
466 m_h2_RecoTrack_dau1_2D_BP = (TH2F*)duplicateHistogram("h2RecoTrackdau12dBP", "p_{T} VS #theta, p BP", m_h2_MC_dau1_2D_BP,
468 m_h2_RecoTrack_dau1_2DMother = (TH2F*)duplicateHistogram("h2RecoTrackdau12DMother", "p_{T,mother} VS #theta_{mother}, dau_{1}",
470
471 m_h2_RecoTrack_dau1_pVScostheta = (TH2F*)duplicateHistogram("h2RecoTrackdau1pVscostheta", "p VS cos(#theta), dau_{1}",
473
474 //RecoTrack Mother
475 m_h1_RecoTrack_Mother_RMother = (TH1F*)duplicateHistogram("h1RecoTrack_MotherRMother", "mother, R mother", m_h1_MC_Mother_RMother,
477 m_h3_RecoTrack_Mother = (TH3F*)duplicateHistogram("h3RecoTrack_Mother", "entry per RecoTrack_Mother", m_h3_MC_Mother,
479 m_h1_RecoTrack_Mother_pt = (TH1F*)duplicateHistogram("h1RecoTrack_MotherPt", "p_{T} mother", m_h1_MC_dau0_pt,
481 m_h1_RecoTrack_Mother_pz = (TH1F*)duplicateHistogram("h1RecoTrack_MotherPz", "p_{z} mother", m_h1_MC_dau0_pz,
483 m_h1_RecoTrack_Mother_p = (TH1F*)duplicateHistogram("h1RecoTrack_MotherP", "p mother", m_h1_MC_dau0_p, m_histoList_RecoTracks);
484 m_h1_RecoTrack_Mother_theta = (TH1F*)duplicateHistogram("h1RecoTrack_MotherTheta", "#theta mother", m_h1_MC_dau0_theta,
486 m_h1_RecoTrack_Mother_costheta = (TH1F*)duplicateHistogram("h1RecoTrack_MotherCosTheta", "cos#theta mother", m_h1_MC_dau0_costheta,
488 m_h1_RecoTrack_Mother_phi = (TH1F*)duplicateHistogram("h1RecoTrack_MotherPhi", "#phi mother", m_h1_MC_dau0_phi,
490 m_h1_RecoTrack_Mother_phi_BW = (TH1F*)duplicateHistogram("h1RecoTrack_MotherPhiBW", "#phi mother", m_h1_MC_dau0_phi_BW,
492 m_h1_RecoTrack_Mother_phi_barrel = (TH1F*)duplicateHistogram("h1RecoTrack_MotherPhibarrel", "#phi mother", m_h1_MC_dau0_phi_barrel,
494 m_h1_RecoTrack_Mother_phi_FW = (TH1F*)duplicateHistogram("h1RecoTrack_MotherPhiFW", "#phi mother", m_h1_MC_dau0_phi_FW,
496
497 m_h2_RecoTrack_Mother_2D = (TH2F*)duplicateHistogram("h2RecoTrack_Mother2D", "p_{T} VS #theta, mother", m_h2_MC_Mother_2D,
499 m_h2_RecoTrack_Mother_2D_BP = (TH2F*)duplicateHistogram("h2RecoTrack_Mother2dBP", "p_{T} VS #theta, mother BP",
501
502 m_h2_RecoTrack_Mother_pVScostheta = (TH2F*)duplicateHistogram("h2RecoTrackMotherpVscostheta", "p VS cos(#theta), mother",
504
505}
506
508{
509
510}
511
513{
514
515 ROOT::Math::XYZVector magField = BFieldManager::getField(0, 0, 0) / Unit::T;
516
517 B2DEBUG(29, "+++++ 1. loop on MCParticles");
518 for (const MCParticle& mcParticle : m_MCParticles) {
519
520 //------------------------------------------------------------------//
521 // MC PARTICLES //
522 //------------------------------------------------------------------//
523
524 if (m_V0sType == "Lambda0") {
525 if (! isLambda0(mcParticle))
526 continue;
527
528 std::vector< MCParticle* > MCPart_dau = mcParticle.getDaughters();
529
530 if (abs(MCPart_dau[0]->getPDG()) == Const::pion.getPDGCode() && abs(MCPart_dau[1]->getPDG()) == Const::proton.getPDGCode()) {
531 m_MCDaughter0 = MCPart_dau[0];
532 m_MCDaughter1 = MCPart_dau[1];
533 } else if (abs(MCPart_dau[0]->getPDG()) == Const::proton.getPDGCode() && abs(MCPart_dau[1]->getPDG()) == Const::pion.getPDGCode()) {
534 m_MCDaughter0 = MCPart_dau[1];
535 m_MCDaughter1 = MCPart_dau[0];
536 } else B2INFO("Lambda daughters != pi & p");
537 }
538
539 else if (m_V0sType == "Ks") {
540 if (! isK_Short(mcParticle))
541 continue;
542
543 std::vector< MCParticle* > MCPart_dau = mcParticle.getDaughters();
544
545 if (MCPart_dau[0]->getPDG() == Const::pion.getPDGCode() && MCPart_dau[1]->getPDG() == -Const::pion.getPDGCode()) {
546 m_MCDaughter0 = MCPart_dau[0];
547 m_MCDaughter1 = MCPart_dau[1];
548 } else if (MCPart_dau[0]->getPDG() == -Const::pion.getPDGCode() && MCPart_dau[1]->getPDG() == Const::pion.getPDGCode()) {
549 m_MCDaughter0 = MCPart_dau[1];
550 m_MCDaughter1 = MCPart_dau[0];
551 } else B2INFO("Ks daughters != pi+ & pi-");
552 }
553
554 MCParticleInfo mcParticleInfo(mcParticle, magField);
555 MCParticleInfo mcParticleInfo_dau0(*m_MCDaughter0, magField);
556 MCParticleInfo mcParticleInfo_dau1(*m_MCDaughter1, magField);
557
558 const ROOT::Math::XYZVector& MC_vtx = mcParticle.getDecayVertex();
559
560 float MC_transDist = sqrt(MC_vtx.X() * MC_vtx.X() + MC_vtx.Y() * MC_vtx.Y());
561 float MC_pt = mcParticle.getMomentum().Rho();
562 float MC_p = mcParticle.getMomentum().R();
563 float MC_phi = mcParticle.getMomentum().Phi();
564 float MC_theta = mcParticle.getMomentum().Theta();
565 float MC_costheta = cos(mcParticle.getMomentum().Theta());
566
567 m_h1_MC_dau0_d0->Fill(mcParticleInfo_dau0.getD0());
568 m_h1_MC_dau0_z0->Fill(mcParticleInfo_dau0.getZ0());
569 m_h1_MC_dau0_RMother->Fill(MC_transDist);
576 m_h1_MC_dau0_costheta->Fill(cos(m_MCDaughter0->getMomentum().Theta()));
577 m_h1_MC_dau0_Mother_cosAngle->Fill(mcParticle.getMomentum().Dot(m_MCDaughter0->getMomentum()) / mcParticle.getMomentum().R() /
579
580 m_h1_MC_dau0_thetaMother->Fill(MC_theta);
581 m_h1_MC_dau0_ptMother->Fill(MC_pt);
582
583 m_h1_MC_dau0_phiMother_total->Fill(MC_phi);
585 m_h2_MC_dau0_2DMother->Fill(MC_theta, MC_pt);
588
589 m_h1_MC_dau1_d0->Fill(mcParticleInfo_dau1.getD0());
590 m_h1_MC_dau1_z0->Fill(mcParticleInfo_dau1.getZ0());
591 m_h1_MC_dau1_RMother->Fill(MC_transDist);
598 m_h1_MC_dau1_costheta->Fill(cos(m_MCDaughter1->getMomentum().Theta()));
599 m_h1_MC_dau1_Mother_cosAngle->Fill(mcParticle.getMomentum().Dot(m_MCDaughter1->getMomentum()) / mcParticle.getMomentum().R() /
601
602 m_h1_MC_dau1_thetaMother->Fill(MC_theta);
603 m_h1_MC_dau1_ptMother->Fill(MC_pt);
604
605 m_h1_MC_dau1_phiMother_total->Fill(MC_phi);
607 m_h2_MC_dau1_2DMother->Fill(MC_theta, MC_pt);
610
611 m_h1_MC_Mother_RMother->Fill(MC_transDist);
612 m_h3_MC_Mother->Fill(MC_pt, MC_theta, MC_phi);
613 m_h1_MC_Mother_pt->Fill(MC_pt);
614 m_h1_MC_Mother_pz->Fill(mcParticle.getMomentum().z());
615 m_h1_MC_Mother_p->Fill(mcParticle.getMomentum().R());
616 m_h1_MC_Mother_phi->Fill(MC_phi);
617 m_h1_MC_Mother_theta->Fill(MC_theta);
618 m_h1_MC_Mother_costheta->Fill(cos(mcParticle.getMomentum().Theta()));
619 m_h2_MC_Mother_2D->Fill(MC_theta, MC_pt);
620 m_h2_MC_Mother_pVScostheta->Fill(MC_costheta, MC_p);
621 m_h1_MC_Mother_PDG->Fill(mcParticle.getPDG());
622
623 //beam pipe
624 if (MC_transDist < 1.) {
627 m_h2_MC_Mother_2D_BP->Fill(MC_theta, MC_pt);
628 }
629
630
631 if (MC_theta > (120 * TMath::Pi() / 180.)) { //BW
632 m_h1_MC_dau0_phiMother_BW->Fill(MC_phi);
633 m_h1_MC_dau1_phiMother_BW->Fill(MC_phi);
636 m_h1_MC_Mother_phi_BW->Fill(MC_phi);
637 } else if (MC_theta < (30. * TMath::Pi() / 180.)) { //FW, theta < 30)
638 m_h1_MC_dau0_phiMother_FW->Fill(MC_phi);
639 m_h1_MC_dau1_phiMother_FW->Fill(MC_phi);
642 m_h1_MC_Mother_phi_FW->Fill(MC_phi);
643 } else { //barrel
644 m_h1_MC_dau0_phiMother_barrel->Fill(MC_phi);
645 m_h1_MC_dau1_phiMother_barrel->Fill(MC_phi);
648 m_h1_MC_Mother_phi_barrel->Fill(MC_phi);
649 }
650
651 //------------------------------------------------------------------//
652 // MC RECO TRACKS //
653 //------------------------------------------------------------------//
654
655 RelationVector<RecoTrack> MCRecoTracks_MCdau0 =
656 DataStore::getRelationsWithObj<RecoTrack>(m_MCDaughter0, m_MCRecoTracksName); //oppure &m_MCDaughter0;
657
658 RelationVector<RecoTrack> MCRecoTracks_MCdau1 =
659 DataStore::getRelationsWithObj<RecoTrack>(m_MCDaughter1, m_MCRecoTracksName);
660
661 if (MCRecoTracks_MCdau0.size() > 0) {
662 m_h1_RecoTrack_dau0_d0->Fill(mcParticleInfo_dau0.getD0());
663 m_h1_RecoTrack_dau0_z0->Fill(mcParticleInfo_dau0.getZ0());
664 m_h1_RecoTrack_dau0_RMother->Fill(MC_transDist);
666 m_MCDaughter0->getMomentum().Phi());
673 m_h1_RecoTrack_dau0_Mother_cosAngle->Fill(mcParticle.getMomentum().Dot(m_MCDaughter0->getMomentum()) /
674 mcParticle.getMomentum().R() /
676
677 m_h1_RecoTrack_dau0_thetaMother->Fill(MC_theta);
678 m_h1_RecoTrack_dau0_ptMother->Fill(MC_pt);
679
682 m_h2_RecoTrack_dau0_2DMother->Fill(MC_theta, MC_pt);
684
685 if (MC_transDist < 1.) {
687 }
688
689 if (m_MCDaughter0->getMomentum().Theta() > (120 * TMath::Pi() / 180.)) m_h1_RecoTrack_dau0_phi_BW->Fill(
690 m_MCDaughter0->getMomentum().Phi());
691 else if (m_MCDaughter0->getMomentum().Theta() < (30. * TMath::Pi() / 180.)) m_h1_RecoTrack_dau0_phi_FW->Fill(
692 m_MCDaughter0->getMomentum().Phi());
694
695 if (MC_theta > (120 * TMath::Pi() / 180.)) m_h1_RecoTrack_dau0_phiMother_BW->Fill(MC_phi);
696 else if (MC_theta < (30. * TMath::Pi() / 180.)) m_h1_RecoTrack_dau0_phiMother_FW->Fill(MC_phi);
697 else m_h1_RecoTrack_dau0_phiMother_barrel->Fill(MC_phi);
698
699 //V0 candidates
700 if (MCRecoTracks_MCdau1.size() > 0) {
701 m_h1_RecoTrack_Mother_RMother->Fill(MC_transDist);
702 m_h3_RecoTrack_Mother->Fill(MC_pt, MC_theta, MC_phi);
703 m_h1_RecoTrack_Mother_pt->Fill(MC_pt);
704 m_h1_RecoTrack_Mother_pz->Fill(mcParticle.getMomentum().z());
705 m_h1_RecoTrack_Mother_p->Fill(mcParticle.getMomentum().R());
706 m_h1_RecoTrack_Mother_phi->Fill(MC_phi);
707 m_h1_RecoTrack_Mother_theta->Fill(MC_theta);
708 m_h1_RecoTrack_Mother_costheta->Fill(cos(mcParticle.getMomentum().Theta()));
709
710 m_h1_RecoTrack_Mother_pt->Fill(MC_pt);
711 m_h2_RecoTrack_Mother_2D->Fill(MC_theta, MC_pt);
712
713 m_h2_RecoTrack_Mother_pVScostheta->Fill(MC_costheta, MC_p);
714
715 if (MC_transDist < 1.) m_h2_RecoTrack_Mother_2D_BP->Fill(MC_theta, MC_pt);
716
717 if (MC_theta > (120 * TMath::Pi() / 180.)) //BW
718 m_h1_RecoTrack_Mother_phi_BW->Fill(MC_phi);
719 else if (MC_theta < (30. * TMath::Pi() / 180.))//FW
720 m_h1_RecoTrack_Mother_phi_FW->Fill(MC_phi);
721 else
723 }
724 }
725
726 if (MCRecoTracks_MCdau1.size() > 0) {
727 m_h1_RecoTrack_dau1_d0->Fill(mcParticleInfo_dau1.getD0());
728 m_h1_RecoTrack_dau1_z0->Fill(mcParticleInfo_dau1.getZ0());
729 m_h1_RecoTrack_dau1_RMother->Fill(MC_transDist);
731 m_MCDaughter1->getMomentum().Phi());
738 m_h1_RecoTrack_dau1_Mother_cosAngle->Fill(mcParticle.getMomentum().Dot(m_MCDaughter1->getMomentum()) /
739 mcParticle.getMomentum().R() /
741
742 m_h1_RecoTrack_dau1_thetaMother->Fill(MC_theta);
743 m_h1_RecoTrack_dau1_ptMother->Fill(MC_pt);
744
747 m_h2_RecoTrack_dau1_2DMother->Fill(MC_theta, MC_pt);
749
750 if (MC_transDist < 1.) {
752
753 if (m_MCDaughter1->getMomentum().Theta() > (120 * TMath::Pi() / 180.)) m_h1_RecoTrack_dau1_phi_BW->Fill(
754 m_MCDaughter1->getMomentum().Phi());
755 else if (m_MCDaughter1->getMomentum().Theta() < (30. * TMath::Pi() / 180.)) m_h1_RecoTrack_dau1_phi_FW->Fill(
756 m_MCDaughter1->getMomentum().Phi());
758
759 if (MC_theta > (120 * TMath::Pi() / 180.)) m_h1_RecoTrack_dau1_phiMother_BW->Fill(MC_phi);
760 else if (MC_theta < (30. * TMath::Pi() / 180.)) m_h1_RecoTrack_dau1_phiMother_FW->Fill(MC_phi);
761 else m_h1_RecoTrack_dau1_phiMother_barrel->Fill(MC_phi);
762 }
763 }
764
765 //------------------------------------------------------------------//
766 // TRACKS //
767 //------------------------------------------------------------------//
768
769 Track* Track_dau0ToMCParticle = m_MCDaughter0->getRelated<Track>();
770 Track* Track_dau1ToMCParticle = m_MCDaughter1->getRelated<Track>();
771
772 if (Track_dau0ToMCParticle) {
773 m_h1_track_dau0_d0->Fill(mcParticleInfo_dau0.getD0());
774 m_h1_track_dau0_z0->Fill(mcParticleInfo_dau0.getZ0());
775 m_h1_track_dau0_RMother->Fill(MC_transDist);
783 m_h1_track_dau0_Mother_cosAngle->Fill(mcParticle.getMomentum().Dot(m_MCDaughter0->getMomentum()) / mcParticle.getMomentum().R() /
785
786 m_h1_track_dau0_thetaMother->Fill(MC_theta);
787 m_h1_track_dau0_ptMother->Fill(MC_pt);
788
790
792 m_h2_track_dau0_2DMother->Fill(MC_theta, MC_pt);
794
795 if (MC_transDist < 1.)
797
798 if (MC_theta > (120 * TMath::Pi() / 180.)) { //BW
799 m_h1_track_dau0_phiMother_BW->Fill(MC_phi);
801 } else if (MC_theta < (30 * TMath::Pi() / 180.)) { //FW
802 m_h1_track_dau0_phiMother_FW->Fill(MC_phi);
804 } else { //barrel
807 }
808 }
809
810 if (Track_dau1ToMCParticle) {
811 m_h1_track_dau1_d0->Fill(mcParticleInfo_dau1.getD0());
812 m_h1_track_dau1_z0->Fill(mcParticleInfo_dau1.getZ0());
813 m_h1_track_dau1_RMother->Fill(MC_transDist);
821 m_h1_track_dau1_Mother_cosAngle->Fill(mcParticle.getMomentum().Dot(m_MCDaughter1->getMomentum()) / mcParticle.getMomentum().R() /
823
824 m_h1_track_dau1_thetaMother->Fill(MC_theta);
825 m_h1_track_dau1_ptMother->Fill(MC_pt);
826
828
830 m_h2_track_dau1_2DMother->Fill(MC_theta, MC_pt);
832
833 if (MC_transDist < 1.)
835
836 if (MC_theta > (120 * TMath::Pi() / 180.)) { //BW
837 m_h1_track_dau1_phiMother_BW->Fill(MC_phi);
839 } else if (MC_theta < (30 * TMath::Pi() / 180.)) { //FW
840 m_h1_track_dau1_phiMother_FW->Fill(MC_phi);
842 } else { //barrel
845 }
846 }
847
848 int nMatchedDau = nMatchedDaughters(mcParticle);
849
850 //V0: proceed only in case the MCParticle daughters have one associated reconstructed track:
851 if (nMatchedDau != 2)
852 continue;
853
854 int pdgCode = mcParticle.getPDG();
855 B2DEBUG(29, "MCParticle has PDG code " << pdgCode);
856
857 RelationVector<V0ValidationVertex> V0s_toMCParticle =
858 DataStore::getRelationsWithObj<V0ValidationVertex>(&mcParticle, m_V0sName);
859
860 if (V0s_toMCParticle.size() > 0) {
861
862 m_h1_V0_RMother->Fill(MC_transDist);
863 m_h3_V0->Fill(mcParticleInfo.getPt(), mcParticleInfo.getPtheta(), mcParticleInfo.getPphi());
864 m_h1_V0_pt->Fill(mcParticleInfo.getPt());
865 m_h1_V0_pz->Fill(mcParticleInfo.getPz());
866 m_h1_V0_p->Fill(mcParticleInfo.getP());
867 m_h1_V0_phi->Fill(mcParticleInfo.getPphi());
868 m_h1_V0_theta->Fill(mcParticleInfo.getPtheta());
869 m_h1_V0_costheta->Fill(cos(mcParticle.getMomentum().Theta()));
870 m_h2_V0_Mother_2D->Fill(MC_theta, MC_p);
871 m_h2_V0_Mother_pVScostheta->Fill(MC_costheta, MC_p);
872
873 if (MC_transDist < 1.) m_h2_V0_Mother_2D_BP->Fill(MC_theta, MC_pt);
874
875 if (MC_theta > (120 * TMath::Pi() / 180.)) //BW
876 m_h1_V0_phi_BW->Fill(mcParticleInfo.getPphi());
877
878 else if (MC_theta < (30 * TMath::Pi() / 180.))//FW
879 m_h1_V0_phi_FW->Fill(mcParticleInfo.getPphi());
880
881 else //barrel
882 m_h1_V0_phi_barrel->Fill(mcParticleInfo.getPphi());
883 }
884 }
885}
886
888{
889 double track_dau0 = m_h1_track_dau0_RMother->GetEntries();
890 double RecoTrack_dau0 = m_h1_RecoTrack_dau0_RMother->GetEntries();
891 double MC_dau0 = m_h1_MC_dau0_RMother->GetEntries();
892 double eff_dau0_noGA = track_dau0 / MC_dau0;
893 double effErr_dau0_noGA = sqrt(eff_dau0_noGA * (1 - eff_dau0_noGA)) / sqrt(MC_dau0);
894 double eff_dau0_withGA = track_dau0 / RecoTrack_dau0;
895 double effErr_dau0_withGA = sqrt(eff_dau0_withGA * (1 - eff_dau0_withGA)) / sqrt(RecoTrack_dau0);
896
897 double track_dau1 = m_h1_track_dau1_RMother->GetEntries();
898 double RecoTrack_dau1 = m_h1_RecoTrack_dau1_RMother->GetEntries();
899 double MC_dau1 = m_h1_MC_dau1_RMother->GetEntries();
900 double eff_dau1_noGA = track_dau1 / MC_dau1;
901 double effErr_dau1_noGA = sqrt(eff_dau1_noGA * (1 - eff_dau1_noGA)) / sqrt(MC_dau1);
902 double eff_dau1_withGA = track_dau1 / RecoTrack_dau1;
903 double effErr_dau1_withGA = sqrt(eff_dau1_withGA * (1 - eff_dau1_withGA)) / sqrt(RecoTrack_dau1);
904
905 double track_Mother = m_h1_V0_RMother->GetEntries();
906 double RecoTrack_Mother = m_h1_RecoTrack_Mother_RMother->GetEntries();
907 double MC_Mother = m_h1_MC_Mother_RMother->GetEntries();
908 double eff_Mother_noGA = track_Mother / MC_Mother;
909 double effErr_Mother_noGA = sqrt(eff_Mother_noGA * (1 - eff_Mother_noGA)) / sqrt(MC_Mother);
910 double eff_Mother_withGA = track_Mother / RecoTrack_Mother;
911 double effErr_Mother_withGA = sqrt(eff_Mother_withGA * (1 - eff_Mother_withGA)) / sqrt(RecoTrack_Mother);
912
913
914
915
916 B2INFO("");
917 B2INFO("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
918 B2INFO("~ V0 Finding Performance Evaluation ~ SHORT SUMMARY ~");
919 B2INFO("");
920 B2INFO(" + overall, normalized to MC particles (_noGeoAcc):");
921 B2INFO("");
922 B2INFO(" efficiency dau0 = (" << eff_dau0_noGA * 100 << " +/- " << effErr_dau0_noGA * 100 << ")% ");
923 B2INFO(" efficiency dau1 = (" << eff_dau1_noGA * 100 << " +/- " << effErr_dau1_noGA * 100 << ")% ");
924 B2INFO(" efficiency Mother = (" << eff_Mother_noGA * 100 << " +/- " << effErr_Mother_noGA * 100 << ")% ");
925 B2INFO("");
926 B2INFO(" + overall, normalized to RecoTracks(_withGeoAcc):");
927 B2INFO("");
928 B2INFO(" efficiency dau0 = (" << eff_dau0_withGA * 100 << " +/- " << effErr_dau0_withGA * 100 << ")% ");
929 B2INFO(" efficiency dau1 = (" << eff_dau1_withGA * 100 << " +/- " << effErr_dau1_withGA * 100 << ")% ");
930 B2INFO(" efficiency Mother = (" << eff_Mother_withGA * 100 << " +/- " << effErr_Mother_withGA * 100 << ")% ");
931 B2INFO("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
932
933}
934
936{
937 //------------------------------------------------------------------//
938 // EFFICIENCIES //
939 //------------------------------------------------------------------//
940
941 //dau0
942 TH1F* h_eff_dau0_d0 = effPlot1D(m_h1_MC_dau0_d0, m_h1_RecoTrack_dau0_d0, m_h1_track_dau0_d0, "h_eff_dau0_d0",
943 "efficiency VS d0, dau_{0}", m_histoList_Efficiencies);
944 if (h_eff_dau0_d0->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau0_d0");
945
946 TH1F* h_eff_dau0_z0 = effPlot1D(m_h1_MC_dau0_z0, m_h1_RecoTrack_dau0_z0, m_h1_track_dau0_z0, "h_eff_dau0_z0",
947 "efficiency VS z0, dau_{0}", m_histoList_Efficiencies);
948 if (h_eff_dau0_z0->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau0_z0");
949
951 "h_eff_dau0_RMother", "efficiency VS R_{mother}, dau_{0}", m_histoList_Efficiencies);
952 if (h_eff_dau0_RMother->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau0_RMother");
953
955 "h_eff_dau0_thetaMother", "efficiency VS #theta_{mother}, dau_{0}", m_histoList_Efficiencies);
956 if (h_eff_dau0_thetaMother->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau0_thetaMother");
957
959 m_h1_track_dau0_phiMother_total, "h_eff_dau0_phiMother_total", "efficiency VS #phi_{mother}, dau_{0}", m_histoList_Efficiencies);
960 if (h_eff_dau0_phiMother_total->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau0_phiMother_total");
961
963 "h_eff_dau0_phiMother_BW", "efficiency VS #phi_{mother}, dau_{0} BW", m_histoList_Efficiencies);
964 if (h_eff_dau0_phiMother_BW->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau0_phiMother_BW");
965
967 m_h1_track_dau0_phiMother_barrel, "h_eff_dau0_phiMother_barrel", "efficiency VS #phi_{mother}, dau_{0} barrel",
969 if (h_eff_dau0_phiMother_barrel->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau0_phiMother_barrel");
970
972 "h_eff_dau0_phiMother_FW", "efficiency VS #phi_{mother}, dau_{0} FW", m_histoList_Efficiencies);
973 if (h_eff_dau0_phiMother_FW->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau0_phiMother_FW");
974
975 TH1F* h_eff_dau0_phi_total = effPlot1D(m_h1_MC_dau0_phi, m_h1_RecoTrack_dau0_phi, m_h1_track_dau0_phi, "h_eff_dau0_phi_total",
976 "efficiency VS #phi_{dau_{0}}, dau_{0}", m_histoList_Efficiencies);
977 if (h_eff_dau0_phi_total->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau0_phi_total");
978
979 TH1F* h_eff_dau0_phi_BW = effPlot1D(m_h1_MC_dau0_phi_BW, m_h1_RecoTrack_dau0_phi_BW, m_h1_track_dau0_phi_BW, "h_eff_dau0_phi_BW",
980 "efficiency VS #phi_{dau_{0}}, dau_{0} BW", m_histoList_Efficiencies);
981 if (h_eff_dau0_phi_BW->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau0_phi_BW");
982
984 "h_eff_dau0_phi_barrel", "efficiency VS #phi_{dau_{0}}, dau_{0} barrel", m_histoList_Efficiencies);
985 if (h_eff_dau0_phi_barrel->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau0_phi_barrel");
986
987 TH1F* h_eff_dau0_phi_FW = effPlot1D(m_h1_MC_dau0_phi_FW, m_h1_RecoTrack_dau0_phi_FW, m_h1_track_dau0_phi_FW, "h_eff_dau0_phi_FW",
988 "efficiency VS #phi_{dau_{0}}, dau_{0} FW", m_histoList_Efficiencies);
989 if (h_eff_dau0_phi_FW->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau0_phi_FW");
990
992 "h2_effMap_dau0_pVScostheta", "efficiency map, p_{CM} VS cos(#theta)_{CM} dau_{0}", m_histoList_Efficiencies);
993 if (h2_effMap_dau0_pVScostheta->GetEntries() == 0) B2WARNING("Empty histogram h2_effMap_dau0_pVScostheta");
994
995 //dau1
996 TH1F* h_eff_dau1_d0 = effPlot1D(m_h1_MC_dau1_d0, m_h1_RecoTrack_dau1_d0, m_h1_track_dau1_d0, "h_eff_dau1_d0", "efficiency VS d0, p",
998 if (h_eff_dau1_d0->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau1_d0");
999
1000 TH1F* h_eff_dau1_z0 = effPlot1D(m_h1_MC_dau1_z0, m_h1_RecoTrack_dau1_z0, m_h1_track_dau1_z0, "h_eff_dau1_z0", "efficiency VS z0, p",
1002 if (h_eff_dau1_z0->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau1_z0");
1003
1005 "h_eff_dau1_RMother", "efficiency VS R_{mother}, p", m_histoList_Efficiencies);
1006 if (h_eff_dau1_RMother->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau1_RMother");
1007
1009 "h_eff_dau1_thetaMother", "efficiency VS #theta_{mother}, p", m_histoList_Efficiencies);
1010 if (h_eff_dau1_thetaMother->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau1_thetaMother");
1011
1013 m_h1_track_dau1_phiMother_total, "h_eff_dau1_phiMother_total", "efficiency VS #phi_{mother}, p", m_histoList_Efficiencies);
1014 if (h_eff_dau1_phiMother_total->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau1_phiMother_total");
1015
1017 "h_eff_dau1_phiMother_BW", "efficiency VS #phi_{mother}, p BW", m_histoList_Efficiencies);
1018 if (h_eff_dau1_phiMother_BW->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau1_phiMother_BW");
1019
1021 m_h1_track_dau1_phiMother_barrel, "h_eff_dau1_phiMother_barrel", "efficiency VS #phi_{mother}, p barrel", m_histoList_Efficiencies);
1022 if (h_eff_dau1_phiMother_barrel->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau1_phiMother_barrel");
1023
1025 "h_eff_dau1_phiMother_FW", "efficiency VS #phi_{mother}, p FW", m_histoList_Efficiencies);
1026 if (h_eff_dau1_phiMother_FW->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau1_phiMother_FW");
1027
1028 TH1F* h_eff_dau1_phi_total = effPlot1D(m_h1_MC_dau1_phi, m_h1_RecoTrack_dau1_phi, m_h1_track_dau1_phi, "h_eff_dau1_phi_total",
1029 "efficiency VS #phi_{p}, p", m_histoList_Efficiencies);
1030 if (h_eff_dau1_phi_total->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau1_phi_total");
1031
1032 TH1F* h_eff_dau1_phi_BW = effPlot1D(m_h1_MC_dau1_phi_BW, m_h1_RecoTrack_dau1_phi_BW, m_h1_track_dau1_phi_BW, "h_eff_dau1_phi_BW",
1033 "efficiency VS #phi_{p}, p BW", m_histoList_Efficiencies);
1034 if (h_eff_dau1_phi_BW->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau1_phi_BW");
1035
1037 "h_eff_dau1_phi_barrel", "efficiency VS #phi_{p}, p barrel", m_histoList_Efficiencies);
1038 if (h_eff_dau1_phi_barrel->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau1_phi_barrel");
1039
1040 TH1F* h_eff_dau1_phi_FW = effPlot1D(m_h1_MC_dau1_phi_FW, m_h1_RecoTrack_dau1_phi_FW, m_h1_track_dau1_phi_FW, "h_eff_dau1_phi_FW",
1041 "efficiency VS #phi_{p}, p FW", m_histoList_Efficiencies);
1042 if (h_eff_dau1_phi_FW->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau1_phi_FW");
1043
1045 "h2_effMap_dau1_pVScostheta", "efficiency map, p_{CM} VS cos(#theta)_{CM} dau_{1}", m_histoList_Efficiencies);
1046 if (h2_effMap_dau1_pVScostheta->GetEntries() == 0) B2WARNING("Empty histogram h2_effMap_dau1_pVScostheta");
1047
1048 //mother
1050 "h_eff_Mother_RMother", "efficiency VS R_{mother}, mother", m_histoList_Efficiencies);
1051 if (h_eff_Mother_RMother->GetEntries() == 0) B2WARNING("Empty histogram h_eff_Mother_RMother");
1052
1053 TH1F* h_eff_Mother_theta = effPlot1D(m_h1_MC_Mother_theta, m_h1_RecoTrack_Mother_theta, m_h1_V0_theta, "h_eff_Mother_theta",
1054 "efficiency VS #theta_{mother}, mother", m_histoList_Efficiencies);
1055 if (h_eff_Mother_theta->GetEntries() == 0) B2WARNING("Empty histogram h_eff_Mother_theta");
1056
1057 TH1F* h_eff_Mother_phi_total = effPlot1D(m_h1_MC_Mother_phi, m_h1_RecoTrack_Mother_phi, m_h1_V0_phi, "h_eff_Mother_phi_total",
1058 "efficiency VS #phi_{mother}, mother", m_histoList_Efficiencies);
1059 if (h_eff_Mother_phi_total->GetEntries() == 0) B2WARNING("Empty histogram h_eff_Mother_phi_total");
1060
1062 "h_eff_Mother_phi_BW", "efficiency VS #phi_{mother}, mother BW", m_histoList_Efficiencies);
1063 if (h_eff_Mother_phiMother_BW->GetEntries() == 0) B2WARNING("Empty histogram h_eff_Mother_phiMother_BW");
1064
1066 "h_eff_Mother_phi_barrel", "efficiency VS #phi_{mother}, mother barrel", m_histoList_Efficiencies);
1067 if (h_eff_Mother_phiMother_barrel->GetEntries() == 0) B2WARNING("Empty histogram h_eff_Mother_phiMother_barrel");
1068
1070 "h_eff_Mother_phi_FW", "efficiency VS #phi_{mother}, mother FW", m_histoList_Efficiencies);
1071 if (h_eff_Mother_phiMother_FW->GetEntries() == 0) B2WARNING("Empty histogram h_eff_Mother_phiMother_FW");
1072
1073 TH2F* h2_effMap_Mother_pVScostheta = effPlot2D(m_h2_MC_Mother_pVScostheta, m_h2_RecoTrack_Mother_pVScostheta,
1074 m_h2_V0_Mother_pVScostheta, "h2_effMap_Mother_pVScostheta", "efficiency map, p_{CM} VS cos(#theta)_{CM} mother",
1076 if (h2_effMap_Mother_pVScostheta->GetEntries() == 0) B2WARNING("Empty histogram h2_effMap_Mother_pVScostheta");
1077
1078 //eff_V0Finder [ = eff_mother / (eff_dau0 * eff_dau1)]
1079 TH1F* h_eff_V0Finder_RMother_withGeoAcc = V0FinderEff(h_eff_dau0_RMother, h_eff_dau1_RMother, h_eff_Mother_RMother,
1080 "h_eff_V0Finder_RMother_withGeoAcc", "efficiency VS R_{mother}, V0Finder", m_histoList_Efficiencies);
1081 if (h_eff_V0Finder_RMother_withGeoAcc->GetEntries() == 0) B2WARNING("Empty histogram h_eff_V0Finder_RMother_withGeoAcc");
1082
1083 TH1F* h_eff_V0Finder_theta_withGeoAcc = V0FinderEff(h_eff_dau0_thetaMother, h_eff_dau1_thetaMother, h_eff_Mother_theta,
1084 "h_eff_V0Finder_theta_withGeoAcc", "efficiency VS #theta_{mother}, V0Finder", m_histoList_Efficiencies);
1085 if (h_eff_V0Finder_theta_withGeoAcc->GetEntries() == 0) B2WARNING("Empty histogram h_eff_V0Finder_theta_withGeoAcc");
1086
1087 TH1F* h_eff_V0Finder_phi_total_withGeoAcc = V0FinderEff(h_eff_dau0_phiMother_total, h_eff_dau1_phiMother_total,
1088 h_eff_Mother_phi_total, "h_eff_V0Finder_phi_total_withGeoAcc", "efficiency VS #phi_{mother}, V0Finder", m_histoList_Efficiencies);
1089 if (h_eff_V0Finder_phi_total_withGeoAcc->GetEntries() == 0) B2WARNING("Empty histogram h_eff_V0Finder_phi_total_withGeoAcc");
1090
1091 TH1F* h_eff_V0Finder_phiMother_BW_withGeoAcc = V0FinderEff(h_eff_dau0_phiMother_BW, h_eff_dau1_phiMother_BW,
1092 h_eff_Mother_phiMother_BW, "h_eff_V0Finder_phi_BW_withGeoAcc", "efficiency VS #phi_{mother}, V0Finder BW",
1094 if (h_eff_V0Finder_phiMother_BW_withGeoAcc->GetEntries() == 0) B2WARNING("Empty histogram h_eff_V0Finder_phiMother_BW_withGeoAcc");
1095
1096 TH1F* h_eff_V0Finder_phiMother_barrel_withGeoAcc = V0FinderEff(h_eff_dau0_phiMother_barrel, h_eff_dau1_phiMother_barrel,
1097 h_eff_Mother_phiMother_barrel, "h_eff_V0Finder_phi_barrel_withGeoAcc", "efficiency VS #phi_{mother}, V0Finder barrel",
1099 if (h_eff_V0Finder_phiMother_barrel_withGeoAcc->GetEntries() == 0)
1100 B2WARNING("Empty histogram h_eff_V0Finder_phiMother_barrel_withGeoAcc");
1101
1102 TH1F* h_eff_V0Finder_phiMother_FW_withGeoAcc = V0FinderEff(h_eff_dau0_phiMother_FW, h_eff_dau1_phiMother_FW,
1103 h_eff_Mother_phiMother_FW, "h_eff_V0Finder_phi_FW_withGeoAcc", "efficiency VS #phi_{mother}, V0Finder FW",
1105 if (h_eff_V0Finder_phiMother_FW_withGeoAcc->GetEntries() == 0) B2WARNING("Empty histogram h_eff_V0Finder_phiMother_FW_withGeoAcc");
1106
1107
1108 //-------------------------------------------------------------------------//
1109 // GEOMETRICAL ACCETTANCE //
1110 //-------------------------------------------------------------------------//
1111
1113 //dau0
1114 TH1F* h_dau0_geoAcc_theta = geoAcc1D(m_h1_MC_dau0_theta, m_h1_RecoTrack_dau0_theta, "h_dau0_geoAcc_theta",
1115 "geometrical acceptance VS #theta_{dau_{0}}, dau_{0}", m_histoList_GA);
1116 if (h_dau0_geoAcc_theta->GetEntries() == 0) B2WARNING("Empty histogram h_dau0_geoAcc_theta");
1117
1118 TH1F* h_dau0_geoAcc_phi = geoAcc1D(m_h1_MC_dau0_phi, m_h1_RecoTrack_dau0_phi, "h_dau0_geoAcc_phi",
1119 "geometrical acceptance VS #phi_{dau_{0}}, dau_{0}", m_histoList_GA);
1120 if (h_dau0_geoAcc_phi->GetEntries() == 0) B2WARNING("Empty histogram h_dau0_geoAcc_phi");
1121
1122 TH1F* h_dau0_geoAcc_pt = geoAcc1D(m_h1_MC_dau0_pt, m_h1_RecoTrack_dau0_pt, "h_dau0_geoAcc_pt",
1123 "geometrical acceptance VS p_{T,dau_{0}}, dau_{0}", m_histoList_GA);
1124 if (h_dau0_geoAcc_pt->GetEntries() == 0) B2WARNING("Empty histogram h_dau0_geoAcc_pt");
1125
1126 TH1F* h_dau0_geoAcc_thetaMother = geoAcc1D(m_h1_MC_dau0_thetaMother, m_h1_RecoTrack_dau0_thetaMother, "h_dau0_geoAcc_thetaMother",
1127 "geometrical acceptance VS #theta_{mother}, dau_{0}", m_histoList_GA);
1128 if (h_dau0_geoAcc_thetaMother->GetEntries() == 0) B2WARNING("Empty histogram h_dau0_geoAcc_thetaMother");
1129
1131 "h_dau0_geoAcc_phiMother", "geometrical acceptance VS #phi_{mother}, dau_{0}", m_histoList_GA);
1132 if (h_dau0_geoAcc_phiMother->GetEntries() == 0) B2WARNING("Empty histogram h_dau0_geoAcc_phiMother");
1133
1134 TH1F* h_dau0_geoAcc_ptMother = geoAcc1D(m_h1_MC_dau0_ptMother, m_h1_RecoTrack_dau0_ptMother, "h_dau0_geoAcc_ptMother",
1135 "geometrical acceptance VS #p_{T,mother}, dau_{0}", m_histoList_GA);
1136 if (h_dau0_geoAcc_ptMother->GetEntries() == 0) B2WARNING("Empty histogram h_dau0_geoAcc_ptMother");
1137
1138 //dau1
1139 TH1F* h_dau1_geoAcc_theta = geoAcc1D(m_h1_MC_dau1_theta, m_h1_RecoTrack_dau1_theta, "h_dau1_geoAcc_theta",
1140 "geometrical acceptance VS #theta_{p}, p", m_histoList_GA);
1141 if (h_dau1_geoAcc_theta->GetEntries() == 0) B2WARNING("Empty histogram h_dau1_geoAcc_theta");
1142
1143 TH1F* h_dau1_geoAcc_phi = geoAcc1D(m_h1_MC_dau1_phi, m_h1_RecoTrack_dau1_phi, "h_dau1_geoAcc_phi",
1144 "geometrical acceptance VS #phi_{p}, p", m_histoList_GA);
1145 if (h_dau1_geoAcc_phi->GetEntries() == 0) B2WARNING("Empty histogram h_dau1_geoAcc_phi");
1146
1147 TH1F* h_dau1_geoAcc_pt = geoAcc1D(m_h1_MC_dau1_pt, m_h1_RecoTrack_dau1_pt, "h_dau1_geoAcc_pt",
1148 "geometrical acceptance VS p_{T,p}, p", m_histoList_GA);
1149 if (h_dau1_geoAcc_pt->GetEntries() == 0) B2WARNING("Empty histogram h_dau1_geoAcc_pt");
1150
1151 TH1F* h_dau1_geoAcc_thetaMother = geoAcc1D(m_h1_MC_dau1_thetaMother, m_h1_RecoTrack_dau1_thetaMother, "h_dau1_geoAcc_thetaMother",
1152 "geometrical acceptance VS #theta_{mother}, p", m_histoList_GA);
1153 if (h_dau1_geoAcc_thetaMother->GetEntries() == 0) B2WARNING("Empty histogram h_dau1_geoAcc_thetaMother");
1154
1156 "h_dau1_geoAcc_phiMother", "geometrical acceptance VS #phi_{mother}, p", m_histoList_GA);
1157 if (h_dau1_geoAcc_phiMother->GetEntries() == 0) B2WARNING("Empty histogram h_dau1_geoAcc_phiMother");
1158
1159 TH1F* h_dau1_geoAcc_ptMother = geoAcc1D(m_h1_MC_dau1_ptMother, m_h1_RecoTrack_dau1_ptMother, "h_dau1_geoAcc_ptMother",
1160 "geometrical acceptance VS #p_{T,mother}, p", m_histoList_GA);
1161 if (h_dau1_geoAcc_ptMother->GetEntries() == 0) B2WARNING("Empty histogram h_dau1_geoAcc_ptMother");
1162
1163 //mother
1164 TH1F* h_Mother_geoAcc_theta = geoAcc1D(m_h1_MC_Mother_theta, m_h1_RecoTrack_Mother_theta, "h_Mother_geoAcc_theta",
1165 "geometrical acceptance VS #theta_{mother}, mother", m_histoList_GA);
1166 if (h_Mother_geoAcc_theta->GetEntries() == 0) B2WARNING("Empty histogram h_Mother_geoAcc_theta");
1167
1168 TH1F* h_Mother_geoAcc_phi = geoAcc1D(m_h1_MC_Mother_phi, m_h1_RecoTrack_Mother_phi, "h_Mother_geoAcc_phi",
1169 "geometrical acceptance VS #phi_{mother}, mother", m_histoList_GA);
1170 if (h_Mother_geoAcc_phi->GetEntries() == 0) B2WARNING("Empty histogram h_Mother_geoAcc_phi");
1171
1172 TH1F* h_Mother_geoAcc_pt = geoAcc1D(m_h1_MC_Mother_pt, m_h1_RecoTrack_Mother_pt, "h_Mother_geoAcc_pt",
1173 "geometrical acceptance VS p_{T,mother}, mother", m_histoList_GA);
1174 if (h_Mother_geoAcc_pt->GetEntries() == 0) B2WARNING("Empty histogram h_Mother_geoAcc_pt");
1175
1176 //2D
1177 TH2F* h2_dau0_geoAcc2D = geoAcc2D(m_h2_MC_dau0_2D, m_h2_RecoTrack_dau0_2D, "h2_dau0_geoAcc2D",
1178 "geometrical acceptance dau_{0}, p_{T,dau_{0}} VS #theta_{dau_{0}}", m_histoList_GA);
1179 if (h2_dau0_geoAcc2D->GetEntries() == 0) B2WARNING("Empty histogram h2_dau0_geoAcc2D");
1180
1181 TH2F* h2_dau1_geoAcc2D = geoAcc2D(m_h2_MC_dau1_2D, m_h2_RecoTrack_dau1_2D, "h2_dau1_geoAcc2D",
1182 "geometrical acceptance p, p_{T,p} VS #theta_{p}", m_histoList_GA);
1183 if (h2_dau1_geoAcc2D->GetEntries() == 0) B2WARNING("Empty histogram h2_dau1_geoAcc2D");
1184
1185 TH2F* h2_Mother_geoAcc2D = geoAcc2D(m_h2_MC_Mother_2D, m_h2_RecoTrack_Mother_2D, "h2_Mother_geoAcc2D",
1186 "geometrical acceptance mother, p_{T,mother} VS #theta_{mother}", m_histoList_GA);
1187 if (h2_Mother_geoAcc2D->GetEntries() == 0) B2WARNING("Empty histogram h2_Mother_geoAcc2D");
1188
1189 TH2F* h2_dau0Mother_geoAcc2D = geoAcc2D(m_h2_MC_dau0_2DMother, m_h2_RecoTrack_dau0_2DMother, "h2_dau0Mother_geoAcc2D",
1190 "geometrical acceptance dau_{0}, p_{T,mother} VS #theta_{mother}", m_histoList_GA);
1191 if (h2_dau0Mother_geoAcc2D->GetEntries() == 0) B2WARNING("Empty histogram h2_dau0Mother_geoAcc2D");
1192
1193 TH2F* h2_dau1Mother_geoAcc2D = geoAcc2D(m_h2_MC_dau1_2DMother, m_h2_RecoTrack_dau1_2DMother, "h2_dau1Mother_geoAcc2D",
1194 "geometrical acceptance p, p_{T,mother} VS #theta_{mother}", m_histoList_GA);
1195 if (h2_dau1Mother_geoAcc2D->GetEntries() == 0) B2WARNING("Empty histogram h2_dau1Mother_geoAcc2D");
1196
1197 //particles coming from inside the Beam Pipe
1198 TH2F* h2_dau0_geoAcc2D_BP = geoAcc2D(m_h2_MC_dau0_2D_BP, m_h2_RecoTrack_dau0_2D_BP, "h2_dau0_geoAcc2D_BP",
1199 "geometrical acceptance dau_{0}, p_{T,dau_{0}} VS #theta_{dau_{0}}, BP", m_histoList_GA);
1200 if (h2_dau0_geoAcc2D_BP->GetEntries() == 0) B2WARNING("Empty histogram h2_dau0_geoAcc2D_BP");
1201
1202 TH2F* h2_dau1_geoAcc2D_BP = geoAcc2D(m_h2_MC_dau1_2D_BP, m_h2_RecoTrack_dau1_2D_BP, "h2_dau1_geoAcc2D_BP",
1203 "geometrical acceptance p, p_{T,p} VS #theta_{p}, BP", m_histoList_GA);
1204 if (h2_dau1_geoAcc2D_BP->GetEntries() == 0) B2WARNING("Empty histogram h2_dau1_geoAcc2D_BP");
1205
1206 TH2F* h2_Mother_geoAcc2D_BP = geoAcc2D(m_h2_MC_Mother_2D_BP, m_h2_RecoTrack_Mother_2D_BP, "h2_Mother_geoAcc2D_BP",
1207 "geometrical acceptance mother, p_{T,mother} VS #theta_{mother}, BP", m_histoList_GA);
1208 if (h2_Mother_geoAcc2D_BP->GetEntries() == 0) B2WARNING("Empty histogram h2_Mother_geoAcc2D_BP");
1209 }
1210
1211 //---------------------------------------------------------------------------------
1212
1213 //write histograms on the output root file
1214 if (m_rootFilePtr != nullptr) {
1215 m_rootFilePtr->cd();
1216
1217 TIter nextHMC(m_histoList_MCParticles);
1218 TIter nextHTC(m_histoList_RecoTracks);
1219 TIter nextHT(m_histoList_Tracks);
1220 TIter nextHEff(m_histoList_Efficiencies);
1221 TIter nextHGA(m_histoList_GA);
1222 TIter nextHCheck(m_histoList_check);
1223
1224 TObject* obj;
1225
1226 if (m_allHistograms) {
1227 TDirectory* MCdir = m_rootFilePtr->mkdir("MCParticles");
1228 MCdir->cd();
1229 while ((obj = nextHMC()))
1230 obj->Write("", BIT(2), 0);
1231
1232 TDirectory* TCdir = m_rootFilePtr->mkdir("RecoTracks");
1233 TCdir->cd();
1234 while ((obj = nextHTC()))
1235 obj->Write("", BIT(2), 0);
1236
1237 TDirectory* Trdir = m_rootFilePtr->mkdir("Tracks");
1238 Trdir->cd();
1239 while ((obj = nextHT()))
1240 obj->Write("", BIT(2), 0);
1241
1242 TDirectory* check = m_rootFilePtr->mkdir("check");
1243 check->cd();
1244 while ((obj = nextHCheck()))
1245 obj->Write("", BIT(2), 0);
1246 }
1247
1248 TDirectory* Effdir = m_rootFilePtr->mkdir("Efficiencies");
1249 Effdir->cd();
1250 while ((obj = nextHEff()))
1251 obj->Write("", BIT(2), 0);
1252
1254 TDirectory* geoAcc = m_rootFilePtr->mkdir("geoAccettance");
1255 geoAcc->cd();
1256 while ((obj = nextHGA()))
1257 obj->Write("", BIT(2), 0);
1258 }
1259
1260
1261 m_rootFilePtr->Close();
1262 }
1263}
1264
1265bool EffPlotsModule::isK_Short(const MCParticle& the_mcParticle)
1266{
1267
1268 bool isK_S0 = false;
1269 if (abs(the_mcParticle.getPDG()) == Const::Kshort.getPDGCode())
1270 isK_S0 = true;
1271
1272 bool twoChargedProngs = false;
1273
1274 if (the_mcParticle.getDaughters().size() == 2 &&
1275 ((the_mcParticle.getDaughters()[0]->getPDG() == Const::pion.getPDGCode()
1276 && the_mcParticle.getDaughters()[1]->getPDG() == -Const::pion.getPDGCode()) ||
1277 (the_mcParticle.getDaughters()[0]->getPDG() == -Const::pion.getPDGCode()
1278 && the_mcParticle.getDaughters()[1]->getPDG() == Const::pion.getPDGCode())))
1279 twoChargedProngs = true;
1280
1281 return (isK_S0 && twoChargedProngs);
1282
1283}
1284
1285bool EffPlotsModule::isLambda0(const MCParticle& the_mcParticle)
1286{
1287
1288 bool isLambda = false;
1289 if (abs(the_mcParticle.getPDG()) == Const::Lambda.getPDGCode())
1290 isLambda = true;
1291
1292 bool twoChargedProngs = false;
1293
1294 if (the_mcParticle.getDaughters().size() == 2 &&
1295 ((the_mcParticle.getDaughters()[0]->getPDG() == Const::pion.getPDGCode()
1296 && the_mcParticle.getDaughters()[1]->getPDG() == -Const::proton.getPDGCode()) ||
1297 (the_mcParticle.getDaughters()[0]->getPDG() == -Const::pion.getPDGCode()
1298 && the_mcParticle.getDaughters()[1]->getPDG() == Const::proton.getPDGCode()) ||
1299 (the_mcParticle.getDaughters()[0]->getPDG() == Const::proton.getPDGCode()
1300 && the_mcParticle.getDaughters()[1]->getPDG() == -Const::pion.getPDGCode()) ||
1301 (the_mcParticle.getDaughters()[0]->getPDG() == -Const::proton.getPDGCode()
1302 && the_mcParticle.getDaughters()[1]->getPDG() == Const::pion.getPDGCode())))
1303 twoChargedProngs = true;
1304
1305 return (isLambda && twoChargedProngs);
1306
1307}
1308
1310{
1311
1312 int nMatchedDau = 0;
1313
1314 std::vector< MCParticle* > MCPart_dau = the_mcParticle.getDaughters();
1315
1316 bool first = false;
1317 bool second = false;
1318
1319 RelationVector<Track> Tracks_fromMCParticle_0 = DataStore::getRelationsWithObj<Track>(MCPart_dau[0]);
1320 if (Tracks_fromMCParticle_0.size() > 0)
1321 first = true;
1322
1323 RelationVector<Track> Tracks_fromMCParticle_1 = DataStore::getRelationsWithObj<Track>(MCPart_dau[1]);
1324 if (Tracks_fromMCParticle_1.size() > 0)
1325 second = true;
1326
1327
1328 if (first)
1329 nMatchedDau++;
1330
1331 if (second)
1332 nMatchedDau++;
1333
1334
1335 return nMatchedDau;
1336
1337}
int getPDGCode() const
PDG code.
Definition: Const.h:473
static const ParticleType Lambda
Lambda particle.
Definition: Const.h:679
static const ChargedStable pion
charged pion particle
Definition: Const.h:661
static const ChargedStable proton
proton particle
Definition: Const.h:663
static const ParticleType Kshort
K^0_S particle.
Definition: Const.h:677
TH1F * m_h1_RecoTrack_dau0_phiMother_FW
histogram of RecoTrack daughter 0's mother's phi (forward region)
TH1F * m_h1_MC_dau1_Mother_cosAngle
histogram of MCParticle daughter 1's and mother's cos(opening-angle)
TH1F * m_h1_RecoTrack_dau1_costheta
histogram of RecoTrack daughter 1's cos(theta)
TH1F * m_h1_V0_pz
histogram of V0 mother's pz
bool m_geometricalAccettance
true to create output for the geometrical acceptance
TH1F * m_h1_V0_phi
histogram of V0 mother's phi
TH3F * m_h3_track_dau1
histogram of Track daughter 1's pt vs theta vs phi
TH1F * m_h1_RecoTrack_dau0_pz
histogram of RecoTrack daughter 0's pz
TH1F * m_h1_RecoTrack_dau0_phi_BW
histogram of RecoTrack daughter 0's phi (backward region)
TH1F * m_h1_RecoTrack_Mother_theta
histogram of RecoTrack mother's theta
TH1F * m_h1_track_dau0_phi_barrel
histogram of Track daughter 0's phi (barrel region)
TH1F * m_h1_RecoTrack_dau1_p
histogram of RecoTrack daughter 1's p
std::string m_TFRColName
name of the TFR dataobjects collection
TH1F * m_h1_track_dau1_phi_barrel
histogram of Track daughter 1's phi (barrel region)
TH2F * m_h2_RecoTrack_Mother_pVScostheta
histogram of RecoTrack mother's p vs cos(theta)
TH1F * m_h1_track_dau0_ptMother
histogram of Track daughter 0's mother's pt
bool isK_Short(const MCParticle &the_mcParticle)
determine if the MCParticle is a K-short
TH1F * m_h1_MC_dau0_PDG
histogram of MCParticle daughter 0's PDG code
TH1F * m_h1_track_dau1_z0
histogram of Track daughter 1's z0
TH1F * m_h1_track_dau1_pt
histogram of Track daughter 1's pt
TH1F * m_h1_track_dau1_ptMother
histogram of Track daughter 1's mother's pt
TH1F * m_h1_MC_dau1_PDG
histogram of MCParticle daughter 1's PDG code
TH1F * m_h1_RecoTrack_dau0_phiMother_BW
histogram of RecoTrack daughter 0's mother's phi (backward region)
TH1F * m_h1_V0_pt
histogram of V0 mother's pt
TH1F * m_h1_track_dau0_RMother
histogram of Track daughter 0's RMother
TH2F * m_h2_V0_Mother_2D
histogram of V0 mother's pt vs theta
TH1F * m_h1_track_dau1_pz
histogram of Track daughter 1's pz
TH1F * m_h1_track_dau0_phiMother_barrel
histogram of Track daughter 0's mother's phi (barrel region)
TH1F * m_h1_track_dau0_costheta
histogram of Track daughter 0's cos(theta)
TH2F * m_h2_track_dau1_2DMother
histogram of Track daughter 1's mother's pt vs theta
TH1F * m_h1_MC_dau0_z0
histogram of MCParticle daughter 0's z0
TH1F * m_h1_RecoTrack_dau1_z0
histogram of RecoTrack daughter 1's z0
TH1F * m_h1_MC_dau1_ptMother
histogram of MCParticle daughter 1's mother's pt
void initialize() override
Initializer.
TH1F * m_h1_RecoTrack_dau1_phiMother_total
histogram of RecoTrack daughter 1's mother's phi
TH2F * m_h2_MC_dau1_2D_BP
histogram of MCParticle daughter 1's pt vs theta (beam pipe)
TH2F * m_h2_RecoTrack_Mother_2D_BP
histogram of RecoTrack mother's pt vs theta (beam pipe)
TH2F * m_h2_MC_dau1_pVScostheta
histogram of MCParticle daughter 1's p vs cos(theta)
TH1F * m_h1_V0_phi_barrel
histogram of V0 mother's phi (barrel region)
TH3F * m_h3_RecoTrack_Mother
histogram of RecoTrack mother's pt vs theta vs phi
TH1F * m_h1_track_dau0_pz
histogram of Track daughter 0's pz
TH1F * m_h1_MC_dau1_phi_BW
histogram of MCParticle daughter 1's phi (backward region)
TH1F * m_h1_RecoTrack_dau1_Mother_cosAngle
histogram of RecoTrack daughter 1's and mother's cos(opening-angle)
TH2F * m_h2_track_dau0_2D
histogram of Track daughter 0's pt vs theta
TH2F * m_h2_MC_Mother_pVScostheta
histogram of MCParticle mother's p vs cos(theta)
TH1F * m_h1_V0_phi_FW
histogram of V0 mother's phi (forward region)
TH1F * m_h1_track_dau0_phiMother_total
histogram of Track daughter 0's mother's phi
TH1F * m_h1_track_dau1_phi
histogram of Track daughter 1's phi
TH1F * m_h1_V0_RMother
histogram of V0 mother's RMother
TH1F * m_h1_track_dau0_theta
histogram of Track daughter 0's theta
TH1F * m_h1_MC_dau0_thetaMother
histogram of MCParticle daughter 0's mother's theta
TH1F * m_h1_MC_Mother_pt
histogram of MCParticle mother's pt
void event() override
This method is called for each event.
TH1F * m_h1_RecoTrack_dau1_phi
histogram of RecoTrack daughter 1's phi
TH2F * m_h2_V0_Mother_2D_BP
histogram of V0 mother's pt vs theta (beam pipe)
TH3F * m_h3_RecoTrack_dau1
histogram of RecoTrack daughter 1's pt vs theta vs phi
TH1F * m_h1_RecoTrack_dau1_phi_FW
histogram of RecoTrack daughter 1's phi (forward region)
TH1F * m_h1_RecoTrack_dau0_d0
list of histograms filled per RecoTracks found in the event
TH1F * m_h1_MC_Mother_phi
histogram of MCParticle mother's phi
TH1F * m_h1_V0_costheta
histogram of V0 mother's cos(theta)
TH1F * m_h1_MC_dau1_RMother
histogram of MCParticle daughter 1's RMother
TH1F * m_h1_track_dau1_Mother_cosAngle
histogram of Track daughter 1's and mother's cos(opening-angle)
TH1F * m_h1_MC_Mother_phi_FW
histogram of MCParticle mother's phi (forward region)
TH2F * m_h2_RecoTrack_dau1_pVScostheta
histogram of RecoTrack daughter 1's p vs cos(theta)
TH1F * m_h1_MC_dau0_phi
histogram of MCParticle daughter 0's phi
bool m_allHistograms
true to create all histograms
void endRun() override
This method is called if the current run ends.
TH2F * m_h2_track_dau0_pVScostheta
histogram of Track daughter 0's p vs cos(theta)
TH2F * m_h2_RecoTrack_dau0_2D_BP
histogram of RecoTrack daughter 0's pt vs theta (beam pipe)
TH1F * m_h1_RecoTrack_dau1_phi_BW
histogram of RecoTrack daughter 1's phi (backward region)
TH1F * m_h1_MC_dau1_thetaMother
histogram of MCParticle daughter 1's mother's theta
TH1F * m_h1_RecoTrack_dau0_phiMother_total
histogram of RecoTrack daughter 0's mother's phi
TH1F * m_h1_RecoTrack_Mother_phi_barrel
histogram of RecoTrack mother's phi (barrel region)
TH1F * m_h1_MC_dau0_pt
histogram of MCParticle daughter 0's pt
TH1F * m_h1_RecoTrack_dau0_ptMother
histogram of RecoTrack daughter 0's mother's pt
TH1F * m_h1_RecoTrack_dau0_phi_FW
histogram of RecoTrack daughter 0's phi (forward region)
void terminate() override
This method is called at the end of the event processing.
TH1F * m_h1_MC_dau0_costheta
histogram of MCParticle daughter 0's cos(theta)
TList * m_histoList_check
list of histograms of MCParticle mother and daughters
TH1F * m_h1_MC_dau1_theta
histogram of MCParticle daughter 1's theta
TH1F * m_h1_track_dau1_p
histogram of Track daughter 1's p
TH1F * m_h1_MC_Mother_PDG
histogram of MCParticle mother's PDG code
TH1F * m_h1_MC_dau0_Mother_cosAngle
histogram of MCParticle daughter 0's and mother's cos(opening-angle)
TH1F * m_h1_RecoTrack_dau0_theta
histogram of RecoTrack daughter 0's theta
std::string m_TrackColName
name of the Tracks dataobjects collection
TH3F * m_h3_MC_dau0
histogram of MCParticle daughter 0's pt vs theta vs phi
TH1F * m_h1_track_dau0_pt
histogram of Track daughter 0's pt
TH2F * m_h2_MC_Mother_2D_BP
histogram of MCParticle mother's pt vs theta (beam pipe)
TH1F * m_h1_MC_dau1_p
histogram of MCParticle daughter 1's p
TH1F * m_h1_track_dau0_Mother_cosAngle
histogram of Track daughter 0's and mother's cos(opening-angle)
TH1F * m_h1_track_dau0_z0
histogram of Track daughter 0's z0
TH1F * m_h1_MC_dau0_RMother
histogram of MCParticle daughter 0's RMother
TH1F * m_h1_V0_phi_BW
histogram of V0 mother's phi (backward region)
TH1F * m_h1_RecoTrack_dau1_pz
histogram of RecoTrack daughter 1's pz
TList * m_histoList_Efficiencies
list of histograms of efficiencies
TH3F * m_h3_V0
histogram of V0 mother's pt vs theta vs phi
TH1F * m_h1_RecoTrack_dau1_ptMother
histogram of RecoTrack daughter 1's mother's pt
TH1F * m_h1_MC_dau1_pt
histogram of MCParticle daughter 1's pt
TH1F * m_h1_track_dau0_p
histogram of Track daughter 0's p
TH2F * m_h2_RecoTrack_Mother_2D
histogram of RecoTrack mother's pt vs theta
int nMatchedDaughters(const MCParticle &the_mcParticle)
get the number of matched daughters of the MCParticle
std::string m_V0sType
type (as a string) of the selected V0
TH1F * m_h1_MC_Mother_p
histogram of MCParticle mother's p
TH2F * m_h2_MC_dau1_2D
histogram of MCParticle daughter 1's pt vs theta
TH3F * m_h3_MC_dau1
histogram of MCParticle daughter 1's pt vs theta vs phi
TH2F * m_h2_track_dau1_pVScostheta
histogram of Track daughter 1's p vs cos(theta)
TH1F * m_h1_RecoTrack_Mother_pz
histogram of RecoTrack mother's pz
TH1F * m_h1_MC_Mother_phi_BW
histogram of MCParticle mother's phi (backward region)
TH1F * m_h1_V0_p
histogram of V0 mother's p
TH1F * m_h1_RecoTrack_dau0_thetaMother
histogram of RecoTrack daughter 0's mother's theta
std::string m_V0sName
name of the V0s dataobjects collection
TList * m_histoList_GA
list of histograms of geometric acceptance
TH1F * m_h1_MC_dau0_phi_BW
histogram of MCParticle daughter 0's phi (backward region)
TH1F * m_h1_RecoTrack_dau0_RMother
histogram of RecoTrack daughter 0's RMother
TH2F * m_h2_track_dau1_2D
histogram of Track daughter 1's pt vs theta
TH1F * m_h1_RecoTrack_Mother_phi_FW
histogram of RecoTrack mother's phi (forward region)
void beginRun() override
Called when entering a new run.
TH1F * m_h1_RecoTrack_Mother_costheta
histogram of RecoTrack mother's cos(theta)
TH1F * m_h1_RecoTrack_dau0_z0
histogram of RecoTrack daughter 0's z0
TH1F * m_h1_RecoTrack_Mother_RMother
histogram of RecoTrack mother's RMother
TH2F * m_h2_track_dau0_2D_BP
histogram of Track daughter 0's pt vs theta (beam pipe)
TH1F * m_h1_MC_dau0_theta
histogram of MCParticle daughter 0's theta
TH1F * m_h1_MC_dau1_phiMother_FW
histogram of MCParticle daughter 1's mother's phi (forward region)
TH2F * m_h2_RecoTrack_dau0_2DMother
histogram of RecoTrack daughter 0's mother's pt vs theta
TH1F * m_h1_RecoTrack_dau1_phi_barrel
histogram of RecoTrack daughter 1's phi (barrel region)
TH1F * m_h1_RecoTrack_dau1_theta
histogram of RecoTrack daughter 1's theta
TH2F * m_h2_RecoTrack_dau1_2D
histogram of RecoTrack daughter 1's pt vs theta
TH3F * m_h3_RecoTrack_dau0
histogram of RecoTrack daughter 0's pt vs theta vs phi
TH2F * m_h2_RecoTrack_dau0_2D
histogram of RecoTrack daughter 0's pt vs theta
MCParticle * m_MCDaughter0
daughter 0 of a decayed MCParticle
TH1F * m_h1_MC_dau0_phiMother_barrel
histogram of MCParticle daughter 0's mother's phi (barrel region)
std::string m_RecoTracksName
name of the RecoTracks dataobjects collection
TH1F * m_h1_MC_dau0_ptMother
histogram of MCParticle daughter 0's mother's pt
TH1F * m_h1_track_dau0_d0
list of histograms filled per Tracks/V0 found in the event
TH1F * m_h1_RecoTrack_dau0_phiMother_barrel
histogram of RecoTrack daughter 0's mother's phi (barrel region)
TH1F * m_h1_track_dau1_costheta
histogram of Track daughter 1's cos(theta)
TH2F * m_h2_RecoTrack_dau1_2D_BP
histogram of RecoTrack daughter 1's pt vs theta (beam pipe)
TH1F * m_h1_MC_dau1_phiMother_BW
histogram of MCParticle daughter 1's mother's phi (backward region)
TList * m_histoList_MCParticles
list of histograms for MCParticles
TH1F * m_h1_MC_dau1_d0
histogram of MCParticle daughter 1's d0
TH1F * m_h1_MC_dau1_phi_FW
histogram of MCParticle daughter 1's phi (forward region)
TH1F * m_h1_MC_dau1_phiMother_total
histogram of MCParticle daughter 1's mother's phi
TH2F * m_h2_MC_dau0_2DMother
histogram of MCParticle daughter 0's mother's pt vs theta
TH1F * m_h1_MC_dau0_phi_FW
histogram of MCParticle daughter 0's phi (forward region)
EffPlotsModule()
Constructor.
std::string m_MCParticlesName
user-defined parameters
TH1F * m_h1_track_dau0_phi_BW
histogram of Track daughter 0's phi (backward region)
TH1F * m_h1_MC_dau0_phiMother_BW
histogram of MCParticle daughter 0's mother's phi (backward region)
TH2F * m_h2_track_dau0_2DMother
histogram of Track daughter 0's mother's pt vs theta
TH1F * m_h1_MC_dau0_pz
histogram of MCParticle daughter 0's pz
TH1F * m_h1_track_dau0_phiMother_FW
histogram of Track daughter 0's mother's phi (forward region)
TH1F * m_h1_MC_Mother_phi_barrel
histogram of MCParticle mother's phi (barrel region)
bool isLambda0(const MCParticle &the_mcParticle)
determine if the MCParticle is a Lambda0
TH1F * m_h1_MC_dau1_costheta
histogram of MCParticle daughter 1's cos(theta)
TH2F * m_h2_RecoTrack_dau1_2DMother
histogram of RecoTrack daughter 1's mother's pt vs theta
TH1F * m_h1_track_dau1_theta
histogram of Track daughter 1's theta
TH3F * m_h3_MC_Mother
histogram of MCParticle mother's pt vs theta vs phi
TH1F * m_h1_MC_dau1_phi_barrel
histogram of MCParticle daughter 1's phi (barrel region)
TH1F * m_h1_RecoTrack_Mother_pt
histogram of RecoTrack mother's pt
TH1F * m_h1_RecoTrack_dau1_phiMother_FW
histogram of RecoTrack daughter 1's mother's phi (forward region)
TH3F * m_h3_track_dau0
histogram of Track daughter 0's pt vs theta vs phi
TH1F * m_h1_track_dau1_phi_FW
histogram of Track daughter 1's phi (forward region)
TH1F * m_h1_RecoTrack_dau1_phiMother_BW
histogram of RecoTrack daughter 1's mother's phi (backward region)
TH2F * m_h2_MC_dau0_pVScostheta
histogram of MCParticle daughter 0's p vs cos(theta)
TH1F * m_h1_RecoTrack_dau0_phi
histogram of RecoTrack daughter 0's phi
TH1F * m_h1_RecoTrack_dau0_costheta
histogram of RecoTrack daughter 0's cos(theta)
TH2F * m_h2_MC_dau0_2D
histogram of MCParticle daughter 0's pt vs theta
TH1F * m_h1_MC_dau0_p
histogram of MCParticle daughter 0's p
TH1F * m_h1_RecoTrack_dau1_d0
histogram of RecoTrack daughter 1's d0
TH2F * m_h2_MC_dau1_2DMother
histogram of MCParticle daughter 1's mother's pt vs theta
TH1F * m_h1_RecoTrack_dau1_thetaMother
histogram of RecoTrack daughter 1's mother's theta
TH1F * m_h1_MC_dau0_phiMother_FW
histogram of MCParticle daughter 0's mother's phi (forward region)
TH2F * m_h2_V0_Mother_pVScostheta
histogram of V0 mother's p vs cos(theta)
TH1F * m_h1_MC_Mother_RMother
histogram of MCParticle mother's RMother
TH1F * m_h1_track_dau1_phiMother_FW
histogram of Track daughter 1's mother's phi (forward region)
TH1F * m_h1_RecoTrack_Mother_phi_BW
histogram of RecoTrack mother's phi (backward region)
TH1F * m_h1_MC_Mother_pz
histogram of MCParticle mother's pz
TH1F * m_h1_track_dau0_thetaMother
histogram of Track daughter 0's mother's theta
TH1F * m_h1_MC_dau1_phiMother_barrel
histogram of MCParticle daughter 1's mother's phi (barrel region)
TH1F * m_h1_MC_dau1_z0
histogram of MCParticle daughter 1's z0
TH1F * m_h1_V0_theta
histogram of V0 mother's theta
TH1F * m_h1_RecoTrack_dau1_RMother
histogram of RecoTrack daughter 1's RMother
TH1F * m_h1_track_dau1_RMother
histogram of Track daughter 1's RMother
TList * m_histoList_RecoTracks
list of histograms for RecoTracks
TH1F * m_h1_MC_dau0_phiMother_total
histogram of MCParticle daughter 0's mother's phi
TH1F * m_h1_MC_Mother_costheta
histogram of MCParticle mother's cos(theta)
TH1F * m_h1_RecoTrack_Mother_phi
histogram of RecoTrack mother's phi
TH1F * m_h1_track_dau0_phi
histogram of Track daughter 0's phi
TH1F * m_h1_RecoTrack_dau1_pt
histogram of RecoTrack daughter 1's pt
TH1F * m_h1_track_dau1_phiMother_total
histogram of Track daughter 1's mother's phi
TH1F * m_h1_RecoTrack_dau0_p
histogram of RecoTrack daughter 0's p
TH1F * m_h1_RecoTrack_dau0_Mother_cosAngle
histogram of RecoTrack daughter 0's and mother's cos(opening-angle)
TH1F * m_h1_track_dau0_phiMother_BW
histogram of Track daughter 0's mother's phi (backward region)
TH1F * m_h1_MC_dau0_d0
list of histograms filled per MCParticle found in the event
std::string m_MCRecoTracksName
name of the MCRecoTracks dataobjects collection
StoreArray< MCParticle > m_MCParticles
MCParticle StoreArray.
TH1F * m_h1_RecoTrack_dau0_pt
histogram of RecoTrack daughter 0's pt
~EffPlotsModule()
Destructor.
TH2F * m_h2_MC_dau0_2D_BP
histogram of MCParticle daughter 0's pt vs theta (beam pipe)
TH1F * m_h1_track_dau1_phiMother_barrel
histogram of Track daughter 1's mother's phi (barrel region)
TH1F * m_h1_RecoTrack_dau0_phi_barrel
histogram of RecoTrack daughter 0's phi (barrel region)
TH1F * m_h1_MC_Mother_theta
histogram of MCParticle mother's theta
TH1F * m_h1_track_dau1_phiMother_BW
histogram of Track daughter 1's mother's phi (backward region)
TH2F * m_h2_RecoTrack_dau0_pVScostheta
histogram of RecoTrack daughter 0's p vs cos(theta)
MCParticle * m_MCDaughter1
daughter 1 of a decayed MCParticle
TList * m_histoList_Tracks
list of histograms for Tracks
TH1F * m_h1_RecoTrack_dau1_phiMother_barrel
histogram of RecoTrack daughter 1's mother's phi (barrel region)
TH2F * m_h2_track_dau1_2D_BP
histogram of Track daughter 1's pt vs theta (beam pipe)
TH1F * m_h1_MC_dau1_phi
histogram of MCParticle daughter 1's phi
TH2F * m_h2_MC_Mother_2D
histogram of MCParticle mother's pt vs theta
TH1F * m_h1_track_dau1_d0
histogram of Track daughter 1's d0
TH1F * m_h1_track_dau0_phi_FW
histogram of Track daughter 0's phi (forward region)
TH1F * m_h1_MC_dau0_phi_barrel
histogram of MCParticle daughter 0's phi (barrel region)
TH1F * m_h1_MC_dau1_pz
histogram of MCParticle daughter 1's pz
TH1F * m_h1_track_dau1_phi_BW
histogram of Track daughter 1's phi (backward region)
TH1F * m_h1_RecoTrack_Mother_p
histogram of RecoTrack mother's p
TH1F * m_h1_track_dau1_thetaMother
histogram of Track daughter 1's mother's theta
This struct is used by the TrackingPerformanceEvaluation Module to save information of reconstructed ...
double getPt()
Getter for transverse momentum.
double getPtheta()
Getter for theta of momentum vector.
double getZ0()
Getter for Z0.
double getPz()
Getter for z component of momentum.
double getPphi()
Getter for phi of momentum vector.
double getD0()
Getter for D0.
double getP()
Getter for magnitut of momentum.
A Class to store the Monte Carlo particle information.
Definition: MCParticle.h:32
std::vector< Belle2::MCParticle * > getDaughters() const
Get vector of all daughter particles, empty vector if none.
Definition: MCParticle.cc:52
int getPDG() const
Return PDG code of particle.
Definition: MCParticle.h:112
ROOT::Math::XYZVector getMomentum() const
Return momentum.
Definition: MCParticle.h:198
Base class for Modules.
Definition: Module.h:72
void setDescription(const std::string &description)
Sets the description of the module.
Definition: Module.cc:214
TH1F * createHistogram1D(const char *name, const char *title, Int_t nbins, Double_t min, Double_t max, const char *xtitle, TList *histoList=nullptr)
Create a 1D histogram and add it to the TList of 1D-histograms.
TH2F * effPlot2D(TH2F *h2_den, TH2F *h2_num, const char *name, const char *title, bool geo_accettance, TList *histoList=nullptr)
Create a 2D efficiency histogram and add it to the TList of 2D-histograms.
TH1F * effPlot1D(TH1F *h1_den, TH1F *h1_num, const char *name, const char *title, bool geo_accettance, TList *histoList=nullptr)
Create a 1D efficiency histogram and add it to the TList of 1D-histograms.
TH1 * duplicateHistogram(const char *newname, const char *newtitle, TH1 *h, TList *histoList=nullptr)
Make a copy of a 1D histogram and add it to the TList of 1D-histograms.
TH1F * V0FinderEff(TH1F *h1_dau0, TH1F *h1_dau1, TH1F *h1_Mother, const char *name, const char *title, TList *histoList=nullptr)
Create a 1D efficiency histogram for V0 finding and add it to the TList of 1D-histograms.
TList * m_histoList
List of performance-evaluation histograms.
TH1F * geoAcc1D(TH1F *h1_den, TH1F *h1_num, const char *name, const char *title, TList *histoList=nullptr)
Create a 1D efficiency histogram for geometric acceptance and add it to the TList of 1D-histograms.
TH3F * createHistogram3D(const char *name, const char *title, Int_t nbinsX, Double_t minX, Double_t maxX, const char *titleX, Int_t nbinsY, Double_t minY, Double_t maxY, const char *titleY, Int_t nbinsZ, Double_t minZ, Double_t maxZ, const char *titleZ, TList *histoList=nullptr)
Create a 3D histogram and add it to the TList of 3D-histograms.
TH2F * createHistogram2D(const char *name, const char *title, Int_t nbinsX, Double_t minX, Double_t maxX, const char *titleX, Int_t nbinsY, Double_t minY, Double_t maxY, const char *titleY, TList *histoList=nullptr)
Create a 2D histogram and add it to the TList of 2D-histograms.
TH2F * geoAcc2D(TH2F *h2_den, TH2F *h2_num, const char *name, const char *title, TList *histoList=nullptr)
Create a 2D efficiency histogram for geometric acceptance and add it to the TList of 2D-histograms.
TFile * m_rootFilePtr
pointer at root file used for storing histograms
Class for type safe access to objects that are referred to in relations.
size_t size() const
Get number of relations.
T * getRelated(const std::string &name="", const std::string &namedRelation="") const
Get the object to or from which this object has a relation.
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Class that bundles various TrackFitResults.
Definition: Track.h:25
static const double T
[tesla]
Definition: Unit.h:120
void addParam(const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
Definition: Module.h:560
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition: Module.h:650
static void getField(const double *pos, double *field)
return the magnetic field at a given position.
Definition: BFieldManager.h:91
double sqrt(double a)
sqrt for double
Definition: beamHelpers.h:28
Abstract base class for different kinds of events.