72 virtual void endJob()
override;
90 : m_src(iConfig.getParameter<edm::
InputTag>(
"src"))
92 produces<std::vector<Trajectory> >();
93 produces<TrajTrackAssociationCollection>();
127 std::auto_ptr<std::vector<Trajectory> > trajectoryCollection(
new std::vector<Trajectory>);
134 for (reco::TrackCollection::const_iterator track = tracks->begin(); track != tracks->end(); ++track) {
140 std::vector<TrajectoryMeasurement::ConstRecHitPointer> transHits;
141 std::vector<TrajectoryStateOnSurface> TSOSes;
144 DetId id = (*hit)->geographicalId();
146 const Surface &layerSurface = cscGeometry->idToDet(
id)->surface();
160 transHits.push_back(hitPtr);
161 TSOSes.push_back(
TrajectoryStateOnSurface(localTrajectoryParameters, localTrajectoryError, layerSurface, &*magneticField));
165 assert(clonedHits.
size() == transHits.size());
166 assert(transHits.size() == TSOSes.size());
169 if (clonedHits.
size() > 0) {
175 std::vector<TrajectoryMeasurement::ConstRecHitPointer>::const_iterator transHitPtr = transHits.begin();
176 std::vector<TrajectoryStateOnSurface>::const_iterator
TSOS = TSOSes.begin();
177 for (; clonedHit != clonedHits.
end(); ++clonedHit, ++transHitPtr, ++
TSOS) {
181 trajectoryCollection->push_back(trajectory);
185 reference_map[trajCounter] = trackCounter;
190 unsigned int numTrajectories = trajectoryCollection->size();
198 for (trajCounter = 0; trajCounter < numTrajectories; trajCounter++) {
204 iEvent.
put(trajTrackMap);
RecHitPointer build(const TrackingRecHit *p, edm::ESHandle< GlobalTrackingGeometry > trackingGeometry) const
Call the MuonTransientTrackingRecHit::specificBuild.
#define DEFINE_FWK_MODULE(type)
virtual void endJob() override
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
TrackingRecHit::ConstRecHitPointer ConstRecHitPointer
edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::TrackCollection, unsigned short > > TrajTrackAssociationCollection
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
CSCOverlapsTrackPreparation(const edm::ParameterSet &)
virtual void beginJob() override
TrajectoryStateOnSurface TSOS
ROOT::Math::SVector< double, 5 > AlgebraicVector5
~CSCOverlapsTrackPreparation()
void push(const TrajectoryMeasurement &tm)
virtual void produce(edm::Event &, const edm::EventSetup &) override
boost::remove_cv< typename boost::remove_reference< argument_type >::type >::type key_type
TrackingRecHitCollection::base::const_iterator trackingRecHit_iterator
iterator over a vector of reference to TrackingRecHit in the same collection