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 
30 
33 
38 
39 #include <memory>
40 #include <map>
41 #include <vector>
42 
43 template< typename T >
45 {
48  public:
50  explicit TTClusterAssociator( const edm::ParameterSet& iConfig );
51 
53  ~TTClusterAssociator() override;
54 
55  private:
59 
60  std::vector< edm::InputTag > TTClustersInputTags;
61 
64  //std::vector< edm::EDGetTokenT< edm::DetSetVector< TTCluster< T > > > > TTClustersTokens;
65  std::vector<edm::EDGetTokenT< edmNew::DetSetVector< TTCluster< T > > > > TTClustersTokens;
66 
67  // const StackedTrackerGeometry *theStackedTrackers;
68  //unsigned int ADCThreshold;
69 
70 
73 
74 
76  void beginRun( const edm::Run& run, const edm::EventSetup& iSetup ) override;
77  void endRun( const edm::Run& run, const edm::EventSetup& iSetup ) override;
78  void produce( edm::Event& iEvent, const edm::EventSetup& iSetup ) override;
79 
80 };
81 
89 template< typename T >
92 {
93  digisimLinkToken = consumes< edm::DetSetVector< PixelDigiSimLink > >(iConfig.getParameter< edm::InputTag >( "digiSimLinks" ));
94  tpToken = consumes< std::vector< TrackingParticle > >(iConfig.getParameter< edm::InputTag >( "trackingParts" ));
95 
96 
97  TTClustersInputTags = iConfig.getParameter< std::vector< edm::InputTag > >( "TTClusters" );
98 
99  for ( auto iTag = TTClustersInputTags.begin(); iTag!= TTClustersInputTags.end(); iTag++ )
100  {
101  TTClustersTokens.push_back(consumes< edmNew::DetSetVector< TTCluster< T > > >(*iTag));
102 
103  produces< TTClusterAssociationMap< T > >( (*iTag).instance() );
104  }
105 }
106 
108 template< typename T >
110 
112 template< typename T >
114 {
118 
120  edm::LogInfo("TTClusterAssociator< ") << templateNameFinder< T >() << " > loaded.";
121 }
122 
124 template< typename T >
126 
128 template< >
130 
131 #endif
132 
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.
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
edm::Handle< edm::DetSetVector< PixelDigiSimLink > > thePixelDigiSimLinkHandle
Data members.
edm::Handle< std::vector< TrackingParticle > > TrackingParticleHandle
TTClusterAssociator(const edm::ParameterSet &iConfig)
Constructors.
int iEvent
Definition: GenABIO.cc:230
std::vector< edm::InputTag > TTClustersInputTags
std::vector< edm::EDGetTokenT< edmNew::DetSetVector< TTCluster< T > > > > TTClustersTokens
NOTE: this is needed even if it seems not.
Definition: TTCluster.h:27
edm::EDGetTokenT< std::vector< TrackingParticle > > tpToken
edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > digisimLinkToken
~TTClusterAssociator() override
Destructor.
edm::ESHandle< TrackerTopology > theTrackerTopology
T get() const
Definition: EventSetup.h:62
edm::ESHandle< TrackerGeometry > theTrackerGeometry
Definition: Run.h:44