File indexing completed on 2024-04-06 12:26:59
0001 #ifndef MuonIdentification_MuonIdTruthInfo_h
0002 #define MuonIdentification_MuonIdTruthInfo_h 1
0003
0004
0005
0006
0007
0008
0009 #include "FWCore/Framework/interface/EventSetup.h"
0010 #include "FWCore/Framework/interface/Event.h"
0011 #include "DataFormats/MuonReco/interface/Muon.h"
0012 #include "DataFormats/MuonReco/interface/MuonSegmentMatch.h"
0013 #include "SimDataFormats/TrackingHit/interface/PSimHit.h"
0014 #include "DataFormats/DetId/interface/DetId.h"
0015 #include "DataFormats/TrackReco/interface/Track.h"
0016 #include "SimDataFormats/Track/interface/SimTrack.h"
0017 #include "Geometry/CommonDetUnit/interface/GlobalTrackingGeometry.h"
0018 #include "FWCore/Framework/interface/ESHandle.h"
0019 #include "FWCore/Framework/interface/ConsumesCollector.h"
0020
0021 class MuonIdTruthInfo {
0022 public:
0023 void registerConsumes(edm::ConsumesCollector& iC);
0024
0025 static void truthMatchMuon(const edm::Event& iEvent, const GlobalTrackingGeometry& iGeometry, reco::Muon& aMuon);
0026
0027 private:
0028 static void checkSimHitForBestMatch(reco::MuonSegmentMatch& segmentMatch,
0029 double& distance,
0030 const PSimHit& hit,
0031 const DetId& chamberId,
0032 const GlobalTrackingGeometry& geometry);
0033
0034 static double matchChi2(const reco::Track& recoTrk, const SimTrack& simTrk);
0035 };
0036 #endif