File indexing completed on 2024-05-02 05:10:05
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef TauAnalysis_MCEmbeddingTools_TrackMergeremb_H
0009 #define TauAnalysis_MCEmbeddingTools_TrackMergeremb_H
0010
0011 #include "DataFormats/Common/interface/Handle.h"
0012 #include "FWCore/Framework/interface/Event.h"
0013 #include "FWCore/Framework/interface/MakerMacros.h"
0014 #include "FWCore/Framework/interface/stream/EDProducer.h"
0015 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0016
0017 #include "DataFormats/EgammaReco/interface/SuperCluster.h"
0018 #include "DataFormats/EgammaReco/interface/SuperClusterFwd.h"
0019
0020 #include "DataFormats/EgammaReco/interface/ElectronSeed.h"
0021 #include "DataFormats/EgammaReco/interface/ElectronSeedFwd.h"
0022 #include "DataFormats/ParticleFlowReco/interface/PreId.h"
0023 #include "DataFormats/TrajectorySeed/interface/TrajectorySeed.h"
0024 #include "TrackingTools/PatternTools/interface/Trajectory.h"
0025
0026 #include "DataFormats/Common/interface/ValueMap.h"
0027 #include "DataFormats/MuonReco/interface/MuonQuality.h"
0028
0029 #include "DataFormats/MuonReco/interface/MuonToMuonMap.h"
0030 #include "DataFormats/TrackReco/interface/Track.h"
0031 #include "DataFormats/TrackReco/interface/TrackFwd.h"
0032
0033 #include "DataFormats/GsfTrackReco/interface/GsfTrack.h"
0034 #include "DataFormats/GsfTrackReco/interface/GsfTrackExtra.h"
0035 #include "DataFormats/GsfTrackReco/interface/GsfTrackExtraFwd.h"
0036 #include "DataFormats/GsfTrackReco/interface/GsfTrackFwd.h"
0037 #include "DataFormats/TrackReco/interface/TrackToTrackMap.h"
0038
0039 #include "Geometry/CommonDetUnit/interface/GlobalTrackingGeometry.h"
0040 #include "Geometry/Records/interface/GlobalTrackingGeometryRecord.h"
0041
0042 #include <iostream>
0043 #include <map>
0044 #include <string>
0045
0046 template <typename T1>
0047 class TrackMergeremb : public edm::stream::EDProducer<> {
0048 public:
0049 explicit TrackMergeremb(const edm::ParameterSet &);
0050 ~TrackMergeremb() override;
0051
0052 private:
0053 void produce(edm::Event &, const edm::EventSetup &) override;
0054
0055 typedef T1 TrackCollectionemb;
0056
0057 void willproduce(std::string instance, std::string alias);
0058 void willconsume(const edm::ParameterSet &iConfig);
0059 void merg_and_put(edm::Event &, std::string, std::vector<edm::EDGetTokenT<TrackCollectionemb>> &);
0060
0061 std::map<std::string, std::vector<edm::EDGetTokenT<TrackCollectionemb>>> inputs_;
0062 std::map<std::string, std::vector<edm::EDGetTokenT<edm::ValueMap<reco::MuonQuality>>>> inputs_qual_;
0063
0064 typedef edm::ValueMap<reco::TrackRefVector> TrackToTrackMapnew;
0065 typedef edm::ValueMap<reco::GsfTrackRefVector> GsfTrackToTrackMapnew;
0066
0067 edm::ESGetToken<GlobalTrackingGeometry, GlobalTrackingGeometryRecord> globalGeomToken_;
0068 const GlobalTrackingGeometry *geometry_ = nullptr;
0069
0070 edm::EDGetTokenT<TrackToTrackMapnew> inputs_fixtrackrefs_;
0071 edm::EDGetTokenT<reco::TrackCollection> inputs_fixtrackcol_;
0072
0073 edm::EDGetTokenT<GsfTrackToTrackMapnew> inputs_fixgsftrackrefs_;
0074 edm::EDGetTokenT<reco::GsfTrackCollection> inputs_fixgsftrackcol_;
0075
0076 edm::EDGetTokenT<reco::MuonToMuonMap> inputs_fixmurefs_;
0077 edm::EDGetTokenT<reco::MuonCollection> inputs_fixmucol_;
0078
0079 edm::EDGetTokenT<reco::SuperClusterCollection> inputs_SC_;
0080 edm::EDGetTokenT<reco::ElectronSeedCollection> inputs_rElectronMergedSeeds_;
0081 edm::EDGetTokenT<edm::View<TrajectorySeed>> inputs_rElectronMergedSeedViews_;
0082
0083 std::string alias;
0084 };
0085
0086 #endif