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 beginRun(const edm::Run& run, const edm::EventSetup& iSetup) override;
63  void endRun(const edm::Run& run, const edm::EventSetup& iSetup) override;
64  void produce(edm::Event& iEvent, const edm::EventSetup& iSetup) override;
65 
66 };
67 
75 template <typename T>
78  ttTracksInputTags_ = iConfig.getParameter<std::vector<edm::InputTag> >("TTTracks");
79  ttClusterTruthToken_ = consumes<TTClusterAssociationMap<T> >(iConfig.getParameter<edm::InputTag>("TTClusterTruth"));
80  ttStubTruthToken_ = consumes<TTStubAssociationMap<T> >(iConfig.getParameter<edm::InputTag>("TTStubTruth"));
81  TTTrackAllowOneFalse2SStub = iConfig.getParameter<bool>("TTTrackAllowOneFalse2SStub");
83  edm::LogInfo("TTTrackAssociator< ") << "Allow track if no more than one 2S stub doesn't match truth.";
84  } else {
85  edm::LogInfo("TTTrackAssociator< ") << "All 2S stubs must match truth.";
86  }
87 
88  for (const auto& iTag : ttTracksInputTags_) {
89  ttTracksTokens_.push_back(consumes<std::vector<TTTrack<T> > >(iTag));
90 
91  produces<TTTrackAssociationMap<T> >(iTag.instance());
92  }
93 }
94 
96 template <typename T>
98 
100 template <typename T>
103  edm::LogInfo("TTStubAssociator< ") << "TTTrackAssociator< " << templateNameFinder<T>() << " > loaded.";
104 }
105 
107 template <typename T>
109 
111 template <>
113 
114 #endif
TTStubAssociator.h
ESHandle.h
TTTypes.h
edm::Run
Definition: Run.h:45
edm::EDGetTokenT
Definition: EDGetToken.h:33
TTTrackAssociator::produce
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
TTTrackAssociator::~TTTrackAssociator
~TTTrackAssociator() override
Destructor.
Definition: TTTrackAssociator.h:97
TTTrack
Class to store the L1 Track Trigger tracks.
Definition: TTTrack.h:29
EDProducer.h
TTTrackAssociator::ttTracksInputTags_
std::vector< edm::InputTag > ttTracksInputTags_
Data members.
Definition: TTTrackAssociator.h:53
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
TTTrackAssociator::ttTracksTokens_
std::vector< edm::EDGetTokenT< std::vector< TTTrack< T > > > > ttTracksTokens_
Definition: TTTrackAssociator.h:55
MakerMacros.h
classNameFinder.h
TTTrack.h
TTTrackAssociator::TTTrackAllowOneFalse2SStub
bool TTTrackAllowOneFalse2SStub
Definition: TTTrackAssociator.h:59
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
TTTrackAssociation_cfi.TTTrackAllowOneFalse2SStub
TTTrackAllowOneFalse2SStub
Definition: TTTrackAssociation_cfi.py:9
iEvent
int iEvent
Definition: GenABIO.cc:224
TTStubAssociationMap.h
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
edm::stream::EDProducer
Definition: EDProducer.h:38
edm::EventSetup
Definition: EventSetup.h:58
TTTrackAssociator::ttStubTruthToken_
edm::EDGetTokenT< TTStubAssociationMap< T > > ttStubTruthToken_
Definition: TTTrackAssociator.h:56
TTTrackAssociator::ttClusterTruthToken_
edm::EDGetTokenT< TTClusterAssociationMap< T > > ttClusterTruthToken_
Definition: TTTrackAssociator.h:57
TTTrackAssociator::endRun
void endRun(const edm::Run &run, const edm::EventSetup &iSetup) override
End run.
Definition: TTTrackAssociator.h:108
writedatasetfile.run
run
Definition: writedatasetfile.py:27
TTTrackAssociationMap.h
Frameworkfwd.h
EventSetup.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
TTTrackAssociator
Plugin to create the MC truth for TTTracks.
Definition: TTTrackAssociator.h:41
ParameterSet.h
TTTrackAssociator::beginRun
void beginRun(const edm::Run &run, const edm::EventSetup &iSetup) override
Mandatory methods.
Definition: TTTrackAssociator.h:101
edm::Event
Definition: Event.h:73
DetSetVectorNew.h
edm::InputTag
Definition: InputTag.h:15
TTClusterAssociator.h
TTTrackAssociator::TTTrackAssociator
TTTrackAssociator(const edm::ParameterSet &iConfig)
Constructors.
Definition: TTTrackAssociator.h:77
EncodedEventId.h