Belle II Software development
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
25namespace Belle2 {
30 class Track;
31 class TrackFitResult;
32
38
39 public:
40
45
50
54 void initialize() override;
55
59 void beginRun() override;
60
64 void event() override;
65
69 void endRun() override;
70
74 void terminate() override;
75
76 private:
77
78 //list of functions to fill histograms
79 void fillTrackParams1DHistograms(const TrackFitResult* fitResult,
80 MCParticleInfo mcParticleInfo);
82 void fillTrackErrParams2DHistograms(const TrackFitResult* fitResult);
84 void fillHitsUsedInTrackFitHistograms(const Track& track);
86 bool isTraceable(const MCParticle& the_mcParticle);
88 void addMoreEfficiencyPlots(TList* histoList);
89 void addMoreInefficiencyPlots(TList* histoList);
91 /* user-defined parameters */
92 std::string m_MCParticlesName;
93 std::string m_MCRecoTracksName;
94 std::string m_RecoTracksName;
95 std::string m_TracksName;
103 /* list of histograms filled per MCParticle found in the event */
104
105 TH1F* m_multiplicityTracks = nullptr;
106 TH1F* m_multiplicityRecoTracks = nullptr;
114 //error on track parameters
115 TH1F* m_h1_d0_err = nullptr;
116 TH1F* m_h1_phi_err = nullptr;
117 TH1F* m_h1_omega_err = nullptr;
118 TH1F* m_h1_z0_err = nullptr;
119 TH1F* m_h1_cotTheta_err = nullptr;
120 //residuals on track parameters
121 TH1F* m_h1_d0_res = nullptr;
122 TH1F* m_h1_phi_res = nullptr;
123 TH1F* m_h1_omega_res = nullptr;
124 TH1F* m_h1_z0_res = nullptr;
125 TH1F* m_h1_cotTheta_res = nullptr;
126 //residuals on momentum parameters
127 TH1F* m_h1_px_res = nullptr;
128 TH1F* m_h1_py_res = nullptr;
129 TH1F* m_h1_pz_res = nullptr;
130 TH1F* m_h1_p_res = nullptr;
131 TH1F* m_h1_pt_res = nullptr;
132 //residuals on position parameters
133 TH1F* m_h1_x_res = nullptr;
134 TH1F* m_h1_y_res = nullptr;
135 TH1F* m_h1_z_res = nullptr;
136 TH1F* m_h1_r_res = nullptr;
137 TH1F* m_h1_rtot_res = nullptr;
138 //pulls on track parameters
139 TH1F* m_h1_d0_pll = nullptr;
140 TH1F* m_h1_phi_pll = nullptr;
141 TH1F* m_h1_omega_pll = nullptr;
142 TH1F* m_h1_z0_pll = nullptr;
143 TH1F* m_h1_cotTheta_pll = nullptr;
147 TH2F* m_h2_d0errphi0err_xy = nullptr;
148 TH2F* m_h2_d0errphi0err_rz = nullptr;
149 TH2F* m_h2_z0errcotThetaerr_xy = nullptr;
151 TH2F* m_h2_VXDhitsPR_xy = nullptr;
152 TH2F* m_h2_VXDhitsPR_rz = nullptr;
153 TH1F* m_h1_nVXDhitsPR = nullptr;
154 TH1F* m_h1_nVXDhitsWeighted = nullptr;
155 TH1F* m_h1_nVXDhitsUsed = nullptr;
156 TH1F* m_h1_nCDChitsPR = nullptr;
157 TH1F* m_h1_nCDChitsWeighted = nullptr;
158 TH1F* m_h1_nCDChitsUsed = nullptr;
159 TH1F* m_h1_nHitDetID = nullptr;
163 TH1F* m_h1_pValue = nullptr;
165 TH2F* m_h2_OmegaerrOmegaVSpt = nullptr;
167 TH2F* m_h2_z0errVSpt_wtpxd = nullptr;
168 TH2F* m_h2_z0errVSpt_wfpxd = nullptr;
169 TH2F* m_h2_z0errVSpt_wpxd = nullptr;
170 TH2F* m_h2_z0errVSpt_wopxd = nullptr;
171 TH2F* m_h2_z0errVSpt = nullptr;
172 TH2F* m_h2_d0errVSpt_wtpxd = nullptr;
173 TH2F* m_h2_d0errVSpt_wfpxd = nullptr;
174 TH2F* m_h2_d0errVSpt_wpxd = nullptr;
175 TH2F* m_h2_d0errVSpt_wopxd = nullptr;
176 TH2F* m_h2_d0errVSpt = nullptr;
177 TH2F* m_h2_d0errMSVSpt = nullptr;
179 TH2F* m_h2_chargeVSchargeMC = nullptr;
181 //histograms used for efficiency plots
183 TH1F* m_h1_HitsMCRecoTrack = nullptr;
185 TH3F* m_h3_MCParticle = nullptr;
186 TH3F* m_h3_MCParticleswPXDHits = nullptr;
187 TH3F* m_h3_TracksPerMCParticle = nullptr;
191 TH3F* m_h3_MCRecoTrack = nullptr;
194 TH3F* m_h3_MCParticle_plus = nullptr;
196 TH3F* m_h3_MCRecoTrack_plus = nullptr;
198 TH3F* m_h3_MCParticle_minus = nullptr;
200 TH3F* m_h3_MCRecoTrack_minus = nullptr;
203 //histograms used for purity plots
204 TH3F* m_h3_MCParticlesPerTrack = nullptr;
205 TH3F* m_h3_Tracks = nullptr;
207 };
209} // 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...
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
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.