CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
edm::DataMixingTrackingParticleWorker Class Reference

#include <DataMixingTrackingParticleWorker.h>

Public Member Functions

void addTrackingParticlePileups (const int bcr, const edm::EventPrincipal *, unsigned int EventId, ModuleCallingContext const *)
 
void addTrackingParticleSignals (const edm::Event &e)
 
 DataMixingTrackingParticleWorker ()
 
 DataMixingTrackingParticleWorker (const edm::ParameterSet &ps, edm::ConsumesCollector &&iC)
 
virtual void initializeEvent (edm::Event const &e, edm::EventSetup const &c)
 
void putTrackingParticle (edm::Event &e)
 
virtual ~DataMixingTrackingParticleWorker ()
 

Private Attributes

std::string CSCStripLinkCollectionDM_
 
edm::InputTag CSCStripLinkPileInputTag_
 
edm::EDGetTokenT< edm::DetSetVector< StripDigiSimLink > > CSCStripLinkPileToken_
 
edm::EDGetTokenT< edm::DetSetVector< StripDigiSimLink > > CSCStripLinkSigToken_
 
std::string CSCWireLinkCollectionDM_
 
edm::InputTag CSCWireLinkPileInputTag_
 
edm::EDGetTokenT< edm::DetSetVector< StripDigiSimLink > > CSCWireLinkPileToken_
 
edm::EDGetTokenT< edm::DetSetVector< StripDigiSimLink > > CSCWireLinkSigToken_
 
std::string DTLinkCollectionDM_
 
edm::InputTag DTLinkPileInputTag_
 
edm::EDGetTokenT< MuonDigiCollection< DTLayerId, DTDigiSimLink > > DTLinkPileToken_
 
edm::EDGetTokenT< MuonDigiCollection< DTLayerId, DTDigiSimLink > > DTLinkSigToken_
 
std::unique_ptr< edm::DetSetVector< StripDigiSimLink > > NewCSCStripLinkList_
 
std::unique_ptr< edm::DetSetVector< StripDigiSimLink > > NewCSCWireLinkList_
 
std::unique_ptr< MuonDigiCollection< DTLayerId, DTDigiSimLink > > NewDTLinkList_
 
std::unique_ptr< edm::DetSetVector< PixelDigiSimLink > > NewPixelLinkList_
 
std::unique_ptr< edm::DetSetVector< RPCDigiSimLink > > NewRPCLinkList_
 
std::unique_ptr< edm::DetSetVector< StripDigiSimLink > > NewStripLinkList_
 
std::unique_ptr< std::vector< TrackingParticle > > NewTrackList_
 
std::unique_ptr< std::vector< TrackingVertex > > NewVertexList_
 
std::string PixelLinkCollectionDM_
 
edm::InputTag PixelLinkPileInputTag_
 
edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > PixelLinkPileToken_
 
edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > PixelLinkSigToken_
 
std::string RPCLinkCollectionDM_
 
edm::InputTag RPCLinkPileInputTag_
 
edm::EDGetTokenT< edm::DetSetVector< RPCDigiSimLink > > RPCLinkPileToken_
 
edm::EDGetTokenT< edm::DetSetVector< RPCDigiSimLink > > RPCLinkSigToken_
 
std::string StripLinkCollectionDM_
 
edm::InputTag StripLinkPileInputTag_
 
edm::EDGetTokenT< edm::DetSetVector< StripDigiSimLink > > StripLinkPileToken_
 
edm::EDGetTokenT< edm::DetSetVector< StripDigiSimLink > > StripLinkSigToken_
 
std::vector< TrackingVertexTempVertexList_
 
std::string TrackingParticleCollectionDM_
 
edm::InputTag TrackingParticlecollectionSig_
 
edm::InputTag TrackingParticleLabelSig_
 
edm::InputTag TrackingParticlePileInputTag_
 
TrackingParticleRefProd TrackListRef_
 
edm::EDGetTokenT< std::vector< TrackingParticle > > TrackPileToken_
 
edm::EDGetTokenT< std::vector< TrackingParticle > > TrackSigToken_
 
TrackingVertexRefProd VertexListRef_
 
edm::EDGetTokenT< std::vector< TrackingVertex > > VtxPileToken_
 
edm::EDGetTokenT< std::vector< TrackingVertex > > VtxSigToken_
 

Detailed Description

Definition at line 44 of file DataMixingTrackingParticleWorker.h.

Constructor & Destructor Documentation

DataMixingTrackingParticleWorker::DataMixingTrackingParticleWorker ( )

Definition at line 38 of file DataMixingTrackingParticleWorker.cc.

38 { }
DataMixingTrackingParticleWorker::DataMixingTrackingParticleWorker ( const edm::ParameterSet ps,
edm::ConsumesCollector &&  iC 
)
explicit

