File indexing completed on 2024-04-06 12:30:46
0001 #ifndef MCTruth_MuonAssociatorEDProducer_h
0002 #define MCTruth_MuonAssociatorEDProducer_h
0003
0004 #include "SimDataFormats/Associations/interface/TrackAssociation.h"
0005 #include "FWCore/Framework/interface/Event.h"
0006 #include "FWCore/Framework/interface/EventSetup.h"
0007 #include "FWCore/Framework/interface/stream/EDProducer.h"
0008 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0009 #include "FWCore/Utilities/interface/InputTag.h"
0010 #include "SimMuon/MCTruth/interface/MuonAssociatorByHits.h"
0011 #include <memory>
0012
0013 class MuonAssociatorEDProducer : public edm::stream::EDProducer<> {
0014 public:
0015 explicit MuonAssociatorEDProducer(const edm::ParameterSet &);
0016 ~MuonAssociatorEDProducer() override;
0017
0018 private:
0019 virtual void beginJob();
0020 void produce(edm::Event &, const edm::EventSetup &) override;
0021 virtual void endJob();
0022
0023 edm::InputTag tracksTag;
0024 edm::InputTag tpTag;
0025 edm::EDGetTokenT<TrackingParticleCollection> tpToken_;
0026 edm::EDGetTokenT<TrackingParticleRefVector> tpRefVectorToken_;
0027 edm::EDGetTokenT<edm::View<reco::Track>> tracksToken_;
0028
0029 bool tpRefVector;
0030 bool ignoreMissingTrackCollection;
0031 edm::ParameterSet parset_;
0032 MuonAssociatorByHits *associatorByHits;
0033 };
0034
0035 #endif