CMS 3D CMS Logo

CAHitTripletGenerator.h
Go to the documentation of this file.
1 #ifndef RECOPIXELVERTEXING_PIXELTRIPLETS_CAHITTRIPLETGENERATOR_H
2 #define RECOPIXELVERTEXING_PIXELTRIPLETS_CAHITTRIPLETGENERATOR_H
3 
7 
11 
16 
18 
20 class TrackingRegion;
22 
23 namespace edm {
24  class Event;
25  class EventSetup;
27 } // namespace edm
28 
30 public:
32 
33  static constexpr unsigned int minLayers = 3;
35 
36 public:
39 
40  ~CAHitTripletGenerator() = default;
41 
43  static const char* fillDescriptionsLabel() { return "caHitTriplet"; }
44 
45  void initEvent(const edm::Event& ev, const edm::EventSetup& es);
46 
47  void hitNtuplets(const IntermediateHitDoublets& regionDoublets,
48  std::vector<OrderedHitSeeds>& result,
49  const edm::EventSetup& es,
51 
52 private:
54 
55  std::unique_ptr<SeedComparitor> theComparitor;
56 
58  public:
59  QuantityDependsPtEval(float v1, float v2, float c1, float c2)
60  : value1_(v1), value2_(v2), curvature1_(c1), curvature2_(c2) {}
61 
62  float value(float curvature) const {
63  if (value1_ == value2_) // not enabled
64  return value1_;
65 
66  if (curvature1_ < curvature)
67  return value1_;
70  return value2_;
71  }
72 
73  private:
74  const float value1_;
75  const float value2_;
76  const float curvature1_;
77  const float curvature2_;
78  };
79 
80  // Linear interpolation (in curvature) between value1 at pt1 and
81  // value2 at pt2. If disabled, value2 is given (the point is to
82  // allow larger/smaller values of the quantity at low pt, so it
83  // makes more sense to have the high-pt value as the default).
84 
86  public:
88  : value1_(pset.getParameter<double>("value1")),
89  value2_(pset.getParameter<double>("value2")),
90  pt1_(pset.getParameter<double>("pt1")),
91  pt2_(pset.getParameter<double>("pt2")),
92  enabled_(pset.getParameter<bool>("enabled")) {
93  if (enabled_ && pt1_ >= pt2_)
94  throw cms::Exception("Configuration") << "CAHitTripletGenerator::QuantityDependsPt: pt1 (" << pt1_
95  << ") needs to be smaller than pt2 (" << pt2_ << ")";
96  if (pt1_ <= 0)
97  throw cms::Exception("Configuration")
98  << "CAHitTripletGenerator::QuantityDependsPt: pt1 needs to be > 0; is " << pt1_;
99  if (pt2_ <= 0)
100  throw cms::Exception("Configuration")
101  << "CAHitTripletGenerator::QuantityDependsPt: pt2 needs to be > 0; is " << pt2_;
102  }
103 
105  if (enabled_) {
107  value2_,
110  }
111  return QuantityDependsPtEval(value2_, value2_, 0.f, 0.f);
112  }
113 
114  private:
115  const float value1_;
116  const float value2_;
117  const float pt1_;
118  const float pt2_;
119  const bool enabled_;
120  };
121 
123 
126 
127  const float caThetaCut = 0.00125f;
128  const float caPhiCut = 1.f;
129  const float caHardPtCut = 0.f;
130 };
131 
132 #endif
CAHitTripletGenerator::ResultType
OrderedHitSeeds ResultType
Definition: CAHitTripletGenerator.h:34
CAHitTripletGenerator::QuantityDependsPt::enabled_
const bool enabled_
Definition: CAHitTripletGenerator.h:119
CAHitTripletGenerator::initEvent
void initEvent(const edm::Event &ev, const edm::EventSetup &es)
Definition: CAHitTripletGenerator.cc:65
electrons_cff.bool
bool
Definition: electrons_cff.py:372
CAHitTripletGenerator::QuantityDependsPtEval::value1_
const float value1_
Definition: CAHitTripletGenerator.h:74
PixelSubdetector.h
CAHitTripletGenerator::QuantityDependsPt::pt2_
const float pt2_
Definition: CAHitTripletGenerator.h:118
CAHitTripletGenerator::minLayers
static constexpr unsigned int minLayers
Definition: CAHitTripletGenerator.h:33
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
CAHitTripletGenerator::maxChi2
const QuantityDependsPt maxChi2
Definition: CAHitTripletGenerator.h:124
edm
HLT enums.
Definition: AlignableModifier.h:19
CAHitTripletGenerator
Definition: CAHitTripletGenerator.h:29
CAHitTripletGenerator::QuantityDependsPtEval::curvature2_
const float curvature2_
Definition: CAHitTripletGenerator.h:77
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
SeedingLayerSetsHits
Definition: SeedingLayerSetsHits.h:18
CAHitTripletGenerator::QuantityDependsPt
Definition: CAHitTripletGenerator.h:85
IntermediateHitDoublets.h
CAHitTripletGenerator::QuantityDependsPt::evaluator
QuantityDependsPtEval evaluator(const edm::EventSetup &es) const
Definition: CAHitTripletGenerator.h:104
CAHitTripletGenerator::QuantityDependsPtEval
Definition: CAHitTripletGenerator.h:57
CAHitTripletGenerator::QuantityDependsPtEval::curvature1_
const float curvature1_
Definition: CAHitTripletGenerator.h:76
CAHitTripletGenerator::caHardPtCut
const float caHardPtCut
Definition: CAHitTripletGenerator.h:129
PixelRecoUtilities::curvature
T curvature(T InversePt, const edm::EventSetup &iSetup)
Definition: PixelRecoUtilities.h:42
CAHitTripletGenerator::CAHitTripletGenerator
CAHitTripletGenerator(const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
Definition: CAHitTripletGenerator.h:37
CAHitTripletGenerator::QuantityDependsPt::value1_
const float value1_
Definition: CAHitTripletGenerator.h:115
OrderedHitSeeds
Definition: OrderedHitSeeds.h:9
LayerHitMapCache.h
CAHitTripletGenerator::QuantityDependsPtEval::QuantityDependsPtEval
QuantityDependsPtEval(float v1, float v2, float c1, float c2)
Definition: CAHitTripletGenerator.h:59
LayerHitMapCache
Definition: LayerHitMapCache.h:14
CAHitTripletGenerator::theLayerCache
LayerCacheType theLayerCache
Definition: CAHitTripletGenerator.h:53
Event
CAHitTripletGenerator::fillDescriptions
static void fillDescriptions(edm::ParameterSetDescription &desc)
Definition: CAHitTripletGenerator.cc:44
CAHitTripletGenerator::extraHitRPhitolerance
const float extraHitRPhitolerance
Definition: CAHitTripletGenerator.h:122
PixelRecoUtilities.h
CAHitTripletGenerator::theComparitor
std::unique_ptr< SeedComparitor > theComparitor
Definition: CAHitTripletGenerator.h:55
EDGetToken.h
edm::ParameterSet
Definition: ParameterSet.h:36
SeedComparitorFactory.h
CAHitTripletGenerator::hitNtuplets
void hitNtuplets(const IntermediateHitDoublets &regionDoublets, std::vector< OrderedHitSeeds > &result, const edm::EventSetup &es, const SeedingLayerSetsHits &layers)
Definition: CAHitTripletGenerator.cc:145
CAHitTripletGenerator::LayerCacheType
LayerHitMapCache LayerCacheType
Definition: CAHitTripletGenerator.h:31
CAHitTripletGenerator::~CAHitTripletGenerator
~CAHitTripletGenerator()=default
RZLine.h
alignmentValidation.c1
c1
do drawing
Definition: alignmentValidation.py:1025
CAHitTripletGenerator::caThetaCut
const float caThetaCut
Definition: CAHitTripletGenerator.h:127
IntermediateHitDoublets
Definition: IntermediateHitDoublets.h:131
edm::EventSetup
Definition: EventSetup.h:57
looper.cfg
cfg
Definition: looper.py:297
CAHitTripletGenerator::QuantityDependsPtEval::value
float value(float curvature) const
Definition: CAHitTripletGenerator.h:62
CAHitTripletGenerator::QuantityDependsPt::pt1_
const float pt1_
Definition: CAHitTripletGenerator.h:117
SeedComparitor.h
HitPairGeneratorFromLayerPair.h
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
Exception
Definition: hltDiff.cc:246
ParameterSetDescription
OrderedHitSeeds.h
CAHitTripletGenerator::QuantityDependsPtEval::value2_
const float value2_
Definition: CAHitTripletGenerator.h:75
TrackingRegion
Definition: TrackingRegion.h:40
mps_fire.result
result
Definition: mps_fire.py:303
CAHitTripletGenerator::useBendingCorrection
const bool useBendingCorrection
Definition: CAHitTripletGenerator.h:125
CAHitTripletGenerator::fillDescriptionsLabel
static const char * fillDescriptionsLabel()
Definition: CAHitTripletGenerator.h:43
EventSetup
ParameterSet.h
CAHitTripletGenerator::QuantityDependsPt::QuantityDependsPt
QuantityDependsPt(const edm::ParameterSet &pset)
Definition: CAHitTripletGenerator.h:87
CAHitTripletGenerator::caPhiCut
const float caPhiCut
Definition: CAHitTripletGenerator.h:128
edm::Event
Definition: Event.h:73
LongitudinalBendingCorrection.h
edm::ConsumesCollector
Definition: ConsumesCollector.h:39
hgcalTopologyTester_cfi.layers
layers
Definition: hgcalTopologyTester_cfi.py:8
CAHitTripletGenerator::QuantityDependsPt::value2_
const float value2_
Definition: CAHitTripletGenerator.h:116
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27