File indexing completed on 2023-10-25 10:06:53
0001 #ifndef Validation_MuonHits_ME0SimHitMatcher_h
0002 #define Validation_MuonHits_ME0SimHitMatcher_h
0003
0004
0005
0006
0007
0008
0009
0010
0011 #include "FWCore/Utilities/interface/ESGetToken.h"
0012 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0013 #include "Geometry/GEMGeometry/interface/ME0Geometry.h"
0014 #include "Validation/MuonHits/interface/MuonSimHitMatcher.h"
0015
0016 class ME0SimHitMatcher : public MuonSimHitMatcher {
0017 public:
0018
0019 ME0SimHitMatcher(const edm::ParameterSet& iPS, edm::ConsumesCollector&& iC);
0020
0021
0022 ~ME0SimHitMatcher() {}
0023
0024
0025 void init(const edm::Event& e, const edm::EventSetup& eventSetup);
0026
0027
0028 void match(const SimTrack& t, const SimVertex& v);
0029
0030
0031 std::set<unsigned int> detIds() const;
0032
0033
0034 std::set<unsigned int> chamberIds() const;
0035
0036
0037 std::set<unsigned int> superChamberIds() const;
0038
0039
0040 const edm::PSimHitContainer& hitsInSuperChamber(unsigned int) const;
0041
0042
0043 int nLayersWithHitsInSuperChamber(unsigned int) const;
0044
0045
0046 std::set<unsigned int> superChamberIdsCoincidences(int min_n_layers = 4) const;
0047
0048
0049
0050 int nCoincidenceChambers(int min_n_layers = 4) const;
0051
0052
0053 float simHitsMeanStrip(const edm::PSimHitContainer& sim_hits) const;
0054
0055 std::set<int> hitStripsInDetId(unsigned int, int margin_n_strips = 0) const;
0056 std::set<int> hitPadsInDetId(unsigned int) const;
0057
0058
0059 std::set<int> hitPartitions() const;
0060
0061
0062 int nPadsWithHits() const;
0063
0064 private:
0065 void matchSimHitsToSimTrack();
0066
0067 edm::ESGetToken<ME0Geometry, MuonGeometryRecord> geomToken_;
0068
0069
0070 std::map<unsigned int, std::set<int> > detids_to_pads_;
0071
0072
0073 std::map<unsigned int, std::set<int> > detids_to_copads_;
0074
0075 std::map<unsigned int, edm::PSimHitContainer> superChamber_to_hits_;
0076 };
0077
0078 #endif