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
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 

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<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache 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 ( const edm::ParameterSet pset)

Constructor.

Definition at line 26 of file DTTFFEDReader.cc.

References edm::ParameterSet::getParameter(), and edm::ParameterSet::getUntrackedParameter().

26  {
27 
28  produces<L1MuDTChambPhContainer>();
29  produces<L1MuDTChambThContainer>();
30  produces<L1MuDTTrackContainer>("DATA");
31 
32  DTTFInputTag = pset.getParameter<edm::InputTag>("DTTF_FED_Source");
33 
34  verbose_ = pset.getUntrackedParameter<bool>("verbose", false);
35 
36  Raw_token = consumes<FEDRawDataCollection>(DTTFInputTag);
37 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::InputTag DTTFInputTag
Definition: DTTFFEDReader.h:50
edm::EDGetTokenT< FEDRawDataCollection > Raw_token
Definition: DTTFFEDReader.h:97
DTTFFEDReader::~DTTFFEDReader ( )
override

Destructor.

Definition at line 39 of file DTTFFEDReader.cc.

39 {}

Member Function Documentation

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

Definition at line 80 of file DTTFFEDReader.cc.

References hitfit::clear(), match(), and LaserDQM_cfg::process.

80  {
81  clear();
82  process(e);
83  match();
84  return;
85 }
void process(edm::Event &e)
int DTTFFEDReader::bxNr ( int  channel)
private

Definition at line 519 of file DTTFFEDReader.cc.

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

Definition at line 492 of file DTTFFEDReader.cc.

References funct::abs().

492  {
493 
494  // wheel : -3 -2 -1 +1 +2 +3 <=> PHTF's : N2, N1, N0, P0, P1, P2
495  // 0 <=> ETTF
496  // sector : 0 -> 11
497  // bx : -1 -> +1
498 
499  int myChannel = 255;
500 
501  if (abs(bx) > 1) {
502  return myChannel;
503  }
504  if (sector < 0 || sector > 11) {
505  return myChannel;
506  }
507  if (abs(wheel) > 3) {
508  return myChannel;
509  }
510 
511  myChannel = sector * 21 + wheel * 3 - bx + 10;
512 
513  if (myChannel > 125)
514  myChannel += 2;
515 
516  return myChannel;
517 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int wheel(int channel)
int sector(int channel)
void DTTFFEDReader::clear ( void  )
private

Definition at line 473 of file DTTFFEDReader.cc.

References mps_fire::i, gen::k, and checklumidiff::l.

Referenced by Vispa.Views.WidgetView.WidgetView::closeEvent(), Vispa.Views.BoxDecayView.BoxDecayView::closeEvent(), Vispa.Share.FindAlgorithm.FindAlgorithm::findUsingFindDialog(), Vispa.Views.LineDecayView.LineDecayView::setDataObjects(), Vispa.Views.WidgetView.WidgetView::setDataObjects(), Vispa.Views.TreeView.TreeView::updateContent(), Vispa.Views.TableView.TableView::updateContent(), Vispa.Views.BoxDecayView.BoxDecayView::updateContent(), and Vispa.Views.PropertyView.PropertyView::updateContent().

473  {
474  phiSegments.clear();
475  theSegments.clear();
476  dtTracks.clear();
477 
478  for (int i = 0; i < 3; i++) {
479  for (int j = 0; j < 12; j++) {
480  for (int k = 0; k < 6; k++) {
481  for (int l = 0; l < 2; l++) {
482  etTrack[i][j][k][l] = 0;
483  efTrack[i][j][k][l] = 0;
484  }
485  }
486  }
487  }
488 
489  return;
490 }
L1MuDTChambPhContainer::Phi_Container phiSegments
Definition: DTTFFEDReader.h:76
unsigned int etTrack[3][12][6][2]
Definition: DTTFFEDReader.h:82
L1MuDTChambThContainer::The_Container theSegments
Definition: DTTFFEDReader.h:78
L1MuDTTrackContainer::TrackContainer dtTracks
Definition: DTTFFEDReader.h:80
int k[5][pyjets_maxn]
unsigned int efTrack[3][12][6][2]
Definition: DTTFFEDReader.h:84
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 63 of file DTTFFEDReader.cc.

66  {
67 
68  analyse(e);
69 
70  phi_data = p_data();
71  the_data = t_data();
72  tra_data = k_data();
73 
74  return true;
75 }
const L1MuDTChambThContainer::The_Container & t_data()
const L1MuDTTrackContainer::TrackContainer & k_data()
void analyse(edm::Event &e)
const L1MuDTChambPhContainer::Phi_Container & p_data()
edm::InputTag DTTFFEDReader::getDTTFInputTag ( )
inlineprivate

Definition at line 95 of file DTTFFEDReader.h.

References DTTFInputTag.

95 { return DTTFInputTag; }
edm::InputTag DTTFInputTag
Definition: DTTFFEDReader.h:50
const L1MuDTTrackContainer::TrackContainer & DTTFFEDReader::k_data ( )
private

Definition at line 469 of file DTTFFEDReader.cc.

469  {
470  return dtTracks;
471 }
L1MuDTTrackContainer::TrackContainer dtTracks
Definition: DTTFFEDReader.h:80
void DTTFFEDReader::match ( )
private

Definition at line 442 of file DTTFFEDReader.cc.

References mps_fire::i.

442  {
443 
445  i != dtTracks.end(); i++) {
446  int bxTh = i->bx() + 1;
447  int sectorTh = i->scNum();
448  int wheelTh = i->whNum() + 3;
449  if (wheelTh > 3)
450  wheelTh -= 1;
451  int muonTh = i->TrkTag();
452 
453  i->setEtaPacked(etTrack[bxTh][sectorTh][wheelTh][muonTh]);
454  i->setFineHaloPacked(efTrack[bxTh][sectorTh][wheelTh][muonTh]);
455  }
456 
457  return;
458 }
unsigned int etTrack[3][12][6][2]
Definition: DTTFFEDReader.h:82
L1MuDTTrackContainer::TrackContainer dtTracks
Definition: DTTFFEDReader.h:80
unsigned int efTrack[3][12][6][2]
Definition: DTTFFEDReader.h:84
TrackContainer::iterator TrackIterator
const L1MuDTChambPhContainer::Phi_Container & DTTFFEDReader::p_data ( )
private

Definition at line 461 of file DTTFFEDReader.cc.

461  {
462  return phiSegments;
463 }
L1MuDTChambPhContainer::Phi_Container phiSegments
Definition: DTTFFEDReader.h:76
void DTTFFEDReader::process ( edm::Event e)
private

Definition at line 88 of file DTTFFEDReader.cc.

References funct::abs(), dt_crc::calcCRC(), FEDRawData::data(), data, TauDecayModes::dec, FEDRawDataCollection::FEDData(), edm::Event::getByToken(), createfilelist::int, groupFilesInBlocks::lines, TopDecayID::muonID, EnergyCorrector::pt, FEDRawData::size(), makeMuonMisalignmentScenario::wheel, and globals_cff::x1.

Referenced by Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::dumpPython(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::open(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::outputEventContent(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::setProcess(), and Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::setProperty().

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

Produce digis out of raw data.

Definition at line 41 of file DTTFFEDReader.cc.

References eostools::move(), and edm::Event::put().

Referenced by JSONExport.JsonExport::export(), HTMLExport.HTMLExport::export(), and HTMLExport.HTMLExportStatic::export().

41  {
42 
43  unique_ptr<L1MuDTChambPhContainer> phi_product(new L1MuDTChambPhContainer);
44  unique_ptr<L1MuDTChambThContainer> the_product(new L1MuDTChambThContainer);
45  unique_ptr<L1MuDTTrackContainer> tra_product(new L1MuDTTrackContainer);
46 
50 
51  if (!fillRawData(e, phi_data, the_data, tra_data))
52  return;
53 
54  phi_product->setContainer(phi_data);
55  the_product->setContainer(the_data);
56  tra_product->setContainer(tra_data);
57 
58  e.put(std::move(phi_product));
59  e.put(std::move(the_product));
60  e.put(std::move(tra_product), "DATA");
61 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:125
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
int DTTFFEDReader::sector ( int  channel)
private

Definition at line 535 of file DTTFFEDReader.cc.

Referenced by geometryXMLparser.DTAlignable::index().

535  {
536 
537  int myChannel = channel;
538 
539  if (myChannel > 127)
540  myChannel -= 2;
541 
542  if (myChannel < 0 || myChannel > 251) {
543  return -999;
544  }
545 
546  return myChannel / 21;
547 }
int channel(int wheel, int sector, int bx)
const L1MuDTChambThContainer::The_Container & DTTFFEDReader::t_data ( )
private

Definition at line 465 of file DTTFFEDReader.cc.

465  {
466  return theSegments;
467 }
L1MuDTChambThContainer::The_Container theSegments
Definition: DTTFFEDReader.h:78
int DTTFFEDReader::wheel ( int  channel)
private

Definition at line 549 of file DTTFFEDReader.cc.

Referenced by geometryXMLparser.DTAlignable::index().

549  {
550 
551  int myChannel = channel;
552 
553  if (myChannel > 127)
554  myChannel -= 2;
555 
556  if (myChannel < 0 || myChannel > 251) {
557  return -999;
558  }
559 
560  int myWheel = ((myChannel % 21) / 3) - 3;
561 
562  return myWheel;
563 }
int channel(int wheel, int sector, int bx)

Member Data Documentation

edm::InputTag DTTFFEDReader::DTTFInputTag
private

Definition at line 50 of file DTTFFEDReader.h.

Referenced by getDTTFInputTag().

L1MuDTTrackContainer::TrackContainer DTTFFEDReader::dtTracks
private

Definition at line 80 of file DTTFFEDReader.h.

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

Definition at line 84 of file DTTFFEDReader.h.

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

Definition at line 82 of file DTTFFEDReader.h.

L1MuDTChambPhContainer::Phi_Container DTTFFEDReader::phiSegments
private

Definition at line 76 of file DTTFFEDReader.h.

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

Definition at line 97 of file DTTFFEDReader.h.

L1MuDTChambThContainer::The_Container DTTFFEDReader::theSegments
private

Definition at line 78 of file DTTFFEDReader.h.

bool DTTFFEDReader::verbose_
private

Definition at line 52 of file DTTFFEDReader.h.