CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
IntegrandThetaFunction Class Reference

#include <PhysicsTools/IsolationUtils/src/IntegrandThetaFunction.cc>

Inheritance diagram for IntegrandThetaFunction:

Public Member Functions

ROOT::Math::IGenFunction * Clone () const override
 
 IntegrandThetaFunction ()
 
 IntegrandThetaFunction (const IntegrandThetaFunction &bluePrint)
 
IntegrandThetaFunctionoperator= (const IntegrandThetaFunction &bluePrint)
 
void SetParameterAlpha (double alpha)
 
void SetParameterPhi0 (double phi0)
 
void SetParameterTheta0 (double theta0)
 
 ~IntegrandThetaFunction () override
 

Private Member Functions

double DoDerivative (double x) const
 
double DoEval (double x) const override
 
double DoEvalPar (double, const double *) const override
 
double DoParameterDerivative (double, const double *, unsigned int) const override
 
void DoParameterGradient (double x, double *paramGradient) const
 
void SetParameters (double const *param) override
 

Private Attributes

double alpha_
 
IntegralOverPhiFunctionfPhi_
 
double phi0_
 
double theta0_
 

Static Private Attributes

static const unsigned int debugLevel_ = 0
 

Detailed Description

Description: auxialiary class for fixed area isolation cone computation (this class performs the integration over the polar angle)

Implementation: imported into CMSSW on 05/18/2007

Definition at line 33 of file IntegrandThetaFunction.h.

Constructor & Destructor Documentation

◆ IntegrandThetaFunction() [1/2]

IntegrandThetaFunction::IntegrandThetaFunction ( )

Definition at line 40 of file IntegrandThetaFunction.cc.

41  : ROOT::Math::ParamFunction<ROOT::Math::IParametricGradFunctionOneDim>(3) {
42  theta0_ = 0.;
43  phi0_ = 0.;
44  alpha_ = 0.;
45 
47 }

References alpha_, fPhi_, phi0_, and theta0_.

Referenced by Clone().

◆ IntegrandThetaFunction() [2/2]

IntegrandThetaFunction::IntegrandThetaFunction ( const IntegrandThetaFunction bluePrint)

Definition at line 49 of file IntegrandThetaFunction.cc.

50  : ROOT::Math::ParamFunction<ROOT::Math::IParametricGradFunctionOneDim>(bluePrint) {
51  theta0_ = bluePrint.theta0_;
52  phi0_ = bluePrint.phi0_;
53  alpha_ = bluePrint.alpha_;
54 
55  fPhi_ = new IntegralOverPhiFunction(*bluePrint.fPhi_);
56 }

References alpha_, fPhi_, phi0_, and theta0_.

◆ ~IntegrandThetaFunction()

IntegrandThetaFunction::~IntegrandThetaFunction ( )
override

Definition at line 58 of file IntegrandThetaFunction.cc.

58 { delete fPhi_; }

References fPhi_.

Member Function Documentation

◆ Clone()

ROOT::Math::IGenFunction* IntegrandThetaFunction::Clone ( ) const
inlineoverride

Definition at line 45 of file IntegrandThetaFunction.h.

45 { return new IntegrandThetaFunction(*this); }

References IntegrandThetaFunction().

◆ DoDerivative()

double IntegrandThetaFunction::DoDerivative ( double  x) const
private

Definition at line 148 of file IntegrandThetaFunction.cc.

148  {
149  //--- virtual function inherited from ROOT::Math::ParamFunction base class;
150  // not implemented, because not neccessary, but needs to be defined to make code compile...
151  edm::LogWarning("") << "Function not implemented yet !" << std::endl;
152 
153  return 0.;
154 }

◆ DoEval()

double IntegrandThetaFunction::DoEval ( double  x) const
overrideprivate

Definition at line 101 of file IntegrandThetaFunction.cc.

