CMS 3D CMS Logo

JPTJet.cc
Go to the documentation of this file.
1 // JPTJet.cc
2 // Fedor Ratnikov UMd
3 #include <sstream>
4 
7 
8 //Own header file
10 
11 using namespace reco;
12 
14  const Point& fVertex,
15  const Specific& fSpecific,
16  const Jet::Constituents& fConstituents)
17  : Jet(fP4, fVertex), mspecific(fSpecific) {}
18 
19 JPTJet::JPTJet(const LorentzVector& fP4, const Specific& fSpecific, const Jet::Constituents& fConstituents)
20  : Jet(fP4, Point(0, 0, 0)), mspecific(fSpecific) {}
21 
22 JPTJet* JPTJet::clone() const { return new JPTJet(*this); }
23 
24 bool JPTJet::overlap(const Candidate&) const { return false; }
25 
26 void JPTJet::printJet() const {
27  std::cout << " Raw Calo jet " << getCaloJetRef()->et() << " " << getCaloJetRef()->eta() << " "
28  << getCaloJetRef()->phi() << " JPTJet specific:" << std::endl
29  << " charged multiplicity: " << chargedMultiplicity() << std::endl;
30  std::cout << " JPTCandidate constituents:" << std::endl;
31  std::cout << " Number of pions: " << getPionsInVertexInCalo().size() + getPionsInVertexOutCalo().size() << std::endl;
32  std::cout << " Number of muons: " << getMuonsInVertexInCalo().size() + getMuonsInVertexOutCalo().size() << std::endl;
33  std::cout << " Number of Electrons: " << getElecsInVertexInCalo().size() + getElecsInVertexOutCalo().size()
34  << std::endl;
35 }
36 
38  std::ostringstream out;
39  out << Jet::print() // generic jet info
40  << " JPTJet specific:" << std::endl
41  << " charged: " << chargedMultiplicity() << std::endl;
42  out << " JPTCandidate constituents:" << std::endl;
43 
44  out << " Number of pions: " << getPionsInVertexInCalo().size() + getPionsInVertexOutCalo().size() << std::endl;
45  out << " Number of muons: " << getMuonsInVertexInCalo().size() + getMuonsInVertexOutCalo().size() << std::endl;
46  out << " Number of Electrons: " << getElecsInVertexInCalo().size() + getElecsInVertexOutCalo().size() << std::endl;
47 
48  return out.str();
49 }
JPTJet * clone() const override
Polymorphic clone.
Definition: JPTJet.cc:22
bool overlap(const Candidate &) const override
Polymorphic overlap.
Definition: JPTJet.cc:24
const reco::TrackRefVector & getElecsInVertexOutCalo() const
Definition: JPTJet.h:115
const reco::TrackRefVector & getElecsInVertexInCalo() const
Definition: JPTJet.h:114
std::vector< Constituent > Constituents
Definition: Jet.h:23
virtual void printJet() const
Print object in details.
Definition: JPTJet.cc:26
const reco::TrackRefVector & getMuonsInVertexOutCalo() const
Definition: JPTJet.h:112
Definition: Jet.py:1
Jets made from CaloJets corrected for ZSP and tracks.
Definition: JPTJet.h:28
virtual std::string print() const
Print object.
int chargedMultiplicity() const
chargedMultiplicity
Definition: JPTJet.h:94
const edm::RefToBase< reco::Jet > & getCaloJetRef() const
Definition: JPTJet.h:118
size_type size() const
Size of the RefVector.
Definition: RefVector.h:102
std::string print() const override
Print object.
Definition: JPTJet.cc:37
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
fixed size matrix
double et() const final
transverse energy
Structure Point Contains parameters of Gaussian fits to DMRs.
Definition: DMRtrends.cc:57
const reco::TrackRefVector & getPionsInVertexInCalo() const
Tracks.
Definition: JPTJet.h:108
double phi() const final
momentum azimuthal angle
const reco::TrackRefVector & getMuonsInVertexInCalo() const
Definition: JPTJet.h:111
const reco::TrackRefVector & getPionsInVertexOutCalo() const
Definition: JPTJet.h:109
double eta() const final
momentum pseudorapidity