Belle II Software  release-08-01-10
NoKickCutsEvalModule.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/dataobjects/hitXP.h>
13 #include <tracking/trackFindingVXD/sectorMapTools/NoKickCuts.h>
14 #include <tracking/trackFindingVXD/sectorMapTools/NoKickRTSel.h>
15 #include <TFile.h>
16 #include <math.h>
17 
18 namespace Belle2 {
40  class NoKickCutsEvalModule : public Module {
41  public:
43 
46  void initialize() override;
47 
50  void event() override;
51 
53  void endRun() override;
54 
56  void terminate() override;
57 
59  // enum EParameters {
60  // omega,
61  // d0,
62  // phi0,
63  // z0,
64  // tanlambda
65  // };
66 
73  double deltaParEval(hitXP hit1, hitXP hit2, NoKickCuts::EParameters par, bool is0 = false);
74 
75 
81  double cutFunction(int p, double pwidth);
82 
84  // double cutFunction(int p, double pwid)
85  // {
86  // double out;
87  // double mom = p * pwid + c_pmin;
88  // out = -3.971 * pow(10, -7) / pow(mom, 3.373) + 1;
89  // return out;
90  // }
91 
92  private:
93 
94  const double c_pmin = 0.025;
95  const double c_pmax = 10.;
96  const double c_tmin = 17.*M_PI / 180.;
97  const double c_tmax = 5. / 6.*M_PI;
98  const int c_nbin = 5000;
99  const int c_nbinp = 200;
100  const int c_nbinpar = 5;
101  const int c_nbinlay = 7;
102  const int c_nbint = 3;
103  double c_pwidth = (c_pmax - c_pmin) / (double)c_nbinp;
104  double c_twidth = (c_tmax - c_tmin) / (double)c_nbint;
105  const double c_multLimit = 1;
106  const double c_over = NAN;
107  int m_pCounter = 0;
108  int m_tCounter = 0;
109  int m_globCounter = 0;
111  bool c_fitMethod;
114  TFile* m_outputFile = nullptr;
115  std::vector<double> m_histoLim;
116  std::vector<std::vector<std::vector<std::vector<std::vector<TH1F*>>>>> m_histo;
119  std::vector<TString> m_namePar = {
120  "#omega",
121  "d0",
122  "#phi0",
123  "z0",
124  "tan#lambda"
125  };
126 
128  std::vector<TString> m_unitPar = {
129  "[cm^{-1}]",
130  "[cm]",
131  "[rad]",
132  "[cm]",
133  ""
134  };
135  };
137 }
Base class for Modules.
Definition: Module.h:72
This module evaluate the cuts used to select the training sample of the SectorMap.
const double c_pmax
maximum momentum evaluated
TFile * m_outputFile
output file of cuts
double cutFunction(int p, double pwidth)
This is the funcion that select the percentage that has to be cut away from deltaPar distributions (f...
int m_globCounter
counter of tracks cutted from global cuts
const double c_tmax
150 degrees.
const double c_multLimit
multiplier of the range limit of the histograms of DeltaX
void initialize() override
Initialize the Module.
bool c_validationON
flag to activate some validation plots
double deltaParEval(hitXP hit1, hitXP hit2, NoKickCuts::EParameters par, bool is0=false)
enum for the track-parameters
std::vector< TString > m_unitPar
units of tracks parameters
void event() override
This method is the core of the module.
std::vector< double > m_histoLim
limits of DeltaX histograms
std::vector< TString > m_namePar
name of track parameters
void endRun() override
This method is called if the current run ends.
const double c_pmin
alternative cut function (not used, wider cuts)
const int c_nbinp
number of momentum bins
void terminate() override
This method is called at the end of the event processing.
std::vector< std::vector< std::vector< std::vector< std::vector< TH1F * > > > > > m_histo
DeltaX histograms.
const int c_nbinlay
present IP too.
const double c_over
escape flag of some methods
const int c_nbinpar
number of track parameters
const int c_nbint
number of theta parameters
double c_twidth
width of theta bin
bool c_fitMethod
flag to activate the fit method to evaluate the cuts
const double c_tmin
17 degrees.
int m_pCounter
conter of hit out of range in momentum
int m_tCounter
counter of hit out of range in theta
double c_pwidth
width of momentum bin
NoKickRTSel m_trackSel
auxiliary variable to use methods of NoKickRTSel
const int c_nbin
number of bins of histogram of DeltaX
EParameters
enum for parameters name
Definition: NoKickCuts.h:44
This class implement some methods useful for the application of cuts evaluated in NoKickCutsEval modu...
Definition: NoKickRTSel.h:33
This class collects some information of a TrueHit, using SVDCLuster and MCParticle information too.
Definition: hitXP.h:32
Abstract base class for different kinds of events.