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

Comparing UserCode/HbbAnalysis/interface/Objects.hh (file contents):
Revision 1.25 by amagnan, Fri Jul 1 18:08:48 2011 UTC vs.
Revision 1.27 by amagnan, Mon Sep 5 17:15:15 2011 UTC

# Line 6 | Line 6
6   #include <iostream>
7  
8   #include "TLorentzVector.h"
9 + #include "TMath.h"
10  
11   namespace HbbAnalysis {
12  
# Line 139 | Line 140 | namespace HbbAnalysis {
140    };
141  
142    struct SCVars {
143 +    float eta;
144      float sigmaEtaEta;
145      float sigmaIEtaIEta;
146      float e1x5;
# Line 146 | Line 148 | namespace HbbAnalysis {
148      float e5x5;
149      float eOverP;
150      SCVars():
151 +      eta(0),
152        sigmaEtaEta(0),
153        sigmaIEtaIEta(0),
154        e1x5(0),
# Line 713 | Line 716 | namespace HbbAnalysis {
716    template <class T1, class T2>
717    double DeltaR(const T1 & v1, const T2 & v2){
718      double dEta = v1.eta - v2.eta;
719 <    double dPhi = v1.phi - v2.phi;
719 >    double dPhi = fabs(v1.phi - v2.phi);
720 >    if (dPhi > TMath::Pi()) dPhi = (2.0*TMath::Pi() - dPhi);
721      return sqrt(dEta*dEta+dPhi*dPhi);
722    }
723  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines