Belle II Software  release-06-00-14
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 
43 
45 
46  void initialize() override;
47 
48  void beginRun() override;
49 
50  void event() override;
51 
52  void endRun() override;
53 
54  void terminate() override;
55 
56  private:
57 
58  //list of functions to fill histograms
59  void fillTrackParams1DHistograms(const TrackFitResult* fitResult,
60  MCParticleInfo mcParticleInfo);
62  void fillTrackErrParams2DHistograms(const TrackFitResult* fitResult);
64  void fillHitsUsedInTrackFitHistograms(const Track& track);
66  bool isTraceable(const MCParticle& the_mcParticle);
68  void addMoreEfficiencyPlots(TList* histoList);
69  void addMoreInefficiencyPlots(TList* histoList);
71  /* user-defined parameters */
72  std::string m_MCParticlesName;
73  std::string m_MCRecoTracksName;
74  std::string m_RecoTracksName;
75  std::string m_TracksName;
78  /* list of histograms filled per MCParticle found in the event */
79 
80  TH1F* m_multiplicityTracks = nullptr;
81  TH1F* m_multiplicityRecoTracks = nullptr;
82  TH1F* m_multiplicityMCRecoTracks = nullptr;
83  TH1F* m_multiplicityFittedTracks = nullptr;
89  //error on track parameters
90  TH1F* m_h1_d0_err = nullptr;
91  TH1F* m_h1_phi_err = nullptr;
92  TH1F* m_h1_omega_err = nullptr;
93  TH1F* m_h1_z0_err = nullptr;
94  TH1F* m_h1_cotTheta_err = nullptr;
95  //residuals on track parameters
96  TH1F* m_h1_d0_res = nullptr;
97  TH1F* m_h1_phi_res = nullptr;
98  TH1F* m_h1_omega_res = nullptr;
99  TH1F* m_h1_z0_res = nullptr;
100  TH1F* m_h1_cotTheta_res = nullptr;
101  //residuals on momentum parameters
102  TH1F* m_h1_px_res = nullptr;
103  TH1F* m_h1_py_res = nullptr;
104  TH1F* m_h1_pz_res = nullptr;
105  TH1F* m_h1_p_res = nullptr;
106  TH1F* m_h1_pt_res = nullptr;
107  //residuals on position parameters
108  TH1F* m_h1_x_res = nullptr;
109  TH1F* m_h1_y_res = nullptr;
110  TH1F* m_h1_z_res = nullptr;
111  TH1F* m_h1_r_res = nullptr;
112  TH1F* m_h1_rtot_res = nullptr;
113  //pulls on track parameters
114  TH1F* m_h1_d0_pll = nullptr;
115  TH1F* m_h1_phi_pll = nullptr;
116  TH1F* m_h1_omega_pll = nullptr;
117  TH1F* m_h1_z0_pll = nullptr;
118  TH1F* m_h1_cotTheta_pll = nullptr;
122  TH2F* m_h2_d0errphi0err_xy = nullptr;
123  TH2F* m_h2_d0errphi0err_rz = nullptr;
124  TH2F* m_h2_z0errcotThetaerr_xy = nullptr;
126  TH2F* m_h2_VXDhitsPR_xy = nullptr;
127  TH2F* m_h2_VXDhitsPR_rz = nullptr;
128  TH1F* m_h1_nVXDhitsPR = nullptr;
129  TH1F* m_h1_nVXDhitsWeighted = nullptr;
130  TH1F* m_h1_nVXDhitsUsed = nullptr;
131  TH1F* m_h1_nCDChitsPR = nullptr;
132  TH1F* m_h1_nCDChitsWeighted = nullptr;
133  TH1F* m_h1_nCDChitsUsed = nullptr;
134  TH1F* m_h1_nHitDetID = nullptr;
135  TH2F* m_h2_TrackPointFitWeightVXD = nullptr;
136  TH2F* m_h2_TrackPointFitWeightCDC = nullptr;
138  TH1F* m_h1_pValue = nullptr;
140  TH2F* m_h2_OmegaerrOmegaVSpt = nullptr;
142  TH2F* m_h2_z0errVSpt_wtpxd = nullptr;
143  TH2F* m_h2_z0errVSpt_wfpxd = nullptr;
144  TH2F* m_h2_z0errVSpt_wpxd = nullptr;
145  TH2F* m_h2_z0errVSpt_wopxd = nullptr;
146  TH2F* m_h2_z0errVSpt = nullptr;
147  TH2F* m_h2_d0errVSpt_wtpxd = nullptr;
148  TH2F* m_h2_d0errVSpt_wfpxd = nullptr;
149  TH2F* m_h2_d0errVSpt_wpxd = nullptr;
150  TH2F* m_h2_d0errVSpt_wopxd = nullptr;
151  TH2F* m_h2_d0errVSpt = nullptr;
152  TH2F* m_h2_d0errMSVSpt = nullptr;
154  TH2F* m_h2_chargeVSchargeMC = nullptr;
156  //histograms used for efficiency plots
158  TH1F* m_h1_HitsMCRecoTrack = nullptr;
160  TH3F* m_h3_MCParticle = nullptr;
161  TH3F* m_h3_MCParticleswPXDHits = nullptr;
162  TH3F* m_h3_TracksPerMCParticle = nullptr;
166  TH3F* m_h3_MCRecoTrack = nullptr;
167  TH3F* m_h3_TracksPerMCRecoTrack = nullptr;
169  TH3F* m_h3_MCParticle_plus = nullptr;
171  TH3F* m_h3_MCRecoTrack_plus = nullptr;
173  TH3F* m_h3_MCParticle_minus = nullptr;
175  TH3F* m_h3_MCRecoTrack_minus = nullptr;
178  //histograms used for purity plots
179  TH3F* m_h3_MCParticlesPerTrack = nullptr;
180  TH3F* m_h3_Tracks = nullptr;
182  };
184 } // 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 the core of the module.
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.