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 
52  ~TTClusterAssociator() override;
53 
54 private:
58 
59  std::vector<edm::InputTag> ttClustersInputTags_;
60 
63  std::vector<edm::EDGetTokenT<edmNew::DetSetVector<TTCluster<T> > > > ttClustersTokens_;
64 
67 
69  void beginRun(const edm::Run& run, const edm::EventSetup& iSetup) override;
70  void endRun(const edm::Run& run, const edm::EventSetup& iSetup) override;
71  void produce(edm::Event& iEvent, const edm::EventSetup& iSetup) override;
72 
73 };
74 
82 template <typename T>
85  digisimLinkToken_ =
86  consumes<edm::DetSetVector<PixelDigiSimLink> >(iConfig.getParameter<edm::InputTag>("digiSimLinks"));
87  tpToken_ = consumes<std::vector<TrackingParticle> >(iConfig.getParameter<edm::InputTag>("trackingParts"));
88 
89  ttClustersInputTags_ = iConfig.getParameter<std::vector<edm::InputTag> >("TTClusters");
90 
91  for (const auto& iTag : ttClustersInputTags_) {
92  ttClustersTokens_.push_back(consumes<edmNew::DetSetVector<TTCluster<T> > >(iTag));
93 
94  produces<TTClusterAssociationMap<T> >(iTag.instance());
95  }
96 }
97 
99 template <typename T>
101 
103 template <typename T>
106  iSetup.get<TrackerDigiGeometryRecord>().get(theTrackerGeometry_);
107  iSetup.get<TrackerTopologyRcd>().get(theTrackerTopology_);
108 
110  edm::LogInfo("TTClusterAssociator< ") << templateNameFinder<T>() << " > loaded.";
111 }
112 
114 template <typename T>
116 
118 template <>
120 
121 #endif
TTStubAlgorithmRecord.h
TTClusterAssociator::trackingParticleHandle_
edm::Handle< std::vector< TrackingParticle > > trackingParticleHandle_
Definition: TTClusterAssociator.h:57
TrackerGeometry.h
PixelTopology.h
ESHandle.h
TTTypes.h
TTStubAlgorithm.h
TTClusterAssociator
Plugin to create the MC truth for TTClusters.
Definition: TTClusterAssociator.h:44
edm::Run
Definition: Run.h:45
TTClusterAssociator::produce
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
edm::EDGetTokenT
Definition: EDGetToken.h:33
TTClusterAssociator::~TTClusterAssociator
~TTClusterAssociator() override
Destructor.
Definition: TTClusterAssociator.h:100
EDProducer.h
TTClusterAssociator::thePixelDigiSimLinkHandle_
edm::Handle< edm::DetSetVector< PixelDigiSimLink > > thePixelDigiSimLinkHandle_
Data members.
Definition: TTClusterAssociator.h:56
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
edm::Handle
Definition: AssociativeIterator.h:50
TTClusterAssociationMap.h
MakerMacros.h
TrackerTopology.h
classNameFinder.h
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
TTClusterAssociator::ttClustersTokens_
std::vector< edm::EDGetTokenT< edmNew::DetSetVector< TTCluster< T > > > > ttClustersTokens_
Definition: TTClusterAssociator.h:63
TTClusterAssociator::beginRun
void beginRun(const edm::Run &run, const edm::EventSetup &iSetup) override
Mandatory methods.
Definition: TTClusterAssociator.h:104
TrackerDigiGeometryRecord
Definition: TrackerDigiGeometryRecord.h:16
edm::ESHandle< TrackerGeometry >
TTClusterAssociator::tpToken_
edm::EDGetTokenT< std::vector< TrackingParticle > > tpToken_
Definition: TTClusterAssociator.h:62
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
TTClusterAssociator::ttClustersInputTags_
std::vector< edm::InputTag > ttClustersInputTags_
Definition: TTClusterAssociator.h:59
TTClusterAssociator::endRun
void endRun(const edm::Run &run, const edm::EventSetup &iSetup) override
End run.
Definition: TTClusterAssociator.h:115
iEvent
int iEvent
Definition: GenABIO.cc:224
TTClusterAssociator::TTClusterAssociator
TTClusterAssociator(const edm::ParameterSet &iConfig)
Constructors.
Definition: TTClusterAssociator.h:84
edm::stream::EDProducer
Definition: EDProducer.h:36
edm::EventSetup
Definition: EventSetup.h:58
get
#define get
TTClusterAssociator::theTrackerTopology_
edm::ESHandle< TrackerTopology > theTrackerTopology_
Definition: TTClusterAssociator.h:66
edmNew::DetSetVector
Definition: DetSetNew.h:13
writedatasetfile.run
run
Definition: writedatasetfile.py:27
Frameworkfwd.h
PixelGeomDetUnit.h
EventSetup.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
TTCluster
NOTE: this is needed even if it seems not.
Definition: TTCluster.h:27
TTClusterAssociator::theTrackerGeometry_
edm::ESHandle< TrackerGeometry > theTrackerGeometry_
Definition: TTClusterAssociator.h:65
TrackerTopologyRcd
Definition: TrackerTopologyRcd.h:10
ParameterSet.h
edm::Event
Definition: Event.h:73
Topology.h
DetSetVectorNew.h
edm::InputTag
Definition: InputTag.h:15
TTClusterAssociator::digisimLinkToken_
edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > digisimLinkToken_
Definition: TTClusterAssociator.h:61