CMS 3D CMS Logo

TTStubAssociator.h
Go to the documentation of this file.
1 
13 #ifndef L1_TRACK_TRIGGER_STUB_ASSOCIATOR_H
14 #define L1_TRACK_TRIGGER_STUB_ASSOCIATOR_H
15 
23 
25 
33 
38 
39 #include <memory>
40 #include <map>
41 #include <vector>
42 
43 template< typename T >
45 {
48  public:
50  explicit TTStubAssociator( const edm::ParameterSet& iConfig );
51 
54 
55  private:
57  std::vector< edm::InputTag > TTStubsInputTags;
58  std::vector< edm::InputTag > TTClusterTruthInputTags;
59 
60  std::vector<edm::EDGetTokenT< edmNew::DetSetVector< TTStub< T > > > > TTStubsTokens;
61  std::vector<edm::EDGetTokenT< TTClusterAssociationMap< T > > > TTClusterTruthTokens;
62 
65 
67  virtual void beginRun( const edm::Run& run, const edm::EventSetup& iSetup );
68  virtual void endRun( const edm::Run& run, const edm::EventSetup& iSetup );
69  virtual void produce( edm::Event& iEvent, const edm::EventSetup& iSetup );
70 
71 };
72 
80 template< typename T >
83 {
84  TTStubsInputTags = iConfig.getParameter< std::vector< edm::InputTag > >( "TTStubs" );
85  TTClusterTruthInputTags = iConfig.getParameter< std::vector< edm::InputTag > >( "TTClusterTruth" );
86 
87 
88  for ( auto iTag = TTClusterTruthInputTags.begin(); iTag!= TTClusterTruthInputTags.end(); iTag++ )
89  {
91  }
92 
93  for ( auto iTag = TTStubsInputTags.begin(); iTag!= TTStubsInputTags.end(); iTag++ )
94  {
96 
97  produces< TTStubAssociationMap< T > >( (*iTag).instance() );
98  }
99 }
100 
102 template< typename T >
104 
106 template< typename T >
108 {
110  edm::LogInfo("TTStubAssociator< ") << templateNameFinder< T >() << " > loaded.";
111 
114 }
115 
117 template< typename T >
119 
121 template< >
123 
124 #endif
125 
T getParameter(std::string const &) const
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup)
std::vector< edm::EDGetTokenT< TTClusterAssociationMap< T > > > TTClusterTruthTokens
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
NOTE: this is needed even if it seems not.
int iEvent
Definition: GenABIO.cc:230
edm::ESHandle< TrackerGeometry > theTrackerGeometry
Class to store the L1 Track Trigger stubs.
Definition: TTStub.h:22
virtual void endRun(const edm::Run &run, const edm::EventSetup &iSetup)
End run.
TTStubAssociator(const edm::ParameterSet &iConfig)
Constructors.
std::vector< edm::EDGetTokenT< edmNew::DetSetVector< TTStub< T > > > > TTStubsTokens
std::vector< edm::InputTag > TTClusterTruthInputTags
const T & get() const
Definition: EventSetup.h:56
~TTStubAssociator()
Destructor.
Plugin to create the MC truth for TTStubs.
std::vector< edm::InputTag > TTStubsInputTags
Data members.
edm::ESHandle< TrackerTopology > theTrackerTopology
virtual void beginRun(const edm::Run &run, const edm::EventSetup &iSetup)
Mandatory methods.
Definition: Run.h:42