Belle II Software  release-08-01-10
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 #include <mdst/dataobjects/Track.h>
14 #include <mdst/dataobjects/MCParticle.h>
15 #include <tracking/dataobjects/MCParticleInfo.h>
16 #include <tracking/dataobjects/RecoTrack.h>
17 
18 #include <TList.h>
19 #include <TH1F.h>
20 #include <TH2F.h>
21 #include <TH3F.h>
22 
23 
24 // forward declarations
25 namespace Belle2 {
30  class Track;
31  class TrackFitResult;
32 
41 
42  public:
43 
48 
53 
57  void initialize() override;
58 
62  void beginRun() override;
63 
67  void event() override;
68 
72  void endRun() override;
73 
77  void terminate() override;
78 
79  private:
80 
81  //list of functions to fill histograms
82  void fillTrackParams1DHistograms(const TrackFitResult* fitResult,
83  MCParticleInfo mcParticleInfo);
85  void fillTrackErrParams2DHistograms(const TrackFitResult* fitResult);
87  void fillHitsUsedInTrackFitHistograms(const Track& track);
89  bool isTraceable(const MCParticle& the_mcParticle);
91  void addMoreEfficiencyPlots(TList* histoList);
92  void addMoreInefficiencyPlots(TList* histoList);
94  /* user-defined parameters */
95  std::string m_MCParticlesName;
96  std::string m_MCRecoTracksName;
97  std::string m_RecoTracksName;
98  std::string m_TracksName;
106  /* list of histograms filled per MCParticle found in the event */
107 
108  TH1F* m_multiplicityTracks = nullptr;
109  TH1F* m_multiplicityRecoTracks = nullptr;
110  TH1F* m_multiplicityMCRecoTracks = nullptr;
111  TH1F* m_multiplicityFittedTracks = nullptr;
117  //error on track parameters
118  TH1F* m_h1_d0_err = nullptr;
119  TH1F* m_h1_phi_err = nullptr;
120  TH1F* m_h1_omega_err = nullptr;
121  TH1F* m_h1_z0_err = nullptr;
122  TH1F* m_h1_cotTheta_err = nullptr;
123  //residuals on track parameters
124  TH1F* m_h1_d0_res = nullptr;
125  TH1F* m_h1_phi_res = nullptr;
126  TH1F* m_h1_omega_res = nullptr;
127  TH1F* m_h1_z0_res = nullptr;
128  TH1F* m_h1_cotTheta_res = nullptr;
129  //residuals on momentum parameters
130  TH1F* m_h1_px_res = nullptr;
131  TH1F* m_h1_py_res = nullptr;
132  TH1F* m_h1_pz_res = nullptr;
133  TH1F* m_h1_p_res = nullptr;
134  TH1F* m_h1_pt_res = nullptr;
135  //residuals on position parameters
136  TH1F* m_h1_x_res = nullptr;
137  TH1F* m_h1_y_res = nullptr;
138  TH1F* m_h1_z_res = nullptr;
139  TH1F* m_h1_r_res = nullptr;
140  TH1F* m_h1_rtot_res = nullptr;
141  //pulls on track parameters
142  TH1F* m_h1_d0_pll = nullptr;
143  TH1F* m_h1_phi_pll = nullptr;
144  TH1F* m_h1_omega_pll = nullptr;
145  TH1F* m_h1_z0_pll = nullptr;
146  TH1F* m_h1_cotTheta_pll = nullptr;
150  TH2F* m_h2_d0errphi0err_xy = nullptr;
151  TH2F* m_h2_d0errphi0err_rz = nullptr;
152  TH2F* m_h2_z0errcotThetaerr_xy = nullptr;
154  TH2F* m_h2_VXDhitsPR_xy = nullptr;
155  TH2F* m_h2_VXDhitsPR_rz = nullptr;
156  TH1F* m_h1_nVXDhitsPR = nullptr;
157  TH1F* m_h1_nVXDhitsWeighted = nullptr;
158  TH1F* m_h1_nVXDhitsUsed = nullptr;
159  TH1F* m_h1_nCDChitsPR = nullptr;
160  TH1F* m_h1_nCDChitsWeighted = nullptr;
161  TH1F* m_h1_nCDChitsUsed = nullptr;
162  TH1F* m_h1_nHitDetID = nullptr;
163  TH2F* m_h2_TrackPointFitWeightVXD = nullptr;
164  TH2F* m_h2_TrackPointFitWeightCDC = nullptr;
166  TH1F* m_h1_pValue = nullptr;
168  TH2F* m_h2_OmegaerrOmegaVSpt = nullptr;
170  TH2F* m_h2_z0errVSpt_wtpxd = nullptr;
171  TH2F* m_h2_z0errVSpt_wfpxd = nullptr;
172  TH2F* m_h2_z0errVSpt_wpxd = nullptr;
173  TH2F* m_h2_z0errVSpt_wopxd = nullptr;
174  TH2F* m_h2_z0errVSpt = nullptr;
175  TH2F* m_h2_d0errVSpt_wtpxd = nullptr;
176  TH2F* m_h2_d0errVSpt_wfpxd = nullptr;
177  TH2F* m_h2_d0errVSpt_wpxd = nullptr;
178  TH2F* m_h2_d0errVSpt_wopxd = nullptr;
179  TH2F* m_h2_d0errVSpt = nullptr;
180  TH2F* m_h2_d0errMSVSpt = nullptr;
182  TH2F* m_h2_chargeVSchargeMC = nullptr;
184  //histograms used for efficiency plots
186  TH1F* m_h1_HitsMCRecoTrack = nullptr;
188  TH3F* m_h3_MCParticle = nullptr;
189  TH3F* m_h3_MCParticleswPXDHits = nullptr;
190  TH3F* m_h3_TracksPerMCParticle = nullptr;
194  TH3F* m_h3_MCRecoTrack = nullptr;
195  TH3F* m_h3_TracksPerMCRecoTrack = nullptr;
197  TH3F* m_h3_MCParticle_plus = nullptr;
199  TH3F* m_h3_MCRecoTrack_plus = nullptr;
201  TH3F* m_h3_MCParticle_minus = nullptr;
203  TH3F* m_h3_MCRecoTrack_minus = nullptr;
206  //histograms used for purity plots
207  TH3F* m_h3_MCParticlesPerTrack = nullptr;
208  TH3F* m_h3_Tracks = nullptr;
210  };
212 } // 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.
StoreArray< RecoTrack > m_PRRecoTracks
PR RecoTracks StoreArray.
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
StoreArray< RecoTrack > m_MCRecoTracks
MC RecoTracks StoreArray.
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.
StoreArray< MCParticle > m_MCParticles
MCParticles StoreArray.
TH1F * m_multiplicityFittedTracksPerMCRT
number of fitted tracks per MCRecoTrack
Abstract base class for different kinds of events.