Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:26:59

0001 #ifndef MuonIdentification_MuonIdTruthInfo_h
0002 #define MuonIdentification_MuonIdTruthInfo_h 1
0003 
0004 // add MC hits to a list of matched segments. The only
0005 // way to differentiat hits is the error on the local
0006 // hit position. It's -9999 for a MC hit
0007 // Since it's debugging mode - code is slow
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