CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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:
50 
52  ~TTStubAssociator() override;
53 
54 private:
56  std::vector<edm::InputTag> ttStubsInputTags_;
57  std::vector<edm::InputTag> ttClusterTruthInputTags_;
58 
59  std::vector<edm::EDGetTokenT<edmNew::DetSetVector<TTStub<T> > > > ttStubsTokens_;
60  std::vector<edm::EDGetTokenT<TTClusterAssociationMap<T> > > ttClusterTruthTokens_;
61 
64 
66  void beginRun(const edm::Run& run, const edm::EventSetup& iSetup) override;
67  void endRun(const edm::Run& run, const edm::EventSetup& iSetup) override;
68  void produce(edm::Event& iEvent, const edm::EventSetup& iSetup) override;
69 
70 };
71 
79 template <typename T>
82  ttStubsInputTags_ = iConfig.getParameter<std::vector<edm::InputTag> >("TTStubs");
83  ttClusterTruthInputTags_ = iConfig.getParameter<std::vector<edm::InputTag> >("TTClusterTruth");
84 
85  for (const auto& iTag : ttClusterTruthInputTags_) {
86  ttClusterTruthTokens_.push_back(consumes<TTClusterAssociationMap<T> >(iTag));
87  }
88 
89  for (const auto& iTag : ttStubsInputTags_) {
90  ttStubsTokens_.push_back(consumes<edmNew::DetSetVector<TTStub<T> > >(iTag));
91 
92  produces<TTStubAssociationMap<T> >(iTag.instance());
93  }
94 
95  theTrackerGeometryToken_ = esConsumes();
96  theTrackerTopologyToken_ = esConsumes();
97 }
98 
100 template <typename T>
102 
104 template <typename T>
107  edm::LogInfo("TTStubAssociator< ") << templateNameFinder<T>() << " > loaded.";
108 }
109 
111 template <typename T>
113 
115 template <>
117 
118 #endif
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
~TTStubAssociator() override
Destructor.
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > theTrackerGeometryToken_
Class to store the L1 Track Trigger stubs.
Definition: TTStub.h:22
TTStubAssociator(const edm::ParameterSet &iConfig)
Constructors.
void beginRun(const edm::Run &run, const edm::EventSetup &iSetup) override
Mandatory methods.
Log< level::Info, false > LogInfo
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
Plugin to create the MC truth for TTStubs.
void endRun(const edm::Run &run, const edm::EventSetup &iSetup) override
End run.
std::vector< edm::InputTag > ttClusterTruthInputTags_
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
Definition: Run.h:45