CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | Friends
EcalElectronicsMapper Class Reference

#include <EcalElectronicsMapper.h>

Public Types

enum  SMGeom_t {
  kModules = 4, kTriggerTowers = 68, kTowersInPhi = 4, kTowersInEta = 17,
  kCrystals = 1700, kPns = 10, kCrystalsInPhi = 20, kCrystalsInEta = 85,
  kCrystalsPerTower = 25, kCardsPerTower = 5, kChannelsPerCard = 5, TTMAPMASK = 100
}
 

Public Member Functions

void deletePointers ()
 
 EcalElectronicsMapper (unsigned int numbOfXtalTSamples, unsigned int numbOfTriggerTSamples)
 
unsigned int getActiveDCC ()
 
unsigned int getActiveSM ()
 
unsigned int getDCCId (unsigned int aSMId) const
 
const std::map< unsigned int, unsigned int > & getDCCMap () const
 
std::string getDCCMapFilePath () const
 
DetIdgetDetIdPointer (unsigned int feChannel, unsigned int strip, unsigned int xtal)
 
unsigned int getEBTCCBlockLength ()
 
unsigned int getEETCCBlockLength ()
 
unsigned int getNumChannelsInDcc (unsigned int aDCCId)
 
EcalPseudoStripInputDigigetPSInputDigiPointer (unsigned int tccId, unsigned int towerId, unsigned int psId)
 
EcalPseudoStripInputDigigetPSInputDigiPointer (unsigned int tccId, unsigned int psCounter)
 
EcalScDetIdgetSCDetIdPointer (unsigned int smId, unsigned int feChannel)
 
EcalElectronicsIdgetSCElectronicsPointer (unsigned int smId, unsigned int feChannel)
 
unsigned int getSMId (unsigned int aDCCId) const
 
std::vector< EcalSrFlag * > getSrFlagPointer (unsigned int feChannel)
 
unsigned int getSRPBlockLength ()
 
std::vector< unsigned int > * getTccs (unsigned int smId)
 
EcalTriggerPrimitiveDigigetTPPointer (unsigned int tccId, unsigned int tower)
 
EcalTrigTowerDetIdgetTTDetIdPointer (unsigned int tccId, unsigned int tower)
 
EcalElectronicsIdgetTTEleIdPointer (unsigned int tccId, unsigned int tower)
 
unsigned int getUnfilteredTowerBlockLength ()
 
bool isGhost (const int FED, const int CCU, const int VFE)
 
bool isTCCExternal (unsigned int TCCId)
 
bool makeMapFromVectors (std::vector< int > &, std::vector< int > &)
 
const EcalElectronicsMappingmapping ()
 
unsigned int numbTriggerTSamples ()
 
unsigned int numbXtalTSamples ()
 
void resetPointers ()
 
bool setActiveDCC (unsigned int dccId)
 
bool setDCCMapFilePath (std::string)
 
void setEcalElectronicsMapping (const EcalElectronicsMapping *)
 
 ~EcalElectronicsMapper ()
 

Private Member Functions

unsigned int computeEBTCCBlockLength ()
 
unsigned int computeEETCCBlockLength ()
 
unsigned int computeUnfilteredFEBlockLength ()
 
void fillMaps ()
 
void setupGhostMap ()
 

Private Attributes

unsigned int dccId_
 
unsigned int ebTccBlockLength_
 
unsigned int eeTccBlockLength_
 
std::map< int, std::map< int, std::map< int, bool > > > ghost_
 
const EcalElectronicsMappingmappingBuilder_
 
std::map< unsigned int, std::vector< unsigned int > * > mapSmIdToTccIds_
 
std::map< unsigned int, unsigned int > myDCCMap_
 
unsigned int numbTriggerTSamples_
 
unsigned int numbXtalTSamples_
 
std::string pathToMapFile_
 
EcalPseudoStripInputDigipsInput_ [NUMB_TCC][TCC_EB_NUMBTTS][NUMB_STRIP]
 
EcalScDetIdscDetIds_ [NUMB_SM][NUMB_FE]
 
EcalElectronicsIdscEleIds_ [NUMB_SM][NUMB_FE]
 
unsigned int smId_
 
std::vector< EcalSrFlag * > srFlags_ [NUMB_SM][NUMB_FE]
 
unsigned int srpBlockLength_
 
short tTandPs_ [NUMB_TCC][5 *EcalTrigTowerDetId::kEBTowersPerSM][2]
 
EcalTrigTowerDetIdttDetIds_ [NUMB_TCC][NUMB_FE]
 
EcalElectronicsIdttEleIds_ [NUMB_TCC][NUMB_FE]
 
EcalTriggerPrimitiveDigittTPIds_ [NUMB_TCC][NUMB_FE]
 
unsigned int unfilteredFEBlockLength_
 
DetIdxtalDetIds_ [NUMB_SM][NUMB_FE][NUMB_STRIP][NUMB_XTAL]
 

Static Private Attributes

static const unsigned int numChannelsInDcc_ [NUMB_SM]
 

Friends

std::ostream & operator<< (std::ostream &o, const EcalElectronicsMapper &aEcalElectronicsMapper)
 

Detailed Description

Definition at line 34 of file EcalElectronicsMapper.h.

Member Enumeration Documentation

◆ SMGeom_t

Enumerator
kModules 
kTriggerTowers 
kTowersInPhi 
kTowersInEta 
kCrystals 
kPns 
kCrystalsInPhi 
kCrystalsInEta 
kCrystalsPerTower 
kCardsPerTower 
kChannelsPerCard 
TTMAPMASK 

Definition at line 156 of file EcalElectronicsMapper.h.

156  {
157  kModules = 4, // Number of modules per supermodule
158  kTriggerTowers = 68, // Number of trigger towers per supermodule
159  kTowersInPhi = 4, // Number of trigger towers in phi
160  kTowersInEta = 17, // Number of trigger towers in eta
161  kCrystals = 1700, // Number of crystals per supermodule
162  kPns = 10, // Number of PN laser monitoring diodes per supermodule
163  kCrystalsInPhi = 20, // Number of crystals in phi
164  kCrystalsInEta = 85, // Number of crystals in eta
165  kCrystalsPerTower = 25, // Number of crystals per trigger tower
166  kCardsPerTower = 5, // Number of VFE cards per trigger tower
167  kChannelsPerCard = 5, // Number of channels per VFE card
168  TTMAPMASK = 100
169  };

Constructor & Destructor Documentation

◆ EcalElectronicsMapper()

EcalElectronicsMapper::EcalElectronicsMapper ( unsigned int  numbOfXtalTSamples,
unsigned int  numbOfTriggerTSamples 
)

Constructor

Definition at line 8 of file EcalElectronicsMapper.cc.

References resetPointers(), and setupGhostMap().

◆ ~EcalElectronicsMapper()

EcalElectronicsMapper::~EcalElectronicsMapper ( )

Destructor

Definition at line 196 of file EcalElectronicsMapper.cc.

References deletePointers().

Member Function Documentation

◆ computeEBTCCBlockLength()

unsigned int EcalElectronicsMapper::computeEBTCCBlockLength ( )
private

Definition at line 374 of file EcalElectronicsMapper.cc.

References numbTriggerTSamples_.

Referenced by resetPointers().

374  {
375  unsigned int nTT = 68;
376  unsigned int tf;
377 
378  //TCC block size: header (8 bytes) + 17 words with 4 trigger primitives (17*8bytes)
379  if ((nTT * numbTriggerTSamples_) < 4 || (nTT * numbTriggerTSamples_) % 4)
380  tf = 1;
381  else
382  tf = 0;
383 
384  return 1 + ((nTT * numbTriggerTSamples_) / 4) + tf;
385 }

◆ computeEETCCBlockLength()

unsigned int EcalElectronicsMapper::computeEETCCBlockLength ( )
private

Definition at line 387 of file EcalElectronicsMapper.cc.

Referenced by resetPointers().

387  {
388  //Todo : implement multiple tt samples for the endcap
389  return 9;
390 }

◆ computeUnfilteredFEBlockLength()

unsigned int EcalElectronicsMapper::computeUnfilteredFEBlockLength ( )
private

Definition at line 370 of file EcalElectronicsMapper.cc.

References numbXtalTSamples_.

Referenced by resetPointers().

370  {
371  return ((numbXtalTSamples_ - 2) / 4 + 1) * 25 + 1;
372 }

◆ deletePointers()

void EcalElectronicsMapper::deletePointers ( )

Definition at line 198 of file EcalElectronicsMapper.cc.

References mps_fire::i, mapSmIdToTccIds_, NUMB_FE, NUMB_SM, NUMB_STRIP, NUMB_TCC, NUMB_XTAL, pathToMapFile_, psInput_, scEleIds_, srFlags_, digitizers_cfi::strip, TCC_EB_NUMBTTS, ttDetIds_, ttEleIds_, ttTPIds_, and xtalDetIds_.

Referenced by EcalRawToDigi::produce(), and ~EcalElectronicsMapper().

198  {
199  //DETETE ARRAYS
200  for (unsigned int sm = 0; sm < NUMB_SM; sm++) {
201  for (unsigned int fe = 0; fe < NUMB_FE; fe++) {
202  for (unsigned int strip = 0; strip < NUMB_STRIP; strip++) {
203  for (unsigned int xtal = 0; xtal < NUMB_XTAL; xtal++)
204  delete xtalDetIds_[sm][fe][strip][xtal];
205  }
206 
207  // if(scDetIds_[sm][fe]){
208  // delete scDetIds_[sm][fe];
209  // delete scEleIds_[sm][fe];
210  for (size_t i = 0; i < srFlags_[sm][fe].size(); ++i)
211  delete srFlags_[sm][fe][i];
212  srFlags_[sm][fe].clear();
213 
214  delete scEleIds_[sm][fe];
215  }
216  }
217 
218  // delete trigger electronics Id
219  for (int tccid = 0; tccid < NUMB_TCC; tccid++) {
220  for (int ttid = 0; ttid < TCC_EB_NUMBTTS; ttid++) {
221  for (int ps = 0; ps < NUMB_STRIP; ps++) {
222  delete psInput_[tccid][ttid][ps];
223  }
224  }
225  }
226 
227  for (unsigned int tccid = 0; tccid < NUMB_TCC; tccid++) {
228  for (unsigned int tpg = 0; tpg < NUMB_FE; tpg++) {
229  if (ttDetIds_[tccid][tpg]) {
230  delete ttDetIds_[tccid][tpg];
231  delete ttTPIds_[tccid][tpg];
232  delete ttEleIds_[tccid][tpg];
233  }
234  }
235  }
236 
237  pathToMapFile_.clear();
238 
239  std::map<unsigned int, std::vector<unsigned int>*>::iterator it;
240  for (it = mapSmIdToTccIds_.begin(); it != mapSmIdToTccIds_.end(); it++) {
241  delete (*it).second;
242  }
243 
244  mapSmIdToTccIds_.clear();
245 }
std::map< unsigned int, std::vector< unsigned int > * > mapSmIdToTccIds_
EcalTriggerPrimitiveDigi * ttTPIds_[NUMB_TCC][NUMB_FE]
EcalElectronicsId * ttEleIds_[NUMB_TCC][NUMB_FE]
EcalPseudoStripInputDigi * psInput_[NUMB_TCC][TCC_EB_NUMBTTS][NUMB_STRIP]
EcalTrigTowerDetId * ttDetIds_[NUMB_TCC][NUMB_FE]
std::vector< EcalSrFlag * > srFlags_[NUMB_SM][NUMB_FE]
DetId * xtalDetIds_[NUMB_SM][NUMB_FE][NUMB_STRIP][NUMB_XTAL]
EcalElectronicsId * scEleIds_[NUMB_SM][NUMB_FE]

◆ fillMaps()

void EcalElectronicsMapper::fillMaps ( )
private

Definition at line 431 of file EcalElectronicsMapper.cc.

References cms::cuda::assert(), EcalElectronicsMapping::dccTowerConstituents(), CollectionTags_cfi::EBSrFlag, CollectionTags_cfi::EESrFlag, runTauDisplay::eid, EcalElectronicsMapping::getDetId(), EcalElectronicsMapping::getEcalScDetId(), EcalElectronicsMapping::getElectronicsId(), EcalElectronicsMapping::getTriggerElectronicsId(), EcalElectronicsMapping::getTrigTowerDetId(), mps_fire::i, EcalTrigTowerDetId::kEBTowersPerSM, mappingBuilder_, mapSmIdToTccIds_, MAX_CCUID_JUMP, EcalTriggerElectronicsId::MAX_TCCID, EcalTriggerElectronicsId::MAX_TCCID_EEM, EcalTriggerElectronicsId::MAX_TCCID_EEP, MIN_CCUID_JUMP, EcalTriggerElectronicsId::MIN_TCCID_EEM, EcalTriggerElectronicsId::MIN_TCCID_EEP, numbTriggerTSamples_, numChannelsInDcc_, psInput_, DetId::rawId(), scEleIds_, SECTOR_EEM_CCU_JUMP, SECTOR_EEP_CCU_JUMP, EcalPseudoStripInputDigi::setSample(), EcalPseudoStripInputDigi::setSize(), findQualityFiles::size, srFlags_, EcalElectronicsId::stripId(), EcalElectronicsMapping::tccConstituents(), ecaldqm::tccId(), TCCID_SMID_SHIFT_EB, ecaldqm::towerId(), cmsswSequenceInfo::tp, groupFilesInBlocks::tt, tTandPs_, ttDetIds_, ttEleIds_, ecaldqm::ttId(), ttTPIds_, xtalDetIds_, and EcalElectronicsId::xtalId().

Referenced by setEcalElectronicsMapping().

