Belle II Software  release-08-01-10
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 
22 namespace Belle2 {
32  class KlongValidationModule : public Module {
33 
34  public:
35 
38 
40  virtual ~KlongValidationModule();
41 
43  virtual void initialize() override;
44 
46  virtual void beginRun() override;
47 
49  virtual void event() override;
50 
52  virtual void endRun() override;
53 
55  virtual void terminate() override;
56 
57  protected:
58 
59  private:
60 
62  double m_momentum{ -1.};
64  double m_theta{ -1.};
66  double m_phi{ -1.};
68  double m_isKl{ -1.};
70  bool m_passed{false};
72  bool m_faked{false};
74  bool m_reconstructedAsKl{false};
76  float m_KlIdCut{ -1};
77 
79  bool m_isBeamBKG{false};
80  // use TH1F histogramms to calculate efficiency
82  TH1F* m_effPhi{nullptr};
84  TH1F* m_effTheta{nullptr};
86  TH1F* m_effMom{nullptr};
88  TH1F* m_fakePhi{nullptr};
90  TH1F* m_fakeTheta{nullptr};
92  TH1F* m_fakeMom{nullptr};
94  TH1F* m_Phi_Pass{nullptr};
96  TH1F* m_Theta_Pass{nullptr};
98  TH1F* m_Mom_Pass{nullptr};
99 
101  TH1F* m_Phi_all{nullptr};
103  TH1F* m_Theta_all{nullptr};
105  TH1F* m_Mom_all{nullptr};
107  TH1F* m_Mom_all_plot{nullptr};
109  TH1F* m_fakePhi_Pass{nullptr};
111  TH1F* m_fakeTheta_Pass{nullptr};
113  TH1F* m_fakeMom_Pass{nullptr};
115  TH1F* m_time{nullptr};
117  TH1F* m_trackSep{nullptr};
119  TH1F* m_nLayer{nullptr};
121  TH1F* m_innermostLayer{nullptr};
123  TH1F* m_trackFlag{nullptr};
125  TH1F* m_ECLFlag{nullptr};
127  TH1F* m_bkgPhi{nullptr};
129  TH1F* m_bkgTheta{nullptr};
131  TH1F* m_bkgMom{nullptr};
133  TH1F* m_klidFake{nullptr};
135  TH1F* m_klidTrue{nullptr};
137  TH1F* m_klidAll{nullptr};
139  TGraph* m_ROC{nullptr};
141  TGraph* m_backRej{nullptr};
142 
143 
148 
150  const std::vector<double> m_xbins =
151  {0, 0.001, 0.01, 0.1, 0.15, 0.175, 0.2, 0.3, 0.4, 0.5, 1};
152 
154  std::string m_outputName = "K_long_full_validation_sample.root";
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
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.