35 bool operator()(
const Hit& h1,
const Hit& h2) {
return h1->globalPosition().perp2() < h2->globalPosition().perp2(); }
42 desc.
add<
double>(
"originHalfLength", 1E9);
43 desc.
add<
double>(
"originRadius", 1E9);
44 desc.
add<
bool>(
"useProtoTrackKinematics",
false);
45 desc.
add<
bool>(
"useEventsWithNoVertex",
true);
46 desc.
add<
std::string>(
"TTRHBuilder",
"TTRHBuilderWithoutAngle4PixelTriplets");
47 desc.
add<
bool>(
"usePV",
false);
48 desc.
add<
bool>(
"includeFourthHit",
false);
53 psd0.add<
double>(
"SeedMomentumForBOFF", 5.0);
54 psd0.add<
double>(
"OriginTransverseErrorMultiplier", 1.0);
55 psd0.add<
double>(
"MinOneOverPtError", 1.0);
58 psd0.add<
bool>(
"forceKinematicWithRegionDirection",
false);
61 descriptions.
add(
"SeedGeneratorFromProtoTracksEDProducer", desc);
69 usePV_(cfg.getParameter<bool>(
"usePV")),
70 includeFourthHit_(cfg.getParameter<bool>(
"includeFourthHit")),
72 theInputVertexCollectionTag(
74 seedCreator_(cfg.getParameter<edm::
ParameterSet>(
"SeedCreatorPSet"), consumesCollector()),
75 config_(consumesCollector()) {
76 produces<TrajectorySeedCollection>();
80 auto result = std::make_unique<TrajectorySeedCollection>();
93 for (TrackCollection::const_iterator it = protos.begin(); it != protos.end(); ++it) {
94 const Track& proto = (*it);
98 bool keepTrack =
false;
99 if ((!foundVertices) || vertices->empty()) {
104 vertices->begin()->position().x(), vertices->begin()->position().y(), vertices->begin()->position().z());
105 double distR2 =
sqr(vtx.x() - aPV.x()) +
sqr(vtx.y() - aPV.y());
106 double distZ = fabs(vtx.z() - aPV.z());
111 for (reco::VertexCollection::const_iterator
iv = vertices->begin();
iv != vertices->end(); ++
iv) {
113 double distR2 =
sqr(vtx.x() - aPV.x()) +
sqr(vtx.y() - aPV.y());
114 double distZ = fabs(vtx.z() - aPV.z());
126 if (seedFromProtoTrack.
isValid())
129 std::vector<Hit> hits;
132 if (refHit->isValid())
133 hits.push_back((
Hit) & (*refHit));
137 if (hits.size() > 1) {
const SeedFromProtoTrack::Config config_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
SeedGeneratorFromProtoTracksEDProducer(const edm::ParameterSet &cfg)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
tuple useEventsWithNoVertex
SeedFromConsecutiveHitsCreator seedCreator_
size_t recHitsSize() const
Get number of RecHits. (Warning, this includes invalid hits, which are not physical hits)...
std::vector< Track > TrackCollection
collection of Tracks
std::vector< Vertex > VertexCollection
collection of Vertex objects
const Vector & momentum() const
track momentum vector
const bool useProtoTrackKinematics
const edm::EDGetTokenT< reco::TrackCollection > theInputCollectionTag
TrajectorySeed trajectorySeed() const
const Point & vertex() const
reference point on the track. This method is DEPRECATED, please use referencePoint() instead ...
bool operator()(const Hit &h1, const Hit &h2)
BaseTrackerRecHit const * ConstRecHitPointer
static ConstRecHitPointer nullPtr()
const bool includeFourthHit_
const double originRadius
ParameterDescriptionBase * add(U const &iLabel, T const &value)
const edm::EDGetTokenT< reco::VertexCollection > theInputVertexCollectionTag
SeedingHitSet::ConstRecHitPointer Hit
const double originHalfLength
void produce(edm::Event &ev, const edm::EventSetup &es) override
void add(std::string const &label, ParameterSetDescription const &psetDescription)
caConstants::TupleMultiplicity const CAHitNtupletGeneratorKernelsGPU::HitToTuple const cms::cuda::AtomicPairCounter GPUCACell const *__restrict__ uint32_t const *__restrict__ gpuPixelDoublets::CellNeighborsVector const gpuPixelDoublets::CellTracksVector const GPUCACell::OuterHitOfCell const int32_t nHits
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const bool useEventsWithNoVertex
TrackingRecHitRef recHit(size_t i) const
Get i-th hit on the track.
tuple useProtoTrackKinematics