File indexing completed on 2024-04-06 12:11:23
0001 #ifndef RecoTrackAccumulator_h
0002 #define RecoTrackAccumulator_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #include "SimGeneral/MixingModule/interface/DigiAccumulatorMixMod.h"
0015 #include "FWCore/Framework/interface/ESHandle.h"
0016
0017 #include "FWCore/Framework/interface/Event.h"
0018 #include "FWCore/Framework/interface/EventPrincipal.h"
0019 #include "FWCore/Framework/interface/ProducesCollector.h"
0020 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0021 #include "SimGeneral/MixingModule/interface/PileUpEventPrincipal.h"
0022 #include "DataFormats/TrackReco/interface/TrackFwd.h"
0023 #include "DataFormats/TrackReco/interface/TrackExtra.h"
0024 #include "DataFormats/TrackReco/interface/TrackExtraFwd.h"
0025
0026 namespace edm {
0027 class ConsumesCollector;
0028 template <typename T>
0029 class Handle;
0030 class StreamID;
0031 }
0032
0033 class RecoTrackAccumulator : public DigiAccumulatorMixMod {
0034 public:
0035 explicit RecoTrackAccumulator(const edm::ParameterSet& conf, edm::ProducesCollector, edm::ConsumesCollector& iC);
0036 ~RecoTrackAccumulator() override;
0037
0038 void initializeEvent(edm::Event const& e, edm::EventSetup const& c) override;
0039 void accumulate(edm::Event const& e, edm::EventSetup const& c) override;
0040 void accumulate(PileUpEventPrincipal const& e, edm::EventSetup const& c, edm::StreamID const&) override;
0041 void finalizeEvent(edm::Event& e, edm::EventSetup const& c) override;
0042
0043 private:
0044 template <class T>
0045 void accumulateEvent(const T& e, edm::EventSetup const& c, const edm::InputTag& label);
0046
0047 std::unique_ptr<reco::TrackCollection> newTracks_;
0048 std::unique_ptr<reco::TrackExtraCollection> newTrackExtras_;
0049 std::unique_ptr<TrackingRecHitCollection> newHits_;
0050
0051 reco::TrackRefProd rNewTracks;
0052 reco::TrackExtraRefProd rNewTrackExtras;
0053 TrackingRecHitRefProd rNewHits;
0054
0055 edm::InputTag signalTracksTag;
0056 edm::InputTag pileUpTracksTag;
0057
0058 std::string outputLabel;
0059 };
0060
0061 #endif