1 |
#ifndef VHbbCandidate__H
|
2 |
#define VHbbCandidate__H
|
3 |
|
4 |
#include <TLorentzVector.h>
|
5 |
#include <TVector2.h>
|
6 |
#include <vector>
|
7 |
|
8 |
#include "VHbbAnalysis/VHbbDataFormats/interface/VHbbEvent.h"
|
9 |
|
10 |
class VHbbCandidate {
|
11 |
public:
|
12 |
//Zmumu = 0
|
13 |
//Zee = 1
|
14 |
//Wmun = 2
|
15 |
//Wen = 3
|
16 |
//Znn = 4
|
17 |
|
18 |
enum CandidateType{Zmumu, Zee, Wmun, Wen, Znn, Zemu, Ztaumu, Ztaue, Wtaun, Ztautau, Zbb, UNKNOWN};
|
19 |
|
20 |
VHbbCandidate(){candidateType=UNKNOWN;}
|
21 |
|
22 |
class VectorCandidate {
|
23 |
public:
|
24 |
VectorCandidate() : firstLepton(0),secondLepton(1),firstLeptonOrig(99),secondLeptonOrig(99) {}
|
25 |
double Mt(CandidateType candidateType) const {
|
26 |
if(candidateType==Wen)
|
27 |
{
|
28 |
float ptl=electrons[0].p4.Pt();
|
29 |
float met=mets[0].p4.Pt();
|
30 |
float et=ptl+met;
|
31 |
return sqrt(et*et - p4.Pt()*p4.Pt() );
|
32 |
}
|
33 |
if(candidateType==Wmun)
|
34 |
{
|
35 |
float ptl=muons[0].p4.Pt();
|
36 |
float met=mets[0].p4.Pt();
|
37 |
float et=ptl+met;
|
38 |
return sqrt(et*et - p4.Pt()*p4.Pt() );
|
39 |
}
|
40 |
return 0;
|
41 |
}
|
42 |
|
43 |
double MtTau(CandidateType candidateTypeWithTau) const {
|
44 |
if(candidateTypeWithTau == Wtaun)
|
45 |
{
|
46 |
float ptl=taus[0].p4.Pt();
|
47 |
float met=mets[0].p4.Pt();
|
48 |
float et=ptl+met;
|
49 |
return sqrt(et*et - p4.Pt()*p4.Pt() );
|
50 |
}
|
51 |
return 0;
|
52 |
}
|
53 |
|
54 |
|
55 |
|
56 |
TLorentzVector p4;
|
57 |
std::vector<VHbbEvent::MuonInfo> muons;
|
58 |
std::vector<VHbbEvent::ElectronInfo> electrons;
|
59 |
std::vector<VHbbEvent::TauInfo> taus;
|
60 |
std::vector<VHbbEvent::METInfo> mets;
|
61 |
|
62 |
unsigned int firstLepton,secondLepton; // position in the above lepton collections
|
63 |
unsigned int firstLeptonOrig,secondLeptonOrig; //position in the original VHEvent collections
|
64 |
|
65 |
};
|
66 |
|
67 |
class HiggsCandidate {
|
68 |
public:
|
69 |
TLorentzVector p4;
|
70 |
std::vector<VHbbEvent::SimpleJet> jets;
|
71 |
size_t indices[2];
|
72 |
bool HiggsFlag;
|
73 |
float deltaTheta;
|
74 |
std::vector <float> helicities;
|
75 |
public:
|
76 |
VHbbEvent::SimpleJet& firstJet(){return jets[0];}
|
77 |
VHbbEvent::SimpleJet& secondJet(){return jets[1];}
|
78 |
|
79 |
size_t firstJetIndex(){return indices[0];}
|
80 |
size_t secondJetIndex(){return indices[1];}
|
81 |
};
|
82 |
|
83 |
class FatHiggsCandidate {
|
84 |
public:
|
85 |
TLorentzVector p4;
|
86 |
std::vector<VHbbEvent::SimpleJet> jets;
|
87 |
bool FatHiggsFlag;
|
88 |
int subjetsSize;
|
89 |
float deltaTheta;
|
90 |
std::vector <float> helicities;
|
91 |
public:
|
92 |
VHbbEvent::SimpleJet& firstJet(){return jets[0];}
|
93 |
VHbbEvent::SimpleJet& secondJet(){return jets[1];}
|
94 |
};
|
95 |
|
96 |
void setCandidateType (CandidateType c){candidateType = c;}
|
97 |
|
98 |
|
99 |
double deltaPhi() const {
|
100 |
return V.p4.DeltaPhi(H.p4);
|
101 |
}
|
102 |
|
103 |
double Mt() const {
|
104 |
return V.Mt(candidateType);
|
105 |
}
|
106 |
|
107 |
double MtTau() const {
|
108 |
return V.MtTau(candidateTypeWithTau);
|
109 |
}
|
110 |
|
111 |
int additionalLeptons() const {
|
112 |
int expectedLeptons = 0;
|
113 |
if( candidateType == Wmun || candidateType == Wen) expectedLeptons =1;
|
114 |
if( candidateType == Zmumu || candidateType == Zee) expectedLeptons =2;
|
115 |
|
116 |
return ( V.muons.size() + V.electrons.size() - expectedLeptons);
|
117 |
|
118 |
}
|
119 |
|
120 |
public:
|
121 |
TLorentzVector p4(){return V.p4+H.p4;}
|
122 |
CandidateType candidateType;
|
123 |
CandidateType candidateTypeWithTau;
|
124 |
HiggsCandidate H;
|
125 |
FatHiggsCandidate FatH;
|
126 |
VectorCandidate V;
|
127 |
VectorCandidate VTau;
|
128 |
std::vector<VHbbEvent::SimpleJet> additionalJets;
|
129 |
std::vector<VHbbEvent::SimpleJet> additionalJetsFat;
|
130 |
};
|
131 |
|
132 |
|
133 |
#endif
|