26 : trackingRegion_(nullptr),
28 measurementTracker_(nullptr),
29 measurementTrackerLabel_(
cfg.getParameter<
std::
string>(
"measurementTracker")),
31 trackerTopologyESToken_(consumesCollector.
esConsumes()),
33 msMakerESToken_(consumesCollector.
esConsumes()) {
34 if (
cfg.exists(
"pixelTripletGeneratorFactory")) {
40 if (
cfg.exists(
"MultiHitGeneratorFactory")) {
46 if (
cfg.exists(
"CAHitTripletGeneratorFactory")) {
48 CAHitTriplGenerator_ = std::make_unique<CAHitTripletGenerator>(tripletConfig, consumesCollector);
54 layerPairs_ =
cfg.getParameter<std::vector<unsigned>>(
"layerPairs");
57 if (
cfg.exists(
"CAHitQuadrupletGeneratorFactory")) {
59 CAHitQuadGenerator_ = std::make_unique<CAHitQuadrupletGenerator>(quadrupletConfig, consumesCollector);
62 std::make_unique<SeedingLayerSetsBuilder>(
cfg, consumesCollector,
edm::InputTag(
"fastTrackerRecHits"));
63 layerPairs_ =
cfg.getParameter<std::vector<unsigned>>(
"layerPairs");
69 <<
"It is forbidden to specify together 'pixelTripletGeneratorFactory', 'CAHitTripletGeneratorFactory' and " 70 "'MultiHitGeneratorFactory' in configuration of SeedFinderSelection";
75 <<
"It is forbidden to specify 'CAHitQuadrupletGeneratorFactory' together with 'pixelTripletGeneratorFactory', " 76 "'CAHitTripletGeneratorFactory' or 'MultiHitGeneratorFactory' in configuration of SeedFinderSelection";
110 throw cms::Exception(
"FastSimTracking") <<
"ERROR: event not initialized";
113 throw cms::Exception(
"FastSimTracking") <<
"ERROR: trackingRegion not set";
117 if (
hits.size() < 2) {
118 throw cms::Exception(
"FastSimTracking") <<
"SeedFinderSelector::pass requires at least 2 hits";
125 std::vector<BaseTrackerRecHit const *> firstHits{
hits[0]};
126 std::vector<BaseTrackerRecHit const *> secondHits{
hits[1]};
141 if (
hits.size() < 3) {
143 <<
"For the given configuration, SeedFinderSelector::pass requires at least 3 hits";
147 std::vector<const DetLayer *> thirdLayerDetLayer(1, thirdLayer);
148 std::vector<BaseTrackerRecHit const *> thirdHits{
hits[2]};
156 return !tripletresult.empty();
160 return !tripletresult.empty();
165 throw cms::Exception(
"FastSimTracking") <<
"ERROR: SeedingLayers pointer not set for CATripletGenerator";
174 std::array<SeedingLayerSetsBuilder::SeedingLayerId, 3> hitPair;
188 std::vector<BaseTrackerRecHit const *> fHits{
hits[0]};
189 std::vector<BaseTrackerRecHit const *> sHits{
hits[1]};
190 std::vector<BaseTrackerRecHit const *> tHits{
hits[2]};
197 pairCandidate =
ls.slice(
p,
p + 2);
200 pairCandidate1 = pairCandidate;
203 pairCandidate2 = pairCandidate;
208 auto &layerCache =
filler.layerHitMapCache();
226 std::vector<OrderedHitSeeds> tripletresult;
227 tripletresult.resize(
ihd.regionSize());
228 for (
auto &
ntuplet : tripletresult)
232 return !tripletresult[0].empty();
237 if (
hits.size() < 4) {
239 <<
"For the given configuration, SeedFinderSelector::pass requires at least 4 hits";
243 throw cms::Exception(
"FastSimTracking") <<
"ERROR: SeedingLayers pointer not set for CAHitQuadrupletGenerator";
252 std::array<SeedingLayerSetsBuilder::SeedingLayerId, 4> hitPair;
265 std::vector<BaseTrackerRecHit const *> fHits{
hits[0]};
266 std::vector<BaseTrackerRecHit const *> sHits{
hits[1]};
267 std::vector<BaseTrackerRecHit const *> tHits{
hits[2]};
268 std::vector<BaseTrackerRecHit const *> frHits{
hits[3]};
275 pairCandidate =
ls.slice(
p,
p + 2);
278 pairCandidate1 = pairCandidate;
281 pairCandidate2 = pairCandidate;
284 pairCandidate3 = pairCandidate;
289 auto &layerCache =
filler.layerHitMapCache();
307 pairCandidate3[1], std::make_unique<RecHitsSortedInPhi>(frHits,
trackingRegion_->
origin(), frLayer));
313 std::vector<OrderedHitSeeds> quadrupletresult;
314 quadrupletresult.resize(
ihd.regionSize());
315 for (
auto &
ntuplet : quadrupletresult)
319 return !quadrupletresult[0].empty();
344 return std::make_tuple(subdet, side, idLayer);
SeedFinderSelector(const edm::ParameterSet &, edm::ConsumesCollector &&)
T getParameter(std::string const &) const
unsigned int pxbLayer(const DetId &id) const
std::unique_ptr< CAHitQuadrupletGenerator > CAHitQuadGenerator_
const edm::EventSetup * eventSetup_
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
std::unique_ptr< SeedingLayerSetsHits > seedingLayer
const MagneticField * field_
GlobalPoint const & origin() const
const DetLayer * detLayer(const DetId &id) const
obsolete method. Use idToLayer() instead.
const edm::ESGetToken< MultipleScatteringParametrisationMaker, TrackerMultipleScatteringRecord > msMakerESToken_
SeedingLayerSetsBuilder::SeedingLayerId Layer_tuple(const FastTrackerRecHit *hit) const
std::unique_ptr< HitTripletGeneratorFromPairAndLayers > pixelTripletGenerator_
const GeometricSearchTracker * geometricSearchTracker() const
std::vector< SeedingLayerSetsBuilder::SeedingLayerId > seedingLayerIds
std::tuple< GeomDetEnumerators::SubDetector, TrackerDetSide, int > SeedingLayerId
std::vector< unsigned > layerPairs_
const TrackingRegion * trackingRegion_
unsigned int pxfDisk(const DetId &id) const
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > fieldESToken_
void initEvent(const edm::Event &, const edm::EventSetup &)
unsigned int pxfSide(const DetId &id) const
bool pass(const std::vector< const FastTrackerRecHit *> &hits) const
const edm::ESGetToken< MeasurementTracker, CkfComponentsRecord > measurementTrackerESToken_
std::unique_ptr< SeedingLayerSetsBuilder > seedingLayers_
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > trackerTopologyESToken_
const MeasurementTracker * measurementTracker_
std::optional< HitDoublets > doublets(const TrackingRegion ®, const edm::Event &ev, const edm::EventSetup &es, Layers layers)
const MultipleScatteringParametrisationMaker * msmaker_
std::unique_ptr< CAHitTripletGenerator > CAHitTriplGenerator_
const TrackerTopology * trackerTopology_
std::unique_ptr< MultiHitGeneratorFromPairAndLayers > multiHitGenerator_