Rivet  1.8.3
SVertex.hh
1 // -*- C++ -*-
2 #ifndef RIVET_SVertex_HH
3 #define RIVET_SVertex_HH
4 
5 #include "Rivet/Rivet.hh"
6 #include "Rivet/Projection.hh"
7 #include "Rivet/Projections/PVertex.hh"
8 #include "Rivet/Projections/ChargedFinalState.hh"
9 #include "Rivet/Event.hh"
10 
11 namespace Rivet {
12 
13 
40  class SVertex : public Projection {
41  public:
42 
44 
45  SVertex(const ChargedFinalState& chfs,
48  const vector<FourMomentum>& jetaxes, double deltaR,
49  double detEta, double IPres, double DLS, double DLSres=0.0)
50  : _jetaxes(jetaxes), _deltaR(deltaR),
51  _detEta(detEta), _IPres(IPres), _DLS(DLS),
52  _DLSres(DLSres)
53  {
54  setName("SVertex");
55  addProjection(PVertex(), "PV");
56  addProjection(chfs, "FS");
57  if (_DLSres == 0.0) {
58  _DLSres = _IPres;
59  }
60  }
61 
63  virtual const Projection* clone() const {
64  return new SVertex(*this);
65  }
67 
68 
69  public:
71  const vector<FourMomentum>& getTaggedJets() const {
72  return _taggedjets;
73  }
74 
75  protected:
76 
78  void project(const Event& e);
79 
81  int compare(const Projection& p) const;
82 
83  private:
84 
86  const vector<FourMomentum>& _jetaxes;
87 
89  double _deltaR;
90 
93  //bool (*_applyVtxTrackCuts) (const ParticleVector&, const Vector3&, FourMomentum);
94  bool _applyVtxTrackCuts(const ParticleVector&, const Vector3&, FourMomentum);
95 
97  double _detEta;
98 
100  double _IPres;
101 
103  double _DLS;
104 
106  double _DLSres;
107 
109  vector<FourMomentum> _taggedjets;
110  };
111 
112 }
113 
114 #endif
void setName(const std::string &name)
Used by derived classes to set their name.
Definition: Projection.hh:120
Definition: MC_JetAnalysis.hh:9
virtual const Projection * clone() const
Clone on the heap.
Definition: SVertex.hh:63
SVertex(const ChargedFinalState &chfs, const vector< FourMomentum > &jetaxes, double deltaR, double detEta, double IPres, double DLS, double DLSres=0.0)
Definition: SVertex.hh:47
Definition: Event.hh:22
Get the position of the primary vertex of an event.
Definition: PVertex.hh:23
const vector< FourMomentum > & getTaggedJets() const
Return vector of tagged jets (FourMomentum's)
Definition: SVertex.hh:71
const PROJ & addProjection(const PROJ &proj, const std::string &name)
Definition: ProjectionApplier.hh:113
int compare(const Projection &p) const
Compare projections.
Definition: SVertex.cc:66
Project only charged final state particles.
Definition: ChargedFinalState.hh:16
Determine secondary vertices.
Definition: SVertex.hh:40
Base class for all Rivet projections.
Definition: Projection.hh:28
Three-dimensional specialisation of Vector.
Definition: Vector3.hh:26
Specialized version of the FourVector with momentum/energy functionality.
Definition: Vector4.hh:324
void project(const Event &e)
Apply the projection to the event.
Definition: SVertex.cc:79