25 : trackingRegion_(nullptr),
27 measurementTracker_(nullptr),
28 measurementTrackerLabel_(
cfg.getParameter<
std::
string>(
"measurementTracker")) {
29 if (
cfg.exists(
"pixelTripletGeneratorFactory")) {
35 if (
cfg.exists(
"MultiHitGeneratorFactory")) {
41 if (
cfg.exists(
"CAHitTripletGeneratorFactory")) {
43 CAHitTriplGenerator_ = std::make_unique<CAHitTripletGenerator>(tripletConfig, consumesCollector);
49 layerPairs_ =
cfg.getParameter<std::vector<unsigned>>(
"layerPairs");
52 if (
cfg.exists(
"CAHitQuadrupletGeneratorFactory")) {
54 CAHitQuadGenerator_ = std::make_unique<CAHitQuadrupletGenerator>(quadrupletConfig, consumesCollector);
57 std::make_unique<SeedingLayerSetsBuilder>(
cfg, consumesCollector,
edm::InputTag(
"fastTrackerRecHits"));
58 layerPairs_ =
cfg.getParameter<std::vector<unsigned>>(
"layerPairs");
64 <<
"It is forbidden to specify together 'pixelTripletGeneratorFactory', 'CAHitTripletGeneratorFactory' and "
65 "'MultiHitGeneratorFactory' in configuration of SeedFinderSelection";
70 <<
"It is forbidden to specify 'CAHitQuadrupletGeneratorFactory' together with 'pixelTripletGeneratorFactory', "
71 "'CAHitTripletGeneratorFactory' or 'MultiHitGeneratorFactory' in configuration of SeedFinderSelection";
105 throw cms::Exception(
"FastSimTracking") <<
"ERROR: event not initialized";
108 throw cms::Exception(
"FastSimTracking") <<
"ERROR: trackingRegion not set";
112 if (
hits.size() < 2) {
113 throw cms::Exception(
"FastSimTracking") <<
"SeedFinderSelector::pass requires at least 2 hits";
120 std::vector<BaseTrackerRecHit const *> firstHits{
hits[0]};
121 std::vector<BaseTrackerRecHit const *> secondHits{
hits[1]};
136 if (
hits.size() < 3) {
138 <<
"For the given configuration, SeedFinderSelector::pass requires at least 3 hits";
142 std::vector<const DetLayer *> thirdLayerDetLayer(1, thirdLayer);
143 std::vector<BaseTrackerRecHit const *> thirdHits{
hits[2]};
151 return !tripletresult.empty();
156 return !tripletresult.empty();
161 throw cms::Exception(
"FastSimTracking") <<
"ERROR: SeedingLayers pointer not set for CATripletGenerator";
170 std::array<SeedingLayerSetsBuilder::SeedingLayerId, 3> hitPair;
184 std::vector<BaseTrackerRecHit const *> fHits{
hits[0]};
185 std::vector<BaseTrackerRecHit const *> sHits{
hits[1]};
186 std::vector<BaseTrackerRecHit const *> tHits{
hits[2]};
193 pairCandidate =
ls.slice(
p,
p + 2);
196 pairCandidate1 = pairCandidate;
199 pairCandidate2 = pairCandidate;
204 auto &layerCache =
filler.layerHitMapCache();
222 std::vector<OrderedHitSeeds> tripletresult;
223 tripletresult.resize(
ihd.regionSize());
224 for (
auto &ntuplet : tripletresult)
228 return !tripletresult[0].empty();
233 if (
hits.size() < 4) {
235 <<
"For the given configuration, SeedFinderSelector::pass requires at least 4 hits";
239 throw cms::Exception(
"FastSimTracking") <<
"ERROR: SeedingLayers pointer not set for CAHitQuadrupletGenerator";
248 std::array<SeedingLayerSetsBuilder::SeedingLayerId, 4> hitPair;
261 std::vector<BaseTrackerRecHit const *> fHits{
hits[0]};
262 std::vector<BaseTrackerRecHit const *> sHits{
hits[1]};
263 std::vector<BaseTrackerRecHit const *> tHits{
hits[2]};
264 std::vector<BaseTrackerRecHit const *> frHits{
hits[3]};
271 pairCandidate =
ls.slice(
p,
p + 2);
274 pairCandidate1 = pairCandidate;
277 pairCandidate2 = pairCandidate;
280 pairCandidate3 = pairCandidate;
285 auto &layerCache =
filler.layerHitMapCache();
303 pairCandidate3[1], std::make_unique<RecHitsSortedInPhi>(frHits,
trackingRegion_->
origin(), frLayer));
309 std::vector<OrderedHitSeeds> quadrupletresult;
310 quadrupletresult.resize(
ihd.regionSize());
311 for (
auto &ntuplet : quadrupletresult)
315 return !quadrupletresult[0].empty();
331 idLayer = tTopo->
pxbLayer(
hit->det()->geographicalId());
334 idLayer = tTopo->
pxfDisk(
hit->det()->geographicalId());
335 if (tTopo->
pxfSide(
hit->det()->geographicalId()) == 1) {
341 return std::make_tuple(subdet, side, idLayer);