48 simtracksTag(conf.getParameter<edm::
InputTag>(
"simtracksTag")),
49 simtracksXFTag(conf.getParameter<edm::
InputTag>(
"simtracksXFTag")),
50 crossingframe(conf.getParameter<bool>(
"crossingframe"))
77 bool const crossingframe;
83 iEvent.
getByToken(simtracksXFToken_, simtracksXF_);
84 iEvent.
getByToken(simvertsXFToken_, simvertsXF_);
86 iEvent.
getByToken(simtracksToken_, simtracks_);
95 edm::LogVerbatim(
"MuonToTrackingParticleAssociatorEDProducer")<<
"\n"<<
"reco::Track collection --- size = "<<tC.size();
98 edm::LogVerbatim(
"MuonToTrackingParticleAssociatorEDProducer")<<
"\n"<<
"TrackingParticle collection --- size = "<<tPC.size();
100 for(TrackingParticleCollection::const_iterator ITER=tPC.begin(); ITER!=tPC.end(); ITER++,
j++) {
102 <<
"TrackingParticle "<<
j<<
", q = "<<ITER->charge()<<
", p = "<<ITER->p()
103 <<
", pT = "<<ITER->pt()<<
", eta = "<<ITER->eta()<<
", phi = "<<ITER->phi();
106 <<
"\t pdg code = "<<ITER->pdgId()<<
", made of "<<ITER->numberOfHits()<<
" PSimHit"
107 <<
" (in "<<ITER->numberOfTrackerLayers()<<
" layers)"
108 <<
" from "<<ITER->g4Tracks().size()<<
" SimTrack:";
111 <<
"\t\t Id:"<<g4T->trackId()<<
"/Evt:("<<g4T->eventId().event()<<
","<<g4T->eventId().bunchCrossing()<<
")";
117 edm::LogVerbatim(
"MuonToTrackingParticleAssociatorEDProducer")<<
"\n"<<
"CrossingFrame<SimTrack> collection with InputTag = "<<simtracksXFTag
118 <<
" has size = "<<SimTk->size();
123 <<
" - Id:"<<ITER->trackId()<<
"/Evt:("<<ITER->eventId().event()<<
","<<ITER->eventId().bunchCrossing()<<
")"
124 <<
" pdgId = "<<ITER->type()<<
", q = "<<ITER->charge()<<
", p = "<<ITER->momentum().P()
125 <<
", pT = "<<ITER->momentum().Pt()<<
", eta = "<<ITER->momentum().Eta()<<
", phi = "<<ITER->momentum().Phi()
126 <<
"\n * "<<*ITER <<endl;
130 edm::LogVerbatim(
"MuonToTrackingParticleAssociatorEDProducer")<<
"\n"<<
"CrossingFrame<SimVertex> collection with InputTag = "<<simtracksXFTag
131 <<
" has size = "<<SimVtx->size();
136 <<
" : "<< *VITER <<endl;
141 edm::LogVerbatim(
"MuonToTrackingParticleAssociatorEDProducer")<<
"\n"<<
"SimTrack collection with InputTag = "<<simtracksTag
142 <<
" has size = "<<simTC.size()<<endl;
144 for(edm::SimTrackContainer::const_iterator ITER=simTC.begin(); ITER!=simTC.end(); ITER++, k++){
147 <<
" - Id:"<<ITER->trackId()<<
"/Evt:("<<ITER->eventId().event()<<
","<<ITER->eventId().bunchCrossing()<<
")"
148 <<
" pdgId = "<<ITER->type()<<
", q = "<<ITER->charge()<<
", p = "<<ITER->momentum().P()
149 <<
", pT = "<<ITER->momentum().Pt()<<
", eta = "<<ITER->momentum().Eta()<<
", phi = "<<ITER->momentum().Phi()
150 <<
"\n * "<<*ITER <<endl;
153 edm::LogVerbatim(
"MuonToTrackingParticleAssociatorEDProducer")<<
"\n"<<
"SimVertex collection with InputTag = "<<
"g4SimHits"
154 <<
" has size = "<<simVC.size()<<endl;
156 for (edm::SimVertexContainer::const_iterator VITER=simVC.begin(); VITER!=simVC.end(); VITER++, kv++){
159 <<
" : "<< *VITER <<endl;
206 hitExtractor_(iConfig,consumesCollector())
209 produces<reco::MuonToTrackingParticleAssociator>();
249 bool printRtS =
true;
274 std::unique_ptr<reco::MuonToTrackingParticleAssociatorBaseImpl> impl{
T getUntrackedParameter(std::string const &, T const &) const
std::unique_ptr< CSCHitAssociator > csctruth_
std::vector< TrackingParticle > TrackingParticleCollection
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
MuonToTrackingParticleAssociatorEDProducer(const edm::ParameterSet &)
std::unique_ptr< RPCHitAssociator > rpctruth_
std::vector< std::pair< trackingRecHit_iterator, trackingRecHit_iterator > > TrackHitsCollection
void addDefault(ParameterSetDescription const &psetDescription)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
MuonAssociatorByHitsHelper helper_
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
MuonAssociatorByHitsHelper::TrackHitsCollection TrackHitsCollection
std::unique_ptr< TrackerHitAssociator > trackertruth_
std::vector< SimTrack >::const_iterator g4t_iterator
std::unique_ptr< InputDumper > diagnostics_
std::vector< SimVertex > SimVertexContainer
~MuonToTrackingParticleAssociatorEDProducer()
edm::ParameterSet const config_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
TrackerMuonHitExtractor hitExtractor_
std::unique_ptr< DTHitAssociator > dttruth_
virtual void produce(edm::Event &, const edm::EventSetup &) override
std::vector< SimTrack > SimTrackContainer