CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
ResolutionHelper.cc File Reference
#include "DataFormats/PatCandidates/interface/ResolutionHelper.h"
#include "FWCore/Utilities/interface/Exception.h"
#include <cmath>
#include <iostream>

Go to the source code of this file.

Functions

double DetaDtheta (double theta)
 
double DthetaDeta (double eta)
 

Function Documentation

double DetaDtheta ( double  theta)
inline

Definition at line 443 of file ResolutionHelper.cc.

References funct::sin().

Referenced by pat::helper::ResolutionHelper::getResolEta().

443  {
444  // y = -ln(tg(x/2)) =>
445  // y' = - 1/tg(x/2) * 1/(cos(x/2))^2 * 1/2 = - 1 / (2 * sin(x/2) * cos(x/2)) = -1/sin(x)
446  return -1.0 / sin(theta);
447 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Theta< T > theta() const
double DthetaDeta ( double  eta)
inline

Definition at line 448 of file ResolutionHelper.cc.

References alignCSCRings::e, and funct::exp().

Referenced by pat::helper::ResolutionHelper::getResolTheta().

448  {
449  // y = 2 atan(exp(-x))
450  // y' = 2 * 1/(1+exp^2) * exp(-x) * (-1) = - 2 * exp/(1+exp^2) = - 2 / (exp + 1/exp)
451  double e = exp(-eta);
452  return -2.0 / (e + 1.0 / e);
453 }
Exp< T >::type exp(const T &t)
Definition: Exp.h:22