238 LogDebug(
"DataMixingTrackingParticleWorker") <<
"\n===============> adding pileups from event "<<ep->
id()<<
" for bunchcrossing "<<bcr;
243 std::shared_ptr<Wrapper<std::vector<TrackingVertex> >
const> inputVPTR =
248 const std::vector<TrackingVertex> *vtxs =
const_cast< std::vector<TrackingVertex> *
>(inputVPTR->product());
252 for (std::vector<TrackingVertex>::const_iterator vtx = vtxs->begin(); vtx != vtxs->end(); ++vtx) {
258 std::shared_ptr<Wrapper<std::vector<TrackingParticle> >
const> inputPTR =
263 const std::vector<TrackingParticle> *
tracks =
const_cast< std::vector<TrackingParticle> *
>(inputPTR->product());
266 for (std::vector<TrackingParticle>::const_iterator track = tracks->begin(); track != tracks->end(); ++track) {
267 auto oldRef=track->parentVertex();
273 Ntrack.setParentVertex( newRef );
274 Ntrack.clearDecayVertices();
278 for(
auto const& vertexRef : track->decayVertices() ) {
280 Ntrack.addDecayVertex(newRef);
291 sourceTrackIndices.reserve(vertex.sourceTracks().size());
292 daughterTrackIndices.reserve(vertex.daughterTracks().size());
293 for(
auto const& ref: vertex.sourceTracks()) sourceTrackIndices.push_back(ref.index());
294 for(
auto const& ref: vertex.daughterTracks()) daughterTrackIndices.push_back(ref.index());
296 vertex.clearParentTracks();
297 vertex.clearDaughterTracks();
299 for(
auto index : sourceTrackIndices ) {
301 vertex.addParentTrack(newRef);
305 for(
auto index : daughterTrackIndices ) {
307 vertex.addDaughterTrack(newRef);
310 sourceTrackIndices.clear();
311 daughterTrackIndices.clear();
316 std::shared_ptr<Wrapper<edm::DetSetVector<StripDigiSimLink> >
const> inputStripPtr =
322 std::shared_ptr<Wrapper<edm::DetSetVector<PixelDigiSimLink> >
const> inputPixelPtr =
328 std::shared_ptr<Wrapper<edm::DetSetVector<StripDigiSimLink> >
const> CSCinputStripPtr =
330 if(CSCinputStripPtr) {
334 std::shared_ptr<Wrapper<edm::DetSetVector<StripDigiSimLink> >
const> CSCinputWirePtr =
336 if(CSCinputWirePtr) {
340 std::shared_ptr<Wrapper<edm::DetSetVector<RPCDigiSimLink> >
const> inputRPCPtr =
346 std::shared_ptr<Wrapper< DTDigiSimLinkCollection >
const> inputDTPtr =
351 const DTLayerId& layerid = (*detUnit).first;
std::unique_ptr< edm::DetSetVector< PixelDigiSimLink > > NewPixelLinkList_
std::unique_ptr< edm::DetSetVector< StripDigiSimLink > > NewStripLinkList_
EventID const & id() const
edm::InputTag RPCLinkPileInputTag_
std::unique_ptr< edm::DetSetVector< RPCDigiSimLink > > NewRPCLinkList_
std::vector< TrackingVertex > TempVertexList_
std::unique_ptr< edm::DetSetVector< StripDigiSimLink > > NewCSCStripLinkList_
edm::InputTag TrackingParticlePileInputTag_
edm::InputTag DTLinkPileInputTag_
edm::InputTag CSCStripLinkPileInputTag_
edm::Ref< TrackingVertexCollection > TrackingVertexRef
edm::InputTag StripLinkPileInputTag_
edm::InputTag PixelLinkPileInputTag_
std::unique_ptr< MuonDigiCollection< DTLayerId, DTDigiSimLink > > NewDTLinkList_
std::auto_ptr< std::vector< TrackingParticle > > NewTrackList_
std::pair< const_iterator, const_iterator > Range
edm::InputTag CSCWireLinkPileInputTag_
DigiRangeIterator end() const
TrackingParticleRefProd TrackListRef_
edm::Ref< TrackingParticleCollection > TrackingParticleRef
TrackingVertexRefProd VertexListRef_
DigiRangeIterator begin() const
std::unique_ptr< edm::DetSetVector< StripDigiSimLink > > NewCSCWireLinkList_