ATLAS Offline Software
TtresChi2.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3  */
4 
5 #ifndef TtresChi2_H
6 #define TtresChi2_H
7 
8 #include <iostream>
9 #include <string>
10 #include <vector>
11 #include "TLorentzVector.h"
13 
14 
15 class TtresChi2 {
16 public:
17  TtresChi2(std::string units = "GeV");
18  virtual ~TtresChi2();
19 
20  enum WReco {
22  };
23  enum Chi2Version {
25  };
26  enum PtDiff {
28  };
29  enum Btag {
31  };
32  enum RunMode {
34  };
35 private:
38  std::vector<TLorentzVector*> GetNeutrinos(TLorentzVector*, TLorentzVector*);
39 
43  int m_debug;
48  double m_Units;
50  double m_highJetMass;
52 
54  TLorentzVector res_Tt;
55 
56  std::vector < double > m_chi2Values;
57  std::vector < double > m_chi2Wh_Values;
58  std::vector < double > m_chi2Th_Values;
59  std::vector < double > m_chi2ThWh_Values;
60  std::vector < double > m_chi2Tl_Values;
61  std::vector < double > m_chi2PtDiff_Values;
62 
63  std::vector < double > m_PtDiff_Values;
64  std::vector < double > m_Wh_Values;
65  std::vector < double > m_ThWh_Values;
66  std::vector < double > m_Th_Values;
67  std::vector < double > m_Tl_Values;
68 
69  std::vector < int > m_i_Wq1;
70  std::vector < int > m_i_Wq2;
71  std::vector < int > m_i_Thb;
72  std::vector < int > m_i_Tlb;
73  std::vector < int > m_i_n;
74 
76 public:
77  void Init(Chi2Version version = DATA2012SUMMER2013, double highJetMass = 60.0);
78  void Reset();
79  bool findMinChiSquare_HMelseLM(TLorentzVector*, const std::vector<TLorentzVector*>*, const std::vector<bool>*,
80  TLorentzVector*, int&, int&, int&, int&, int&, double&, double&, double&);
81  bool findMinChiSquare_LMelseHM(TLorentzVector*, const std::vector<TLorentzVector*>*, const std::vector<bool>*,
82  TLorentzVector*, int&, int&, int&, int&, int&, double&, double&, double&);
83 
84  bool findMinChiSquare_AllRanges(TLorentzVector*, const std::vector<TLorentzVector*>*, const std::vector<bool>*,
85  TLorentzVector*, int&, int&, int&, int&, int&, double&, double&, double&);
86 
87  bool findMinChiSquare(TLorentzVector*, const std::vector<TLorentzVector*>*, const std::vector<bool>*, TLorentzVector*,
88  int&, int&, int&, int&, int&, double&, double&, double&);
89 
90  bool findMinChiSquare_HighMass(TLorentzVector*, const std::vector<TLorentzVector*>*, const std::vector<bool>*,
91  TLorentzVector*, int&, int&, int&, int&, double&, double&, double&);
92 
93  bool findMinChiSquare_VeryHighMass(TLorentzVector*, const std::vector<TLorentzVector*>*, const std::vector<bool>*,
94  TLorentzVector*, int&, int&, int&, double&, double&, double&);
95 
96  inline void SetDebugMode(bool X) {m_debug = X; if (m_debug > 2) m_NeutrinoBuilder->setdebuglevel(m_debug); }
97  inline void SetWReconstruction(WReco X) {m_WReco = X;}
98  inline void SetBtagHandeling(Btag X) {m_Btag = X;}
99  inline void SetHighMThreshold(double highJetMass) {m_highJetMass = highJetMass;}
100  inline void UsePtDiff(PtDiff X) {m_UsePtDiff = X;}
101  inline void SetRunMode(RunMode X) {m_RunMode = X;}
102 
103  inline double getResult_Chi2All() {return res_chi2All;}
104  inline double getResult_Chi2WH() {return res_chi2WH;}
105  inline double getResult_Chi2TopH() {return res_chi2TopH;}
106  inline double getResult_Chi2TopL() {return res_chi2TopL;}
107  inline double getResult_Mtl() {return res_Mtl;}
108  inline double getResult_Mwh() {return res_Mwh;}
109  inline double getResult_Mth() {return res_Mth;}
110  inline double getResult_Mtt() {return res_Mtt;}
111 
112  inline std::vector < double > getAllChi2Values() {return m_chi2Values;}
113  inline std::vector < double > getAllWh_Chi2Values() {return m_chi2Wh_Values;}
114  inline std::vector < double > getAllTh_Chi2Values() {return m_chi2Th_Values;}
115  inline std::vector < double > getAllThWh_Chi2Values() {return m_chi2ThWh_Values;}
116  inline std::vector < double > getAllTl_Chi2Values() {return m_chi2Tl_Values;}
117  inline std::vector < double > getAllPtDiff_Chi2Values() {return m_chi2PtDiff_Values;}
118  inline std::vector < int > getAllIndicesWq1() {return m_i_Wq1;}
119  inline std::vector < int > getAllIndicesWq2() {return m_i_Wq2;}
120  inline std::vector < int > getAllIndicesThb() {return m_i_Thb;}
121  inline std::vector < int > getAllIndicesTlb() {return m_i_Tlb;}
122  inline std::vector < int > getAllIndicesN() {return m_i_n;}
123 
124  inline std::vector < double > getAllPtDiff_Values() {return m_PtDiff_Values;}
125  inline std::vector < double > getAllWh_Values() {return m_Wh_Values;}
126  inline std::vector < double > getAllThWh_Values() {return m_ThWh_Values;}
127  inline std::vector < double > getAllTh_Values() {return m_Th_Values;}
128  inline std::vector < double > getAllTl_Values() {return m_Tl_Values;}
129 
130  inline double getWhChi2Value() {return m_WhChi2Value;}
131  inline double getThWhChi2Value() {return m_ThWhChi2Value;}
132  inline double getTlChi2Value() {return m_TlChi2Value;}
133  inline double getPtDiffChi2Value() {return m_PtDiffChi2Value;}
134  inline int getNChi2Values() {return m_nChi2Values;}
135  inline int getCategory() {return m_category;}
136  inline TLorentzVector getResult_Tlv() {return res_Tt;}
137 };
138 
139 
140 #endif
TtresChi2::m_i_Thb
std::vector< int > m_i_Thb
Definition: TtresChi2.h:71
TtresChi2::getAllTl_Values
std::vector< double > getAllTl_Values()
Definition: TtresChi2.h:128
TtresChi2::TtresChi2
TtresChi2(std::string units="GeV")
Definition: TtresChi2.cxx:14
TtresChi2::SetHighMThreshold
void SetHighMThreshold(double highJetMass)
Definition: TtresChi2.h:99
TtresChi2::m_PtDiffRelMass_sigma
double m_PtDiffRelMass_sigma
Definition: TtresChi2.h:41
TtresChi2::m_TlChi2Value
double m_TlChi2Value
Definition: TtresChi2.h:42
TtresChi2::getAllTl_Chi2Values
std::vector< double > getAllTl_Chi2Values()
Definition: TtresChi2.h:116
TtresChi2::REALPART
@ REALPART
Definition: TtresChi2.h:21
TtresChi2::getPtDiffChi2Value
double getPtDiffChi2Value()
Definition: TtresChi2.h:133
TtresChi2::m_i_Wq1
std::vector< int > m_i_Wq1
Definition: TtresChi2.h:69
TtresChi2::m_PtDiffRelMass_mean
double m_PtDiffRelMass_mean
Definition: TtresChi2.h:41
TtresChi2::getAllChi2Values
std::vector< double > getAllChi2Values()
Definition: TtresChi2.h:112
TtresChi2::MTHJJ
double MTHJJ
Definition: TtresChi2.h:41
TtresChi2::Reset
void Reset()
Definition: TtresChi2.cxx:148
TtresChi2::getResult_Mtl
double getResult_Mtl()
Definition: TtresChi2.h:107
TtresNeutrinoBuilder::setdebuglevel
void setdebuglevel(int level)
Definition: TtresNeutrinoBuilder.h:23
TtresChi2::PTDIFFREL
@ PTDIFFREL
Definition: TtresChi2.h:27
TtresChi2::m_chi2Tl_Values
std::vector< double > m_chi2Tl_Values
Definition: TtresChi2.h:60
TtresChi2::getResult_Mth
double getResult_Mth()
Definition: TtresChi2.h:109
TtresChi2::m_i_n
std::vector< int > m_i_n
Definition: TtresChi2.h:73
TtresChi2::getResult_Mtt
double getResult_Mtt()
Definition: TtresChi2.h:110
TtresChi2::m_highJetMass
double m_highJetMass
Definition: TtresChi2.h:50
TtresChi2::m_PtDiff_mean
double m_PtDiff_mean
Definition: TtresChi2.h:40
TtresChi2::res_chi2WH
double res_chi2WH
Definition: TtresChi2.h:53
TtresChi2::getAllTh_Values
std::vector< double > getAllTh_Values()
Definition: TtresChi2.h:127
TtresChi2::getAllWh_Chi2Values
std::vector< double > getAllWh_Chi2Values()
Definition: TtresChi2.h:113
TtresChi2::findMinChiSquare
bool findMinChiSquare(TLorentzVector *, const std::vector< TLorentzVector * > *, const std::vector< bool > *, TLorentzVector *, int &, int &, int &, int &, int &, double &, double &, double &)
Definition: TtresChi2.cxx:269
TtresChi2::res_Mth
double res_Mth
Definition: TtresChi2.h:53
TtresChi2::findMinChiSquare_AllRanges
bool findMinChiSquare_AllRanges(TLorentzVector *, const std::vector< TLorentzVector * > *, const std::vector< bool > *, TLorentzVector *, int &, int &, int &, int &, int &, double &, double &, double &)
Definition: TtresChi2.cxx:251
TtresChi2::DATA2012AUTOMN2012
@ DATA2012AUTOMN2012
Definition: TtresChi2.h:24
TtresChi2::res_Mtl
double res_Mtl
Definition: TtresChi2.h:53
TtresChi2::getResult_Chi2WH
double getResult_Chi2WH()
Definition: TtresChi2.h:104
TtresChi2::NO_BTAG
@ NO_BTAG
Definition: TtresChi2.h:30
TtresChi2::NO_BTAGHM
@ NO_BTAGHM
Definition: TtresChi2.h:30
TtresChi2::WReco
WReco
Definition: TtresChi2.h:20
TtresChi2::getAllThWh_Chi2Values
std::vector< double > getAllThWh_Chi2Values()
Definition: TtresChi2.h:115
TtresChi2::m_PtDiffRel_sigma
double m_PtDiffRel_sigma
Definition: TtresChi2.h:41
TtresChi2::getAllIndicesTlb
std::vector< int > getAllIndicesTlb()
Definition: TtresChi2.h:121
TtresChi2::getAllTh_Chi2Values
std::vector< double > getAllTh_Chi2Values()
Definition: TtresChi2.h:114
TtresChi2::m_ThWh_Values
std::vector< double > m_ThWh_Values
Definition: TtresChi2.h:65
TtresChi2::Chi2Version
Chi2Version
Definition: TtresChi2.h:23
TtresChi2::m_TopMinusW_had_mean
double m_TopMinusW_had_mean
Definition: TtresChi2.h:40
TtresChi2::m_chi2Wh_Values
std::vector< double > m_chi2Wh_Values
Definition: TtresChi2.h:57
TtresChi2::findMinChiSquare_VeryHighMass
bool findMinChiSquare_VeryHighMass(TLorentzVector *, const std::vector< TLorentzVector * > *, const std::vector< bool > *, TLorentzVector *, int &, int &, int &, double &, double &, double &)
Definition: TtresChi2.cxx:657
TtresChi2::ROTATION
@ ROTATION
Definition: TtresChi2.h:21
TtresChi2::getThWhChi2Value
double getThWhChi2Value()
Definition: TtresChi2.h:131
TtresChi2::getTlChi2Value
double getTlChi2Value()
Definition: TtresChi2.h:132
TtresChi2::getResult_Mwh
double getResult_Mwh()
Definition: TtresChi2.h:108
TtresChi2::RUNSTUDY
@ RUNSTUDY
Definition: TtresChi2.h:33
Monitored::X
@ X
Definition: HistogramFillerUtils.h:24
TtresChi2::getResult_Chi2All
double getResult_Chi2All()
Definition: TtresChi2.h:103
TtresChi2::Btag
Btag
Definition: TtresChi2.h:29
TtresNeutrinoBuilder
Definition: TtresNeutrinoBuilder.h:16
TtresChi2::m_PtDiffRel_mean
double m_PtDiffRel_mean
Definition: TtresChi2.h:41
TtresChi2::getNChi2Values
int getNChi2Values()
Definition: TtresChi2.h:134
TtresChi2::~TtresChi2
virtual ~TtresChi2()
Definition: TtresChi2.cxx:41
TtresChi2::findMinChiSquare_LMelseHM
bool findMinChiSquare_LMelseHM(TLorentzVector *, const std::vector< TLorentzVector * > *, const std::vector< bool > *, TLorentzVector *, int &, int &, int &, int &, int &, double &, double &, double &)
Definition: TtresChi2.cxx:231
TtresChi2::m_debug
int m_debug
Definition: TtresChi2.h:43
TtresChi2::SetBtagHandeling
void SetBtagHandeling(Btag X)
Definition: TtresChi2.h:98
TtresChi2::m_Units
double m_Units
Definition: TtresChi2.h:48
TtresChi2::STHJJ
double STHJJ
Definition: TtresChi2.h:41
TtresChi2::m_Wh_Values
std::vector< double > m_Wh_Values
Definition: TtresChi2.h:64
TtresChi2::m_WReco
WReco m_WReco
Definition: TtresChi2.h:46
TtresChi2::m_chi2Values
std::vector< double > m_chi2Values
Definition: TtresChi2.h:56
TtresChi2::m_nChi2Values
int m_nChi2Values
Definition: TtresChi2.h:75
TtresChi2::DATA2011SUMMER2012
@ DATA2011SUMMER2012
Definition: TtresChi2.h:24
TtresChi2::getAllIndicesN
std::vector< int > getAllIndicesN()
Definition: TtresChi2.h:122
TtresChi2::NOPTDIFF
@ NOPTDIFF
Definition: TtresChi2.h:27
TtresChi2::m_category
int m_category
Definition: TtresChi2.h:51
TtresChi2::m_chi2PtDiff_Values
std::vector< double > m_chi2PtDiff_Values
Definition: TtresChi2.h:61
TtresChi2::getAllThWh_Values
std::vector< double > getAllThWh_Values()
Definition: TtresChi2.h:126
TtresChi2::res_Tt
TLorentzVector res_Tt
Definition: TtresChi2.h:54
TtresChi2::MjjP
double MjjP
Definition: TtresChi2.h:40
TtresChi2::m_Tl_Values
std::vector< double > m_Tl_Values
Definition: TtresChi2.h:67
TtresChi2::m_PtDiff_sigma
double m_PtDiff_sigma
Definition: TtresChi2.h:41
TtresChi2::getAllWh_Values
std::vector< double > getAllWh_Values()
Definition: TtresChi2.h:125
TtresChi2::m_Btag
Btag m_Btag
Definition: TtresChi2.h:45
TtresChi2::m_NeutrinoBuilder
TtresNeutrinoBuilder * m_NeutrinoBuilder
Definition: TtresChi2.h:49
TtresChi2::m_TopMinusW_had_sigma
double m_TopMinusW_had_sigma
Definition: TtresChi2.h:40
TtresChi2::PTDIFFMASS
@ PTDIFFMASS
Definition: TtresChi2.h:27
TtresChi2::m_Th_Values
std::vector< double > m_Th_Values
Definition: TtresChi2.h:66
TtresChi2::getAllIndicesWq2
std::vector< int > getAllIndicesWq2()
Definition: TtresChi2.h:119
TtresChi2::PtDiff
PtDiff
Definition: TtresChi2.h:26
TtresChi2::m_i_Wq2
std::vector< int > m_i_Wq2
Definition: TtresChi2.h:70
TtresChi2::m_UsePtDiff
PtDiff m_UsePtDiff
Definition: TtresChi2.h:44
TtresChi2::m_RunMode
RunMode m_RunMode
Definition: TtresChi2.h:47
TtresChi2::RUNDEFAULT
@ RUNDEFAULT
Definition: TtresChi2.h:33
TtresChi2::SMjjP
double SMjjP
Definition: TtresChi2.h:40
TtresChi2::getResult_Chi2TopL
double getResult_Chi2TopL()
Definition: TtresChi2.h:106
TtresChi2::m_ThWhChi2Value
double m_ThWhChi2Value
Definition: TtresChi2.h:42
TtresChi2::PTDIFF
@ PTDIFF
Definition: TtresChi2.h:27
TtresChi2::getWhChi2Value
double getWhChi2Value()
Definition: TtresChi2.h:130
TtresChi2::findMinChiSquare_HMelseLM
bool findMinChiSquare_HMelseLM(TLorentzVector *, const std::vector< TLorentzVector * > *, const std::vector< bool > *, TLorentzVector *, int &, int &, int &, int &, int &, double &, double &, double &)
Definition: TtresChi2.cxx:211
TtresChi2::GetNeutrinos
std::vector< TLorentzVector * > GetNeutrinos(TLorentzVector *, TLorentzVector *)
Definition: TtresChi2.cxx:199
TtresChi2::operator=
TtresChi2 & operator=(const TtresChi2 &)
TtresChi2::m_chi2Th_Values
std::vector< double > m_chi2Th_Values
Definition: TtresChi2.h:58
TtresChi2::Init
void Init(Chi2Version version=DATA2012SUMMER2013, double highJetMass=60.0)
Definition: TtresChi2.cxx:47
TtresChi2::m_chi2ThWh_Values
std::vector< double > m_chi2ThWh_Values
Definition: TtresChi2.h:59
TtresChi2::DATA2012SUMMER2013
@ DATA2012SUMMER2013
Definition: TtresChi2.h:24
perfmonmt-refit.units
string units
Definition: perfmonmt-refit.py:77
get_generator_info.version
version
Definition: get_generator_info.py:33
TtresChi2::getAllPtDiff_Values
std::vector< double > getAllPtDiff_Values()
Definition: TtresChi2.h:124
TtresChi2::SetRunMode
void SetRunMode(RunMode X)
Definition: TtresChi2.h:101
TtresChi2::res_chi2All
double res_chi2All
Definition: TtresChi2.h:53
TtresChi2::findMinChiSquare_HighMass
bool findMinChiSquare_HighMass(TLorentzVector *, const std::vector< TLorentzVector * > *, const std::vector< bool > *, TLorentzVector *, int &, int &, int &, int &, double &, double &, double &)
Definition: TtresChi2.cxx:465
TtresChi2::getResult_Tlv
TLorentzVector getResult_Tlv()
Definition: TtresChi2.h:136
TtresChi2::m_Top_lep_sigma
double m_Top_lep_sigma
Definition: TtresChi2.h:40
TtresChi2::getCategory
int getCategory()
Definition: TtresChi2.h:135
TtresChi2::getAllIndicesWq1
std::vector< int > getAllIndicesWq1()
Definition: TtresChi2.h:118
TtresChi2::AFFECTBTAG
@ AFFECTBTAG
Definition: TtresChi2.h:30
TtresChi2::SetDebugMode
void SetDebugMode(bool X)
Definition: TtresChi2.h:96
TtresChi2::m_WhChi2Value
double m_WhChi2Value
Definition: TtresChi2.h:42
TtresChi2::m_Top_lep_mean
double m_Top_lep_mean
Definition: TtresChi2.h:40
TtresChi2::res_chi2TopH
double res_chi2TopH
Definition: TtresChi2.h:53
TtresChi2
Definition: TtresChi2.h:15
TtresChi2::DATA2012SUMMER2013PT100
@ DATA2012SUMMER2013PT100
Definition: TtresChi2.h:24
TtresChi2::m_PtDiffChi2Value
double m_PtDiffChi2Value
Definition: TtresChi2.h:42
TtresChi2::res_Mtt
double res_Mtt
Definition: TtresChi2.h:53
TtresChi2::res_chi2TopL
double res_chi2TopL
Definition: TtresChi2.h:53
TtresChi2::getAllIndicesThb
std::vector< int > getAllIndicesThb()
Definition: TtresChi2.h:120
TtresChi2::RunMode
RunMode
Definition: TtresChi2.h:32
TtresChi2::m_PtDiff_Values
std::vector< double > m_PtDiff_Values
Definition: TtresChi2.h:63
TtresChi2::STDBTAG
@ STDBTAG
Definition: TtresChi2.h:30
TtresChi2::getResult_Chi2TopH
double getResult_Chi2TopH()
Definition: TtresChi2.h:105
TtresChi2::m_i_Tlb
std::vector< int > m_i_Tlb
Definition: TtresChi2.h:72
TtresChi2::TtresChi2
TtresChi2(const TtresChi2 &)
TtresChi2::SetWReconstruction
void SetWReconstruction(WReco X)
Definition: TtresChi2.h:97
TtresNeutrinoBuilder.h
TtresChi2::UsePtDiff
void UsePtDiff(PtDiff X)
Definition: TtresChi2.h:100
TtresChi2::res_Mwh
double res_Mwh
Definition: TtresChi2.h:53
TtresChi2::getAllPtDiff_Chi2Values
std::vector< double > getAllPtDiff_Chi2Values()
Definition: TtresChi2.h:117
TtresChi2::DECREASING
@ DECREASING
Definition: TtresChi2.h:21