CMS 3D CMS Logo

FixedAreaIsolationCone.cc
Go to the documentation of this file.
2 
3 // -*- C++ -*-
4 //
5 // Package:
6 // Class: FixedAreaIsolationCone
7 //
18 //
19 // Original Author: Christian Veelken, UC Davis
20 // Created: Wed May 16 13:47:40 CST 2007
21 //
22 //
23 
24 // C++ standard library include files
25 #include <string>
26 
27 // ROOT include files
28 #include <TMath.h>
29 
30 // CMSSW include files
32 
33 FixedAreaIsolationCone::FixedAreaIsolationCone() : areaFunctionSignalCone_(), areaRootFunctionIsolationCone_() {
34  //--- nothing to be done yet
35  //
36  // WARNING: do NOT call ROOT::Math::RootFinder<ROOT::Math::Roots::Brent>::SetFunction here;
37  // this will cause the function to be evaluated before all function parameters are set,
38  // leading to an error message first and erroneous behaviour of the root-finding later on !!!
39  //
40 }
41 
43  //--- nothing to be done yet
44 }
45 
46 void FixedAreaIsolationCone::setAcceptanceLimit(double etaMaxTrackingAcceptance) {
47  areaFunctionSignalCone_.SetAcceptanceLimit(etaMaxTrackingAcceptance);
48  areaRootFunctionIsolationCone_.SetAcceptanceLimit(etaMaxTrackingAcceptance);
49 }
50 
52  double coneAxisTheta, double coneAxisPhi, double openingAngleSignalCone, double areaIsolationCone, int& error) {
55  double areaSignalCone = areaFunctionSignalCone_(openingAngleSignalCone);
56 
59  areaRootFunctionIsolationCone_.SetParameterConeArea(areaIsolationCone + areaSignalCone);
61  int statusIsolationCone = areaRootFinderIsolationCone_.Solve();
62  double openingAngleIsolationCone = areaRootFinderIsolationCone_.Root();
63 
64  if (debugLevel_ > 0) {
65  const std::string category = "FixedAreaIsolationCone::operator()";
66  edm::LogVerbatim(category) << "openingAngleSignalCone = " << openingAngleSignalCone << std::endl;
67  edm::LogVerbatim(category) << "areaSignalCone = " << areaSignalCone << std::endl;
68  edm::LogVerbatim(category) << "areaIsolationCone = " << areaIsolationCone << std::endl;
69  edm::LogVerbatim(category) << "openingAngleIsolationCone = " << openingAngleIsolationCone << std::endl;
70  edm::LogVerbatim(category) << "statusIsolationCone = " << statusIsolationCone << std::endl;
71  }
72 
73  if (statusIsolationCone == 0) {
74  error = 0;
75  return openingAngleIsolationCone;
76  } else {
77  error = 1;
78  return 0.;
79  }
80 }
taus_updatedMVAIds_cff.category
category
Definition: taus_updatedMVAIds_cff.py:31
FixedAreaIsolationCone::areaRootFunctionIsolationCone_
ConeAreaRootFunction areaRootFunctionIsolationCone_
Definition: FixedAreaIsolationCone.h:56
MessageLogger.h
ConeAreaFunction::SetParameterTheta0
void SetParameterTheta0(double theta0)
Definition: ConeAreaFunction.cc:86
FixedAreaIsolationCone::areaFunctionSignalCone_
ConeAreaFunction areaFunctionSignalCone_
Definition: FixedAreaIsolationCone.h:55
FixedAreaIsolationCone::setAcceptanceLimit
void setAcceptanceLimit(double etaMaxTrackingAcceptance)
Definition: FixedAreaIsolationCone.cc:46
relativeConstraints.error
error
Definition: relativeConstraints.py:53
FixedAreaIsolationCone.h
FixedAreaIsolationCone::areaRootFinderIsolationCone_
ROOT::Math::RootFinder areaRootFinderIsolationCone_
Definition: FixedAreaIsolationCone.h:57
FixedAreaIsolationCone::operator()
double operator()(double coneAxisTheta, double coneAxisPhi, double openingAngleSignalCone, double areaIsolationCone, int &error)
Definition: FixedAreaIsolationCone.cc:51
ConeAreaFunction::SetParameterPhi0
void SetParameterPhi0(double phi0)
Definition: ConeAreaFunction.cc:88
FixedAreaIsolationCone::~FixedAreaIsolationCone
~FixedAreaIsolationCone()
Definition: FixedAreaIsolationCone.cc:42
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
ConeAreaFunction::SetAcceptanceLimit
void SetAcceptanceLimit(double etaMax)
Definition: ConeAreaFunction.cc:103
FixedAreaIsolationCone::debugLevel_
static const unsigned int debugLevel_
Definition: FixedAreaIsolationCone.h:59
Pi
const double Pi
Definition: CosmicMuonParameters.h:18
ConeAreaRootFunction::SetParameterConeArea
void SetParameterConeArea(double coneArea)
Definition: ConeAreaRootFunction.cc:63
FixedAreaIsolationCone::FixedAreaIsolationCone
FixedAreaIsolationCone()
Definition: FixedAreaIsolationCone.cc:33