29 : context_(i_config, i_consumes_collector), tp_collectors_(), sector_processors_() {
94 std::vector<int> bx_sequence;
101 for (
int bx = min_bx;
bx <= max_bx; ++
bx) {
102 bx_sequence.push_back(
bx);
110 tp_collector->collect(i_event, bx_tpc_map);
118 for (
const auto&
bx : bx_sequence) {
120 auto bx_tpc_map_it = bx_tpc_map.find(
bx);
121 auto bx_tpc_map_end = bx_tpc_map.end();
124 if (bx_tpc_map_it == bx_tpc_map_end) {
129 auto& bx_tpc = bx_tpc_map_it->second;
132 if (bx_tpc.empty()) {
137 edm::LogInfo(
"L1TEMTFpp") <<
"===========================================================================" 139 edm::LogInfo(
"L1TEMTFpp") <<
"Begin TPC BX " <<
bx <<
" Dump" << std::endl;
140 edm::LogInfo(
"L1TEMTFpp") <<
"---------------------------------------------------------------------------" 143 n_tp += bx_tpc.size();
145 for (
const auto& tp_entry : bx_tpc) {
148 edm::LogInfo(
"L1TEMTFpp") <<
"---------------------------------------------------------------------------" 152 edm::LogInfo(
"L1TEMTFpp") <<
"End TPC BX " <<
bx <<
" Dump" << std::endl;
153 edm::LogInfo(
"L1TEMTFpp") <<
"===========================================================================" 159 edm::LogInfo(
"L1TEMTFpp") <<
"Num of TriggerPrimitive: " << n_tp << std::endl;
160 edm::LogInfo(
"L1TEMTFpp") <<
"===========================================================================" 171 sector_processor->configureEvent(i_event);
175 for (
const auto&
bx : bx_sequence) {
177 auto bx_tpc_map_it = bx_tpc_map.find(
bx);
178 auto bx_tpc_map_end = bx_tpc_map.end();
182 if (bx_tpc_map_it != bx_tpc_map_end) {
183 bx_tpc_ptr = &(bx_tpc_map_it->second);
189 sector_processor->configureBx(
bx);
192 if (bx_tpc_ptr !=
nullptr) {
193 for (
const auto& tp_entry : *bx_tpc_ptr) {
194 const auto&
tp = tp_entry.tp_;
195 const auto& tp_info = tp_entry.info_;
197 sector_processor->select(
tp, tp_info);
202 sector_processor->process(out_hits, out_tracks, out_inputs);
206 if (bx_tpc_ptr !=
nullptr) {
207 bx_tpc_map.erase(bx_tpc_map_it);
void process(const edm::Event &, const edm::EventSetup &, EMTFHitCollection &, EMTFTrackCollection &, EMTFInputCollection &)
void update(const edm::Event &, const edm::EventSetup &)
std::vector< std::unique_ptr< TPCollector > > tp_collectors_
l1t::phase2::EMTFTrackCollection EMTFTrackCollection
l1t::phase2::EMTFInputCollection EMTFInputCollection
std::vector< std::unique_ptr< SectorProcessor > > sector_processors_
std::map< int, TPCollection > BXTPCMap
l1t::phase2::EMTFHitCollection EMTFHitCollection
Log< level::Info, false > LogInfo
TrackFinder(const edm::ParameterSet &, edm::ConsumesCollector &&)
constexpr int kMinTrigSector
constexpr int kMaxTrigSector
std::vector< TPEntry > TPCollection
EMTFConfiguration config_