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),
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")) {}

◆ ~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.

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 
98  for (int sector = emtf::MIN_TRIGSECTOR; sector <= emtf::MAX_TRIGSECTOR; ++sector) {
100  (sector - emtf::MIN_TRIGSECTOR);
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 }

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(), sector_processors_, setup_, tokenCPPF_, tokenCSC_, tokenDTPhi_, tokenDTTheta_, tokenGEM_, tokenME0_, tokenRPC_, csctfTrackDigis_cfi::useDT, muonRecoAnalyzer_cfi::useGEM, muons1stStep_cfi::useME0, EMTFSetup::useO2O(), dtTriggerPhase2PrimitiveDigis_cfi::useRPC, and verbose_.

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().

EMTFSubsystemCollector::extractPrimitives
void extractPrimitives(T tag, const GeometryTranslator *tp_geom, const edm::Event &iEvent, const edm::EDGetToken &token, TriggerPrimitiveCollection &out) const
emtf::CSCTag
Definition: EMTFSubsystemTag.h:31
emtf::CPPFTag::digi_collection
l1t::CPPFDigiCollection digi_collection
Definition: EMTFSubsystemTag.h:54
TrackFinder::tokenDTPhi_
const edm::EDGetToken tokenDTPhi_
Definition: TrackFinder.h:35
emtf::MIN_TRIGSECTOR
constexpr int MIN_TRIGSECTOR
Definition: Common.h:49
TrackFinder::tokenCSC_
const edm::EDGetToken tokenCSC_
Definition: TrackFinder.h:37
emtf::GEMTag
Definition: EMTFSubsystemTag.h:57
emtf::CPPFTag
Definition: EMTFSubsystemTag.h:52
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
gather_cfg.cout
cout
Definition: gather_cfg.py:144
EMTFSetup::era
std::string era() const
Definition: EMTFSetup.h:55
emtf::MAX_ENDCAP
constexpr int MAX_ENDCAP
Definition: Common.h:46
ConditionHelper::get_pc_lut_version_unchecked
unsigned int get_pc_lut_version_unchecked() const
Definition: ConditionHelper.cc:88
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
makeMuonMisalignmentScenario.endcap
endcap
Definition: makeMuonMisalignmentScenario.py:320
TrackFinder::tokenDTTheta_
const edm::EDGetToken tokenDTTheta_
Definition: TrackFinder.h:36
L1MuDTChambPhContainer
Definition: L1MuDTChambPhContainer.h:33
emtf::MAX_TRIGSECTOR
constexpr int MAX_TRIGSECTOR
Definition: Common.h:50
TrackFinder::tokenCPPF_
const edm::EDGetToken tokenCPPF_
Definition: TrackFinder.h:40
RPCDigiCollection
EMTFSetup::getConfig
const edm::ParameterSet & getConfig() const
Definition: EMTFSetup.h:52
TrackFinder::tokenRPC_
const edm::EDGetToken tokenRPC_
Definition: TrackFinder.h:39
EMTFSetup::useO2O
bool useO2O() const
Definition: EMTFSetup.h:54
TrackFinder::verbose_
int verbose_
Definition: TrackFinder.h:44
EMTFSetup::getGeometryTranslator
const GeometryTranslator & getGeometryTranslator() const
Definition: EMTFSetup.h:29
emtf::MIN_ENDCAP
constexpr int MIN_ENDCAP
Definition: Common.h:45
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
TrackFinder::tokenGEM_
const edm::EDGetToken tokenGEM_
Definition: TrackFinder.h:41
TrackFinder::tokenME0_
const edm::EDGetToken tokenME0_
Definition: TrackFinder.h:42
GEMPadDigiClusterCollection
TrackFinder::setup_
EMTFSetup setup_
Definition: TrackFinder.h:30
emtf::ME0Tag
Definition: EMTFSubsystemTag.h:62
EMTFSubsystemCollector
Definition: EMTFSubsystemCollector.h:13
emtf::RPCTag
Definition: EMTFSubsystemTag.h:38
emtf::dump_fw_raw_input
void dump_fw_raw_input(const l1t::EMTFHitCollection &out_hits, const l1t::EMTFTrackCollection &out_tracks)
Definition: DebugTools.cc:6
EMTFSetup::reload
void reload(const edm::Event &iEvent, const edm::EventSetup &iSetup)
Definition: EMTFSetup.cc:40
EMTFSetup::get_pt_lut_version
unsigned get_pt_lut_version() const
Definition: EMTFSetup.h:48
TriggerPrimitiveCollection
L1TMuon::TriggerPrimitiveCollection TriggerPrimitiveCollection
Definition: Common.h:32
emtf::IRPCTag
Definition: EMTFSubsystemTag.h:45
EMTFSetup::get_pc_lut_version
unsigned get_pc_lut_version() const
Definition: EMTFSetup.h:49
iEvent
int iEvent
Definition: GenABIO.cc:224
ConditionHelper::get_pc_lut_version
unsigned int get_pc_lut_version() const
Definition: ConditionHelper.cc:71
EMTFSetup::getPtAssignmentEngine
PtAssignmentEngine * getPtAssignmentEngine() const
Definition: EMTFSetup.h:37
CSCComparatorDigiCollection
emtf::DTTag
Definition: EMTFSubsystemTag.h:24
CSCCorrelatedLCTDigiCollection
ME0TriggerDigiCollection
PtAssignmentEngine::get_pt_lut_version
int get_pt_lut_version() const
Definition: PtAssignmentEngine.h:28
TrackFinder::sector_processors_
emtf::sector_array< SectorProcessor > sector_processors_
Definition: TrackFinder.h:32
muons1stStep_cfi.useME0
useME0
Definition: muons1stStep_cfi.py:94
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
muonRecoAnalyzer_cfi.useGEM
useGEM
Definition: muonRecoAnalyzer_cfi.py:13
EMTFSetup::get_fw_version
unsigned get_fw_version() const
Definition: EMTFSetup.h:47
EMTFSetup::getConditionHelper
const ConditionHelper & getConditionHelper() const
Definition: EMTFSetup.h:31
csctfTrackDigis_cfi.useDT
useDT
Definition: csctfTrackDigis_cfi.py:122
dtTriggerPhase2PrimitiveDigis_cfi.useRPC
useRPC
Definition: dtTriggerPhase2PrimitiveDigis_cfi.py:46
L1MuDTChambThContainer
Definition: L1MuDTChambThContainer.h:33
edm::InputTag
Definition: InputTag.h:15
TrackFinder::tokenCSCComparator_
const edm::EDGetToken tokenCSCComparator_
Definition: TrackFinder.h:38