CMS 3D CMS Logo

TTStubAssociator.h
Go to the documentation of this file.
1 
14 #ifndef L1_TRACK_TRIGGER_STUB_ASSOCIATOR_H
15 #define L1_TRACK_TRIGGER_STUB_ASSOCIATOR_H
16 
23 
25 
33 
38 
39 #include <memory>
40 #include <map>
41 #include <vector>
42 
43 template <typename T>
47 public:
49  explicit TTStubAssociator(const edm::ParameterSet& iConfig);
50 
51 private:
53  std::vector<edm::InputTag> ttStubsInputTags_;
54  std::vector<edm::InputTag> ttClusterTruthInputTags_;
55 
56  std::vector<edm::EDGetTokenT<edmNew::DetSetVector<TTStub<T> > > > ttStubsTokens_;
57  std::vector<edm::EDGetTokenT<TTClusterAssociationMap<T> > > ttClusterTruthTokens_;
58 
61 
63  void produce(edm::Event& iEvent, const edm::EventSetup& iSetup) override;
64 
65 };
66 
74 template <typename T>
77  ttStubsInputTags_ = iConfig.getParameter<std::vector<edm::InputTag> >("TTStubs");
78  ttClusterTruthInputTags_ = iConfig.getParameter<std::vector<edm::InputTag> >("TTClusterTruth");
79 
80  for (const auto& iTag : ttClusterTruthInputTags_) {
81  ttClusterTruthTokens_.push_back(consumes<TTClusterAssociationMap<T> >(iTag));
82  }
83 
84  for (const auto& iTag : ttStubsInputTags_) {
85  ttStubsTokens_.push_back(consumes<edmNew::DetSetVector<TTStub<T> > >(iTag));
86 
87  produces<TTStubAssociationMap<T> >(iTag.instance());
88  }
89 
90  theTrackerGeometryToken_ = esConsumes();
91  theTrackerTopologyToken_ = esConsumes();
92 
94  edm::LogInfo("TTStubAssociator< ") << templateNameFinder<T>() << " > loaded.";
95 }
96 
98 template <>
100 
101 #endif
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
std::vector< edm::InputTag > ttStubsInputTags_
Data members.
std::vector< edm::EDGetTokenT< edmNew::DetSetVector< TTStub< T > > > > ttStubsTokens_
std::vector< edm::EDGetTokenT< TTClusterAssociationMap< T > > > ttClusterTruthTokens_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > theTrackerTopologyToken_
Stores association of Truth Particles (TP) to L1 Track-Trigger Clusters.
int iEvent
Definition: GenABIO.cc:224
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
Mandatory methods.
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > theTrackerGeometryToken_
Class to store the L1 Track Trigger stubs.
Definition: TTStub.h:22
TTStubAssociator(const edm::ParameterSet &iConfig)
Constructors.
Log< level::Info, false > LogInfo
Plugin to create the MC truth for TTStubs.
std::vector< edm::InputTag > ttClusterTruthInputTags_