Belle II Software  release-06-02-00
TrackingPerformanceEvaluationModule.h
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 #pragma once
10 
11 #include <framework/core/Module.h>
12 #include <tracking/modules/trackingPerformanceEvaluation/PerformanceEvaluationBaseClass.h>
13 
14 #include <TList.h>
15 #include <TH1F.h>
16 #include <TH2F.h>
17 #include <TH3F.h>
18 
19 #include <mdst/dataobjects/MCParticle.h>
20 #include <tracking/dataobjects/MCParticleInfo.h>
21 
22 // forward declarations
23 namespace Belle2 {
28  class Track;
29  class TrackFitResult;
30 
39 
40  public:
41 
46 
51 
55  void initialize() override;
56 
60  void beginRun() override;
61 
65  void event() override;
66 
70  void endRun() override;
71 
75  void terminate() override;
76 
77  private:
78 
79  //list of functions to fill histograms
80  void fillTrackParams1DHistograms(const TrackFitResult* fitResult,
81  MCParticleInfo mcParticleInfo);
83  void fillTrackErrParams2DHistograms(const TrackFitResult* fitResult);
85  void fillHitsUsedInTrackFitHistograms(const Track& track);
87  bool isTraceable(const MCParticle& the_mcParticle);
89  void addMoreEfficiencyPlots(TList* histoList);
90  void addMoreInefficiencyPlots(TList* histoList);
92  /* user-defined parameters */
93  std::string m_MCParticlesName;
94  std::string m_MCRecoTracksName;
95  std::string m_RecoTracksName;
96  std::string m_TracksName;
99  /* list of histograms filled per MCParticle found in the event */
100 
101  TH1F* m_multiplicityTracks = nullptr;
102  TH1F* m_multiplicityRecoTracks = nullptr;
103  TH1F* m_multiplicityMCRecoTracks = nullptr;
104  TH1F* m_multiplicityFittedTracks = nullptr;
110  //error on track parameters
111  TH1F* m_h1_d0_err = nullptr;
112  TH1F* m_h1_phi_err = nullptr;
113  TH1F* m_h1_omega_err = nullptr;
114  TH1F* m_h1_z0_err = nullptr;
115  TH1F* m_h1_cotTheta_err = nullptr;
116  //residuals on track parameters
117  TH1F* m_h1_d0_res = nullptr;
118  TH1F* m_h1_phi_res = nullptr;
119  TH1F* m_h1_omega_res = nullptr;
120  TH1F* m_h1_z0_res = nullptr;
121  TH1F* m_h1_cotTheta_res = nullptr;
122  //residuals on momentum parameters
123  TH1F* m_h1_px_res = nullptr;
124  TH1F* m_h1_py_res = nullptr;
125  TH1F* m_h1_pz_res = nullptr;
126  TH1F* m_h1_p_res = nullptr;
127  TH1F* m_h1_pt_res = nullptr;
128  //residuals on position parameters
129  TH1F* m_h1_x_res = nullptr;
130  TH1F* m_h1_y_res = nullptr;
131  TH1F* m_h1_z_res = nullptr;
132  TH1F* m_h1_r_res = nullptr;
133  TH1F* m_h1_rtot_res = nullptr;
134  //pulls on track parameters
135  TH1F* m_h1_d0_pll = nullptr;
136  TH1F* m_h1_phi_pll = nullptr;
137  TH1F* m_h1_omega_pll = nullptr;
138  TH1F* m_h1_z0_pll = nullptr;
139  TH1F* m_h1_cotTheta_pll = nullptr;
143  TH2F* m_h2_d0errphi0err_xy = nullptr;
144  TH2F* m_h2_d0errphi0err_rz = nullptr;
145  TH2F* m_h2_z0errcotThetaerr_xy = nullptr;
147  TH2F* m_h2_VXDhitsPR_xy = nullptr;
148  TH2F* m_h2_VXDhitsPR_rz = nullptr;
149  TH1F* m_h1_nVXDhitsPR = nullptr;
150  TH1F* m_h1_nVXDhitsWeighted = nullptr;
151  TH1F* m_h1_nVXDhitsUsed = nullptr;
152  TH1F* m_h1_nCDChitsPR = nullptr;
153  TH1F* m_h1_nCDChitsWeighted = nullptr;
154  TH1F* m_h1_nCDChitsUsed = nullptr;
155  TH1F* m_h1_nHitDetID = nullptr;
156  TH2F* m_h2_TrackPointFitWeightVXD = nullptr;
157  TH2F* m_h2_TrackPointFitWeightCDC = nullptr;
159  TH1F* m_h1_pValue = nullptr;
161  TH2F* m_h2_OmegaerrOmegaVSpt = nullptr;
163  TH2F* m_h2_z0errVSpt_wtpxd = nullptr;
164  TH2F* m_h2_z0errVSpt_wfpxd = nullptr;
165  TH2F* m_h2_z0errVSpt_wpxd = nullptr;
166  TH2F* m_h2_z0errVSpt_wopxd = nullptr;
167  TH2F* m_h2_z0errVSpt = nullptr;
168  TH2F* m_h2_d0errVSpt_wtpxd = nullptr;
169  TH2F* m_h2_d0errVSpt_wfpxd = nullptr;
170  TH2F* m_h2_d0errVSpt_wpxd = nullptr;
171  TH2F* m_h2_d0errVSpt_wopxd = nullptr;
172  TH2F* m_h2_d0errVSpt = nullptr;
173  TH2F* m_h2_d0errMSVSpt = nullptr;
175  TH2F* m_h2_chargeVSchargeMC = nullptr;
177  //histograms used for efficiency plots
179  TH1F* m_h1_HitsMCRecoTrack = nullptr;
181  TH3F* m_h3_MCParticle = nullptr;
182  TH3F* m_h3_MCParticleswPXDHits = nullptr;
183  TH3F* m_h3_TracksPerMCParticle = nullptr;
187  TH3F* m_h3_MCRecoTrack = nullptr;
188  TH3F* m_h3_TracksPerMCRecoTrack = nullptr;
190  TH3F* m_h3_MCParticle_plus = nullptr;
192  TH3F* m_h3_MCRecoTrack_plus = nullptr;
194  TH3F* m_h3_MCParticle_minus = nullptr;
196  TH3F* m_h3_MCRecoTrack_minus = nullptr;
199  //histograms used for purity plots
200  TH3F* m_h3_MCParticlesPerTrack = nullptr;
201  TH3F* m_h3_Tracks = nullptr;
203  };
205 } // end of namespace
This struct is used by the TrackingPerformanceEvaluation Module to save information of reconstructed ...
A Class to store the Monte Carlo particle information.
Definition: MCParticle.h:32
Base class for Modules.
Definition: Module.h:72
This module takes the MCParticles, the genfit Tracks, the genfit TrackCand, and the MCTrackCands inpu...
Values of the result of a track fit with a given particle hypothesis.
Class that bundles various TrackFitResults.
Definition: Track.h:25
This module takes the MCParticles, the Tracks, the RecoTrack, and the MCRecoTracks input and produce ...
void addMoreEfficiencyPlots(TList *histoList)
add efficiency plots
TH1F * m_multiplicityMCRecoTracksPerRT
number of MCRecoTracks per RecoTracks
TH1F * m_multiplicityTracks
number of tracks per MCParticles
TH1F * m_multiplicityFittedTracks
number of fitted tracks per MCParticles
int m_ParticleHypothesis
Particle Hypothesis for the track fit (default: 211)
void event() override
This method is called for each event.
TH1F * m_multiplicityMCRecoTracks
number of MCRecoTracks per MCParticles
void endRun() override
This method is called if the current run ends.
TH1F * m_multiplicityRecoTracksPerMCRT
number of RecoTracks per MCRecoTracks
void terminate() override
This method is called at the end of the event processing.
TH1F * m_multiplicityMCParticlesPerTrack
number of MCParticles per fitted Track
bool isTraceable(const MCParticle &the_mcParticle)
is traceable
void beginRun() override
Called when entering a new run.
void fillTrackParams1DHistograms(const TrackFitResult *fitResult, MCParticleInfo mcParticleInfo)
fills err, resid and pull TH1F for each of the 5 track parameters
void addMoreInefficiencyPlots(TList *histoList)
add inefficiency plots
std::string m_MCParticlesName
MCParticle StoreArray name.
TH1F * m_h1_r_res
R residual (in cylindrical coordinates)
TH1F * m_multiplicityRecoTracks
number of recoTracks per MCParticles
void fillTrackErrParams2DHistograms(const TrackFitResult *fitResult)
fills TH2F
std::string m_MCRecoTracksName
MCRecoTrack StoreArray name.
TH1F * m_multiplicityFittedTracksPerMCRT
number of fitted tracks per MCRecoTrack
Abstract base class for different kinds of events.