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>
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>
111 
113  edm::LogInfo("TTClusterAssociator< ") << templateNameFinder<T>() << " > loaded.";
114 }
115 
117 template <typename T>
119 
121 template <>
123 
124 #endif
Plugin to create the MC truth for TTClusters.
void endRun(const edm::Run &run, const edm::EventSetup &iSetup) override
End run.
T getParameter(std::string const &) const
void beginRun(const edm::Run &run, const edm::EventSetup &iSetup) override
Mandatory methods.
edm::Handle< edm::DetSetVector< PixelDigiSimLink > > thePixelDigiSimLinkHandle
Data members.
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
edm::Handle< std::vector< TrackingParticle > > TrackingParticleHandle
TTClusterAssociator(const edm::ParameterSet &iConfig)
Constructors.
int iEvent
Definition: GenABIO.cc:224
edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > digisimLinkToken
std::vector< edm::InputTag > TTClustersInputTags
edm::EDGetTokenT< std::vector< TrackingParticle > > tpToken
NOTE: this is needed even if it seems not.
Definition: TTCluster.h:27
~TTClusterAssociator() override
Destructor.
edm::ESHandle< TrackerTopology > theTrackerTopology
T get() const
Definition: EventSetup.h:73
std::vector< edm::EDGetTokenT< edmNew::DetSetVector< TTCluster< T > > > > TTClustersTokens
edm::ESHandle< TrackerGeometry > theTrackerGeometry
Definition: Run.h:45