Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:29:20

0001 #ifndef VertexCompatibleWithBeam_H
0002 #define VertexCompatibleWithBeam_H
0003 
0004 #include "DataFormats/VertexReco/interface/Vertex.h"
0005 #include "RecoVertex/VertexPrimitives/interface/VertexState.h"
0006 #include "DataFormats/BeamSpot/interface/BeamSpot.h"
0007 
0008 class VertexDistance;
0009 
0010 /**
0011  * True if the distance between the beam spot and the vertex, 
0012  * computed by the `dist` algorithm, is smaller than `cut`. 
0013  */
0014 
0015 class VertexCompatibleWithBeam {
0016 public:
0017   VertexCompatibleWithBeam(const VertexDistance &dist, float cut);
0018   VertexCompatibleWithBeam(const VertexDistance &dist, float cut, const reco::BeamSpot &beamSpot);
0019 
0020   VertexCompatibleWithBeam(const VertexCompatibleWithBeam &other);
0021   VertexCompatibleWithBeam &operator=(const VertexCompatibleWithBeam &other);
0022   virtual ~VertexCompatibleWithBeam();
0023 
0024   void setBeamSpot(const reco::BeamSpot &beamSpot);
0025   virtual bool operator()(const reco::Vertex &) const;
0026   virtual bool operator()(const reco::Vertex &, const VertexState &) const;
0027 
0028   // return value of VertexDistance to beam
0029   float distanceToBeam(const reco::Vertex &) const;
0030   float distanceToBeam(const reco::Vertex &, const VertexState &) const;
0031 
0032 private:
0033   VertexDistance *theDistance;
0034   float theCut;
0035   VertexState theBeam;
0036 };
0037 
0038 #endif