CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 & getPionsInVertexOutCalo() const
Definition: JPTJet.h:122
Base class for all types of Jets.
Definition: Jet.h:20
std::vector< Constituent > Constituents
Definition: Jet.h:23
const edm::RefToBase< reco::Jet > & getCaloJetRef() const
Definition: JPTJet.h:133
virtual std::string print() const
Print object.
Jets made from CaloJets corrected for ZSP and tracks.
Definition: JPTJet.h:28
virtual void printJet() const
Print object in details.
Definition: JPTJet.cc:26
const reco::TrackRefVector & getPionsInVertexInCalo() const
Tracks.
Definition: JPTJet.h:121
std::string print() const override
Print object.
Definition: JPTJet.cc:38
const reco::TrackRefVector & getElecsInVertexOutCalo() const
Definition: JPTJet.h:128
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
const reco::TrackRefVector & getMuonsInVertexOutCalo() const
Definition: JPTJet.h:125
int chargedMultiplicity() const
chargedMultiplicity
Definition: JPTJet.h:107
double et() const final
transverse energy
Structure Point Contains parameters of Gaussian fits to DMRs.
Definition: DMRtrends.cc:57
size_type size() const
Size of the RefVector.
Definition: RefVector.h:102
tuple cout
Definition: gather_cfg.py:144
const reco::TrackRefVector & getElecsInVertexInCalo() const
Definition: JPTJet.h:127
double phi() const final
momentum azimuthal angle
float chargedHadronEnergy() const
chargedHadronEnergy
Definition: JPTJet.h:91
const reco::TrackRefVector & getMuonsInVertexInCalo() const
Definition: JPTJet.h:124
double eta() const final
momentum pseudorapidity