standard constructor

Definition at line 41 of file DataMixingTrackingParticleWorker.cc.

References edm::ParameterSet::getParameter(), and AlCaHLTBitMon_QueryRunRegistry::string.

42  {
43 
44  // get the subdetector names
45  // this->getSubdetectorNames(); //something like this may be useful to check what we are supposed to do...
46 
47  // declare the products to produce
48 
49  TrackingParticleLabelSig_ = ps.getParameter<edm::InputTag>("TrackingParticleLabelSig");
50 
51  TrackingParticlePileInputTag_ = ps.getParameter<edm::InputTag>("TrackingParticlePileInputTag");
52 
53  TrackingParticleCollectionDM_ = ps.getParameter<std::string>("TrackingParticleCollectionDM");
54 
55  TrackSigToken_ = iC.consumes<std::vector<TrackingParticle> >(TrackingParticleLabelSig_);
56  TrackPileToken_ = iC.consumes<std::vector<TrackingParticle> >(TrackingParticlePileInputTag_);
57 
58  VtxSigToken_ = iC.consumes<std::vector<TrackingVertex> >(TrackingParticleLabelSig_);
59  VtxPileToken_ = iC.consumes<std::vector<TrackingVertex> >(TrackingParticlePileInputTag_);
60 
61  // Pixel and Strip DigiSimlinks
62 
63  StripLinkPileInputTag_ = ps.getParameter<edm::InputTag>("StripDigiSimLinkPileInputTag");
64  PixelLinkPileInputTag_ = ps.getParameter<edm::InputTag>("PixelDigiSimLinkPileInputTag");
65  StripLinkCollectionDM_ = ps.getParameter<std::string>("StripDigiSimLinkCollectionDM");
66  PixelLinkCollectionDM_ = ps.getParameter<std::string>("PixelDigiSimLinkCollectionDM");
67 
72 
73  // Muon DigiSimLinks
74 
75  DTLinkPileInputTag_ = ps.getParameter<edm::InputTag>("DTDigiSimLinkPileInputTag");
76  RPCLinkPileInputTag_ = ps.getParameter<edm::InputTag>("RPCDigiSimLinkPileInputTag");
77  CSCWireLinkPileInputTag_ = ps.getParameter<edm::InputTag>("CSCWireDigiSimLinkPileInputTag");
78  CSCStripLinkPileInputTag_ = ps.getParameter<edm::InputTag>("CSCStripDigiSimLinkPileInputTag");
79 
80  DTLinkCollectionDM_ = ps.getParameter<std::string>("DTDigiSimLinkDM");
81  RPCLinkCollectionDM_ = ps.getParameter<std::string>("RPCDigiSimLinkDM");
82  CSCWireLinkCollectionDM_ = ps.getParameter<std::string>("CSCWireDigiSimLinkDM");
83  CSCStripLinkCollectionDM_ = ps.getParameter<std::string>("CSCStripDigiSimLinkDM");
84 
93 
94  }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
edm::EDGetTokenT< edm::DetSetVector< StripDigiSimLink > > CSCStripLinkSigToken_
edm::EDGetTokenT< edm::DetSetVector< StripDigiSimLink > > CSCWireLinkSigToken_
edm::EDGetTokenT< edm::DetSetVector< RPCDigiSimLink > > RPCLinkPileToken_
edm::EDGetTokenT< edm::DetSetVector< RPCDigiSimLink > > RPCLinkSigToken_
edm::EDGetTokenT< std::vector< TrackingVertex > > VtxSigToken_
edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > PixelLinkSigToken_
edm::EDGetTokenT< edm::DetSetVector< StripDigiSimLink > > StripLinkPileToken_
edm::EDGetTokenT< std::vector< TrackingVertex > > VtxPileToken_
edm::EDGetTokenT< std::vector< TrackingParticle > > TrackPileToken_
edm::EDGetTokenT< std::vector< TrackingParticle > > TrackSigToken_
edm::EDGetTokenT< edm::DetSetVector< StripDigiSimLink > > CSCWireLinkPileToken_
edm::EDGetTokenT< edm::DetSetVector< StripDigiSimLink > > CSCStripLinkPileToken_
edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > PixelLinkPileToken_
edm::EDGetTokenT< MuonDigiCollection< DTLayerId, DTDigiSimLink > > DTLinkPileToken_
edm::EDGetTokenT< edm::DetSetVector< StripDigiSimLink > > StripLinkSigToken_
edm::EDGetTokenT< MuonDigiCollection< DTLayerId, DTDigiSimLink > > DTLinkSigToken_
DataMixingTrackingParticleWorker::~DataMixingTrackingParticleWorker ( )
virtual

Default destructor

Definition at line 98 of file DataMixingTrackingParticleWorker.cc.

98  {
99  }

Member Function Documentation

void DataMixingTrackingParticleWorker::addTrackingParticlePileups ( const int  bcr,
const edm::EventPrincipal ep,
unsigned int  EventId,
ModuleCallingContext const *  mcc 
)

Definition at line 245 of file DataMixingTrackingParticleWorker.cc.

References MuonDigiCollection< IndexType, DigiType >::begin(), MuonDigiCollection< IndexType, DigiType >::end(), edm::EventPrincipal::id(), diffTreeTool::index, LogDebug, HiIsolationCommonParameters_cff::track, l1t::tracks, and badGlobalMuonTaggersAOD_cff::vtx.

Referenced by edm::DataMixingModule::pileWorker().

246  {
247 
248  LogDebug("DataMixingTrackingParticleWorker") <<"\n===============> adding pileups from event "<<ep->id()<<" for bunchcrossing "<<bcr;
249 
250  const size_t StartingIndexV = TempVertexList_.size(); // keep track of offsets
251  const size_t StartingIndexT = NewTrackList_->size(); // keep track of offsets
252 
253  std::shared_ptr<Wrapper<std::vector<TrackingVertex> > const> inputVPTR =
254  getProductByTag<std::vector<TrackingVertex> >(*ep, TrackingParticlePileInputTag_, mcc);
255 
256  if(inputVPTR ) {
257 
258  const std::vector<TrackingVertex> *vtxs = const_cast< std::vector<TrackingVertex> * >(inputVPTR->product());
259 
260  // grab vertices, store copy
261 
262  for (std::vector<TrackingVertex>::const_iterator vtx = vtxs->begin(); vtx != vtxs->end(); ++vtx) {
263  TempVertexList_.push_back(*vtx);
264  }
265  }
266 
267 
268  std::shared_ptr<Wrapper<std::vector<TrackingParticle> > const> inputPTR =
269  getProductByTag<std::vector<TrackingParticle> >(*ep, TrackingParticlePileInputTag_, mcc);
270 
271  if(inputPTR ) {
272 
273  const std::vector<TrackingParticle> *tracks = const_cast< std::vector<TrackingParticle> * >(inputPTR->product());
274 
275  // grab tracks, store copy
276  for (std::vector<TrackingParticle>::const_iterator track = tracks->begin(); track != tracks->end(); ++track) {
277  auto oldRef=track->parentVertex();
278  auto newRef=TrackingVertexRef( VertexListRef_, oldRef.index()+StartingIndexV );
279  NewTrackList_->push_back(*track);
280 
281  auto & Ntrack = NewTrackList_->back(); //modify copy
282 
283  Ntrack.setParentVertex( newRef );
284  Ntrack.clearDecayVertices();
285 
286  // next, loop over daughter vertices, same strategy
287 
288  for( auto const& vertexRef : track->decayVertices() ) {
289  auto newRef=TrackingVertexRef( VertexListRef_, vertexRef.index()+StartingIndexV );
290  Ntrack.addDecayVertex(newRef);
291  }
292  }
293  }
294 
295  // Now that tracks are handled, go back and put correct Refs in vertices
296  // Operate only on the added pileup vertices, and leave the already-existing vertices untouched
297  std::vector<decltype(TrackingParticleRef().index())> sourceTrackIndices;
298  std::vector<decltype(TrackingParticleRef().index())> daughterTrackIndices;
299  for(size_t iVertex = StartingIndexV; iVertex != TempVertexList_.size(); ++iVertex) {
300  auto& vertex = TempVertexList_[iVertex];
301 
302  // Need to copy the indices before clearing the vectors
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());
307 
308  vertex.clearParentTracks();
309  vertex.clearDaughterTracks();
310 
311  for( auto index : sourceTrackIndices ) {
312  auto newRef=TrackingParticleRef( TrackListRef_, index+StartingIndexT );
313  vertex.addParentTrack(newRef);
314  }
315 
316  // next, loop over daughter tracks, same strategy
317  for( auto index : daughterTrackIndices ) {
318  auto newRef=TrackingParticleRef( TrackListRef_, index+StartingIndexT );
319  vertex.addDaughterTrack(newRef);
320  }
321 
322  sourceTrackIndices.clear();
323  daughterTrackIndices.clear();
324  }
325 
326 
327  // Accumulate DigiSimLinks
328  std::shared_ptr<Wrapper<edm::DetSetVector<StripDigiSimLink> > const> inputStripPtr =
329  getProductByTag<edm::DetSetVector<StripDigiSimLink> >(*ep, StripLinkPileInputTag_, mcc);
330  if(inputStripPtr) {
331  appendDetSetVector(*NewStripLinkList_, *(inputStripPtr->product()));
332  }
333 
334  std::shared_ptr<Wrapper<edm::DetSetVector<PixelDigiSimLink> > const> inputPixelPtr =
335  getProductByTag<edm::DetSetVector<PixelDigiSimLink> >(*ep, PixelLinkPileInputTag_, mcc);
336  if(inputPixelPtr) {
337  appendDetSetVector(*NewPixelLinkList_, *(inputPixelPtr->product()));
338  }
339 
340  std::shared_ptr<Wrapper<edm::DetSetVector<StripDigiSimLink> > const> CSCinputStripPtr =
341  getProductByTag<edm::DetSetVector<StripDigiSimLink> >(*ep, CSCStripLinkPileInputTag_, mcc);
342  if(CSCinputStripPtr) {
343  appendDetSetVector(*NewCSCStripLinkList_, *(CSCinputStripPtr->product()));
344  }
345 
346  std::shared_ptr<Wrapper<edm::DetSetVector<StripDigiSimLink> > const> CSCinputWirePtr =
347  getProductByTag<edm::DetSetVector<StripDigiSimLink> >(*ep, CSCWireLinkPileInputTag_, mcc);
348  if(CSCinputWirePtr) {
349  appendDetSetVector(*NewCSCWireLinkList_, *(CSCinputWirePtr->product()));
350  }
351 
352  std::shared_ptr<Wrapper<edm::DetSetVector<RPCDigiSimLink> > const> inputRPCPtr =
353  getProductByTag<edm::DetSetVector<RPCDigiSimLink> >(*ep, RPCLinkPileInputTag_, mcc);
354  if(inputRPCPtr) {
355  appendDetSetVector(*NewRPCLinkList_, *(inputRPCPtr->product()));
356  }
357 
358  std::shared_ptr<Wrapper< DTDigiSimLinkCollection > const> inputDTPtr =
359  getProductByTag< DTDigiSimLinkCollection >(*ep, DTLinkPileInputTag_, mcc);
360  if(inputDTPtr) {
361  const DTDigiSimLinkCollection* DTLinks = const_cast< DTDigiSimLinkCollection * >(inputDTPtr->product());
362  for (DTDigiSimLinkCollection::DigiRangeIterator detUnit=DTLinks->begin(); detUnit !=DTLinks->end(); ++detUnit) {
363  const DTLayerId& layerid = (*detUnit).first;
364  const DTDigiSimLinkCollection::Range& range = (*detUnit).second;
365  NewDTLinkList_->put(range,layerid);
366  }
367  }
368 
369  } // end of addPileups
#define LogDebug(id)
std::unique_ptr< edm::DetSetVector< PixelDigiSimLink > > NewPixelLinkList_
std::unique_ptr< edm::DetSetVector< StripDigiSimLink > > NewStripLinkList_
EventID const & id() const
std::unique_ptr< edm::DetSetVector< RPCDigiSimLink > > NewRPCLinkList_
std::unique_ptr< edm::DetSetVector< StripDigiSimLink > > NewCSCStripLinkList_
std::unique_ptr< std::vector< TrackingParticle > > NewTrackList_
edm::Ref< TrackingVertexCollection > TrackingVertexRef
std::unique_ptr< MuonDigiCollection< DTLayerId, DTDigiSimLink > > NewDTLinkList_
std::pair< const_iterator, const_iterator > Range
DigiRangeIterator end() const
edm::Ref< TrackingParticleCollection > TrackingParticleRef
DigiRangeIterator begin() const
std::unique_ptr< edm::DetSetVector< StripDigiSimLink > > NewCSCWireLinkList_
void DataMixingTrackingParticleWorker::addTrackingParticleSignals ( const edm::Event e)

