Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:22:12

0001 #ifndef __L1Trigger_VertexFinder_Vertex_h__
0002 #define __L1Trigger_VertexFinder_Vertex_h__
0003 
0004 #include <vector>
0005 
0006 #include "L1Trigger/VertexFinder/interface/TP.h"
0007 
0008 namespace l1tVertexFinder {
0009 
0010   class Vertex {
0011   public:
0012     // Fill useful info about tracking particle.
0013     Vertex() { Vertex(-999.); }
0014 
0015     Vertex(double vz) : vz_(vz) {
0016       z0_ = -999.;
0017       z0width_ = -999.;
0018       pT_ = -999.;
0019     }
0020 
0021     ~Vertex() {}
0022 
0023     /// Tracking Particles in vertex
0024     const std::vector<TP>& tracks() const { return tracks_; }
0025     /// Number of tracks originating from this vertex
0026     unsigned int numTracks() const { return tracks_.size(); }
0027     /// Assign TP to this vertex
0028     void insert(TP& tp) { tracks_.push_back(tp); }
0029     /// Compute vertex parameters
0030     void computeParameters();
0031     /// Sum of fitted tracks transverse momentum [GeV]
0032     double pT() const { return pT_; }
0033     /// Vertex z0 position [cm]
0034     double z0() const { return z0_; }
0035     /// Vertex z0 width [cm]
0036     double z0width() const { return z0width_; }
0037     /// Vertex z position [cm]
0038     double vz() const { return vz_; }
0039     /// Reset/initialize all of the member data
0040     void reset();
0041 
0042   private:
0043     double vz_;
0044     double z0_;
0045     double z0width_;
0046     double pT_;
0047 
0048     std::vector<TP> tracks_;
0049   };
0050 
0051 }  // end namespace l1tVertexFinder
0052 
0053 #endif