CMS 3D CMS Logo

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

#include <L1MuBMSectorReceiver.h>

Public Member Functions

 L1MuBMSectorReceiver (L1MuBMSectorProcessor &, edm::ConsumesCollector &&iC)
 constructor More...
 
void reset ()
 clear Sector Receiver More...
 
void run (int bx, const edm::Event &e, const edm::EventSetup &c)
 receive track segment data from the BBMX and CSC chamber triggers More...
 
virtual ~L1MuBMSectorReceiver ()
 destructor More...
 

Private Member Functions

int address2sector (int adr) const
 find the right sector for a given address More...
 
int address2wheel (int adr) const
 find the right wheel for a given address More...
 
void receiveBBMXData (int bx, const edm::Event &e, const edm::EventSetup &c)
 receive track segment data from BBMX chamber trigger More...
 
void receiveCSCData (int bx, const edm::Event &e, const edm::EventSetup &c)
 receive track segment data from CSC chamber trigger More...
 

Private Attributes

edm::ESHandle< L1TMuonBarrelParamsbmtfParamsHandle
 
edm::EDGetTokenT< L1MuDTChambPhContainerm_DTDigiToken
 
L1MuBMSectorProcessorm_sp
 
L1MuDTTFMasks msks
 
L1MuDTTFParameters pars
 

Detailed Description

Sector Receiver:

The Sector Receiver receives track segment data from the BBMX and CSC chamber triggers and stores it into the Data Buffer

N. Neumeister CERN EP J. Troconiz UAM Madrid

Definition at line 53 of file L1MuBMSectorReceiver.h.

Constructor & Destructor Documentation

◆ L1MuBMSectorReceiver()

L1MuBMSectorReceiver::L1MuBMSectorReceiver ( L1MuBMSectorProcessor sp,
edm::ConsumesCollector &&  iC 
)

constructor

Definition at line 52 of file L1MuBMSectorReceiver.cc.

◆ ~L1MuBMSectorReceiver()

L1MuBMSectorReceiver::~L1MuBMSectorReceiver ( )
virtual

destructor

Definition at line 58 of file L1MuBMSectorReceiver.cc.

58  {
59  // reset();
60 }

Member Function Documentation

◆ address2sector()

int L1MuBMSectorReceiver::address2sector ( int  adr) const
private

find the right sector for a given address

Definition at line 231 of file L1MuBMSectorReceiver.cc.

231  {
232  int sector = m_sp.id().sector();
233 
234  if (adr >= 4 && adr <= 7)
235  sector = (sector + 13) % 12; // +1
236  if (adr >= 8 && adr <= 11)
237  sector = (sector + 11) % 12; // -1
238 
239  return sector;
240 }

References L1MuBMSectorProcessor::id(), m_sp, and L1MuBMSecProcId::sector().

Referenced by receiveBBMXData().

◆ address2wheel()

int L1MuBMSectorReceiver::address2wheel ( int  adr) const
private

find the right wheel for a given address

Definition at line 245 of file L1MuBMSectorReceiver.cc.

245  {
246  int wheel = m_sp.id().locwheel();
247 
248  // for 2, 3, 6, 7, 10, 11
249  if ((adr / 2) % 2 == 1)
250  wheel = m_sp.id().wheel();
251 
252  return wheel;
253 }

References L1MuBMSectorProcessor::id(), L1MuBMSecProcId::locwheel(), m_sp, L1MuBMSecProcId::wheel(), and makeMuonMisalignmentScenario::wheel.

Referenced by receiveBBMXData().

◆ receiveBBMXData()

void L1MuBMSectorReceiver::receiveBBMXData ( int  bx,
const edm::Event e,
const edm::EventSetup c 
)
private

receive track segment data from BBMX chamber trigger

Definition at line 93 of file L1MuBMSectorReceiver.cc.