431  {
432  for (int smId = 1; smId <= 54; smId++) {
433  // Fill EB arrays
434  if (smId > 9 && smId < 46) {
435  for (int feChannel = 1; feChannel <= 68; feChannel++) {
436  unsigned int tccId = smId + TCCID_SMID_SHIFT_EB;
437 
438  // Builds Ecal Trigger Tower Det Id
439 
440  unsigned int rawid = (mappingBuilder_->getTrigTowerDetId(tccId, feChannel)).rawId();
441  EcalTrigTowerDetId* ttDetId = new EcalTrigTowerDetId(rawid);
442  ttDetIds_[tccId - 1][feChannel - 1] = ttDetId;
443  EcalElectronicsId* ttEleId = new EcalElectronicsId(smId, feChannel, 1, 1);
444  ttEleIds_[tccId - 1][feChannel - 1] = ttEleId;
446  tp->setSize(numbTriggerTSamples_);
447  for (unsigned int i = 0; i < numbTriggerTSamples_; i++) {
448  tp->setSample(i, EcalTriggerPrimitiveSample(0));
449  }
450  ttTPIds_[tccId - 1][feChannel - 1] = tp;
451 
452  // build pseudostrip input data digi
453  for (int ps = 1; ps <= 5; ps++) {
454  psInput_[tccId - 1][feChannel - 1][ps - 1] =
456  psInput_[tccId - 1][feChannel - 1][ps - 1]->setSize(1);
457  psInput_[tccId - 1][feChannel - 1][ps - 1]->setSample(0, EcalPseudoStripInputSample(0));
458  }
459 
460  // Buil SRP Flag
461  srFlags_[smId - 1][feChannel - 1].push_back(new EBSrFlag(*ttDetId, 0));
462 
463  //only one element for barrel: 1-to-1 correspondance between
464  //DCC channels and EB trigger tower:
465  assert(srFlags_[smId - 1][feChannel - 1].size() == 1);
466 
467  for (unsigned int stripId = 1; stripId <= 5; stripId++) {
468  for (unsigned int xtalId = 1; xtalId <= 5; xtalId++) {
469  EcalElectronicsId eid(smId, feChannel, stripId, xtalId);
470  EBDetId* detId = new EBDetId((mappingBuilder_->getDetId(eid)).rawId());
471  xtalDetIds_[smId - 1][feChannel - 1][stripId - 1][xtalId - 1] = detId;
472 
473  } // close loop over xtals
474  } // close loop over strips
475 
476  } // close loop over fechannels
477 
478  } //close loop over sm ids in the EB
479  // Fill EE arrays (Todo : waiting SC correction)
480 
481  else {
482  std::vector<unsigned int>* pTCCIds = mapSmIdToTccIds_[smId];
483  std::vector<unsigned int>::iterator it;
484 
485  for (it = pTCCIds->begin(); it != pTCCIds->end(); it++) {
486  unsigned int tccId = *it;
487 
488  // creating arrays of pointers for trigger objects
489  for (unsigned int towerInTCC = 1; towerInTCC <= numChannelsInDcc_[smId - 1]; towerInTCC++) {
490  // Builds Ecal Trigger Tower Det Id
492 
493  ttDetIds_[tccId - 1][towerInTCC - 1] = new EcalTrigTowerDetId(ttDetId.rawId());
495  tp->setSize(numbTriggerTSamples_);
496  for (unsigned int i = 0; i < numbTriggerTSamples_; i++) {
497  tp->setSample(i, EcalTriggerPrimitiveSample(0));
498  }
499 
500  ttTPIds_[tccId - 1][towerInTCC - 1] = tp;
501 
502  // build pseudostrip input data digi
503  for (int ps = 1; ps <= 5; ps++) {
504  psInput_[tccId - 1][towerInTCC - 1][ps - 1] =
506  psInput_[tccId - 1][towerInTCC - 1][ps - 1]->setSize(1);
507  psInput_[tccId - 1][towerInTCC - 1][ps - 1]->setSample(0, EcalPseudoStripInputSample(0));
508  }
509  }
510  }
511 
512  // creating arrays of pointers for digi objects
513  for (unsigned int feChannel = 1; feChannel <= numChannelsInDcc_[smId - 1]; feChannel++) {
514  // to avoid gap in CCU_id's
515  if ((smId == SECTOR_EEM_CCU_JUMP || smId == SECTOR_EEP_CCU_JUMP) &&
516  (MIN_CCUID_JUMP <= feChannel && feChannel <= MAX_CCUID_JUMP))
517  continue;
518 
519  std::vector<EcalScDetId> scDetIds = mappingBuilder_->getEcalScDetId(smId, feChannel);
520  // scDetIds_[smId-1][feChannel-1] = new EcalScDetId(scDetId.rawId());
521  scEleIds_[smId - 1][feChannel - 1] = new EcalElectronicsId(smId, feChannel, 1, 1);
522 
523  for (size_t i = 0; i < scDetIds.size(); ++i) {
524  // std::cout << __FILE__ << ":" << __LINE__ << ": "
525  // << "(DCC,RU) = (" << smId << "," << feChannel
526  // << ") -> " << scDetIds[i] << "\n";
527 
528  srFlags_[smId - 1][feChannel - 1].push_back(new EESrFlag(EcalScDetId(scDetIds[i].rawId()), 0));
529  }
530  //usually only one element 1 DCC channel <-> 1 SC
531  //in few case two or three elements: partial SCs grouped.
532  assert(srFlags_[smId - 1][feChannel - 1].size() <= 3);
533 
534  std::vector<DetId> ecalDetIds = mappingBuilder_->dccTowerConstituents(smId, feChannel);
535  std::vector<DetId>::iterator it;
536 
537  //EEDetIds
538  for (it = ecalDetIds.begin(); it != ecalDetIds.end(); it++) {
540 
541  int stripId = ids.stripId();
542  int xtalId = ids.xtalId();
543 
544  EEDetId* detId = new EEDetId((*it).rawId());
545  xtalDetIds_[smId - 1][feChannel - 1][stripId - 1][xtalId - 1] = detId;
546  } // close loop over tower constituents
547 
548  } // close loop over FE Channels
549 
550  } // closing loop over sm ids in EE
551  }
552 
553  // developing mapping for pseudostrip input data: (tccId,psNumber)->(tccId,towerId,psId)
554  // initializing array for pseudostrip data
557  for (int tt = 0; tt < EcalTrigTowerDetId::kEBTowersPerSM; tt++) {
558  numStripInTT[tccId][tt] = -2;
559  }
560  }
561 
562  // assumption: if ps_max is the largest pseudostripId within a trigger tower
563  // all the pseudostrip 1 ... ps_max are actually present
564  std::vector<DetId>::iterator theTCCConstituent;
566  // loop over all constituents of a TCC and collect
567  // the largest pseudostripId within each trigger tower
568  std::vector<DetId> tccConstituents = mappingBuilder_->tccConstituents(tccId + 1);
569 
570  for (theTCCConstituent = tccConstituents.begin(); theTCCConstituent != tccConstituents.end(); theTCCConstituent++) {
571  int towerId = (mappingBuilder_->getTriggerElectronicsId(*theTCCConstituent)).ttId();
572  int ps = (mappingBuilder_->getTriggerElectronicsId(*theTCCConstituent)).pseudoStripId();
573  if (ps > numStripInTT[tccId][towerId - 1])
574  numStripInTT[tccId][towerId - 1] = ps;
575 
576  //std::cout << "tccId: " << (tccId+1) << " towerId: " << towerId
577  // << " ps: " << ps << " numStripInTT: " << numStripInTT[tccId][towerId-1] << std::endl;
578 
579  } // loop on TCC constituents
580 
581  } // loop on TCC's
582 
583  int psCounter;
585  // resetting pseudostrip counter at each new TCC
586  psCounter = 0;
588  // if there's not a given towerId, numStripInTT==-1
589  for (int ps = 0; ps < numStripInTT[tccId][towerId]; ps++) {
590  tTandPs_[tccId][psCounter][0] = towerId + 1;
591  tTandPs_[tccId][psCounter][1] = ps + 1;
592  psCounter++;
593  } // loop on TCC's
594  } // loop on towers in TCC
595  } // loop in ps in tower
596 
597  // for (int tccId=0; tccId<EcalTriggerElectronicsId::MAX_TCCID; tccId++) {
598  // for (int psCounter=0; psCounter<EcalTrigTowerDetId::kEBTowersPerSM*5; psCounter++) {
599  // std::cout << "tccId: " << (tccId+1) << " counter: " << (psCounter+1)
600  // << " tt: " << tTandPs_[tccId][psCounter][0]
601  // << " ps: " << tTandPs_[tccId][psCounter][1]
602  // << std::endl;
603  // } }
604 
605  // Note:
606  // for TCC 48 in EE, pseudostrip data in the interval:
607  // + 1-30 is good pseudostrip data
608  // + 31-42 is a duplication of the last 12 ps of the previous block, and needs be ignored
609  // + 43-60 is further good pseudostrip data
610 
612  int tccId = tcc - 1;
613  short tTandPs_tmp[18][2];
614 
615  // store entries _after_ the pseudostrip data which gets duplicated
616  for (int psCounter = 30; psCounter < 48; psCounter++) {
617  tTandPs_tmp[psCounter - 30][0] = tTandPs_[tccId][psCounter][0];
618  tTandPs_tmp[psCounter - 30][1] = tTandPs_[tccId][psCounter][1];
619  }
620 
621  // duplication
622  for (int psCounter = 18; psCounter < 30; psCounter++) {
623  tTandPs_[tccId][psCounter + 12][0] = tTandPs_[tccId][psCounter][0];
624  tTandPs_[tccId][psCounter + 12][1] = tTandPs_[tccId][psCounter][1];
625  }
626 
627  // append stoed
628  for (int psCounter = 42; psCounter < 60; psCounter++) {
629  tTandPs_[tccId][psCounter][0] = tTandPs_tmp[psCounter - 42][0];
630  tTandPs_[tccId][psCounter][1] = tTandPs_tmp[psCounter - 42][1];
631  }
632 
633  } // loop on EEM TCC's
634 
636  int tccId = tcc - 1;
637  short tTandPs_tmp[18][2];
638 
639  // store entries _after_ the pseudostrip data which gets duplicated
640  for (int psCounter = 30; psCounter < 48; psCounter++) {
641  tTandPs_tmp[psCounter - 30][0] = tTandPs_[tccId][psCounter][0];
642  tTandPs_tmp[psCounter - 30][1] = tTandPs_[tccId][psCounter][1];
643  }
644 
645  // duplication
646  for (int psCounter = 18; psCounter < 30; psCounter++) {
647  tTandPs_[tccId][psCounter + 12][0] = tTandPs_[tccId][psCounter][0];
648  tTandPs_[tccId][psCounter + 12][1] = tTandPs_[tccId][psCounter][1];
649  }
650 
651  // append stoed
652  for (int psCounter = 42; psCounter < 60; psCounter++) {
653  tTandPs_[tccId][psCounter][0] = tTandPs_tmp[psCounter - 42][0];
654  tTandPs_[tccId][psCounter][1] = tTandPs_tmp[psCounter - 42][1];
655  }
656 
657  } // loop on EEP TCC's
658 
659  //for (int tccId=0; tccId<EcalTriggerElectronicsId::MAX_TCCID; tccId++) {
660  //for (int psCounter=0; psCounter<EcalTrigTowerDetId::kEBTowersPerSM*5; psCounter++) {
661  //std::cout << "AF tccId: " << (tccId+1) << " counter: " << (psCounter+1)
662  //<< " tt: " << tTandPs_[tccId][psCounter][0]
663  //<< " ps: " << tTandPs_[tccId][psCounter][1]
664  //<< std::endl;
665  // } }
666 }
size
Write out results.
std::map< unsigned int, std::vector< unsigned int > * > mapSmIdToTccIds_
const EcalElectronicsMapping * mappingBuilder_
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
EcalTriggerPrimitiveDigi * ttTPIds_[NUMB_TCC][NUMB_FE]
EcalElectronicsId * ttEleIds_[NUMB_TCC][NUMB_FE]
EcalTriggerElectronicsId getTriggerElectronicsId(const DetId &id) const
Get the trigger electronics id for this det id.
assert(be >=bs)
std::vector< DetId > tccConstituents(int tccId) const
Get the constituent detids for this dccId.
unsigned ttId(DetId const &, EcalElectronicsMapping const *)
EcalPseudoStripInputDigi * psInput_[NUMB_TCC][TCC_EB_NUMBTTS][NUMB_STRIP]
Definition: TTTypes.h:54
unsigned towerId(DetId const &, EcalElectronicsMapping const *)
static const unsigned int numChannelsInDcc_[NUMB_SM]
EcalTrigTowerDetId getTrigTowerDetId(int TCCid, int iTT) const
Builds a EcalTrigTowerDetID from the TCCid & TriggerTower index in TCC.
EcalTrigTowerDetId * ttDetIds_[NUMB_TCC][NUMB_FE]
std::vector< DetId > dccTowerConstituents(int dccId, int tower) const
Get the constituent detids for this dccId.
void setSample(int i, const EcalPseudoStripInputSample &sam)
std::vector< EcalSrFlag * > srFlags_[NUMB_SM][NUMB_FE]
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
int stripId() const
get the tower id
unsigned tccId(DetId const &, EcalElectronicsMapping const *)
short tTandPs_[NUMB_TCC][5 *EcalTrigTowerDetId::kEBTowersPerSM][2]
int xtalId() const
get the channel id
std::vector< EcalScDetId > getEcalScDetId(int DCCid, int DCC_Channel, bool ignoreSingleCrystal=true) const
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.
static const int kEBTowersPerSM
DetId * xtalDetIds_[NUMB_SM][NUMB_FE][NUMB_STRIP][NUMB_XTAL]
Ecal trigger electronics identification [32:20] Unused (so far) [19:13] TCC id [12:6] TT id [5:3] pse...
DetId getDetId(const EcalElectronicsId &id) const
Get the detid given an electronicsId.
EcalElectronicsId * scEleIds_[NUMB_SM][NUMB_FE]

◆ getActiveDCC()

unsigned int EcalElectronicsMapper::getActiveDCC ( )
inline

◆ getActiveSM()

unsigned int EcalElectronicsMapper::getActiveSM ( )
inline

◆ getDCCId()

unsigned int EcalElectronicsMapper::getDCCId ( unsigned int  aSMId) const

Definition at line 400 of file EcalElectronicsMapper.cc.

References if(), myDCCMap_, and DCCDataUnpacker::silentMode_.

Referenced by printStatusRecords().

400  {
401  //get iterator for SM id
402  std::map<unsigned int, unsigned int>::const_iterator it = myDCCMap_.find(aSMId_);
403 
404  //check if SMid exists and return DCC id
405  if (it != myDCCMap_.end())
406  return it->second;
407 
408  //error return
410  edm::LogError("IncorrectMapping") << "DCC requested for SM id: " << aSMId_ << " not found";
411  }
412  return 0;
413 }
Log< level::Error, false > LogError
std::map< unsigned int, unsigned int > myDCCMap_
static std::atomic< bool > silentMode_

◆ getDCCMap()

const std::map<unsigned int, unsigned int>& EcalElectronicsMapper::getDCCMap ( ) const
inline

Get methods for DCCId/SMId and map

Definition at line 82 of file EcalElectronicsMapper.h.

References myDCCMap_.

82 { return myDCCMap_; }
std::map< unsigned int, unsigned int > myDCCMap_

◆ getDCCMapFilePath()

std::string EcalElectronicsMapper::getDCCMapFilePath ( ) const
inline

Retrieves current path do the map file

Definition at line 64 of file EcalElectronicsMapper.h.

References pathToMapFile_.

64 { return pathToMapFile_; }

◆ getDetIdPointer()

DetId* EcalElectronicsMapper::getDetIdPointer ( unsigned int  feChannel,
unsigned int  strip,
unsigned int  xtal 
)
inline

Definition at line 84 of file EcalElectronicsMapper.h.

References smId_, digitizers_cfi::strip, and xtalDetIds_.

Referenced by DCCSCBlock::unpackXtalData(), and DCCTowerBlock::unpackXtalData().

84  {
85  return xtalDetIds_[smId_ - 1][feChannel - 1][strip - 1][xtal - 1];
86  }
DetId * xtalDetIds_[NUMB_SM][NUMB_FE][NUMB_STRIP][NUMB_XTAL]

◆ getEBTCCBlockLength()

unsigned int EcalElectronicsMapper::getEBTCCBlockLength ( )
inline

Definition at line 134 of file EcalElectronicsMapper.h.

References ebTccBlockLength_.

Referenced by DCCEBTCCBlock::DCCEBTCCBlock().

134 { return ebTccBlockLength_; }

◆ getEETCCBlockLength()

unsigned int EcalElectronicsMapper::getEETCCBlockLength ( )
inline

Definition at line 136 of file EcalElectronicsMapper.h.

References eeTccBlockLength_.

136 { return eeTccBlockLength_; }

◆ getNumChannelsInDcc()

unsigned int EcalElectronicsMapper::getNumChannelsInDcc ( unsigned int  aDCCId)
inline

Definition at line 144 of file EcalElectronicsMapper.h.

References numChannelsInDcc_.

Referenced by DCCFEBlock::unpack().

144 { return numChannelsInDcc_[aDCCId - 1]; }
static const unsigned int numChannelsInDcc_[NUMB_SM]

◆ getPSInputDigiPointer() [1/2]

EcalPseudoStripInputDigi* EcalElectronicsMapper::getPSInputDigiPointer ( unsigned int  tccId,
unsigned int  towerId,
unsigned int  psId 
)
inline

Definition at line 108 of file EcalElectronicsMapper.h.

References psInput_, ecaldqm::tccId(), and ecaldqm::towerId().

Referenced by DCCEETCCBlock::addTriggerPrimitivesToCollection(), and getPSInputDigiPointer().

108  {
109  return psInput_[tccId - 1][towerId - 1][psId - 1];
110  }
EcalPseudoStripInputDigi * psInput_[NUMB_TCC][TCC_EB_NUMBTTS][NUMB_STRIP]
unsigned towerId(DetId const &, EcalElectronicsMapping const *)
unsigned tccId(DetId const &, EcalElectronicsMapping const *)

◆ getPSInputDigiPointer() [2/2]

EcalPseudoStripInputDigi* EcalElectronicsMapper::getPSInputDigiPointer ( unsigned int  tccId,
unsigned int  psCounter 
)
inline

Definition at line 112 of file EcalElectronicsMapper.h.

References getPSInputDigiPointer(), ecaldqm::tccId(), and tTandPs_.

112  {
113  return getPSInputDigiPointer(tccId, tTandPs_[tccId - 1][psCounter - 1][0], tTandPs_[tccId - 1][psCounter - 1][1]);
114  }
EcalPseudoStripInputDigi * getPSInputDigiPointer(unsigned int tccId, unsigned int towerId, unsigned int psId)
unsigned tccId(DetId const &, EcalElectronicsMapping const *)
short tTandPs_[NUMB_TCC][5 *EcalTrigTowerDetId::kEBTowersPerSM][2]

◆ getSCDetIdPointer()

EcalScDetId* EcalElectronicsMapper::getSCDetIdPointer ( unsigned int  smId,
unsigned int  feChannel 
)
inline

Definition at line 100 of file EcalElectronicsMapper.h.

References scDetIds_.

100  {
101  return scDetIds_[smId - 1][feChannel - 1];
102  }
EcalScDetId * scDetIds_[NUMB_SM][NUMB_FE]

◆ getSCElectronicsPointer()

EcalElectronicsId* EcalElectronicsMapper::getSCElectronicsPointer ( unsigned int  smId,
unsigned int  feChannel 
)
inline

Definition at line 104 of file EcalElectronicsMapper.h.

References scEleIds_.

Referenced by DCCSCBlock::fillEcalElectronicsError().

104  {
105  return scEleIds_[smId - 1][feChannel - 1];
106  }
EcalElectronicsId * scEleIds_[NUMB_SM][NUMB_FE]

◆ getSMId()

unsigned int EcalElectronicsMapper::getSMId ( unsigned int  aDCCId) const

Definition at line 415 of file EcalElectronicsMapper.cc.

References myDCCMap_, and DCCDataUnpacker::silentMode_.

Referenced by DCCDataUnpacker::getCCUValue(), DCCDataUnpacker::getChannelValue(), and setActiveDCC().

415  {
416  //get iterator map
417  std::map<unsigned int, unsigned int>::const_iterator it;
418 
419  //try to find SM id for given DCC id
420  for (it = myDCCMap_.begin(); it != myDCCMap_.end(); it++)
421  if (it->second == aDCCId_)
422  return it->first;
423 
424  //error return
426  edm::LogError("IncorrectMapping") << "SM requested DCC id: " << aDCCId_ << " not found";
427  }
428  return 0;
429 }
Log< level::Error, false > LogError
std::map< unsigned int, unsigned int > myDCCMap_
static std::atomic< bool > silentMode_

◆ getSrFlagPointer()

std::vector<EcalSrFlag*> EcalElectronicsMapper::getSrFlagPointer ( unsigned int  feChannel)
inline

Definition at line 120 of file EcalElectronicsMapper.h.

References smId_, and srFlags_.

Referenced by DCCEBSRPBlock::addSRFlagToCollection(), and DCCEESRPBlock::addSRFlagToCollection().

120 { return srFlags_[smId_ - 1][feChannel - 1]; }
std::vector< EcalSrFlag * > srFlags_[NUMB_SM][NUMB_FE]

◆ getSRPBlockLength()

unsigned int EcalElectronicsMapper::getSRPBlockLength ( )
inline

Definition at line 138 of file EcalElectronicsMapper.h.

References srpBlockLength_.

138 { return srpBlockLength_; }

◆ getTccs()

std::vector<unsigned int>* EcalElectronicsMapper::getTccs ( unsigned int  smId)
inline

Definition at line 122 of file EcalElectronicsMapper.h.

References mapSmIdToTccIds_.

Referenced by DCCEETCCBlock::checkTccIdAndNumbTTs().

122 { return mapSmIdToTccIds_[smId]; }
std::map< unsigned int, std::vector< unsigned int > * > mapSmIdToTccIds_

◆ getTPPointer()

EcalTriggerPrimitiveDigi* EcalElectronicsMapper::getTPPointer ( unsigned int  tccId,
unsigned int  tower 
)
inline

Definition at line 96 of file EcalElectronicsMapper.h.

References ecaldqm::tccId(), l1tHGCalTowerProducer_cfi::tower, and ttTPIds_.

Referenced by DCCEETCCBlock::addTriggerPrimitivesToCollection(), and DCCEBTCCBlock::addTriggerPrimitivesToCollection().

96  {
97  return ttTPIds_[tccId - 1][tower - 1];
98  }
EcalTriggerPrimitiveDigi * ttTPIds_[NUMB_TCC][NUMB_FE]
unsigned tccId(DetId const &, EcalElectronicsMapping const *)

◆ getTTDetIdPointer()

EcalTrigTowerDetId* EcalElectronicsMapper::getTTDetIdPointer ( unsigned int  tccId,
unsigned int  tower 
)
inline

Definition at line 88 of file EcalElectronicsMapper.h.

References ecaldqm::tccId(), l1tHGCalTowerProducer_cfi::tower, and ttDetIds_.

88  {
89  return ttDetIds_[tccId - 1][tower - 1];
90  }
EcalTrigTowerDetId * ttDetIds_[NUMB_TCC][NUMB_FE]
unsigned tccId(DetId const &, EcalElectronicsMapping const *)

◆ getTTEleIdPointer()

EcalElectronicsId* EcalElectronicsMapper::getTTEleIdPointer ( unsigned int  tccId,
unsigned int  tower 
)
inline

Definition at line 92 of file EcalElectronicsMapper.h.

References ecaldqm::tccId(), l1tHGCalTowerProducer_cfi::tower, and ttEleIds_.

Referenced by DCCTowerBlock::fillEcalElectronicsError().

92  {
93  return ttEleIds_[tccId - 1][tower - 1];
94  }
EcalElectronicsId * ttEleIds_[NUMB_TCC][NUMB_FE]
unsigned tccId(DetId const &, EcalElectronicsMapping const *)

◆ getUnfilteredTowerBlockLength()

unsigned int EcalElectronicsMapper::getUnfilteredTowerBlockLength ( )
inline

Definition at line 132 of file EcalElectronicsMapper.h.

References unfilteredFEBlockLength_.

Referenced by DCCFEBlock::DCCFEBlock(), and DCCMemBlock::DCCMemBlock().

132 { return unfilteredFEBlockLength_; }

◆ isGhost()

bool EcalElectronicsMapper::isGhost ( const int  FED,
const int  CCU,
const int  VFE 
)

Definition at line 688 of file EcalElectronicsMapper.cc.

References spr::find(), and ghost_.

Referenced by DCCSCBlock::unpackXtalData().

688  {
689  if (ghost_.find(FED) == ghost_.end())
690  return false;
691 
692  if (ghost_[FED].find(CCU) == ghost_[FED].end())
693  return false;
694 
695  if (ghost_[FED][CCU].find(VFE) == ghost_[FED][CCU].end())
696  return false;
697 
698  return true;
699 }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
std::map< int, std::map< int, std::map< int, bool > > > ghost_

◆ isTCCExternal()

bool EcalElectronicsMapper::isTCCExternal ( unsigned int  TCCId)

◆ makeMapFromVectors()

bool EcalElectronicsMapper::makeMapFromVectors ( std::vector< int > &  orderedFedUnpackList,
std::vector< int > &  orderedDCCIdList 
)

Read map file (returns false if an error ocurred) deprecated by HLT environment HLT friendly: load default mapping or, for non standatd mapping, use 2 vectors from cfg

Definition at line 314 of file EcalElectronicsMapper.cc.

References createfilelist::int, myDCCMap_, ecalcalib_dqm_sourceclient-live_cfg::orderedDCCIdList, AlCaHLTBitMon_QueryRunRegistry::string, createJobs::tmp, and findQualityFiles::v.

Referenced by EcalRawToDigi::EcalRawToDigi().

315  {
316  // in case as non standard set of DCCId:FedId pairs was provided
317  if (orderedFedUnpackList.size() == orderedDCCIdList.size() && !orderedFedUnpackList.empty()) {
318  edm::LogInfo("EcalElectronicsMapper") << "DCCIdList/FedUnpackList lists given. Being loaded.";
319 
320  std::string correspondence("list of pairs DCCId:FedId : ");
321  char onePair[50];
322  for (int v = 0; v < ((int)orderedFedUnpackList.size()); v++) {
323  myDCCMap_[orderedDCCIdList[v]] = orderedFedUnpackList[v];
324 
325  sprintf(onePair, " %d:%d", orderedDCCIdList[v], orderedFedUnpackList[v]);
326  std::string tmp(onePair);
327  correspondence += tmp;
328  }
329  edm::LogInfo("EcalElectronicsMapper") << correspondence;
330 
331  } else { // default set of DCCId:FedId for ECAL
332 
333  edm::LogInfo("EcalElectronicsMapper") << "No input DCCIdList/FedUnpackList lists given for ECAL unpacker"
334  << "(or given with different number of elements). "
335  << " Loading default association DCCIdList:FedUnpackList,"
336  << "i.e. 1:601 ... 53:653, 54:654.";
337 
338  for (unsigned int v = 1; v <= 54; v++) {
339  myDCCMap_[v] = (v + 600);
340  }
341  }
342 
343  return true;
344 }
std::map< unsigned int, unsigned int > myDCCMap_
Log< level::Info, false > LogInfo
tmp
align.sh
Definition: createJobs.py:716

◆ mapping()

const EcalElectronicsMapping* EcalElectronicsMapper::mapping ( )
inline

Definition at line 146 of file EcalElectronicsMapper.h.

References mappingBuilder_.

Referenced by DCCDataUnpacker::getCCUValue(), and DCCDataUnpacker::getChannelValue().

146 { return mappingBuilder_; }
const EcalElectronicsMapping * mappingBuilder_

◆ numbTriggerTSamples()

unsigned int EcalElectronicsMapper::numbTriggerTSamples ( )
inline

Definition at line 130 of file EcalElectronicsMapper.h.

References numbTriggerTSamples_.

130 { return numbTriggerTSamples_; }

◆ numbXtalTSamples()

unsigned int EcalElectronicsMapper::numbXtalTSamples ( )
inline

◆ resetPointers()

void EcalElectronicsMapper::resetPointers ( )

Definition at line 17 of file EcalElectronicsMapper.cc.

References computeEBTCCBlockLength(), computeEETCCBlockLength(), computeUnfilteredFEBlockLength(), ebTccBlockLength_, eeTccBlockLength_, EcalTrigTowerDetId::kEBTowersPerSM, mapSmIdToTccIds_, EcalTriggerElectronicsId::MAX_TCCID, NUMB_FE, NUMB_SM, NUMB_STRIP, NUMB_TCC, NUMB_XTAL, psInput_, scEleIds_, digitizers_cfi::strip, TCC_EB_NUMBTTS, ecaldqm::tccId(), tTandPs_, ttDetIds_, ttEleIds_, ttTPIds_, unfilteredFEBlockLength_, and xtalDetIds_.

Referenced by EcalElectronicsMapper(), and EcalRawToDigi::produce().

17  {
18  // Reset Arrays
19  for (unsigned int sm = 0; sm < NUMB_SM; sm++) {
20  for (unsigned int fe = 0; fe < NUMB_FE; fe++) {
21  for (unsigned int strip = 0; strip < NUMB_STRIP; strip++) {
22  for (unsigned int xtal = 0; xtal < NUMB_XTAL; xtal++) {
23  //Reset DFrames and xtalDetIds
24  xtalDetIds_[sm][fe][strip][xtal] = nullptr;
25  }
26  }
27 
28  //Reset SC Det Ids
29  //scDetIds_[sm][fe]=0;
30  scEleIds_[sm][fe] = nullptr;
31  //srFlags_[sm][fe]=0;
32  }
33  }
34 
35  //Reset TT det Ids
36  for (unsigned int tccid = 0; tccid < NUMB_TCC; tccid++) {
37  for (unsigned int tpg = 0; tpg < NUMB_FE; tpg++) {
38  ttDetIds_[tccid][tpg] = nullptr;
39  ttTPIds_[tccid][tpg] = nullptr;
40  ttEleIds_[tccid][tpg] = nullptr;
41  }
42  }
43 
44  // reset trigger electronics Id
45  for (int tccid = 0; tccid < NUMB_TCC; tccid++) {
46  for (int ttid = 0; ttid < TCC_EB_NUMBTTS; ttid++) {
47  for (int ps = 0; ps < NUMB_STRIP; ps++) {
48  psInput_[tccid][ttid][ps] = nullptr;
49  }
50  }
51  }
52 
53  // initialize TCC maps
55  for (int psCounter = 0; psCounter < EcalTrigTowerDetId::kEBTowersPerSM * 5; psCounter++) {
56  for (int u = 0; u < 2; u++) {
57  tTandPs_[tccId][psCounter][u] = -1;
58  }
59  }
60  }
61 
62  //Fill map sm id to tcc ids
63  std::vector<unsigned int>* ids;
64  ids = new std::vector<unsigned int>;
65  ids->push_back(1);
66  ids->push_back(18);
67  ids->push_back(19);
68  ids->push_back(36);
69  mapSmIdToTccIds_[1] = ids;
70 
71  ids = new std::vector<unsigned int>;
72  ids->push_back(2);
73  ids->push_back(3);
74  ids->push_back(20);
75  ids->push_back(21);
76  mapSmIdToTccIds_[2] = ids;
77 
78  ids = new std::vector<unsigned int>;
79  ids->push_back(4);
80  ids->push_back(5);
81  ids->push_back(22);
82  ids->push_back(23);
83  mapSmIdToTccIds_[3] = ids;
84 
85  ids = new std::vector<unsigned int>;
86  ids->push_back(6);
87  ids->push_back(7);
88  ids->push_back(24);
89  ids->push_back(25);
90  mapSmIdToTccIds_[4] = ids;
91 
92  ids = new std::vector<unsigned int>;
93  ids->push_back(8);
94  ids->push_back(9);
95  ids->push_back(26);
96  ids->push_back(27);
97  mapSmIdToTccIds_[5] = ids;
98 
99  ids = new std::vector<unsigned int>;
100  ids->push_back(10);
101  ids->push_back(11);
102  ids->push_back(28);
103  ids->push_back(29);
104  mapSmIdToTccIds_[6] = ids;
105 
106  ids = new std::vector<unsigned int>;
107  ids->push_back(12);
108  ids->push_back(13);
109  ids->push_back(30);
110  ids->push_back(31);
111  mapSmIdToTccIds_[7] = ids;
112 
113  ids = new std::vector<unsigned int>;
114  ids->push_back(14);
115  ids->push_back(15);
116  ids->push_back(32);
117  ids->push_back(33);
118  mapSmIdToTccIds_[8] = ids;
119 
120  ids = new std::vector<unsigned int>;
121  ids->push_back(16);
122  ids->push_back(17);
123  ids->push_back(34);
124  ids->push_back(35);
125  mapSmIdToTccIds_[9] = ids;
126 
127  ids = new std::vector<unsigned int>;
128  ids->push_back(73);
129  ids->push_back(90);
130  ids->push_back(91);
131  ids->push_back(108);
132  mapSmIdToTccIds_[46] = ids;
133 
134  ids = new std::vector<unsigned int>;
135  ids->push_back(74);
136  ids->push_back(75);
137  ids->push_back(92);
138  ids->push_back(93);
139  mapSmIdToTccIds_[47] = ids;
140 
141  ids = new std::vector<unsigned int>;
142  ids->push_back(76);
143  ids->push_back(77);
144  ids->push_back(94);
145  ids->push_back(95);
146  mapSmIdToTccIds_[48] = ids;
147 
148  ids = new std::vector<unsigned int>;
149  ids->push_back(78);
150  ids->push_back(79);
151  ids->push_back(96);
152  ids->push_back(97);
153  mapSmIdToTccIds_[49] = ids;
154 
155  ids = new std::vector<unsigned int>;
156  ids->push_back(80);
157  ids->push_back(81);
158  ids->push_back(98);
159  ids->push_back(99);
160  mapSmIdToTccIds_[50] = ids;
161 
162  ids = new std::vector<unsigned int>;
163  ids->push_back(82);
164  ids->push_back(83);
165  ids->push_back(100);
166  ids->push_back(101);
167  mapSmIdToTccIds_[51] = ids;
168 
169  ids = new std::vector<unsigned int>;
170  ids->push_back(84);
171  ids->push_back(85);
172  ids->push_back(102);
173  ids->push_back(103);
174  mapSmIdToTccIds_[52] = ids;
175 
176  ids = new std::vector<unsigned int>;
177  ids->push_back(86);
178  ids->push_back(87);
179  ids->push_back(104);
180  ids->push_back(105);
181  mapSmIdToTccIds_[53] = ids;
182 
183  ids = new std::vector<unsigned int>;
184  ids->push_back(88);
185  ids->push_back(89);
186  ids->push_back(106);
187  ids->push_back(107);
188  mapSmIdToTccIds_[54] = ids;
189 
190  //Compute data block sizes
194 }
std::map< unsigned int, std::vector< unsigned int > * > mapSmIdToTccIds_
EcalTriggerPrimitiveDigi * ttTPIds_[NUMB_TCC][NUMB_FE]
EcalElectronicsId * ttEleIds_[NUMB_TCC][NUMB_FE]
EcalPseudoStripInputDigi * psInput_[NUMB_TCC][TCC_EB_NUMBTTS][NUMB_STRIP]
unsigned int computeEETCCBlockLength()
EcalTrigTowerDetId * ttDetIds_[NUMB_TCC][NUMB_FE]
unsigned tccId(DetId const &, EcalElectronicsMapping const *)
short tTandPs_[NUMB_TCC][5 *EcalTrigTowerDetId::kEBTowersPerSM][2]
unsigned int computeUnfilteredFEBlockLength()
unsigned int computeEBTCCBlockLength()
static const int kEBTowersPerSM
DetId * xtalDetIds_[NUMB_SM][NUMB_FE][NUMB_STRIP][NUMB_XTAL]
EcalElectronicsId * scEleIds_[NUMB_SM][NUMB_FE]

◆ setActiveDCC()

bool EcalElectronicsMapper::setActiveDCC ( unsigned int  dccId)

Set DCC id that is going to be unpacked for the event

Definition at line 252 of file EcalElectronicsMapper.cc.

References ecaldqm::dccId(), dccId_, getSMId(), runTheMatrix::ret, and smId_.

Referenced by EcalRawToDigi::produce().

252  {
253  bool ret(true);
254 
255  //Update active dcc and associated smId
256  dccId_ = dccId;
257 
258  smId_ = getSMId(dccId_);
259 
260  if (!smId_)
261  ret = false;
262 
263  return ret;
264 }
unsigned int getSMId(unsigned int aDCCId) const
ret
prodAgent to be discontinued
unsigned dccId(DetId const &, EcalElectronicsMapping const *)

◆ setDCCMapFilePath()

bool EcalElectronicsMapper::setDCCMapFilePath ( std::string  aPath_)

Receives a string with a path and checks if file is accessible

Definition at line 266 of file EcalElectronicsMapper.cc.

References pathToMapFile_.

266  {
267  //try to open a dccMapFile in the given path
268  std::ifstream dccMapFile_(aPath_.c_str());
269 
270  //if not successful return false
271  if (!dccMapFile_.is_open())
272  return false;
273 
274  //else close file and accept given path
275  dccMapFile_.close();
276  pathToMapFile_ = aPath_;
277 
278  return true;
279 }

◆ setEcalElectronicsMapping()

void EcalElectronicsMapper::setEcalElectronicsMapping ( const EcalElectronicsMapping m)

◆ setupGhostMap()

void EcalElectronicsMapper::setupGhostMap ( )
private

Definition at line 668 of file EcalElectronicsMapper.cc.

References ghost_, mps_fire::i, dqmiodumpmetadata::n, and findQualityFiles::v.

Referenced by EcalElectronicsMapper().

