CMS 3D CMS Logo

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

#include <L1MuDTSectorProcessor.h>

Public Member Functions

const L1MuDTAssignmentUnitAU (int id) const
 return pointer to Assignment Unit, index [0,1] More...
 
bool brl () const
 is it a barrel-only Sector Processor? More...
 
const L1MuDTDataBufferdata () const
 return pointer to Data Buffer More...
 
L1MuDTDataBufferdata ()
 
const L1MuDTExtrapolationUnitEU () const
 return pointer to Extrapolation Unit More...
 
const L1MuDTSecProcIdid () const
 return Sector Processor identifier More...
 
 L1MuDTSectorProcessor (const L1MuDTTrackFinder &, const L1MuDTSecProcId &, edm::ConsumesCollector)
 constructor More...
 
const L1MuDTSectorProcessorneighbour () 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...
 
virtual void reset ()
 reset the Sector Processor More...
 
virtual void run (int bx, const edm::Event &e, const edm::EventSetup &c)
 run the Sector Processor More...
 
const L1MuDTTrackAssemblerTA () const
 return pointer to Track Assembler More...
 
const L1MuDTTrackFindertf () const
 return reference to barrel MTTF More...
 
const L1MuDTTracktrack (int id) const
 return pointer to muon candidate, index [0,1] More...
 
L1MuDTTracktrack (int id)
 
const L1MuDTTracktracK (int id) const
 return pointer to muon candidate, index [0,1] More...
 
L1MuDTTracktracK (int id)
 
virtual ~L1MuDTSectorProcessor ()
 destructor More...
 

Private Member Functions

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

Private Attributes

std::array< L1MuDTAssignmentUnit, 2 > m_AUs
 
L1MuDTDataBuffer m_DataBuffer
 
L1MuDTExtrapolationUnit m_EU
 
L1MuDTSectorReceiver m_SectorReceiver
 
L1MuDTSecProcId m_spid
 
L1MuDTTrackAssembler m_TA
 
const L1MuDTTrackFinderm_tf
 
std::array< L1MuDTTrack, 2 > m_TrackCands
 
std::array< L1MuDTTrack, 2 > m_TracKCands
 

Detailed Description

Sector Processor:

A Sector Processor consists of:

N. Neumeister CERN EP J. Troconiz UAM Madrid

Definition at line 56 of file L1MuDTSectorProcessor.h.

Constructor & Destructor Documentation

◆ L1MuDTSectorProcessor()

L1MuDTSectorProcessor::L1MuDTSectorProcessor ( const L1MuDTTrackFinder tf,
const L1MuDTSecProcId id,
edm::ConsumesCollector  iC 
)

constructor

Definition at line 52 of file L1MuDTSectorProcessor.cc.

55  : m_tf(tf),
56  m_spid(id),
57  m_SectorReceiver(*this, iC),
58  m_DataBuffer(*this),
59  m_EU(*this, iC),
60  m_TA(*this),
61  m_AUs{{{*this, 0, iC}, {*this, 1, iC}}},
62  m_TrackCands{{{m_spid}, {m_spid}}},
63  m_TracKCands{{{m_spid}, {m_spid}}} {}
L1MuDTTrackAssembler m_TA
const L1MuDTTrackFinder & tf() const
return reference to barrel MTTF
std::array< L1MuDTTrack, 2 > m_TrackCands
std::array< L1MuDTAssignmentUnit, 2 > m_AUs
L1MuDTExtrapolationUnit m_EU
std::array< L1MuDTTrack, 2 > m_TracKCands
L1MuDTSectorReceiver m_SectorReceiver
const L1MuDTTrackFinder & m_tf

◆ ~L1MuDTSectorProcessor()

L1MuDTSectorProcessor::~L1MuDTSectorProcessor ( )
virtual

destructor

Definition at line 69 of file L1MuDTSectorProcessor.cc.

69 {}

Member Function Documentation

◆ anyTrack()

bool L1MuDTSectorProcessor::anyTrack ( ) const
private

are there any non-empty muon candidates?

Definition at line 227 of file L1MuDTSectorProcessor.cc.

References relativeConstraints::empty, and m_TrackCands.

Referenced by print().

227  {
228  if (!m_TrackCands[0].empty())
229  return true;
230  if (!m_TrackCands[1].empty())
231  return true;
232 
233  return false;
234 }
std::array< L1MuDTTrack, 2 > m_TrackCands

◆ AU()

const L1MuDTAssignmentUnit* L1MuDTSectorProcessor::AU ( int  id) const
inline

