67 maxEventsToPrint_(
pset.getUntrackedParameter<
int>(
"maxEventsToPrint", 1)),
69 printOnlyHardInteraction_(
pset.getUntrackedParameter<
bool>(
"printOnlyHardInteraction",
false)),
70 printVertex_(
pset.getUntrackedParameter<
bool>(
"printVertex",
false)),
71 printFlags_(
pset.getUntrackedParameter<
bool>(
"printFlags",
false)),
72 useMessageLogger_(
pset.getUntrackedParameter<
bool>(
"useMessageLogger",
false)) {}
77 std::ostringstream
ss;
93 out << endl <<
"[ParticleListDrawer] analysing particle collection " <<
src_.
label() << endl;
97 " idx | ID - Name |Stat| Mo1 Mo2 Da1 Da2 |nMo nDa| pt eta phi | px " 101 snprintf(
buf,
sizeof(
buf),
" vx vy vz |");
111 vector<const reco::Candidate*>
cands;
112 vector<const Candidate*>::const_iterator
found =
cands.begin();
133 int nMo =
p->numberOfMothers();
134 int nDa =
p->numberOfDaughters();
156 " %4d | %5d - %10s | %2d | %4d %4d %4d %4d | %2d %2d | %7.3f %10.3f %6.3f | %10.3f %10.3f %10.3f %8.3f |",
177 snprintf(
buf,
sizeof(
buf),
" %10.3f %10.3f %10.3f |",
p->vertex().x(),
p->vertex().y(),
p->vertex().z());
184 throw cms::Exception(
"Unsupported",
"Status flags can be printed only for reco::GenParticle objects\n");
185 if (
gp->isPromptFinalState())
186 out <<
" PromptFinalState";
187 if (
gp->isDirectPromptTauDecayProductFinalState())
188 out <<
" DirectPromptTauDecayProductFinalState";
189 if (
gp->isHardProcess())
190 out <<
" HardProcess";
191 if (
gp->fromHardProcessFinalState())
192 out <<
" HardProcessFinalState";
193 if (
gp->fromHardProcessBeforeFSR())
194 out <<
" HardProcessBeforeFSR";
195 if (
gp->statusFlags().isFirstCopy())
197 if (
gp->isLastCopy())
199 if (
gp->isLastCopyBeforeFSR())
200 out <<
" LastCopyBeforeFSR";
Log< level::Info, true > LogVerbatim
HepPDT::ParticleDataTable ParticleDataTable
#define DEFINE_FWK_MODULE(type)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< reco::CandidateView > srcToken_
bool printOnlyHardInteraction_
ParticleListDrawer(const edm::ParameterSet &)
unsigned int nEventAnalyzed_
HepPDT::ParticleData ParticleData
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
std::string getParticleName(int id) const
edm::ESHandle< ParticleDataTable > pdt_
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
~ParticleListDrawer() override
Module to analyze the particle listing as provided by common event generators.
edm::ESGetToken< ParticleDataTable, edm::DefaultRecord > pdtToken_