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