ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/VHbbAnalysis/HbbAnalyzer/interface/VHbbCandidateTools.h
Revision: 1.3
Committed: Tue Jun 28 12:02:37 2011 UTC (13 years, 10 months ago) by tboccali
Content type: text/plain
Branch: MAIN
CVS Tags: Jun28th2011
Changes since 1.2: +39 -30 lines
Log Message:
change candidate preselection

File Contents

# Content
1 #ifndef VHBBCANDIDATETOOLS_H
2 #define VHBBCANDIDATETOOLS_H
3
4 #include "VHbbAnalysis/HbbAnalyzer/interface/VHbbCandidate.h"
5
6 class VHbbCandidateTools {
7 public:
8 float deltaPhi(float in2, float in1){
9 float dphi = in2-in1;
10 if ( dphi > M_PI ) {
11 dphi -= 2.0*M_PI;
12 } else if ( dphi <= -M_PI ) {
13 dphi += 2.0*M_PI;
14 }
15 return dphi;
16 }
17
18 VHbbCandidate getHZmumuCandidate(const VHbbCandidate & in, bool & ok){
19 ok = false;
20 VHbbCandidate temp=in;
21 if (temp.V.muons.size()!=2) return in ;
22 if (temp.V.electrons.size()!=0) return in ;
23 temp.V.fourMomentum = temp.V.muons[0].fourMomentum+temp.V.muons[1].fourMomentum;
24
25 if (temp.V.muons[0].fourMomentum.Pt()<20 || temp.V.muons[1].fourMomentum.Pt()<20 ) return in;
26
27 // if (temp.V.Pt()<150 ) return in;
28 // if (temp.H.Pt()<150) return in;
29 // if (temp.H.firstJet().csv< 0.9) return in;
30 // if (temp.H.secondJet().csv<0.5) return in;
31 // if (deltaPhi(temp.V.Phi(),temp.H.Phi())<2.7) return in;
32 // if (temp.V.FourMomentum.Mass()<75 || temp.V.FourMomentum.Mass()>105) return in;
33 // if (temp.additionalJets.size()>0) return in;
34 // if (std::Abs(deltaTheta) ????
35 ok = true;
36 return temp;
37 }
38 VHbbCandidate getHZeeCandidate(const VHbbCandidate & in, bool & ok){
39 ok = false;
40 VHbbCandidate temp=in;
41 if (temp.V.electrons.size()!=2) return in ;
42 if (temp.V.muons.size()!=0) return in ;
43
44 temp.V.fourMomentum = temp.V.electrons[0].fourMomentum+temp.V.electrons[1].fourMomentum;
45
46 //
47 // i need to ask VBTF and pt NEEDS ADJUSTING!!!!!
48 //
49 if (temp.V.electrons[0].fourMomentum.Pt()<20 ||temp.V.electrons[1].fourMomentum.Pt()<20 ) return in;
50 if (temp.V.electrons[0].id95r < -100000 ||temp.V.electrons[1].id95r < -100000) return in;
51
52 // if (temp.V.fourMomentum.Pt()<150 ) return in;
53 // if (temp.H.fourMomentum.Pt()<150) return in;
54 // if (temp.H.firstJet().csv< 0.9) return in;
55 // if (temp.H.secondJet().csv<0.5) return in;
56 // if (deltaPhi(temp.V.fourMomentum.Phi(),temp.H.fourMomentum.Phi())<2.7) return in;
57 // if (temp.V.fourMomentum.M()<75 || temp.V.fourMomentum.M()>105) return in;
58 // if (temp.additionalJets.size()>0) return in;
59 // if (std::Abs(deltaTheta) ????
60 ok = true;
61 return temp;
62 }
63 VHbbCandidate getHZnnCandidate(const VHbbCandidate & in, bool & ok){
64 ok = false;
65 VHbbCandidate temp=in;
66 if (temp.V.mets.size()!=1) return in;
67 if (temp.V.muons.size()!=0) return in ;
68 if (temp.V.electrons.size()!=0) return in ;
69
70 temp.V.fourMomentum = temp.V.mets[0].fourMomentum;
71
72 if (temp.V.mets[0].metSig<5) return in;
73 if (temp.V.mets[0].sumEt<150) return in;
74 // if (temp.H.fourMomentum.Pt()<150)return in;
75 // if (temp.H.firstJet().csv< 0.9) return in;
76 // if (temp.H.secondJet().csv<0.5) return in;
77 // if (deltaPhi(temp.V.fourMomentum.Phi(),temp.H.fourMomentum.Phi())<2.95) return in;
78 // if (temp.V.electrons.size()>0 || temp.V.muons.size()>0 ) return in;
79 // if (temp.additionalJets.size()>0) return in;
80 // if (std::Abs(deltaTheta) ????
81
82 ok = true;
83 return temp;
84 }
85
86 VHbbCandidate getHWmunCandidate(const VHbbCandidate & in, bool & ok){
87 ok = false;
88 VHbbCandidate temp=in;
89 if (temp.V.muons.size()!=1) return in ;
90 if (temp.V.electrons.size()!=0) return in ;
91 //
92 // not clear to me, where is MET? it is not used????
93 //
94 return in;
95 }
96
97 VHbbCandidate getHWenCandidate(const VHbbCandidate & in, bool & ok){
98 ok = false;
99 VHbbCandidate temp=in;
100 if (temp.V.electrons.size()!=1) return in ;
101 if (temp.V.muons.size()!=0) return in ;
102 //
103 // not clear to me, where is MET? it is not used????
104 //
105 return in;
106 }
107
108 };
109
110
111
112 #endif
113
114
115
116
117
118