CMS 3D CMS Logo

Functions

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2/src/DataFormats/PatCandidates/src/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().

                                       { 
    // y  = -ln(tg(x/2)) =>
    // y' = - 1/tg(x/2) * 1/(cos(x/2))^2 * 1/2 = - 1 / (2 * sin(x/2) * cos(x/2)) = -1/sin(x) 
    return -1.0/sin(theta);
}
double DthetaDeta ( double  eta) [inline]

Definition at line 472 of file ResolutionHelper.cc.

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

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

                                     { 
    // y = 2 atan(exp(-x))
    // y' = 2 * 1/(1+exp^2) * exp(-x) * (-1) = - 2 * exp/(1+exp^2) = - 2 / (exp + 1/exp)
    double e = exp(-eta);
    return -2.0/(e + 1.0/e);
}