CMS 3D CMS Logo

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

◆ DetaDtheta()

double DetaDtheta ( double  theta)
inline

Definition at line 443 of file ResolutionHelper.cc.

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 }

References funct::sin(), and theta().

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

◆ DthetaDeta()

double DthetaDeta ( double  eta)
inline

Definition at line 448 of file ResolutionHelper.cc.

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 }

References MillePedeFileConverter_cfg::e, PVValHelper::eta, and JetChargeProducer_cfi::exp.

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

funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
PVValHelper::eta
Definition: PVValidationHelpers.h:70
theta
Geom::Theta< T > theta() const
Definition: Basic3DVectorLD.h:150
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37