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.2 by tboccali, Tue Jun 21 16:22:47 2011 UTC vs.
Revision 1.4 by tboccali, Thu Jun 30 08:56:27 2011 UTC

# Line 3 | Line 3
3  
4   #include "VHbbAnalysis/HbbAnalyzer/interface/VHbbCandidate.h"
5  
6 < class VbbCandidateTools {
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-i1;
14 >    float dphi = in2-in1;
15      if ( dphi > M_PI ) {
16        dphi -= 2.0*M_PI;
17      } else if ( dphi <= -M_PI ) {
# Line 16 | Line 21 | class VbbCandidateTools {
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 <    temp.V.fourMomentum = temp.V.muons.muons[0].fourMomentum+temp.V.muons.muons[1].fourMomentum;
31 <    temp.fourMomentum = temp.V.fourMomentum+ temp.H.fourMomentum;
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.muons.muons[0].fourMomentum.Pt()<20 || temp.V.muons.muons[1].fourMomentum.Pt()<20 ) return in;
36 <
37 <    if (temp.V.Pt()<150 ) return in;
38 <    if (temp.H.Pt()<150) return in;
39 <    if (temp.H.firstJet().csv< 0.9) return in;
40 <    if (temp.H.secondJet().csv<0.5) return in;
41 <    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;
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 <    temp.fourMomentum = temp.V.fourMomentum+ temp.H.fourMomentum;
44 <    
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.Pt()<150 ) return in;
65 <    if (temp.H.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.Phi(),temp.H.Phi())<2.7) return in;
69 <    if (temp.V.FourMomentum.Mass()<75 || temp.V.FourMomentum.Mass()>105) return in;
70 <    if (temp.additionalJets.size()>0) return in;
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 <    temp.V.fourMomentum = temp.V.mets[0].fourMomentum;
84 <    temp.fourMomentum = temp.V.fourMomentum+temp.H.fourMomentum;
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<150) 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.Phi(),temp.H.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;
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;
# Line 84 | Line 105 | class VbbCandidateTools {
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      //
# Line 94 | Line 116 | class VbbCandidateTools {
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  
# Line 107 | Line 133 | class VbbCandidateTools {
133   #endif
134  
135  
136 +
137 +
138 +
139 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines