50 printP4_(cfg.getUntrackedParameter<bool>(
"printP4",
false)),
51 printPtEtaPhi_(cfg.getUntrackedParameter<bool>(
"printPtEtaPhi",
false)),
52 printVertex_(cfg.getUntrackedParameter<bool>(
"printVertex",
false)) {}
55 if (
find(skip.begin(), skip.end(), &
c) != skip.end())
64 for (
size_t i = 0;
i < ndau; ++
i)
74 list<const Candidate *>
skip;
75 vector<const Candidate *>
nodes, moms;
77 if (
p->numberOfMothers() > 1) {
81 for (
size_t j = 0;
j <
p->numberOfMothers(); ++
j) {
84 while ((grandMom = mom->
mother()) !=
nullptr)
93 cout <<
"-- decay: --" << endl;
96 for (
size_t m = 0;
m < moms.size(); ++
m) {
99 cout <<
"{ " << dec <<
" } ";
104 if (!nodes.empty()) {
106 if (nodes.size() > 1) {
107 for (
size_t n = 0;
n < nodes.size(); ++
n) {
108 skip.remove(nodes[
n]);
109 string dec =
decay(*nodes[n], skip);
111 if (dec.find(
"->", 0) != string::npos)
112 cout <<
" ( " << dec <<
" )";
118 skip.remove(nodes[0]);
128 cout <<
" (" << c.
px() <<
", " << c.
py() <<
", " << c.
pz() <<
"; " << c.
energy() <<
")";
130 cout <<
" [" << c.
pt() <<
": " << c.
eta() <<
", " << c.
phi() <<
"]";
132 cout <<
" {" << c.
vx() <<
", " << c.
vy() <<
", " << c.
vz() <<
"}";
138 if (
find(skip.begin(), skip.end(), &
c) != skip.end())
145 out += (pd->name() +
printP4(c));
148 for (
size_t i = 0;
i < ndau; ++
i)
156 for (
size_t i = 0;
i < ndau; ++
i) {
160 if (dec.find(
"->", 0) != string::npos)
161 out += (
" ( " + dec +
" )");
bool hasValidDaughters(const reco::Candidate &) const
has valid daughters in the chain
virtual double energy() const =0
energy
virtual const Candidate * daughter(size_type i) const =0
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
const edm::EventSetup & c
virtual const Candidate * mother(size_type i=0) const =0
return pointer to mother
HepPDT::ParticleDataTable ParticleDataTable
virtual double pt() const =0
transverse momentum
#define DEFINE_FWK_MODULE(type)
bool accept(const reco::Candidate &, const std::list< const reco::Candidate * > &) const
accept candidate
std::string printP4(const reco::Candidate &) const
print 4 momenta
virtual int status() const =0
status word
virtual double pz() const =0
z coordinate of momentum vector
virtual double vx() const =0
x coordinate of vertex position
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
edm::ESHandle< ParticleDataTable > pdt_
virtual double vy() const =0
y coordinate of vertex position
virtual size_type numberOfDaughters() const =0
number of daughters
std::string decay(const reco::Candidate &, std::list< const reco::Candidate * > &) const
bool select(const reco::Candidate &) const
select candidate
ParticleDecayDrawer(const edm::ParameterSet &)
bool printP4_
print parameters
void analyze(const edm::Event &, const edm::EventSetup &) override
virtual double py() const =0
y coordinate of momentum vector
HepPDT::ParticleData ParticleData
virtual double px() const =0
x coordinate of momentum vector
virtual int pdgId() const =0
PDG identifier.
edm::ESGetToken< ParticleDataTable, edm::DefaultRecord > pdtToken_
virtual double vz() const =0
z coordinate of vertex position
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
edm::EDGetTokenT< edm::View< reco::Candidate > > srcToken_
virtual double phi() const =0
momentum azimuthal angle
virtual double eta() const =0
momentum pseudorapidity