CMS 3D CMS Logo

TrackJet.h
Go to the documentation of this file.
1 #ifndef DataFormats_JetReco_TrackJet_h
2 #define DataFormats_JetReco_TrackJet_h
3 
4 
23 
24 
25 namespace reco {
26 
27  class TrackJet : public Jet {
28 
29  public:
30 
32  TrackJet();
34  TrackJet(const LorentzVector & fP4, const Point & fVertex);
36  TrackJet(const LorentzVector & fP4, const Point & fVertex, const Jet::Constituents & fConstituents);
38  virtual ~TrackJet() {}
40  virtual TrackJet * clone () const;
41 
43  size_t numberOfTracks() const { return numberOfDaughters(); }
45  virtual edm::Ptr<reco::Track> track(size_t i) const;
47  std::vector<edm::Ptr<reco::Track> > tracks() const;
48 
50  void resetCharge();
52  const reco::VertexRef primaryVertex() const;
54  void setPrimaryVertex(const reco::VertexRef & vtx);
56  bool fromHardVertex() const { return (this->primaryVertex().index() == 0); }
57 
59  virtual std::string print () const;
60 
61  private:
62 
64  virtual bool overlap(const Candidate & dummy) const;
65 
66  private:
67 
70 
71  };
72 
73 }
74 
75 #endif
int i
Definition: DBlmapReader.cc:9
reco::VertexRef vtx_
Associated primary vertex.
Definition: TrackJet.h:69
bool fromHardVertex() const
check jet to be associated to the hard primary vertex
Definition: TrackJet.h:56
size_t numberOfTracks() const
Number of track daughters.
Definition: TrackJet.h:43
TrackJet()
Default constructor.
Definition: TrackJet.cc:8
std::vector< Constituent > Constituents
Definition: Jet.h:23
virtual size_t numberOfDaughters() const
number of daughters
Definition: Jet.py:1
virtual ~TrackJet()
Destructor.
Definition: TrackJet.h:38
virtual std::string print() const
Print object.
Definition: TrackJet.cc:90
void setPrimaryVertex(const reco::VertexRef &vtx)
set associated primary vertex
Definition: TrackJet.cc:80
unsigned int index
Definition: LeafCandidate.h:31
Jets made out of tracks.
Definition: TrackJet.h:27
virtual bool overlap(const Candidate &dummy) const
Polymorphic overlap.
Definition: TrackJet.cc:85
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:37
fixed size matrix
math::XYZPoint Point
point in the space
Definition: Candidate.h:41
const reco::VertexRef primaryVertex() const
get associated primary vertex
Definition: TrackJet.cc:75
std::vector< edm::Ptr< reco::Track > > tracks() const
Return pointers to all track costituents.
Definition: TrackJet.cc:59
virtual edm::Ptr< reco::Track > track(size_t i) const
Return Ptr to the track costituent.
Definition: TrackJet.cc:34
virtual TrackJet * clone() const
Polymorphic clone.
Definition: TrackJet.cc:28
void resetCharge()
calculate and set the charge by adding up the constituting track charges
Definition: TrackJet.cc:66