Definition at line 129 of file DataMixingTrackingParticleWorker.cc.

References MuonDigiCollection< IndexType, DigiType >::begin(), MuonDigiCollection< IndexType, DigiType >::end(), edm::Event::getByToken(), diffTreeTool::index, edm::HandleBase::isValid(), HiIsolationCommonParameters_cff::track, l1t::tracks, and badGlobalMuonTaggersAOD_cff::vtx.

Referenced by edm::DataMixingModule::addSignals().

129  {
130 
131  // grab Vertices, store copy, preserving indices. Easier to loop over vertices first - fewer links
132 
134  e.getByToken(VtxSigToken_, vtxs);
135 
136  const size_t StartingIndexV = TempVertexList_.size(); // should be zero here, but keep for consistency
137  const size_t StartingIndexT = NewTrackList_->size(); // should be zero here, but keep for consistency
138 
139  if (vtxs.isValid()) {
140 
141  for (std::vector<TrackingVertex>::const_iterator vtx = vtxs->begin(); vtx != vtxs->end(); ++vtx) {
142  TempVertexList_.push_back(*vtx);
143  }
144  }
145 
146  // grab tracks, store copy
147 
149  e.getByToken(TrackSigToken_, tracks);
150 
151  if (tracks.isValid()) {
152  for (std::vector<TrackingParticle>::const_iterator track = tracks->begin(); track != tracks->end(); ++track) {
153  auto oldRef=track->parentVertex();
154  auto newRef=TrackingVertexRef( VertexListRef_, oldRef.index()+StartingIndexV );
155  NewTrackList_->push_back(*track);
156 
157  auto & Ntrack = NewTrackList_->back(); //modify copy
158 
159  Ntrack.setParentVertex( newRef );
160  Ntrack.clearDecayVertices();
161 
162  // next, loop over daughter vertices, same strategy
163 
164  for( auto const& vertexRef : track->decayVertices() ) {
165  auto newRef=TrackingVertexRef( VertexListRef_, vertexRef.index()+StartingIndexV );
166  Ntrack.addDecayVertex(newRef);
167  }
168  }
169  }
170 
171  // Now that tracks are handled, go back and put correct Refs in vertices
172  std::vector<decltype(TrackingParticleRef().index())> sourceTrackIndices;
173  std::vector<decltype(TrackingParticleRef().index())> daughterTrackIndices;
174  for (auto & vertex : TempVertexList_ ) {
175 
176  // Need to copy the indices before clearing the vectors
177  sourceTrackIndices.reserve(vertex.sourceTracks().size());
178  daughterTrackIndices.reserve(vertex.daughterTracks().size());
179  for(auto const& ref: vertex.sourceTracks()) sourceTrackIndices.push_back(ref.index());
180  for(auto const& ref: vertex.daughterTracks()) daughterTrackIndices.push_back(ref.index());
181 
182  vertex.clearParentTracks();
183  vertex.clearDaughterTracks();
184 
185  for( auto index : sourceTrackIndices ) {
186  auto newRef=TrackingParticleRef( TrackListRef_, index+StartingIndexT );
187  vertex.addParentTrack(newRef);
188  }
189 
190  // next, loop over daughter tracks, same strategy
191  for( auto index : daughterTrackIndices ) {
192  auto newRef=TrackingParticleRef( TrackListRef_, index+StartingIndexT );
193  vertex.addDaughterTrack(newRef);
194  }
195 
196  sourceTrackIndices.clear();
197  daughterTrackIndices.clear();
198  }
199 
200  // Accumulate DigiSimLinks
202  e.getByToken(StripLinkSigToken_, stripLinks);
203  if(stripLinks.isValid()) {
204  appendDetSetVector(*NewStripLinkList_, *stripLinks);
205  }
206 
208  e.getByToken(PixelLinkSigToken_, pixelLinks);
209  if(pixelLinks.isValid()) {
210  appendDetSetVector(*NewPixelLinkList_, *pixelLinks);
211  }
212 
214  e.getByToken(CSCStripLinkSigToken_, CSCstripLinks);
215  if(CSCstripLinks.isValid()) {
216  appendDetSetVector(*NewCSCStripLinkList_, *CSCstripLinks);
217  }
218 
220  e.getByToken(CSCWireLinkSigToken_, CSCwireLinks);
221  if(CSCwireLinks.isValid()) {
222  appendDetSetVector(*NewCSCWireLinkList_, *CSCwireLinks);
223  }
224 
226  e.getByToken(RPCLinkSigToken_, RPCLinks);
227  if(RPCLinks.isValid()) {
228  appendDetSetVector(*NewRPCLinkList_, *RPCLinks);
229  }
230 
232  e.getByToken(DTLinkSigToken_, DTLinks);
233  if(DTLinks.isValid()) {
234  for (DTDigiSimLinkCollection::DigiRangeIterator detUnit=DTLinks->begin(); detUnit !=DTLinks->end(); ++detUnit) {
235  const DTLayerId& layerid = (*detUnit).first;
236  const DTDigiSimLinkCollection::Range& range = (*detUnit).second;
237  NewDTLinkList_->put(range,layerid);
238  }
239  }
240 
241  } // end of addTrackingParticleSignals
std::unique_ptr< edm::DetSetVector< PixelDigiSimLink > > NewPixelLinkList_
edm::EDGetTokenT< edm::DetSetVector< StripDigiSimLink > > CSCStripLinkSigToken_
edm::EDGetTokenT< edm::DetSetVector< StripDigiSimLink > > CSCWireLinkSigToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:519
std::unique_ptr< edm::DetSetVector< StripDigiSimLink > > NewStripLinkList_
edm::EDGetTokenT< edm::DetSetVector< RPCDigiSimLink > > RPCLinkSigToken_
edm::EDGetTokenT< std::vector< TrackingVertex > > VtxSigToken_
edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > PixelLinkSigToken_
std::unique_ptr< edm::DetSetVector< RPCDigiSimLink > > NewRPCLinkList_
std::unique_ptr< edm::DetSetVector< StripDigiSimLink > > NewCSCStripLinkList_
edm::EDGetTokenT< std::vector< TrackingParticle > > TrackSigToken_
bool isValid() const
Definition: HandleBase.h:74
std::unique_ptr< std::vector< TrackingParticle > > NewTrackList_
edm::Ref< TrackingVertexCollection > TrackingVertexRef
std::unique_ptr< MuonDigiCollection< DTLayerId, DTDigiSimLink > > NewDTLinkList_
std::pair< const_iterator, const_iterator > Range
DigiRangeIterator end() const
edm::EDGetTokenT< edm::DetSetVector< StripDigiSimLink > > StripLinkSigToken_
edm::Ref< TrackingParticleCollection > TrackingParticleRef
edm::EDGetTokenT< MuonDigiCollection< DTLayerId, DTDigiSimLink > > DTLinkSigToken_
DigiRangeIterator begin() const
std::unique_ptr< edm::DetSetVector< StripDigiSimLink > > NewCSCWireLinkList_
void DataMixingTrackingParticleWorker::initializeEvent ( edm::Event const &  e,
edm::EventSetup const &  c 
)
virtual

