Belle II Software development
NoKickCuts.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#include <TObject.h>
10
11#pragma once
12
13
14namespace Belle2 {
25 class NoKickCuts: public TObject {
26
27 public:
30
32 explicit NoKickCuts(std::string m_fileName)
33 {
34 if (m_fileName.size() != 0) FillCuts(m_fileName); //else cuts not applied
35 }
36
38 enum EMinMax {
39 c_Min,
40 c_Max
41 };
42
45 c_Omega,
46 c_D0,
47 c_Phi0,
48 c_Z0,
49 c_Tanlambda
50 };
51
53 enum ECutName {
54 c_Norm,
55 c_Pow,
56 c_Bkg
57 };
58
67 std::vector<double> cutSelector(double sintheta, double momentum, int layer1, int layer2, EParameters par);
68
69 /* This methods select the cuts as function parameters from TH3F cointained
70 * in cutfile in function of track parameter and layer only. EMinMax represent
71 * if you want the maximum or minimum cut, instead ECutName are the three
72 * parameters of the theta-p parametrization of the cuts (see the enum type)
73 * input: (first layer, second layer, track parameter, min/max value, fit parameter)
74 * output: (value of the fit parameter of a specific cut)
75 */
76 double getCut(int layer1, int layer2, EParameters par, EMinMax m, ECutName cut);
77
82 void FillCuts(std::string m_fileName);
83
84 private:
85 std::vector<std::vector <std::vector<std::vector <double>>>> m_cutNorm;
86 std::vector<std::vector <std::vector<std::vector <double>>>> m_cutPow;
87 std::vector<std::vector <std::vector<std::vector <double>>>> m_cutBkg;
89 int m_nbinpar = 5;
90 int m_nbinlay = 7;
94 };
96}
This class is an auxiliary class that implement methods to access to a single cut,...
Definition: NoKickCuts.h:25
std::vector< std::vector< std::vector< std::vector< double > > > > m_cutPow
matrix of fit-parameter of cut, power
Definition: NoKickCuts.h:86
NoKickCuts()
constructor of the class without arguments, used in cuts evaluations
Definition: NoKickCuts.h:29
void FillCuts(std::string m_fileName)
This method fill the cuts (used in NoKickCutsEval method) to create the cutfile.
Definition: NoKickCuts.cc:59
double getCut(int layer1, int layer2, EParameters par, EMinMax m, ECutName cut)
Definition: NoKickCuts.cc:30
EParameters
enum for parameters name
Definition: NoKickCuts.h:44
int m_nbinpar
number of track parameter
Definition: NoKickCuts.h:89
ECutName
enum for the cuts name
Definition: NoKickCuts.h:53
EMinMax
enum for minimum/maximum value of cuts
Definition: NoKickCuts.h:38
int m_nbinlay
number of layers (IP too)
Definition: NoKickCuts.h:90
NoKickCuts(std::string m_fileName)
constructor with name of the CutFile, used in cuts application
Definition: NoKickCuts.h:32
std::vector< std::vector< std::vector< std::vector< double > > > > m_cutNorm
matrix of fit-parameter of cut, norm
Definition: NoKickCuts.h:85
std::vector< std::vector< std::vector< std::vector< double > > > > m_cutBkg
matrix of fit-parameter of cut, constant
Definition: NoKickCuts.h:87
ClassDef(NoKickCuts, 1)
Making this class a ROOT class.
std::vector< double > cutSelector(double sintheta, double momentum, int layer1, int layer2, EParameters par)
This methods selects 2 cuts (minimum and maximum inside a vector) from the information of theta,...
Definition: NoKickCuts.cc:18
Abstract base class for different kinds of events.