00001 #ifndef MuonIdentification_MuonIdTruthInfo_h 00002 #define MuonIdentification_MuonIdTruthInfo_h 1 00003 00004 // add MC hits to a list of matched segments. The only 00005 // way to differentiat hits is the error on the local 00006 // hit position. It's -9999 for a MC hit 00007 // Since it's debugging mode - code is slow 00008 00009 #include "FWCore/Framework/interface/EventSetup.h" 00010 #include "FWCore/Framework/interface/Event.h" 00011 #include "DataFormats/MuonReco/interface/Muon.h" 00012 #include "DataFormats/MuonReco/interface/MuonSegmentMatch.h" 00013 #include "SimDataFormats/TrackingHit/interface/PSimHit.h" 00014 #include "DataFormats/DetId/interface/DetId.h" 00015 #include "DataFormats/TrackReco/interface/Track.h" 00016 #include "SimDataFormats/Track/interface/SimTrack.h" 00017 #include "Geometry/CommonDetUnit/interface/GlobalTrackingGeometry.h" 00018 #include "FWCore/Framework/interface/ESHandle.h" 00019 00020 class MuonIdTruthInfo 00021 { 00022 public: 00023 static void truthMatchMuon( const edm::Event& iEvent, 00024 const edm::EventSetup& iSetup, 00025 reco::Muon& aMuon); 00026 private: 00027 static void checkSimHitForBestMatch(reco::MuonSegmentMatch& segmentMatch, 00028 double& distance, 00029 const PSimHit& hit, 00030 const DetId& chamberId, 00031 const edm::ESHandle<GlobalTrackingGeometry>& geometry); 00032 00033 static double matchChi2( const reco::Track& recoTrk, 00034 const SimTrack& simTrk); 00035 }; 00036 #endif