Definition at line 103 of file DataMixingTrackingParticleWorker.cc.

References MillePedeFileConverter_cfg::e.

Referenced by edm::DataMixingModule::initializeEvent().

103  {
104 
105  // Create new track/vertex lists, getting references, too, so that we can cross-link everything
106 
107  NewTrackList_ = std::unique_ptr<std::vector<TrackingParticle>>(new std::vector<TrackingParticle>());
108  //NewVertexList_ = std::unique_ptr<std::vector<TrackingVertex>>(new std::vector<TrackingVertex>());
109  TempVertexList_ = std::vector<TrackingVertex>();
110 
111  TrackListRef_ =const_cast<edm::Event&>( e ).getRefBeforePut< std::vector<TrackingParticle> >(TrackingParticleCollectionDM_);
112  VertexListRef_ =const_cast<edm::Event&>( e ).getRefBeforePut< std::vector<TrackingVertex> >(TrackingParticleCollectionDM_);
113 
114  // tracker
115 
116  NewStripLinkList_ = std::make_unique<edm::DetSetVector<StripDigiSimLink> >();
117  NewPixelLinkList_ = std::make_unique<edm::DetSetVector<PixelDigiSimLink> >();
118 
119  // muons
120 
121  NewCSCStripLinkList_ = std::make_unique<edm::DetSetVector<StripDigiSimLink> >();
122  NewCSCWireLinkList_ = std::make_unique<edm::DetSetVector<StripDigiSimLink> >();
123  NewRPCLinkList_ = std::make_unique<edm::DetSetVector<RPCDigiSimLink> >();
124  NewDTLinkList_ = std::make_unique< MuonDigiCollection<DTLayerId, DTDigiSimLink> >();
125 
126  }
std::unique_ptr< edm::DetSetVector< PixelDigiSimLink > > NewPixelLinkList_
std::unique_ptr< edm::DetSetVector< StripDigiSimLink > > NewStripLinkList_
std::unique_ptr< edm::DetSetVector< RPCDigiSimLink > > NewRPCLinkList_
std::unique_ptr< edm::DetSetVector< StripDigiSimLink > > NewCSCStripLinkList_
std::unique_ptr< std::vector< TrackingParticle > > NewTrackList_
std::unique_ptr< MuonDigiCollection< DTLayerId, DTDigiSimLink > > NewDTLinkList_
std::unique_ptr< edm::DetSetVector< StripDigiSimLink > > NewCSCWireLinkList_
void DataMixingTrackingParticleWorker::putTrackingParticle ( edm::Event e)

