CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
TrackFinder Class Reference

#include <TrackFinder.h>

Public Member Functions

void process (const edm::Event &iEvent, const edm::EventSetup &iSetup, EMTFHitCollection &out_hits, EMTFTrackCollection &out_tracks)
 
 TrackFinder (const edm::ParameterSet &iConfig, edm::ConsumesCollector &&iConsumes)
 
 ~TrackFinder ()
 

Private Attributes

emtf::sector_array< SectorProcessorsector_processors_
 
EMTFSetup setup_
 
const edm::EDGetToken tokenCPPF_
 
const edm::EDGetToken tokenCSC_
 
const edm::EDGetToken tokenCSCComparator_
 
const edm::EDGetToken tokenDTPhi_
 
const edm::EDGetToken tokenDTTheta_
 
const edm::EDGetToken tokenGEM_
 
const edm::EDGetToken tokenME0_
 
const edm::EDGetToken tokenRPC_
 
int verbose_
 

Detailed Description

Definition at line 16 of file TrackFinder.h.

Constructor & Destructor Documentation

◆ TrackFinder()

TrackFinder::TrackFinder ( const edm::ParameterSet iConfig,
edm::ConsumesCollector &&  iConsumes 
)
explicit

Definition at line 6 of file TrackFinder.cc.

7  : setup_(iConfig, iConsumes),
11  iConsumes.consumes<emtf::DTTag::theta_digi_collection>(iConfig.getParameter<edm::InputTag>("DTThetaInput"))),
14  iConfig.getParameter<edm::InputTag>("CSCComparatorInput"))),
19  verbose_(iConfig.getUntrackedParameter<int>("verbosity")) {}
const edm::EDGetToken tokenCSCComparator_
Definition: TrackFinder.h:38
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
const edm::EDGetToken tokenCSC_
Definition: TrackFinder.h:37
const edm::EDGetToken tokenCPPF_
Definition: TrackFinder.h:40
const edm::EDGetToken tokenDTPhi_
Definition: TrackFinder.h:35
l1t::CPPFDigiCollection digi_collection
const edm::EDGetToken tokenDTTheta_
Definition: TrackFinder.h:36
T getUntrackedParameter(std::string const &, T const &) const
EMTFSetup setup_
Definition: TrackFinder.h:30
const edm::EDGetToken tokenGEM_
Definition: TrackFinder.h:41
const edm::EDGetToken tokenRPC_
Definition: TrackFinder.h:39
const edm::EDGetToken tokenME0_
Definition: TrackFinder.h:42
emtf::sector_array< SectorProcessor > sector_processors_
Definition: TrackFinder.h:32

◆ ~TrackFinder()

TrackFinder::~TrackFinder ( )

Definition at line 21 of file TrackFinder.cc.

21 {}

Member Function Documentation

◆ process()

void TrackFinder::process ( const edm::Event iEvent,
const edm::EventSetup iSetup,
EMTFHitCollection out_hits,
EMTFTrackCollection out_tracks 
)

Definition at line 23 of file TrackFinder.cc.

References gather_cfg::cout, emtf::dump_fw_raw_input(), makeMuonMisalignmentScenario::endcap, EMTFSetup::era(), EMTFSubsystemCollector::extractPrimitives(), EMTFSetup::get_fw_version(), ConditionHelper::get_pc_lut_version(), EMTFSetup::get_pc_lut_version(), ConditionHelper::get_pc_lut_version_unchecked(), PtAssignmentEngine::get_pt_lut_version(), EMTFSetup::get_pt_lut_version(), EMTFSetup::getConditionHelper(), EMTFSetup::getConfig(), EMTFSetup::getGeometryTranslator(), EMTFSetup::getPtAssignmentEngine(), iEvent, emtf::MAX_ENDCAP, emtf::MAX_TRIGSECTOR, emtf::MIN_ENDCAP, emtf::MIN_TRIGSECTOR, AlCaHLTBitMon_ParallelJobs::p, EMTFSetup::reload(), nano_mu_digi_cff::sector, sector_processors_, setup_, tokenCPPF_, tokenCSC_, tokenDTPhi_, tokenDTTheta_, tokenGEM_, tokenME0_, tokenRPC_, csctfTrackDigis_cfi::useDT, muonRecoAnalyzer_cfi::useGEM, hltPhase2L3MuonsNoID_cfi::useME0, EMTFSetup::useO2O(), dtTriggerPhase2PrimitiveDigis_cfi::useRPC, and verbose_.

