Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:28:40

0001 #ifndef RecoTracker_PixelVertexFinding_PVClusterComparer_h
0002 #define RecoTracker_PixelVertexFinding_PVClusterComparer_h
0003 /** \class PVClusterComparer PVClusterComparer.h
0004  * RecoTracker/PixelVertexFinding/PVClusterComparer.h  
0005  * This helper class is used to sort the collection of vertexes by
0006  * sumPt.  It is used in DivisiveVertexFinder.  The sum of the squares
0007  * of the pT is only done for tracks with pT>2.5 GeV.  If the pT>10
0008  * GeV, then the max value of 10 is used.  (The pT of pixel tracks is
0009  * not very precise.)
0010  *
0011  *  \author Aaron Dominguez (UNL)
0012  */
0013 #include "RecoTracker/PixelVertexFinding/interface/PVCluster.h"
0014 #include "DataFormats/VertexReco/interface/Vertex.h"
0015 
0016 class PVClusterComparer {
0017 public:
0018   /// Constructor does nothing, no data members
0019   PVClusterComparer();
0020   PVClusterComparer(double track_pt_min, double track_pt_max, double track_chi2_max, double track_prob_min);
0021 
0022   /// Calculate sum of square of the pT's of the tracks in the vertex
0023   double pTSquaredSum(const PVCluster &v);
0024   double pTSquaredSum(const reco::Vertex &v);
0025   void setChisquareQuantile();
0026   void updateChisquareQuantile(size_t ndof);
0027 
0028   /// Use this operator in a std::sort to sort them in decreasing sumPt
0029   bool operator()(const PVCluster &v1, const PVCluster &v2);
0030   bool operator()(const reco::Vertex &v1, const reco::Vertex &v2);
0031 
0032   std::vector<double> maxChi2_;
0033 
0034   const double track_pT_min_;
0035   const double track_pT_max_;
0036   const double track_chi2_max_;
0037   const double track_prob_min_;
0038 };
0039 #endif