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 32 of file DTTFFEDReader.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 27 of file DTTFFEDReader.cc.

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

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

Destructor.

Definition at line 41 of file DTTFFEDReader.cc.

41 {}

Member Function Documentation

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

Definition at line 82 of file DTTFFEDReader.cc.

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

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

Definition at line 489 of file DTTFFEDReader.cc.

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

Definition at line 469 of file DTTFFEDReader.cc.

References funct::abs().

469  {
470 
471  // wheel : -3 -2 -1 +1 +2 +3 <=> PHTF's : N2, N1, N0, P0, P1, P2
472  // 0 <=> ETTF
473  // sector : 0 -> 11
474  // bx : -1 -> +1
475 
476  int myChannel = 255;
477 
478  if ( abs(bx) > 1) { return myChannel; }
479  if ( sector < 0 || sector > 11) { return myChannel; }
480  if ( abs(wheel) > 3) { return myChannel; }
481 
482  myChannel = sector*21 + wheel*3 - bx + 10 ;
483 
484  if (myChannel > 125) myChannel += 2;
485 
486  return myChannel;
487 }
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 450 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().

450  {
451  phiSegments.clear();
452  theSegments.clear();
453  dtTracks.clear();
454 
455  for(int i=0; i<3; i++){
456  for(int j=0; j<12; j++){
457  for(int k=0; k<6; k++){
458  for(int l=0; l<2; l++){
459  etTrack[i][j][k][l] = 0;
460  efTrack[i][j][k][l] = 0;
461  }
462  }
463  }
464  }
465 
466  return;
467 }
L1MuDTChambPhContainer::Phi_Container phiSegments
Definition: DTTFFEDReader.h:79
unsigned int etTrack[3][12][6][2]
Definition: DTTFFEDReader.h:85
L1MuDTChambThContainer::The_Container theSegments
Definition: DTTFFEDReader.h:81
L1MuDTTrackContainer::TrackContainer dtTracks
Definition: DTTFFEDReader.h:83
int k[5][pyjets_maxn]
unsigned int efTrack[3][12][6][2]
Definition: DTTFFEDReader.h:87
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 65 of file DTTFFEDReader.cc.

68  {
69 
70  analyse(e);
71 
72  phi_data = p_data();
73  the_data = t_data();
74  tra_data = k_data();
75 
76  return true;
77 }
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 98 of file DTTFFEDReader.h.

References DTTFInputTag.

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

Definition at line 446 of file DTTFFEDReader.cc.

446  {
447  return dtTracks;
448 }
L1MuDTTrackContainer::TrackContainer dtTracks
Definition: DTTFFEDReader.h:83
void DTTFFEDReader::match ( )
private

Definition at line 419 of file DTTFFEDReader.cc.

References mps_fire::i.

419  {
420 
422  i != dtTracks.end();
423  i++ ) {
424  int bxTh = i->bx()+1;
425  int sectorTh = i->scNum();
426  int wheelTh = i->whNum()+3;
427  if(wheelTh > 3) wheelTh-=1;
428  int muonTh = i->TrkTag();
429 
430  i->setEtaPacked(etTrack[bxTh][sectorTh][wheelTh][muonTh]);
431  i->setFineHaloPacked(efTrack[bxTh][sectorTh][wheelTh][muonTh]);
432  }
433 
434  return;
435 }
unsigned int etTrack[3][12][6][2]
Definition: DTTFFEDReader.h:85
L1MuDTTrackContainer::TrackContainer dtTracks
Definition: DTTFFEDReader.h:83
unsigned int efTrack[3][12][6][2]
Definition: DTTFFEDReader.h:87
TrackContainer::iterator TrackIterator
const L1MuDTChambPhContainer::Phi_Container & DTTFFEDReader::p_data ( )
private

Definition at line 438 of file DTTFFEDReader.cc.

438  {
439  return phiSegments;
440 }
L1MuDTChambPhContainer::Phi_Container phiSegments
Definition: DTTFFEDReader.h:79
void DTTFFEDReader::process ( edm::Event e)
private

Definition at line 90 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().

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

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

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

43  {
44 
45  unique_ptr<L1MuDTChambPhContainer> phi_product(new L1MuDTChambPhContainer);
46  unique_ptr<L1MuDTChambThContainer> the_product(new L1MuDTChambThContainer);
47  unique_ptr<L1MuDTTrackContainer> tra_product(new L1MuDTTrackContainer);
48 
52 
53  if (!fillRawData(e, phi_data, the_data, tra_data)) return;
54 
55  phi_product->setContainer(phi_data);
56  the_product->setContainer(the_data);
57  tra_product->setContainer(tra_data);
58 
59  e.put(std::move(phi_product));
60  e.put(std::move(the_product));
61  e.put(std::move(tra_product),"DATA");
62 
63 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:137
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 502 of file DTTFFEDReader.cc.

Referenced by geometryXMLparser.DTAlignable::index().

502  {
503 
504  int myChannel = channel;
505 
506  if (myChannel > 127) myChannel -= 2;
507 
508  if (myChannel < 0 || myChannel > 251 ){ return -999; }
509 
510  return myChannel/21;
511 }
int channel(int wheel, int sector, int bx)
const L1MuDTChambThContainer::The_Container & DTTFFEDReader::t_data ( )
private

Definition at line 442 of file DTTFFEDReader.cc.

442  {
443  return theSegments;
444 }
L1MuDTChambThContainer::The_Container theSegments
Definition: DTTFFEDReader.h:81
int DTTFFEDReader::wheel ( int  channel)
private

Definition at line 513 of file DTTFFEDReader.cc.

Referenced by geometryXMLparser.DTAlignable::index().

513  {
514 
515  int myChannel = channel;
516 
517  if (myChannel > 127) myChannel -= 2;
518 
519  if (myChannel < 0 || myChannel > 251 ){ return -999; }
520 
521  int myWheel = ((myChannel%21)/3)-3;
522 
523  return myWheel;
524 }
int channel(int wheel, int sector, int bx)

Member Data Documentation

edm::InputTag DTTFFEDReader::DTTFInputTag
private

Definition at line 53 of file DTTFFEDReader.h.

Referenced by getDTTFInputTag().

L1MuDTTrackContainer::TrackContainer DTTFFEDReader::dtTracks
private

Definition at line 83 of file DTTFFEDReader.h.

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

Definition at line 87 of file DTTFFEDReader.h.

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

Definition at line 85 of file DTTFFEDReader.h.

L1MuDTChambPhContainer::Phi_Container DTTFFEDReader::phiSegments
private

Definition at line 79 of file DTTFFEDReader.h.

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

Definition at line 100 of file DTTFFEDReader.h.

L1MuDTChambThContainer::The_Container DTTFFEDReader::theSegments
private

Definition at line 81 of file DTTFFEDReader.h.

bool DTTFFEDReader::verbose_
private

Definition at line 55 of file DTTFFEDReader.h.