9#include <tracking/trackFindingVXD/sectorMapTools/NoKickCuts.h>
20 std::vector<double> out;
21 for (
int i = c_Min; i <= c_Max; i++) {
22 double cut =
getCut(layer1, layer2, par, (
EMinMax)i, c_Norm) /
32 std::vector<std::vector <std::vector <std::vector<double>>>> cutVector;
55 out = cutVector.at(m).at(par).at(layer1).at(layer2);
61 TFile* file = TFile::Open(m_fileName.c_str());
64 TH3F* input_norm_m = (TH3F*)file->Get(
"output_norm_m");
65 TH3F* input_pow_m = (TH3F*)file->Get(
"output_pow_m");
66 TH3F* input_bkg_m = (TH3F*)file->Get(
"output_bkg_m") ;
68 TH3F* input_norm_M = (TH3F*)file->Get(
"output_norm_M");
69 TH3F* input_pow_M = (TH3F*)file->Get(
"output_pow_M");
70 TH3F* input_bkg_M = (TH3F*)file->Get(
"output_bkg_M");
73 for (
int mm = 0; mm < 2; mm++) {
74 std::vector<std::vector<std::vector<double>>> m_cutNorm_minmax;
75 std::vector<std::vector<std::vector<double>>> m_cutPow_minmax;
76 std::vector<std::vector<std::vector<double>>> m_cutBkg_minmax;
77 for (
int par = 0; par <
m_nbinpar; par++) {
78 std::vector<std::vector<double>> m_cutNorm_par;
79 std::vector<std::vector<double>> m_cutPow_par;
80 std::vector<std::vector<double>> m_cutBkg_par;
81 for (
int lay1 = 0; lay1 <
m_nbinlay; lay1++) {
82 std::vector<double> m_cutNorm_lay1;
83 std::vector<double> m_cutPow_lay1;
84 std::vector<double> m_cutBkg_lay1;
85 for (
int lay2 = 0; lay2 <
m_nbinlay; lay2++) {
86 int binNumber = input_norm_m->GetBin(par, lay1, lay2);
89 m_cutNorm_lay1.push_back(input_norm_m->GetBinContent(binNumber));
90 m_cutPow_lay1.push_back(input_pow_m->GetBinContent(binNumber));
91 m_cutBkg_lay1.push_back(input_bkg_m->GetBinContent(binNumber));
94 m_cutNorm_lay1.push_back(input_norm_M->GetBinContent(binNumber));
95 m_cutPow_lay1.push_back(input_pow_M->GetBinContent(binNumber));
96 m_cutBkg_lay1.push_back(input_bkg_M->GetBinContent(binNumber));
99 m_cutNorm_par.push_back(m_cutNorm_lay1);
100 m_cutPow_par.push_back(m_cutPow_lay1);
101 m_cutBkg_par.push_back(m_cutBkg_lay1);
102 m_cutNorm_lay1.clear();
103 m_cutPow_lay1.clear();
104 m_cutBkg_lay1.clear();
106 m_cutNorm_minmax.push_back(m_cutNorm_par);
107 m_cutPow_minmax.push_back(m_cutPow_par);
108 m_cutBkg_minmax.push_back(m_cutBkg_par);
109 m_cutNorm_par.clear();
110 m_cutPow_par.clear();
111 m_cutBkg_par.clear();
114 m_cutPow.push_back(m_cutPow_minmax);
115 m_cutBkg.push_back(m_cutBkg_minmax);
116 m_cutNorm_minmax.clear();
117 m_cutPow_minmax.clear();
118 m_cutBkg_minmax.clear();
std::vector< std::vector< std::vector< std::vector< double > > > > m_cutPow
matrix of fit-parameter of cut, power
void FillCuts(std::string m_fileName)
This method fill the cuts (used in NoKickCutsEval method) to create the cutfile.
double getCut(int layer1, int layer2, EParameters par, EMinMax m, ECutName cut)
EParameters
enum for parameters name
int m_nbinpar
number of track parameter
ECutName
enum for the cuts name
EMinMax
enum for minimum/maximum value of cuts
int m_nbinlay
number of layers (IP too)
std::vector< std::vector< std::vector< std::vector< double > > > > m_cutNorm
matrix of fit-parameter of cut, norm
std::vector< std::vector< std::vector< std::vector< double > > > > m_cutBkg
matrix of fit-parameter of cut, constant
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,...
double sqrt(double a)
sqrt for double
Abstract base class for different kinds of events.