26  {
27  // Clear output collections
28  out_hits.clear();
29  out_tracks.clear();
30 
31  // Check and update geometry, conditions, versions, sp LUTs, and pt assignment engine
32  setup_.reload(iEvent, iSetup);
33 
34  auto tp_geom_ = &(setup_.getGeometryTranslator());
35 
36  // Check versions
37  if (verbose_ > 0) { // debug
38  std::cout << "Event: " << iEvent.id() << " isData: " << iEvent.isRealData() << " useO2O: " << setup_.useO2O()
39  << " era: " << setup_.era() << " fw_ver: " << setup_.get_fw_version()
40  << " pt_lut_ver: " << setup_.get_pt_lut_version()
41  << " pt_lut_ver in engine: " << setup_.getPtAssignmentEngine()->get_pt_lut_version()
42  << " pc_lut_ver: " << setup_.get_pc_lut_version()
43  << " pc_lut_ver in cond (i): " << setup_.getConditionHelper().get_pc_lut_version()
44  << " pc_lut_ver in cond (ii): " << setup_.getConditionHelper().get_pc_lut_version_unchecked()
45  << std::endl;
46  }
47 
48  // ___________________________________________________________________________
49  // Extract all trigger primitives
50 
51  TriggerPrimitiveCollection muon_primitives;
52 
53  EMTFSubsystemCollector collector;
54 
55  auto iConfig = setup_.getConfig();
56  auto useDT = iConfig.getParameter<bool>("DTEnable");
57  auto useCSC = iConfig.getParameter<bool>("CSCEnable");
58  auto useRPC = iConfig.getParameter<bool>("RPCEnable");
59  auto useIRPC = iConfig.getParameter<bool>("IRPCEnable");
60  auto useCPPF = iConfig.getParameter<bool>("CPPFEnable");
61  auto useGEM = iConfig.getParameter<bool>("GEMEnable");
62  auto useME0 = iConfig.getParameter<bool>("ME0Enable");
63 
64  if (useCSC) {
65  collector.extractPrimitives(emtf::CSCTag(), tp_geom_, iEvent, tokenCSC_, muon_primitives);
66  //collector.extractPrimitives(emtf::CSCTag(), tp_geom_, iEvent, tokenCSC_, tokenCSCComparator_, muon_primitives);
67  }
68  if (useRPC && useCPPF) {
69  collector.extractPrimitives(emtf::CPPFTag(), tp_geom_, iEvent, tokenCPPF_, muon_primitives);
70  } else if (useRPC) {
71  collector.extractPrimitives(emtf::RPCTag(), tp_geom_, iEvent, tokenRPC_, muon_primitives);
72  }
73  if (useIRPC) {
74  collector.extractPrimitives(emtf::IRPCTag(), tp_geom_, iEvent, tokenRPC_, muon_primitives);
75  }
76  if (useGEM) {
77  collector.extractPrimitives(emtf::GEMTag(), tp_geom_, iEvent, tokenGEM_, muon_primitives);
78  }
79  if (useME0) {
80  collector.extractPrimitives(emtf::ME0Tag(), tp_geom_, iEvent, tokenME0_, muon_primitives);
81  }
82  if (useDT) {
83  collector.extractPrimitives(emtf::DTTag(), tp_geom_, iEvent, tokenDTPhi_, tokenDTTheta_, muon_primitives);
84  }
85 
86  // Check trigger primitives. The printout is really verbose.
87  if (verbose_ > 2) { // debug
88  std::cout << "Num of TriggerPrimitive: " << muon_primitives.size() << std::endl;
89  for (const auto& p : muon_primitives) {
90  p.print(std::cout);
91  }
92  }
93 
94  // ___________________________________________________________________________
95  // Run the sector processors
96 
101 
102  sector_processors_.at(es).configure(&setup_, verbose_, endcap, sector);
103  sector_processors_.at(es).process(iEvent.id(), muon_primitives, out_hits, out_tracks);
104  }
105  }
106 
107  // ___________________________________________________________________________
108  // Check emulator input and output. They are printed as raw text that is
109  // used by the firmware simulator to do comparisons.
110  if (verbose_ > 1) { // debug
111  emtf::dump_fw_raw_input(out_hits, out_tracks);
112  }
113 
114  return;
115 }
const ConditionHelper & getConditionHelper() const
Definition: EMTFSetup.h:31
constexpr int MIN_ENDCAP
Definition: Common.h:45
void dump_fw_raw_input(const l1t::EMTFHitCollection &out_hits, const l1t::EMTFTrackCollection &out_tracks)
Definition: DebugTools.cc:6
const edm::EDGetToken tokenCSC_
Definition: TrackFinder.h:37
const edm::EDGetToken tokenCPPF_
Definition: TrackFinder.h:40
const edm::EDGetToken tokenDTPhi_
Definition: TrackFinder.h:35
unsigned int get_pc_lut_version_unchecked() const
const edm::EDGetToken tokenDTTheta_
Definition: TrackFinder.h:36
const GeometryTranslator & getGeometryTranslator() const
Definition: EMTFSetup.h:29
constexpr int MIN_TRIGSECTOR
Definition: Common.h:49
EMTFSetup setup_
Definition: TrackFinder.h:30
int iEvent
Definition: GenABIO.cc:224
const edm::EDGetToken tokenGEM_
Definition: TrackFinder.h:41
unsigned get_fw_version() const
Definition: EMTFSetup.h:47
unsigned get_pc_lut_version() const
Definition: EMTFSetup.h:49
const edm::EDGetToken tokenRPC_
Definition: TrackFinder.h:39
int get_pt_lut_version() const
void extractPrimitives(T tag, const GeometryTranslator *tp_geom, const edm::Event &iEvent, const edm::EDGetToken &token, TriggerPrimitiveCollection &out) const
const edm::EDGetToken tokenME0_
Definition: TrackFinder.h:42
emtf::sector_array< SectorProcessor > sector_processors_
Definition: TrackFinder.h:32
PtAssignmentEngine * getPtAssignmentEngine() const
Definition: EMTFSetup.h:37
const edm::ParameterSet & getConfig() const
Definition: EMTFSetup.h:52
bool useO2O() const
Definition: EMTFSetup.h:54
constexpr int MAX_ENDCAP
Definition: Common.h:46
unsigned get_pt_lut_version() const
Definition: EMTFSetup.h:48
constexpr int MAX_TRIGSECTOR
Definition: Common.h:50
std::string era() const
Definition: EMTFSetup.h:55
L1TMuon::TriggerPrimitiveCollection TriggerPrimitiveCollection
Definition: Common.h:32
unsigned int get_pc_lut_version() const
void reload(const edm::Event &iEvent, const edm::EventSetup &iSetup)
Definition: EMTFSetup.cc:41

Member Data Documentation

◆ sector_processors_

emtf::sector_array<SectorProcessor> TrackFinder::sector_processors_
private

Definition at line 32 of file TrackFinder.h.

Referenced by process().

◆ setup_

EMTFSetup TrackFinder::setup_
private

Definition at line 30 of file TrackFinder.h.

Referenced by process(), and upgradeWorkflowComponents.UpgradeWorkflow::setup().

◆ tokenCPPF_

const edm::EDGetToken TrackFinder::tokenCPPF_
private

Definition at line 40 of file TrackFinder.h.

Referenced by process().

◆ tokenCSC_

const edm::EDGetToken TrackFinder::tokenCSC_
private

Definition at line 37 of file TrackFinder.h.

Referenced by process().

◆ tokenCSCComparator_

const edm::EDGetToken TrackFinder::tokenCSCComparator_
private

Definition at line 38 of file TrackFinder.h.

◆ tokenDTPhi_

const edm::EDGetToken TrackFinder::tokenDTPhi_
private

Definition at line 35 of file TrackFinder.h.

Referenced by process().

◆ tokenDTTheta_

const edm::EDGetToken TrackFinder::tokenDTTheta_
private

Definition at line 36 of file TrackFinder.h.

Referenced by process().

◆ tokenGEM_

const edm::EDGetToken TrackFinder::tokenGEM_
private

Definition at line 41 of file TrackFinder.h.

Referenced by process().

◆ tokenME0_

const edm::EDGetToken TrackFinder::tokenME0_
private

Definition at line 42 of file TrackFinder.h.

Referenced by process().

◆ tokenRPC_

const edm::EDGetToken TrackFinder::tokenRPC_
private

Definition at line 39 of file TrackFinder.h.

Referenced by process().

◆ verbose_

int TrackFinder::verbose_
private

Definition at line 44 of file TrackFinder.h.

Referenced by process().