ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/VHbbAnalysis/HbbAnalyzer/interface/VHbbCandidateTools.h
Revision: 1.5
Committed: Fri Jul 8 07:33:44 2011 UTC (13 years, 10 months ago) by tboccali
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +0 -0 lines
State: FILE REMOVED
Error occurred while calculating annotation data.
Log Message:
split in DF and EDM parts

File Contents

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