File indexing completed on 2024-04-06 12:29:07
0001 #ifndef _GsfVertexSmoother_H_
0002 #define _GsfVertexSmoother_H_
0003
0004 #include "RecoVertex/VertexPrimitives/interface/VertexSmoother.h"
0005 #include "RecoVertex/GaussianSumVertexFit/interface/GsfVertexUpdator.h"
0006 #include "RecoVertex/GaussianSumVertexFit/interface/GsfVertexMerger.h"
0007 #include "RecoVertex/KalmanVertexFit/interface/KalmanVertexUpdator.h"
0008 #include "RecoVertex/KalmanVertexFit/interface/KalmanVertexTrackUpdator.h"
0009 #include "RecoVertex/KalmanVertexFit/interface/KalmanSmoothedVertexChi2Estimator.h"
0010 #include "RecoVertex/GaussianSumVertexFit/interface/GsfVertexWeightCalculator.h"
0011 #include "RecoVertex/VertexTools/interface/VertexTrackFactory.h"
0012 #include "DataFormats/GeometryCommonDetAlgo/interface/DeepCopyPointerByClone.h"
0013 #include "RecoVertex/KalmanVertexFit/interface/KVFHelper.h"
0014
0015
0016
0017
0018
0019
0020
0021 class GsfVertexSmoother : public VertexSmoother<5> {
0022 public:
0023
0024
0025
0026
0027
0028
0029 GsfVertexSmoother(bool limit, const GsfVertexMerger* merger);
0030
0031 ~GsfVertexSmoother() override {}
0032
0033
0034
0035
0036
0037
0038
0039
0040 CachingVertex<5> smooth(const CachingVertex<5>& vertex) const override;
0041
0042
0043
0044
0045
0046 const VertexUpdator<5>* vertexUpdator() const { return &theUpdator; }
0047
0048
0049
0050
0051 VertexSmoother<5>* clone() const override { return new GsfVertexSmoother(*this); }
0052
0053 private:
0054 typedef CachingVertex<5>::RefCountedVertexTrack RefCountedVertexTrack;
0055 typedef VertexTrack<5>::RefCountedLinearizedTrackState RefCountedLinearizedTrackState;
0056 typedef VertexTrack<5>::RefCountedRefittedTrackState RefCountedRefittedTrackState;
0057 typedef VertexTrack<5>::AlgebraicMatrix3M AlgebraicMatrix3M;
0058 typedef VertexTrack<5>::AlgebraicSymMatrixOO AlgebraicSymMatrixOO;
0059
0060 typedef std::vector<VertexState> VSC;
0061 typedef std::vector<RefCountedLinearizedTrackState> LTC;
0062 typedef std::pair<double, double> VtxTrkChi2Pair;
0063 typedef std::pair<RefCountedRefittedTrackState, double> TrackWeightPair;
0064 typedef std::pair<RefCountedRefittedTrackState, VtxTrkChi2Pair> TrackChi2Pair;
0065 typedef std::pair<TrackWeightPair, VtxTrkChi2Pair> RefittedTrackComponent;
0066
0067 VertexState meanVertex(const VertexState& vertexA, const VertexState& vertexB) const;
0068
0069 TrackChi2Pair vertexAndTrackUpdate(const VertexState& oldVertex,
0070 const RefCountedVertexTrack track,
0071 const GlobalPoint& referencePosition) const;
0072
0073 RefittedTrackComponent createNewComponent(const VertexState& oldVertex,
0074 const RefCountedLinearizedTrackState linTrack,
0075 float weight) const;
0076
0077 TrackChi2Pair assembleTrackComponents(const std::vector<RefittedTrackComponent>& trackComponents,
0078 const GlobalPoint& referencePosition) const;
0079
0080
0081
0082
0083
0084
0085
0086
0087 double priorVertexChi2(const VertexState priorVertex, const VertexState fittedVertex) const;
0088
0089 bool limitComponents;
0090 DeepCopyPointerByClone<GsfVertexMerger> theMerger;
0091 GsfVertexUpdator theUpdator;
0092 KalmanVertexUpdator<5> kalmanVertexUpdator;
0093 KalmanSmoothedVertexChi2Estimator<5> smoothedChi2Estimator;
0094 KalmanVertexTrackUpdator<5> theVertexTrackUpdator;
0095 GsfVertexWeightCalculator theWeightCalculator;
0096 VertexTrackFactory<5> theVTFactory;
0097 KVFHelper<5> helper;
0098 };
0099
0100 #endif