Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:32:51

0001 #ifndef Validation_MuonHits_RPCSimHitMatcher_h
0002 #define Validation_MuonHits_RPCSimHitMatcher_h
0003 
0004 /**\class RPCSimHitMatcher
0005 
0006    Description: Matching of RPC SimHit to SimTrack
0007 
0008    Author: Sven Dildick (TAMU), Tao Huang (TAMU)
0009 */
0010 
0011 #include "FWCore/Utilities/interface/ESGetToken.h"
0012 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0013 #include "Geometry/RPCGeometry/interface/RPCGeometry.h"
0014 #include "Validation/MuonHits/interface/MuonSimHitMatcher.h"
0015 
0016 class RPCSimHitMatcher : public MuonSimHitMatcher {
0017 public:
0018   // constructor
0019   RPCSimHitMatcher(const edm::ParameterSet& iPS, edm::ConsumesCollector&& iC);
0020 
0021   // destructor
0022   ~RPCSimHitMatcher() {}
0023 
0024   // initialize the event
0025   void init(const edm::Event& e, const edm::EventSetup& eventSetup);
0026 
0027   // do the matching
0028   void match(const SimTrack& t, const SimVertex& v);
0029 
0030   // partitions' detIds with SimHits
0031   std::set<unsigned int> detIds(int type = MuonHitHelper::RPC_ALL) const;
0032 
0033   // chamber detIds with SimHits
0034   std::set<unsigned int> chamberIds(int type = MuonHitHelper::RPC_ALL) const;
0035 
0036   bool hitStation(int st) const;
0037 
0038   // number of stations with hits
0039   int nStations() const;
0040 
0041   // calculate average strip number for a provided collection of simhits
0042   float simHitsMeanStrip(const edm::PSimHitContainer& sim_hits) const;
0043 
0044   std::set<int> hitStripsInDetId(unsigned int, int margin_n_strips = 0) const;
0045 
0046 private:
0047   void matchSimHitsToSimTrack();
0048 
0049   edm::ESGetToken<RPCGeometry, MuonGeometryRecord> geomToken_;
0050 };
0051 
0052 #endif