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 {
23
38 public:
40
43 void initialize() override;
44
47 void event() override;
48
50 void endRun() override;
51
52
54 // enum EParameters {
55 // omega,
56 // d0,
57 // phi0,
58 // z0,
59 // tanlambda
60 // };
61
68 double deltaParEval(const hitXP& hit1, const hitXP& hit2, NoKickCuts::EParameters par, bool is0 = false);
69
70
76 static double cutFunction(int p, double pwidth);
77
79 // double cutFunction(int p, double pwid)
80 // {
81 // double out;
82 // double mom = p * pwid + c_pmin;
83 // out = -3.971 * pow(10, -7) / pow(mom, 3.373) + 1;
84 // return out;
85 // }
86
87 private:
88
89 const double c_pmin = 0.025;
90 const double c_pmax = 10.;
91 const double c_tmin = 17.*M_PI / 180.;
92 const double c_tmax = 5. / 6.*M_PI;
93 const int c_nbin = 5000;
94 const int c_nbinp = 200;
95 const int c_nbinpar = 5;
96 const int c_nbinlay = 7;
97 const int c_nbint = 3;
98 double c_pwidth = (c_pmax - c_pmin) / (double)c_nbinp;
99 double c_twidth = (c_tmax - c_tmin) / (double)c_nbint;
100 const double c_multLimit = 1;
101 const double c_over = NAN;
102 int m_pCounter = 0;
103 int m_tCounter = 0;
107
109 TFile* m_outputFile = nullptr;
110 std::vector<double> m_histoLim;
111 std::vector<std::vector<std::vector<std::vector<std::vector<TH1F*>>>>> m_histo;
112
114 std::vector<TString> m_namePar = {
115 "#omega",
116 "d0",
117 "#phi0",
118 "z0",
119 "tan#lambda"
120 };
121
123 std::vector<TString> m_unitPar = {
124 "[cm^{-1}]",
125 "[cm]",
126 "[rad]",
127 "[cm]",
128 ""
129 };
130 };
131
132}
Module()
Constructor.
Definition Module.cc:30
const double c_pmax
maximum momentum evaluated
TFile * m_outputFile
output file of cuts
static 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
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
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
double deltaParEval(const hitXP &hit1, const hitXP &hit2, NoKickCuts::EParameters par, bool is0=false)
enum for the track-parameters
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.