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 // $Id: JPTJet.cc,v 1.1 2010/03/04 13:16:36 kodolova Exp $
4 #include <sstream>
5 
8 
9 //Own header file
11 
12 using namespace reco;
13 
14 JPTJet::JPTJet (const LorentzVector& fP4, const Point& fVertex,
15  const Specific& fSpecific, const Jet::Constituents& fConstituents
16  )
17  : Jet (fP4, fVertex),
18  mspecific (fSpecific)
19 {}
20 
22  const Specific& fSpecific, const Jet::Constituents& fConstituents
23  )
24  : Jet (fP4, Point(0,0,0)),
25  mspecific (fSpecific)
26 {}
27 
28 
29 JPTJet* JPTJet::clone () const {
30  return new JPTJet (*this);
31 }
32 
33 bool JPTJet::overlap( const Candidate & ) const {
34  return false;
35 }
36 
37 
38 void JPTJet::printJet () const {
39  std::cout << " Raw Calo jet " <<getCaloJetRef()->et()<<" "<<getCaloJetRef()->eta()<<" "<<getCaloJetRef()->phi()
40  << " JPTJet specific:" << std::endl
41  << " chargedhadrons energy: " << chargedHadronEnergy () << std::endl
42  << " charged multiplicity: " << chargedMultiplicity () << std::endl;
43  std::cout << " JPTCandidate constituents:" << std::endl;
44  std::cout<< " Number of pions: "<< getPionsInVertexInCalo().size()+getPionsInVertexOutCalo().size()<<std::endl;
45  std::cout<< " Number of muons: "<< getMuonsInVertexInCalo().size()+getMuonsInVertexOutCalo().size()<<std::endl;
46  std::cout<< " Number of Electrons: "<< getElecsInVertexInCalo().size()+getElecsInVertexOutCalo().size()<<std::endl;
47 
48 }
49 
50 std::string JPTJet::print () const {
51  std::ostringstream out;
52  out << Jet::print () // generic jet info
53  << " JPTJet specific:" << std::endl
54  << " chargedhadrons energy: " << chargedHadronEnergy () << std::endl
55  << " charged: " << chargedMultiplicity () << std::endl;
56  out << " JPTCandidate constituents:" << std::endl;
57 
58  out<< " Number of pions: "<< getPionsInVertexInCalo().size()+getPionsInVertexOutCalo().size()<<std::endl;
59  out<< " Number of muons: "<< getMuonsInVertexInCalo().size()+getMuonsInVertexOutCalo().size()<<std::endl;
60  out<< " Number of Electrons: "<< getElecsInVertexInCalo().size()+getElecsInVertexOutCalo().size()<<std::endl;
61 
62  return out.str ();
63 }
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:21
std::vector< Constituent > Constituents
Definition: Jet.h:24
const edm::RefToBase< reco::Jet > & getCaloJetRef() const
Definition: JPTJet.h:130
virtual double eta() const
momentum pseudorapidity
Jets made from CaloJets corrected for ZSP and tracks.
Definition: JPTJet.h:29
virtual void printJet() const
Print object in details.
Definition: JPTJet.cc:38
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:50
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:39
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:29
size_type size() const
Size of the RefVector.
Definition: RefVector.h:85
math::XYZPoint Point
point in the space
Definition: Candidate.h:43
tuple cout
Definition: gather_cfg.py:41
const reco::TrackRefVector & getElecsInVertexInCalo() const
Definition: JPTJet.h:122
virtual bool overlap(const Candidate &) const
Polymorphic overlap.
Definition: JPTJet.cc:33
virtual std::string print() const
Print object.
Definition: Jet.cc:366
virtual double phi() const
momentum azimuthal angle
float chargedHadronEnergy() const
chargedHadronEnergy
Definition: JPTJet.h:92
const reco::TrackRefVector & getMuonsInVertexInCalo() const
Definition: JPTJet.h:119