Definition at line 373 of file DataMixingTrackingParticleWorker.cc.

References eostools::move(), and edm::Event::put().

Referenced by edm::DataMixingModule::put().

373  {
374 
375  // collection of Vertices to put in the event
376 
377  NewVertexList_ = std::unique_ptr<std::vector<TrackingVertex>>(new std::vector<TrackingVertex>(TempVertexList_));
378 
379  // put the collection of digis in the event
380  LogInfo("DataMixingTrackingParticleWorker") << "total # Merged Tracks: " << NewTrackList_->size() ;
381 
382  // put collections
383 
386 
389 
394 
395 
396  // clear local storage for this event
397  //NewTrackList_.clear();
398  TempVertexList_.clear();
399  }
std::unique_ptr< edm::DetSetVector< PixelDigiSimLink > > NewPixelLinkList_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:136
std::unique_ptr< edm::DetSetVector< StripDigiSimLink > > NewStripLinkList_
std::unique_ptr< edm::DetSetVector< RPCDigiSimLink > > NewRPCLinkList_
std::unique_ptr< edm::DetSetVector< StripDigiSimLink > > NewCSCStripLinkList_
std::unique_ptr< std::vector< TrackingVertex > > NewVertexList_
std::unique_ptr< std::vector< TrackingParticle > > NewTrackList_
std::unique_ptr< MuonDigiCollection< DTLayerId, DTDigiSimLink > > NewDTLinkList_
def move(src, dest)
Definition: eostools.py:510
std::unique_ptr< edm::DetSetVector< StripDigiSimLink > > NewCSCWireLinkList_

