7 if ( todoList.size() == 0 ) {
9 <<
"Empty to-do list !!\n";
12 for ( edm::VParameterSet::const_iterator todoItem = todoList.begin();
13 todoItem != todoList.end(); ++todoItem ) {
20 if ( instanceLabel1 != instanceLabel2 ) {
22 <<
"Mismatch in Instance labels for collection 1 = " << instanceLabel1 <<
" and 2 = " << instanceLabel2 <<
" !!\n";
27 produces<reco::TrackCollection>(instanceLabel1);
44 for (
typename std::vector<todoListEntryType>::const_iterator todoItem =
todoList_.begin();
45 todoItem !=
todoList_.end(); ++todoItem ) {
46 todoItem->trackRefMap_.clear();
49 evt.
getByLabel(todoItem->srcTrackCollection1_, trackCollection1);
52 evt.
getByLabel(todoItem->srcTrackCollection2_, trackCollection2);
55 std::cout <<
"trackCollection(input1 = " << todoItem->srcTrackCollection1_.label() <<
":" << todoItem->srcTrackCollection1_.instance() <<
":" << todoItem->srcTrackCollection1_.process() <<
"):"
56 <<
" #entries = " << trackCollection1->size() << std::endl;
57 std::cout <<
"trackCollection(input2 = " << todoItem->srcTrackCollection2_.label() <<
":" << todoItem->srcTrackCollection2_.instance() <<
":" << todoItem->srcTrackCollection2_.process() <<
"):"
58 <<
" #entries = " << trackCollection2->size() << std::endl;
64 size_t idxTrack_output = 0;
66 size_t numTracks1 = trackCollection1->size();
67 for (
size_t idxTrack1 = 0; idxTrack1 < numTracks1; ++idxTrack1 ) {
69 trackCollection_output->push_back(*track1);
70 todoItem->trackRefMap_[
reco::TrackRef(trackCollectionRefProd_output, idxTrack_output)] = track1;
74 size_t numTracks2 = trackCollection2->size();
75 for (
size_t idxTrack2 = 0; idxTrack2 < numTracks2; ++idxTrack2 ) {
77 trackCollection_output->push_back(*track2);
78 todoItem->trackRefMap_[
reco::TrackRef(trackCollectionRefProd_output, idxTrack_output)] = track2;
83 std::cout <<
"trackCollection(output = " <<
moduleLabel_ <<
":" << todoItem->srcTrackCollection1_.instance() <<
"): #entries = " << trackCollection_output->size() << std::endl;
85 for ( reco::TrackCollection::const_iterator track = trackCollection_output->begin();
86 track != trackCollection_output->end(); ++track ) {
87 if ( track->pt() > 5. ) {
88 std::cout <<
"track #" << idx <<
": Pt = " << track->pt() <<
", eta = " << track->eta() <<
", phi = " << track->phi() << std::endl;
94 evt.
put(trackCollection_output, todoItem->srcTrackCollection1_.instance());
T getParameter(std::string const &) const
std::vector< todoListEntryType > todoList_
std::vector< ParameterSet > VParameterSet
edm::InputTag srcTrackCollection2_
std::vector< Track > TrackCollection
collection of Tracks
bool exists(std::string const ¶meterName) const
checks if a parameter exists
virtual void produce(edm::Event &, const edm::EventSetup &)
TrackMixerBase(const edm::ParameterSet &)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
virtual void produceTracks(edm::Event &, const edm::EventSetup &)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
RefProd< PROD > getRefBeforePut()
virtual void produceTrackExtras(edm::Event &, const edm::EventSetup &)=0
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
edm::InputTag srcTrackCollection1_