ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/HbbAnalysis/src/Objects.cc
(Generate patch)

Comparing UserCode/HbbAnalysis/src/Objects.cc (file contents):
Revision 1.7 by amagnan, Thu Sep 15 09:46:20 2011 UTC vs.
Revision 1.9 by agilbert, Mon Oct 31 09:21:56 2011 UTC

# Line 1 | Line 1
1   #include "UserCode/HbbAnalysis/interface/Objects.hh"
2 + #include <cmath>
3  
4   namespace HbbAnalysis {
5  
# Line 17 | Line 18 | namespace HbbAnalysis {
18      
19      return dPhi;
20    }
21 <
22 <  double SameSign(const BaseVars & v1, const BaseVars & v2)
21 >  
22 >  bool SameSign(double charge1, double charge2)
23    {
24 <    
25 <    return v1.charge == v2.charge;
24 >    double product = charge1 * charge2;
25 >    return ((product > 0.5) && (product < 1.5));
26    }
27  
28 <  double OppSign(const BaseVars & v1, const BaseVars & v2)
28 >  bool OppSign(double charge1, double charge2)
29    {
30 <    
31 <    return (v1.charge != v2.charge &&
31 <            v1.charge != 0 &&
32 <            v2.charge != 0);
30 >    double product = charge1 * charge2;
31 >    return ((product < -0.5) && (product > -1.5));
32    }
33 +  /*Fix - base vars no longer exists
34  
35    TLorentzVector FourMomentum(const BaseVars & v, const double scale)
36    {
# Line 43 | Line 43 | namespace HbbAnalysis {
43  
44      return TLorentzVector(lpx/scale,lpy/scale,lpz/scale,lE/scale);
45  
46 <  }
46 >  }*/
47  
48    double TransverseMass(//const BaseVars & leg1,
49                          //const BaseVars & leg2,
# Line 122 | Line 122 | namespace HbbAnalysis {
122      }
123    }
124  
125 <
125 >  /*
126    double EtaDetector(const BaseVars & v1){
127      double pDet[3];
128      pDet[0] = v1.pT*cos(v1.phi) + v1.vx;
# Line 169 | Line 169 | namespace HbbAnalysis {
169      if (cosThetaDet<0) thetaDet += TMath::Pi();
170      
171      return -log(tan(thetaDet/2.));
172 <  }
172 >  }*/
173  
174  
175  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines