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  ~TrackJet() override {}
40  TrackJet * clone () const override;
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  std::string print () const override;
60 
61  private:
62 
64  bool overlap(const Candidate & dummy) const override;
65 
66  private:
67 
70 
71  };
72 
73 }
74 
75 #endif
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
TrackJet * clone() const override
Polymorphic clone.
Definition: TrackJet.cc:28
std::string print() const override
Print object.
Definition: TrackJet.cc:90
bool overlap(const Candidate &dummy) const override
Polymorphic overlap.
Definition: TrackJet.cc:85
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
size_t numberOfDaughters() const override
number of daughters
Definition: Jet.py:1
~TrackJet() override
Destructor.
Definition: TrackJet.h:38
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
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:37
fixed size matrix
Structure Point Contains parameters of Gaussian fits to DMRs.
Definition: DMRtrends.cc:55
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
void resetCharge()
calculate and set the charge by adding up the constituting track charges
Definition: TrackJet.cc:66