248 LogDebug(
"DataMixingTrackingParticleWorker") <<
"\n===============> adding pileups from event "<<ep->
id()<<
" for bunchcrossing "<<bcr;
253 std::shared_ptr<Wrapper<std::vector<TrackingVertex> >
const> inputVPTR =
258 const std::vector<TrackingVertex> *vtxs =
const_cast< std::vector<TrackingVertex> *
>(inputVPTR->product());
262 for (std::vector<TrackingVertex>::const_iterator vtx = vtxs->begin(); vtx != vtxs->end(); ++vtx) {
268 std::shared_ptr<Wrapper<std::vector<TrackingParticle> >
const> inputPTR =
273 const std::vector<TrackingParticle> *
tracks =
const_cast< std::vector<TrackingParticle> *
>(inputPTR->product());
276 for (std::vector<TrackingParticle>::const_iterator
track = tracks->begin();
track != tracks->end(); ++
track) {
277 auto oldRef=
track->parentVertex();
283 Ntrack.setParentVertex( newRef );
284 Ntrack.clearDecayVertices();
288 for(
auto const& vertexRef :
track->decayVertices() ) {
290 Ntrack.addDecayVertex(newRef);
299 for(
size_t iVertex = StartingIndexV; iVertex !=
TempVertexList_.size(); ++iVertex) {
303 sourceTrackIndices.reserve(vertex.sourceTracks().size());
304 daughterTrackIndices.reserve(vertex.daughterTracks().size());
305 for(
auto const& ref: vertex.sourceTracks()) sourceTrackIndices.push_back(ref.index());
306 for(
auto const& ref: vertex.daughterTracks()) daughterTrackIndices.push_back(ref.index());
308 vertex.clearParentTracks();
309 vertex.clearDaughterTracks();
311 for(
auto index : sourceTrackIndices ) {
313 vertex.addParentTrack(newRef);
317 for(
auto index : daughterTrackIndices ) {
319 vertex.addDaughterTrack(newRef);
322 sourceTrackIndices.clear();
323 daughterTrackIndices.clear();
328 std::shared_ptr<Wrapper<edm::DetSetVector<StripDigiSimLink> >
const> inputStripPtr =
334 std::shared_ptr<Wrapper<edm::DetSetVector<PixelDigiSimLink> >
const> inputPixelPtr =
340 std::shared_ptr<Wrapper<edm::DetSetVector<StripDigiSimLink> >
const> CSCinputStripPtr =
342 if(CSCinputStripPtr) {
346 std::shared_ptr<Wrapper<edm::DetSetVector<StripDigiSimLink> >
const> CSCinputWirePtr =
348 if(CSCinputWirePtr) {
352 std::shared_ptr<Wrapper<edm::DetSetVector<RPCDigiSimLink> >
const> inputRPCPtr =
358 std::shared_ptr<Wrapper< DTDigiSimLinkCollection >
const> inputDTPtr =
363 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_
std::unique_ptr< std::vector< TrackingParticle > > NewTrackList_
edm::Ref< TrackingVertexCollection > TrackingVertexRef
edm::InputTag StripLinkPileInputTag_
edm::InputTag PixelLinkPileInputTag_
std::unique_ptr< MuonDigiCollection< DTLayerId, DTDigiSimLink > > NewDTLinkList_
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_