28 , measurementTrackerLabel_(cfg.getParameter<
std::
string>(
"measurementTracker"))
30 if(cfg.
exists(
"pixelTripletGeneratorFactory"))
36 if(cfg.
exists(
"MultiHitGeneratorFactory"))
42 if(cfg.
exists(
"CAHitTripletGeneratorFactory"))
47 layerPairs_ = cfg.getParameter<std::vector<unsigned>>(
"layerPairs");
50 if(cfg.
exists(
"CAHitQuadrupletGeneratorFactory"))
53 CAHitQuadGenerator_ = std::make_unique<CAHitQuadrupletGenerator>(quadrupletConfig, consumesCollector);
55 layerPairs_ = cfg.getParameter<std::vector<unsigned>>(
"layerPairs");
60 throw cms::Exception(
"FastSimTracking") <<
"It is forbidden to specify together 'pixelTripletGeneratorFactory', 'CAHitTripletGeneratorFactory' and 'MultiHitGeneratorFactory' in configuration of SeedFinderSelection";
64 throw cms::Exception(
"FastSimTracking") <<
"It is forbidden to specify 'CAHitQuadrupletGeneratorFactory' together with 'pixelTripletGeneratorFactory', 'CAHitTripletGeneratorFactory' or 'MultiHitGeneratorFactory' in configuration of SeedFinderSelection";
102 throw cms::Exception(
"FastSimTracking") <<
"ERROR: event not initialized";
106 throw cms::Exception(
"FastSimTracking") <<
"ERROR: trackingRegion not set";
113 throw cms::Exception(
"FastSimTracking") <<
"SeedFinderSelector::pass requires at least 2 hits";
118 std::vector<BaseTrackerRecHit const *> firstHits{hits[0]};
119 std::vector<BaseTrackerRecHit const *> secondHits{hits[1]};
137 throw cms::Exception(
"FastSimTracking") <<
"For the given configuration, SeedFinderSelector::pass requires at least 3 hits";
140 std::vector<const DetLayer *> thirdLayerDetLayer(1,thirdLayer);
141 std::vector<BaseTrackerRecHit const *> thirdHits{hits[2]};
149 return !tripletresult.empty();
155 return !tripletresult.empty();
161 throw cms::Exception(
"FastSimTracking") <<
"ERROR: SeedingLayers pointer not set for CATripletGenerator";
181 std::vector<BaseTrackerRecHit const *> fHits{hits[0]};
182 std::vector<BaseTrackerRecHit const *> sHits{hits[1]};
183 std::vector<BaseTrackerRecHit const *> tHits{hits[2]};
190 pairCandidate =
ls.slice(
p,
p+2);
191 if(
p==0 && hitPair[0] == pairCandidate[0].
name() && hitPair[1] == pairCandidate[1].
name())
192 pairCandidate1=pairCandidate;
193 if(
p==1 && hitPair[1] == pairCandidate[0].
name() && hitPair[2] == pairCandidate[1].
name())
194 pairCandidate2=pairCandidate;
199 auto& layerCache =
filler.layerHitMapCache();
212 std::vector<OrderedHitSeeds> tripletresult;
214 for(
auto& ntuplet : tripletresult)
217 return !tripletresult.empty();
225 throw cms::Exception(
"FastSimTracking") <<
"For the given configuration, SeedFinderSelector::pass requires at least 4 hits";
229 throw cms::Exception(
"FastSimTracking") <<
"ERROR: SeedingLayers pointer not set for CAHitQuadrupletGenerator";
251 std::vector<BaseTrackerRecHit const *> fHits{hits[0]};
252 std::vector<BaseTrackerRecHit const *> sHits{hits[1]};
253 std::vector<BaseTrackerRecHit const *> tHits{hits[2]};
254 std::vector<BaseTrackerRecHit const *> frHits{hits[3]};
261 pairCandidate =
ls.slice(
p,
p+2);
262 if(
p==0 && hitPair[0] == pairCandidate[0].
name() && hitPair[1] == pairCandidate[1].
name())
263 pairCandidate1=pairCandidate;
264 if(
p==1 && hitPair[1] == pairCandidate[0].
name() && hitPair[2] == pairCandidate[1].
name())
265 pairCandidate2=pairCandidate;
266 if(
p==2 && hitPair[2] == pairCandidate[0].
name() && hitPair[3] == pairCandidate[1].
name())
267 pairCandidate3=pairCandidate;
272 auto& layerCache =
filler.layerHitMapCache();
289 std::vector<OrderedHitSeeds> quadrupletresult;
291 for(
auto& ntuplet : quadrupletresult)
294 return !quadrupletresult.empty();
309 name =
"BPix"+std::to_string(idLayer);
314 name =
"FPix"+std::to_string(idLayer)+
"_neg";
316 name =
"FPix"+std::to_string(idLayer)+
"_pos";
T getParameter(std::string const &) const
bool pass(const std::vector< const FastTrackerRecHit * > &hits) const
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
std::unique_ptr< CAHitQuadrupletGenerator > CAHitQuadGenerator_
const edm::EventSetup * eventSetup_
GlobalPoint const & origin() const
def create(alignables, pedeDump, additionalData, outputFile, config)
std::unique_ptr< SeedingLayerSetsHits > seedingLayer
unsigned int pxfDisk(const DetId &id) const
bool exists(std::string const ¶meterName) const
checks if a parameter exists
SeedFinderSelector(const edm::ParameterSet &cfg, edm::ConsumesCollector &&consumesCollector)
std::unique_ptr< HitTripletGeneratorFromPairAndLayers > pixelTripletGenerator_
std::string Layer_name(const FastTrackerRecHit *hit) const
const GeomDet * det() const
std::vector< unsigned > layerPairs_
const TrackingRegion * trackingRegion_
const DetLayer * detLayer(const DetId &id) const
obsolete method. Use idToLayer() instead.
DetId geographicalId() const
The label of this GeomDet.
HitDoublets doublets(const TrackingRegion ®, const edm::Event &ev, const edm::EventSetup &es, Layers layers)
edm::ESHandle< TrackerTopology > trackerTopology
unsigned int pxbLayer(const DetId &id) const
void initEvent(const edm::Event &ev, const edm::EventSetup &es)
std::unique_ptr< SeedingLayerSetsBuilder > seedingLayers_
const MeasurementTracker * measurementTracker_
unsigned int pxfSide(const DetId &id) const
const GeometricSearchTracker * geometricSearchTracker() const
const std::string measurementTrackerLabel_
T const * product() const
std::unique_ptr< CAHitTripletGenerator > CAHitTriplGenerator_
T get(const Candidate &c)
std::unique_ptr< MultiHitGeneratorFromPairAndLayers > multiHitGenerator_