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  << " chargedhadrons energy: " << chargedHadronEnergy() << std::endl
30  << " charged multiplicity: " << chargedMultiplicity() << std::endl;
31  std::cout << " JPTCandidate constituents:" << std::endl;
32  std::cout << " Number of pions: " << getPionsInVertexInCalo().size() + getPionsInVertexOutCalo().size() << std::endl;
33  std::cout << " Number of muons: " << getMuonsInVertexInCalo().size() + getMuonsInVertexOutCalo().size() << std::endl;
34  std::cout << " Number of Electrons: " << getElecsInVertexInCalo().size() + getElecsInVertexOutCalo().size()
35  << std::endl;
36 }
37 
39  std::ostringstream out;
40  out << Jet::print() // generic jet info
41  << " JPTJet specific:" << std::endl
42  << " chargedhadrons energy: " << chargedHadronEnergy() << std::endl
43  << " charged: " << chargedMultiplicity() << std::endl;
44  out << " JPTCandidate constituents:" << std::endl;
45 
46  out << " Number of pions: " << getPionsInVertexInCalo().size() + getPionsInVertexOutCalo().size() << std::endl;
47  out << " Number of muons: " << getMuonsInVertexInCalo().size() + getMuonsInVertexOutCalo().size() << std::endl;
48  out << " Number of Electrons: " << getElecsInVertexInCalo().size() + getElecsInVertexOutCalo().size() << std::endl;
49 
50  return out.str();
51 }
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:128
const reco::TrackRefVector & getElecsInVertexInCalo() const
Definition: JPTJet.h:127
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:125
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:107
const edm::RefToBase< reco::Jet > & getCaloJetRef() const
Definition: JPTJet.h:133
size_type size() const
Size of the RefVector.
Definition: RefVector.h:102
std::string print() const override
Print object.
Definition: JPTJet.cc:38
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
float chargedHadronEnergy() const
chargedHadronEnergy
Definition: JPTJet.h:91
const reco::TrackRefVector & getPionsInVertexInCalo() const
Tracks.
Definition: JPTJet.h:121
double phi() const final
momentum azimuthal angle
const reco::TrackRefVector & getMuonsInVertexInCalo() const
Definition: JPTJet.h:124
const reco::TrackRefVector & getPionsInVertexOutCalo() const
Definition: JPTJet.h:122
double eta() const final
momentum pseudorapidity