13 : signalTracksTag(conf.getParameter<
edm::
InputTag>(
"signalTracks")),
14 pileUpTracksTag(conf.getParameter<
edm::
InputTag>(
"pileUpTracks")),
28 newTracks_ = std::make_unique<reco::TrackCollection>();
29 newHits_ = std::make_unique<TrackingRecHitCollection>();
45 if (
e.bunchCrossing() == 0) {
63 e.getByLabel(
label, trackExtras);
67 <<
"Failed to find track collections with inputTag " <<
label << std::endl;
69 if (!
hits.isValid()) {
71 <<
"Failed to find hit collections with inputTag " <<
label << std::endl;
75 <<
"Failed to find trackExtra collections with inputTag " <<
label << std::endl;
78 for (
size_t t = 0;
t <
tracks->size(); ++
t) {
82 auto const& extra = trackExtras->at(
track.extra().key());
84 extra.outerMomentum(),
86 extra.innerPosition(),
87 extra.innerMomentum(),
89 extra.outerStateCovariance(),
91 extra.innerStateCovariance(),
93 extra.seedDirection(),
104 auto const firstTrackIndex =
newHits_->size();
105 for (
unsigned int i = 0;
i < extra.recHitsSize();
i++) {
108 newExtra.setHits(
rNewHits, firstTrackIndex,
newHits_->size() - firstTrackIndex);
109 newExtra.setTrajParams(extra.trajParams(), extra.chi2sX5());
110 assert(newExtra.recHitsSize() == newExtra.trajParams().size());
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
void accumulateEvent(const T &e, edm::EventSetup const &c, const edm::InputTag &label)
ProductRegistryHelper::BranchAliasSetterT< ProductType > produces()
std::vector< Track > TrackCollection
collection of Tracks
void initializeEvent(edm::Event const &e, edm::EventSetup const &c) override
void accumulate(edm::Event const &e, edm::EventSetup const &c) override
std::unique_ptr< reco::TrackCollection > newTracks_
TrackingRecHitRefProd rNewHits
std::unique_ptr< reco::TrackExtraCollection > newTrackExtras_
reco::TrackRefProd rNewTracks
std::vector< TrackExtra > TrackExtraCollection
collection of TrackExtra objects
std::unique_ptr< TrackingRecHitCollection > newHits_
void finalizeEvent(edm::Event &e, edm::EventSetup const &c) override
#define DEFINE_DIGI_ACCUMULATOR(type)
~RecoTrackAccumulator() override
edm::InputTag signalTracksTag
edm::InputTag pileUpTracksTag
RecoTrackAccumulator(const edm::ParameterSet &conf, edm::ProducesCollector, edm::ConsumesCollector &iC)
reco::TrackExtraRefProd rNewTrackExtras