CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/Calibration/IsolatedParticles/interface/MatchingSimTrack.h

Go to the documentation of this file.
00001 #ifndef CalibrationIsolatedParticlesMatchingSimTrack_h
00002 #define CalibrationIsolatedParticlesMatchingSimTrack_h
00003 
00004 // system include files
00005 #include <memory>
00006 #include <map>
00007 #include <vector>
00008 
00009 // user include files
00010 #include "FWCore/Framework/interface/Frameworkfwd.h"
00011 
00012 #include "FWCore/Framework/interface/Event.h"
00013 
00014 #include "DataFormats/Common/interface/Handle.h"
00015 #include "DataFormats/TrackReco/interface/Track.h"
00016 #include "DataFormats/TrackReco/interface/TrackFwd.h"
00017 
00018 //sim track
00019 #include "SimDataFormats/Track/interface/SimTrack.h"
00020 #include "SimDataFormats/Track/interface/SimTrackContainer.h"
00021 #include "SimDataFormats/Vertex/interface/SimVertex.h"
00022 #include "SimDataFormats/Vertex/interface/SimVertexContainer.h"
00023 
00024 #include "SimTracker/TrackerHitAssociation/interface/TrackerHitAssociator.h"
00025 #include "SimTracker/Records/interface/TrackAssociatorRecord.h"
00026 
00027 
00028 namespace spr{
00029 
00030   struct simTkInfo {
00031     simTkInfo() {found=false; pdgId=0; charge=-99;}
00032     bool         found;
00033     int          pdgId;
00034     double       charge;
00035   };
00036 
00037   //Returns iterator to the SimTrack matching to the given Reco Track
00038   edm::SimTrackContainer::const_iterator matchedSimTrack(const edm::Event& iEvent, edm::Handle<edm::SimTrackContainer>& SimTk, edm::Handle<edm::SimVertexContainer>& SimVtx, const reco::Track* pTrack, TrackerHitAssociator& associate, bool debug=false);
00039     
00040   std::vector<int> matchedSimTrackId(const edm::Event&, edm::Handle<edm::SimTrackContainer>& SimTk, edm::Handle<edm::SimVertexContainer>& SimVtx, const reco::Track* pTrack, TrackerHitAssociator& associate, bool debug=false);
00041 
00042   simTkInfo matchedSimTrackInfo(unsigned int simTkId, edm::Handle<edm::SimTrackContainer>& SimTk, edm::Handle<edm::SimVertexContainer>& SimVtx, bool debug=false);
00043 
00044   bool validSimTrack(unsigned int simTkId, edm::SimTrackContainer::const_iterator thisTrkItr, edm::Handle<edm::SimTrackContainer>& SimTk, edm::Handle<edm::SimVertexContainer>& SimVtx, bool debug=false);
00045   
00046   //Returns the parent SimTrack of given SimTrack
00047   edm::SimTrackContainer::const_iterator parentSimTrack(edm::SimTrackContainer::const_iterator thisTrkItr, edm::Handle<edm::SimTrackContainer>& SimTk, edm::Handle<edm::SimVertexContainer>& SimVtx, bool debug=false);
00048 }
00049 
00050 #endif