Belle II Software  release-06-02-00
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/StoreArray.h>
12 #include <framework/datastore/RelationVector.h>
13 
14 #include <framework/geometry/BFieldManager.h>
15 
16 #include <framework/gearbox/Const.h>
17 
18 #include <tracking/dataobjects/MCParticleInfo.h>
19 #include <tracking/dataobjects/RecoTrack.h>
20 #include <tracking/dataobjects/V0ValidationVertex.h>
21 
22 #include <root/TObject.h>
23 
24 #include <boost/foreach.hpp>
25 #include <vector>
26 
27 using namespace Belle2;
28 
29 //-----------------------------------------------------------------
30 // Register the Module
31 //-----------------------------------------------------------------
32 
33 REG_MODULE(EffPlots)
34 
36  Module()
37 {
38 
39  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.");
40 
41  addParam("outputFileName", m_rootFileName, "Name of output root file.",
42  std::string("EffPlots_output.root"));
43  addParam("V0sName", m_V0sName, "Name of V0 collection.", std::string("V0ValidationVertexs"));
44  addParam("MCParticlesName", m_MCParticlesName, "Name of MC Particle collection.", std::string(""));
45  addParam("TrackColName", m_TrackColName,
46  "Belle2::Track collection name (input). Note that the V0s use "
47  "pointers indices into these arrays, so all hell may break loose "
48  "if you change this.", std::string(""));
49  addParam("RecoTracksName", m_RecoTracksName, "Name of RecoTrack collection.", std::string("RecoTracks"));
50  addParam("MCRecoTracksName", m_MCRecoTracksName, "Name of MCRecoTrack collection.", std::string("MCRecoTracks"));
51 
52  addParam("V0sType", m_V0sType, "Type of V0 to perform plots. Default is Lambda0, alternatively Ks", std::string("Lambda0"));
53  addParam("AllHistograms", m_allHistograms, "Create output for all histograms, not only efficiencies.", bool(false));
54  addParam("GeometricalAccettance", m_geometricalAccettance, "Create output for geometrical accettance.", bool(false));
55 }
56 
58 {
59 
60 }
61 
63 {
64 
65  StoreArray<MCParticle> mcParticles;
66  mcParticles.isRequired(m_MCParticlesName);
67  StoreArray<V0ValidationVertex> v0ValidationVertices;
68  v0ValidationVertices.isRequired(m_V0sName);
69 
71  trackFitResults.isRequired();
72 
74  tracks.isRequired();
75 
76  StoreArray<RecoTrack> recoTracks;
77  recoTracks.isRequired(m_MCRecoTracksName);
78 
79  //create list of histograms to be saved in the rootfile
80  m_histoList = new TList;
81  m_histoList_MCParticles = new TList;
82  m_histoList_RecoTracks = new TList;
83  m_histoList_Tracks = new TList;
84  m_histoList_Efficiencies = new TList;
85  m_histoList_GA = new TList;
86  m_histoList_check = new TList;
87 
88  //set the ROOT File
89  m_rootFilePtr = new TFile(m_rootFileName.c_str(), "RECREATE");
90 
91  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};
92 
93  Double_t bins_theta[10 + 1];
94  Double_t width_theta = TMath::Pi() / 10;
95  for (unsigned int bin = 0; bin < 10 + 1; bin++)
96  bins_theta[bin] = bin * width_theta;
97 
98  Double_t bins_phi[14 + 1];
99  Double_t width_phi = 2 * TMath::Pi() / 14;
100  for (unsigned int bin = 0; bin < 14 + 1; bin++)
101  bins_phi[bin] = - TMath::Pi() + bin * width_phi;
102 
103  Double_t bins_costheta[20 + 1];
104  Double_t width_cosTheta = 2. / 20;
105  for (unsigned int bin1 = 0; bin1 < 20 + 1; bin1++)
106  bins_costheta[bin1] = - 1 + bin1 * width_cosTheta;
107 
108  //create histograms
109 
110  //------------------------------------------------------------------//
111  // MC PARTICLES //
112  //------------------------------------------------------------------//
113 
114  // MC dau0
115  m_h1_MC_dau0_d0 = createHistogram1D("h1MCdau0D0", "d0 dau_{0}", 100, -10, 10, "d0_{dau_{0}}", m_histoList_MCParticles);
116  m_h1_MC_dau0_z0 = createHistogram1D("h1MCdau0Z0", "z0 dau_{0}", 100, -10, 10, "z0_{dau_{0}}", m_histoList_MCParticles);
117  m_h1_MC_dau0_RMother = createHistogram1D("h1MCdau0RMother", "dau_{0}, R mother", 200, 0, 20, "R mother", m_histoList_MCParticles);
118  m_h3_MC_dau0 = createHistogram3D("h3MCdau0", "entry per MC dau_{0}",
119  25, bins_pt_new, "p_{t} (GeV/c)",
120  10, bins_theta, "#theta",
121  14, bins_phi, "#phi", m_histoList_MCParticles);
122  m_h1_MC_dau0_pt = createHistogram1D("h1MCdau0Pt", "dau_{0}, p_{T}", 25, bins_pt_new, "p_{T} (GeV/c)", m_histoList_MCParticles);
123  m_h1_MC_dau0_pz = createHistogram1D("h1MCdau0Pz", "dau_{0}, p_{z}", 25, bins_pt_new, "p_{z} (GeV/c)", m_histoList_MCParticles);
124  m_h1_MC_dau0_p = createHistogram1D("h1MCdau0P", "dau_{0}, p", 25, bins_pt_new, "p (GeV/c)", m_histoList_MCParticles);
125  m_h1_MC_dau0_theta = createHistogram1D("h1MCdau0Theta", "dau_{0}, #theta", 10, bins_theta, "#theta",
127  m_h1_MC_dau0_costheta = createHistogram1D("h1MCdau0CosTheta", "dau_{0}, cos#theta", 20, bins_costheta, "cos#theta",
129  m_h1_MC_dau0_Mother_cosAngle = createHistogram1D("h1MCdau0MothercosAngle", "cos#theta_{mother,dau_{0}}", 20,
130  bins_costheta, "cos#theta", m_histoList_MCParticles);
131  m_h1_MC_dau0_phi = createHistogram1D("h1MCdau0Phi", "dau_{0}, #phi", 14, bins_phi, "#phi", m_histoList_MCParticles);
132  m_h1_MC_dau0_phi_BW = createHistogram1D("h1MCdau0PhiBW", "dau_{0}, #phi", 14, bins_phi, "#phi", m_histoList_MCParticles);
133  m_h1_MC_dau0_phi_barrel = createHistogram1D("h1MCdau0Phibarrel", "dau_{0}, #phi", 14, bins_phi, "#phi",
135  m_h1_MC_dau0_phi_FW = createHistogram1D("h1MCdau0PhiFW", "dau_{0}, #phi", 14, bins_phi, "#phi", m_histoList_MCParticles);
136 
137  m_h1_MC_dau0_phiMother_total = createHistogram1D("h1MCdau0phiMothertotal", "dau_{0}, #phi_{mother}", 14, bins_phi,
138  "#phi_{mother}", m_histoList_MCParticles);
139  m_h1_MC_dau0_phiMother_BW = createHistogram1D("h1MCdau0phiMotherBW", "dau_{0}, #phi_{mother}, BW", 14, bins_phi,
140  "#phi_{mother} BW", m_histoList_MCParticles);
141  m_h1_MC_dau0_phiMother_barrel = createHistogram1D("h1MCdau0phiMotherbarrel", "dau_{0}, #phi_{mother}, barrel", 14, bins_phi,
142  "#phi_{mother} barrel", m_histoList_MCParticles);
143  m_h1_MC_dau0_phiMother_FW = createHistogram1D("h1MCdau0phiMotherFW", "dau_{0}, #phi_{mother}, FW", 14, bins_phi,
144  "#phi_{mother} FW", m_histoList_MCParticles);
145 
146  m_h1_MC_dau0_thetaMother = createHistogram1D("h1MCdau0ThetaMother", "dau_{0}, #theta_{mother}", 10, bins_theta,
147  "#theta_{mother}", m_histoList_MCParticles);
148  m_h1_MC_dau0_ptMother = createHistogram1D("h1MCdau0PtMother", "dau_{0}, p_{T,mother}", 25, bins_pt_new, "p_{T,mother} (GeV/c)",
150 
151  m_h2_MC_dau0_2D = createHistogram2D("h2MCdau0", "entry per MC dau_{0}",
152  10, bins_theta, "#theta",
153  25, bins_pt_new, "p_{t} (GeV/c)", m_histoList_MCParticles);
154  m_h2_MC_dau0_2D_BP = createHistogram2D("h2MCdau0BP", "entry per MC dau_{0}, beam pipe",
155  10, bins_theta, "#theta",
156  25, bins_pt_new, "p_{t} (GeV/c)", m_histoList_MCParticles);
157 
158  m_h2_MC_dau0_2DMother = createHistogram2D("h2MCdau0Mother", "entry mother per MC dau_{0}",
159  10, bins_theta, "#theta_{mother}",
160  25, bins_pt_new, "p_{T,mother} (GeV/c)", m_histoList_MCParticles);
161 
162  m_h2_MC_dau0_pVScostheta = createHistogram2D("h2MCdau0pVScostheta", "p_{CM} VS cos(#theta)_{CM}, dau_{0}",
163  20, -1., 1.,
164  "cos(#theta)_{CM}",
165  50, 0., 5.,
166  "p_{CM} [GeV]", m_histoList_MCParticles);
167 
168  m_h1_MC_dau0_PDG = createHistogram1D("h1MCdau0PDG", "PDG code, dau_{0}", 4600, -2300, 2300, "PDG", m_histoList_check);
169 
170  //MC dau1
171  m_h1_MC_dau1_d0 = createHistogram1D("h1MCdau1D0", "d0 dau_{1}", 100, -10, 10, "d0_{dau_{1}}", m_histoList_MCParticles);
172  m_h1_MC_dau1_z0 = createHistogram1D("h1MCdau1Z0", "z0 dau_{1}", 100, -10, 10, "z0_{dau_{1}}", m_histoList_MCParticles);
173  m_h1_MC_dau1_RMother = createHistogram1D("h1MCdau1RMother", "dau_{1}, R mother", 200, 0, 20, "R mother", m_histoList_MCParticles);
174  m_h3_MC_dau1 = createHistogram3D("h3MCdau1", "entry per MC dau_{1}",
175  25, bins_pt_new, "p_{t} (GeV/c)",
176  10, bins_theta, "#theta",
177  14, bins_phi, "#phi", m_histoList_MCParticles);
178  m_h1_MC_dau1_pt = createHistogram1D("h1MCdau1Pt", "dau_{1}, p_{T}", 25, bins_pt_new, "p_{T} (GeV/c)", m_histoList_MCParticles);
179  m_h1_MC_dau1_pz = createHistogram1D("h1MCdau1Pz", "dau_{1}, p_{z}", 25, bins_pt_new, "p_{z} (GeV/c)", m_histoList_MCParticles);
180  m_h1_MC_dau1_p = createHistogram1D("h1MCdau1P", "dau_{1}, ", 25, bins_pt_new, "p (GeV/c)", m_histoList_MCParticles);
181  m_h1_MC_dau1_theta = createHistogram1D("h1MCdau1Theta", "dau_{1}, #theta", 10, bins_theta, "#theta",
183  m_h1_MC_dau1_costheta = createHistogram1D("h1MCdau1CosTheta", "dau_{1}, cos#theta", 20, bins_costheta, "cos#theta",
185  m_h1_MC_dau1_phi = createHistogram1D("h1MCdau1Phi", "dau_{1}, #phi", 14, bins_phi, "#phi", m_histoList_MCParticles);
186  m_h1_MC_dau1_phi_BW = createHistogram1D("h1MCdau1PhiBW", "dau_{1}, #phi", 14, bins_phi, "#phi", m_histoList_MCParticles);
187  m_h1_MC_dau1_phi_barrel = createHistogram1D("h1MCdau1Phibarrel", "dau_{1}, #phi", 14, bins_phi, "#phi",
189  m_h1_MC_dau1_phi_FW = createHistogram1D("h1MCdau1PhiFW", "dau_{1}, #phi", 14, bins_phi, "#phi", m_histoList_MCParticles);
190 
191  m_h1_MC_dau1_Mother_cosAngle = createHistogram1D("h1MCdau1MothercosAngle", "cos#theta_{mother,p}", 20, bins_costheta,
192  "cos#theta", m_histoList_MCParticles);
193 
194  m_h1_MC_dau1_phiMother_total = createHistogram1D("h1MCdau1phiMothertotal", "dau_{1}, #phi_{mother}", 14, bins_phi,
195  "#phi_{mother}", m_histoList_MCParticles);
196  m_h1_MC_dau1_phiMother_BW = createHistogram1D("h1MCdau1phiMotherBW", "dau_{1}, #phi_{mother}, BW", 14, bins_phi,
197  "#phi_{mother} BW", m_histoList_MCParticles);
198  m_h1_MC_dau1_phiMother_barrel = createHistogram1D("h1MCdau1phiMotherbarrel", "dau_{1}, #phi_{mother}, barrel", 14, bins_phi,
199  "#phi_{mother} barrel", m_histoList_MCParticles);
200  m_h1_MC_dau1_phiMother_FW = createHistogram1D("h1MCdau1phiMotherFW", "dau_{1}, #phi_{mother}, FW", 14, bins_phi,
201  "#phi_{mother} FW", m_histoList_MCParticles);
202 
203  m_h1_MC_dau1_thetaMother = createHistogram1D("h1MCdau1ThetaMother", "dau_{1}, #theta_{mother}", 10, bins_theta,
204  "#theta_{mother}", m_histoList_MCParticles);
205  m_h1_MC_dau1_ptMother = createHistogram1D("h1MCdau1PtMother", "dau_{1}, p_{T,mother}", 25, bins_pt_new, "p_{T,mother} (GeV/c)",
207 
208  m_h2_MC_dau1_2D = createHistogram2D("h2MCdau1", "entry per MC dau_{1}",
209  10, bins_theta, "#theta",
210  25, bins_pt_new, "p_{t} (GeV/c)", m_histoList_MCParticles);
211 
212  m_h2_MC_dau1_2D_BP = createHistogram2D("h2MCdau1BP", "entry per MC dau_{1}, beam pipe",
213  10, bins_theta, "#theta",
214  25, bins_pt_new, "p_{t} (GeV/c)", m_histoList_MCParticles);
215 
216  m_h2_MC_dau1_2DMother = createHistogram2D("h2MCdau1Mother", "entry mother per MC dau_{1}",
217  10, bins_theta, "#theta_{mother}",
218  25, bins_pt_new, "p_{T,mother} (GeV/c)", m_histoList_MCParticles);
219 
220  m_h2_MC_dau1_pVScostheta = createHistogram2D("h2MCdau1pVScostheta", "p_{CM} VS cos(#theta)_{CM}, dau_{1}",
221  20, -1., 1.,
222  "cos(#theta)_{CM}",
223  50, 0., 5.,
224  "p_{CM} [GeV]", m_histoList_MCParticles);
225 
226  m_h1_MC_dau1_PDG = createHistogram1D("h1MCdau1PDG", "PDG code, dau_{1}", 4600, -2300, 2300, "PDG", m_histoList_check);
227 
228  //MC mother
229  m_h1_MC_Mother_RMother = createHistogram1D("h1MCMotherRMother", "mother, R mother", 200, 0, 20, "R mother",
231  m_h3_MC_Mother = createHistogram3D("h3MCMother", "entry per MCmother",
232  25, bins_pt_new, "p_{t} (GeV/c)",
233  10, bins_theta, "#theta",
234  14, bins_phi, "#phi", m_histoList_MCParticles);
235  m_h1_MC_Mother_pt = createHistogram1D("h1MCMotherPt", "mother, p_{T}", 25, bins_pt_new, "p_{T} (GeV/c)",
237  m_h1_MC_Mother_pz = createHistogram1D("h1MCMotherPz", "mother, p_{z}", 25, bins_pt_new, "p_{z} (GeV/c)",
239  m_h1_MC_Mother_p = createHistogram1D("h1MCMotherP", "mother, p", 25, bins_pt_new, "p (GeV/c)", m_histoList_MCParticles);
240  m_h1_MC_Mother_theta = createHistogram1D("h1MCMotherTheta", "mother, #theta", 10, bins_theta, "#theta",
242  m_h1_MC_Mother_costheta = createHistogram1D("h1MCMotherCosTheta", "mother, cos#theta", 20, bins_costheta, "cos#theta",
244  m_h1_MC_Mother_phi = createHistogram1D("h1MCMotherPhi", "mother, #phi", 14, bins_phi, "#phi", m_histoList_MCParticles);
245  m_h1_MC_Mother_phi_BW = createHistogram1D("h1MCMotherPhiBW", "mother, #phi", 14, bins_phi, "#phi", m_histoList_MCParticles);
246  m_h1_MC_Mother_phi_barrel = createHistogram1D("h1MCMotherPhibarrel", "mother, #phi", 14, bins_phi, "#phi",
248  m_h1_MC_Mother_phi_FW = createHistogram1D("h1MCMotherPhiFW", "mother, #phi", 14, bins_phi, "#phi", m_histoList_MCParticles);
249 
250  m_h2_MC_Mother_2D = createHistogram2D("h2MCMother", "entry per MCmother",
251  10, bins_theta, "#theta",
252  25, bins_pt_new, "p_{t} (GeV/c)", m_histoList_MCParticles);
253 
254  m_h2_MC_Mother_2D_BP = createHistogram2D("h2MCMotherBP", "entry per MCmother, beam pipe",
255  10, bins_theta, "#theta",
256  25, bins_pt_new, "p_{t} (GeV/c)", m_histoList_MCParticles);
257 
258  m_h2_MC_Mother_pVScostheta = createHistogram2D("h2MCMotherpVScostheta", "p_{CM} VS cos(#theta)_{CM}, mother",
259  20, -1., 1.,
260  "cos(#theta)_{CM}",
261  50, 0., 5.,
262  "p_{CM} [GeV]", m_histoList_MCParticles);
263 
264  m_h1_MC_Mother_PDG = createHistogram1D("h1MCMotherPDG", "PDG code, mother", 6400, -3200, 3200, "PDG", m_histoList_check);
265 
266 
267  //------------------------------------------------------------------//
268  // TRACKS //
269  //------------------------------------------------------------------//
270 
271  //track dau0
272  m_h1_track_dau0_d0 = (TH1F*)duplicateHistogram("h1trackdau0D0", "d0 dau_{0}", m_h1_MC_dau0_d0, m_histoList_Tracks);
273  m_h1_track_dau0_z0 = (TH1F*)duplicateHistogram("h1trackdau0Z0", "z0 dau_{0}", m_h1_MC_dau0_z0, m_histoList_Tracks);
274  m_h1_track_dau0_RMother = (TH1F*)duplicateHistogram("h1trackdau0RMother", "dau_{0}, R mother", m_h1_MC_dau0_RMother,
276  m_h3_track_dau0 = (TH3F*)duplicateHistogram("h3trackdau0", "entry per track dau_{0}", m_h3_MC_dau0, m_histoList_Tracks);
277  m_h1_track_dau0_pt = (TH1F*)duplicateHistogram("h1trackdau0Pt", "p_{T} dau_{0}", m_h1_MC_dau0_pt, m_histoList_Tracks);
278  m_h1_track_dau0_pz = (TH1F*)duplicateHistogram("h1trackdau0Pz", "p_{z} dau_{0}", m_h1_MC_dau0_pz, m_histoList_Tracks);
279  m_h1_track_dau0_p = (TH1F*)duplicateHistogram("h1trackdau0P", "p dau_{0}", m_h1_MC_dau0_p, m_histoList_Tracks);
280  m_h1_track_dau0_theta = (TH1F*)duplicateHistogram("h1trackdau0Theta", "#theta dau_{0}", m_h1_MC_dau0_theta, m_histoList_Tracks);
281  m_h1_track_dau0_costheta = (TH1F*)duplicateHistogram("h1trackdau0CosTheta", "cos#theta dau_{0}", m_h1_MC_dau0_costheta,
283  m_h1_track_dau0_Mother_cosAngle = (TH1F*)duplicateHistogram("h1trackdau0MothercosAngle", "#alpha_{mother,dau_{0}}",
285  m_h1_track_dau0_phi = (TH1F*)duplicateHistogram("h1trackdau0Phi", "#phi dau_{0}", m_h1_MC_dau0_phi, m_histoList_Tracks);
286  m_h1_track_dau0_phi_BW = (TH1F*)duplicateHistogram("h1trackdau0PhiBW", "#phi dau_{0}", m_h1_MC_dau0_phi_BW, m_histoList_Tracks);
287  m_h1_track_dau0_phi_barrel = (TH1F*)duplicateHistogram("h1trackdau0Phibarrel", "#phi dau_{0}", m_h1_MC_dau0_phi_barrel,
289  m_h1_track_dau0_phi_FW = (TH1F*)duplicateHistogram("h1trackdau0PhiFW", "#phi dau_{0}", m_h1_MC_dau0_phi_FW, m_histoList_Tracks);
290 
291  m_h1_track_dau0_phiMother_total = (TH1F*)duplicateHistogram("h1trackdau0PhiMothertotal", "dau_{0}, #phi_{mother}",
293  m_h1_track_dau0_phiMother_BW = (TH1F*)duplicateHistogram("h1trackdau0PhiMotherBW", "dau_{0}, #phi_{mother}, BW",
295  m_h1_track_dau0_phiMother_barrel = (TH1F*)duplicateHistogram("h1trackdau0PhiMotherbarrel", "dau_{0}, #phi_{mother}, barrel",
297  m_h1_track_dau0_phiMother_FW = (TH1F*)duplicateHistogram("h1trackdau0PhiMotherFW", "dau_{0}, #phi_{mother}, FW",
299 
300  m_h1_track_dau0_thetaMother = (TH1F*)duplicateHistogram("h1trackdau0ThetaMother", "#theta_{mother} dau_{0}",
302  m_h1_track_dau0_ptMother = (TH1F*)duplicateHistogram("h1trackdau0PtMother", "p_{T,mother} dau_{0}", m_h1_MC_dau0_ptMother,
304 
305  m_h2_track_dau0_2D = (TH2F*)duplicateHistogram("h2trackdau02D", "p_{T} VS #theta, dau_{0}", m_h2_MC_dau0_2D, m_histoList_Tracks);
306  m_h2_track_dau0_2D_BP = (TH2F*)duplicateHistogram("h2trackdau02dBP", "p_{T} VS #theta, dau_{0} BP", m_h2_MC_dau0_2D_BP,
308  m_h2_track_dau0_2DMother = (TH2F*)duplicateHistogram("h2trackdau02DMother", "p_{T,mother} VS #theta_{mother}, dau_{0}",
310 
311  m_h2_track_dau0_pVScostheta = (TH2F*)duplicateHistogram("h2trackdau0pVScostheta", "p VS cos(#theta), dau_{0}",
313 
314 
315  //track dau1
316  m_h1_track_dau1_d0 = (TH1F*)duplicateHistogram("h1trackdau1D0", "d0 dau_{1}", m_h1_MC_dau1_d0, m_histoList_Tracks);
317  m_h1_track_dau1_z0 = (TH1F*)duplicateHistogram("h1trackdau1Z0", "z0 dau_{1}", m_h1_MC_dau1_z0, m_histoList_Tracks);
318  m_h1_track_dau1_RMother = (TH1F*)duplicateHistogram("h1trackdau1RMother", "p, R mother", m_h1_MC_dau1_RMother, m_histoList_Tracks);
319  m_h3_track_dau1 = (TH3F*)duplicateHistogram("h3trackdau1", "entry per track dau_{1}", m_h3_MC_dau1, m_histoList_Tracks);
320  m_h1_track_dau1_pt = (TH1F*)duplicateHistogram("h1trackdau1Pt", "p_{T} dau_{1}", m_h1_MC_dau1_pt, m_histoList_Tracks);
321  m_h1_track_dau1_pz = (TH1F*)duplicateHistogram("h1trackdau1Pz", "p_{z} dau_{1}", m_h1_MC_dau1_pz, m_histoList_Tracks);
322  m_h1_track_dau1_p = (TH1F*)duplicateHistogram("h1trackdau1P", "p dau_{1}", m_h1_MC_dau1_p, m_histoList_Tracks);
323  m_h1_track_dau1_theta = (TH1F*)duplicateHistogram("h1trackdau1Theta", "#theta dau_{1}", m_h1_MC_dau1_theta, m_histoList_Tracks);
324  m_h1_track_dau1_costheta = (TH1F*)duplicateHistogram("h1trackdau1CosTheta", "cos#theta dau_{1}", m_h1_MC_dau1_costheta,
326  m_h1_track_dau1_Mother_cosAngle = (TH1F*)duplicateHistogram("h1trackdau1MothercosAngle", "#alpha_{mother,p}",
328  m_h1_track_dau1_phi = (TH1F*)duplicateHistogram("h1trackdau1Phi", "#phi dau_{1}", m_h1_MC_dau1_phi, m_histoList_Tracks);
329  m_h1_track_dau1_phi_BW = (TH1F*)duplicateHistogram("h1trackdau1PhiBW", "#phi dau_{1}", m_h1_MC_dau1_phi_BW, m_histoList_Tracks);
330  m_h1_track_dau1_phi_barrel = (TH1F*)duplicateHistogram("h1trackdau1Phibarrel", "#phi dau_{1}", m_h1_MC_dau1_phi_barrel,
332  m_h1_track_dau1_phi_FW = (TH1F*)duplicateHistogram("h1trackdau1PhiFW", "#phi dau_{1}", m_h1_MC_dau1_phi_FW, m_histoList_Tracks);
333 
334  m_h1_track_dau1_phiMother_total = (TH1F*)duplicateHistogram("h1trackdau1PhiMothertotal", "dau_{1}, #phi_{mother}",
336  m_h1_track_dau1_phiMother_BW = (TH1F*)duplicateHistogram("h1trackdau1PhiMotherBW", "dau_{1}, #phi_{mother}, BW",
338  m_h1_track_dau1_phiMother_barrel = (TH1F*)duplicateHistogram("h1trackdau1PhiMotherbarrel", "dau_{1}, #phi_{mother}, barrel",
340  m_h1_track_dau1_phiMother_FW = (TH1F*)duplicateHistogram("h1trackdau1PhiMotherFW", "dau_{1}, #phi_{mother}, FW",
342 
343  m_h1_track_dau1_thetaMother = (TH1F*)duplicateHistogram("h1trackdau1ThetaMother", "#theta_{mother} dau_{1}",
345  m_h1_track_dau1_ptMother = (TH1F*)duplicateHistogram("h1trackdau1PtMother", "p_{T,mother} dau_{1}", m_h1_MC_dau1_ptMother,
347 
348  m_h2_track_dau1_2D = (TH2F*)duplicateHistogram("h2trackdau12D", "p_{T} VS #theta, dau_{1}", m_h2_MC_dau1_2D, m_histoList_Tracks);
349  m_h2_track_dau1_2D_BP = (TH2F*)duplicateHistogram("h2trackdau12dBP", "p_{T} VS #theta, p BDAU_{1}", m_h2_MC_dau1_2D_BP,
351  m_h2_track_dau1_2DMother = (TH2F*)duplicateHistogram("h2trackdau12DMother", "p_{T,mother} VS #theta_{mother}, dau_{1}",
353 
354  m_h2_track_dau1_pVScostheta = (TH2F*)duplicateHistogram("h2trackdau1pVScostheta", "p VS cos(#theta), dau_{1}",
356 
357  //V0
358  m_h1_V0_RMother = (TH1F*)duplicateHistogram("h1V0RMother", "mother, R mother", m_h1_MC_Mother_RMother, m_histoList_Tracks);
359  m_h3_V0 = (TH3F*)duplicateHistogram("h3V0", "entry per V0", m_h3_MC_Mother, m_histoList_Tracks);
360  m_h1_V0_pt = (TH1F*)duplicateHistogram("h1V0Pt", "p_{T} mother", m_h1_MC_Mother_pt, m_histoList_Tracks);
361  m_h1_V0_pz = (TH1F*)duplicateHistogram("h1V0Pz", "p_{z} mother", m_h1_MC_Mother_pz, m_histoList_Tracks);
362  m_h1_V0_p = (TH1F*)duplicateHistogram("h1V0P", "p mother", m_h1_MC_Mother_p, m_histoList_Tracks);
363  m_h1_V0_theta = (TH1F*)duplicateHistogram("h1V0Theta", "#theta mother", m_h1_MC_Mother_theta, m_histoList_Tracks);
364  m_h1_V0_costheta = (TH1F*)duplicateHistogram("h1V0CosTheta", "cos#theta mother", m_h1_MC_Mother_costheta, m_histoList_Tracks);
365  m_h1_V0_phi = (TH1F*)duplicateHistogram("h1V0Phi", "#phi mother", m_h1_MC_Mother_phi, m_histoList_Tracks);
366  m_h1_V0_phi_BW = (TH1F*)duplicateHistogram("h1V0PhiBW", "#phi mother", m_h1_MC_Mother_phi_BW, m_histoList_Tracks);
367  m_h1_V0_phi_barrel = (TH1F*)duplicateHistogram("h1V0Phibarrel", "#phi mother", m_h1_MC_Mother_phi_barrel, m_histoList_Tracks);
368  m_h1_V0_phi_FW = (TH1F*)duplicateHistogram("h1V0PhiFW", "#phi mother", m_h1_MC_Mother_phi_FW, m_histoList_Tracks);
369 
370  m_h2_V0_Mother_2D = (TH2F*)duplicateHistogram("h2V0Mother2D", "p_{T} VS #theta, mother", m_h2_MC_Mother_2D, m_histoList_Tracks);
371  m_h2_V0_Mother_2D_BP = (TH2F*)duplicateHistogram("h2V0Mother2dBP", "p_{T} VS #theta, mother BP", m_h2_MC_Mother_2D_BP,
373 
374  m_h2_V0_Mother_pVScostheta = (TH2F*)duplicateHistogram("h2V0MotherpVScostheta", "p VS cos(#theta), mother",
376 
377 
378  //------------------------------------------------------------------//
379  // RECO TRACKS //
380  //------------------------------------------------------------------//
381 
382  //RecoTrack dau0
383  m_h1_RecoTrack_dau0_d0 = (TH1F*)duplicateHistogram("h1RecoTrackdau0D0", "d0 dau_{0}", m_h1_MC_dau0_d0, m_histoList_RecoTracks);
384  m_h1_RecoTrack_dau0_z0 = (TH1F*)duplicateHistogram("h1RecoTrackdau0Z0", "z0 dau_{0}", m_h1_MC_dau0_z0, m_histoList_RecoTracks);
385  m_h1_RecoTrack_dau0_RMother = (TH1F*)duplicateHistogram("h1RecoTrackdau0RMother", "dau_{0}, R mother", m_h1_MC_dau0_RMother,
387  m_h3_RecoTrack_dau0 = (TH3F*)duplicateHistogram("h3RecoTrackdau0", "entry per RecoTrack dau_{0}", m_h3_MC_dau0,
389  m_h1_RecoTrack_dau0_pt = (TH1F*)duplicateHistogram("h1RecoTrackdau0Pt", "p_{T} dau_{0}", m_h1_MC_dau0_pt, m_histoList_RecoTracks);
390  m_h1_RecoTrack_dau0_pz = (TH1F*)duplicateHistogram("h1RecoTrackdau0Pz", "p_{z} dau_{0}", m_h1_MC_dau0_pz, m_histoList_RecoTracks);
391  m_h1_RecoTrack_dau0_p = (TH1F*)duplicateHistogram("h1RecoTrackdau0P", "p dau_{0}", m_h1_MC_dau0_p, m_histoList_RecoTracks);
392  m_h1_RecoTrack_dau0_theta = (TH1F*)duplicateHistogram("h1RecoTrackdau0Theta", "#theta dau_{0}", m_h1_MC_dau0_theta,
394  m_h1_RecoTrack_dau0_costheta = (TH1F*)duplicateHistogram("h1RecoTrackdau0CosTheta", "cos#theta dau_{0}", m_h1_MC_dau0_costheta,
396  m_h1_RecoTrack_dau0_Mother_cosAngle = (TH1F*)duplicateHistogram("h1RecoTrackdau0MothercosAngle", "#alpha_{mother,dau_{0}}",
398  m_h1_RecoTrack_dau0_phi = (TH1F*)duplicateHistogram("h1RecoTrackdau0Phi", "#phi dau_{0}", m_h1_MC_dau0_phi, m_histoList_RecoTracks);
399  m_h1_RecoTrack_dau0_phi_BW = (TH1F*)duplicateHistogram("h1RecoTrackdau0PhiBW", "#phi dau_{0}", m_h1_MC_dau0_phi_BW,
401  m_h1_RecoTrack_dau0_phi_barrel = (TH1F*)duplicateHistogram("h1RecoTrackdau0Phibarrel", "#phi dau_{0}", m_h1_MC_dau0_phi_barrel,
403  m_h1_RecoTrack_dau0_phi_FW = (TH1F*)duplicateHistogram("h1RecoTrackdau0PhiFW", "#phi dau_{0}", m_h1_MC_dau0_phi_FW,
405 
406  m_h1_RecoTrack_dau0_phiMother_total = (TH1F*)duplicateHistogram("h1RecoTrackdau0PhiMothertotal", "dau_{0}, #phi_{mother}",
408  m_h1_RecoTrack_dau0_phiMother_BW = (TH1F*)duplicateHistogram("h1RecoTrackdau0PhiMotherBW", "dau_{0}, #phi_{mother}, BW",
410  m_h1_RecoTrack_dau0_phiMother_barrel = (TH1F*)duplicateHistogram("h1RecoTrackdau0PhiMotherbarrel", "dau_{0}, #phi_{mother}, barrel",
412  m_h1_RecoTrack_dau0_phiMother_FW = (TH1F*)duplicateHistogram("h1RecoTrackdau0PhiMotherFW", "dau_{0}, #phi_{mother}, FW",
414 
415  m_h1_RecoTrack_dau0_thetaMother = (TH1F*)duplicateHistogram("h1RecoTrackdau0ThetaMother", "#theta_{mother} dau_{0}",
417  m_h1_RecoTrack_dau0_ptMother = (TH1F*)duplicateHistogram("h1RecoTrackdau0PtMother", "p_{T,mother} dau_{0}", m_h1_MC_dau0_pt,
419 
420  m_h2_RecoTrack_dau0_2D = (TH2F*)duplicateHistogram("h2RecoTrackdau02D", "p_{T} VS #theta, dau_{0}", m_h2_MC_dau0_2D,
422  m_h2_RecoTrack_dau0_2D_BP = (TH2F*)duplicateHistogram("h2RecoTrackdau02dBP", "p_{T} VS #theta, dau_{0} BP", m_h2_MC_dau0_2D_BP,
424  m_h2_RecoTrack_dau0_2DMother = (TH2F*)duplicateHistogram("h2RecoTrackdau02DMother", "p_{T,mother} VS #theta_{mother}, dau_{0}",
426 
427  m_h2_RecoTrack_dau0_pVScostheta = (TH2F*)duplicateHistogram("h2RecoTrackdau0pVscostheta", "p VS cos(#theta), dau_{0}",
429 
430  //RecoTrack dau1
431  m_h1_RecoTrack_dau1_d0 = (TH1F*)duplicateHistogram("h1RecoTrackdau1D0", "d0 dau_{1}", m_h1_MC_dau1_d0, m_histoList_RecoTracks);
432  m_h1_RecoTrack_dau1_z0 = (TH1F*)duplicateHistogram("h1RecoTrackdau1Z0", "z0 dau_{1}", m_h1_MC_dau1_z0, m_histoList_RecoTracks);
433  m_h1_RecoTrack_dau1_RMother = (TH1F*)duplicateHistogram("h1RecoTrackdau1RMother", "dau_{1}, R mother", m_h1_MC_dau1_RMother,
435  m_h3_RecoTrack_dau1 = (TH3F*)duplicateHistogram("h3RecoTrackdau1", "entry per RecoTrack dau_{1}", m_h3_MC_dau1,
437  m_h1_RecoTrack_dau1_pt = (TH1F*)duplicateHistogram("h1RecoTrackdau1Pt", "p_{T} dau_{1}", m_h1_MC_dau1_pt, m_histoList_RecoTracks);
438  m_h1_RecoTrack_dau1_pz = (TH1F*)duplicateHistogram("h1RecoTrackdau1Pz", "p_{z} dau_{1}", m_h1_MC_dau1_pz, m_histoList_RecoTracks);
439  m_h1_RecoTrack_dau1_p = (TH1F*)duplicateHistogram("h1RecoTrackdau1P", "p dau_{1}", m_h1_MC_dau1_p, m_histoList_RecoTracks);
440  m_h1_RecoTrack_dau1_theta = (TH1F*)duplicateHistogram("h1RecoTrackdau1Theta", "#theta dau_{1}", m_h1_MC_dau1_theta,
442  m_h1_RecoTrack_dau1_costheta = (TH1F*)duplicateHistogram("h1RecoTrackdau1CosTheta", "cos#theta dau_{1}", m_h1_MC_dau1_costheta,
444  m_h1_RecoTrack_dau1_Mother_cosAngle = (TH1F*)duplicateHistogram("h1RecoTrackdau1MothercosAngle", "#alpha_{mother,p}",
446  m_h1_RecoTrack_dau1_phi = (TH1F*)duplicateHistogram("h1RecoTrackdau1Phi", "#phi dau_{1}", m_h1_MC_dau1_phi, m_histoList_RecoTracks);
447  m_h1_RecoTrack_dau1_phi_BW = (TH1F*)duplicateHistogram("h1RecoTrackdau1PhiBW", "#phi dau_{1}", m_h1_MC_dau1_phi_BW,
449  m_h1_RecoTrack_dau1_phi_barrel = (TH1F*)duplicateHistogram("h1RecoTrackdau1Phibarrel", "#phi dau_{1}", m_h1_MC_dau1_phi_barrel,
451  m_h1_RecoTrack_dau1_phi_FW = (TH1F*)duplicateHistogram("h1RecoTrackdau1PhiFW", "#phi dau_{1}", m_h1_MC_dau1_phi_FW,
453 
454  m_h1_RecoTrack_dau1_phiMother_total = (TH1F*)duplicateHistogram("h1RecoTrackdau1PhiMothertotal", "dau_{1}, #phi_{mother}",
456  m_h1_RecoTrack_dau1_phiMother_BW = (TH1F*)duplicateHistogram("h1RecoTrackdau1PhiMotherBW", "dau_{1}, #phi_{mother}, BW",
458  m_h1_RecoTrack_dau1_phiMother_barrel = (TH1F*)duplicateHistogram("h1RecoTrackdau1PhiMotherbarrel", "dau_{1}, #phi_{mother}, barrel",
460  m_h1_RecoTrack_dau1_phiMother_FW = (TH1F*)duplicateHistogram("h1RecoTrackdau1PhiMotherFW", "dau_{1}, #phi_{mother}, FW",
462 
463  m_h1_RecoTrack_dau1_thetaMother = (TH1F*)duplicateHistogram("h1RecoTrackdau1ThetaMother", "#theta_{mother} dau_{1}",
465  m_h1_RecoTrack_dau1_ptMother = (TH1F*)duplicateHistogram("h1RecoTrackdau1PtMother", "p_{T,mother} dau_{1}", m_h1_MC_dau1_pt,
467 
468  m_h2_RecoTrack_dau1_2D = (TH2F*)duplicateHistogram("h2RecoTrackdau12D", "p_{T} VS #theta, dau_{1}", m_h2_MC_dau1_2D,
470  m_h2_RecoTrack_dau1_2D_BP = (TH2F*)duplicateHistogram("h2RecoTrackdau12dBP", "p_{T} VS #theta, p BP", m_h2_MC_dau1_2D_BP,
472  m_h2_RecoTrack_dau1_2DMother = (TH2F*)duplicateHistogram("h2RecoTrackdau12DMother", "p_{T,mother} VS #theta_{mother}, dau_{1}",
474 
475  m_h2_RecoTrack_dau1_pVScostheta = (TH2F*)duplicateHistogram("h2RecoTrackdau1pVscostheta", "p VS cos(#theta), dau_{1}",
477 
478  //RecoTrack Mother
479  m_h1_RecoTrack_Mother_RMother = (TH1F*)duplicateHistogram("h1RecoTrack_MotherRMother", "mother, R mother", m_h1_MC_Mother_RMother,
481  m_h3_RecoTrack_Mother = (TH3F*)duplicateHistogram("h3RecoTrack_Mother", "entry per RecoTrack_Mother", m_h3_MC_Mother,
483  m_h1_RecoTrack_Mother_pt = (TH1F*)duplicateHistogram("h1RecoTrack_MotherPt", "p_{T} mother", m_h1_MC_dau0_pt,
485  m_h1_RecoTrack_Mother_pz = (TH1F*)duplicateHistogram("h1RecoTrack_MotherPz", "p_{z} mother", m_h1_MC_dau0_pz,
487  m_h1_RecoTrack_Mother_p = (TH1F*)duplicateHistogram("h1RecoTrack_MotherP", "p mother", m_h1_MC_dau0_p, m_histoList_RecoTracks);
488  m_h1_RecoTrack_Mother_theta = (TH1F*)duplicateHistogram("h1RecoTrack_MotherTheta", "#theta mother", m_h1_MC_dau0_theta,
490  m_h1_RecoTrack_Mother_costheta = (TH1F*)duplicateHistogram("h1RecoTrack_MotherCosTheta", "cos#theta mother", m_h1_MC_dau0_costheta,
492  m_h1_RecoTrack_Mother_phi = (TH1F*)duplicateHistogram("h1RecoTrack_MotherPhi", "#phi mother", m_h1_MC_dau0_phi,
494  m_h1_RecoTrack_Mother_phi_BW = (TH1F*)duplicateHistogram("h1RecoTrack_MotherPhiBW", "#phi mother", m_h1_MC_dau0_phi_BW,
496  m_h1_RecoTrack_Mother_phi_barrel = (TH1F*)duplicateHistogram("h1RecoTrack_MotherPhibarrel", "#phi mother", m_h1_MC_dau0_phi_barrel,
498  m_h1_RecoTrack_Mother_phi_FW = (TH1F*)duplicateHistogram("h1RecoTrack_MotherPhiFW", "#phi mother", m_h1_MC_dau0_phi_FW,
500 
501  m_h2_RecoTrack_Mother_2D = (TH2F*)duplicateHistogram("h2RecoTrack_Mother2D", "p_{T} VS #theta, mother", m_h2_MC_Mother_2D,
503  m_h2_RecoTrack_Mother_2D_BP = (TH2F*)duplicateHistogram("h2RecoTrack_Mother2dBP", "p_{T} VS #theta, mother BP",
505 
506  m_h2_RecoTrack_Mother_pVScostheta = (TH2F*)duplicateHistogram("h2RecoTrackMotherpVscostheta", "p VS cos(#theta), mother",
508 
509 }
510 
512 {
513 
514 }
515 
517 {
518 
520 
521  B2Vector3D magField = BFieldManager::getField(0, 0, 0) / Unit::T;
522 
523  B2DEBUG(99, "+++++ 1. loop on MCParticles");
524  BOOST_FOREACH(MCParticle & mcParticle, mcParticles) {
525 
526  //------------------------------------------------------------------//
527  // MC PARTICLES //
528  //------------------------------------------------------------------//
529 
530  if (m_V0sType == "Lambda0") {
531  if (! isLambda0(mcParticle))
532  continue;
533 
534  std::vector< MCParticle* > MCPart_dau = mcParticle.getDaughters();
535 
536  if (abs(MCPart_dau[0]->getPDG()) == Const::pion.getPDGCode() && abs(MCPart_dau[1]->getPDG()) == Const::proton.getPDGCode()) {
537  mc_dau0 = MCPart_dau[0];
538  mc_dau1 = MCPart_dau[1];
539  } else if (abs(MCPart_dau[0]->getPDG()) == Const::proton.getPDGCode() && abs(MCPart_dau[1]->getPDG()) == Const::pion.getPDGCode()) {
540  mc_dau0 = MCPart_dau[1];
541  mc_dau1 = MCPart_dau[0];
542  } else B2INFO("Lambda daughters != pi & p");
543  }
544 
545  else if (m_V0sType == "Ks") {
546  if (! isK_Short(mcParticle))
547  continue;
548 
549  std::vector< MCParticle* > MCPart_dau = mcParticle.getDaughters();
550 
551  if (MCPart_dau[0]->getPDG() == Const::pion.getPDGCode() && MCPart_dau[1]->getPDG() == -Const::pion.getPDGCode()) {
552  mc_dau0 = MCPart_dau[0];
553  mc_dau1 = MCPart_dau[1];
554  } else if (MCPart_dau[0]->getPDG() == -Const::pion.getPDGCode() && MCPart_dau[1]->getPDG() == Const::pion.getPDGCode()) {
555  mc_dau0 = MCPart_dau[1];
556  mc_dau1 = MCPart_dau[0];
557  } else B2INFO("Ks daughters != pi+ & pi-");
558  }
559 
560  MCParticleInfo mcParticleInfo(mcParticle, magField);
561  MCParticleInfo mcParticleInfo_dau0(*mc_dau0, magField);
562  MCParticleInfo mcParticleInfo_dau1(*mc_dau1, magField);
563 
564  TVector3 MC_prodvtx = mcParticle.getVertex();
565  TVector3 MC_vtx = mcParticle.getDecayVertex();
566  TVector3 MC_FL = MC_vtx - MC_prodvtx;
567 
568  float MC_transDist = sqrt(MC_vtx.X() * MC_vtx.X() + MC_vtx.Y() * MC_vtx.Y());
569  float MC_pt = mcParticle.getMomentum().Pt();
570  float MC_p = mcParticle.getMomentum().Mag();
571  float MC_phi = mcParticle.getMomentum().Phi();
572  float MC_theta = mcParticle.getMomentum().Theta();
573  float MC_costheta = mcParticle.getMomentum().CosTheta();
574 
575  m_h1_MC_dau0_d0->Fill(mcParticleInfo_dau0.getD0());
576  m_h1_MC_dau0_z0->Fill(mcParticleInfo_dau0.getZ0());
577  m_h1_MC_dau0_RMother->Fill(MC_transDist);
578  m_h3_MC_dau0->Fill(mc_dau0->getMomentum().Pt(), mc_dau0->getMomentum().Theta(), mc_dau0->getMomentum().Phi());
579  m_h1_MC_dau0_pt->Fill(mc_dau0->getMomentum().Pt());
580  m_h1_MC_dau0_pz->Fill(mc_dau0->getMomentum().Pz());
581  m_h1_MC_dau0_p->Fill(mc_dau0->getMomentum().Mag());
582  m_h1_MC_dau0_phi->Fill(mc_dau0->getMomentum().Phi());
583  m_h1_MC_dau0_theta->Fill(mc_dau0->getMomentum().Theta());
584  m_h1_MC_dau0_costheta->Fill(mc_dau0->getMomentum().CosTheta());
585  m_h1_MC_dau0_Mother_cosAngle->Fill(mcParticle.getMomentum() * mc_dau0->getMomentum() / mcParticle.getMomentum().Mag() /
586  mc_dau0->getMomentum().Mag());
587 
588  m_h1_MC_dau0_thetaMother->Fill(MC_theta);
589  m_h1_MC_dau0_ptMother->Fill(MC_pt);
590 
591  m_h1_MC_dau0_phiMother_total->Fill(MC_phi);
592  m_h2_MC_dau0_2D->Fill(mc_dau0->getMomentum().Theta(), mc_dau0->getMomentum().Pt());
593  m_h2_MC_dau0_2DMother->Fill(MC_theta, MC_pt);
594  m_h2_MC_dau0_pVScostheta->Fill(mc_dau0->getMomentum().CosTheta(), mc_dau0->getMomentum().Mag());
595  m_h1_MC_dau0_PDG->Fill(mc_dau0->getPDG());
596 
597  m_h1_MC_dau1_d0->Fill(mcParticleInfo_dau1.getD0());
598  m_h1_MC_dau1_z0->Fill(mcParticleInfo_dau1.getZ0());
599  m_h1_MC_dau1_RMother->Fill(MC_transDist);
600  m_h3_MC_dau1->Fill(mc_dau1->getMomentum().Pt(), mc_dau1->getMomentum().Theta(), mc_dau1->getMomentum().Phi());
601  m_h1_MC_dau1_pt->Fill(mc_dau1->getMomentum().Pt());
602  m_h1_MC_dau1_pz->Fill(mc_dau1->getMomentum().Pz());
603  m_h1_MC_dau1_p->Fill(mc_dau1->getMomentum().Mag());
604  m_h1_MC_dau1_phi->Fill(mc_dau1->getMomentum().Phi());
605  m_h1_MC_dau1_theta->Fill(mc_dau1->getMomentum().Theta());
606  m_h1_MC_dau1_costheta->Fill(mc_dau1->getMomentum().CosTheta());
607  m_h1_MC_dau1_Mother_cosAngle->Fill(mcParticle.getMomentum() * mc_dau1->getMomentum() / mcParticle.getMomentum().Mag() /
608  mc_dau1->getMomentum().Mag());
609 
610  m_h1_MC_dau1_thetaMother->Fill(MC_theta);
611  m_h1_MC_dau1_ptMother->Fill(MC_pt);
612 
613  m_h1_MC_dau1_phiMother_total->Fill(MC_phi);
614  m_h2_MC_dau1_2D->Fill(mc_dau1->getMomentum().Theta(), mc_dau1->getMomentum().Pt());
615  m_h2_MC_dau1_2DMother->Fill(MC_theta, MC_pt);
616  m_h2_MC_dau1_pVScostheta->Fill(mc_dau1->getMomentum().CosTheta(), mc_dau1->getMomentum().Mag());
617  m_h1_MC_dau1_PDG->Fill(mc_dau1->getPDG());
618 
619  m_h1_MC_Mother_RMother->Fill(MC_transDist);
620  m_h3_MC_Mother->Fill(MC_pt, MC_theta, MC_phi);
621  m_h1_MC_Mother_pt->Fill(MC_pt);
622  m_h1_MC_Mother_pz->Fill(mcParticle.getMomentum().Pz());
623  m_h1_MC_Mother_p->Fill(mcParticle.getMomentum().Mag());
624  m_h1_MC_Mother_phi->Fill(MC_phi);
625  m_h1_MC_Mother_theta->Fill(MC_theta);
626  m_h1_MC_Mother_costheta->Fill(mcParticle.getMomentum().CosTheta());
627  m_h2_MC_Mother_2D->Fill(MC_theta, MC_pt);
628  m_h2_MC_Mother_pVScostheta->Fill(MC_costheta, MC_p);
629  m_h1_MC_Mother_PDG->Fill(mcParticle.getPDG());
630 
631  //beam pipe
632  if (MC_transDist < 1.) {
633  m_h2_MC_dau0_2D_BP->Fill(mc_dau0->getMomentum().Theta(), mc_dau0->getMomentum().Pt());
634  m_h2_MC_dau1_2D_BP->Fill(mc_dau1->getMomentum().Theta(), mc_dau1->getMomentum().Pt());
635  m_h2_MC_Mother_2D_BP->Fill(MC_theta, MC_pt);
636  }
637 
638 
639  if (MC_theta > (120 * TMath::Pi() / 180.)) { //BW
640  m_h1_MC_dau0_phiMother_BW->Fill(MC_phi);
641  m_h1_MC_dau1_phiMother_BW->Fill(MC_phi);
642  m_h1_MC_dau0_phi_BW->Fill(mc_dau0->getMomentum().Phi());
643  m_h1_MC_dau1_phi_BW->Fill(mc_dau1->getMomentum().Phi());
644  m_h1_MC_Mother_phi_BW->Fill(MC_phi);
645  } else if (MC_theta < (30. * TMath::Pi() / 180.)) { //FW, theta < 30)
646  m_h1_MC_dau0_phiMother_FW->Fill(MC_phi);
647  m_h1_MC_dau1_phiMother_FW->Fill(MC_phi);
648  m_h1_MC_dau0_phi_FW->Fill(mc_dau0->getMomentum().Phi());
649  m_h1_MC_dau1_phi_FW->Fill(mc_dau1->getMomentum().Phi());
650  m_h1_MC_Mother_phi_FW->Fill(MC_phi);
651  } else { //barrel
652  m_h1_MC_dau0_phiMother_barrel->Fill(MC_phi);
653  m_h1_MC_dau1_phiMother_barrel->Fill(MC_phi);
656  m_h1_MC_Mother_phi_barrel->Fill(MC_phi);
657  }
658 
659  //------------------------------------------------------------------//
660  // MC RECO TRACKS //
661  //------------------------------------------------------------------//
662 
663  RelationVector<RecoTrack> MCRecoTracks_MCdau0 =
664  DataStore::getRelationsWithObj<RecoTrack>(mc_dau0, m_MCRecoTracksName); //oppure &mc_dau0;
665 
666  RelationVector<RecoTrack> MCRecoTracks_MCdau1 =
667  DataStore::getRelationsWithObj<RecoTrack>(mc_dau1, m_MCRecoTracksName);
668 
669  if (MCRecoTracks_MCdau0.size() > 0) {
670  m_h1_RecoTrack_dau0_d0->Fill(mcParticleInfo_dau0.getD0());
671  m_h1_RecoTrack_dau0_z0->Fill(mcParticleInfo_dau0.getZ0());
672  m_h1_RecoTrack_dau0_RMother->Fill(MC_transDist);
673  m_h3_RecoTrack_dau0->Fill(mc_dau0->getMomentum().Pt(), mc_dau0->getMomentum().Theta(), mc_dau0->getMomentum().Phi());
676  m_h1_RecoTrack_dau0_p->Fill(mc_dau0->getMomentum().Mag());
679  m_h1_RecoTrack_dau0_costheta->Fill(mc_dau0->getMomentum().CosTheta());
680  m_h1_RecoTrack_dau0_Mother_cosAngle->Fill(mcParticle.getMomentum() * mc_dau0->getMomentum() / mcParticle.getMomentum().Mag() /
681  mc_dau0->getMomentum().Mag());
682 
683  m_h1_RecoTrack_dau0_thetaMother->Fill(MC_theta);
684  m_h1_RecoTrack_dau0_ptMother->Fill(MC_pt);
685 
687  m_h2_RecoTrack_dau0_2D->Fill(mc_dau0->getMomentum().Theta(), mc_dau0->getMomentum().Pt());
688  m_h2_RecoTrack_dau0_2DMother->Fill(MC_theta, MC_pt);
690 
691  if (MC_transDist < 1.) {
693  }
694 
695  if (mc_dau0->getMomentum().Theta() > (120 * TMath::Pi() / 180.)) m_h1_RecoTrack_dau0_phi_BW->Fill(mc_dau0->getMomentum().Phi());
696  else if (mc_dau0->getMomentum().Theta() < (30. * TMath::Pi() / 180.)) m_h1_RecoTrack_dau0_phi_FW->Fill(
697  mc_dau0->getMomentum().Phi());
699 
700  if (MC_theta > (120 * TMath::Pi() / 180.)) m_h1_RecoTrack_dau0_phiMother_BW->Fill(MC_phi);
701  else if (MC_theta < (30. * TMath::Pi() / 180.)) m_h1_RecoTrack_dau0_phiMother_FW->Fill(MC_phi);
702  else m_h1_RecoTrack_dau0_phiMother_barrel->Fill(MC_phi);
703 
704  //V0 candidates
705  if (MCRecoTracks_MCdau1.size() > 0) {
706  m_h1_RecoTrack_Mother_RMother->Fill(MC_transDist);
707  m_h3_RecoTrack_Mother->Fill(MC_pt, MC_theta, MC_phi);
708  m_h1_RecoTrack_Mother_pt->Fill(MC_pt);
709  m_h1_RecoTrack_Mother_pz->Fill(mcParticle.getMomentum().Pz());
710  m_h1_RecoTrack_Mother_p->Fill(mcParticle.getMomentum().Mag());
711  m_h1_RecoTrack_Mother_phi->Fill(MC_phi);
712  m_h1_RecoTrack_Mother_theta->Fill(MC_theta);
713  m_h1_RecoTrack_Mother_costheta->Fill(mcParticle.getMomentum().CosTheta());
714 
715  m_h1_RecoTrack_Mother_pt->Fill(MC_pt);
716  m_h2_RecoTrack_Mother_2D->Fill(MC_theta, MC_pt);
717 
718  m_h2_RecoTrack_Mother_pVScostheta->Fill(MC_costheta, MC_p);
719 
720  if (MC_transDist < 1.) m_h2_RecoTrack_Mother_2D_BP->Fill(MC_theta, MC_pt);
721 
722  if (MC_theta > (120 * TMath::Pi() / 180.)) //BW
723  m_h1_RecoTrack_Mother_phi_BW->Fill(MC_phi);
724  else if (MC_theta < (30. * TMath::Pi() / 180.))//FW
725  m_h1_RecoTrack_Mother_phi_FW->Fill(MC_phi);
726  else
727  m_h1_RecoTrack_Mother_phi_barrel->Fill(MC_phi);
728  }
729  }
730 
731  if (MCRecoTracks_MCdau1.size() > 0) {
732  m_h1_RecoTrack_dau1_d0->Fill(mcParticleInfo_dau1.getD0());
733  m_h1_RecoTrack_dau1_z0->Fill(mcParticleInfo_dau1.getZ0());
734  m_h1_RecoTrack_dau1_RMother->Fill(MC_transDist);
735  m_h3_RecoTrack_dau1->Fill(mc_dau1->getMomentum().Pt(), mc_dau1->getMomentum().Theta(), mc_dau1->getMomentum().Phi());
738  m_h1_RecoTrack_dau1_p->Fill(mc_dau1->getMomentum().Mag());
741  m_h1_RecoTrack_dau1_costheta->Fill(mc_dau1->getMomentum().CosTheta());
742  m_h1_RecoTrack_dau1_Mother_cosAngle->Fill(mcParticle.getMomentum() * mc_dau1->getMomentum() / mcParticle.getMomentum().Mag() /
743  mc_dau1->getMomentum().Mag());
744 
745  m_h1_RecoTrack_dau1_thetaMother->Fill(MC_theta);
746  m_h1_RecoTrack_dau1_ptMother->Fill(MC_pt);
747 
749  m_h2_RecoTrack_dau1_2D->Fill(mc_dau1->getMomentum().Theta(), mc_dau1->getMomentum().Pt());
750  m_h2_RecoTrack_dau1_2DMother->Fill(MC_theta, MC_pt);
752 
753  if (MC_transDist < 1.) {
755 
756  if (mc_dau1->getMomentum().Theta() > (120 * TMath::Pi() / 180.)) m_h1_RecoTrack_dau1_phi_BW->Fill(mc_dau1->getMomentum().Phi());
757  else if (mc_dau1->getMomentum().Theta() < (30. * TMath::Pi() / 180.)) m_h1_RecoTrack_dau1_phi_FW->Fill(
758  mc_dau1->getMomentum().Phi());
760 
761  if (MC_theta > (120 * TMath::Pi() / 180.)) m_h1_RecoTrack_dau1_phiMother_BW->Fill(MC_phi);
762  else if (MC_theta < (30. * TMath::Pi() / 180.)) m_h1_RecoTrack_dau1_phiMother_FW->Fill(MC_phi);
763  else m_h1_RecoTrack_dau1_phiMother_barrel->Fill(MC_phi);
764  }
765  }
766 
767  //------------------------------------------------------------------//
768  // TRACKS //
769  //------------------------------------------------------------------//
770 
771  Track* Track_dau0ToMCParticle = mc_dau0->getRelated<Track>();
772  Track* Track_dau1ToMCParticle = mc_dau1->getRelated<Track>();
773 
774  if (Track_dau0ToMCParticle) {
775  m_h1_track_dau0_d0->Fill(mcParticleInfo_dau0.getD0());
776  m_h1_track_dau0_z0->Fill(mcParticleInfo_dau0.getZ0());
777  m_h1_track_dau0_RMother->Fill(MC_transDist);
778  m_h3_track_dau0->Fill(mc_dau0->getMomentum().Pt(), mc_dau0->getMomentum().Theta(), mc_dau0->getMomentum().Phi());
779  m_h1_track_dau0_pt->Fill(mc_dau0->getMomentum().Pt());
780  m_h1_track_dau0_pz->Fill(mc_dau0->getMomentum().Pz());
781  m_h1_track_dau0_p->Fill(mc_dau0->getMomentum().Mag());
782  m_h1_track_dau0_phi->Fill(mc_dau0->getMomentum().Phi());
783  m_h1_track_dau0_theta->Fill(mc_dau0->getMomentum().Theta());
784  m_h1_track_dau0_costheta->Fill(mc_dau0->getMomentum().CosTheta());
785  m_h1_track_dau0_Mother_cosAngle->Fill(mcParticle.getMomentum() * mc_dau0->getMomentum() / mcParticle.getMomentum().Mag() /
786  mc_dau0->getMomentum().Mag());
787 
788  m_h1_track_dau0_thetaMother->Fill(MC_theta);
789  m_h1_track_dau0_ptMother->Fill(MC_pt);
790 
791  m_h1_track_dau0_phiMother_total->Fill(MC_phi);
792 
793  m_h2_track_dau0_2D->Fill(mc_dau0->getMomentum().Theta(), mc_dau0->getMomentum().Pt());
794  m_h2_track_dau0_2DMother->Fill(MC_theta, MC_pt);
795  m_h2_track_dau0_pVScostheta->Fill(mc_dau0->getMomentum().CosTheta(), mc_dau0->getMomentum().Mag());
796 
797  if (MC_transDist < 1.)
798  m_h2_track_dau0_2D_BP->Fill(mc_dau0->getMomentum().Theta(), mc_dau0->getMomentum().Pt());
799 
800  if (MC_theta > (120 * TMath::Pi() / 180.)) { //BW
801  m_h1_track_dau0_phiMother_BW->Fill(MC_phi);
803  } else if (MC_theta < (30 * TMath::Pi() / 180.)) { //FW
804  m_h1_track_dau0_phiMother_FW->Fill(MC_phi);
806  } else { //barrel
807  m_h1_track_dau0_phiMother_barrel->Fill(MC_phi);
809  }
810  }
811 
812  if (Track_dau1ToMCParticle) {
813  m_h1_track_dau1_d0->Fill(mcParticleInfo_dau1.getD0());
814  m_h1_track_dau1_z0->Fill(mcParticleInfo_dau1.getZ0());
815  m_h1_track_dau1_RMother->Fill(MC_transDist);
816  m_h3_track_dau1->Fill(mc_dau1->getMomentum().Pt(), mc_dau1->getMomentum().Theta(), mc_dau1->getMomentum().Phi());
817  m_h1_track_dau1_pt->Fill(mc_dau1->getMomentum().Pt());
818  m_h1_track_dau1_pz->Fill(mc_dau1->getMomentum().Pz());
819  m_h1_track_dau1_p->Fill(mc_dau1->getMomentum().Mag());
820  m_h1_track_dau1_phi->Fill(mc_dau1->getMomentum().Phi());
821  m_h1_track_dau1_theta->Fill(mc_dau1->getMomentum().Theta());
822  m_h1_track_dau1_costheta->Fill(mc_dau1->getMomentum().CosTheta());
823  m_h1_track_dau1_Mother_cosAngle->Fill(mcParticle.getMomentum() * mc_dau1->getMomentum() / mcParticle.getMomentum().Mag() /
824  mc_dau1->getMomentum().Mag());
825 
826  m_h1_track_dau1_thetaMother->Fill(MC_theta);
827  m_h1_track_dau1_ptMother->Fill(MC_pt);
828 
829  m_h1_track_dau1_phiMother_total->Fill(MC_phi);
830 
831  m_h2_track_dau1_2D->Fill(mc_dau1->getMomentum().Theta(), mc_dau1->getMomentum().Pt());
832  m_h2_track_dau1_2DMother->Fill(MC_theta, MC_pt);
833  m_h2_track_dau1_pVScostheta->Fill(mc_dau1->getMomentum().CosTheta(), mc_dau1->getMomentum().Mag());
834 
835  if (MC_transDist < 1.)
836  m_h2_track_dau1_2D_BP->Fill(mc_dau1->getMomentum().Theta(), mc_dau1->getMomentum().Pt());
837 
838  if (MC_theta > (120 * TMath::Pi() / 180.)) { //BW
839  m_h1_track_dau1_phiMother_BW->Fill(MC_phi);
841  } else if (MC_theta < (30 * TMath::Pi() / 180.)) { //FW
842  m_h1_track_dau1_phiMother_FW->Fill(MC_phi);
844  } else { //barrel
845  m_h1_track_dau1_phiMother_barrel->Fill(MC_phi);
847  }
848  }
849 
850  int nMatchedDau = nMatchedDaughters(mcParticle);
851 
852  //V0: proceed only in case the MCParticle daughters have one associated reconstructed track:
853  if (nMatchedDau != 2)
854  continue;
855 
856  int pdgCode = mcParticle.getPDG();
857  B2DEBUG(99, "MCParticle has PDG code " << pdgCode);
858 
859  RelationVector<V0ValidationVertex> V0s_toMCParticle =
860  DataStore::getRelationsWithObj<V0ValidationVertex>(&mcParticle, m_V0sName);
861 
862  if (V0s_toMCParticle.size() > 0) {
863 
864  m_h1_V0_RMother->Fill(MC_transDist);
865  m_h3_V0->Fill(mcParticleInfo.getPt(), mcParticleInfo.getPtheta(), mcParticleInfo.getPphi());
866  m_h1_V0_pt->Fill(mcParticleInfo.getPt());
867  m_h1_V0_pz->Fill(mcParticleInfo.getPz());
868  m_h1_V0_p->Fill(mcParticleInfo.getP());
869  m_h1_V0_phi->Fill(mcParticleInfo.getPphi());
870  m_h1_V0_theta->Fill(mcParticleInfo.getPtheta());
871  m_h1_V0_costheta->Fill(mcParticle.getMomentum().CosTheta());
872  m_h2_V0_Mother_2D->Fill(MC_theta, MC_p);
873  m_h2_V0_Mother_pVScostheta->Fill(MC_costheta, MC_p);
874 
875  if (MC_transDist < 1.) m_h2_V0_Mother_2D_BP->Fill(MC_theta, MC_pt);
876 
877  if (MC_theta > (120 * TMath::Pi() / 180.)) //BW
878  m_h1_V0_phi_BW->Fill(mcParticleInfo.getPphi());
879 
880  else if (MC_theta < (30 * TMath::Pi() / 180.))//FW
881  m_h1_V0_phi_FW->Fill(mcParticleInfo.getPphi());
882 
883  else //barrel
884  m_h1_V0_phi_barrel->Fill(mcParticleInfo.getPphi());
885  }
886  }
887 }
888 
890 {
891  double track_dau0 = m_h1_track_dau0_RMother->GetEntries();
892  double RecoTrack_dau0 = m_h1_RecoTrack_dau0_RMother->GetEntries();
893  double MC_dau0 = m_h1_MC_dau0_RMother->GetEntries();
894  double eff_dau0_noGA = track_dau0 / MC_dau0;
895  double effErr_dau0_noGA = sqrt(eff_dau0_noGA * (1 - eff_dau0_noGA)) / sqrt(MC_dau0);
896  double eff_dau0_withGA = track_dau0 / RecoTrack_dau0;
897  double effErr_dau0_withGA = sqrt(eff_dau0_withGA * (1 - eff_dau0_withGA)) / sqrt(RecoTrack_dau0);
898 
899  double track_dau1 = m_h1_track_dau1_RMother->GetEntries();
900  double RecoTrack_dau1 = m_h1_RecoTrack_dau1_RMother->GetEntries();
901  double MC_dau1 = m_h1_MC_dau1_RMother->GetEntries();
902  double eff_dau1_noGA = track_dau1 / MC_dau1;
903  double effErr_dau1_noGA = sqrt(eff_dau1_noGA * (1 - eff_dau1_noGA)) / sqrt(MC_dau1);
904  double eff_dau1_withGA = track_dau1 / RecoTrack_dau1;
905  double effErr_dau1_withGA = sqrt(eff_dau1_withGA * (1 - eff_dau1_withGA)) / sqrt(RecoTrack_dau1);
906 
907  double track_Mother = m_h1_V0_RMother->GetEntries();
908  double RecoTrack_Mother = m_h1_RecoTrack_Mother_RMother->GetEntries();
909  double MC_Mother = m_h1_MC_Mother_RMother->GetEntries();
910  double eff_Mother_noGA = track_Mother / MC_Mother;
911  double effErr_Mother_noGA = sqrt(eff_Mother_noGA * (1 - eff_Mother_noGA)) / sqrt(MC_Mother);
912  double eff_Mother_withGA = track_Mother / RecoTrack_Mother;
913  double effErr_Mother_withGA = sqrt(eff_Mother_withGA * (1 - eff_Mother_withGA)) / sqrt(RecoTrack_Mother);
914 
915 
916 
917 
918  B2INFO("");
919  B2INFO("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
920  B2INFO("~ V0 Finding Performance Evaluation ~ SHORT SUMMARY ~");
921  B2INFO("");
922  B2INFO(" + overall, normalized to MC particles (_noGeoAcc):");
923  B2INFO("");
924  B2INFO(" efficiency dau0 = (" << eff_dau0_noGA * 100 << " +/- " << effErr_dau0_noGA * 100 << ")% ");
925  B2INFO(" efficiency dau1 = (" << eff_dau1_noGA * 100 << " +/- " << effErr_dau1_noGA * 100 << ")% ");
926  B2INFO(" efficiency Mother = (" << eff_Mother_noGA * 100 << " +/- " << effErr_Mother_noGA * 100 << ")% ");
927  B2INFO("");
928  B2INFO(" + overall, normalized to RecoTracks(_withGeoAcc):");
929  B2INFO("");
930  B2INFO(" efficiency dau0 = (" << eff_dau0_withGA * 100 << " +/- " << effErr_dau0_withGA * 100 << ")% ");
931  B2INFO(" efficiency dau1 = (" << eff_dau1_withGA * 100 << " +/- " << effErr_dau1_withGA * 100 << ")% ");
932  B2INFO(" efficiency Mother = (" << eff_Mother_withGA * 100 << " +/- " << effErr_Mother_withGA * 100 << ")% ");
933  B2INFO("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
934 
935 }
936 
938 {
939  //------------------------------------------------------------------//
940  // EFFICIENCIES //
941  //------------------------------------------------------------------//
942 
943  //dau0
944  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",
945  "efficiency VS d0, dau_{0}", m_histoList_Efficiencies);
946  if (h_eff_dau0_d0->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau0_d0");
947 
948  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",
949  "efficiency VS z0, dau_{0}", m_histoList_Efficiencies);
950  if (h_eff_dau0_z0->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau0_z0");
951 
953  "h_eff_dau0_RMother", "efficiency VS R_{mother}, dau_{0}", m_histoList_Efficiencies);
954  if (h_eff_dau0_RMother->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau0_RMother");
955 
957  "h_eff_dau0_thetaMother", "efficiency VS #theta_{mother}, dau_{0}", m_histoList_Efficiencies);
958  if (h_eff_dau0_thetaMother->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau0_thetaMother");
959 
961  m_h1_track_dau0_phiMother_total, "h_eff_dau0_phiMother_total", "efficiency VS #phi_{mother}, dau_{0}", m_histoList_Efficiencies);
962  if (h_eff_dau0_phiMother_total->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau0_phiMother_total");
963 
965  "h_eff_dau0_phiMother_BW", "efficiency VS #phi_{mother}, dau_{0} BW", m_histoList_Efficiencies);
966  if (h_eff_dau0_phiMother_BW->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau0_phiMother_BW");
967 
969  m_h1_track_dau0_phiMother_barrel, "h_eff_dau0_phiMother_barrel", "efficiency VS #phi_{mother}, dau_{0} barrel",
971  if (h_eff_dau0_phiMother_barrel->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau0_phiMother_barrel");
972 
974  "h_eff_dau0_phiMother_FW", "efficiency VS #phi_{mother}, dau_{0} FW", m_histoList_Efficiencies);
975  if (h_eff_dau0_phiMother_FW->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau0_phiMother_FW");
976 
977  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",
978  "efficiency VS #phi_{dau_{0}}, dau_{0}", m_histoList_Efficiencies);
979  if (h_eff_dau0_phi_total->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau0_phi_total");
980 
981  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",
982  "efficiency VS #phi_{dau_{0}}, dau_{0} BW", m_histoList_Efficiencies);
983  if (h_eff_dau0_phi_BW->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau0_phi_BW");
984 
986  "h_eff_dau0_phi_barrel", "efficiency VS #phi_{dau_{0}}, dau_{0} barrel", m_histoList_Efficiencies);
987  if (h_eff_dau0_phi_barrel->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau0_phi_barrel");
988 
989  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",
990  "efficiency VS #phi_{dau_{0}}, dau_{0} FW", m_histoList_Efficiencies);
991  if (h_eff_dau0_phi_FW->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau0_phi_FW");
992 
994  "h2_effMap_dau0_pVScostheta", "efficiency map, p_{CM} VS cos(#theta)_{CM} dau_{0}", m_histoList_Efficiencies);
995  if (h2_effMap_dau0_pVScostheta->GetEntries() == 0) B2WARNING("Empty histogram h2_effMap_dau0_pVScostheta");
996 
997  //dau1
998  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",
1000  if (h_eff_dau1_d0->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau1_d0");
1001 
1002  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",
1004  if (h_eff_dau1_z0->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau1_z0");
1005 
1007  "h_eff_dau1_RMother", "efficiency VS R_{mother}, p", m_histoList_Efficiencies);
1008  if (h_eff_dau1_RMother->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau1_RMother");
1009 
1011  "h_eff_dau1_thetaMother", "efficiency VS #theta_{mother}, p", m_histoList_Efficiencies);
1012  if (h_eff_dau1_thetaMother->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau1_thetaMother");
1013 
1015  m_h1_track_dau1_phiMother_total, "h_eff_dau1_phiMother_total", "efficiency VS #phi_{mother}, p", m_histoList_Efficiencies);
1016  if (h_eff_dau1_phiMother_total->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau1_phiMother_total");
1017 
1019  "h_eff_dau1_phiMother_BW", "efficiency VS #phi_{mother}, p BW", m_histoList_Efficiencies);
1020  if (h_eff_dau1_phiMother_BW->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau1_phiMother_BW");
1021 
1023  m_h1_track_dau1_phiMother_barrel, "h_eff_dau1_phiMother_barrel", "efficiency VS #phi_{mother}, p barrel", m_histoList_Efficiencies);
1024  if (h_eff_dau1_phiMother_barrel->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau1_phiMother_barrel");
1025 
1027  "h_eff_dau1_phiMother_FW", "efficiency VS #phi_{mother}, p FW", m_histoList_Efficiencies);
1028  if (h_eff_dau1_phiMother_FW->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau1_phiMother_FW");
1029 
1030  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",
1031  "efficiency VS #phi_{p}, p", m_histoList_Efficiencies);
1032  if (h_eff_dau1_phi_total->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau1_phi_total");
1033 
1034  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",
1035  "efficiency VS #phi_{p}, p BW", m_histoList_Efficiencies);
1036  if (h_eff_dau1_phi_BW->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau1_phi_BW");
1037 
1039  "h_eff_dau1_phi_barrel", "efficiency VS #phi_{p}, p barrel", m_histoList_Efficiencies);
1040  if (h_eff_dau1_phi_barrel->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau1_phi_barrel");
1041 
1042  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",
1043  "efficiency VS #phi_{p}, p FW", m_histoList_Efficiencies);
1044  if (h_eff_dau1_phi_FW->GetEntries() == 0) B2WARNING("Empty histogram h_eff_dau1_phi_FW");
1045 
1047  "h2_effMap_dau1_pVScostheta", "efficiency map, p_{CM} VS cos(#theta)_{CM} dau_{1}", m_histoList_Efficiencies);
1048  if (h2_effMap_dau1_pVScostheta->GetEntries() == 0) B2WARNING("Empty histogram h2_effMap_dau1_pVScostheta");
1049 
1050  //mother
1052  "h_eff_Mother_RMother", "efficiency VS R_{mother}, mother", m_histoList_Efficiencies);
1053  if (h_eff_Mother_RMother->GetEntries() == 0) B2WARNING("Empty histogram h_eff_Mother_RMother");
1054 
1055  TH1F* h_eff_Mother_theta = effPlot1D(m_h1_MC_Mother_theta, m_h1_RecoTrack_Mother_theta, m_h1_V0_theta, "h_eff_Mother_theta",
1056  "efficiency VS #theta_{mother}, mother", m_histoList_Efficiencies);
1057  if (h_eff_Mother_theta->GetEntries() == 0) B2WARNING("Empty histogram h_eff_Mother_theta");
1058 
1059  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",
1060  "efficiency VS #phi_{mother}, mother", m_histoList_Efficiencies);
1061  if (h_eff_Mother_phi_total->GetEntries() == 0) B2WARNING("Empty histogram h_eff_Mother_phi_total");
1062 
1063  TH1F* h_eff_Mother_phiMother_BW = effPlot1D(m_h1_MC_Mother_phi_BW, m_h1_RecoTrack_Mother_phi_BW, m_h1_V0_phi_BW,
1064  "h_eff_Mother_phi_BW", "efficiency VS #phi_{mother}, mother BW", m_histoList_Efficiencies);
1065  if (h_eff_Mother_phiMother_BW->GetEntries() == 0) B2WARNING("Empty histogram h_eff_Mother_phiMother_BW");
1066 
1068  "h_eff_Mother_phi_barrel", "efficiency VS #phi_{mother}, mother barrel", m_histoList_Efficiencies);
1069  if (h_eff_Mother_phiMother_barrel->GetEntries() == 0) B2WARNING("Empty histogram h_eff_Mother_phiMother_barrel");
1070 
1071  TH1F* h_eff_Mother_phiMother_FW = effPlot1D(m_h1_MC_Mother_phi_FW, m_h1_RecoTrack_Mother_phi_FW, m_h1_V0_phi_FW,
1072  "h_eff_Mother_phi_FW", "efficiency VS #phi_{mother}, mother FW", m_histoList_Efficiencies);
1073  if (h_eff_Mother_phiMother_FW->GetEntries() == 0) B2WARNING("Empty histogram h_eff_Mother_phiMother_FW");
1074 
1075  TH2F* h2_effMap_Mother_pVScostheta = effPlot2D(m_h2_MC_Mother_pVScostheta, m_h2_RecoTrack_Mother_pVScostheta,
1076  m_h2_V0_Mother_pVScostheta, "h2_effMap_Mother_pVScostheta", "efficiency map, p_{CM} VS cos(#theta)_{CM} mother",
1078  if (h2_effMap_Mother_pVScostheta->GetEntries() == 0) B2WARNING("Empty histogram h2_effMap_Mother_pVScostheta");
1079 
1080  //eff_V0Finder [ = eff_mother / (eff_dau0 * eff_dau1)]
1081  TH1F* h_eff_V0Finder_RMother_withGeoAcc = V0FinderEff(h_eff_dau0_RMother, h_eff_dau1_RMother, h_eff_Mother_RMother,
1082  "h_eff_V0Finder_RMother_withGeoAcc", "efficiency VS R_{mother}, V0Finder", m_histoList_Efficiencies);
1083  if (h_eff_V0Finder_RMother_withGeoAcc->GetEntries() == 0) B2WARNING("Empty histogram h_eff_V0Finder_RMother_withGeoAcc");
1084 
1085  TH1F* h_eff_V0Finder_theta_withGeoAcc = V0FinderEff(h_eff_dau0_thetaMother, h_eff_dau1_thetaMother, h_eff_Mother_theta,
1086  "h_eff_V0Finder_theta_withGeoAcc", "efficiency VS #theta_{mother}, V0Finder", m_histoList_Efficiencies);
1087  if (h_eff_V0Finder_theta_withGeoAcc->GetEntries() == 0) B2WARNING("Empty histogram h_eff_V0Finder_theta_withGeoAcc");
1088 
1089  TH1F* h_eff_V0Finder_phi_total_withGeoAcc = V0FinderEff(h_eff_dau0_phiMother_total, h_eff_dau1_phiMother_total,
1090  h_eff_Mother_phi_total, "h_eff_V0Finder_phi_total_withGeoAcc", "efficiency VS #phi_{mother}, V0Finder", m_histoList_Efficiencies);
1091  if (h_eff_V0Finder_phi_total_withGeoAcc->GetEntries() == 0) B2WARNING("Empty histogram h_eff_V0Finder_phi_total_withGeoAcc");
1092 
1093  TH1F* h_eff_V0Finder_phiMother_BW_withGeoAcc = V0FinderEff(h_eff_dau0_phiMother_BW, h_eff_dau1_phiMother_BW,
1094  h_eff_Mother_phiMother_BW, "h_eff_V0Finder_phi_BW_withGeoAcc", "efficiency VS #phi_{mother}, V0Finder BW",
1096  if (h_eff_V0Finder_phiMother_BW_withGeoAcc->GetEntries() == 0) B2WARNING("Empty histogram h_eff_V0Finder_phiMother_BW_withGeoAcc");
1097 
1098  TH1F* h_eff_V0Finder_phiMother_barrel_withGeoAcc = V0FinderEff(h_eff_dau0_phiMother_barrel, h_eff_dau1_phiMother_barrel,
1099  h_eff_Mother_phiMother_barrel, "h_eff_V0Finder_phi_barrel_withGeoAcc", "efficiency VS #phi_{mother}, V0Finder barrel",
1101  if (h_eff_V0Finder_phiMother_barrel_withGeoAcc->GetEntries() == 0)
1102  B2WARNING("Empty histogram h_eff_V0Finder_phiMother_barrel_withGeoAcc");
1103 
1104  TH1F* h_eff_V0Finder_phiMother_FW_withGeoAcc = V0FinderEff(h_eff_dau0_phiMother_FW, h_eff_dau1_phiMother_FW,
1105  h_eff_Mother_phiMother_FW, "h_eff_V0Finder_phi_FW_withGeoAcc", "efficiency VS #phi_{mother}, V0Finder FW",
1107  if (h_eff_V0Finder_phiMother_FW_withGeoAcc->GetEntries() == 0) B2WARNING("Empty histogram h_eff_V0Finder_phiMother_FW_withGeoAcc");
1108 
1109 
1110  //-------------------------------------------------------------------------//
1111  // GEOMETRICAL ACCETTANCE //
1112  //-------------------------------------------------------------------------//
1113 
1115  //dau0
1116  TH1F* h_dau0_geoAcc_theta = geoAcc1D(m_h1_MC_dau0_theta, m_h1_RecoTrack_dau0_theta, "h_dau0_geoAcc_theta",
1117  "geometrical acceptance VS #theta_{dau_{0}}, dau_{0}", m_histoList_GA);
1118  if (h_dau0_geoAcc_theta->GetEntries() == 0) B2WARNING("Empty histogram h_dau0_geoAcc_theta");
1119 
1120  TH1F* h_dau0_geoAcc_phi = geoAcc1D(m_h1_MC_dau0_phi, m_h1_RecoTrack_dau0_phi, "h_dau0_geoAcc_phi",
1121  "geometrical acceptance VS #phi_{dau_{0}}, dau_{0}", m_histoList_GA);
1122  if (h_dau0_geoAcc_phi->GetEntries() == 0) B2WARNING("Empty histogram h_dau0_geoAcc_phi");
1123 
1124  TH1F* h_dau0_geoAcc_pt = geoAcc1D(m_h1_MC_dau0_pt, m_h1_RecoTrack_dau0_pt, "h_dau0_geoAcc_pt",
1125  "geometrical acceptance VS p_{T,dau_{0}}, dau_{0}", m_histoList_GA);
1126  if (h_dau0_geoAcc_pt->GetEntries() == 0) B2WARNING("Empty histogram h_dau0_geoAcc_pt");
1127 
1128  TH1F* h_dau0_geoAcc_thetaMother = geoAcc1D(m_h1_MC_dau0_thetaMother, m_h1_RecoTrack_dau0_thetaMother, "h_dau0_geoAcc_thetaMother",
1129  "geometrical acceptance VS #theta_{mother}, dau_{0}", m_histoList_GA);
1130  if (h_dau0_geoAcc_thetaMother->GetEntries() == 0) B2WARNING("Empty histogram h_dau0_geoAcc_thetaMother");
1131 
1133  "h_dau0_geoAcc_phiMother", "geometrical acceptance VS #phi_{mother}, dau_{0}", m_histoList_GA);
1134  if (h_dau0_geoAcc_phiMother->GetEntries() == 0) B2WARNING("Empty histogram h_dau0_geoAcc_phiMother");
1135 
1136  TH1F* h_dau0_geoAcc_ptMother = geoAcc1D(m_h1_MC_dau0_ptMother, m_h1_RecoTrack_dau0_ptMother, "h_dau0_geoAcc_ptMother",
1137  "geometrical acceptance VS #p_{T,mother}, dau_{0}", m_histoList_GA);
1138  if (h_dau0_geoAcc_ptMother->GetEntries() == 0) B2WARNING("Empty histogram h_dau0_geoAcc_ptMother");
1139 
1140  //dau1
1141  TH1F* h_dau1_geoAcc_theta = geoAcc1D(m_h1_MC_dau1_theta, m_h1_RecoTrack_dau1_theta, "h_dau1_geoAcc_theta",
1142  "geometrical acceptance VS #theta_{p}, p", m_histoList_GA);
1143  if (h_dau1_geoAcc_theta->GetEntries() == 0) B2WARNING("Empty histogram h_dau1_geoAcc_theta");
1144 
1145  TH1F* h_dau1_geoAcc_phi = geoAcc1D(m_h1_MC_dau1_phi, m_h1_RecoTrack_dau1_phi, "h_dau1_geoAcc_phi",
1146  "geometrical acceptance VS #phi_{p}, p", m_histoList_GA);
1147  if (h_dau1_geoAcc_phi->GetEntries() == 0) B2WARNING("Empty histogram h_dau1_geoAcc_phi");
1148 
1149  TH1F* h_dau1_geoAcc_pt = geoAcc1D(m_h1_MC_dau1_pt, m_h1_RecoTrack_dau1_pt, "h_dau1_geoAcc_pt",
1150  "geometrical acceptance VS p_{T,p}, p", m_histoList_GA);
1151  if (h_dau1_geoAcc_pt->GetEntries() == 0) B2WARNING("Empty histogram h_dau1_geoAcc_pt");
1152 
1153  TH1F* h_dau1_geoAcc_thetaMother = geoAcc1D(m_h1_MC_dau1_thetaMother, m_h1_RecoTrack_dau1_thetaMother, "h_dau1_geoAcc_thetaMother",
1154  "geometrical acceptance VS #theta_{mother}, p", m_histoList_GA);
1155  if (h_dau1_geoAcc_thetaMother->GetEntries() == 0) B2WARNING("Empty histogram h_dau1_geoAcc_thetaMother");
1156 
1158  "h_dau1_geoAcc_phiMother", "geometrical acceptance VS #phi_{mother}, p", m_histoList_GA);
1159  if (h_dau1_geoAcc_phiMother->GetEntries() == 0) B2WARNING("Empty histogram h_dau1_geoAcc_phiMother");
1160 
1161  TH1F* h_dau1_geoAcc_ptMother = geoAcc1D(m_h1_MC_dau1_ptMother, m_h1_RecoTrack_dau1_ptMother, "h_dau1_geoAcc_ptMother",
1162  "geometrical acceptance VS #p_{T,mother}, p", m_histoList_GA);
1163  if (h_dau1_geoAcc_ptMother->GetEntries() == 0) B2WARNING("Empty histogram h_dau1_geoAcc_ptMother");
1164 
1165  //mother
1166  TH1F* h_Mother_geoAcc_theta = geoAcc1D(m_h1_MC_Mother_theta, m_h1_RecoTrack_Mother_theta, "h_Mother_geoAcc_theta",
1167  "geometrical acceptance VS #theta_{mother}, mother", m_histoList_GA);
1168  if (h_Mother_geoAcc_theta->GetEntries() == 0) B2WARNING("Empty histogram h_Mother_geoAcc_theta");
1169 
1170  TH1F* h_Mother_geoAcc_phi = geoAcc1D(m_h1_MC_Mother_phi, m_h1_RecoTrack_Mother_phi, "h_Mother_geoAcc_phi",
1171  "geometrical acceptance VS #phi_{mother}, mother", m_histoList_GA);
1172  if (h_Mother_geoAcc_phi->GetEntries() == 0) B2WARNING("Empty histogram h_Mother_geoAcc_phi");
1173 
1174  TH1F* h_Mother_geoAcc_pt = geoAcc1D(m_h1_MC_Mother_pt, m_h1_RecoTrack_Mother_pt, "h_Mother_geoAcc_pt",
1175  "geometrical acceptance VS p_{T,mother}, mother", m_histoList_GA);
1176  if (h_Mother_geoAcc_pt->GetEntries() == 0) B2WARNING("Empty histogram h_Mother_geoAcc_pt");
1177 
1178  //2D
1179  TH2F* h2_dau0_geoAcc2D = geoAcc2D(m_h2_MC_dau0_2D, m_h2_RecoTrack_dau0_2D, "h2_dau0_geoAcc2D",
1180  "geometrical acceptance dau_{0}, p_{T,dau_{0}} VS #theta_{dau_{0}}", m_histoList_GA);
1181  if (h2_dau0_geoAcc2D->GetEntries() == 0) B2WARNING("Empty histogram h2_dau0_geoAcc2D");
1182 
1183  TH2F* h2_dau1_geoAcc2D = geoAcc2D(m_h2_MC_dau1_2D, m_h2_RecoTrack_dau1_2D, "h2_dau1_geoAcc2D",
1184  "geometrical acceptance p, p_{T,p} VS #theta_{p}", m_histoList_GA);
1185  if (h2_dau1_geoAcc2D->GetEntries() == 0) B2WARNING("Empty histogram h2_dau1_geoAcc2D");
1186 
1187  TH2F* h2_Mother_geoAcc2D = geoAcc2D(m_h2_MC_Mother_2D, m_h2_RecoTrack_Mother_2D, "h2_Mother_geoAcc2D",
1188  "geometrical acceptance mother, p_{T,mother} VS #theta_{mother}", m_histoList_GA);
1189  if (h2_Mother_geoAcc2D->GetEntries() == 0) B2WARNING("Empty histogram h2_Mother_geoAcc2D");
1190 
1191  TH2F* h2_dau0Mother_geoAcc2D = geoAcc2D(m_h2_MC_dau0_2DMother, m_h2_RecoTrack_dau0_2DMother, "h2_dau0Mother_geoAcc2D",
1192  "geometrical acceptance dau_{0}, p_{T,mother} VS #theta_{mother}", m_histoList_GA);
1193  if (h2_dau0Mother_geoAcc2D->GetEntries() == 0) B2WARNING("Empty histogram h2_dau0Mother_geoAcc2D");
1194 
1195  TH2F* h2_dau1Mother_geoAcc2D = geoAcc2D(m_h2_MC_dau1_2DMother, m_h2_RecoTrack_dau1_2DMother, "h2_dau1Mother_geoAcc2D",
1196  "geometrical acceptance p, p_{T,mother} VS #theta_{mother}", m_histoList_GA);
1197  if (h2_dau1Mother_geoAcc2D->GetEntries() == 0) B2WARNING("Empty histogram h2_dau1Mother_geoAcc2D");
1198 
1199  //particles coming from inside the Beam Pipe
1200  TH2F* h2_dau0_geoAcc2D_BP = geoAcc2D(m_h2_MC_dau0_2D_BP, m_h2_RecoTrack_dau0_2D_BP, "h2_dau0_geoAcc2D_BP",
1201  "geometrical acceptance dau_{0}, p_{T,dau_{0}} VS #theta_{dau_{0}}, BP", m_histoList_GA);
1202  if (h2_dau0_geoAcc2D_BP->GetEntries() == 0) B2WARNING("Empty histogram h2_dau0_geoAcc2D_BP");
1203 
1204  TH2F* h2_dau1_geoAcc2D_BP = geoAcc2D(m_h2_MC_dau1_2D_BP, m_h2_RecoTrack_dau1_2D_BP, "h2_dau1_geoAcc2D_BP",
1205  "geometrical acceptance p, p_{T,p} VS #theta_{p}, BP", m_histoList_GA);
1206  if (h2_dau1_geoAcc2D_BP->GetEntries() == 0) B2WARNING("Empty histogram h2_dau1_geoAcc2D_BP");
1207 
1208  TH2F* h2_Mother_geoAcc2D_BP = geoAcc2D(m_h2_MC_Mother_2D_BP, m_h2_RecoTrack_Mother_2D_BP, "h2_Mother_geoAcc2D_BP",
1209  "geometrical acceptance mother, p_{T,mother} VS #theta_{mother}, BP", m_histoList_GA);
1210  if (h2_Mother_geoAcc2D_BP->GetEntries() == 0) B2WARNING("Empty histogram h2_Mother_geoAcc2D_BP");
1211  }
1212 
1213  //---------------------------------------------------------------------------------
1214 
1215  //write histograms on the output root file
1216  if (m_rootFilePtr != nullptr) {
1217  m_rootFilePtr->cd();
1218 
1219  TIter nextHMC(m_histoList_MCParticles);
1220  TIter nextHTC(m_histoList_RecoTracks);
1221  TIter nextHT(m_histoList_Tracks);
1222  TIter nextHEff(m_histoList_Efficiencies);
1223  TIter nextHGA(m_histoList_GA);
1224  TIter nextHCheck(m_histoList_check);
1225 
1226  TObject* obj;
1227 
1228  if (m_allHistograms) {
1229  TDirectory* MCdir = m_rootFilePtr->mkdir("MCParticles");
1230  MCdir->cd();
1231  while ((obj = nextHMC()))
1232  obj->Write("", BIT(2), 0);
1233 
1234  TDirectory* TCdir = m_rootFilePtr->mkdir("RecoTracks");
1235  TCdir->cd();
1236  while ((obj = nextHTC()))
1237  obj->Write("", BIT(2), 0);
1238 
1239  TDirectory* Trdir = m_rootFilePtr->mkdir("Tracks");
1240  Trdir->cd();
1241  while ((obj = nextHT()))
1242  obj->Write("", BIT(2), 0);
1243 
1244  TDirectory* check = m_rootFilePtr->mkdir("check");
1245  check->cd();
1246  while ((obj = nextHCheck()))
1247  obj->Write("", BIT(2), 0);
1248  }
1249 
1250  TDirectory* Effdir = m_rootFilePtr->mkdir("Efficiencies");
1251  Effdir->cd();
1252  while ((obj = nextHEff()))
1253  obj->Write("", BIT(2), 0);
1254 
1256  TDirectory* geoAcc = m_rootFilePtr->mkdir("geoAccettance");
1257  geoAcc->cd();
1258  while ((obj = nextHGA()))
1259  obj->Write("", BIT(2), 0);
1260  }
1261 
1262 
1263  m_rootFilePtr->Close();
1264  }
1265 }
1266 
1267 bool EffPlotsModule::isK_Short(const MCParticle& the_mcParticle)
1268 {
1269 
1270  bool isK_S0 = false;
1271  if (abs(the_mcParticle.getPDG()) == Const::Kshort.getPDGCode())
1272  isK_S0 = true;
1273 
1274  bool twoChargedProngs = false;
1275 
1276  if (the_mcParticle.getDaughters().size() == 2 &&
1277  ((the_mcParticle.getDaughters()[0]->getPDG() == Const::pion.getPDGCode()
1278  && the_mcParticle.getDaughters()[1]->getPDG() == -Const::pion.getPDGCode()) ||
1279  (the_mcParticle.getDaughters()[0]->getPDG() == -Const::pion.getPDGCode()
1280  && the_mcParticle.getDaughters()[1]->getPDG() == Const::pion.getPDGCode())))
1281  twoChargedProngs = true;
1282 
1283  return (isK_S0 && twoChargedProngs);
1284 
1285 }
1286 
1287 bool EffPlotsModule::isLambda0(const MCParticle& the_mcParticle)
1288 {
1289 
1290  bool isLambda = false;
1291  if (abs(the_mcParticle.getPDG()) == Const::Lambda.getPDGCode())
1292  isLambda = true;
1293 
1294  bool twoChargedProngs = false;
1295 
1296  if (the_mcParticle.getDaughters().size() == 2 &&
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::pion.getPDGCode()
1300  && the_mcParticle.getDaughters()[1]->getPDG() == Const::proton.getPDGCode()) ||
1301  (the_mcParticle.getDaughters()[0]->getPDG() == Const::proton.getPDGCode()
1302  && the_mcParticle.getDaughters()[1]->getPDG() == -Const::pion.getPDGCode()) ||
1303  (the_mcParticle.getDaughters()[0]->getPDG() == -Const::proton.getPDGCode()
1304  && the_mcParticle.getDaughters()[1]->getPDG() == Const::pion.getPDGCode())))
1305  twoChargedProngs = true;
1306 
1307  return (isLambda && twoChargedProngs);
1308 
1309 }
1310 
1312 {
1313 
1314  int nMatchedDau = 0;
1315 
1316  std::vector< MCParticle* > MCPart_dau = the_mcParticle.getDaughters();
1317 
1318  bool first = false;
1319  bool second = false;
1320 
1321  RelationVector<Track> Tracks_fromMCParticle_0 = DataStore::getRelationsWithObj<Track>(MCPart_dau[0]);
1322  if (Tracks_fromMCParticle_0.size() > 0)
1323  first = true;
1324 
1325  RelationVector<Track> Tracks_fromMCParticle_1 = DataStore::getRelationsWithObj<Track>(MCPart_dau[1]);
1326  if (Tracks_fromMCParticle_1.size() > 0)
1327  second = true;
1328 
1329 
1330  if (first)
1331  nMatchedDau++;
1332 
1333  if (second)
1334  nMatchedDau++;
1335 
1336 
1337  return nMatchedDau;
1338 
1339 }
int getPDGCode() const
PDG code.
Definition: Const.h:354
static const ParticleType Lambda
Lambda particle.
Definition: Const.h:559
static const ChargedStable pion
charged pion particle
Definition: Const.h:542
static const ChargedStable proton
proton particle
Definition: Const.h:544
static const ParticleType Kshort
K^0_S particle.
Definition: Const.h:557
This module takes the MCParticles, the RecoTracks and Tracks/V0 in input and produce a root file cont...
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)
MCParticle * mc_dau0
daughter 0 of a decayed MCParticle
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
TH1F * m_h1_MC_dau0_phiMother_barrel
histogram of MCParticle daughter 0's mother's phi (barrel region)
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)
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
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)
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)
MCParticle * mc_dau1
daughter 1 of a decayed MCParticle
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:50
TVector3 getVertex() const
Return production vertex position, shorthand for getProductionVertex().
Definition: MCParticle.h:183
TVector3 getMomentum() const
Return momentum.
Definition: MCParticle.h:198
TVector3 getDecayVertex() const
Return decay vertex.
Definition: MCParticle.h:219
int getPDG() const
Return PDG code of particle.
Definition: MCParticle.h:112
Base class for Modules.
Definition: Module.h:72
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.
Class that bundles various TrackFitResults.
Definition: Track.h:25
static const double T
[tesla]
Definition: Unit.h:120
#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.
Abstract base class for different kinds of events.