CMS 3D CMS Logo

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

#include <DTTFFEDReader.h>

Inheritance diagram for DTTFFEDReader:
edm::stream::EDProducer<>

Public Member Functions

 DTTFFEDReader (const edm::ParameterSet &pset)
 Constructor. More...
 
bool fillRawData (edm::Event &e, L1MuDTChambPhContainer::Phi_Container &phi_data, L1MuDTChambThContainer::The_Container &the_data, L1MuDTTrackContainer::TrackContainer &tra_data)
 Generate and fill FED raw data for a full event. More...
 
void produce (edm::Event &e, const edm::EventSetup &c) override
 Produce digis out of raw data. More...
 
 ~DTTFFEDReader () override
 Destructor. More...
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Private Member Functions

void analyse (edm::Event &e)
 
int bxNr (int channel)
 
int channel (int wheel, int sector, int bx)
 
void clear ()
 
edm::InputTag getDTTFInputTag ()
 
const L1MuDTTrackContainer::TrackContainerk_data ()
 
void match ()
 
const L1MuDTChambPhContainer::Phi_Containerp_data ()
 
void process (edm::Event &e)
 
int sector (int channel)
 
const L1MuDTChambThContainer::The_Containert_data ()
 
int wheel (int channel)
 

Private Attributes

edm::InputTag DTTFInputTag
 
L1MuDTTrackContainer::TrackContainer dtTracks
 
unsigned int efTrack [3][12][6][2]
 
unsigned int etTrack [3][12][6][2]
 
L1MuDTChambPhContainer::Phi_Container phiSegments
 
edm::EDGetTokenT< FEDRawDataCollectionRaw_token
 
L1MuDTChambThContainer::The_Container theSegments
 
bool verbose_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

L1 DT Track Finder Raw-to-Digi

J. Troconiz UAM Madrid E. Delmeire UAM Madrid

Definition at line 31 of file DTTFFEDReader.h.

Constructor & Destructor Documentation

◆ DTTFFEDReader()

DTTFFEDReader::DTTFFEDReader ( const edm::ParameterSet pset)

Constructor.

Definition at line 26 of file DTTFFEDReader.cc.

References muonDTDigis_cfi::pset.

26  {
27  produces<L1MuDTChambPhContainer>();
28  produces<L1MuDTChambThContainer>();
29  produces<L1MuDTTrackContainer>("DATA");
30 
31  DTTFInputTag = pset.getParameter<edm::InputTag>("DTTF_FED_Source");
32 
33  verbose_ = pset.getUntrackedParameter<bool>("verbose", false);
34 
35  Raw_token = consumes<FEDRawDataCollection>(DTTFInputTag);
36 }
edm::InputTag DTTFInputTag
Definition: DTTFFEDReader.h:49
edm::EDGetTokenT< FEDRawDataCollection > Raw_token
Definition: DTTFFEDReader.h:96

◆ ~DTTFFEDReader()

DTTFFEDReader::~DTTFFEDReader ( )
override

Destructor.

Definition at line 38 of file DTTFFEDReader.cc.

38 {}

Member Function Documentation

◆ analyse()

void DTTFFEDReader::analyse ( edm::Event e)
private

Definition at line 77 of file DTTFFEDReader.cc.

References l1ct::clear(), MillePedeFileConverter_cfg::e, and LaserDQM_cfg::process.

77  {
78  clear();
79  process(e);
80  match();
81  return;
82 }
void process(edm::Event &e)

◆ bxNr()

int DTTFFEDReader::bxNr ( int  channel)
private

Definition at line 491 of file DTTFFEDReader.cc.

491  {
492  int myChannel = channel;
493 
494  if (myChannel > 127)
495  myChannel -= 2;
496 
497  if (myChannel < 0 || myChannel > 251) {
498  return -999;
499  }
500 
501  int myBx = 1 - (myChannel % 3);
502 
503  return myBx;
504 }
int channel(int wheel, int sector, int bx)

◆ channel()

int DTTFFEDReader::channel ( int  wheel,
int  sector,
int  bx 
)
private

Definition at line 465 of file DTTFFEDReader.cc.

References funct::abs(), simKBmtfDigis_cfi::bx, hgcalTBTopologyTester_cfi::sector, and makeMuonMisalignmentScenario::wheel.

