CMS 3D CMS Logo

PixelQuadrupletGenerator.h
Go to the documentation of this file.
9 
13 
14 #include <utility>
15 #include <vector>
16 
17 class SeedComparitor;
18 
20 
22 
23 public:
26 
27  virtual ~PixelQuadrupletGenerator();
28 
30 
31  virtual void hitQuadruplets( const TrackingRegion& region, OrderedHitSeeds& result,
32  const edm::Event & ev, const edm::EventSetup& es,
33  const SeedingLayerSetsHits::SeedingLayerSet& tripletLayers,
34  const std::vector<SeedingLayerSetsHits::SeedingLayer>& fourthLayers) override;
35 
36  void hitQuadruplets( const TrackingRegion& region, OrderedHitSeeds& result,
37  const edm::Event& ev, const edm::EventSetup& es,
38  OrderedHitTriplets::const_iterator tripletsBegin,
39  OrderedHitTriplets::const_iterator tripletsEnd,
40  const std::vector<SeedingLayerSetsHits::SeedingLayer>& fourthLayers,
41  LayerCacheType& layerCache);
42 
43 private:
44  std::unique_ptr<SeedComparitor> theComparitor;
45 
47  public:
48  QuantityDependsPtEval(float v1, float v2, float c1, float c2):
49  value1_(v1), value2_(v2), curvature1_(c1), curvature2_(c2)
50  {}
51 
53 
54  float value(float curvature) const {
55  if(value1_ == value2_) // not enabled
56  return value1_;
57 
58  if(curvature1_ < curvature)
59  return value1_;
60  if(curvature2_ < curvature && curvature <= curvature1_)
61  return value2_ + (curvature-curvature2_)/(curvature1_-curvature2_) * (value1_-value2_);
62  return value2_;
63  }
64 
65  private:
66  const float value1_;
67  const float value2_;
68  const float curvature1_;
69  const float curvature2_;
70  };
71 
72  // Linear interpolation (in curvature) between value1 at pt1 and
73  // value2 at pt2. If disabled, value2 is given (the point is to
74  // allow larger/smaller values of the quantity at low pt, so it
75  // makes more sense to have the high-pt value as the default).
77  public:
79  value1_(pset.getParameter<double>("value1")),
80  value2_(pset.getParameter<double>("value2")),
81  pt1_(pset.getParameter<double>("pt1")),
82  pt2_(pset.getParameter<double>("pt2")),
83  enabled_(pset.getParameter<bool>("enabled"))
84  {
85  if(enabled_ && pt1_ >= pt2_)
86  throw cms::Exception("Configuration") << "PixelQuadrupletGenerator::QuantityDependsPt: pt1 (" << pt1_ << ") needs to be smaller than pt2 (" << pt2_ << ")";
87  if(pt1_ <= 0)
88  throw cms::Exception("Configuration") << "PixelQuadrupletGenerator::QuantityDependsPt: pt1 needs to be > 0; is " << pt1_;
89  if(pt2_ <= 0)
90  throw cms::Exception("Configuration") << "PixelQuadrupletGenerator::QuantityDependsPt: pt2 needs to be > 0; is " << pt2_;
91  }
92 
94  if(enabled_) {
96  PixelRecoUtilities::curvature(1.f/pt1_, es),
97  PixelRecoUtilities::curvature(1.f/pt2_, es));
98  }
99  return QuantityDependsPtEval(value2_, value2_, 0.f, 0.f);
100  }
101 
102  private:
103  const float value1_;
104  const float value2_;
105  const float pt1_;
106  const float pt2_;
107  const bool enabled_;
108  };
109 
110  const float extraHitRZtolerance;
114  const bool fitFastCircle;
117 };
118 
119 
120 
QuantityDependsPtEval evaluator(const edm::EventSetup &es) const
QuantityDependsPtEval(float v1, float v2, float c1, float c2)
static void fillDescriptions(edm::ParameterSetDescription &desc)
CombinedHitQuadrupletGenerator::LayerCacheType LayerCacheType
static void fillDescriptions(edm::ParameterSetDescription &desc)
bool ev
T curvature(T InversePt, const edm::EventSetup &iSetup)
virtual void hitQuadruplets(const TrackingRegion &region, OrderedHitSeeds &result, const edm::Event &ev, const edm::EventSetup &es, const SeedingLayerSetsHits::SeedingLayerSet &tripletLayers, const std::vector< SeedingLayerSetsHits::SeedingLayer > &fourthLayers) override
double f[11][100]
std::unique_ptr< SeedComparitor > theComparitor
const QuantityDependsPt extraPhiTolerance
PixelQuadrupletGenerator(const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
const QuantityDependsPt maxChi2