668  {
669  // number of 'ghost' VFEs
670  const int n = 44;
671 
672  // here is a list of all 'ghost' VFEs
673  // in format {FED, CCU, VFE}
674  const struct {
675  int FED, CCU, VFE;
676  } v[n] = {{601, 10, 5}, {601, 34, 3}, {601, 34, 4}, {601, 34, 5}, {602, 32, 5}, {603, 12, 5}, {603, 30, 5},
677  {604, 12, 5}, {604, 30, 5}, {605, 32, 5}, {606, 10, 5}, {606, 34, 3}, {606, 34, 4}, {606, 34, 5},
678  {608, 27, 3}, {608, 27, 4}, {608, 27, 5}, {608, 3, 3}, {608, 3, 4}, {608, 3, 5}, {608, 30, 5},
679  {608, 6, 5}, {646, 10, 5}, {646, 34, 3}, {646, 34, 4}, {646, 34, 5}, {647, 32, 5}, {648, 12, 5},
680  {648, 30, 5}, {649, 12, 5}, {649, 30, 5}, {650, 32, 5}, {651, 10, 5}, {651, 34, 3}, {651, 34, 4},
681  {651, 34, 5}, {653, 27, 3}, {653, 27, 4}, {653, 27, 5}, {653, 3, 3}, {653, 3, 4}, {653, 3, 5},
682  {653, 30, 5}, {653, 6, 5}};
683 
684  for (int i = 0; i < n; ++i)
685  ghost_[v[i].FED][v[i].CCU][v[i].VFE] = true;
686 }
std::map< int, std::map< int, std::map< int, bool > > > ghost_

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  o,
const EcalElectronicsMapper aEcalElectronicsMapper 
)
friend

Print current map

Definition at line 346 of file EcalElectronicsMapper.cc.

346  {
347  //print class information
348  o << "---------------------------------------------------------";
349 
350  if (aMapper_.pathToMapFile_.empty()) {
351  o << "No correct input for DCC map has been given yet...";
352  } else {
353  o << "DCC Map (Map file: " << aMapper_.pathToMapFile_ << " )"
354  << "SM id\t\tDCCid ";
355 
356  //get DCC map and iterator
357  std::map<unsigned int, unsigned int> aMap;
358  aMap = aMapper_.myDCCMap_;
359  std::map<unsigned int, unsigned int>::iterator iter;
360 
361  //print info contained in map
362  for (iter = aMap.begin(); iter != aMap.end(); iter++)
363  o << iter->first << "\t\t" << iter->second;
364  }
365 
366  o << "---------------------------------------------------------";
367  return o;
368 }

Member Data Documentation

◆ dccId_

unsigned int EcalElectronicsMapper::dccId_
private

Definition at line 187 of file EcalElectronicsMapper.h.

Referenced by getActiveDCC(), and setActiveDCC().

◆ ebTccBlockLength_

unsigned int EcalElectronicsMapper::ebTccBlockLength_
private

Definition at line 195 of file EcalElectronicsMapper.h.

Referenced by getEBTCCBlockLength(), and resetPointers().

◆ eeTccBlockLength_

unsigned int EcalElectronicsMapper::eeTccBlockLength_
private

Definition at line 195 of file EcalElectronicsMapper.h.

Referenced by getEETCCBlockLength(), and resetPointers().

◆ ghost_

std::map<int, std::map<int, std::map<int, bool> > > EcalElectronicsMapper::ghost_
private

Definition at line 221 of file EcalElectronicsMapper.h.

Referenced by isGhost(), and setupGhostMap().

◆ mappingBuilder_

const EcalElectronicsMapping* EcalElectronicsMapper::mappingBuilder_
private

Definition at line 211 of file EcalElectronicsMapper.h.

Referenced by fillMaps(), mapping(), and setEcalElectronicsMapping().

◆ mapSmIdToTccIds_

std::map<unsigned int, std::vector<unsigned int>*> EcalElectronicsMapper::mapSmIdToTccIds_
private

Definition at line 185 of file EcalElectronicsMapper.h.

Referenced by deletePointers(), fillMaps(), getTccs(), and resetPointers().

◆ myDCCMap_

std::map<unsigned int, unsigned int> EcalElectronicsMapper::myDCCMap_
private

Definition at line 183 of file EcalElectronicsMapper.h.

Referenced by getDCCId(), getDCCMap(), getSMId(), makeMapFromVectors(), and operator<<().

◆ numbTriggerTSamples_

unsigned int EcalElectronicsMapper::numbTriggerTSamples_
private

Definition at line 181 of file EcalElectronicsMapper.h.

Referenced by computeEBTCCBlockLength(), fillMaps(), and numbTriggerTSamples().

◆ numbXtalTSamples_

unsigned int EcalElectronicsMapper::numbXtalTSamples_
private

Definition at line 179 of file EcalElectronicsMapper.h.

Referenced by computeUnfilteredFEBlockLength(), and numbXtalTSamples().

◆ numChannelsInDcc_

const unsigned int EcalElectronicsMapper::numChannelsInDcc_
staticprivate
Initial value:
= {
34, 32, 33, 33, 32, 34, 33, 41, 33,
68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
68, 68, 68, 68, 68, 68, 68, 68, 34, 32, 33, 33, 32, 34, 33, 41, 33}

Definition at line 197 of file EcalElectronicsMapper.h.

Referenced by fillMaps(), and getNumChannelsInDcc().

◆ pathToMapFile_

std::string EcalElectronicsMapper::pathToMapFile_
private

◆ psInput_

EcalPseudoStripInputDigi* EcalElectronicsMapper::psInput_[NUMB_TCC][TCC_EB_NUMBTTS][NUMB_STRIP]
private

◆ scDetIds_

EcalScDetId* EcalElectronicsMapper::scDetIds_[NUMB_SM][NUMB_FE]
private

Definition at line 201 of file EcalElectronicsMapper.h.

Referenced by getSCDetIdPointer().

◆ scEleIds_

EcalElectronicsId* EcalElectronicsMapper::scEleIds_[NUMB_SM][NUMB_FE]
private

◆ smId_

unsigned int EcalElectronicsMapper::smId_
private

◆ srFlags_

std::vector<EcalSrFlag*> EcalElectronicsMapper::srFlags_[NUMB_SM][NUMB_FE]
private

Definition at line 206 of file EcalElectronicsMapper.h.

Referenced by deletePointers(), fillMaps(), and getSrFlagPointer().

◆ srpBlockLength_

unsigned int EcalElectronicsMapper::srpBlockLength_
private

Definition at line 193 of file EcalElectronicsMapper.h.

Referenced by getSRPBlockLength().

◆ tTandPs_

short EcalElectronicsMapper::tTandPs_[NUMB_TCC][5 *EcalTrigTowerDetId::kEBTowersPerSM][2]
private

Definition at line 209 of file EcalElectronicsMapper.h.

Referenced by fillMaps(), getPSInputDigiPointer(), and resetPointers().

◆ ttDetIds_

EcalTrigTowerDetId* EcalElectronicsMapper::ttDetIds_[NUMB_TCC][NUMB_FE]
private

◆ ttEleIds_

EcalElectronicsId* EcalElectronicsMapper::ttEleIds_[NUMB_TCC][NUMB_FE]
private

◆ ttTPIds_

EcalTriggerPrimitiveDigi* EcalElectronicsMapper::ttTPIds_[NUMB_TCC][NUMB_FE]
private

Definition at line 205 of file EcalElectronicsMapper.h.

Referenced by deletePointers(), fillMaps(), getTPPointer(), and resetPointers().

◆ unfilteredFEBlockLength_

unsigned int EcalElectronicsMapper::unfilteredFEBlockLength_
private

Definition at line 191 of file EcalElectronicsMapper.h.

Referenced by getUnfilteredTowerBlockLength(), and resetPointers().

◆ xtalDetIds_

DetId* EcalElectronicsMapper::xtalDetIds_[NUMB_SM][NUMB_FE][NUMB_STRIP][NUMB_XTAL]
private

Definition at line 200 of file EcalElectronicsMapper.h.

Referenced by deletePointers(), fillMaps(), getDetIdPointer(), and resetPointers().