Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-04-24 02:25:19

0001 #ifndef SimGeneral_TrackingAnalysis_SimHitTPAssociationProducer_h
0002 #define SimGeneral_TrackingAnalysis_SimHitTPAssociationProducer_h
0003 
0004 #include "FWCore/Framework/interface/Event.h"
0005 #include "FWCore/Framework/interface/Frameworkfwd.h"
0006 #include "FWCore/Framework/interface/global/EDProducer.h"
0007 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0008 #include "FWCore/ParameterSet/interface/ParameterSetfwd.h"
0009 #include "FWCore/Utilities/interface/EDGetToken.h"
0010 
0011 #include "SimDataFormats/TrackingAnalysis/interface/TrackingParticle.h"
0012 #include "SimDataFormats/TrackingAnalysis/interface/TrackingParticleFwd.h"
0013 #include "SimDataFormats/TrackingHit/interface/PSimHitContainer.h"
0014 
0015 class SimHitTPAssociationProducer final : public edm::global::EDProducer<> {
0016 public:
0017   using SimHitTPPair = std::pair<TrackingParticleRef, TrackPSimHitRef>;
0018   using SimHitTPAssociationList = std::vector<SimHitTPPair>;
0019 
0020   explicit SimHitTPAssociationProducer(const edm::ParameterSet &);
0021   ~SimHitTPAssociationProducer() override;
0022 
0023   static bool simHitTPAssociationListGreater(SimHitTPPair i, SimHitTPPair j) { return (i.first.key() > j.first.key()); }
0024 
0025 private:
0026   void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override;
0027 
0028   std::vector<edm::EDGetTokenT<edm::PSimHitContainer>> _simHitSrc;
0029   edm::EDGetTokenT<TrackingParticleCollection> _trackingParticleSrc;
0030 };
0031 #endif