93  {
95  //e.getByLabel(L1MuBMTFConfig::getBMDigiInputTag(),dttrig);
96  e.getByToken(m_DTDigiToken, dttrig);
97  L1MuDTChambPhDigi const* ts = nullptr;
98 
99  // const int bx_offset = dttrig->correctBX();
100  int bx_offset = 0;
101  bx = bx + bx_offset;
102  // get BBMX phi track segments
103  int address = 0;
104  for (int station = 1; station <= 4; station++) {
105  int max_address = (station == 1) ? 2 : 12;
106  for (int reladr = 0; reladr < max_address; reladr++) {
107  address++;
108  //if ( m_sp.ovl() && (reladr/2)%2 != 0 ) continue;
109  int wheel = address2wheel(reladr);
110  int sector = address2sector(reladr);
111  //if ( (wheel==2 || wheel==-2) && station==1 ) continue;
112 
113  if (reladr % 2 == 0)
114  ts = dttrig->chPhiSegm1(wheel, station, sector, bx);
115  if (reladr % 2 == 1)
116  ts = dttrig->chPhiSegm2(wheel, station, sector, bx - 1);
117  if (ts) {
118  int phi = ts->phi();
119  // int phib = ts->phiB();
120  int phib = 0;
121  if (station != 3)
122  phib = ts->phiB();
123 
124  int qual = ts->code();
125  bool tag = (reladr % 2 == 1) ? true : false;
126 
127  int lwheel = m_sp.id().wheel();
128  lwheel = abs(lwheel) / lwheel * (abs(wheel) + 1);
129 
130  if (station == 1) {
131  if (msks.get_inrec_chdis_st1(lwheel, sector))
132  continue;
133  if (qual < pars.get_inrec_qual_st1(lwheel, sector))
134  continue;
135  } else if (station == 2) {
136  if (msks.get_inrec_chdis_st2(lwheel, sector))
137  continue;
138  if (qual < pars.get_inrec_qual_st2(lwheel, sector))
139  continue;
140  } else if (station == 3) {
141  if (msks.get_inrec_chdis_st3(lwheel, sector))
142  continue;
143  if (qual < pars.get_inrec_qual_st3(lwheel, sector))
144  continue;
145  } else if (station == 4) {
146  if (msks.get_inrec_chdis_st4(lwheel, sector))
147  continue;
148  if (qual < pars.get_inrec_qual_st4(lwheel, sector))
149  continue;
150  }
151 
152  if (reladr / 2 == 1 && qual < pars.get_soc_stdis_n(m_sp.id().wheel(), m_sp.id().sector()))
153  continue;
154  if (reladr / 2 == 2 && qual < pars.get_soc_stdis_wl(m_sp.id().wheel(), m_sp.id().sector()))
155  continue;
156  if (reladr / 2 == 3 && qual < pars.get_soc_stdis_zl(m_sp.id().wheel(), m_sp.id().sector()))
157  continue;
158  if (reladr / 2 == 4 && qual < pars.get_soc_stdis_wr(m_sp.id().wheel(), m_sp.id().sector()))
159  continue;
160  if (reladr / 2 == 5 && qual < pars.get_soc_stdis_zr(m_sp.id().wheel(), m_sp.id().sector()))
161  continue;
162 
163  //
164  // out-of-time TS filter (compare TS at +-1 bx)
165  //
166  bool skipTS = false;
167 
168  bool nbx_del = pars.get_soc_nbx_del(m_sp.id().wheel(), m_sp.id().sector());
169  if (L1MuBMTFConfig::getTSOutOfTimeFilter() || nbx_del) {
170  int sh_phi = 12 - L1MuBMTFConfig::getNbitsExtPhi();
172 
173  L1MuDTChambPhDigi const* tsPreviousBX_1 = dttrig->chPhiSegm1(wheel, station, sector, bx - 1);
174  if (tsPreviousBX_1) {
175  int phiBX = tsPreviousBX_1->phi();
176  int qualBX = tsPreviousBX_1->code();
177  if (abs((phi >> sh_phi) - (phiBX >> sh_phi)) <= tolerance && qualBX > qual)
178  skipTS = true;
179  }
180 
181  L1MuDTChambPhDigi const* tsPreviousBX_2 = dttrig->chPhiSegm2(wheel, station, sector, bx - 1);
182  if (tsPreviousBX_2) {
183  int phiBX = tsPreviousBX_2->phi();
184  int qualBX = tsPreviousBX_2->code();
185  if (abs((phi >> sh_phi) - (phiBX >> sh_phi)) <= tolerance && qualBX > qual)
186  skipTS = true;
187  }
188 
189  L1MuDTChambPhDigi const* tsNextBX_1 = dttrig->chPhiSegm1(wheel, station, sector, bx + 1);
190  if (tsNextBX_1) {
191  int phiBX = tsNextBX_1->phi();
192  int qualBX = tsNextBX_1->code();
193  if (abs((phi >> sh_phi) - (phiBX >> sh_phi)) <= tolerance && qualBX > qual)
194  skipTS = true;
195  }
196 
197  L1MuDTChambPhDigi const* tsNextBX_2 = dttrig->chPhiSegm2(wheel, station, sector, bx + 1);
198  if (tsNextBX_2) {
199  int phiBX = tsNextBX_2->phi();
200  int qualBX = tsNextBX_2->code();
201  if (abs((phi >> sh_phi) - (phiBX >> sh_phi)) <= tolerance && qualBX > qual)
202  skipTS = true;
203  }
204  }
205 
206  if (!skipTS) {
207  /* if(reladr%2 == 0) {
208  L1MuBMTrackSegPhi tmpts(wheel,sector,station,phi,phib,
209  static_cast<L1MuBMTrackSegPhi::TSQuality>(qual),
210  tag,bx-bx_offset);
211  m_sp.data()->addTSphi(address-1,tmpts);
212  }
213  if(reladr%2 == 1) {
214  L1MuBMTrackSegPhi tmpts(wheel,sector,station,phi,phib,
215  static_cast<L1MuBMTrackSegPhi::TSQuality>(qual),
216  tag,bx+1);
217  m_sp.data()->addTSphi(address-1,tmpts);
218  }*/
219  L1MuBMTrackSegPhi tmpts(
220  wheel, sector, station, phi, phib, static_cast<L1MuBMTrackSegPhi::TSQuality>(qual), tag, bx - bx_offset);
221  m_sp.data()->addTSphi(address - 1, tmpts);
222  }
223  }
224  }
225  }
226 }

