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 
19 
20 class TrackingRegion;
22 
23 namespace edm {
24  class Event;
25  class EventSetup;
27 }
28 
30 public:
32 
33  static constexpr unsigned int minLayers = 4;
35 
36 public:
37 
40 
41  ~CAHitQuadrupletGenerator() = default;
42 
44  static const char *fillDescriptionsLabel() { return "caHitQuadruplet"; }
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 
61  QuantityDependsPtEval(float v1, float v2, float c1, float c2) :
62  value1_(v1), value2_(v2), curvature1_(c1), curvature2_(c2) {
63  }
64 
65  float value(float curvature) const {
66  if (value1_ == value2_) // not enabled
67  return value1_;
68 
69  if (curvature1_ < curvature)
70  return value1_;
73  return value2_;
74  }
75 
76  private:
77  const float value1_;
78  const float value2_;
79  const float curvature1_;
80  const float curvature2_;
81  };
82 
83  // Linear interpolation (in curvature) between value1 at pt1 and
84  // value2 at pt2. If disabled, value2 is given (the point is to
85  // allow larger/smaller values of the quantity at low pt, so it
86  // makes more sense to have the high-pt value as the default).
87 
89  public:
90 
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") << "PixelQuadrupletGenerator::QuantityDependsPt: pt1 (" << pt1_ << ") needs to be smaller than pt2 (" << pt2_ << ")";
99  if (pt1_ <= 0)
100  throw cms::Exception("Configuration") << "PixelQuadrupletGenerator::QuantityDependsPt: pt1 needs to be > 0; is " << pt1_;
101  if (pt2_ <= 0)
102  throw cms::Exception("Configuration") << "PixelQuadrupletGenerator::QuantityDependsPt: pt2 needs to be > 0; is " << pt2_;
103  }
104 
106  if (enabled_) {
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 
125  const bool fitFastCircle;
128 
129  const float caThetaCut = 0.00125f;
130  const float caPhiCut = 0.1f;
131  const float caHardPtCut = 0.f;
132 };
133 #endif
CAHitQuadrupletGenerator::maxChi2
const QuantityDependsPt maxChi2
Definition: CAHitQuadrupletGenerator.h:124
electrons_cff.bool
bool
Definition: electrons_cff.py:372
PixelSubdetector.h
CAHitQuadrupletGenerator::QuantityDependsPt::pt2_
const float pt2_
Definition: CAHitQuadrupletGenerator.h:118
CAHitQuadrupletGenerator::minLayers
static constexpr unsigned int minLayers
Definition: CAHitQuadrupletGenerator.h:33
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:115
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
SeedingLayerSetsHits
Definition: SeedingLayerSetsHits.h:18
CAHitQuadrupletGenerator
Definition: CAHitQuadrupletGenerator.h:29
CAHitQuadrupletGenerator::QuantityDependsPtEval::value
float value(float curvature) const
Definition: CAHitQuadrupletGenerator.h:65
IntermediateHitDoublets.h
CAHitQuadrupletGenerator::QuantityDependsPtEval::value1_
const float value1_
Definition: CAHitQuadrupletGenerator.h:77
PixelRecoUtilities::curvature
T curvature(T InversePt, const edm::EventSetup &iSetup)
Definition: PixelRecoUtilities.h:42
CAHitQuadrupletGenerator::QuantityDependsPt::value2_
const float value2_
Definition: CAHitQuadrupletGenerator.h:116
CAHitQuadrupletGenerator::ResultType
OrderedHitSeeds ResultType
Definition: CAHitQuadrupletGenerator.h:34
OrderedHitSeeds
Definition: OrderedHitSeeds.h:9
LayerHitMapCache.h
LayerHitMapCache
Definition: LayerHitMapCache.h:14
CAHitQuadrupletGenerator::fitFastCircleChi2Cut
const bool fitFastCircleChi2Cut
Definition: CAHitQuadrupletGenerator.h:126
CAHitQuadrupletGenerator::QuantityDependsPt
Definition: CAHitQuadrupletGenerator.h:88
CAHitQuadrupletGenerator::QuantityDependsPtEval::curvature1_
const float curvature1_
Definition: CAHitQuadrupletGenerator.h:79
CAHitQuadrupletGenerator::QuantityDependsPtEval::curvature2_
const float curvature2_
Definition: CAHitQuadrupletGenerator.h:80
Event
CAHitQuadrupletGenerator::hitNtuplets
void hitNtuplets(const IntermediateHitDoublets &regionDoublets, std::vector< OrderedHitSeeds > &result, const edm::EventSetup &es, const SeedingLayerSetsHits &layers)
Definition: CAHitQuadrupletGenerator.cc:146
PixelRecoUtilities.h
CAHitQuadrupletGenerator::LayerCacheType
LayerHitMapCache LayerCacheType
Definition: CAHitQuadrupletGenerator.h:31
CAHitQuadrupletGenerator::extraHitRPhitolerance
const float extraHitRPhitolerance
Definition: CAHitQuadrupletGenerator.h:122
CAHitQuadrupletGenerator::QuantityDependsPt::QuantityDependsPt
QuantityDependsPt(const edm::ParameterSet &pset)
Definition: CAHitQuadrupletGenerator.h:91
EDGetToken.h
CAHitQuadrupletGenerator::QuantityDependsPt::evaluator
QuantityDependsPtEval evaluator(const edm::EventSetup &es) const
Definition: CAHitQuadrupletGenerator.h:105
edm::ParameterSet
Definition: ParameterSet.h:36
SeedComparitorFactory.h
CAHitQuadrupletGenerator::QuantityDependsPtEval
Definition: CAHitQuadrupletGenerator.h:58
RZLine.h
CAHitQuadrupletGenerator::useBendingCorrection
const bool useBendingCorrection
Definition: CAHitQuadrupletGenerator.h:127
alignmentValidation.c1
c1
do drawing
Definition: alignmentValidation.py:1025
CAHitQuadrupletGenerator::fitFastCircle
const bool fitFastCircle
Definition: CAHitQuadrupletGenerator.h:125
CAHitQuadrupletGenerator::fillDescriptions
static void fillDescriptions(edm::ParameterSetDescription &desc)
Definition: CAHitQuadrupletGenerator.cc:44
IntermediateHitDoublets
Definition: IntermediateHitDoublets.h:131
CAHitQuadrupletGenerator::QuantityDependsPt::enabled_
const bool enabled_
Definition: CAHitQuadrupletGenerator.h:119
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:70
looper.cfg
cfg
Definition: looper.py:297
CAHitQuadrupletGenerator::fillDescriptionsLabel
static const char * fillDescriptionsLabel()
Definition: CAHitQuadrupletGenerator.h:44
SeedComparitor.h
CAHitQuadrupletGenerator::theComparitor
std::unique_ptr< SeedComparitor > theComparitor
Definition: CAHitQuadrupletGenerator.h:56
CAHitQuadrupletGenerator::caThetaCut
const float caThetaCut
Definition: CAHitQuadrupletGenerator.h:129
HitPairGeneratorFromLayerPair.h
CAHitQuadrupletGenerator::QuantityDependsPt::pt1_
const float pt1_
Definition: CAHitQuadrupletGenerator.h:117
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
Exception
Definition: hltDiff.cc:246
CAHitQuadrupletGenerator::caPhiCut
const float caPhiCut
Definition: CAHitQuadrupletGenerator.h:130
ParameterSetDescription
OrderedHitSeeds.h
CAHitQuadrupletGenerator::caHardPtCut
const float caHardPtCut
Definition: CAHitQuadrupletGenerator.h:131
TrackingRegion
Definition: TrackingRegion.h:40
CAHitQuadrupletGenerator::QuantityDependsPtEval::value2_
const float value2_
Definition: CAHitQuadrupletGenerator.h:78
mps_fire.result
result
Definition: mps_fire.py:303
FastCircleFit.h
CAHitQuadrupletGenerator::theLayerCache
LayerCacheType theLayerCache
Definition: CAHitQuadrupletGenerator.h:54
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:39
hgcalTopologyTester_cfi.layers
layers
Definition: hgcalTopologyTester_cfi.py:8
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27