CMS 3D CMS Logo

TTTrackAssociator.h
Go to the documentation of this file.
1 
14 #ifndef L1_TRACK_TRIGGER_TRACK_ASSOCIATOR_H
15 #define L1_TRACK_TRIGGER_TRACK_ASSOCIATOR_H
16 
24 
26 
35 
36 #include <memory>
37 #include <map>
38 #include <vector>
39 
40 template <typename T>
44 public:
46  explicit TTTrackAssociator(const edm::ParameterSet& iConfig);
47 
49  ~TTTrackAssociator() override;
50 
51 private:
53  std::vector<edm::InputTag> ttTracksInputTags_;
54 
55  std::vector<edm::EDGetTokenT<std::vector<TTTrack<T> > > > ttTracksTokens_;
58 
60 
62  void produce(edm::Event& iEvent, const edm::EventSetup& iSetup) override;
63 
64 };
65 
73 template <typename T>
76  ttTracksInputTags_ = iConfig.getParameter<std::vector<edm::InputTag> >("TTTracks");
77  ttClusterTruthToken_ = consumes<TTClusterAssociationMap<T> >(iConfig.getParameter<edm::InputTag>("TTClusterTruth"));
78  ttStubTruthToken_ = consumes<TTStubAssociationMap<T> >(iConfig.getParameter<edm::InputTag>("TTStubTruth"));
79  TTTrackAllowOneFalse2SStub = iConfig.getParameter<bool>("TTTrackAllowOneFalse2SStub");
81  edm::LogInfo("TTTrackAssociator< ") << "Allow track if no more than one 2S stub doesn't match truth.";
82  } else {
83  edm::LogInfo("TTTrackAssociator< ") << "All 2S stubs must match truth.";
84  }
85 
86  for (const auto& iTag : ttTracksInputTags_) {
87  ttTracksTokens_.push_back(consumes<std::vector<TTTrack<T> > >(iTag));
88 
89  produces<TTTrackAssociationMap<T> >(iTag.instance());
90  }
92  edm::LogInfo("TTStubAssociator< ") << "TTTrackAssociator< " << templateNameFinder<T>() << " > loaded.";
93 }
94 
96 template <typename T>
98 
100 template <>
102 
103 #endif
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
Mandatory methods.
~TTTrackAssociator() override
Destructor.
TTTrackAssociator(const edm::ParameterSet &iConfig)
Constructors.
std::vector< edm::EDGetTokenT< std::vector< TTTrack< T > > > > ttTracksTokens_
std::vector< edm::InputTag > ttTracksInputTags_
Data members.
int iEvent
Definition: GenABIO.cc:224
Plugin to create the MC truth for TTTracks.
Log< level::Info, false > LogInfo
Class to store the L1 Track Trigger tracks.
Definition: TTTrack.h:29
edm::EDGetTokenT< TTStubAssociationMap< T > > ttStubTruthToken_
edm::EDGetTokenT< TTClusterAssociationMap< T > > ttClusterTruthToken_