return pointer to Assignment Unit, index [0,1]

Definition at line 99 of file L1MuDTSectorProcessor.h.

References id(), and m_AUs.

99 { return &m_AUs[id]; }
std::array< L1MuDTAssignmentUnit, 2 > m_AUs
const L1MuDTSecProcId & id() const
return Sector Processor identifier

◆ brl()

bool L1MuDTSectorProcessor::brl ( ) const
inline

is it a barrel-only Sector Processor?

Definition at line 83 of file L1MuDTSectorProcessor.h.

References m_spid, and L1MuDTSecProcId::ovl().

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

◆ data() [1/2]

const L1MuDTDataBuffer* L1MuDTSectorProcessor::data ( ) const
inline

◆ data() [2/2]

L1MuDTDataBuffer* L1MuDTSectorProcessor::data ( )
inline

Definition at line 90 of file L1MuDTSectorProcessor.h.

References m_DataBuffer.

90 { return &m_DataBuffer; }

◆ EU()

const L1MuDTExtrapolationUnit* L1MuDTSectorProcessor::EU ( ) const
inline

return pointer to Extrapolation Unit

Definition at line 93 of file L1MuDTSectorProcessor.h.

References m_EU.

Referenced by L1MuDTTrackAssembler::run().

93 { return &m_EU; }
L1MuDTExtrapolationUnit m_EU

◆ id()

const L1MuDTSecProcId& L1MuDTSectorProcessor::id ( void  ) const
inline

◆ neighbour()

const L1MuDTSectorProcessor * L1MuDTSectorProcessor::neighbour ( ) const

return pointer to the next wheel neighbour

Definition at line 207 of file L1MuDTSectorProcessor.cc.

References funct::abs(), id(), m_spid, m_tf, hgcalTBTopologyTester_cfi::sector, L1MuDTSecProcId::sector(), L1MuDTTrackFinder::sp(), L1MuDTSecProcId::wheel(), and makeMuonMisalignmentScenario::wheel.

207  {
208  int sector = m_spid.sector();
209  int wheel = m_spid.wheel();
210 
211  // the neighbour is in the same wedge with the following definition:
212  // current SP -3 -2 -1 +1 +2 +3
213  // neighbour -2 -1 +1 0 +1 +2
214 
215  if (wheel == 1)
216  return nullptr;
217  wheel = (wheel == -1) ? 1 : (wheel / abs(wheel)) * (abs(wheel) - 1);
218 
219  const L1MuDTSecProcId id(wheel, sector);
220 
221  return m_tf.sp(id);
222 }
int wheel() const
return wheel number
int sector() const
return sector number
const L1MuDTSecProcId & id() const
return Sector Processor identifier
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const L1MuDTSectorProcessor * sp(const L1MuDTSecProcId &) const
get a pointer to a Sector Processor
const L1MuDTTrackFinder & m_tf

◆ ovl()

bool L1MuDTSectorProcessor::ovl ( ) const
inline

is it an overlap region Sector Processor?

Definition at line 86 of file L1MuDTSectorProcessor.h.

References m_spid, and L1MuDTSecProcId::ovl().

Referenced by L1MuDTAssignmentUnit::getPtMethod(), L1MuDTSectorReceiver::receiveDTBXData(), and L1MuDTSectorReceiver::run().

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

◆ print()

void L1MuDTSectorProcessor::print ( void  ) const

print muon candidates found by the Sector Processor

Definition at line 193 of file L1MuDTSectorProcessor.cc.

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

193  {
194  if (anyTrack()) {
195  cout << "Muon candidates found in " << m_spid << " : " << endl;
196  auto iter = m_TrackCands.cbegin();
197  while (iter != m_TrackCands.end()) {
198  iter->print();
199  iter++;
200  }
201  }
202 }
std::array< L1MuDTTrack, 2 > m_TrackCands
bool anyTrack() const
are there any non-empty muon candidates?

◆ reset()

void L1MuDTSectorProcessor::reset ( void  )
virtual

reset the Sector Processor

Definition at line 177 of file L1MuDTSectorProcessor.cc.

References m_AUs, m_DataBuffer, m_EU, m_SectorReceiver, m_TA, m_TrackCands, m_TracKCands, L1MuDTDataBuffer::reset(), L1MuDTTrackAssembler::reset(), L1MuDTSectorReceiver::reset(), and L1MuDTExtrapolationUnit::reset().

Referenced by run().

