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 
32 
37 
38 #include "TTClusterAssociator.h"
39 
40 #include <memory>
41 #include <map>
42 #include <vector>
43 
44 template <typename T>
48 public:
50  explicit TTStubAssociator(const edm::ParameterSet& iConfig);
51 
52 private:
54  std::vector<edm::InputTag> ttStubsInputTags_;
55  std::vector<edm::InputTag> ttClusterTruthInputTags_;
56 
57  std::vector<edm::EDGetTokenT<edmNew::DetSetVector<TTStub<T> > > > ttStubsTokens_;
58  std::vector<edm::EDGetTokenT<TTClusterAssociationMap<T> > > ttClusterTruthTokens_;
59 
62 
64  void produce(edm::Event& iEvent, const edm::EventSetup& iSetup) override;
65 
66 };
67 
75 template <typename T>
78  ttStubsInputTags_ = iConfig.getParameter<std::vector<edm::InputTag> >("TTStubs");
79  ttClusterTruthInputTags_ = iConfig.getParameter<std::vector<edm::InputTag> >("TTClusterTruth");
80 
81  for (const auto& iTag : ttClusterTruthInputTags_) {
82  ttClusterTruthTokens_.push_back(consumes<TTClusterAssociationMap<T> >(iTag));
83  }
84 
85  for (const auto& iTag : ttStubsInputTags_) {
86  ttStubsTokens_.push_back(consumes<edmNew::DetSetVector<TTStub<T> > >(iTag));
87 
88  produces<TTStubAssociationMap<T> >(iTag.instance());
89  }
90 
91  theTrackerGeometryToken_ = esConsumes();
92  theTrackerTopologyToken_ = esConsumes();
93 
95  edm::LogInfo("TTStubAssociator< ") << templateNameFinder<T>() << " > loaded.";
96 }
97 
99 template <>
101 
102 #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_