References funct::abs(), address2sector(), address2wheel(), L1MuBMDataBuffer::addTSphi(), l1GtPatternGenerator_cfi::bx, L1MuDTChambPhContainer::chPhiSegm1(), L1MuDTChambPhContainer::chPhiSegm2(), L1MuDTChambPhDigi::code(), L1MuBMSectorProcessor::data(), MillePedeFileConverter_cfg::e, L1MuDTTFMasks::get_inrec_chdis_st1(), L1MuDTTFMasks::get_inrec_chdis_st2(), L1MuDTTFMasks::get_inrec_chdis_st3(), L1MuDTTFMasks::get_inrec_chdis_st4(), L1MuDTTFParameters::get_inrec_qual_st1(), L1MuDTTFParameters::get_inrec_qual_st2(), L1MuDTTFParameters::get_inrec_qual_st3(), L1MuDTTFParameters::get_inrec_qual_st4(), L1MuDTTFParameters::get_soc_nbx_del(), L1MuDTTFParameters::get_soc_stdis_n(), L1MuDTTFParameters::get_soc_stdis_wl(), L1MuDTTFParameters::get_soc_stdis_wr(), L1MuDTTFParameters::get_soc_stdis_zl(), L1MuDTTFParameters::get_soc_stdis_zr(), L1MuBMTFConfig::getNbitsExtPhi(), L1MuBMTFConfig::getTSOutOfTimeFilter(), L1MuBMTFConfig::getTSOutOfTimeWindow(), L1MuBMSectorProcessor::id(), m_DTDigiToken, m_sp, msks, pars, phi, L1MuDTChambPhDigi::phi(), L1MuDTChambPhDigi::phiB(), L1MuBMSecProcId::sector(), relativeConstraints::station, GlobalPosition_Frontier_DevDB_cff::tag, tolerance, L1MuBMSecProcId::wheel(), and makeMuonMisalignmentScenario::wheel.

Referenced by run().

◆ receiveCSCData()

void L1MuBMSectorReceiver::receiveCSCData ( int  bx,
const edm::Event e,
const edm::EventSetup c 
)
private

receive track segment data from CSC chamber trigger

◆ reset()

void L1MuBMSectorReceiver::reset ( void  )

clear Sector Receiver

Definition at line 88 of file L1MuBMSectorReceiver.cc.

88 {}

Referenced by L1MuBMSectorProcessor::reset().

◆ run()

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

receive track segment data from the BBMX and CSC chamber triggers

Definition at line 69 of file L1MuBMSectorReceiver.cc.

69  {
70  //c.get< L1MuDTTFParametersRcd >().get( pars );
71  //c.get< L1MuDTTFMasksRcd >().get( msks );
72 
73  const L1TMuonBarrelParamsRcd& bmtfParamsRcd = c.get<L1TMuonBarrelParamsRcd>();
74  bmtfParamsRcd.get(bmtfParamsHandle);
75  const L1TMuonBarrelParams& bmtfParams = *bmtfParamsHandle.product();
76  msks = bmtfParams.l1mudttfmasks;
77  pars = bmtfParams.l1mudttfparams;
78  //pars.print();
79  //msks.print();
80 
81  // get track segments from BBMX chamber trigger
82  receiveBBMXData(bx, e, c);
83 }

