21 :
reco::
Jet(fP4, fVertex, fConstituents)
47 throw cms::Exception(
"TrackRef unavailable") <<
"TrackJet consituent track not in the event.";
50 throw cms::Exception(
"Invalid Constituent") <<
"TrackJet constituent is not of RecoChargedRefCandidate type";
60 std::vector <edm::Ptr<reco::Track> >
result;
69 charge += ida->charge();
71 this->setCharge(charge);
91 std::ostringstream
out;
93 <<
" TrackJet specific:" << std::endl;
95 out <<
" Associated PV:"
100 out <<
" Associated PV not available on the event" << std::endl;
102 std::vector<edm::Ptr<reco::Track> > thetracks =
tracks();
103 for (
unsigned i = 0;
i < thetracks.size ();
i++) {
104 if (thetracks[
i].
get ()) {
106 <<
" px=" << thetracks[
i]->px()
107 <<
" py=" << thetracks[
i]->py()
108 <<
" pz=" << thetracks[
i]->pz()
109 <<
" eta=" << thetracks[
i]->eta()
110 <<
" phi=" << thetracks[
i]->phi() << std::endl;
113 out <<
" #" <<
i <<
" track is not available in the event" << std::endl;
unsigned int numberOfDaughters(const reco::GenParticle &p)
T const * get() const
Returns C++ pointer to the item.
Base class for all types of Jets.
TrackJet()
Default constructor.
std::vector< Constituent > Constituents
reco::TrackRef track() const
key_type key() const
Accessor for product key.
ProductID id() const
Accessor for product ID.
virtual std::string print() const
Print object.
virtual std::string print() const
Print object.
void setPrimaryVertex(const reco::VertexRef &vtx)
set associated primary vertex
T const * get() const
Returns C++ pointer to the item.
bool isNonnull() const
Checks for non-null.
virtual bool overlap(const Candidate &dummy) const
Polymorphic overlap.
math::XYZTLorentzVector LorentzVector
Lorentz vector.
math::XYZPoint Point
point in the space
const reco::VertexRef primaryVertex() const
get associated primary vertex
std::vector< edm::Ptr< reco::Track > > tracks() const
Return pointers to all track costituents.
int Charge
electric charge type
virtual edm::Ptr< reco::Track > track(size_t i) const
Return Ptr to the track costituent.
virtual TrackJet * clone() const
Polymorphic clone.
void resetCharge()
calculate and set the charge by adding up the constituting track charges