CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
CAHitTripletGenerator::QuantityDependsPt Class Reference

Public Member Functions

QuantityDependsPtEval evaluator (const MagneticField &field) 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 89 of file CAHitTripletGenerator.h.

Constructor & Destructor Documentation

◆ QuantityDependsPt()

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

Definition at line 91 of file CAHitTripletGenerator.h.

References enabled_, Exception, pt1_, and pt2_.

92  : value1_(pset.getParameter<double>("value1")),
93  value2_(pset.getParameter<double>("value2")),
94  pt1_(pset.getParameter<double>("pt1")),
95  pt2_(pset.getParameter<double>("pt2")),
96  enabled_(pset.getParameter<bool>("enabled")) {
97  if (enabled_ && pt1_ >= pt2_)
98  throw cms::Exception("Configuration") << "CAHitTripletGenerator::QuantityDependsPt: pt1 (" << pt1_
99  << ") needs to be smaller than pt2 (" << pt2_ << ")";
100  if (pt1_ <= 0)
101  throw cms::Exception("Configuration")
102  << "CAHitTripletGenerator::QuantityDependsPt: pt1 needs to be > 0; is " << pt1_;
103  if (pt2_ <= 0)
104  throw cms::Exception("Configuration")
105  << "CAHitTripletGenerator::QuantityDependsPt: pt2 needs to be > 0; is " << pt2_;
106  }

Member Function Documentation

◆ evaluator()

QuantityDependsPtEval CAHitTripletGenerator::QuantityDependsPt::evaluator ( const MagneticField field) const
inline

Definition at line 108 of file CAHitTripletGenerator.h.

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

Referenced by CAHitTripletGenerator::hitNtuplets().

108  {
109  if (enabled_) {
110  return QuantityDependsPtEval(value1_,
111  value2_,
113  PixelRecoUtilities::curvature(1.f / pt2_, field));
114  }
115  return QuantityDependsPtEval(value2_, value2_, 0.f, 0.f);
116  }
T curvature(T InversePt, const MagneticField &field)
double f[11][100]

Member Data Documentation

◆ enabled_

const bool CAHitTripletGenerator::QuantityDependsPt::enabled_
private

Definition at line 123 of file CAHitTripletGenerator.h.

Referenced by evaluator(), and QuantityDependsPt().

◆ pt1_

const float CAHitTripletGenerator::QuantityDependsPt::pt1_
private

Definition at line 121 of file CAHitTripletGenerator.h.

Referenced by evaluator(), and QuantityDependsPt().

◆ pt2_

const float CAHitTripletGenerator::QuantityDependsPt::pt2_
private

Definition at line 122 of file CAHitTripletGenerator.h.

Referenced by evaluator(), and QuantityDependsPt().

◆ value1_

const float CAHitTripletGenerator::QuantityDependsPt::value1_
private

Definition at line 119 of file CAHitTripletGenerator.h.

Referenced by evaluator().

◆ value2_

const float CAHitTripletGenerator::QuantityDependsPt::value2_
private

Definition at line 120 of file CAHitTripletGenerator.h.

Referenced by evaluator().