00001 // -*- C++ -*- 00002 #ifndef RIVET_SVertex_HH 00003 #define RIVET_SVertex_HH 00004 00005 #include "Rivet/Rivet.hh" 00006 #include "Rivet/Projection.hh" 00007 #include "Rivet/Projections/PVertex.hh" 00008 #include "Rivet/Projections/ChargedFinalState.hh" 00009 #include "Rivet/Event.hh" 00010 00011 namespace Rivet { 00012 00013 00014 /** 00015 @brief Determine secondary vertices. 00016 00017 Makes use of PVertex projection. 00018 00019 @todo Replace function with a functor to improve equality comparisons. 00020 00021 Complex cuts on tracks and vertices to validate them have to be provided 00022 by an external function 00023 bool f(SVertex&, ParticleVector&, const HepMC::GenVertex&, FourMomentum); 00024 which can be embedded in the analysis code. An example can be found 00025 in the S6653332 analysis. A pointer to this function has to be given 00026 to the constructor of the SVertex projection. Its arguments are as follows: 00027 00028 in: reference to instance of SVertex projection, ParticleVector of 00029 vertex to be analyzed, primary (Gen)Vertex 00030 out: FourMomentum = visible Momentum of vertex (selected tracks), 00031 return bool: cuts passed? 1 : 0 00032 00033 In this way the SVertex projection can be kept as universal/flexible 00034 as possible. 00035 00036 The constructor expects also a list of (pre-selected) jets. 00037 Associated tracks and vertices to a jet are checked for displacement. 00038 A list of tagged jets can be obtained via the getTaggedJets() function 00039 */ 00040 class SVertex : public Projection { 00041 public: 00042 00043 /// @name Standard constructors and destructors. 00044 //@{ 00045 /// The default constructor. Must specify a PVertex 00046 /// projection object which is assumed to live through the run. 00047 SVertex(const ChargedFinalState& chfs, 00048 const vector<FourMomentum>& jetaxes, double deltaR, 00049 double detEta, double IPres, double DLS, double DLSres=0.0) 00050 : _jetaxes(jetaxes), _deltaR(deltaR), 00051 _detEta(detEta), _IPres(IPres), _DLS(DLS), 00052 _DLSres(DLSres) 00053 { 00054 setName("SVertex"); 00055 addProjection(PVertex(), "PV"); 00056 addProjection(chfs, "FS"); 00057 if (_DLSres == 0.0) { 00058 _DLSres = _IPres; 00059 } 00060 } 00061 00062 /// Clone on the heap. 00063 virtual const Projection* clone() const { 00064 return new SVertex(*this); 00065 } 00066 //@} 00067 00068 00069 public: 00070 /// Return vector of tagged jets (FourMomentum's) 00071 const vector<FourMomentum>& getTaggedJets() const { 00072 return _taggedjets; 00073 } 00074 00075 protected: 00076 00077 /// Apply the projection to the event. 00078 void project(const Event& e); 00079 00080 /// Compare projections. 00081 int compare(const Projection& p) const; 00082 00083 private: 00084 00085 /// The jet axes of the jet algorithm projection 00086 const vector<FourMomentum>& _jetaxes; 00087 00088 /// Max distance between vis. momentum of vertex and jet to be probed 00089 double _deltaR; 00090 00091 /// Analysis dependent cuts to be specified in analysis function 00092 /// @todo Replace with inheritance-based cut method. 00093 //bool (*_applyVtxTrackCuts) (const ParticleVector&, const Vector3&, FourMomentum); 00094 bool _applyVtxTrackCuts(const ParticleVector&, const Vector3&, FourMomentum); 00095 00096 /// Geometrical acceptance of tracker 00097 double _detEta; 00098 00099 /// Impact parameter resolution, (including beam size) 00100 double _IPres; 00101 00102 /// Decay length significance (cut value) 00103 double _DLS; 00104 00105 /// Decay length significance uncertainty 00106 double _DLSres; 00107 00108 /// Jets which have been tagged 00109 vector<FourMomentum> _taggedjets; 00110 }; 00111 00112 } 00113 00114 #endif