CMS 3D CMS Logo

TTTrackAssociator.h
Go to the documentation of this file.
1 
13 #ifndef L1_TRACK_TRIGGER_TRACK_ASSOCIATOR_H
14 #define L1_TRACK_TRIGGER_TRACK_ASSOCIATOR_H
15 
23 
25 
34 
35 #include <memory>
36 #include <map>
37 #include <vector>
38 
39 template< typename T >
41 {
44  public:
46  explicit TTTrackAssociator( const edm::ParameterSet& iConfig );
47 
49  ~TTTrackAssociator() override;
50 
51  private:
53  std::vector< edm::InputTag > TTTracksInputTags;
54 
55 
56  std::vector<edm::EDGetTokenT< std::vector< TTTrack< T > > > > TTTracksTokens;
57 
60 
61  // edm::InputTag TTClusterTruthInputTag;
62  // edm::InputTag TTStubTruthInputTag;
63 
65  void beginRun( const edm::Run& run, const edm::EventSetup& iSetup ) override;
66  void endRun( const edm::Run& run, const edm::EventSetup& iSetup ) override;
67  void produce( edm::Event& iEvent, const edm::EventSetup& iSetup ) override;
68 
69 };
70 
78 template< typename T >
81 {
82  TTTracksInputTags = iConfig.getParameter< std::vector< edm::InputTag > >( "TTTracks" );
83  TTClusterTruthToken = consumes< TTClusterAssociationMap< T > >(iConfig.getParameter< edm::InputTag >( "TTClusterTruth" ));
84  TTStubTruthToken = consumes< TTStubAssociationMap< T > >(iConfig.getParameter< edm::InputTag >( "TTStubTruth" ));
85 
86  for ( auto iTag = TTTracksInputTags.begin(); iTag!= TTTracksInputTags.end(); iTag++ )
87  {
88  TTTracksTokens.push_back(consumes< std::vector< TTTrack< T > > >(*iTag));
89 
90  produces< TTTrackAssociationMap< T > >( (*iTag).instance() );
91  }
92 }
93 
95 template< typename T >
97 
99 template< typename T >
101 {
103  edm::LogInfo("TTStubAssociator< ") << "TTTrackAssociator< " << templateNameFinder< T >() << " > loaded.";
104 }
105 
107 template< typename T >
109 
111 template< >
113 
114 #endif
115 
T getParameter(std::string const &) const
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
~TTTrackAssociator() override
Destructor.
TTTrackAssociator(const edm::ParameterSet &iConfig)
Constructors.
std::vector< edm::InputTag > TTTracksInputTags
Data members.
edm::EDGetTokenT< TTClusterAssociationMap< T > > TTClusterTruthToken
int iEvent
Definition: GenABIO.cc:224
std::vector< edm::EDGetTokenT< std::vector< TTTrack< T > > > > TTTracksTokens
Plugin to create the MC truth for TTTracks.
void endRun(const edm::Run &run, const edm::EventSetup &iSetup) override
End run.
edm::EDGetTokenT< TTStubAssociationMap< T > > TTStubTruthToken
Class to store the L1 Track Trigger tracks.
Definition: TTTrack.h:25
void beginRun(const edm::Run &run, const edm::EventSetup &iSetup) override
Mandatory methods.
Definition: Run.h:45