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 
24 
26 
34 
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 
53  ~TTStubAssociator() override;
54 
55 private:
57  std::vector<edm::InputTag> ttStubsInputTags_;
58  std::vector<edm::InputTag> ttClusterTruthInputTags_;
59 
60  std::vector<edm::EDGetTokenT<edmNew::DetSetVector<TTStub<T> > > > ttStubsTokens_;
61  std::vector<edm::EDGetTokenT<TTClusterAssociationMap<T> > > ttClusterTruthTokens_;
62 
65 
67  void beginRun(const edm::Run& run, const edm::EventSetup& iSetup) override;
68  void endRun(const edm::Run& run, const edm::EventSetup& iSetup) override;
69  void produce(edm::Event& iEvent, const edm::EventSetup& iSetup) override;
70 
71 };
72 
80 template <typename T>
83  ttStubsInputTags_ = iConfig.getParameter<std::vector<edm::InputTag> >("TTStubs");
84  ttClusterTruthInputTags_ = iConfig.getParameter<std::vector<edm::InputTag> >("TTClusterTruth");
85 
86  for (const auto& iTag : ttClusterTruthInputTags_) {
87  ttClusterTruthTokens_.push_back(consumes<TTClusterAssociationMap<T> >(iTag));
88  }
89 
90  for (const auto& iTag : ttStubsInputTags_) {
91  ttStubsTokens_.push_back(consumes<edmNew::DetSetVector<TTStub<T> > >(iTag));
92 
93  produces<TTStubAssociationMap<T> >(iTag.instance());
94  }
95 }
96 
98 template <typename T>
100 
102 template <typename T>
105  edm::LogInfo("TTStubAssociator< ") << templateNameFinder<T>() << " > loaded.";
106 
107  iSetup.get<TrackerTopologyRcd>().get(theTrackerTopology_);
108  iSetup.get<TrackerDigiGeometryRecord>().get(theTrackerGeometry_);
109 }
110 
112 template <typename T>
114 
116 template <>
118 
119 #endif
TTClusterAssociationMap
Stores association of Truth Particles (TP) to L1 Track-Trigger Clusters.
Definition: TTClusterAssociationMap.h:44
TTStubAssociator::TTStubAssociator
TTStubAssociator(const edm::ParameterSet &iConfig)
Constructors.
Definition: TTStubAssociator.h:82
TrackerGeometry.h
PixelTopology.h
ESHandle.h
TTTypes.h
TTStubAssociator::~TTStubAssociator
~TTStubAssociator() override
Destructor.
Definition: TTStubAssociator.h:99
edm::Run
Definition: Run.h:45
TTStubAssociator::beginRun
void beginRun(const edm::Run &run, const edm::EventSetup &iSetup) override
Mandatory methods.
Definition: TTStubAssociator.h:103
TTStubAssociator::endRun
void endRun(const edm::Run &run, const edm::EventSetup &iSetup) override
End run.
Definition: TTStubAssociator.h:113
EDProducer.h
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
TTClusterAssociationMap.h
TTStubAssociator
Plugin to create the MC truth for TTStubs.
Definition: TTStubAssociator.h:45
TTStubAssociator::ttClusterTruthInputTags_
std::vector< edm::InputTag > ttClusterTruthInputTags_
Definition: TTStubAssociator.h:58
MakerMacros.h
TrackerTopology.h
classNameFinder.h
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
TrackerDigiGeometryRecord
Definition: TrackerDigiGeometryRecord.h:15
TTStub
Class to store the L1 Track Trigger stubs.
Definition: TTStub.h:22
edm::ESHandle< TrackerGeometry >
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
iEvent
int iEvent
Definition: GenABIO.cc:224
TTStubAssociationMap.h
edm::stream::EDProducer
Definition: EDProducer.h:38
edm::EventSetup
Definition: EventSetup.h:58
TTStubAssociator::ttStubsTokens_
std::vector< edm::EDGetTokenT< edmNew::DetSetVector< TTStub< T > > > > ttStubsTokens_
Definition: TTStubAssociator.h:60
get
#define get
TTStubAssociator::theTrackerGeometry_
edm::ESHandle< TrackerGeometry > theTrackerGeometry_
Definition: TTStubAssociator.h:63
TTStubAssociator::ttStubsInputTags_
std::vector< edm::InputTag > ttStubsInputTags_
Data members.
Definition: TTStubAssociator.h:57
edmNew::DetSetVector
Definition: DetSetNew.h:13
writedatasetfile.run
run
Definition: writedatasetfile.py:27
TTStubAssociator::theTrackerTopology_
edm::ESHandle< TrackerTopology > theTrackerTopology_
Definition: TTStubAssociator.h:64
Frameworkfwd.h
PixelGeomDetUnit.h
EventSetup.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
TTStubAssociator::ttClusterTruthTokens_
std::vector< edm::EDGetTokenT< TTClusterAssociationMap< T > > > ttClusterTruthTokens_
Definition: TTStubAssociator.h:61
TTStub.h
TrackerTopologyRcd
Definition: TrackerTopologyRcd.h:10
ParameterSet.h
edm::Event
Definition: Event.h:73
Topology.h
DetSetVectorNew.h
TTClusterAssociator.h
TTStubAssociator::produce
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override