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 9 of file EcalElectronicsMapper.cc.

References resetPointers(), and setupGhostMap().

◆ ~EcalElectronicsMapper()

EcalElectronicsMapper::~EcalElectronicsMapper ( )

Destructor

Definition at line 197 of file EcalElectronicsMapper.cc.

References deletePointers().

Member Function Documentation

◆ computeEBTCCBlockLength()

unsigned int EcalElectronicsMapper::computeEBTCCBlockLength ( )
private

Definition at line 375 of file EcalElectronicsMapper.cc.

References l1trig_cff::nTT, and numbTriggerTSamples_.

Referenced by resetPointers().

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

◆ computeEETCCBlockLength()

unsigned int EcalElectronicsMapper::computeEETCCBlockLength ( )
private

Definition at line 388 of file EcalElectronicsMapper.cc.

Referenced by resetPointers().

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

◆ computeUnfilteredFEBlockLength()

unsigned int EcalElectronicsMapper::computeUnfilteredFEBlockLength ( )
private

Definition at line 371 of file EcalElectronicsMapper.cc.

References numbXtalTSamples_.

Referenced by resetPointers().

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

◆ deletePointers()

void EcalElectronicsMapper::deletePointers ( )

Definition at line 199 of file EcalElectronicsMapper.cc.

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

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

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

References cms::cuda::assert(), EcalElectronicsMapping::dccTowerConstituents(), hcalRecHitTable_cff::detId, 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_, nano_mu_digi_cff::rawId, 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().

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

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

Referenced by printStatusRecords().

401  {
402  //get iterator for SM id
403  std::map<unsigned int, unsigned int>::const_iterator it = myDCCMap_.find(aSMId_);
404 
405  //check if SMid exists and return DCC id
406  if (it != myDCCMap_.end())
407  return it->second;
408 
409  //error return
411  edm::LogError("IncorrectMapping") << "DCC requested for SM id: " << aSMId_ << " not found";
412  }
413  return 0;
414 }
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_, nano_mu_digi_cff::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 416 of file EcalElectronicsMapper.cc.

References myDCCMap_, and DCCDataUnpacker::silentMode_.

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

416  {
417  //get iterator map
418  std::map<unsigned int, unsigned int>::const_iterator it;
419 
420  //try to find SM id for given DCC id
421  for (it = myDCCMap_.begin(); it != myDCCMap_.end(); it++)
422  if (it->second == aDCCId_)
423  return it->first;
424 
425  //error return
427  edm::LogError("IncorrectMapping") << "SM requested DCC id: " << aDCCId_ << " not found";
428  }
429  return 0;
430 }
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 689 of file EcalElectronicsMapper.cc.

References spr::find(), and ghost_.

Referenced by DCCSCBlock::unpackXtalData().

689  {
690  if (ghost_.find(FED) == ghost_.end())
691  return false;
692 
693  if (ghost_[FED].find(CCU) == ghost_[FED].end())
694  return false;
695 
696  if (ghost_[FED][CCU].find(VFE) == ghost_[FED][CCU].end())
697  return false;
698 
699  return true;
700 }
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 315 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().

316  {
317  // in case as non standard set of DCCId:FedId pairs was provided
318  if (orderedFedUnpackList.size() == orderedDCCIdList.size() && !orderedFedUnpackList.empty()) {
319  edm::LogInfo("EcalElectronicsMapper") << "DCCIdList/FedUnpackList lists given. Being loaded.";
320 
321  std::string correspondence("list of pairs DCCId:FedId : ");
322  char onePair[50];
323  for (int v = 0; v < ((int)orderedFedUnpackList.size()); v++) {
324  myDCCMap_[orderedDCCIdList[v]] = orderedFedUnpackList[v];
325 
326  sprintf(onePair, " %d:%d", orderedDCCIdList[v], orderedFedUnpackList[v]);
327  std::string tmp(onePair);
328  correspondence += tmp;
329  }
330  edm::LogInfo("EcalElectronicsMapper") << correspondence;
331 
332  } else { // default set of DCCId:FedId for ECAL
333 
334  edm::LogInfo("EcalElectronicsMapper") << "No input DCCIdList/FedUnpackList lists given for ECAL unpacker"
335  << "(or given with different number of elements). "
336  << " Loading default association DCCIdList:FedUnpackList,"
337  << "i.e. 1:601 ... 53:653, 54:654.";
338 
339  for (unsigned int v = 1; v <= 54; v++) {
340  myDCCMap_[v] = (v + 600);
341  }
342  }
343 
344  return true;
345 }
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 18 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_, nano_mu_digi_cff::strip, TCC_EB_NUMBTTS, ecaldqm::tccId(), tTandPs_, ttDetIds_, ttEleIds_, ttTPIds_, unfilteredFEBlockLength_, and xtalDetIds_.

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

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

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

Referenced by EcalRawToDigi::produce().

253  {
254  bool ret(true);
255 
256  //Update active dcc and associated smId
257  dccId_ = dccId;
258 
259  smId_ = getSMId(dccId_);
260 
261  if (!smId_)
262  ret = false;
263 
264  return ret;
265 }
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 267 of file EcalElectronicsMapper.cc.

References pathToMapFile_.

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

◆ setEcalElectronicsMapping()

void EcalElectronicsMapper::setEcalElectronicsMapping ( const EcalElectronicsMapping m)

◆ setupGhostMap()

void EcalElectronicsMapper::setupGhostMap ( )
private

Definition at line 669 of file EcalElectronicsMapper.cc.

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

Referenced by EcalElectronicsMapper().

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

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

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().