CMS 3D CMS Logo

TTClusterAssociator.h
Go to the documentation of this file.
1 
14 #ifndef L1_TRACK_TRIGGER_CLUSTER_ASSOCIATOR_H
15 #define L1_TRACK_TRIGGER_CLUSTER_ASSOCIATOR_H
16 
24 
29 
32 
37 
38 #include <memory>
39 #include <map>
40 #include <vector>
41 
42 template <typename T>
46 public:
48  explicit TTClusterAssociator(const edm::ParameterSet& iConfig);
49 
51  ~TTClusterAssociator() override;
52 
53 private:
57 
58  std::vector<edm::InputTag> ttClustersInputTags_;
59 
62  std::vector<edm::EDGetTokenT<edmNew::DetSetVector<TTCluster<T> > > > ttClustersTokens_;
63 
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  digisimLinkToken_ =
84  consumes<edm::DetSetVector<PixelDigiSimLink> >(iConfig.getParameter<edm::InputTag>("digiSimLinks"));
85  tpToken_ = consumes<std::vector<TrackingParticle> >(iConfig.getParameter<edm::InputTag>("trackingParts"));
86 
87  ttClustersInputTags_ = iConfig.getParameter<std::vector<edm::InputTag> >("TTClusters");
88 
89  for (const auto& iTag : ttClustersInputTags_) {
90  ttClustersTokens_.push_back(consumes<edmNew::DetSetVector<TTCluster<T> > >(iTag));
91 
92  produces<TTClusterAssociationMap<T> >(iTag.instance());
93  }
94 
95  theTrackerGeometryToken_ = esConsumes();
96 }
97 
99 template <typename T>
101 
103 template <typename T>
106  edm::LogInfo("TTClusterAssociator< ") << templateNameFinder<T>() << " > loaded.";
107 }
108 
110 template <typename T>
112 
114 template <>
116 
117 #endif
Plugin to create the MC truth for TTClusters.
void endRun(const edm::Run &run, const edm::EventSetup &iSetup) override
End run.
std::vector< edm::EDGetTokenT< edmNew::DetSetVector< TTCluster< T > > > > ttClustersTokens_
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
void beginRun(const edm::Run &run, const edm::EventSetup &iSetup) override
Mandatory methods.
edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > digisimLinkToken_
std::vector< edm::InputTag > ttClustersInputTags_
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
edm::Handle< edm::DetSetVector< PixelDigiSimLink > > thePixelDigiSimLinkHandle_
Data members.
TTClusterAssociator(const edm::ParameterSet &iConfig)
Constructors.
int iEvent
Definition: GenABIO.cc:224
edm::Handle< std::vector< TrackingParticle > > trackingParticleHandle_
Log< level::Info, false > LogInfo
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > theTrackerGeometryToken_
NOTE: this is needed even if it seems not.
Definition: TTCluster.h:27
~TTClusterAssociator() override
Destructor.
edm::EDGetTokenT< std::vector< TrackingParticle > > tpToken_
Definition: Run.h:45