CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GenericJet.cc
Go to the documentation of this file.
1 // GenericJet.cc
2 // Fedor Ratnikov, UMd
3 // $Id: GenericJet.cc,v 1.3 2007/05/03 21:13:18 fedor Exp $
4 
5 #include <sstream>
6 
7 //Own header file
9 
10 using namespace reco;
11 
13  const Point& fVertex,
14  const std::vector<CandidateBaseRef>& fConstituents)
15  : CompositeRefBaseCandidate (0, fP4, fVertex)
16 {
17  for (unsigned i = 0; i < fConstituents.size (); i++) addDaughter (fConstituents [i]);
18 }
19 
21  return numberOfDaughters();
22 }
23 
24 std::string GenericJet::print () const {
25  std::ostringstream out;
26  out << "GenericJet p/px/py/pz/pt: " << p() << '/' << px () << '/' << py() << '/' << pz() << '/' << pt() << std::endl
27  << " eta/phi: " << eta () << '/' << phi () << std::endl
28  << " # of constituents: " << nConstituents () << std::endl;
29  out << " No Constituents details available for this version" << std::endl;
30  return out.str ();
31 }
virtual size_t numberOfDaughters() const
number of daughters
int i
Definition: DBlmapReader.cc:9
virtual double p() const
magnitude of momentum vector
GenericJet()
Default constructor.
Definition: GenericJet.h:23
virtual double eta() const
momentum pseudorapidity
virtual std::string print() const
Print object.
Definition: GenericJet.cc:24
virtual int nConstituents() const
of constituents
Definition: GenericJet.cc:20
tuple out
Definition: dbtoconf.py:99
virtual double px() const
x coordinate of momentum vector
virtual double pt() const
transverse momentum
virtual double pz() const
z coordinate of momentum vector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:38
math::XYZPoint Point
point in the space
Definition: Candidate.h:42
void addDaughter(const CandidateBaseRef &)
add a daughter via a reference
virtual double phi() const
momentum azimuthal angle
virtual double py() const
y coordinate of momentum vector