97 : m_src(iConfig.getParameter<
edm::
InputTag>(
"src")),
102 produces<std::vector<Trajectory>>();
103 produces<TrajTrackAssociationCollection>();
112 descriptions.
add(
"cscOverlapsTrackPreparation",
desc);
126 auto trajectoryCollection = std::make_unique<std::vector<Trajectory>>();
139 std::vector<TrajectoryMeasurement::ConstRecHitPointer> transHits;
140 std::vector<TrajectoryStateOnSurface> TSOSes;
142 for (
auto const&
hit :
track->recHits()) {
159 transHits.push_back(hitPtr);
165 assert(clonedHits.
size() == transHits.size());
166 assert(transHits.size() == TSOSes.size());
169 if (!clonedHits.
empty()) {
176 std::vector<TrajectoryMeasurement::ConstRecHitPointer>::const_iterator transHitPtr = transHits.begin();
177 std::vector<TrajectoryStateOnSurface>::const_iterator
TSOS = TSOSes.begin();
178 for (; clonedHit != clonedHits.
end(); ++clonedHit, ++transHitPtr, ++
TSOS) {
182 trajectoryCollection->push_back(trajectory);
186 reference_map[trajCounter] = trackCounter;
191 unsigned int numTrajectories = trajectoryCollection->size();
197 auto trajTrackMap = std::make_unique<TrajTrackAssociationCollection>();
199 for (trajCounter = 0; trajCounter < numTrajectories; trajCounter++) {
202 trajTrackMap->insert(
edm::Ref<std::vector<Trajectory>>(ohTrajs, trajCounter),
std::remove_cv< typename std::remove_reference< argument_type >::type >::type key_type
std::vector< Track > TrackCollection
collection of Tracks
const edm::ESGetToken< CSCGeometry, MuonGeometryRecord > cscGeomToken_
RecHitPointer build(const TrackingRecHit *p, edm::ESHandle< GlobalTrackingGeometry > trackingGeometry) const
Call the MuonTransientTrackingRecHit::specificBuild.
ROOT::Math::SVector< double, 5 > AlgebraicVector5
#define DEFINE_FWK_MODULE(type)
bool getData(T &iHolder) const
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magneticFieldToken_
CSCOverlapsTrackPreparation(const edm::ParameterSet &)
TrajectoryStateOnSurface TSOS
const Plane & surface() const
The nominal surface of the GeomDet.
auto const & tracks
cannot be loose
void add(std::string const &label, ParameterSetDescription const &psetDescription)
TrackingRecHit::ConstRecHitPointer ConstRecHitPointer
const edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord > globalGeomToken_
const edm::InputTag m_src
const edm::EDGetTokenT< reco::TrackCollection > trackToken_
void push(const TrajectoryMeasurement &tm)
void produce(edm::Event &, const edm::EventSetup &) override
~CSCOverlapsTrackPreparation() override=default
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const GeomDet * idToDet(DetId) const override