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 }
reco::JPTJet
Jets made from CaloJets corrected for ZSP and tracks.
Definition: JPTJet.h:28
reco::Jet::Constituents
std::vector< Constituent > Constituents
Definition: Jet.h:23
reco::JPTJet::getMuonsInVertexInCalo
const reco::TrackRefVector & getMuonsInVertexInCalo() const
Definition: JPTJet.h:124
reco::JPTJet::getElecsInVertexInCalo
const reco::TrackRefVector & getElecsInVertexInCalo() const
Definition: JPTJet.h:127
gather_cfg.cout
cout
Definition: gather_cfg.py:144
reco::JPTJet::chargedHadronEnergy
float chargedHadronEnergy() const
chargedHadronEnergy
Definition: JPTJet.h:91
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
Jet
Definition: Jet.py:1
reco::JPTJet::getCaloJetRef
const edm::RefToBase< reco::Jet > & getCaloJetRef() const
Definition: JPTJet.h:133
reco::Jet::print
virtual std::string print() const
Print object.
reco::JPTJet::getMuonsInVertexOutCalo
const reco::TrackRefVector & getMuonsInVertexOutCalo() const
Definition: JPTJet.h:125
reco::JPTJet::Specific
Definition: JPTJet.h:30
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
reco::JPTJet::printJet
virtual void printJet() const
Print object in details.
Definition: JPTJet.cc:26
reco::JPTJet::getPionsInVertexInCalo
const reco::TrackRefVector & getPionsInVertexInCalo() const
Tracks.
Definition: JPTJet.h:121
Point
Structure Point Contains parameters of Gaussian fits to DMRs.
Definition: DMRtrends.cc:57
reco::LeafCandidate::eta
double eta() const final
momentum pseudorapidity
Definition: LeafCandidate.h:152
reco::JPTJet::chargedMultiplicity
int chargedMultiplicity() const
chargedMultiplicity
Definition: JPTJet.h:107
reco::Candidate
Definition: Candidate.h:27
reco::LeafCandidate::et
double et() const final
transverse energy
Definition: LeafCandidate.h:127
reco::LeafCandidate::phi
double phi() const final
momentum azimuthal angle
Definition: LeafCandidate.h:148
reco::JPTJet::overlap
bool overlap(const Candidate &) const override
Polymorphic overlap.
Definition: JPTJet.cc:24
Exception.h
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
RecoCaloTowerCandidate.h
reco::Candidate::LorentzVector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
reco::JPTJet::JPTJet
JPTJet()
Definition: JPTJet.h:77
edm::RefVector::size
size_type size() const
Size of the RefVector.
Definition: RefVector.h:102
reco::JPTJet::clone
JPTJet * clone() const override
Polymorphic clone.
Definition: JPTJet.cc:22
reco::JPTJet::getPionsInVertexOutCalo
const reco::TrackRefVector & getPionsInVertexOutCalo() const
Definition: JPTJet.h:122
reco::JPTJet::print
std::string print() const override
Print object.
Definition: JPTJet.cc:38
reco::JPTJet::getElecsInVertexOutCalo
const reco::TrackRefVector & getElecsInVertexOutCalo() const
Definition: JPTJet.h:128
JPTJet.h