Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:27:10

0001 #ifndef MuonSeedGenerator_SETSeedFinder_h
0002 #define MuonSeedGenerator_SETSeedFinder_h
0003 
0004 #include "RecoMuon/MuonSeedGenerator/src/MuonSeedVFinder.h"
0005 #include "RecoMuon/TrackingTools/interface/MuonServiceProxy.h"
0006 #include "RecoMuon/MuonSeedGenerator/src/MuonSeedPtExtractor.h"
0007 #include "RecoMuon/MuonSeedGenerator/src/SETFilter.h"
0008 #include "CLHEP/Matrix/Vector.h"
0009 #include "CLHEP/Vector/ThreeVector.h"
0010 
0011 class SETSeedFinder : public MuonSeedVFinder {
0012 public:
0013   typedef MuonTransientTrackingRecHit::MuonRecHitContainer MuonRecHitContainer;
0014 
0015   explicit SETSeedFinder(const edm::ParameterSet& pset);
0016   ~SETSeedFinder() override { delete thePtExtractor; }
0017   /// ignore - uses MuonServiceProxy
0018   void setBField(const MagneticField* field) override {}
0019 
0020   /** The container sent in is expected to be a cluster, which isn't the same as
0021       a pattern.  A cluster can have more than one hit on a layer.  Internally,
0022       this method splits the cluster into patterns, and chooses the best one via a chi2.
0023       But it calculates the trajectoryMeasurements at the same time, so we can't
0024       really separate the steps.
0025   */
0026 
0027   void seeds(const MuonRecHitContainer& cluster, std::vector<TrajectorySeed>& result) override;
0028 
0029   void setServiceProxy(MuonServiceProxy* service) { theService = service; }
0030 
0031   std::vector<MuonRecHitContainer> sortByLayer(MuonRecHitContainer& cluster) const;
0032 
0033   //---- For protection against huge memory consumtion
0034   void limitCombinatorics(std::vector<MuonRecHitContainer>& MuonRecHitContainer_perLayer);
0035 
0036   std::vector<MuonRecHitContainer> findAllValidSets(
0037       const std::vector<MuonRecHitContainer>& MuonRecHitContainer_perLayer);
0038 
0039   std::pair<int, int> checkAngleDeviation(double dPhi_1, double dPhi_2) const;
0040 
0041   void validSetsPrePruning(std::vector<MuonRecHitContainer>& allValidSets);
0042 
0043   void pre_prune(MuonRecHitContainer& validSet) const;
0044 
0045   std::vector<SeedCandidate> fillSeedCandidates(std::vector<MuonRecHitContainer>& allValidSets);
0046 
0047   void estimateMomentum(const MuonRecHitContainer& validSet, CLHEP::Hep3Vector& momentum, int& charge) const;
0048 
0049   TrajectorySeed makeSeed(const TrajectoryStateOnSurface& tsos,
0050                           const TransientTrackingRecHit::ConstRecHitContainer& hits) const;
0051 
0052 private:
0053   MuonServiceProxy* theService;
0054 
0055   bool apply_prePruning;
0056   bool useSegmentsInTrajectory;
0057 };
0058 
0059 #endif