82 auto result = std::make_unique<TrajectorySeedCollection>();
95 for (TrackCollection::const_iterator it = protos.begin(); it != protos.end(); ++it) {
96 const Track& proto = (*it);
100 bool keepTrack =
false;
101 if ((!foundVertices) || vertices->empty()) {
106 vertices->begin()->position().x(), vertices->begin()->position().y(), vertices->begin()->position().z());
107 double distR2 =
sqr(
vtx.x() - aPV.x()) +
sqr(
vtx.y() - aPV.y());
108 double distZ = fabs(
vtx.z() - aPV.z());
113 for (reco::VertexCollection::const_iterator iv = vertices->begin(); iv != vertices->end(); ++iv) {
114 GlobalPoint aPV(iv->position().x(), iv->position().y(), iv->position().z());
115 double distR2 =
sqr(
vtx.x() - aPV.x()) +
sqr(
vtx.y() - aPV.y());
116 double distZ = fabs(
vtx.z() - aPV.z());
128 if (seedFromProtoTrack.isValid())
129 (*result).push_back(seedFromProtoTrack.trajectorySeed());
133 std::vector<Hit>
hits;
134 for (
unsigned int iHit = 0, nHits = proto.
recHitsSize(); iHit < nHits; ++iHit) {
136 if (refHit->isValid())
137 hits.push_back((
Hit) & (*refHit));
141 if (hits.size() > 1) {
148 seedCreator.init(
region, es,
nullptr);
149 seedCreator.makeSeed(
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
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
const std::string builderName
const Vector & momentum() const
track momentum vector
const bool useProtoTrackKinematics
const edm::EDGetTokenT< reco::TrackCollection > theInputCollectionTag
const Point & vertex() const
reference point on the track. This method is DEPRECATED, please use referencePoint() instead ...
static ConstRecHitPointer nullPtr()
const bool includeFourthHit_
const double originRadius
const edm::EDGetTokenT< reco::VertexCollection > theInputVertexCollectionTag
const double originHalfLength
const bool useEventsWithNoVertex
TrackingRecHitRef recHit(size_t i) const
Get i-th hit on the track.
const edm::ParameterSet theConfig
SeedFromConsecutiveHitsCreator