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.8 by agilbert, Tue Oct 25 13:26:52 2011 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines