28 template <
class T> T
sqr( T
t) {
return t*
t;}
31 struct HitLessByRadius {
bool operator() (
const Hit& h1,
const Hit & h2) {
return h1->globalPosition().perp2() < h2->globalPosition().perp2(); } };
34 : theConfig(cfg), theInputCollectionTag(cfg.getParameter<
InputTag>(
"InputCollection"))
36 produces<TrajectorySeedCollection>();
47 for (TrackCollection::const_iterator it=protos.begin(); it!= protos.end(); ++it) {
48 const Track & proto = (*it);
57 std::vector<Hit> hits;
58 for (
unsigned int iHit = 0, nHits = proto.
recHitsSize(); iHit < nHits; ++iHit) {
60 if(refHit->isValid()) hits.push_back(ttrhbESH->build( &(*refHit) ));
63 if (hits.size() >= 2) {
T getParameter(std::string const &) const
SeedGeneratorFromProtoTracksEDProducer(const edm::ParameterSet &cfg)
const Vector & momentum() const
track momentum vector
size_t recHitsSize() const
Get number of RecHits. (Warning, this includes invalid hits, which are not physical hits)...
virtual void produce(edm::Event &ev, const edm::EventSetup &es)
std::vector< Track > TrackCollection
collection of Tracks
edm::ParameterSet theConfig
tuple SeedFromConsecutiveHitsCreator
edm::InputTag theInputCollectionTag
TrajectorySeed trajectorySeed() const
std::vector< TrajectorySeed > TrajectorySeedCollection
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
const Point & vertex() const
reference point on the track. This method is DEPRECATED, please use referencePoint() instead ...
T const * product() const
Square< F >::type sqr(const F &f)
TrackingRecHitRef recHit(size_t i) const
Get i-th hit on the track.
TransientTrackingRecHit::ConstRecHitPointer Hit