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 
50 private:
54 
55  std::vector<edm::InputTag> ttClustersInputTags_;
56 
59  std::vector<edm::EDGetTokenT<edmNew::DetSetVector<TTCluster<T> > > > ttClustersTokens_;
60 
62 
64  void produce(edm::Event& iEvent, const edm::EventSetup& iSetup) override;
65 
66 };
67 
75 template <typename T>
78  digisimLinkToken_ =
79  consumes<edm::DetSetVector<PixelDigiSimLink> >(iConfig.getParameter<edm::InputTag>("digiSimLinks"));
80  tpToken_ = consumes<std::vector<TrackingParticle> >(iConfig.getParameter<edm::InputTag>("trackingParts"));
81 
82  ttClustersInputTags_ = iConfig.getParameter<std::vector<edm::InputTag> >("TTClusters");
83 
84  for (const auto& iTag : ttClustersInputTags_) {
85  ttClustersTokens_.push_back(consumes<edmNew::DetSetVector<TTCluster<T> > >(iTag));
86 
87  produces<TTClusterAssociationMap<T> >(iTag.instance());
88  }
89 
90  theTrackerGeometryToken_ = esConsumes();
91 
93  edm::LogInfo("TTClusterAssociator< ") << templateNameFinder<T>() << " > loaded.";
94 }
95 
97 template <>
99 
100 #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_