Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:26:51

0001 #ifndef RecoPixelVertexing_PVPositionBuilder_h
0002 #define RecoPixelVertexing_PVPositionBuilder_h
0003 /** \class PVPositionBuilder PVPositionBuilder.h RecoPixelVertexing/PixelVertexFinding/PVPositionBuilder.h 
0004  * This helper class calculates the average Z position of a collection of
0005  * tracks.  You have the option of calculating the straight average,
0006  * or making a weighted average using the error of the Z of the tracks.  This
0007  * class is used by the pixel vertexing to make a PVCluster and is
0008  * used by other PVCluster-related classes
0009  *
0010  *  \author Aaron Dominguez (UNL)
0011  */
0012 #include "DataFormats/GeometryCommonDetAlgo/interface/Measurement1D.h"
0013 #include "DataFormats/TrackReco/interface/Track.h"
0014 #include "DataFormats/TrackReco/interface/TrackFwd.h"
0015 #include <vector>
0016 
0017 class PVPositionBuilder {
0018 public:
0019   /// Constructor does nothing, no data members
0020   PVPositionBuilder();
0021 
0022   /// Calculate unweighted average of Z of tracks from const collection of track pointers
0023   Measurement1D average(const reco::TrackRefVector& trks) const;
0024 
0025   /// Calculate Error-Weighted average of Z of tracks from const collection of track pointers
0026   Measurement1D wtAverage(const reco::TrackRefVector& trks) const;
0027 };
0028 #endif