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>
43 public:
45  explicit TTTrackAssociator(const edm::ParameterSet& iConfig);
46 
48  ~TTTrackAssociator() override;
49 
50 private:
52  std::vector<edm::InputTag> TTTracksInputTags;
53 
54  std::vector<edm::EDGetTokenT<std::vector<TTTrack<T> > > > TTTracksTokens;
55 
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 (auto iTag = TTTracksInputTags.begin(); iTag != TTTracksInputTags.end(); iTag++) {
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
edm::LogInfo
Definition: MessageLogger.h:254
TTTrack
Class to store the L1 Track Trigger tracks.
Definition: TTTrack.h:26
EDProducer.h
MakerMacros.h
classNameFinder.h
TTTrack.h
TTTrackAssociator::TTTrackAllowOneFalse2SStub
bool TTTrackAllowOneFalse2SStub
Definition: TTTrackAssociator.h:59
edm::ParameterSet
Definition: ParameterSet.h:36
Event.h
TTTrackAssociation_cfi.TTTrackAllowOneFalse2SStub
TTTrackAllowOneFalse2SStub
Definition: TTTrackAssociation_cfi.py:9
iEvent
int iEvent
Definition: GenABIO.cc:224
TTStubAssociationMap.h
edm::stream::EDProducer
Definition: EDProducer.h:38
edm::EventSetup
Definition: EventSetup.h:57
TTTrackAssociator::TTClusterTruthToken
edm::EDGetTokenT< TTClusterAssociationMap< T > > TTClusterTruthToken
Definition: TTTrackAssociator.h:57
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
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
TTTrackAssociator::TTStubTruthToken
edm::EDGetTokenT< TTStubAssociationMap< T > > TTStubTruthToken
Definition: TTTrackAssociator.h:56
EventSetup.h
TTTrackAssociator
Plugin to create the MC truth for TTTracks.
Definition: TTTrackAssociator.h:40
TTTrackAssociator::TTTracksInputTags
std::vector< edm::InputTag > TTTracksInputTags
Data members.
Definition: TTTrackAssociator.h:52
ParameterSet.h
TTTrackAssociator::TTTracksTokens
std::vector< edm::EDGetTokenT< std::vector< TTTrack< T > > > > TTTracksTokens
Definition: TTTrackAssociator.h:54
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