Belle II Software  release-05-01-25
NoKickCuts.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2017 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Valerio Bertacchi *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #include <TObject.h>
12 
13 #pragma once
14 
15 
16 namespace Belle2 {
27  class NoKickCuts: public TObject {
28 
29  public:
31  NoKickCuts() {}
32 
34  explicit NoKickCuts(std::string m_fileName)
35  {
36  if (m_fileName.size() != 0) FillCuts(m_fileName); //else cuts not applied
37  }
38 
40  enum EMinMax {
41  c_Min,
42  c_Max
43  };
44 
46  enum EParameters {
47  c_Omega,
48  c_D0,
49  c_Phi0,
50  c_Z0,
51  c_Tanlambda
52  };
53 
55  enum ECutName {
56  c_Norm,
57  c_Pow,
58  c_Bkg
59  };
60 
69  std::vector<double> cutSelector(double sintheta, double momentum, int layer1, int layer2, EParameters par);
70 
71  /* This methods select the cuts as function parameters from TH3F cointained
72  * in cutfile in function of track parameter and layer only. EMinMax represent
73  * if you want the maximum or minimum cut, instead ECutName are the three
74  * parameters of the theta-p parametrization of the cuts (see the enum type)
75  * input: (first layer, second layer, track parameter, min/max value, fit parameter)
76  * output: (value of the fit parameter of a specific cut)
77  */
78  double getCut(int layer1, int layer2, EParameters par, EMinMax m, ECutName cut);
79 
84  void FillCuts(std::string m_fileName);
85 
86  private:
87  std::vector<std::vector <std::vector<std::vector <double>>>> m_cutNorm;
88  std::vector<std::vector <std::vector<std::vector <double>>>> m_cutPow;
89  std::vector<std::vector <std::vector<std::vector <double>>>> m_cutBkg;
91  int m_nbinpar = 5;
92  int m_nbinlay = 7;
94  ClassDef(NoKickCuts, 1);
96  };
98 }
Belle2::NoKickCuts::m_cutPow
std::vector< std::vector< std::vector< std::vector< double > > > > m_cutPow
matrix of fit-parameter of cut, power
Definition: NoKickCuts.h:96
Belle2::NoKickCuts::EMinMax
EMinMax
enum for minimum/maximum value of cuts
Definition: NoKickCuts.h:48
Belle2::NoKickCuts::EParameters
EParameters
enum for parameters name
Definition: NoKickCuts.h:54
Belle2::NoKickCuts::m_cutNorm
std::vector< std::vector< std::vector< std::vector< double > > > > m_cutNorm
matrix of fit-parameter of cut, norm
Definition: NoKickCuts.h:95
Belle2::NoKickCuts::NoKickCuts
NoKickCuts()
constructor of the class without arguments, used in cuts evaluations
Definition: NoKickCuts.h:39
Belle2::NoKickCuts::ClassDef
ClassDef(NoKickCuts, 1)
Making this class a ROOT class.
Belle2::NoKickCuts::cutSelector
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:20
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::NoKickCuts::getCut
double getCut(int layer1, int layer2, EParameters par, EMinMax m, ECutName cut)
Definition: NoKickCuts.cc:32
Belle2::NoKickCuts::ECutName
ECutName
enum for the cuts name
Definition: NoKickCuts.h:63
Belle2::NoKickCuts::m_nbinpar
int m_nbinpar
number of track parameter
Definition: NoKickCuts.h:99
Belle2::NoKickCuts::m_cutBkg
std::vector< std::vector< std::vector< std::vector< double > > > > m_cutBkg
matrix of fit-parameter of cut, constant
Definition: NoKickCuts.h:97
Belle2::NoKickCuts::m_nbinlay
int m_nbinlay
number of layers (IP too)
Definition: NoKickCuts.h:100
Belle2::NoKickCuts::FillCuts
void FillCuts(std::string m_fileName)
This method fill the cuts (used in NoKickCutsEval method) to create the cutfile.
Definition: NoKickCuts.cc:61