465  {
466  // wheel : -3 -2 -1 +1 +2 +3 <=> PHTF's : N2, N1, N0, P0, P1, P2
467  // 0 <=> ETTF
468  // sector : 0 -> 11
469  // bx : -1 -> +1
470 
471  int myChannel = 255;
472 
473  if (abs(bx) > 1) {
474  return myChannel;
475  }
476  if (sector < 0 || sector > 11) {
477  return myChannel;
478  }
479  if (abs(wheel) > 3) {
480  return myChannel;
481  }
482 
483  myChannel = sector * 21 + wheel * 3 - bx + 10;
484 
485  if (myChannel > 125)
486  myChannel += 2;
487 
488  return myChannel;
489 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int wheel(int channel)
int sector(int channel)

◆ clear()

void DTTFFEDReader::clear ( void  )
private

Definition at line 446 of file DTTFFEDReader.cc.

References mps_fire::i, dqmiolumiharvest::j, dqmdumpme::k, and cmsLHEtoEOSManager::l.

446  {
447  phiSegments.clear();
448  theSegments.clear();
449  dtTracks.clear();
450 
451  for (int i = 0; i < 3; i++) {
452  for (int j = 0; j < 12; j++) {
453  for (int k = 0; k < 6; k++) {
454  for (int l = 0; l < 2; l++) {
455  etTrack[i][j][k][l] = 0;
456  efTrack[i][j][k][l] = 0;
457  }
458  }
459  }
460  }
461 
462  return;
463 }
L1MuDTChambPhContainer::Phi_Container phiSegments
Definition: DTTFFEDReader.h:75
unsigned int etTrack[3][12][6][2]
Definition: DTTFFEDReader.h:81
L1MuDTChambThContainer::The_Container theSegments
Definition: DTTFFEDReader.h:77
L1MuDTTrackContainer::TrackContainer dtTracks
Definition: DTTFFEDReader.h:79
unsigned int efTrack[3][12][6][2]
Definition: DTTFFEDReader.h:83

◆ fillRawData()

bool DTTFFEDReader::fillRawData ( edm::Event e,
L1MuDTChambPhContainer::Phi_Container phi_data,
L1MuDTChambThContainer::The_Container the_data,
L1MuDTTrackContainer::TrackContainer tra_data 
)

Generate and fill FED raw data for a full event.

Definition at line 61 of file DTTFFEDReader.cc.

References MillePedeFileConverter_cfg::e.

64  {
65  analyse(e);
66 
67  phi_data = p_data();
68  the_data = t_data();
69  tra_data = k_data();
70 
71  return true;
72 }
const L1MuDTChambThContainer::The_Container & t_data()
const L1MuDTTrackContainer::TrackContainer & k_data()
void analyse(edm::Event &e)
const L1MuDTChambPhContainer::Phi_Container & p_data()

◆ getDTTFInputTag()

edm::InputTag DTTFFEDReader::getDTTFInputTag ( )
inlineprivate

Definition at line 94 of file DTTFFEDReader.h.

References DTTFInputTag.

94 { return DTTFInputTag; }
edm::InputTag DTTFInputTag
Definition: DTTFFEDReader.h:49

◆ k_data()

const L1MuDTTrackContainer::TrackContainer & DTTFFEDReader::k_data ( )
private

Definition at line 444 of file DTTFFEDReader.cc.

444 { return dtTracks; }
L1MuDTTrackContainer::TrackContainer dtTracks
Definition: DTTFFEDReader.h:79

◆ match()

void DTTFFEDReader::match ( )
private

Definition at line 423 of file DTTFFEDReader.cc.

References mps_fire::i.

423  {
424  for (L1MuDTTrackContainer::TrackIterator i = dtTracks.begin(); i != dtTracks.end(); i++) {
425  int bxTh = i->bx() + 1;
426  int sectorTh = i->scNum();
427  int wheelTh = i->whNum() + 3;
428  if (wheelTh > 3)
429  wheelTh -= 1;
430  int muonTh = i->TrkTag();
431 
432  i->setEtaPacked(etTrack[bxTh][sectorTh][wheelTh][muonTh]);
433  i->setFineHaloPacked(efTrack[bxTh][sectorTh][wheelTh][muonTh]);
434  }
435 
436  return;
437 }
unsigned int etTrack[3][12][6][2]
Definition: DTTFFEDReader.h:81
L1MuDTTrackContainer::TrackContainer dtTracks
Definition: DTTFFEDReader.h:79
unsigned int efTrack[3][12][6][2]
Definition: DTTFFEDReader.h:83
TrackContainer::iterator TrackIterator

◆ p_data()

const L1MuDTChambPhContainer::Phi_Container & DTTFFEDReader::p_data ( )
private

Definition at line 440 of file DTTFFEDReader.cc.

440 { return phiSegments; }
L1MuDTChambPhContainer::Phi_Container phiSegments
Definition: DTTFFEDReader.h:75

◆ process()

void DTTFFEDReader::process ( edm::Event e)
private

Definition at line 85 of file DTTFFEDReader.cc.

References funct::abs(), dt_crc::calcCRC(), RawDataTask_cfi::CRC, FEDRawData::data(), data, TauDecayModes::dec, MillePedeFileConverter_cfg::e, createfilelist::int, groupFilesInBlocks::lines, TopDecayID::muonID, DiDispStaMuonMonitor_cfi::pt, hgcalTBTopologyTester_cfi::sector, FEDRawData::size(), and makeMuonMisalignmentScenario::wheel.

85  {
86  // Container
87  vector<int> DTTFWordContainer;
88  vector<int>::iterator DTTFiterator;
89 
90  // Header constituents
91  int BOEevTy, DTTFId;
92 
93  // DTTF Payload constituents
94  int DTTFWord;
95  int DTTFChan, bitsID;
96  int addr1[2] = {3, 3};
97  int addr2[2] = {15, 15};
98  int addr3[2] = {15, 15};
99  int addr4[2] = {15, 15};
100 
101  // Trailer constituents
102  int evtLgth, CRC;
103 
104  //--> Header
105 
107  e.getByToken(Raw_token, data);
108  FEDRawData dttfdata = data->FEDData(0x030C);
109  if (dttfdata.size() == 0)
110  return;
111 
112  int *dataWord1 = new int;
113  int *dataWord2 = new int;
114  unsigned char *LineFED = dttfdata.data();
115  *dataWord2 = *((int *)LineFED);
116  LineFED += 4;
117  *dataWord1 = *((int *)LineFED);
118  int lines = 1; // already counting header
119 
120  BOEevTy = ((*dataWord1) & 0xFF000000) >> 24; // positions 57 ->64
121  DTTFId = ((*dataWord2) & 0x000FFF00) >> 8; // positions 9 ->20
122 
123  if ((BOEevTy != 0x50) || (DTTFId != 0x030C)) {
124  if (verbose_)
125  edm::LogWarning("dttf_unpacker") << "Not a DTTF header " << hex << *dataWord1;
126  delete dataWord1;
127  delete dataWord2;
128  return;
129  }
130 
131  int newCRC = 0xFFFF;
132  dt_crc::calcCRC(*dataWord1, *dataWord2, newCRC);
133 
134  //--> DTTF data
135 
136  LineFED += 4;
137  *dataWord2 = *((int *)LineFED);
138  LineFED += 4;
139  *dataWord1 = *((int *)LineFED);
140  int chkEOE = ((*dataWord1) & 0xFFF00000) >> 20;
141  lines++;
142 
143  while (chkEOE != 0xA00) {
144  dt_crc::calcCRC(*dataWord1, *dataWord2, newCRC);
145 
146  DTTFWord = *dataWord1;
147  DTTFWordContainer.push_back(DTTFWord);
148  DTTFWord = *dataWord2;
149  DTTFWordContainer.push_back(DTTFWord);
150 
151  LineFED += 4;
152  *dataWord2 = *((int *)LineFED);
153  LineFED += 4;
154  *dataWord1 = *((int *)LineFED);
155  chkEOE = ((*dataWord1) & 0xFFF00000) >> 20;
156  lines++;
157 
158  if (lines > 3026) {
159  if (verbose_)
160  edm::LogWarning("dttf_unpacker") << "Warning : number of DTTF lines > 3026 "; // 3026 = 1(header) +
161  // 3024(max # PHTF-ETTF
162  // 64 bits words) +
163  // 1(trailer)
164  delete dataWord1;
165  delete dataWord2;
166  return;
167  }
168 
169  } // end while-Data loop
170 
171  //--> Trailer
172 
173  evtLgth = ((*dataWord1) & 0x00FFFFFF); // positions 33 ->56
174  CRC = ((*dataWord2) & 0xFFFF0000) >> 16; // positions 17 ->32
175 
176  dt_crc::calcCRC(*dataWord1, (*dataWord2) & 0xFFFF, newCRC);
177 
178  if (newCRC != CRC) {
179  if (verbose_)
180  edm::LogWarning("dttf_unpacker") << "Calculated CRC " << hex << newCRC << " differs from CRC in trailer " << hex
181  << CRC;
182  delete dataWord1;
183  delete dataWord2;
184  return;
185  }
186 
187  if (lines != evtLgth) {
188  if (verbose_)
189  edm::LogWarning("dttf_unpacker") << "Number of words read != event length " << dec << lines << " " << evtLgth;
190  delete dataWord1;
191  delete dataWord2;
192  return;
193  }
194 
195  // --> analyse event
196 
197  for (DTTFiterator = DTTFWordContainer.begin(); DTTFiterator != DTTFWordContainer.end(); DTTFiterator++) {
198  DTTFChan = ((*DTTFiterator) & 0xFF000000) >> 24;
199  DTTFiterator++;
200  bitsID = ((*DTTFiterator) & 0xF0000000) >> 28;
201 
202  int bxID = bxNr(DTTFChan);
203  if (bxID == -999)
204  continue;
205  int wheelID = wheel(DTTFChan);
206  if (wheelID == -999)
207  continue;
208  int sectorID = sector(DTTFChan);
209  if (sectorID == -999)
210  continue;
211 
212  // Input
213  if (wheelID != 0 && bitsID <= 0x9) {
214  int wheelPh = (abs(wheelID) - 1) * wheelID / abs(wheelID);
215  int stationID = 0;
216  int ra = 0;
217  int ba = 0;
218  int tsqual = 0;
219  int ts2tag = 0;
220 
221  if ((bitsID >> 1) == 0) {
222  stationID = 1;
223  }
224  if ((bitsID >> 1) == 1) {
225  stationID = 2;
226  }
227  if ((bitsID >> 1) == 4) {
228  stationID = 3;
229  }
230  if ((bitsID >> 1) == 2) {
231  stationID = 4;
232  }
233 
234  if (stationID != 3) {
235  ts2tag = (bitsID)&0x1;
236  tsqual = (~(*DTTFiterator) & 0x07) - 1;
237  ba = (~(*DTTFiterator) & 0x1FF8) >> 3;
238  if (ba > 0x1FF)
239  ba -= 0x400;
240  ra = (~(*DTTFiterator) & 0x1FFE000) >> 13;
241  if (ra > 0x7FF)
242  ra -= 0x1000;
243  } else {
244  ts2tag = (bitsID)&0x1;
245  tsqual = (~(*DTTFiterator) & 0x07) - 1;
246  ra = (~(*DTTFiterator) & 0x7FF8) >> 3;
247  if (ra > 0x7FF)
248  ra -= 0x1000;
249  }
250 
251  if (tsqual != 7 && wheelID != -1) {
252  phiSegments.push_back(
253  L1MuDTChambPhDigi(bxID + ts2tag, wheelPh, sectorID, stationID, ra, ba, tsqual, ts2tag, 0));
254  }
255  }
256  // Input
257 
258  // Input
259  if (wheelID == 0 && bitsID <= 0x4) {
260  int wheelTh = bitsID - 2;
261 
262  int posALL, posBTI[7];
263 
264  if (wheelTh == -2 || wheelTh == -1 ||
265  (wheelTh == 0 &&
266  (sectorID == 0 || sectorID == 3 || sectorID == 4 || sectorID == 7 || sectorID == 8 || sectorID == 11))) {
267  posALL = ~(*DTTFiterator) & 0x7F;
268  posBTI[0] = ~(*DTTFiterator) & 0x01;
269  posBTI[1] = (~(*DTTFiterator) & 0x02) >> 1;
270  posBTI[2] = (~(*DTTFiterator) & 0x04) >> 2;
271  posBTI[3] = (~(*DTTFiterator) & 0x08) >> 3;
272  posBTI[4] = (~(*DTTFiterator) & 0x10) >> 4;
273  posBTI[5] = (~(*DTTFiterator) & 0x20) >> 5;
274  posBTI[6] = (~(*DTTFiterator) & 0x40) >> 6;
275 
276  if (posALL) {
277  theSegments.push_back(L1MuDTChambThDigi(bxID, wheelTh, sectorID, 1, posBTI));
278  }
279 
280  posALL = ~(*DTTFiterator) & 0x3F80;
281  posBTI[0] = (~(*DTTFiterator) & 0x0080) >> 7;
282  posBTI[1] = (~(*DTTFiterator) & 0x0100) >> 8;
283  posBTI[2] = (~(*DTTFiterator) & 0x0200) >> 9;
284  posBTI[3] = (~(*DTTFiterator) & 0x0400) >> 10;
285  posBTI[4] = (~(*DTTFiterator) & 0x0800) >> 11;
286  posBTI[5] = (~(*DTTFiterator) & 0x1000) >> 12;
287  posBTI[6] = (~(*DTTFiterator) & 0x2000) >> 13;
288 
289  if (posALL) {
290  theSegments.push_back(L1MuDTChambThDigi(bxID, wheelTh, sectorID, 2, posBTI));
291  }
292 
293  posALL = ~(*DTTFiterator) & 0x1FC000;
294  posBTI[0] = (~(*DTTFiterator) & 0x004000) >> 14;
295  posBTI[1] = (~(*DTTFiterator) & 0x008000) >> 15;
296  posBTI[2] = (~(*DTTFiterator) & 0x010000) >> 16;
297  posBTI[3] = (~(*DTTFiterator) & 0x020000) >> 17;
298  posBTI[4] = (~(*DTTFiterator) & 0x040000) >> 18;
299  posBTI[5] = (~(*DTTFiterator) & 0x080000) >> 19;
300  posBTI[6] = (~(*DTTFiterator) & 0x100000) >> 20;
301 
302  if (posALL) {
303  theSegments.push_back(L1MuDTChambThDigi(bxID, wheelTh, sectorID, 3, posBTI));
304  }
305  }
306 
307  else {
308  posALL = ~(*DTTFiterator) & 0x7F;
309  posBTI[6] = ~(*DTTFiterator) & 0x01;
310  posBTI[5] = (~(*DTTFiterator) & 0x02) >> 1;
311  posBTI[4] = (~(*DTTFiterator) & 0x04) >> 2;
312  posBTI[3] = (~(*DTTFiterator) & 0x08) >> 3;
313  posBTI[2] = (~(*DTTFiterator) & 0x10) >> 4;
314  posBTI[1] = (~(*DTTFiterator) & 0x20) >> 5;
315  posBTI[0] = (~(*DTTFiterator) & 0x40) >> 6;
316 
317  if (posALL) {
318  theSegments.push_back(L1MuDTChambThDigi(bxID, wheelTh, sectorID, 1, posBTI));
319  }
320 
321  posALL = ~(*DTTFiterator) & 0x3F80;
322  posBTI[6] = (~(*DTTFiterator) & 0x0080) >> 7;
323  posBTI[5] = (~(*DTTFiterator) & 0x0100) >> 8;
324  posBTI[4] = (~(*DTTFiterator) & 0x0200) >> 9;
325  posBTI[3] = (~(*DTTFiterator) & 0x0400) >> 10;
326  posBTI[2] = (~(*DTTFiterator) & 0x0800) >> 11;
327  posBTI[1] = (~(*DTTFiterator) & 0x1000) >> 12;
328  posBTI[0] = (~(*DTTFiterator) & 0x2000) >> 13;
329 
330  if (posALL) {
331  theSegments.push_back(L1MuDTChambThDigi(bxID, wheelTh, sectorID, 2, posBTI));
332  }
333 
334  posALL = ~(*DTTFiterator) & 0x1FC000;
335  posBTI[6] = (~(*DTTFiterator) & 0x004000) >> 14;
336  posBTI[5] = (~(*DTTFiterator) & 0x008000) >> 15;
337  posBTI[4] = (~(*DTTFiterator) & 0x010000) >> 16;
338  posBTI[3] = (~(*DTTFiterator) & 0x020000) >> 17;
339  posBTI[2] = (~(*DTTFiterator) & 0x040000) >> 18;
340  posBTI[1] = (~(*DTTFiterator) & 0x080000) >> 19;
341  posBTI[0] = (~(*DTTFiterator) & 0x100000) >> 20;
342 
343  if (posALL) {
344  theSegments.push_back(L1MuDTChambThDigi(bxID, wheelTh, sectorID, 3, posBTI));
345  }
346  }
347  }
348  // Input
349 
350  // Addresses
351  if (wheelID != 0 && bitsID >= 0xA && bitsID <= 0xB) {
352  int candID = bitsID - 0xA;
353 
354  addr4[candID] = ((*DTTFiterator) & 0x0F);
355  addr3[candID] = ((*DTTFiterator) & 0xF0) >> 4;
356  addr2[candID] = ((*DTTFiterator) & 0xF00) >> 8;
357  addr1[candID] = ((*DTTFiterator) & 0x3000) >> 12;
358  }
359  // Addresses
360 
361  // Output
362  if (wheelID != 0 && bitsID >= 0xC) {
363  int muonID = 0;
364  int pt = 0;
365  int ch = 0;
366  int phi = 0;
367  int qual = 0;
368 
369  muonID = (bitsID & 0x1);
370  qual = (~(*DTTFiterator) & 0x07);
371  phi = ((*DTTFiterator) & 0x7F8) >> 3;
372  ch = (~(*DTTFiterator) & 0x800) >> 11;
373  pt = (~(*DTTFiterator) & 0x1F000) >> 12;
374 
375  if (qual != 0) {
376  dtTracks.push_back(L1MuDTTrackCand(0,
377  phi,
378  0,
379  pt,
380  ch,
381  1,
382  0,
383  qual,
384  bxID,
385  wheelID,
386  sectorID,
387  muonID,
388  addr1[muonID],
389  addr2[muonID],
390  addr3[muonID],
391  addr4[muonID]));
392  }
393  }
394  // Output
395 
396  // Output
397  if (wheelID == 0 && bitsID >= 0x8) {
398  int wheelTh = bitsID & 0x7;
399 
400  int etaALL;
401 
402  etaALL = ~(*DTTFiterator) & 0x007F;
403  if (etaALL) {
404  etTrack[bxID + 1][sectorID][wheelTh][0] = (*DTTFiterator) & 0x003F;
405  efTrack[bxID + 1][sectorID][wheelTh][0] = (~(*DTTFiterator) & 0x0040) >> 6;
406  }
407 
408  etaALL = (~(*DTTFiterator) & 0x3F80) >> 7;
409  if (etaALL) {
410  etTrack[bxID + 1][sectorID][wheelTh][1] = ((*DTTFiterator) & 0x1F80) >> 7;
411  efTrack[bxID + 1][sectorID][wheelTh][1] = (~(*DTTFiterator) & 0x2000) >> 13;
412  }
413  }
414  // Output
415 
416  } // end for-loop container content
417 
418  delete dataWord1;
419  delete dataWord2;
420  return;
421 }
L1MuDTChambPhContainer::Phi_Container phiSegments
Definition: DTTFFEDReader.h:75
unsigned int etTrack[3][12][6][2]
Definition: DTTFFEDReader.h:81
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:45
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
L1MuDTChambThContainer::The_Container theSegments
Definition: DTTFFEDReader.h:77
L1MuDTTrackContainer::TrackContainer dtTracks
Definition: DTTFFEDReader.h:79
edm::EDGetTokenT< FEDRawDataCollection > Raw_token
Definition: DTTFFEDReader.h:96
unsigned int efTrack[3][12][6][2]
Definition: DTTFFEDReader.h:83
static const int muonID
Definition: TopGenEvent.h:19
void calcCRC(long, int &)
Definition: DTCRC.cc:3
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:24
int wheel(int channel)
Log< level::Warning, false > LogWarning
int bxNr(int channel)
int sector(int channel)

◆ produce()

void DTTFFEDReader::produce ( edm::Event e,
const edm::EventSetup c 
)
override

Produce digis out of raw data.

Definition at line 40 of file DTTFFEDReader.cc.

References MillePedeFileConverter_cfg::e, and eostools::move().

40  {
41  unique_ptr<L1MuDTChambPhContainer> phi_product(new L1MuDTChambPhContainer);
42  unique_ptr<L1MuDTChambThContainer> the_product(new L1MuDTChambThContainer);
43  unique_ptr<L1MuDTTrackContainer> tra_product(new L1MuDTTrackContainer);
44 
48 
49  if (!fillRawData(e, phi_data, the_data, tra_data))
50  return;
51 
52  phi_product->setContainer(phi_data);
53  the_product->setContainer(the_data);
54  tra_product->setContainer(tra_data);
55 
56  e.put(std::move(phi_product));
57  e.put(std::move(the_product));
58  e.put(std::move(tra_product), "DATA");
59 }
std::vector< L1MuDTTrackCand > TrackContainer
std::vector< L1MuDTChambPhDigi > Phi_Container
std::vector< L1MuDTChambThDigi > The_Container
bool fillRawData(edm::Event &e, L1MuDTChambPhContainer::Phi_Container &phi_data, L1MuDTChambThContainer::The_Container &the_data, L1MuDTTrackContainer::TrackContainer &tra_data)
Generate and fill FED raw data for a full event.
def move(src, dest)
Definition: eostools.py:511

◆ sector()

int DTTFFEDReader::sector ( int  channel)
private

Definition at line 506 of file DTTFFEDReader.cc.

Referenced by geometryXMLparser.DTAlignable::index().

506  {
507  int myChannel = channel;
508 
509  if (myChannel > 127)
510  myChannel -= 2;
511 
512  if (myChannel < 0 || myChannel > 251) {
513  return -999;
514  }
515 
516  return myChannel / 21;
517 }
int channel(int wheel, int sector, int bx)

◆ t_data()

const L1MuDTChambThContainer::The_Container & DTTFFEDReader::t_data ( )
private

Definition at line 442 of file DTTFFEDReader.cc.

442 { return theSegments; }
L1MuDTChambThContainer::The_Container theSegments
Definition: DTTFFEDReader.h:77

◆ wheel()

int DTTFFEDReader::wheel ( int  channel)
private

Definition at line 519 of file DTTFFEDReader.cc.

Referenced by geometryXMLparser.DTAlignable::index().

519  {
520  int myChannel = channel;
521 
522  if (myChannel > 127)
523  myChannel -= 2;
524 
525  if (myChannel < 0 || myChannel > 251) {
526  return -999;
527  }
528 
529  int myWheel = ((myChannel % 21) / 3) - 3;
530 
531  return myWheel;
532 }
int channel(int wheel, int sector, int bx)

Member Data Documentation

◆ DTTFInputTag

edm::InputTag DTTFFEDReader::DTTFInputTag
private

Definition at line 49 of file DTTFFEDReader.h.

Referenced by getDTTFInputTag().

◆ dtTracks

L1MuDTTrackContainer::TrackContainer DTTFFEDReader::dtTracks
private

Definition at line 79 of file DTTFFEDReader.h.

◆ efTrack

unsigned int DTTFFEDReader::efTrack[3][12][6][2]
private

Definition at line 83 of file DTTFFEDReader.h.

◆ etTrack

unsigned int DTTFFEDReader::etTrack[3][12][6][2]
private

Definition at line 81 of file DTTFFEDReader.h.

◆ phiSegments

L1MuDTChambPhContainer::Phi_Container DTTFFEDReader::phiSegments
private

Definition at line 75 of file DTTFFEDReader.h.

◆ Raw_token

edm::EDGetTokenT<FEDRawDataCollection> DTTFFEDReader::Raw_token
private

Definition at line 96 of file DTTFFEDReader.h.

◆ theSegments

L1MuDTChambThContainer::The_Container DTTFFEDReader::theSegments
private

Definition at line 77 of file DTTFFEDReader.h.

◆ verbose_

bool DTTFFEDReader::verbose_
private

Definition at line 51 of file DTTFFEDReader.h.