CMS 3D CMS Logo

TTClusterAssociator.h
Go to the documentation of this file.
1 
13 #ifndef L1_TRACK_TRIGGER_CLUSTER_ASSOCIATOR_H
14 #define L1_TRACK_TRIGGER_CLUSTER_ASSOCIATOR_H
15 
23 
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< edm::DetSetVector< TTCluster< T > > > > TTClustersTokens;
63  std::vector<edm::EDGetTokenT<edmNew::DetSetVector<TTCluster<T> > > > TTClustersTokens;
64 
65  // const StackedTrackerGeometry *theStackedTrackers;
66  //unsigned int ADCThreshold;
67 
70 
72  void beginRun(const edm::Run& run, const edm::EventSetup& iSetup) override;
73  void endRun(const edm::Run& run, const edm::EventSetup& iSetup) override;
74  void produce(edm::Event& iEvent, const edm::EventSetup& iSetup) override;
75 
76 };
77 
85 template <typename T>
88  digisimLinkToken =
89  consumes<edm::DetSetVector<PixelDigiSimLink> >(iConfig.getParameter<edm::InputTag>("digiSimLinks"));
90  tpToken = consumes<std::vector<TrackingParticle> >(iConfig.getParameter<edm::InputTag>("trackingParts"));
91 
92  TTClustersInputTags = iConfig.getParameter<std::vector<edm::InputTag> >("TTClusters");
93 
94  for (auto iTag = TTClustersInputTags.begin(); iTag != TTClustersInputTags.end(); iTag++) {
95  TTClustersTokens.push_back(consumes<edmNew::DetSetVector<TTCluster<T> > >(*iTag));
96 
97  produces<TTClusterAssociationMap<T> >((*iTag).instance());
98  }
99 }
100 
102 template <typename T>
104 
106 template <typename T>
109  iSetup.get<TrackerDigiGeometryRecord>().get(theTrackerGeometry);
110  iSetup.get<TrackerTopologyRcd>().get(theTrackerTopology);
111 
113  edm::LogInfo("TTClusterAssociator< ") << templateNameFinder<T>() << " > loaded.";
114 }
115 
117 template <typename T>
119 
121 template <>
123 
124 #endif
TTStubAlgorithmRecord.h
TTClusterAssociator::TrackingParticleHandle
edm::Handle< std::vector< TrackingParticle > > TrackingParticleHandle
Definition: TTClusterAssociator.h:56
TrackerGeometry.h
TTClusterAssociator::TTClustersInputTags
std::vector< edm::InputTag > TTClustersInputTags
Definition: TTClusterAssociator.h:58
PixelTopology.h
ESHandle.h
TTClusterAssociator::theTrackerTopology
edm::ESHandle< TrackerTopology > theTrackerTopology
Definition: TTClusterAssociator.h:69
TTTypes.h
TTStubAlgorithm.h
TTClusterAssociator
Plugin to create the MC truth for TTClusters.
Definition: TTClusterAssociator.h:43
edm::Run
Definition: Run.h:45
TTClusterAssociator::produce
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
edm::EDGetTokenT
Definition: EDGetToken.h:33
edm::LogInfo
Definition: MessageLogger.h:254
TTClusterAssociator::~TTClusterAssociator
~TTClusterAssociator() override
Destructor.
Definition: TTClusterAssociator.h:103
EDProducer.h
edm::Handle
Definition: AssociativeIterator.h:50
TTClusterAssociationMap.h
MakerMacros.h
TTClusterAssociator::thePixelDigiSimLinkHandle
edm::Handle< edm::DetSetVector< PixelDigiSimLink > > thePixelDigiSimLinkHandle
Data members.
Definition: TTClusterAssociator.h:55
TrackerTopology.h
TTClusterAssociator::tpToken
edm::EDGetTokenT< std::vector< TrackingParticle > > tpToken
Definition: TTClusterAssociator.h:61
classNameFinder.h
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
TTClusterAssociator::digisimLinkToken
edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > digisimLinkToken
Definition: TTClusterAssociator.h:60
TTClusterAssociator::beginRun
void beginRun(const edm::Run &run, const edm::EventSetup &iSetup) override
Mandatory methods.
Definition: TTClusterAssociator.h:107
TrackerDigiGeometryRecord
Definition: TrackerDigiGeometryRecord.h:15
edm::ESHandle< TrackerGeometry >
edm::ParameterSet
Definition: ParameterSet.h:36
Event.h
TTClusterAssociator::endRun
void endRun(const edm::Run &run, const edm::EventSetup &iSetup) override
End run.
Definition: TTClusterAssociator.h:118
iEvent
int iEvent
Definition: GenABIO.cc:224
TTClusterAssociator::TTClusterAssociator
TTClusterAssociator(const edm::ParameterSet &iConfig)
Constructors.
Definition: TTClusterAssociator.h:87
edm::stream::EDProducer
Definition: EDProducer.h:38
TTClusterAssociator::theTrackerGeometry
edm::ESHandle< TrackerGeometry > theTrackerGeometry
Definition: TTClusterAssociator.h:68
edm::EventSetup
Definition: EventSetup.h:57
get
#define get
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
edmNew::DetSetVector
Definition: DetSetNew.h:13
writedatasetfile.run
run
Definition: writedatasetfile.py:27
Frameworkfwd.h
PixelGeomDetUnit.h
EventSetup.h
TTCluster
NOTE: this is needed even if it seems not.
Definition: TTCluster.h:27
TTClusterAssociator::TTClustersTokens
std::vector< edm::EDGetTokenT< edmNew::DetSetVector< TTCluster< T > > > > TTClustersTokens
Definition: TTClusterAssociator.h:63
TrackerTopologyRcd
Definition: TrackerTopologyRcd.h:10
ParameterSet.h
edm::Event
Definition: Event.h:73
Topology.h
DetSetVectorNew.h
edm::InputTag
Definition: InputTag.h:15