101  {
102  //--- return zero if theta either close to zero or close to Pi
103  // (numerical expressions might become "NaN"s)
104  const double epsilon = 1.e-3;
105  if (x < epsilon || x > (TMath::Pi() - epsilon))
106  return 0.;
107 
108  //--- calculate trigonometric expressions
109  // (dependend on angle theta;
110  // polar angle of point within cone)
111  double sinTheta = TMath::Sin(x);
112  double cscTheta = 1. / sinTheta;
113 
114  double detJacobi =
115  -cscTheta; // partial derrivative dEta/dTheta (for constant particle density in tau id. isolation cone)
116  //double detJacobi = 1.; // ordinary solid angle (FOR TESTING ONLY)
117 
118  //--- evaluate integral over angle phi
119  // (azimuth angle of point within cone)
123 
124  double integralOverPhi = (*fPhi_)(x);
125 
126  if (debugLevel_ > 0) {
127  edm::LogVerbatim("") << "integralOverPhi = " << integralOverPhi << std::endl
128  << " theta0 = " << theta0_ << std::endl
129  << " phi0 = " << phi0_ << std::endl
130  << " alpha = " << alpha_ << std::endl
131  << " theta = " << x << std::endl
132  << std::endl;
133  }
134 
135  //--- integrand for integration over theta
136  // equals
137  // |dEta/dTheta| * integral over phi * sin(theta)
138  //
139  // (o the factor dEta/dTheta represents the particle density as function of theta,
140  // assuming that the particle density is flat in eta;
141  // o the factor sin(theta) originates from the solid angle surface element
142  // expressed in spherical polar coordinates)
143  //
144  //return TMath::Abs(detJacobi)*integralOverPhi*sinTheta;
145  return TMath::Abs(detJacobi) * integralOverPhi;
146 }

References Abs(), alpha_, debugLevel_, geometryDiff::epsilon, fPhi_, phi0_, Pi, IntegralOverPhiFunction::SetParameterAlpha(), IntegralOverPhiFunction::SetParameterPhi0(), IntegralOverPhiFunction::SetParameterTheta0(), theta0_, and x.

◆ DoEvalPar()

double IntegrandThetaFunction::DoEvalPar ( double  x,
const double *  param 
) const
overrideprivate

Definition at line 92 of file IntegrandThetaFunction.cc.

93 {
94  theta0_ = param[0];
95  phi0_ = param[1];
96  alpha_ = param[2];
97 
98  return DoEval(x);
99 }

References genVertex_cff::x.

◆ DoParameterDerivative()

double IntegrandThetaFunction::DoParameterDerivative ( double  ,
const double *  ,
unsigned int   
) const
overrideprivate

Definition at line 156 of file IntegrandThetaFunction.cc.

156  {
157  //--- virtual function inherited from ROOT::Math::ParamFunction base class;
158  // not implemented, because not neccessary, but needs to be defined to make code compile...
159  edm::LogWarning("") << "Function not implemented yet !" << std::endl;
160 
161  return 0.;
162 }

◆ DoParameterGradient()

void IntegrandThetaFunction::DoParameterGradient ( double  x,
double *  paramGradient 
) const
private

Definition at line 164 of file IntegrandThetaFunction.cc.

164  {
165  //--- virtual function inherited from ROOT::Math::ParamFunction base class;
166  // not implemented, because not neccessary, but needs to be defined to make code compile...
167  edm::LogWarning("") << "Function not implemented yet !" << std::endl;
168 }

◆ operator=()

IntegrandThetaFunction & IntegrandThetaFunction::operator= ( const IntegrandThetaFunction bluePrint)

Definition at line 64 of file IntegrandThetaFunction.cc.

64  {
65  theta0_ = bluePrint.theta0_;
66  phi0_ = bluePrint.phi0_;
67  alpha_ = bluePrint.alpha_;
68 
69  (*fPhi_) = (*bluePrint.fPhi_);
70 
71  return (*this);
72 }

References alpha_, fPhi_, phi0_, and theta0_.