References bmtfParamsHandle, l1GtPatternGenerator_cfi::bx, HltBtagPostValidation_cff::c, MillePedeFileConverter_cfg::e, edm::eventsetup::EventSetupRecordImplementation< T >::get(), L1TMuonBarrelParams::l1mudttfmasks, L1TMuonBarrelParams::l1mudttfparams, msks, pars, edm::ESHandle< T >::product(), and receiveBBMXData().

Referenced by L1MuBMSectorProcessor::run().

Member Data Documentation

◆ bmtfParamsHandle

edm::ESHandle<L1TMuonBarrelParams> L1MuBMSectorReceiver::bmtfParamsHandle
private

Definition at line 83 of file L1MuBMSectorReceiver.h.

Referenced by run().

◆ m_DTDigiToken

edm::EDGetTokenT<L1MuDTChambPhContainer> L1MuBMSectorReceiver::m_DTDigiToken
private

Definition at line 89 of file L1MuBMSectorReceiver.h.

Referenced by receiveBBMXData().

◆ m_sp

L1MuBMSectorProcessor& L1MuBMSectorReceiver::m_sp
private

Definition at line 81 of file L1MuBMSectorReceiver.h.

Referenced by address2sector(), address2wheel(), and receiveBBMXData().

◆ msks

L1MuDTTFMasks L1MuBMSectorReceiver::msks
private

Definition at line 84 of file L1MuBMSectorReceiver.h.

Referenced by receiveBBMXData(), and run().

◆ pars

L1MuDTTFParameters L1MuBMSectorReceiver::pars
private

Definition at line 85 of file L1MuBMSectorReceiver.h.

Referenced by receiveBBMXData(), and run().

edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
L1MuBMSectorReceiver::address2sector
int address2sector(int adr) const
find the right sector for a given address
Definition: L1MuBMSectorReceiver.cc:231
L1MuDTTFParameters::get_soc_stdis_n
unsigned short int get_soc_stdis_n(int wh, int sc) const
Definition: L1MuDTTFParameters.cc:126
L1MuBMTrackSegPhi
Definition: L1MuBMTrackSegPhi.h:41
L1MuBMSectorReceiver::pars
L1MuDTTFParameters pars
Definition: L1MuBMSectorReceiver.h:85
L1MuDTChambPhContainer::chPhiSegm1
L1MuDTChambPhDigi const * chPhiSegm1(int wheel, int stat, int sect, int bx) const
Definition: L1MuDTChambPhContainer.cc:67
L1MuDTTFParameters::get_soc_nbx_del
bool get_soc_nbx_del(int wh, int sc) const
Definition: L1MuDTTFParameters.cc:246
L1MuDTTFParameters::get_inrec_qual_st3
unsigned short int get_inrec_qual_st3(int wh, int sc) const
Definition: L1MuDTTFParameters.cc:102
L1MuDTTFMasks::get_inrec_chdis_st1
bool get_inrec_chdis_st1(int wh, int sc) const
Definition: L1MuDTTFMasks.cc:69
relativeConstraints.station
station
Definition: relativeConstraints.py:67
L1MuDTTFParameters::get_inrec_qual_st2
unsigned short int get_inrec_qual_st2(int wh, int sc) const
Definition: L1MuDTTFParameters.cc:90
L1TMuonBarrelParams::l1mudttfparams
L1MuDTTFParameters l1mudttfparams
Definition: L1TMuonBarrelParams.h:65
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
L1MuDTTFParameters::get_soc_stdis_wr
unsigned short int get_soc_stdis_wr(int wh, int sc) const
Definition: L1MuDTTFParameters.cc:150
L1MuBMSectorReceiver::bmtfParamsHandle
edm::ESHandle< L1TMuonBarrelParams > bmtfParamsHandle
Definition: L1MuBMSectorReceiver.h:83
edm::Handle< L1MuDTChambPhContainer >
L1MuDTChambPhDigi::phiB
int phiB() const
Definition: L1MuDTChambPhDigi.cc:76
L1MuBMSecProcId::sector
int sector() const
return sector number
Definition: L1MuBMSecProcId.h:58
L1MuDTChambPhContainer
Definition: L1MuDTChambPhContainer.h:33
L1MuBMSecProcId::wheel
int wheel() const
return wheel number
Definition: L1MuBMSecProcId.h:55
L1MuBMTFConfig::getNbitsExtPhi
static int getNbitsExtPhi()
Definition: L1MuBMTFConfig.h:68
L1MuBMTFConfig::getTSOutOfTimeFilter
static bool getTSOutOfTimeFilter()
Definition: L1MuBMTFConfig.h:66
L1TMuonBarrelParams::l1mudttfmasks
L1MuDTTFMasks l1mudttfmasks
Definition: L1TMuonBarrelParams.h:66
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
L1MuDTChambPhDigi::phi
int phi() const
Definition: L1MuDTChambPhDigi.cc:74
L1MuDTTFParameters::get_soc_stdis_zl
unsigned short int get_soc_stdis_zl(int wh, int sc) const
Definition: L1MuDTTFParameters.cc:162
L1MuBMSectorReceiver::m_DTDigiToken
edm::EDGetTokenT< L1MuDTChambPhContainer > m_DTDigiToken
Definition: L1MuBMSectorReceiver.h:89
L1MuBMSectorReceiver::m_sp
L1MuBMSectorProcessor & m_sp
Definition: L1MuBMSectorReceiver.h:81
L1MuDTTFMasks::get_inrec_chdis_st2
bool get_inrec_chdis_st2(int wh, int sc) const
Definition: L1MuDTTFMasks.cc:81
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:49
L1MuDTTFMasks::get_inrec_chdis_st3
bool get_inrec_chdis_st3(int wh, int sc) const
Definition: L1MuDTTFMasks.cc:93
L1MuBMSecProcId::locwheel
int locwheel() const
return physical wheel number (-2,-1,0,+1,+2)
Definition: L1MuBMSecProcId.cc:79
L1MuDTTFParameters::get_inrec_qual_st4
unsigned short int get_inrec_qual_st4(int wh, int sc) const
Definition: L1MuDTTFParameters.cc:114
L1MuBMSectorProcessor::id
const L1MuBMSecProcId & id() const
return Sector Processor identifier
Definition: L1MuBMSectorProcessor.h:75
L1MuBMSectorReceiver::address2wheel
int address2wheel(int adr) const
find the right wheel for a given address
Definition: L1MuBMSectorReceiver.cc:245
L1MuDTChambPhContainer::chPhiSegm2
L1MuDTChambPhDigi const * chPhiSegm2(int wheel, int stat, int sect, int bx) const
Definition: L1MuDTChambPhContainer.cc:78
makeMuonMisalignmentScenario.wheel
wheel
Definition: makeMuonMisalignmentScenario.py:319
tolerance
const double tolerance
Definition: HGCalGeomParameters.cc:27
L1MuBMTFConfig::getTSOutOfTimeWindow
static int getTSOutOfTimeWindow()
Definition: L1MuBMTFConfig.h:67
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
L1MuBMDataBuffer::addTSphi
void addTSphi(int adr, const L1MuBMTrackSegPhi &)
add new phi track segment to the Data Buffer
Definition: L1MuBMDataBuffer.cc:85
L1MuDTTFMasks::get_inrec_chdis_st4
bool get_inrec_chdis_st4(int wh, int sc) const
Definition: L1MuDTTFMasks.cc:105
L1MuBMTFConfig::getBMDigiInputTag
static edm::InputTag getBMDigiInputTag()
Definition: L1MuBMTFConfig.h:51
DDAxes::phi
L1MuBMSectorReceiver::msks
L1MuDTTFMasks msks
Definition: L1MuBMSectorReceiver.h:84
L1MuBMSectorProcessor::data
const L1MuBMDataBuffer * data() const
return pointer to Data Buffer
Definition: L1MuBMSectorProcessor.h:87
L1MuDTTFParameters::get_inrec_qual_st1
unsigned short int get_inrec_qual_st1(int wh, int sc) const
Definition: L1MuDTTFParameters.cc:78
edm::eventsetup::EventSetupRecordImplementation::get
PRODUCT const & get(ESGetToken< PRODUCT, T > const &iToken) const
Definition: EventSetupRecordImplementation.h:74
L1TMuonBarrelParams
Definition: L1TMuonBarrelParams.h:23
L1MuBMSectorReceiver::receiveBBMXData
void receiveBBMXData(int bx, const edm::Event &e, const edm::EventSetup &c)
receive track segment data from BBMX chamber trigger
Definition: L1MuBMSectorReceiver.cc:93
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
L1MuDTTFParameters::get_soc_stdis_zr
unsigned short int get_soc_stdis_zr(int wh, int sc) const
Definition: L1MuDTTFParameters.cc:174
L1MuDTChambPhDigi::code
int code() const
Definition: L1MuDTChambPhDigi.cc:78
L1TMuonBarrelParamsRcd
Definition: L1TMuonBarrelParamsRcd.h:13
L1MuDTChambPhDigi
Definition: L1MuDTChambPhDigi.h:31
L1MuDTTFParameters::get_soc_stdis_wl
unsigned short int get_soc_stdis_wl(int wh, int sc) const
Definition: L1MuDTTFParameters.cc:138
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37