177  {
180  m_EU.reset();
181  m_TA.reset();
182  m_AUs[0].reset();
183  m_AUs[1].reset();
184  m_TrackCands[0].reset();
185  m_TrackCands[1].reset();
186  m_TracKCands[0].reset();
187  m_TracKCands[1].reset();
188 }
L1MuDTTrackAssembler m_TA
void reset()
clear Sector Receiver
void reset()
reset Extrapolation Unit
std::array< L1MuDTTrack, 2 > m_TrackCands
std::array< L1MuDTAssignmentUnit, 2 > m_AUs
void reset()
clear Data Buffer
void reset()
reset Track Assembler
L1MuDTExtrapolationUnit m_EU
std::array< L1MuDTTrack, 2 > m_TracKCands
L1MuDTSectorReceiver m_SectorReceiver

◆ run()

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

run the Sector Processor

Definition at line 78 of file L1MuDTSectorProcessor.cc.

References simKBmtfDigis_cfi::bx, HltBtagPostValidation_cff::c, L1MuDTTrackFinder::config(), gather_cfg::cout, L1MuDTTFConfig::Debug(), MillePedeFileConverter_cfg::e, relativeConstraints::empty, L1MuDTTrackAssembler::isEmpty(), m_AUs, m_DataBuffer, m_EU, m_SectorReceiver, m_spid, m_TA, m_tf, m_TrackCands, m_TracKCands, L1MuDTExtrapolationUnit::numberOfExt(), L1MuDTDataBuffer::numberTSphi(), L1MuDTTrackAssembler::print(), L1MuDTExtrapolationUnit::print(), L1MuDTDataBuffer::printTSphi(), reset(), L1MuDTTrackAssembler::run(), L1MuDTSectorReceiver::run(), L1MuDTExtrapolationUnit::run(), and L1MuDTSecProcId::wheel().