◆ SetParameterAlpha()

void IntegrandThetaFunction::SetParameterAlpha ( double  alpha)

Definition at line 84 of file IntegrandThetaFunction.cc.

84 { alpha_ = alpha; }

References zMuMuMuonUserData::alpha, and alpha_.

Referenced by ConeAreaFunction::DoEval().

◆ SetParameterPhi0()

void IntegrandThetaFunction::SetParameterPhi0 ( double  phi0)

Definition at line 80 of file IntegrandThetaFunction.cc.

80  {
81  phi0_ = normalizedPhi(phi0); // map azimuth angle into interval [-pi,+pi]
82 }

References normalizedPhi(), and phi0_.

Referenced by ConeAreaFunction::DoEval().

◆ SetParameters()

void IntegrandThetaFunction::SetParameters ( double const *  param)
overrideprivate

Definition at line 86 of file IntegrandThetaFunction.cc.

86  {
87  theta0_ = param[0];
88  phi0_ = param[1];
89  alpha_ = param[2];
90 }

References alpha_, phi0_, and theta0_.

◆ SetParameterTheta0()

void IntegrandThetaFunction::SetParameterTheta0 ( double  theta0)

Definition at line 78 of file IntegrandThetaFunction.cc.

78 { theta0_ = theta0; }

References theta0_.

Referenced by ConeAreaFunction::DoEval().

Member Data Documentation

◆ alpha_

double IntegrandThetaFunction::alpha_
mutableprivate

◆ debugLevel_

const unsigned int IntegrandThetaFunction::debugLevel_ = 0
staticprivate

Definition at line 62 of file IntegrandThetaFunction.h.

Referenced by DoEval().

◆ fPhi_

IntegralOverPhiFunction* IntegrandThetaFunction::fPhi_
mutableprivate

◆ phi0_

double IntegrandThetaFunction::phi0_
mutableprivate

◆ theta0_

double IntegrandThetaFunction::theta0_
mutableprivate
IntegrandThetaFunction::alpha_
double alpha_
Definition: IntegrandThetaFunction.h:58
IntegralOverPhiFunction::SetParameterTheta0
void SetParameterTheta0(double theta0)
Definition: IntegralOverPhiFunction.cc:87
IntegrandThetaFunction::DoEval
double DoEval(double x) const override
Definition: IntegrandThetaFunction.cc:101
IntegralOverPhiFunction::SetParameterPhi0
void SetParameterPhi0(double phi0)
Definition: IntegralOverPhiFunction.cc:89
zMuMuMuonUserData.alpha
alpha
zGenParticlesMatch = cms.InputTag(""),
Definition: zMuMuMuonUserData.py:9
IntegrandThetaFunction::IntegrandThetaFunction
IntegrandThetaFunction()
Definition: IntegrandThetaFunction.cc:40
DDAxes::x
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
geometryDiff.epsilon
int epsilon
Definition: geometryDiff.py:26
Abs
T Abs(T a)
Definition: MathUtil.h:49
normalizedPhi
constexpr T normalizedPhi(T phi)
Definition: normalizedPhi.h:8
IntegrandThetaFunction::fPhi_
IntegralOverPhiFunction * fPhi_
Definition: IntegrandThetaFunction.h:60
IntegralOverPhiFunction::SetParameterAlpha
void SetParameterAlpha(double alpha)
Definition: IntegralOverPhiFunction.cc:93
IntegrandThetaFunction::debugLevel_
static const unsigned int debugLevel_
Definition: IntegrandThetaFunction.h:62
IntegrandThetaFunction::theta0_
double theta0_
Definition: IntegrandThetaFunction.h:56
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
IntegrandThetaFunction::phi0_
double phi0_
Definition: IntegrandThetaFunction.h:57
Pi
const double Pi
Definition: CosmicMuonParameters.h:18
IntegralOverPhiFunction
Definition: IntegralOverPhiFunction.h:30