1 |
peiffer |
1.1 |
#ifndef ReconstructionHypothesis_H
|
2 |
|
|
#define ReconstructionHypothesis_H
|
3 |
|
|
|
4 |
|
|
#include "Objects.h"
|
5 |
|
|
|
6 |
|
|
struct qualityflag{
|
7 |
|
|
std::string label;
|
8 |
|
|
float discriminator;
|
9 |
|
|
};
|
10 |
|
|
|
11 |
|
|
/**
|
12 |
|
|
* @short container class to store the results of the top quark reconstruction
|
13 |
|
|
*/
|
14 |
|
|
|
15 |
|
|
class ReconstructionHypothesis{
|
16 |
|
|
|
17 |
|
|
public:
|
18 |
|
|
|
19 |
|
|
|
20 |
|
|
ReconstructionHypothesis(){
|
21 |
|
|
m_tophad_jets_ind.clear();
|
22 |
|
|
m_toplep_jets_ind.clear();
|
23 |
peiffer |
1.2 |
m_blep_ind=-1;
|
24 |
peiffer |
1.1 |
LorentzVector v4(0,0,0,0);
|
25 |
|
|
m_toplep_v4=v4;
|
26 |
|
|
m_tophad_v4=v4;
|
27 |
|
|
m_neutrino_v4=v4;
|
28 |
|
|
m_lepton.set_v4(v4);
|
29 |
|
|
m_lepton.set_charge(0);
|
30 |
|
|
m_qualityflags.clear();
|
31 |
|
|
};
|
32 |
|
|
~ReconstructionHypothesis(){};
|
33 |
|
|
|
34 |
|
|
LorentzVector toplep_v4() const{return m_toplep_v4;}
|
35 |
peiffer |
1.3 |
LorentzVector tophad_v4() const{return m_tophad_v4;}
|
36 |
peiffer |
1.1 |
LorentzVector neutrino_v4() const{return m_neutrino_v4;}
|
37 |
|
|
Particle lepton() const{return m_lepton;}
|
38 |
|
|
std::vector<unsigned int> tophad_jets_indices() const{return m_tophad_jets_ind;}
|
39 |
|
|
std::vector<unsigned int> toplep_jets_indices() const{return m_toplep_jets_ind;}
|
40 |
|
|
LorentzVector top_v4() const{ return m_lepton.charge() > 0 ? m_toplep_v4 : m_tophad_v4;}
|
41 |
|
|
LorentzVector antitop_v4() const{ return m_lepton.charge() < 0 ? m_toplep_v4 : m_tophad_v4;}
|
42 |
|
|
LorentzVector wlep_v4() const{ return m_neutrino_v4+m_lepton.v4();}
|
43 |
peiffer |
1.2 |
int blep_index() const{ return m_blep_ind;}
|
44 |
peiffer |
1.1 |
|
45 |
|
|
/// get the discriminator value for this hypothesis
|
46 |
|
|
float discriminator(std::string l){
|
47 |
|
|
float discr=0;
|
48 |
|
|
bool found=false;
|
49 |
|
|
for(unsigned int i=0; i<m_qualityflags.size(); ++i){
|
50 |
|
|
if(l==m_qualityflags[i].label){
|
51 |
|
|
discr = m_qualityflags[i].discriminator;
|
52 |
|
|
found = true;
|
53 |
|
|
break;
|
54 |
|
|
}
|
55 |
|
|
}
|
56 |
|
|
if(!found) std::cerr << "WARNING: discriminator with label " << l << " not found in hypothesis, return 0." <<std::endl;
|
57 |
|
|
return discr;
|
58 |
|
|
}
|
59 |
|
|
|
60 |
|
|
void set_toplep_v4(LorentzVector v4){m_toplep_v4=v4;}
|
61 |
|
|
void set_tophad_v4(LorentzVector v4){m_tophad_v4=v4;}
|
62 |
|
|
void set_neutrino_v4(LorentzVector v4){m_neutrino_v4=v4;}
|
63 |
|
|
void add_toplep_jet_index(unsigned int j){m_toplep_jets_ind.push_back(j);}
|
64 |
|
|
void add_tophad_jet_index(unsigned int j){m_tophad_jets_ind.push_back(j);}
|
65 |
peiffer |
1.2 |
void set_blep_index(int j){m_blep_ind=j;}
|
66 |
peiffer |
1.1 |
void set_lepton(Particle p){m_lepton=p;}
|
67 |
|
|
void add_qualityflag(qualityflag q){m_qualityflags.push_back(q);}
|
68 |
|
|
void add_qualityflag(std::string label, float discr){
|
69 |
|
|
qualityflag qflag;
|
70 |
|
|
qflag.label = label;
|
71 |
|
|
qflag.discriminator = discr;
|
72 |
|
|
add_qualityflag(qflag);
|
73 |
|
|
};
|
74 |
|
|
|
75 |
|
|
void clear_jetindices(){
|
76 |
|
|
m_tophad_jets_ind.clear();
|
77 |
|
|
m_toplep_jets_ind.clear();
|
78 |
|
|
}
|
79 |
|
|
|
80 |
|
|
/// test if a discriminator value with a certian label has already been added
|
81 |
|
|
bool has_discriminator(std::string label){
|
82 |
|
|
for(unsigned int i=0; i< m_qualityflags.size(); ++i){
|
83 |
|
|
if(m_qualityflags[i].label == label) return true;
|
84 |
|
|
}
|
85 |
|
|
return false;
|
86 |
|
|
}
|
87 |
|
|
|
88 |
|
|
private:
|
89 |
|
|
|
90 |
|
|
LorentzVector m_toplep_v4;
|
91 |
|
|
LorentzVector m_tophad_v4;
|
92 |
|
|
LorentzVector m_neutrino_v4;
|
93 |
|
|
|
94 |
|
|
//indices to the jets in the jet list assigned to hadronic and leptonic tops
|
95 |
|
|
std::vector<unsigned int> m_tophad_jets_ind;
|
96 |
|
|
std::vector<unsigned int> m_toplep_jets_ind;
|
97 |
peiffer |
1.2 |
//index to the jet with highest pt assigned to the leptonic top
|
98 |
|
|
int m_blep_ind;
|
99 |
peiffer |
1.1 |
|
100 |
|
|
Particle m_lepton;
|
101 |
|
|
|
102 |
|
|
std::vector<qualityflag> m_qualityflags;
|
103 |
|
|
|
104 |
|
|
};
|
105 |
|
|
|
106 |
|
|
|
107 |
|
|
#endif
|