ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/VHbbAnalysis/HbbAnalyzer/interface/VHbbCandidateTools.h
Revision: 1.1
Committed: Tue Jun 21 16:18:56 2011 UTC (13 years, 10 months ago) by tboccali
Content type: text/plain
Branch: MAIN
Log Message:
first test

File Contents

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