ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/VHbbAnalysis/HbbAnalyzer/interface/VHbbCandidateTools.h
(Generate patch)

Comparing UserCode/VHbbAnalysis/HbbAnalyzer/interface/VHbbCandidateTools.h (file contents):
Revision 1.1 by tboccali, Tue Jun 21 16:18:56 2011 UTC vs.
Revision 1.3 by tboccali, Tue Jun 28 12:02:37 2011 UTC

# Line 3 | Line 3
3  
4   #include "VHbbAnalysis/HbbAnalyzer/interface/VHbbCandidate.h"
5  
6 < class VbbCandidateTools {
6 > class VHbbCandidateTools {
7   public:
8    float deltaPhi(float in2, float in1){
9 <    float dphi = in2-i1;
9 >    float dphi = in2-in1;
10      if ( dphi > M_PI ) {
11        dphi -= 2.0*M_PI;
12      } else if ( dphi <= -M_PI ) {
# Line 19 | Line 19 | class VbbCandidateTools {
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;
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;
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;
# Line 37 | Line 39 | class VbbCandidateTools {
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 <    temp.fourMomentum = temp.V.fourMomentum+ temp.H.fourMomentum;
42 <    
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.Pt()<150 ) return in;
53 <    if (temp.H.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.Phi(),temp.H.Phi())<2.7) return in;
57 <    if (temp.V.FourMomentum.Mass()<75 || temp.V.FourMomentum.Mass()>105) return in;
58 <    if (temp.additionalJets.size()>0) return in;
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;
# Line 61 | Line 64 | class VbbCandidateTools {
64      ok = false;
65      VHbbCandidate temp=in;
66      if (temp.V.mets.size()!=1) return in;
67 <    temp.V.fourMomentum = temp.V.mets[0].fourMomentum;
68 <    temp.fourMomentum = temp.V.fourMomentum+temp.H.fourMomentum;
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.Phi(),temp.H.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;
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;
# Line 82 | Line 87 | class VbbCandidateTools {
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      //
# Line 92 | Line 98 | class VbbCandidateTools {
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      //
# Line 105 | Line 112 | class VbbCandidateTools {
112   #endif
113  
114  
115 +
116 +
117 +
118 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines