Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:28:10

0001 #ifndef RecoBTag_AnnealingGhostTrackFitter_h
0002 #define RecoBTag_AnnealingGhostTrackFitter_h
0003 
0004 #include <vector>
0005 #include <memory>
0006 
0007 #include "RecoVertex/VertexTools/interface/AnnealingSchedule.h"
0008 
0009 #include "RecoVertex/GhostTrackFitter/interface/GhostTrackFitter.h"
0010 #include "RecoVertex/GhostTrackFitter/interface/SequentialGhostTrackFitter.h"
0011 
0012 namespace reco {
0013 
0014   class GhostTrackPrediction;
0015   class GhostTrackState;
0016 
0017   class AnnealingGhostTrackFitter : public SequentialGhostTrackFitter {
0018   public:
0019     AnnealingGhostTrackFitter();
0020     AnnealingGhostTrackFitter(const AnnealingGhostTrackFitter &orig)
0021         : annealing(orig.annealing->clone()), firstStep(orig.firstStep) {}
0022     ~AnnealingGhostTrackFitter() override {}
0023 
0024   private:
0025     FitterImpl *clone() const override { return new AnnealingGhostTrackFitter(*this); }
0026 
0027     bool stable(const GhostTrackPrediction &before, const GhostTrackPrediction &after) const override {
0028       return SequentialGhostTrackFitter::stable(before, after) && annealing->isAnnealed();
0029     }
0030 
0031     void reset() override {
0032       annealing->resetAnnealing();
0033       firstStep = true;
0034     }
0035     void postFit(const GhostTrackFitter::PredictionUpdater &updater,
0036                  const GhostTrackPrediction &pred,
0037                  std::vector<GhostTrackState> &states) override;
0038 
0039     std::unique_ptr<AnnealingSchedule> annealing;
0040     bool firstStep;
0041   };
0042 
0043 }  // namespace reco
0044 
0045 #endif  // RecoBTag_AnnealingGhostTrackFitter_h