CMS 3D CMS Logo

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