Belle II Software development
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
18namespace Belle2 {
38 public:
40
43 void initialize() override;
44
47 void event() override;
48
50 void endRun() override;
51
53 void terminate() override;
54
56 // enum EParameters {
57 // omega,
58 // d0,
59 // phi0,
60 // z0,
61 // tanlambda
62 // };
63
70 double deltaParEval(hitXP hit1, hitXP hit2, NoKickCuts::EParameters par, bool is0 = false);
71
72
78 double cutFunction(int p, double pwidth);
79
81 // double cutFunction(int p, double pwid)
82 // {
83 // double out;
84 // double mom = p * pwid + c_pmin;
85 // out = -3.971 * pow(10, -7) / pow(mom, 3.373) + 1;
86 // return out;
87 // }
88
89 private:
90
91 const double c_pmin = 0.025;
92 const double c_pmax = 10.;
93 const double c_tmin = 17.*M_PI / 180.;
94 const double c_tmax = 5. / 6.*M_PI;
95 const int c_nbin = 5000;
96 const int c_nbinp = 200;
97 const int c_nbinpar = 5;
98 const int c_nbinlay = 7;
99 const int c_nbint = 3;
100 double c_pwidth = (c_pmax - c_pmin) / (double)c_nbinp;
101 double c_twidth = (c_tmax - c_tmin) / (double)c_nbint;
102 const double c_multLimit = 1;
103 const double c_over = NAN;
104 int m_pCounter = 0;
105 int m_tCounter = 0;
111 TFile* m_outputFile = nullptr;
112 std::vector<double> m_histoLim;
113 std::vector<std::vector<std::vector<std::vector<std::vector<TH1F*>>>>> m_histo;
116 std::vector<TString> m_namePar = {
117 "#omega",
118 "d0",
119 "#phi0",
120 "z0",
121 "tan#lambda"
122 };
123
125 std::vector<TString> m_unitPar = {
126 "[cm^{-1}]",
127 "[cm]",
128 "[rad]",
129 "[cm]",
130 ""
131 };
132 };
134}
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 function that select the percentage that has to be cut away from deltaPar distributions (...
int m_globCounter
counter of tracks cut 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
counter 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.