Member Data Documentation

std::string edm::DataMixingTrackingParticleWorker::CSCStripLinkCollectionDM_
private

Definition at line 83 of file DataMixingTrackingParticleWorker.h.

edm::InputTag edm::DataMixingTrackingParticleWorker::CSCStripLinkPileInputTag_
private

Definition at line 76 of file DataMixingTrackingParticleWorker.h.

edm::EDGetTokenT<edm::DetSetVector<StripDigiSimLink> > edm::DataMixingTrackingParticleWorker::CSCStripLinkPileToken_
private

Definition at line 97 of file DataMixingTrackingParticleWorker.h.

edm::EDGetTokenT<edm::DetSetVector<StripDigiSimLink> > edm::DataMixingTrackingParticleWorker::CSCStripLinkSigToken_
private

Definition at line 96 of file DataMixingTrackingParticleWorker.h.

std::string edm::DataMixingTrackingParticleWorker::CSCWireLinkCollectionDM_
private

Definition at line 82 of file DataMixingTrackingParticleWorker.h.

edm::InputTag edm::DataMixingTrackingParticleWorker::CSCWireLinkPileInputTag_
private

Definition at line 75 of file DataMixingTrackingParticleWorker.h.

edm::EDGetTokenT<edm::DetSetVector<StripDigiSimLink> > edm::DataMixingTrackingParticleWorker::CSCWireLinkPileToken_
private

Definition at line 95 of file DataMixingTrackingParticleWorker.h.

edm::EDGetTokenT<edm::DetSetVector<StripDigiSimLink> > edm::DataMixingTrackingParticleWorker::CSCWireLinkSigToken_
private

Definition at line 94 of file DataMixingTrackingParticleWorker.h.

std::string edm::DataMixingTrackingParticleWorker::DTLinkCollectionDM_
private

Definition at line 80 of file DataMixingTrackingParticleWorker.h.

edm::InputTag edm::DataMixingTrackingParticleWorker::DTLinkPileInputTag_
private

Definition at line 73 of file DataMixingTrackingParticleWorker.h.

edm::EDGetTokenT< MuonDigiCollection<DTLayerId, DTDigiSimLink> > edm::DataMixingTrackingParticleWorker::DTLinkPileToken_
private

Definition at line 99 of file DataMixingTrackingParticleWorker.h.

edm::EDGetTokenT< MuonDigiCollection<DTLayerId, DTDigiSimLink> > edm::DataMixingTrackingParticleWorker::DTLinkSigToken_
private

Definition at line 98 of file DataMixingTrackingParticleWorker.h.

std::unique_ptr< edm::DetSetVector<StripDigiSimLink> > edm::DataMixingTrackingParticleWorker::NewCSCStripLinkList_
private

Definition at line 114 of file DataMixingTrackingParticleWorker.h.

std::unique_ptr< edm::DetSetVector<StripDigiSimLink> > edm::DataMixingTrackingParticleWorker::NewCSCWireLinkList_
private

Definition at line 113 of file DataMixingTrackingParticleWorker.h.

std::unique_ptr< MuonDigiCollection<DTLayerId,DTDigiSimLink> > edm::DataMixingTrackingParticleWorker::NewDTLinkList_
private

Definition at line 111 of file DataMixingTrackingParticleWorker.h.

std::unique_ptr<edm::DetSetVector<PixelDigiSimLink> > edm::DataMixingTrackingParticleWorker::NewPixelLinkList_
private

Definition at line 110 of file DataMixingTrackingParticleWorker.h.

std::unique_ptr< edm::DetSetVector<RPCDigiSimLink> > edm::DataMixingTrackingParticleWorker::NewRPCLinkList_
private

Definition at line 112 of file DataMixingTrackingParticleWorker.h.

std::unique_ptr<edm::DetSetVector<StripDigiSimLink> > edm::DataMixingTrackingParticleWorker::NewStripLinkList_
private

Definition at line 109 of file DataMixingTrackingParticleWorker.h.

std::unique_ptr<std::vector<TrackingParticle> > edm::DataMixingTrackingParticleWorker::NewTrackList_
private

Definition at line 105 of file DataMixingTrackingParticleWorker.h.

std::unique_ptr<std::vector<TrackingVertex> > edm::DataMixingTrackingParticleWorker::NewVertexList_
private

Definition at line 106 of file DataMixingTrackingParticleWorker.h.

std::string edm::DataMixingTrackingParticleWorker::PixelLinkCollectionDM_
private

Definition at line 79 of file DataMixingTrackingParticleWorker.h.

edm::InputTag edm::DataMixingTrackingParticleWorker::PixelLinkPileInputTag_
private

Definition at line 72 of file DataMixingTrackingParticleWorker.h.

edm::EDGetTokenT<edm::DetSetVector<PixelDigiSimLink> > edm::DataMixingTrackingParticleWorker::PixelLinkPileToken_
private

Definition at line 93 of file DataMixingTrackingParticleWorker.h.

edm::EDGetTokenT<edm::DetSetVector<PixelDigiSimLink> > edm::DataMixingTrackingParticleWorker::PixelLinkSigToken_
private

Definition at line 92 of file DataMixingTrackingParticleWorker.h.

std::string edm::DataMixingTrackingParticleWorker::RPCLinkCollectionDM_
private

Definition at line 81 of file DataMixingTrackingParticleWorker.h.

edm::InputTag edm::DataMixingTrackingParticleWorker::RPCLinkPileInputTag_
private

Definition at line 74 of file DataMixingTrackingParticleWorker.h.

edm::EDGetTokenT<edm::DetSetVector<RPCDigiSimLink> > edm::DataMixingTrackingParticleWorker::RPCLinkPileToken_
private

Definition at line 101 of file DataMixingTrackingParticleWorker.h.

edm::EDGetTokenT<edm::DetSetVector<RPCDigiSimLink> > edm::DataMixingTrackingParticleWorker::RPCLinkSigToken_
private

Definition at line 100 of file DataMixingTrackingParticleWorker.h.

std::string edm::DataMixingTrackingParticleWorker::StripLinkCollectionDM_
private

Definition at line 78 of file DataMixingTrackingParticleWorker.h.

edm::InputTag edm::DataMixingTrackingParticleWorker::StripLinkPileInputTag_
private

Definition at line 71 of file DataMixingTrackingParticleWorker.h.

edm::EDGetTokenT<edm::DetSetVector<StripDigiSimLink> > edm::DataMixingTrackingParticleWorker::StripLinkPileToken_
private

Definition at line 91 of file DataMixingTrackingParticleWorker.h.

edm::EDGetTokenT<edm::DetSetVector<StripDigiSimLink> > edm::DataMixingTrackingParticleWorker::StripLinkSigToken_
private

Definition at line 90 of file DataMixingTrackingParticleWorker.h.

std::vector<TrackingVertex> edm::DataMixingTrackingParticleWorker::TempVertexList_
private

Definition at line 107 of file DataMixingTrackingParticleWorker.h.

std::string edm::DataMixingTrackingParticleWorker::TrackingParticleCollectionDM_
private

Definition at line 69 of file DataMixingTrackingParticleWorker.h.

edm::InputTag edm::DataMixingTrackingParticleWorker::TrackingParticlecollectionSig_
private

Definition at line 66 of file DataMixingTrackingParticleWorker.h.

edm::InputTag edm::DataMixingTrackingParticleWorker::TrackingParticleLabelSig_
private

Definition at line 67 of file DataMixingTrackingParticleWorker.h.

edm::InputTag edm::DataMixingTrackingParticleWorker::TrackingParticlePileInputTag_
private

Definition at line 68 of file DataMixingTrackingParticleWorker.h.

TrackingParticleRefProd edm::DataMixingTrackingParticleWorker::TrackListRef_
private

Definition at line 116 of file DataMixingTrackingParticleWorker.h.

edm::EDGetTokenT<std::vector<TrackingParticle> > edm::DataMixingTrackingParticleWorker::TrackPileToken_
private

Definition at line 86 of file DataMixingTrackingParticleWorker.h.

edm::EDGetTokenT<std::vector<TrackingParticle> > edm::DataMixingTrackingParticleWorker::TrackSigToken_
private

Definition at line 85 of file DataMixingTrackingParticleWorker.h.

TrackingVertexRefProd edm::DataMixingTrackingParticleWorker::VertexListRef_
private

Definition at line 117 of file DataMixingTrackingParticleWorker.h.

edm::EDGetTokenT<std::vector<TrackingVertex> > edm::DataMixingTrackingParticleWorker::VtxPileToken_
private

Definition at line 88 of file DataMixingTrackingParticleWorker.h.

edm::EDGetTokenT<std::vector<TrackingVertex> > edm::DataMixingTrackingParticleWorker::VtxSigToken_
private

Definition at line 87 of file DataMixingTrackingParticleWorker.h.