CMS 3D CMS Logo

GenericJet.cc
Go to the documentation of this file.
1 // GenericJet.cc
2 // Fedor Ratnikov, UMd
3 
4 #include <sstream>
5 
6 //Own header file
8 
9 using namespace reco;
10 
12  const Point& fVertex,
13  const std::vector<CandidateBaseRef>& fConstituents)
14  : CompositeRefBaseCandidate (0, fP4, fVertex)
15 {
16  for (unsigned i = 0; i < fConstituents.size (); i++) addDaughter (fConstituents [i]);
17 }
18 
20  return numberOfDaughters();
21 }
22 
24  std::ostringstream out;
25  out << "GenericJet p/px/py/pz/pt: " << p() << '/' << px () << '/' << py() << '/' << pz() << '/' << pt() << std::endl
26  << " eta/phi: " << eta () << '/' << phi () << std::endl
27  << " # of constituents: " << nConstituents () << std::endl;
28  out << " No Constituents details available for this version" << std::endl;
29  return out.str ();
30 }
virtual size_t numberOfDaughters() const
number of daughters
virtual double pt() const final
transverse momentum
int i
Definition: DBlmapReader.cc:9
GenericJet()
Default constructor.
Definition: GenericJet.h:22
virtual double eta() const final
momentum pseudorapidity
virtual double phi() const final
momentum azimuthal angle
virtual std::string print() const
Print object.
Definition: GenericJet.cc:23
virtual double px() const final
x coordinate of momentum vector
virtual double p() const final
magnitude of momentum vector
virtual int nConstituents() const
of constituents
Definition: GenericJet.cc:19
virtual double pz() const final
z coordinate of momentum vector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:37
fixed size matrix
math::XYZPoint Point
point in the space
Definition: Candidate.h:41
void addDaughter(const CandidateBaseRef &)
add a daughter via a reference
virtual double py() const final
y coordinate of momentum vector