Belle II Software development
KlongValidationModule.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 <framework/datastore/StoreArray.h>
13
14#include <mdst/dataobjects/MCParticle.h>
15#include <mdst/dataobjects/KLMCluster.h>
16
17#include <TFile.h>
18#include <string>
19#include <TH1F.h>
20#include <TGraph.h>
21
22namespace Belle2 {
30
31 public:
32
35
37 virtual ~KlongValidationModule();
38
40 virtual void initialize() override;
41
43 virtual void beginRun() override;
44
46 virtual void event() override;
47
49 virtual void endRun() override;
50
52 virtual void terminate() override;
53
54 protected:
55
56 private:
57
59 double m_momentum{ -1.};
61 double m_theta{ -1.};
63 double m_phi{ -1.};
65 double m_isKl{ -1.};
67 bool m_passed{false};
69 bool m_faked{false};
73 float m_KlIdCut{ -1};
74
76 bool m_isBeamBKG{false};
77 // use TH1F histogramms to calculate efficiency
79 TH1F* m_effPhi{nullptr};
81 TH1F* m_effTheta{nullptr};
83 TH1F* m_effMom{nullptr};
85 TH1F* m_fakePhi{nullptr};
87 TH1F* m_fakeTheta{nullptr};
89 TH1F* m_fakeMom{nullptr};
91 TH1F* m_Phi_Pass{nullptr};
93 TH1F* m_Theta_Pass{nullptr};
95 TH1F* m_Mom_Pass{nullptr};
96
98 TH1F* m_Phi_all{nullptr};
100 TH1F* m_Theta_all{nullptr};
102 TH1F* m_Mom_all{nullptr};
104 TH1F* m_Mom_all_plot{nullptr};
106 TH1F* m_fakePhi_Pass{nullptr};
108 TH1F* m_fakeTheta_Pass{nullptr};
110 TH1F* m_fakeMom_Pass{nullptr};
112 TH1F* m_time{nullptr};
114 TH1F* m_trackSep{nullptr};
116 TH1F* m_nLayer{nullptr};
118 TH1F* m_innermostLayer{nullptr};
120 TH1F* m_trackFlag{nullptr};
122 TH1F* m_ECLFlag{nullptr};
124 TH1F* m_bkgPhi{nullptr};
126 TH1F* m_bkgTheta{nullptr};
128 TH1F* m_bkgMom{nullptr};
130 TH1F* m_klidFake{nullptr};
132 TH1F* m_klidTrue{nullptr};
134 TH1F* m_klidAll{nullptr};
136 TGraph* m_ROC{nullptr};
138 TGraph* m_backRej{nullptr};
139
140
145
147 const std::vector<double> m_xbins =
148 {0, 0.001, 0.01, 0.1, 0.15, 0.175, 0.2, 0.3, 0.4, 0.5, 1};
149
151 std::string m_outputName = "K_long_full_validation_sample.root";
152
154 std::string m_contact = "";
155
157 TFile* m_f = nullptr;
158
159 }; // end class
160
162} // end namespace Belle2
163
Module used by the validation server to generate root files for the validation.
TH1F * m_Mom_Pass
momentum efficiency
TH1F * m_effTheta
efficiency in angle to z
bool m_passed
did cluster pass selection of algorythm?
TH1F * m_trackSep
track separation distance plot
TH1F * m_Mom_all_plot
momentum efficiency
TH1F * m_Theta_Pass
efficiency in angle to z
TH1F * m_fakeMom_Pass
fake momentum plot
StoreArray< KLMCluster > m_klmClusters
storearrays
std::string m_contact
contact email address
virtual void initialize() override
initialize
TGraph * m_backRej
background rejection
TH1F * m_fakePhi_Pass
fake phi, angle in x-y
virtual void event() override
process event
const std::vector< double > m_xbins
bins used for the ROC plots
virtual void endRun() override
end run
virtual void terminate() override
terminate
TH1F * m_fakeTheta_Pass
fake theta, angle to z
TH1F * m_Phi_Pass
efficiency in x-y plane
TH1F * m_Phi_all
efficiency in x-y plane
virtual void beginRun() override
beginn run
std::string m_outputName
output file name
TH1F * m_time
cluster timing plot
float m_KlIdCut
of > 0 use Klid else use trackflag as reconstruction criterion
virtual ~KlongValidationModule()
Destructor
StoreArray< MCParticle > m_mcParticles
storearrays
bool m_faked
cluster wrongly reconstructed as K0L?
bool m_reconstructedAsKl
cluster reconstructed as K0L?
TH1F * m_fakeTheta
fake theta, angle to z
TH1F * m_effMom
momentum efficiency
TH1F * m_effPhi
efficiency in x-y plane
TH1F * m_Mom_all
momentum efficiency
TH1F * m_fakeMom
fake momentum plot
TH1F * m_fakePhi
fake phi, angle in x-y
TH1F * m_Theta_all
efficiency in angle to z
Base class for Modules.
Definition: Module.h:72
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Abstract base class for different kinds of events.