CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TrackJet.h
Go to the documentation of this file.
1 #ifndef DataFormats_JetReco_TrackJet_h
2 #define DataFormats_JetReco_TrackJet_h
3 
4 
24 
25 
26 namespace reco {
27 
28  class TrackJet : public Jet {
29 
30  public:
31 
33  TrackJet();
35  TrackJet(const LorentzVector & fP4, const Point & fVertex);
37  TrackJet(const LorentzVector & fP4, const Point & fVertex, const Jet::Constituents & fConstituents);
39  virtual ~TrackJet() {}
41  virtual TrackJet * clone () const;
42 
44  size_t numberOfTracks() const { return numberOfDaughters(); }
46  virtual edm::Ptr<reco::Track> track(size_t i) const;
48  std::vector<edm::Ptr<reco::Track> > tracks() const;
49 
51  void resetCharge();
53  const reco::VertexRef primaryVertex() const;
55  void setPrimaryVertex(const reco::VertexRef & vtx);
57  bool fromHardVertex() const { return (this->primaryVertex().index() == 0); }
58 
60  virtual std::string print () const;
61 
62  private:
63 
65  virtual bool overlap(const Candidate & dummy) const;
66 
67  private:
68 
71 
72  };
73 
74 }
75 
76 #endif
int i
Definition: DBlmapReader.cc:9
reco::VertexRef vtx_
Associated primary vertex.
Definition: TrackJet.h:70
bool fromHardVertex() const
check jet to be associated to the hard primary vertex
Definition: TrackJet.h:57
Base class for all types of Jets.
Definition: Jet.h:21
size_t numberOfTracks() const
Number of track daughters.
Definition: TrackJet.h:44
TrackJet()
Default constructor.
Definition: TrackJet.cc:9
std::vector< Constituent > Constituents
Definition: Jet.h:24
virtual size_t numberOfDaughters() const
number of daughters
virtual ~TrackJet()
Destructor.
Definition: TrackJet.h:39
virtual std::string print() const
Print object.
Definition: TrackJet.cc:91
void setPrimaryVertex(const reco::VertexRef &vtx)
set associated primary vertex
Definition: TrackJet.cc:81
unsigned int index
Definition: LeafCandidate.h:34
Jets made out of tracks.
Definition: TrackJet.h:28
virtual bool overlap(const Candidate &dummy) const
Polymorphic overlap.
Definition: TrackJet.cc:86
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:41
math::XYZPoint Point
point in the space
Definition: Candidate.h:45
const reco::VertexRef primaryVertex() const
get associated primary vertex
Definition: TrackJet.cc:76
std::vector< edm::Ptr< reco::Track > > tracks() const
Return pointers to all track costituents.
Definition: TrackJet.cc:60
virtual edm::Ptr< reco::Track > track(size_t i) const
Return Ptr to the track costituent.
Definition: TrackJet.cc:35
virtual TrackJet * clone() const
Polymorphic clone.
Definition: TrackJet.cc:29
void resetCharge()
calculate and set the charge by adding up the constituting track charges
Definition: TrackJet.cc:67