Loading [MathJax]/extensions/tex2jax.js
Imperial Analysis
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
GenParticle.cc
Go to the documentation of this file.
1 #include "../interface/GenParticle.hh"
2 #include "boost/format.hpp"
3 namespace ic {
4 // Constructors/Destructors
5 GenParticle::GenParticle() : index_(0), pdgid_(0), status_(0) {}
6 
8 
9 void GenParticle::Print() const {
10  std::cout << (boost::format("idx: %-4i st: %-3i id: %4i %-40s M: %f\n") %
11  this->index() % this->status() % this->pdgid()) %
12  this->vector() % this->M();
13  if (this->mothers().size()) {
14  std::cout << " mothers: ";
15  for (unsigned i = 0; i < this->mothers().size(); ++i) {
16  std::cout << " " << this->mothers().at(i);
17  }
18  std::cout << "\n";
19  }
20  if (this->daughters().size()) {
21  std::cout << " daughters:";
22  for (unsigned i = 0; i < this->daughters().size(); ++i) {
23  std::cout << " " << this->daughters().at(i);
24  }
25  std::cout << "\n";
26  }
27 }
28 }
int pdgid() const
PDG number to identify the particle type, see this link
Definition: GenParticle.hh:55
virtual ~GenParticle()
Definition: GenParticle.cc:7
std::vector< int > const & mothers() const
A vector of ic::GenParticle::index() values that identify the mother particles.
Definition: GenParticle.hh:62
std::vector< int > const & daughters() const
A vector of ic::GenParticle::index() values that identify the daughter particles. ...
Definition: GenParticle.hh:66
Vector const & vector() const
Four-momentum.
Definition: Candidate.hh:31
Definition: CaloJet.hh:9
int status() const
The generator-dependent particle status.
Definition: GenParticle.hh:58
int index() const
The index position of the particle in the original list.
Definition: GenParticle.hh:51
virtual void Print() const
Definition: GenParticle.cc:9
double M() const
Calculates the candidate mass.
Definition: Candidate.hh:57