Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:20:30

0001 #ifndef RecoMuon_MuonIdentification_MuonKinkFinder_h
0002 #define RecoMuon_MuonIdentification_MuonKinkFinder_h
0003 
0004 #include "DataFormats/MuonReco/interface/MuonQuality.h"
0005 #include "FWCore/Framework/interface/FrameworkfwdMostUsed.h"
0006 #include "TrackingTools/TrackRefitter/interface/TrackTransformer.h"
0007 
0008 class MuonKinkFinder {
0009 public:
0010   MuonKinkFinder(const edm::ParameterSet &iConfig, edm::ConsumesCollector &iC);
0011   ~MuonKinkFinder();
0012 
0013   // set event setup
0014   void init(const edm::EventSetup &iSetup);
0015 
0016   // fill data, return false if refit failed or too few hits
0017   bool fillTrkKink(reco::MuonQuality &quality, const Trajectory &trajectory) const;
0018 
0019   // fill data, return false if refit failed or too few hits
0020   bool fillTrkKink(reco::MuonQuality &quality, const reco::Track &track) const;
0021 
0022 private:
0023   /// use only on-diagonal terms of the covariance matrices
0024   bool diagonalOnly_;
0025   /// if true, use full 5x5 track state; if false, use only the track direction
0026   bool usePosition_;
0027 
0028   /// Track Transformer
0029   TrackTransformer refitter_;
0030 
0031   // compute chi2 between track states
0032   double getChi2(const TrajectoryStateOnSurface &start, const TrajectoryStateOnSurface &other) const;
0033 
0034   // possibly crop matrix or set to zero off-diagonal elements, then invert
0035   void cropAndInvert(AlgebraicSymMatrix55 &cov) const;
0036 };
0037 #endif