File indexing completed on 2024-04-06 12:29:01
0001 #ifndef _AdaptiveVertexReconstructor_H_
0002 #define _AdaptiveVertexReconstructor_H_
0003
0004 #include "RecoVertex/VertexPrimitives/interface/VertexReconstructor.h"
0005 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0006 #include "RecoVertex/AdaptiveVertexFit/interface/AdaptiveVertexFitter.h"
0007 #include <set>
0008
0009 class AdaptiveVertexReconstructor : public VertexReconstructor {
0010 public:
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 AdaptiveVertexReconstructor(float primcut = 2.0, float seccut = 6.0, float minweight = 0.5, bool smoothing = false);
0021
0022 ~AdaptiveVertexReconstructor() override;
0023
0024
0025
0026
0027
0028
0029
0030
0031 AdaptiveVertexReconstructor(const edm::ParameterSet &s);
0032
0033 std::vector<TransientVertex> vertices(const std::vector<reco::TransientTrack> &v) const override;
0034
0035 std::vector<TransientVertex> vertices(const std::vector<reco::TransientTrack> &,
0036 const reco::BeamSpot &) const override;
0037
0038 std::vector<TransientVertex> vertices(const std::vector<reco::TransientTrack> &primaries,
0039 const std::vector<reco::TransientTrack> &tracks,
0040 const reco::BeamSpot &) const override;
0041
0042 AdaptiveVertexReconstructor *clone() const override { return new AdaptiveVertexReconstructor(*this); }
0043
0044 private:
0045
0046
0047
0048 std::vector<TransientVertex> vertices(const std::vector<reco::TransientTrack> &primaries,
0049 const std::vector<reco::TransientTrack> &trks,
0050 const reco::BeamSpot &,
0051 bool has_primaries,
0052 bool usespot) const;
0053
0054
0055
0056
0057
0058 void erase(const TransientVertex &newvtx, std::set<reco::TransientTrack> &remainingtrks, float w) const;
0059
0060
0061
0062
0063
0064 std::vector<TransientVertex> cleanUpVertices(const std::vector<TransientVertex> &) const;
0065
0066
0067
0068 void setupFitters(float primcut, float primT, float primr, float seccut, float secT, float secr, bool smoothing);
0069
0070 TransientVertex cleanUp(const TransientVertex &old) const;
0071
0072 private:
0073 AdaptiveVertexFitter *thePrimaryFitter;
0074 AdaptiveVertexFitter *theSecondaryFitter;
0075
0076
0077 float theMinWeight;
0078
0079 float theWeightThreshold;
0080 };
0081
0082 #endif