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 GlobalPoint aPV(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());
114 for (reco::VertexCollection::const_iterator iv=vertices->begin(); iv!= vertices->end(); ++iv) {
115 GlobalPoint aPV(iv->position().x(),iv->position().y(),iv->position().z());
116 double distR2 =
sqr(
vtx.x()-aPV.x()) +
sqr(
vtx.y()-aPV.y());
117 double distZ = fabs(
vtx.z()-aPV.z());
124 if (!keepTrack)
continue;
128 if (seedFromProtoTrack.isValid()) (*result).push_back( seedFromProtoTrack.trajectorySeed() );
132 std::vector<Hit>
hits;
133 for (
unsigned int iHit = 0, nHits = proto.
recHitsSize(); iHit < nHits; ++iHit) {
135 if(refHit->isValid()) hits.push_back((
Hit)&(*refHit));
139 if (hits.size() > 1) {
145 seedCreator.init(region, es,
nullptr);
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 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