10 signalTracksTag(conf.getParameter<edm::
InputTag>(
"signalTracks")),
11 pileUpTracksTag(conf.getParameter<edm::
InputTag>(
"pileUpTracks")),
12 outputLabel(conf.getParameter<std::
string>(
"outputLabel"))
62 if(!(e.getByLabel(label, tracks) and e.getByLabel(label, hits) and e.getByLabel(label, trackExtras))){
63 edm::LogError (
"RecoTrackAccumulator") <<
"Failed to find track, hit or trackExtra collections with inputTag " <<
label;
66 if (tracks->size()==0)
70 for (
size_t t = 0;
t < tracks->size();++
t){
74 auto const& extra = trackExtras->at(track.
extra().
key());
75 newTrackExtras_->emplace_back(extra.outerPosition(), extra.outerMomentum(), extra.outerOk(),
76 extra.innerPosition(),extra.innerMomentum(), extra.innerOk(),
77 extra.outerStateCovariance(), extra.outerDetId(),
78 extra.innerStateCovariance(), extra.innerDetId(),
79 extra.seedDirection(),
90 auto const firstTrackIndex =
newHits_->size();
91 for(
unsigned int i = 0;
i<extra.recHitsSize();
i++){
92 newHits_->push_back( (*hits)[extra.recHit(
i).key()] );
94 newExtra.setHits(
rNewHits, firstTrackIndex,
newHits_->size() - firstTrackIndex);
int bunchCrossing() const
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
void accumulateEvent(const T &e, edm::EventSetup const &c, const edm::InputTag &label)
const TrackExtraRef & extra() const
reference to "extra" object
std::vector< Track > TrackCollection
collection of Tracks
virtual ~RecoTrackAccumulator()
key_type key() const
Accessor for product key.
RecoTrackAccumulator(const edm::ParameterSet &conf, edm::one::EDProducerBase &mixMod, edm::ConsumesCollector &iC)
virtual void accumulate(edm::Event const &e, edm::EventSetup const &c)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
TrackingRecHitRefProd rNewHits
reco::TrackRefProd rNewTracks
std::vector< TrackExtra > TrackExtraCollection
collection of TrackExtra objects
edm::OwnVector< TrackingRecHit > TrackingRecHitCollection
collection of TrackingRecHits
std::auto_ptr< reco::TrackExtraCollection > newTrackExtras_
virtual void finalizeEvent(edm::Event &e, edm::EventSetup const &c)
virtual void initializeEvent(edm::Event const &e, edm::EventSetup const &c)
std::auto_ptr< TrackingRecHitCollection > newHits_
std::auto_ptr< reco::TrackCollection > newTracks_
edm::InputTag signalTracksTag
edm::InputTag pileUpTracksTag
reco::TrackExtraRefProd rNewTrackExtras