78  {
79  // receive data and store them into the data buffer
81 
82  // check content of data buffer
83  if (m_tf.config()->Debug(4) && m_DataBuffer.numberTSphi() > 0) {
84  cout << "Phi track segments received by " << m_spid << " : " << endl;
86  }
87 
88  // perform all extrapolations
89  int n_ext = 0; // number of successful extrapolations
90  if (m_DataBuffer.numberTSphi() > 1) {
91  m_EU.run(c);
92  n_ext = m_EU.numberOfExt();
93  if (m_tf.config()->Debug(3) && n_ext > 0) {
94  cout << "Number of successful extrapolations : " << n_ext << endl;
95  m_EU.print();
96  }
97  }
98 
99  // hardware debug (output from Extrapolator and Quality Sorter)
100  // m_EU->print(1);
101 
102  // perform track assembling
103  if (n_ext > 0) {
104  m_TA.run();
105  if (m_tf.config()->Debug(3))
106  m_TA.print();
107  }
108 
109  // assign pt, eta, phi and quality
110  if (!m_TA.isEmpty(0))
111  m_AUs[0].run(c);
112  if (!m_TA.isEmpty(1))
113  m_AUs[1].run(c);
114 
115  if (m_spid.wheel() == -1) {
116  if (!m_TrackCands[0].empty() && m_TrackCands[0].address(2) > 3 && m_TrackCands[0].address(2) < 6)
117  m_TrackCands[0].reset();
118  if (!m_TrackCands[0].empty() && m_TrackCands[0].address(3) > 3 && m_TrackCands[0].address(3) < 6)
119  m_TrackCands[0].reset();
120  if (!m_TrackCands[0].empty() && m_TrackCands[0].address(4) > 3 && m_TrackCands[0].address(4) < 6)
121  m_TrackCands[0].reset();
122 
123  if (!m_TracKCands[0].empty() && m_TracKCands[0].address(2) > 3 && m_TracKCands[0].address(2) < 6)
124  m_TracKCands[0].reset();
125  if (!m_TracKCands[0].empty() && m_TracKCands[0].address(3) > 3 && m_TracKCands[0].address(3) < 6)
126  m_TracKCands[0].reset();
127  if (!m_TracKCands[0].empty() && m_TracKCands[0].address(4) > 3 && m_TracKCands[0].address(4) < 6)
128  m_TracKCands[0].reset();
129 
130  if (!m_TrackCands[1].empty() && m_TrackCands[1].address(2) > 3 && m_TrackCands[1].address(2) < 6)
131  m_TrackCands[1].reset();
132  if (!m_TrackCands[1].empty() && m_TrackCands[1].address(3) > 3 && m_TrackCands[1].address(3) < 6)
133  m_TrackCands[1].reset();
134  if (!m_TrackCands[1].empty() && m_TrackCands[1].address(4) > 3 && m_TrackCands[1].address(4) < 6)
135  m_TrackCands[1].reset();
136 
137  if (!m_TracKCands[1].empty() && m_TracKCands[1].address(2) > 3 && m_TracKCands[1].address(2) < 6)
138  m_TracKCands[1].reset();
139  if (!m_TracKCands[1].empty() && m_TracKCands[1].address(3) > 3 && m_TracKCands[1].address(3) < 6)
140  m_TracKCands[1].reset();
141  if (!m_TracKCands[1].empty() && m_TracKCands[1].address(4) > 3 && m_TracKCands[1].address(4) < 6)
142  m_TracKCands[1].reset();
143 
144  if (!m_TrackCands[0].empty() && m_TrackCands[0].address(2) > 7 && m_TrackCands[0].address(2) < 10)
145  m_TrackCands[0].reset();
146  if (!m_TrackCands[0].empty() && m_TrackCands[0].address(3) > 7 && m_TrackCands[0].address(3) < 10)
147  m_TrackCands[0].reset();
148  if (!m_TrackCands[0].empty() && m_TrackCands[0].address(4) > 7 && m_TrackCands[0].address(4) < 10)
149  m_TrackCands[0].reset();
150 
151  if (!m_TracKCands[0].empty() && m_TracKCands[0].address(2) > 7 && m_TracKCands[0].address(2) < 10)
152  m_TracKCands[0].reset();
153  if (!m_TracKCands[0].empty() && m_TracKCands[0].address(3) > 7 && m_TracKCands[0].address(3) < 10)
154  m_TracKCands[0].reset();
155  if (!m_TracKCands[0].empty() && m_TracKCands[0].address(4) > 7 && m_TracKCands[0].address(4) < 10)
156  m_TracKCands[0].reset();
157 
158  if (!m_TrackCands[1].empty() && m_TrackCands[1].address(2) > 7 && m_TrackCands[1].address(2) < 10)
159  m_TrackCands[1].reset();
160  if (!m_TrackCands[1].empty() && m_TrackCands[1].address(3) > 7 && m_TrackCands[1].address(3) < 10)
161  m_TrackCands[1].reset();
162  if (!m_TrackCands[1].empty() && m_TrackCands[1].address(4) > 7 && m_TrackCands[1].address(4) < 10)
163  m_TrackCands[1].reset();
164 
165  if (!m_TracKCands[1].empty() && m_TracKCands[1].address(2) > 7 && m_TracKCands[1].address(2) < 10)
166  m_TracKCands[1].reset();
167  if (!m_TracKCands[1].empty() && m_TracKCands[1].address(3) > 7 && m_TracKCands[1].address(3) < 10)
168  m_TracKCands[1].reset();
169  if (!m_TracKCands[1].empty() && m_TracKCands[1].address(4) > 7 && m_TracKCands[1].address(4) < 10)
170  m_TracKCands[1].reset();
171  }
172 }
L1MuDTTrackAssembler m_TA
int wheel() const
return wheel number
void print(int level=0) const
print all successful extrapolations
std::array< L1MuDTTrack, 2 > m_TrackCands
int numberOfExt() const
return number of successful extrapolations
virtual void reset()
reset the Sector Processor
void printTSphi() const
print all phi track segments which are in the buffer
std::array< L1MuDTAssignmentUnit, 2 > m_AUs
bool isEmpty(int id) const
is it a valid Track Class?
void run()
run Track Assembler
static bool Debug()
L1MuDTExtrapolationUnit m_EU
std::array< L1MuDTTrack, 2 > m_TracKCands
const L1MuDTTFConfig * config() const
return configuration
void print() const
print result of Track Assembler
virtual void run(int bx, const edm::Event &e, const edm::EventSetup &c)
run the Sector Processor
L1MuDTSectorReceiver m_SectorReceiver
void run(int bx, const edm::Event &e, const edm::EventSetup &c)
receive track segment data from the DTBX and CSC chamber triggers
const L1MuDTTrackFinder & m_tf
int numberTSphi() const
return number of non-empty phi track segments
void run(const edm::EventSetup &c)
run Extrapolation Unit

◆ TA()

const L1MuDTTrackAssembler* L1MuDTSectorProcessor::TA ( ) const
inline

return pointer to Track Assembler

Definition at line 96 of file L1MuDTSectorProcessor.h.

