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 
21 
22 namespace reco {
23 
24  class TrackJet : public Jet {
25  public:
27  TrackJet();
29  TrackJet(const LorentzVector& fP4, const Point& fVertex);
31  TrackJet(const LorentzVector& fP4, const Point& fVertex, const Jet::Constituents& fConstituents);
33  ~TrackJet() override {}
35  TrackJet* clone() const override;
36 
38  size_t numberOfTracks() const { return numberOfDaughters(); }
40  virtual edm::Ptr<reco::Track> track(size_t i) const;
42  std::vector<edm::Ptr<reco::Track> > tracks() const;
43 
45  void resetCharge();
47  const reco::VertexRef primaryVertex() const;
51  bool fromHardVertex() const { return (this->primaryVertex().index() == 0); }
52 
54  std::string print() const override;
55 
56  private:
58  bool overlap(const Candidate& dummy) const override;
59 
60  private:
63  };
64 
65 } // namespace reco
66 
67 #endif
reco::VertexRef vtx_
Associated primary vertex.
Definition: TrackJet.h:62
bool fromHardVertex() const
check jet to be associated to the hard primary vertex
Definition: TrackJet.h:51
TrackJet()
Default constructor.
Definition: TrackJet.cc:7
std::vector< Constituent > Constituents
Definition: Jet.h:23
std::string print() const override
Print object.
Definition: TrackJet.cc:63
Definition: Jet.py:1
size_t numberOfTracks() const
Number of track daughters.
Definition: TrackJet.h:38
~TrackJet() override
Destructor.
Definition: TrackJet.h:33
void setPrimaryVertex(const reco::VertexRef &vtx)
set associated primary vertex
Definition: TrackJet.cc:59
TrackJet * clone() const override
Polymorphic clone.
Definition: TrackJet.cc:16
unsigned int index
Definition: LeafCandidate.h:31
Jets made out of tracks.
Definition: TrackJet.h:24
size_t numberOfDaughters() const override
number of daughters
virtual edm::Ptr< reco::Track > track(size_t i) const
Return Ptr to the track costituent.
Definition: TrackJet.cc:18
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
fixed size matrix
Structure Point Contains parameters of Gaussian fits to DMRs.
bool overlap(const Candidate &dummy) const override
Polymorphic overlap.
Definition: TrackJet.cc:61
std::vector< edm::Ptr< reco::Track > > tracks() const
Return pointers to all track costituents.
Definition: TrackJet.cc:42
const reco::VertexRef primaryVertex() const
get associated primary vertex
Definition: TrackJet.cc:57
void resetCharge()
calculate and set the charge by adding up the constituting track charges
Definition: TrackJet.cc:49