CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 467 of file ResolutionHelper.cc.

References funct::sin().

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

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

Definition at line 472 of file ResolutionHelper.cc.

References alignCSCRings::e, and create_public_lumi_plots::exp.

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

472  {
473  // y = 2 atan(exp(-x))
474  // y' = 2 * 1/(1+exp^2) * exp(-x) * (-1) = - 2 * exp/(1+exp^2) = - 2 / (exp + 1/exp)
475  double e = exp(-eta);
476  return -2.0/(e + 1.0/e);
477 }
T eta() const