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 
30 
33 
38 
39 #include <memory>
40 #include <map>
41 #include <vector>
42 
43 template <typename T>
47 public:
49  explicit TTClusterAssociator(const edm::ParameterSet& iConfig);
50 
51 private:
55 
56  std::vector<edm::InputTag> ttClustersInputTags_;
57 
60  std::vector<edm::EDGetTokenT<edmNew::DetSetVector<TTCluster<T> > > > ttClustersTokens_;
61 
63 
65  void produce(edm::Event& iEvent, const edm::EventSetup& iSetup) override;
66 
67 };
68 
76 template <typename T>
79  digisimLinkToken_ =
80  consumes<edm::DetSetVector<PixelDigiSimLink> >(iConfig.getParameter<edm::InputTag>("digiSimLinks"));
81  tpToken_ = consumes<std::vector<TrackingParticle> >(iConfig.getParameter<edm::InputTag>("trackingParts"));
82 
83  ttClustersInputTags_ = iConfig.getParameter<std::vector<edm::InputTag> >("TTClusters");
84 
85  for (const auto& iTag : ttClustersInputTags_) {
86  ttClustersTokens_.push_back(consumes<edmNew::DetSetVector<TTCluster<T> > >(iTag));
87 
88  produces<TTClusterAssociationMap<T> >(iTag.instance());
89  }
90 
91  theTrackerGeometryToken_ = esConsumes();
92 
94  edm::LogInfo("TTClusterAssociator< ") << templateNameFinder<T>() << " > loaded.";
95 }
96 
98 template <>
100 
101 #endif
Plugin to create the MC truth for TTClusters.
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:307
edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > digisimLinkToken_
std::vector< edm::InputTag > ttClustersInputTags_
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
Mandatory methods.
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
edm::EDGetTokenT< std::vector< TrackingParticle > > tpToken_