References m_TA.

Referenced by L1MuDTAssignmentUnit::getPtMethod(), L1MuDTAssignmentUnit::QuaAU(), and L1MuDTAssignmentUnit::run().

96 { return &m_TA; }
L1MuDTTrackAssembler m_TA

◆ tf()

const L1MuDTTrackFinder& L1MuDTSectorProcessor::tf ( ) const
inline

◆ track() [1/2]

const L1MuDTTrack* L1MuDTSectorProcessor::track ( int  id) const
inline

return pointer to muon candidate, index [0,1]

Definition at line 102 of file L1MuDTSectorProcessor.h.

References id(), and m_TrackCands.

Referenced by L1MuDTAssignmentUnit::PhiAU(), L1MuDTAssignmentUnit::PtAU(), L1MuDTAssignmentUnit::QuaAU(), L1MuDTEtaProcessor::receiveAddresses(), L1MuDTWedgeSorter::run(), and L1MuDTAssignmentUnit::run().

102 { return &m_TrackCands[id]; }
std::array< L1MuDTTrack, 2 > m_TrackCands
const L1MuDTSecProcId & id() const
return Sector Processor identifier

◆ track() [2/2]

L1MuDTTrack* L1MuDTSectorProcessor::track ( int  id)
inline

Definition at line 103 of file L1MuDTSectorProcessor.h.

References id(), and m_TrackCands.

103 { return &m_TrackCands[id]; }
std::array< L1MuDTTrack, 2 > m_TrackCands
const L1MuDTSecProcId & id() const
return Sector Processor identifier

◆ tracK() [1/2]

const L1MuDTTrack* L1MuDTSectorProcessor::tracK ( int  id) const
inline

return pointer to muon candidate, index [0,1]

Definition at line 106 of file L1MuDTSectorProcessor.h.

References id(), and m_TracKCands.

Referenced by L1MuDTAssignmentUnit::PhiAU(), L1MuDTAssignmentUnit::PtAU(), L1MuDTAssignmentUnit::QuaAU(), L1MuDTEtaProcessor::receiveAddresses(), and L1MuDTAssignmentUnit::run().

106 { return &m_TracKCands[id]; }
const L1MuDTSecProcId & id() const
return Sector Processor identifier
std::array< L1MuDTTrack, 2 > m_TracKCands

◆ tracK() [2/2]

L1MuDTTrack* L1MuDTSectorProcessor::tracK ( int  id)
inline

Definition at line 107 of file L1MuDTSectorProcessor.h.

References id(), and m_TracKCands.

107 { return &m_TracKCands[id]; }
const L1MuDTSecProcId & id() const
return Sector Processor identifier
std::array< L1MuDTTrack, 2 > m_TracKCands

Member Data Documentation

◆ m_AUs

std::array<L1MuDTAssignmentUnit, 2> L1MuDTSectorProcessor::m_AUs
private

Definition at line 121 of file L1MuDTSectorProcessor.h.

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

◆ m_DataBuffer

L1MuDTDataBuffer L1MuDTSectorProcessor::m_DataBuffer
private

Definition at line 118 of file L1MuDTSectorProcessor.h.

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

◆ m_EU

L1MuDTExtrapolationUnit L1MuDTSectorProcessor::m_EU
private

Definition at line 119 of file L1MuDTSectorProcessor.h.

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

◆ m_SectorReceiver

L1MuDTSectorReceiver L1MuDTSectorProcessor::m_SectorReceiver
private

Definition at line 117 of file L1MuDTSectorProcessor.h.

Referenced by reset(), and run().

◆ m_spid

L1MuDTSecProcId L1MuDTSectorProcessor::m_spid
private

Definition at line 115 of file L1MuDTSectorProcessor.h.

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

◆ m_TA

L1MuDTTrackAssembler L1MuDTSectorProcessor::m_TA
private

Definition at line 120 of file L1MuDTSectorProcessor.h.

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

◆ m_tf

const L1MuDTTrackFinder& L1MuDTSectorProcessor::m_tf
private

Definition at line 114 of file L1MuDTSectorProcessor.h.

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

◆ m_TrackCands

std::array<L1MuDTTrack, 2> L1MuDTSectorProcessor::m_TrackCands
private

Definition at line 123 of file L1MuDTSectorProcessor.h.

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

◆ m_TracKCands

std::array<L1MuDTTrack, 2> L1MuDTSectorProcessor::m_TracKCands
private

Definition at line 124 of file L1MuDTSectorProcessor.h.

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