CMS 3D CMS Logo

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

#include <L1MuBMSectorProcessor.h>

Public Member Functions

const L1MuBMAssignmentUnitAU (int id) const
 return Assignment Unit, index [0,1] More...
 
bool brl () const
 is it a barrel-only Sector Processor? More...
 
const L1MuBMTFConfigconfig () const
 access configuration More...
 
const L1MuBMDataBufferdata () const
 return Data Buffer More...
 
L1MuBMDataBufferdata ()
 
const L1MuBMExtrapolationUnitEU () const
 return Extrapolation Unit More...
 
const L1MuBMSecProcIdid () const
 return Sector Processor identifier More...
 
 L1MuBMSectorProcessor ()=delete
 constructor More...
 
 L1MuBMSectorProcessor (const L1MuBMTrackFinder &, const L1MuBMSecProcId &, edm::ConsumesCollector &&)
 
const L1MuBMSectorProcessorneighbour () const
 return pointer to the next wheel neighbour More...
 
bool ovl () const
 is it an overlap region Sector Processor? More...
 
void print () const
 print muon candidates found by the Sector Processor More...
 
void reset ()
 reset the Sector Processor More...
 
void run (int bx, const edm::Event &e, const edm::EventSetup &c)
 run the Sector Processor More...
 
const L1MuBMTrackAssemblerTA () const
 return Track Assembler More...
 
const L1MuBMTrackFindertf () const
 return reference to barrel MTTF More...
 
L1MuBMTrack const & track (int id) const
 return muon candidate, index [0,1] More...
 
L1MuBMTracktrack (int id)
 
L1MuBMTrack const & tracK (int id) const
 return muon candidate, index [0,1] More...
 
L1MuBMTracktracK (int id)
 

Private Member Functions

bool anyTrack () const
 are there any non-empty muon candidates? More...
 

Private Attributes

std::vector< L1MuBMAssignmentUnitm_AUs
 
const edm::ESGetToken< L1TMuonBarrelParams, L1TMuonBarrelParamsRcdm_bmtfParamsToken
 
L1MuBMDataBuffer m_DataBuffer
 
L1MuBMExtrapolationUnit m_EU
 
L1MuBMSectorReceiver m_SectorReceiver
 
L1MuBMSecProcId m_spid
 
L1MuBMTrackAssembler m_TA
 
const L1MuBMTrackFinderm_tf
 
std::vector< L1MuBMTrackm_TrackCands
 
std::vector< L1MuBMTrackm_TracKCands
 

Detailed Description

Sector Processor:

A Sector Processor consists of:

N. Neumeister CERN EP J. Troconiz UAM Madrid

Definition at line 58 of file L1MuBMSectorProcessor.h.

Constructor & Destructor Documentation

◆ L1MuBMSectorProcessor() [1/2]

L1MuBMSectorProcessor::L1MuBMSectorProcessor ( )
delete

constructor

◆ L1MuBMSectorProcessor() [2/2]

L1MuBMSectorProcessor::L1MuBMSectorProcessor ( const L1MuBMTrackFinder tf,
const L1MuBMSecProcId id,
edm::ConsumesCollector &&  iC 
)

Definition at line 54 of file L1MuBMSectorProcessor.cc.

References m_AUs, m_spid, m_TrackCands, and m_TracKCands.

57  :
58 
59  m_tf(tf),
60  m_spid(id),
61  m_SectorReceiver(*this, std::move(iC)),
62  m_DataBuffer(*this),
63  m_EU(*this, iC),
64  m_TA(*this),
66  m_AUs(),
67  m_TrackCands(),
68  m_TracKCands() {
69  // 2 assignment units
70  m_AUs.reserve(2);
71  m_AUs.emplace_back(*this, 0);
72  m_AUs.emplace_back(*this, 1);
73 
74  // now the 2 track candidates
75  m_TrackCands.reserve(2);
76  m_TrackCands.emplace_back(m_spid);
77  m_TrackCands.push_back(m_spid);
78 
79  m_TracKCands.reserve(2);
80  m_TracKCands.push_back(m_spid);
81  m_TracKCands.push_back(m_spid);
82 }
L1MuBMTrackAssembler m_TA
const edm::ESGetToken< L1TMuonBarrelParams, L1TMuonBarrelParamsRcd > m_bmtfParamsToken
L1MuBMExtrapolationUnit m_EU
std::vector< L1MuBMAssignmentUnit > m_AUs
const L1MuBMTrackFinder & m_tf
L1MuBMSectorReceiver m_SectorReceiver
std::vector< L1MuBMTrack > m_TracKCands
std::vector< L1MuBMTrack > m_TrackCands
def move(src, dest)
Definition: eostools.py:511
const L1MuBMTrackFinder & tf() const
return reference to barrel MTTF

