CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
CAHitTripletGenerator::QuantityDependsPt Class Reference

Public Member Functions

QuantityDependsPtEval evaluator (const edm::EventSetup &es) const
 
 QuantityDependsPt (const edm::ParameterSet &pset)
 

Private Attributes

const bool enabled_
 
const float pt1_
 
const float pt2_
 
const float value1_
 
const float value2_
 

Detailed Description

Definition at line 103 of file CAHitTripletGenerator.h.

Constructor & Destructor Documentation

CAHitTripletGenerator::QuantityDependsPt::QuantityDependsPt ( const edm::ParameterSet pset)
inlineexplicit

Definition at line 106 of file CAHitTripletGenerator.h.

References enabled_, Exception, pt1_, and pt2_.

106  :
107  value1_(pset.getParameter<double>("value1")),
108  value2_(pset.getParameter<double>("value2")),
109  pt1_(pset.getParameter<double>("pt1")),
110  pt2_(pset.getParameter<double>("pt2")),
111  enabled_(pset.getParameter<bool>("enabled")) {
112  if (enabled_ && pt1_ >= pt2_)
113  throw cms::Exception("Configuration") << "CAHitTripletGenerator::QuantityDependsPt: pt1 (" << pt1_ << ") needs to be smaller than pt2 (" << pt2_ << ")";
114  if (pt1_ <= 0)
115  throw cms::Exception("Configuration") << "CAHitTripletGenerator::QuantityDependsPt: pt1 needs to be > 0; is " << pt1_;
116  if (pt2_ <= 0)
117  throw cms::Exception("Configuration") << "CAHitTripletGenerator::QuantityDependsPt: pt2 needs to be > 0; is " << pt2_;
118  }
T getParameter(std::string const &) const

Member Function Documentation

QuantityDependsPtEval CAHitTripletGenerator::QuantityDependsPt::evaluator ( const edm::EventSetup es) const
inline

Definition at line 120 of file CAHitTripletGenerator.h.

References PixelRecoUtilities::curvature(), enabled_, f, pt1_, pt2_, value1_, and value2_.

Referenced by CAHitTripletGenerator::hitTriplets().

120  {
121  if (enabled_) {
122  return QuantityDependsPtEval(value1_, value2_,
125  }
126  return QuantityDependsPtEval(value2_, value2_, 0.f, 0.f);
127  }
T curvature(T InversePt, const edm::EventSetup &iSetup)
double f[11][100]

Member Data Documentation

const bool CAHitTripletGenerator::QuantityDependsPt::enabled_
private

Definition at line 134 of file CAHitTripletGenerator.h.

Referenced by evaluator(), and QuantityDependsPt().

const float CAHitTripletGenerator::QuantityDependsPt::pt1_
private

Definition at line 132 of file CAHitTripletGenerator.h.

Referenced by evaluator(), and QuantityDependsPt().

const float CAHitTripletGenerator::QuantityDependsPt::pt2_
private

Definition at line 133 of file CAHitTripletGenerator.h.

Referenced by evaluator(), and QuantityDependsPt().

const float CAHitTripletGenerator::QuantityDependsPt::value1_
private

Definition at line 130 of file CAHitTripletGenerator.h.

Referenced by evaluator().

const float CAHitTripletGenerator::QuantityDependsPt::value2_
private

Definition at line 131 of file CAHitTripletGenerator.h.

Referenced by evaluator().