ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/FGolf/Tools/tools.cc
(Generate patch)

Comparing UserCode/FGolf/Tools/tools.cc (file contents):
Revision 1.1 by fgolf, Sun Aug 29 18:25:19 2010 UTC vs.
Revision 1.2 by fgolf, Sun Aug 29 22:52:28 2010 UTC

# Line 122 | Line 122 | void saveHist(const char* filename, cons
122       delete iter ;
123   }
124  
125 + double dRbetweenVectors (const LorentzVector &vec1, const LorentzVector &vec2 )
126 + {
127 +  double dphi = std::min(::fabs(vec1.Phi() - vec2.Phi()), 2 * M_PI - fabs(vec1.Phi() - vec2.Phi()));
128 +  double deta = vec1.Eta() - vec2.Eta();
129 +  return sqrt(dphi*dphi + deta*deta);
130 + }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines