1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
// GenericJet.cc
// Fedor Ratnikov, UMd
#include <sstream>
//Own header file
#include "DataFormats/JetReco/interface/GenericJet.h"
using namespace reco;
GenericJet::GenericJet(const LorentzVector& fP4,
const Point& fVertex,
const std::vector<CandidateBaseRef>& fConstituents)
: CompositeRefBaseCandidate(0, fP4, fVertex) {
for (unsigned i = 0; i < fConstituents.size(); i++)
addDaughter(fConstituents[i]);
}
int GenericJet::nConstituents() const { return numberOfDaughters(); }
std::string GenericJet::print() const {
std::ostringstream out;
out << "GenericJet p/px/py/pz/pt: " << p() << '/' << px() << '/' << py() << '/' << pz() << '/' << pt() << std::endl
<< " eta/phi: " << eta() << '/' << phi() << std::endl
<< " # of constituents: " << nConstituents() << std::endl;
out << " No Constituents details available for this version" << std::endl;
return out.str();
}
|