Go to the documentation of this file.00001
00002
00003
00004
00005 #include <sstream>
00006
00007
00008 #include "DataFormats/JetReco/interface/GenericJet.h"
00009
00010 using namespace reco;
00011
00012 GenericJet::GenericJet (const LorentzVector& fP4,
00013 const Point& fVertex,
00014 const std::vector<CandidateBaseRef>& fConstituents)
00015 : CompositeRefBaseCandidate (0, fP4, fVertex)
00016 {
00017 for (unsigned i = 0; i < fConstituents.size (); i++) addDaughter (fConstituents [i]);
00018 }
00019
00020 int GenericJet::nConstituents () const {
00021 return numberOfDaughters();
00022 }
00023
00024 std::string GenericJet::print () const {
00025 std::ostringstream out;
00026 out << "GenericJet p/px/py/pz/pt: " << p() << '/' << px () << '/' << py() << '/' << pz() << '/' << pt() << std::endl
00027 << " eta/phi: " << eta () << '/' << phi () << std::endl
00028 << " # of constituents: " << nConstituents () << std::endl;
00029 out << " No Constituents details available for this version" << std::endl;
00030 return out.str ();
00031 }