Member Function Documentation

◆ anyTrack()

bool L1MuBMSectorProcessor::anyTrack ( ) const
private

are there any non-empty muon candidates?

Definition at line 241 of file L1MuBMSectorProcessor.cc.

References relativeConstraints::empty, and m_TrackCands.

Referenced by print().

241  {
242  if (!m_TrackCands[0].empty())
243  return true;
244  if (!m_TrackCands[1].empty())
245  return true;
246 
247  return false;
248 }
std::vector< L1MuBMTrack > m_TrackCands

◆ AU()

const L1MuBMAssignmentUnit& L1MuBMSectorProcessor::AU ( int  id) const
inline

return Assignment Unit, index [0,1]

Definition at line 102 of file L1MuBMSectorProcessor.h.

References id(), and m_AUs.

102 { return m_AUs[id]; }
const L1MuBMSecProcId & id() const
return Sector Processor identifier
std::vector< L1MuBMAssignmentUnit > m_AUs

◆ brl()

bool L1MuBMSectorProcessor::brl ( ) const
inline

is it a barrel-only Sector Processor?

Definition at line 86 of file L1MuBMSectorProcessor.h.

References m_spid, and L1MuBMSecProcId::ovl().

86 { return !m_spid.ovl(); }
bool ovl() const
is it an overlap region Sector Processor?

◆ config()

const L1MuBMTFConfig & L1MuBMSectorProcessor::config ( void  ) const

◆ data() [1/2]

const L1MuBMDataBuffer& L1MuBMSectorProcessor::data ( ) const
inline

◆ data() [2/2]

L1MuBMDataBuffer& L1MuBMSectorProcessor::data ( )
inline

Definition at line 93 of file L1MuBMSectorProcessor.h.

References m_DataBuffer.

93 { return m_DataBuffer; }

◆ EU()

const L1MuBMExtrapolationUnit& L1MuBMSectorProcessor::EU ( ) const
inline

return Extrapolation Unit

Definition at line 96 of file L1MuBMSectorProcessor.h.

References m_EU.

Referenced by L1MuBMTrackAssembler::run().

96 { return m_EU; }
L1MuBMExtrapolationUnit m_EU

◆ id()

const L1MuBMSecProcId& L1MuBMSectorProcessor::id ( void  ) const
inline

◆ neighbour()

const L1MuBMSectorProcessor * L1MuBMSectorProcessor::neighbour ( ) const

return pointer to the next wheel neighbour

Definition at line 221 of file L1MuBMSectorProcessor.cc.

References funct::abs(), id(), m_spid, m_tf, nano_mu_digi_cff::sector, L1MuBMSecProcId::sector(), L1MuBMTrackFinder::sp(), L1MuBMSecProcId::wheel(), and makeMuonMisalignmentScenario::wheel.

221  {
222  int sector = m_spid.sector();
223  int wheel = m_spid.wheel();
224 
225  // the neighbour is in the same wedge with the following definition:
226  // current SP -3 -2 -1 +1 +2 +3
227  // neighbour -2 -1 +1 0 +1 +2
228 
229  if (wheel == 1)
230  return nullptr;
231  wheel = (wheel == -1) ? 1 : (wheel / abs(wheel)) * (abs(wheel) - 1);
232 
233  const L1MuBMSecProcId id(wheel, sector);
234 
235  return m_tf.sp(id);
236 }
const L1MuBMSectorProcessor * sp(const L1MuBMSecProcId &) const
get a pointer to a Sector Processor
const L1MuBMSecProcId & id() const
return Sector Processor identifier
int wheel() const
return wheel number
const L1MuBMTrackFinder & m_tf
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int sector() const
return sector number

◆ ovl()

bool L1MuBMSectorProcessor::ovl ( ) const
inline

is it an overlap region Sector Processor?

Definition at line 89 of file L1MuBMSectorProcessor.h.

References m_spid, and L1MuBMSecProcId::ovl().

89 { return m_spid.ovl(); }
bool ovl() const
is it an overlap region Sector Processor?

◆ print()

void L1MuBMSectorProcessor::print ( void  ) const

print muon candidates found by the Sector Processor

Definition at line 209 of file L1MuBMSectorProcessor.cc.

References anyTrack(), gather_cfg::cout, m_spid, m_TrackCands, and submitPVValidationJobs::t.

Referenced by L1MuBMTrackFinder::run().

209  {
210  if (anyTrack()) {
211  cout << "Muon candidates found in " << m_spid << " : " << endl;
212  for (auto const& t : m_TrackCands) {
213  t.print();
214  }
215  }
216 }
bool anyTrack() const
are there any non-empty muon candidates?
std::vector< L1MuBMTrack > m_TrackCands

◆ reset()

void L1MuBMSectorProcessor::reset ( void  )

reset the Sector Processor

Definition at line 193 of file L1MuBMSectorProcessor.cc.

References m_AUs, m_DataBuffer, m_EU, m_SectorReceiver, m_TA, m_TrackCands, m_TracKCands, L1MuBMDataBuffer::reset(), L1MuBMTrackAssembler::reset(), L1MuBMSectorReceiver::reset(), and L1MuBMExtrapolationUnit::reset().

Referenced by L1MuBMTrackFinder::reset(), and run().

193  {
196  m_EU.reset();
197  m_TA.reset();
198  m_AUs[0].reset();
199  m_AUs[1].reset();
200  m_TrackCands[0].reset();
201  m_TrackCands[1].reset();
202  m_TracKCands[0].reset();
203  m_TracKCands[1].reset();
204 }
L1MuBMTrackAssembler m_TA
void reset()
clear Data Buffer
L1MuBMExtrapolationUnit m_EU
std::vector< L1MuBMAssignmentUnit > m_AUs
void reset()
reset Extrapolation Unit
L1MuBMSectorReceiver m_SectorReceiver
void reset()
reset Track Assembler
std::vector< L1MuBMTrack > m_TracKCands
void reset()
clear Sector Receiver
std::vector< L1MuBMTrack > m_TrackCands

◆ run()

void L1MuBMSectorProcessor::run ( int  bx,
const edm::Event e,
const edm::EventSetup c 
)

run the Sector Processor

Definition at line 91 of file L1MuBMSectorProcessor.cc.

References nano_mu_digi_cff::bx, DummyCfis::c, config(), gather_cfg::cout, Debug, MillePedeFileConverter_cfg::e, relativeConstraints::empty, L1MuBMTrackAssembler::isEmpty(), m_AUs, m_bmtfParamsToken, m_DataBuffer, m_EU, m_SectorReceiver, m_spid, m_TA, m_TrackCands, m_TracKCands, L1MuBMExtrapolationUnit::numberOfExt(), L1MuBMDataBuffer::numberTSphi(), L1MuBMTrackAssembler::print(), L1MuBMExtrapolationUnit::print(), L1MuBMDataBuffer::printTSphi(), reset(), L1MuBMTrackAssembler::run(), L1MuBMSectorReceiver::run(), L1MuBMExtrapolationUnit::run(), and L1MuBMSecProcId::wheel().

Referenced by L1MuBMTrackFinder::run().

91  {
92  // receive data and store them into the data buffer
94 
95  // check content of data buffer
96  if (config().Debug(4) && m_DataBuffer.numberTSphi() > 0) {
97  cout << "Phi track segments received by " << m_spid << " : " << endl;
99  }
100 
101  // perform all extrapolations
102  int n_ext = 0; // number of successful extrapolations
103  if (m_DataBuffer.numberTSphi() > 1) {
104  m_EU.run(c);
105  n_ext = m_EU.numberOfExt();
106  if (config().Debug(3) && n_ext > 0) {
107  // if ( print_flag && n_ext > 0 ) {
108  cout << "Number of successful extrapolations : " << n_ext << endl;
109  m_EU.print();
110  }
111  }
112 
113  // hardware debug (output from Extrapolator and Quality Sorter)
114  // m_EU.print(1);
115 
116  // perform track assembling
117  if (n_ext > 0) {
118  m_TA.run();
119  if (config().Debug(3))
120  m_TA.print();
121  }
122 
123  L1TMuonBarrelParams const& bmtfParams = c.getData(m_bmtfParamsToken);
124 
125  // assign pt, eta, phi and quality
126  if (!m_TA.isEmpty(0))
127  m_AUs[0].run(bmtfParams);
128  if (!m_TA.isEmpty(1))
129  m_AUs[1].run(bmtfParams);
130 
131  if (m_spid.wheel() == -1) {
132  if (!m_TrackCands[0].empty() && m_TrackCands[0].address(2) > 3 && m_TrackCands[0].address(2) < 6)
133  m_TrackCands[0].reset();
134  if (!m_TrackCands[0].empty() && m_TrackCands[0].address(3) > 3 && m_TrackCands[0].address(3) < 6)
135  m_TrackCands[0].reset();
136  if (!m_TrackCands[0].empty() && m_TrackCands[0].address(4) > 3 && m_TrackCands[0].address(4) < 6)
137  m_TrackCands[0].reset();
138 
139  if (!m_TracKCands[0].empty() && m_TracKCands[0].address(2) > 3 && m_TracKCands[0].address(2) < 6)
140  m_TracKCands[0].reset();
141  if (!m_TracKCands[0].empty() && m_TracKCands[0].address(3) > 3 && m_TracKCands[0].address(3) < 6)
142  m_TracKCands[0].reset();
143  if (!m_TracKCands[0].empty() && m_TracKCands[0].address(4) > 3 && m_TracKCands[0].address(4) < 6)
144  m_TracKCands[0].reset();
145 
146  if (!m_TrackCands[1].empty() && m_TrackCands[1].address(2) > 3 && m_TrackCands[1].address(2) < 6)
147  m_TrackCands[1].reset();
148  if (!m_TrackCands[1].empty() && m_TrackCands[1].address(3) > 3 && m_TrackCands[1].address(3) < 6)
149  m_TrackCands[1].reset();
150  if (!m_TrackCands[1].empty() && m_TrackCands[1].address(4) > 3 && m_TrackCands[1].address(4) < 6)
151  m_TrackCands[1].reset();
152 
153  if (!m_TracKCands[1].empty() && m_TracKCands[1].address(2) > 3 && m_TracKCands[1].address(2) < 6)
154  m_TracKCands[1].reset();
155  if (!m_TracKCands[1].empty() && m_TracKCands[1].address(3) > 3 && m_TracKCands[1].address(3) < 6)
156  m_TracKCands[1].reset();
157  if (!m_TracKCands[1].empty() && m_TracKCands[1].address(4) > 3 && m_TracKCands[1].address(4) < 6)
158  m_TracKCands[1].reset();
159 
160  if (!m_TrackCands[0].empty() && m_TrackCands[0].address(2) > 7 && m_TrackCands[0].address(2) < 10)
161  m_TrackCands[0].reset();
162  if (!m_TrackCands[0].empty() && m_TrackCands[0].address(3) > 7 && m_TrackCands[0].address(3) < 10)
163  m_TrackCands[0].reset();
164  if (!m_TrackCands[0].empty() && m_TrackCands[0].address(4) > 7 && m_TrackCands[0].address(4) < 10)
165  m_TrackCands[0].reset();
166 
167  if (!m_TracKCands[0].empty() && m_TracKCands[0].address(2) > 7 && m_TracKCands[0].address(2) < 10)
168  m_TracKCands[0].reset();
169  if (!m_TracKCands[0].empty() && m_TracKCands[0].address(3) > 7 && m_TracKCands[0].address(3) < 10)
170  m_TracKCands[0].reset();
171  if (!m_TracKCands[0].empty() && m_TracKCands[0].address(4) > 7 && m_TracKCands[0].address(4) < 10)
172  m_TracKCands[0].reset();
173 
174  if (!m_TrackCands[1].empty() && m_TrackCands[1].address(2) > 7 && m_TrackCands[1].address(2) < 10)
175  m_TrackCands[1].reset();
176  if (!m_TrackCands[1].empty() && m_TrackCands[1].address(3) > 7 && m_TrackCands[1].address(3) < 10)
177  m_TrackCands[1].reset();
178  if (!m_TrackCands[1].empty() && m_TrackCands[1].address(4) > 7 && m_TrackCands[1].address(4) < 10)
179  m_TrackCands[1].reset();
180 
181  if (!m_TracKCands[1].empty() && m_TracKCands[1].address(2) > 7 && m_TracKCands[1].address(2) < 10)
182  m_TracKCands[1].reset();
183  if (!m_TracKCands[1].empty() && m_TracKCands[1].address(3) > 7 && m_TracKCands[1].address(3) < 10)
184  m_TracKCands[1].reset();
185  if (!m_TracKCands[1].empty() && m_TracKCands[1].address(4) > 7 && m_TracKCands[1].address(4) < 10)
186  m_TracKCands[1].reset();
187  }
188 }
void run(int bx, const edm::Event &e, const edm::EventSetup &c)
receive track segment data from the BBMX and CSC chamber triggers
int wheel() const
return wheel number
L1MuBMTrackAssembler m_TA
void run()
run Track Assembler
const edm::ESGetToken< L1TMuonBarrelParams, L1TMuonBarrelParamsRcd > m_bmtfParamsToken
int numberTSphi() const
return number of non-empty phi track segments
L1MuBMExtrapolationUnit m_EU
std::vector< L1MuBMAssignmentUnit > m_AUs
const L1MuBMTFConfig & config() const
access configuration
L1MuBMSectorReceiver m_SectorReceiver
void print() const
print result of Track Assembler
std::vector< L1MuBMTrack > m_TracKCands
int numberOfExt() const
return number of successful extrapolations
void run(int bx, const edm::Event &e, const edm::EventSetup &c)
run the Sector Processor
bool isEmpty(int id) const
is it a valid Track Class?
void print(int level=0) const
print all successful extrapolations
std::vector< L1MuBMTrack > m_TrackCands
void printTSphi() const
print all phi track segments which are in the buffer
const bool Debug
void reset()
reset the Sector Processor
void run(const edm::EventSetup &c)
run Extrapolation Unit

◆ TA()

const L1MuBMTrackAssembler& L1MuBMSectorProcessor::TA ( ) const
inline

return Track Assembler

Definition at line 99 of file L1MuBMSectorProcessor.h.

References m_TA.

Referenced by L1MuBMAssignmentUnit::getPtMethod(), L1MuBMAssignmentUnit::QuaAU(), L1MuBMAssignmentUnit::Quality(), and L1MuBMAssignmentUnit::run().

99 { return m_TA; }
L1MuBMTrackAssembler m_TA

◆ tf()

const L1MuBMTrackFinder& L1MuBMSectorProcessor::tf ( ) const
inline

return reference to barrel MTTF

Definition at line 83 of file L1MuBMSectorProcessor.h.

References m_tf.

83 { return m_tf; }
const L1MuBMTrackFinder & m_tf

◆ track() [1/2]

L1MuBMTrack const& L1MuBMSectorProcessor::track ( int  id) const
inline

return muon candidate, index [0,1]

Definition at line 105 of file L1MuBMSectorProcessor.h.

References id(), and m_TrackCands.

Referenced by L1MuBMAssignmentUnit::PhiAU(), L1MuBMAssignmentUnit::PtAU(), L1MuBMAssignmentUnit::QuaAU(), L1MuBMEtaProcessor::receiveAddresses(), L1MuBMWedgeSorter::run(), and L1MuBMAssignmentUnit::run().

105 { return m_TrackCands[id]; }
const L1MuBMSecProcId & id() const
return Sector Processor identifier
std::vector< L1MuBMTrack > m_TrackCands

◆ track() [2/2]

L1MuBMTrack& L1MuBMSectorProcessor::track ( int  id)
inline

Definition at line 106 of file L1MuBMSectorProcessor.h.

References id(), and m_TrackCands.

106 { return m_TrackCands[id]; }
const L1MuBMSecProcId & id() const
return Sector Processor identifier
std::vector< L1MuBMTrack > m_TrackCands

◆ tracK() [1/2]

L1MuBMTrack const& L1MuBMSectorProcessor::tracK ( int  id) const
inline

return muon candidate, index [0,1]

Definition at line 109 of file L1MuBMSectorProcessor.h.

References id(), and m_TracKCands.

Referenced by L1MuBMAssignmentUnit::PhiAU(), L1MuBMAssignmentUnit::PtAU(), L1MuBMAssignmentUnit::QuaAU(), L1MuBMEtaProcessor::receiveAddresses(), L1MuBMAssignmentUnit::run(), and L1MuBMTrackFinder::run().

109 { return m_TracKCands[id]; }
const L1MuBMSecProcId & id() const
return Sector Processor identifier
std::vector< L1MuBMTrack > m_TracKCands

◆ tracK() [2/2]

L1MuBMTrack& L1MuBMSectorProcessor::tracK ( int  id)
inline

Definition at line 110 of file L1MuBMSectorProcessor.h.

References id(), and m_TracKCands.

110 { return m_TracKCands[id]; }
const L1MuBMSecProcId & id() const
return Sector Processor identifier
std::vector< L1MuBMTrack > m_TracKCands

Member Data Documentation

◆ m_AUs

std::vector<L1MuBMAssignmentUnit> L1MuBMSectorProcessor::m_AUs
private

Definition at line 125 of file L1MuBMSectorProcessor.h.

Referenced by AU(), L1MuBMSectorProcessor(), reset(), and run().

◆ m_bmtfParamsToken

const edm::ESGetToken<L1TMuonBarrelParams, L1TMuonBarrelParamsRcd> L1MuBMSectorProcessor::m_bmtfParamsToken
private

Definition at line 124 of file L1MuBMSectorProcessor.h.

Referenced by run().

◆ m_DataBuffer

L1MuBMDataBuffer L1MuBMSectorProcessor::m_DataBuffer
private

Definition at line 121 of file L1MuBMSectorProcessor.h.

Referenced by data(), reset(), and run().

◆ m_EU

L1MuBMExtrapolationUnit L1MuBMSectorProcessor::m_EU
private

Definition at line 122 of file L1MuBMSectorProcessor.h.

Referenced by EU(), reset(), and run().

◆ m_SectorReceiver

L1MuBMSectorReceiver L1MuBMSectorProcessor::m_SectorReceiver
private

Definition at line 120 of file L1MuBMSectorProcessor.h.

Referenced by reset(), and run().

◆ m_spid

L1MuBMSecProcId L1MuBMSectorProcessor::m_spid
private

Definition at line 118 of file L1MuBMSectorProcessor.h.

Referenced by brl(), id(), L1MuBMSectorProcessor(), neighbour(), ovl(), print(), and run().

◆ m_TA

L1MuBMTrackAssembler L1MuBMSectorProcessor::m_TA
private

Definition at line 123 of file L1MuBMSectorProcessor.h.

Referenced by reset(), run(), and TA().

◆ m_tf

const L1MuBMTrackFinder& L1MuBMSectorProcessor::m_tf
private

Definition at line 117 of file L1MuBMSectorProcessor.h.

Referenced by config(), neighbour(), and tf().

◆ m_TrackCands

std::vector<L1MuBMTrack> L1MuBMSectorProcessor::m_TrackCands
private

Definition at line 127 of file L1MuBMSectorProcessor.h.

Referenced by anyTrack(), L1MuBMSectorProcessor(), print(), reset(), run(), and track().

◆ m_TracKCands

std::vector<L1MuBMTrack> L1MuBMSectorProcessor::m_TracKCands
private

Definition at line 128 of file L1MuBMSectorProcessor.h.

Referenced by L1MuBMSectorProcessor(), reset(), run(), and tracK().