CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 
13 JPTJet::JPTJet (const LorentzVector& fP4, const Point& fVertex,
14  const Specific& fSpecific, const Jet::Constituents& fConstituents
15  )
16  : Jet (fP4, fVertex),
17  mspecific (fSpecific)
18 {}
19 
21  const Specific& fSpecific, const Jet::Constituents& fConstituents
22  )
23  : Jet (fP4, Point(0,0,0)),
24  mspecific (fSpecific)
25 {}
26 
27 
28 JPTJet* JPTJet::clone () const {
29  return new JPTJet (*this);
30 }
31 
32 bool JPTJet::overlap( const Candidate & ) const {
33  return false;
34 }
35 
36 
37 void JPTJet::printJet () const {
38  std::cout << " Raw Calo jet " <<getCaloJetRef()->et()<<" "<<getCaloJetRef()->eta()<<" "<<getCaloJetRef()->phi()
39  << " JPTJet specific:" << std::endl
40  << " chargedhadrons energy: " << chargedHadronEnergy () << std::endl
41  << " charged multiplicity: " << chargedMultiplicity () << std::endl;
42  std::cout << " JPTCandidate constituents:" << std::endl;
43  std::cout<< " Number of pions: "<< getPionsInVertexInCalo().size()+getPionsInVertexOutCalo().size()<<std::endl;
44  std::cout<< " Number of muons: "<< getMuonsInVertexInCalo().size()+getMuonsInVertexOutCalo().size()<<std::endl;
45  std::cout<< " Number of Electrons: "<< getElecsInVertexInCalo().size()+getElecsInVertexOutCalo().size()<<std::endl;
46 
47 }
48 
50  std::ostringstream out;
51  out << Jet::print () // generic jet info
52  << " JPTJet specific:" << std::endl
53  << " chargedhadrons energy: " << chargedHadronEnergy () << std::endl
54  << " charged: " << chargedMultiplicity () << std::endl;
55  out << " JPTCandidate constituents:" << std::endl;
56 
57  out<< " Number of pions: "<< getPionsInVertexInCalo().size()+getPionsInVertexOutCalo().size()<<std::endl;
58  out<< " Number of muons: "<< getMuonsInVertexInCalo().size()+getMuonsInVertexOutCalo().size()<<std::endl;
59  out<< " Number of Electrons: "<< getElecsInVertexInCalo().size()+getElecsInVertexOutCalo().size()<<std::endl;
60 
61  return out.str ();
62 }
const reco::TrackRefVector & getPionsInVertexOutCalo() const
Definition: JPTJet.h:117
virtual double et() const
transverse energy
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:130
virtual double eta() const
momentum pseudorapidity
virtual std::string print() const
Print object.
Jets made from CaloJets corrected for ZSP and tracks.
Definition: JPTJet.h:29
virtual void printJet() const
Print object in details.
Definition: JPTJet.cc:37
tuple out
Definition: dbtoconf.py:99
const reco::TrackRefVector & getPionsInVertexInCalo() const
Tracks.
Definition: JPTJet.h:116
const reco::TrackRefVector & getElecsInVertexOutCalo() const
Definition: JPTJet.h:123
virtual std::string print() const
Print object.
Definition: JPTJet.cc:49
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:37
const reco::TrackRefVector & getMuonsInVertexOutCalo() const
Definition: JPTJet.h:120
int chargedMultiplicity() const
chargedMultiplicity
Definition: JPTJet.h:108
virtual JPTJet * clone() const
Polymorphic clone.
Definition: JPTJet.cc:28
size_type size() const
Size of the RefVector.
Definition: RefVector.h:99
math::XYZPoint Point
point in the space
Definition: Candidate.h:41
tuple cout
Definition: gather_cfg.py:121
const reco::TrackRefVector & getElecsInVertexInCalo() const
Definition: JPTJet.h:122
virtual bool overlap(const Candidate &) const
Polymorphic overlap.
Definition: JPTJet.cc:32
virtual double phi() const
momentum azimuthal angle
float chargedHadronEnergy() const
chargedHadronEnergy
Definition: JPTJet.h:92
const reco::TrackRefVector & getMuonsInVertexInCalo() const
Definition: JPTJet.h:119