213 for(
int oj=0; oj<20; oj++) lctArray[oj][0]=0;
222 <<
"\n No valid [lct] product found: "
223 <<
" CSCCorrelatedLCTDigiCollection"
243 for( lct = range1.first; lct!=range1.second; lct++)
245 int station = (*csc).first.station()-1;
246 int cscId = (*csc).first.triggerCscId()-1;
247 int sector = (*csc).first.triggerSector()-1;
249 int tbin = lct->getBX();
250 int fpga = ( subSector ? subSector-1 : station+1 );
251 int endcap = (*csc).first.endcap()-1;
258 lclPhi =
srLUTs_[
endcap][sector][fpga]->
localPhi(lct->getStrip(), lct->getPattern(), lct->getQuality(), lct->getBend());
260 bzero(&lclPhi,
sizeof(lclPhi));
261 edm::LogWarning(
"L1TdeCSCTF:analyze()") <<
"Exception from LocalPhi LUT in endCap: " << endcap <<
", sector: " << sector <<
", fpga: " << fpga
262 <<
"(strip:" << lct->getStrip() <<
", pattern:"<< lct->getPattern() <<
", Q:" << lct->getQuality() <<
", bend:" << lct->getBend() << std::endl;
268 bzero(&gblPhi,
sizeof(gblPhi));
269 edm::LogWarning(
"L1TdeCSCTF:analyze()") <<
"Exception from GlobalPhi LUT in endCap: " << endcap <<
", sector: " << sector <<
", fpga: " << fpga
270 <<
"(local phi:" << lclPhi.phi_local <<
", keyWG:" << lct->getKeyWG() <<
",cscID:" << cscId+1 << std::endl;
273 gblEta =
srLUTs_[
endcap][sector][fpga]->
globalEtaME(lclPhi.phi_bend_local, lclPhi.phi_local,lct->getKeyWG(),cscId+1);
275 bzero(&gblEta,
sizeof(gblEta));
276 edm::LogWarning(
"L1TdeCSCTF:analyze()") <<
"Exception from GlobalEta LUT in endCap: " << endcap <<
", sector: " << sector <<
", fpga: " << fpga
277 <<
"(local phi bend:" << lclPhi.phi_bend_local <<
", local phi:" << lclPhi.phi_local <<
", keyWG: " << lct->getKeyWG() <<
", cscID: " << cscId+1 << std::endl;
284 lctArray[nLCTs][0] = 1;
285 lctArray[nLCTs][1] = sector;
286 lctArray[nLCTs][2] = tbin;
287 lctArray[nLCTs][3] =
endcap;
288 lctArray[nLCTs][4] = gblPhi.global_phi;
289 lctArray[nLCTs][5] = gblEta.global_eta;
301 int dataMuonArray[8][3], emuMuonArray[8][3];
302 for(
int joe=0; joe<8; joe++){
305 dataMuonArray[joe][
rules] = 0;
306 emuMuonArray[joe][
rules] = 0;
319 <<
"\n No valid [data tracks] product found: "
320 <<
" L1CSCTrackCollection"
326 for(L1CSCTrackCollection::const_iterator trk=tracks.
product()->begin(); trk!=tracks.
product()->end(); trk++)
329 if( (
nDataMuons < 8) && (trk->first.BX() <2) && (trk->first.BX() > -2) )
332 dataMuonArray[
nDataMuons][1] = trk->first.ptLUTAddress();
333 dataMuonArray[
nDataMuons][2] = trk->first.sector();
368 <<
"\n No valid [emulator tracks] product found: "
369 <<
" L1CSCTrackCollection"
374 for(L1CSCTrackCollection::const_iterator trk=tracks.
product()->begin(); trk!=tracks.
product()->end(); trk++)
377 if( (
nEmulMuons<8) && (trk->first.BX() <2) && (trk->first.BX() >-2))
380 emuMuonArray[
nEmulMuons][1] = trk->first.ptLUTAddress();
381 emuMuonArray[
nEmulMuons][2] = trk->first.sector();
388 short int rightIndex[8];
389 for(
int jjj=0; jjj<8; jjj++) rightIndex[jjj]= 20;
398 if( emuMuonArray[sw][2] == dataMuonArray[hw][2] )
401 int hwMode = (0x0f0000 & dataMuonArray[hw][1] )>>16;
402 int swMode = (0x0f0000 & emuMuonArray[sw][1] )>>16;
403 int thor = hwMode^swMode;
404 for(
int jax=0; jax<4; jax++)
406 addDiff += 1 & (thor>>jax);
408 if( (addDiff <addDiffWin) && (emuMuonArray[sw][0]!=1) )
410 addDiffWin = addDiff;
417 emuMuonArray[rightIndex[hw]][0]=1;
424 int hwModeM = (0x0f0000 & dataMuonArray[
i][1] )>>16;
425 int swModeM = (0x0f0000 & emuMuonArray[rightIndex[
i]][1] )>>16;
426 int thorM = hwModeM^swModeM;
427 for(
int q=0;
q<=22;
q++)
429 int addDiff = (1<<
q)&thorM;
451 if( hwModeM == swModeM)
453 int hwPhi1 = (0x0000ff & dataMuonArray[
i][1]);
454 int swPhi1 = (0x0000ff & emuMuonArray[rightIndex[
i]][1]);
455 int hwPhi2 = (0x000f00 & dataMuonArray[
i][1])>>8;
456 int swPhi2 = (0x000f00 & emuMuonArray[rightIndex[
i]][1])>>8;
457 int hwEta = (0x00f000 & dataMuonArray[
i][1])>>12;
458 int swEta = (0x00f000 & emuMuonArray[rightIndex[
i]][1])>>12;
459 int hwSign = (0x100000 & dataMuonArray[
i][1])>>20;
460 int swSign = (0x100000 & emuMuonArray[rightIndex[
i]][1])>>20;
461 int hwFr = (0x200000 & dataMuonArray[
i][1])>>21;
462 int swFr = (0x200000 & emuMuonArray[rightIndex[
i]][1])>>21;
469 for(
int ak=0; ak<=nLCTs; ak++)
471 if(lctArray[ak][1] == dataMuonArray[
i][2])
479 for(
int akk=ak+1; akk<=nLCTs; akk++)
481 if(lctArray[ak][1] == lctArray[akk][1])
483 int delPhi =
abs(lctArray[ak][4] - lctArray[akk][4]);
484 int delEta =
abs(lctArray[ak][5] - lctArray[akk][5]);
485 int lowSta = (lctArray[ak][1] < lctArray[akk][1]) ? lctArray[ak][1] : lctArray[akk][1];
486 int hiSta = (lctArray[ak][1] > lctArray[akk][1]) ? lctArray[ak][1] : lctArray[akk][1];
MonitorElement * badBitMode11
edm::InputTag lctProducer
MonitorElement * mismatchSector
MonitorElement * badBitMode6
MonitorElement * mismatchDelEta23
MonitorElement * badBitMode14
MonitorElement * mismatchDelPhi24
MonitorElement * badBitMode9
edm::InputTag emulTrackProducer
gbletadat globalEtaME(int phi_bend, int phi_local, int wire_group, int cscid) const
MonitorElement * mismatchDelPhi13
MonitorElement * mismatchDelEta24
MonitorElement * badBitMode10
MonitorElement * badBitMode13
MonitorElement * allLctBx
MonitorElement * mismatchEta
lclphidat localPhi(int strip, int pattern, int quality, int lr) const
Geometry Lookup Tables.
MonitorElement * badBitMode1
MonitorElement * mismatchDelEta13
MonitorElement * badBitMode15
MonitorElement * badBitMode12
MonitorElement * mismatchDelPhi23
MonitorElement * badBitMode8
MonitorElement * mismatchDelPhi34
MonitorElement * mismatchPhi
MonitorElement * badBitMode5
MonitorElement * mismatchDelEta12
MonitorElement * mismatchDelPhi14
CSCSectorReceiverLUT * srLUTs_[2][6][5]
MonitorElement * trackCountComp
class global_phi_data gblphidat
MonitorElement * badBitMode2
MonitorElement * mismatchEndcap
T const * product() const
std::vector< DigiType >::const_iterator const_iterator
class local_phi_data lclphidat
Data Types.
static int triggerSubSectorFromLabels(int station, int chamber)
edm::InputTag dataTrackProducer
T const * product() const
MonitorElement * badBitMode7
edm::ParameterSet ptLUTset
MonitorElement * mismatchTime
std::pair< const_iterator, const_iterator > Range
MonitorElement * badBitMode4
class global_eta_data gbletadat
MonitorElement * mismatchDelEta34
MonitorElement * mismatchDelEta14
gblphidat globalPhiME(int phi_local, int wire_group, int cscid) const
MonitorElement * badBitMode3
MonitorElement * mismatchDelPhi12