Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-08-23 03:24:46

0001 #ifndef CalibrationIsolatedParticlesMatchingSimTrack_h
0002 #define CalibrationIsolatedParticlesMatchingSimTrack_h
0003 
0004 // system include files
0005 #include <memory>
0006 #include <map>
0007 #include <vector>
0008 
0009 // user include files
0010 #include "FWCore/Framework/interface/Frameworkfwd.h"
0011 
0012 #include "FWCore/Framework/interface/Event.h"
0013 
0014 #include "DataFormats/Common/interface/Handle.h"
0015 #include "DataFormats/TrackReco/interface/Track.h"
0016 #include "DataFormats/TrackReco/interface/TrackFwd.h"
0017 
0018 //sim track
0019 #include "SimDataFormats/Track/interface/SimTrack.h"
0020 #include "SimDataFormats/Track/interface/SimTrackContainer.h"
0021 #include "SimDataFormats/Vertex/interface/SimVertex.h"
0022 #include "SimDataFormats/Vertex/interface/SimVertexContainer.h"
0023 
0024 #include "SimTracker/TrackerHitAssociation/interface/TrackerHitAssociator.h"
0025 
0026 namespace spr {
0027 
0028   struct simTkInfo {
0029     simTkInfo() {
0030       found = false;
0031       pdgId = 0;
0032       charge = -99;
0033     }
0034     bool found;
0035     int pdgId;
0036     double charge;
0037   };
0038 
0039   //Returns iterator to the SimTrack matching to the given Reco Track
0040   edm::SimTrackContainer::const_iterator matchedSimTrack(const edm::Event& iEvent,
0041                                                          edm::Handle<edm::SimTrackContainer>& SimTk,
0042                                                          edm::Handle<edm::SimVertexContainer>& SimVtx,
0043                                                          const reco::Track* pTrack,
0044                                                          TrackerHitAssociator& associate,
0045                                                          bool debug = false);
0046 
0047   std::vector<int> matchedSimTrackId(const edm::Event&,
0048                                      edm::Handle<edm::SimTrackContainer>& SimTk,
0049                                      edm::Handle<edm::SimVertexContainer>& SimVtx,
0050                                      const reco::Track* pTrack,
0051                                      TrackerHitAssociator& associate,
0052                                      bool debug = false);
0053 
0054   simTkInfo matchedSimTrackInfo(unsigned int simTkId,
0055                                 edm::Handle<edm::SimTrackContainer>& SimTk,
0056                                 edm::Handle<edm::SimVertexContainer>& SimVtx,
0057                                 bool debug = false);
0058 
0059   bool validSimTrack(unsigned int simTkId,
0060                      edm::SimTrackContainer::const_iterator thisTrkItr,
0061                      edm::Handle<edm::SimTrackContainer>& SimTk,
0062                      edm::Handle<edm::SimVertexContainer>& SimVtx,
0063                      bool debug = false);
0064 
0065   //Returns the parent SimTrack of given SimTrack
0066   edm::SimTrackContainer::const_iterator parentSimTrack(edm::SimTrackContainer::const_iterator thisTrkItr,
0067                                                         edm::Handle<edm::SimTrackContainer>& SimTk,
0068                                                         edm::Handle<edm::SimVertexContainer>& SimVtx,
0069                                                         bool debug = false);
0070 }  // namespace spr
0071 
0072 #endif