Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef MuonSeedGenerator_MuonSeedOrcaPatternRecognition_h
0002 #define MuonSeedGenerator_MuonSeedOrcaPatternRecognition_h
0003 
0004 #include "RecoMuon/MuonSeedGenerator/src/MuonSeedVPatternRecognition.h"
0005 #include "FWCore/Framework/interface/ConsumesCollector.h"
0006 #include "FWCore/Utilities/interface/ESGetToken.h"
0007 #include "RecoMuon/MeasurementDet/interface/MuonDetLayerMeasurements.h"
0008 #include "RecoMuon/DetLayers/interface/MuonDetLayerGeometry.h"
0009 #include "RecoMuon/Records/interface/MuonRecoGeometryRecord.h"
0010 
0011 class MuonSeedOrcaPatternRecognition : public MuonSeedVPatternRecognition {
0012 public:
0013   explicit MuonSeedOrcaPatternRecognition(const edm::ParameterSet& pset, edm::ConsumesCollector& iC);
0014 
0015   void produce(const edm::Event& event,
0016                const edm::EventSetup& eSetup,
0017                std::vector<MuonRecHitContainer>& result) override;
0018 
0019 private:
0020   // aalocates a zeroed array of a given size
0021   bool* zero(unsigned listSize);
0022 
0023   void endcapPatterns(const MuonRecHitContainer& me11,
0024                       const MuonRecHitContainer& me12,
0025                       const MuonRecHitContainer& me2,
0026                       const MuonRecHitContainer& me3,
0027                       const MuonRecHitContainer& me4,
0028                       const MuonRecHitContainer& me0,
0029                       const MuonRecHitContainer& mb1,
0030                       const MuonRecHitContainer& mb2,
0031                       const MuonRecHitContainer& mb3,
0032                       bool* MB1,
0033                       bool* MB2,
0034                       bool* MB3,
0035                       std::vector<MuonRecHitContainer>& result);
0036 
0037   void complete(MuonRecHitContainer& seedSegments, const MuonRecHitContainer& recHits, bool* used = nullptr) const;
0038 
0039   MuonRecHitPointer bestMatch(const ConstMuonRecHitPointer& first, MuonRecHitContainer& good_rhit) const;
0040   // some score to measure how well the two hits match
0041   double discriminator(const ConstMuonRecHitPointer& first, MuonRecHitPointer& other) const;
0042   // see if it's OK to add
0043   bool check(const MuonRecHitContainer& segments);
0044   bool isCrack(const ConstMuonRecHitPointer& segment) const;
0045   void rememberCrackSegments(const MuonRecHitContainer& segments, MuonRecHitContainer& crackSegments) const;
0046 
0047   void dumpLayer(const char* name, const MuonRecHitContainer& segments) const;
0048 
0049   /// apply some cuts to segments before using them
0050   MuonRecHitContainer filterSegments(const MuonRecHitContainer& segments, double dThetaCut) const;
0051   void filterOverlappingChambers(MuonRecHitContainer& segments) const;
0052   bool isME1A(const ConstMuonRecHitPointer& segment) const;
0053   int countHits(const MuonRecHitPointer& segment) const;
0054   // can mark other ME1A as used if one is.
0055   void markAsUsed(int nr, const MuonRecHitContainer& recHits, bool* used) const;
0056   std::vector<double> theCrackEtas;
0057   double theCrackWindow;
0058   MuonDetLayerMeasurements* muonMeasurements;
0059   double theDeltaPhiWindow;
0060   double theDeltaEtaWindow;
0061   double theDeltaCrackWindow;
0062   edm::ESGetToken<MuonDetLayerGeometry, MuonRecoGeometryRecord> muonLayersToken;
0063 };
0064 
0065 #endif