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 39 of file EcalElectronicsMapper.h.

Member Enumeration Documentation

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

Definition at line 155 of file EcalElectronicsMapper.h.

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

Constructor & Destructor Documentation

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

Constructor

Definition at line 8 of file EcalElectronicsMapper.cc.

References resetPointers(), and setupGhostMap().

EcalElectronicsMapper::~EcalElectronicsMapper ( )

Destructor

Definition at line 149 of file EcalElectronicsMapper.cc.

References deletePointers().

149  {
150  deletePointers();
151 }

Member Function Documentation

unsigned int EcalElectronicsMapper::computeEBTCCBlockLength ( )
private

Definition at line 350 of file EcalElectronicsMapper.cc.

References nTT, and numbTriggerTSamples_.

Referenced by resetPointers().

350  {
351 
352  unsigned int nTT=68;
353  unsigned int tf;
354 
355  //TCC block size: header (8 bytes) + 17 words with 4 trigger primitives (17*8bytes)
356  if( (nTT*numbTriggerTSamples_)<4 || (nTT*numbTriggerTSamples_)%4 ) tf=1;
357  else tf=0;
358 
359  return 1 + ((nTT*numbTriggerTSamples_)/4) + tf ;
360 
361 }
#define nTT
Definition: TMEGeom.h:6
unsigned int EcalElectronicsMapper::computeEETCCBlockLength ( )
private

Definition at line 363 of file EcalElectronicsMapper.cc.

Referenced by resetPointers().

363  {
364  //Todo : implement multiple tt samples for the endcap
365  return 9;
366 
367 }
unsigned int EcalElectronicsMapper::computeUnfilteredFEBlockLength ( )
private

Definition at line 343 of file EcalElectronicsMapper.cc.

References numbXtalTSamples_.

Referenced by resetPointers().

343  {
344 
345  return ((numbXtalTSamples_-2)/4+1)*25+1;
346 
347 }
void EcalElectronicsMapper::deletePointers ( )

Definition at line 153 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 ~EcalElectronicsMapper().

153  {
154 
155  //DETETE ARRAYS
156  for(unsigned int sm=0; sm < NUMB_SM; sm++){
157  for(unsigned int fe=0; fe< NUMB_FE; fe++){
158  for(unsigned int strip=0; strip<NUMB_STRIP;strip++){
159  for(unsigned int xtal=0; xtal<NUMB_XTAL;xtal++) delete xtalDetIds_[sm][fe][strip][xtal];
160  }
161 
162  // if(scDetIds_[sm][fe]){
163  // delete scDetIds_[sm][fe];
164  // delete scEleIds_[sm][fe];
165  for(size_t i = 0; i< srFlags_[sm][fe].size(); ++i) delete srFlags_[sm][fe][i];
166  srFlags_[sm][fe].clear();
167 
168  delete scEleIds_[sm][fe];
169 
170  }
171 
172  }
173 
174  // delete trigger electronics Id
175  for (int tccid=0; tccid<NUMB_TCC; tccid++){
176  for (int ttid=0; ttid<TCC_EB_NUMBTTS; ttid++){
177  for (int ps=0; ps<NUMB_STRIP; ps++){
178  delete psInput_[tccid][ttid][ps];
179  }
180  }
181  }
182 
183 
184 
185  for( unsigned int tccid=0; tccid < NUMB_TCC; tccid++){
186  for(unsigned int tpg =0; tpg<NUMB_FE;tpg++){
187  if(ttDetIds_[tccid][tpg]){
188  delete ttDetIds_[tccid][tpg];
189  delete ttTPIds_[tccid][tpg];
190  delete ttEleIds_[tccid][tpg];
191  }
192  }
193  }
194 
195 
196  pathToMapFile_.clear();
197 
198 
199  std::map<unsigned int, std::vector<unsigned int> *>::iterator it;
200  for(it = mapSmIdToTccIds_.begin(); it != mapSmIdToTccIds_.end(); it++ ){ delete (*it).second; }
201 
202  mapSmIdToTccIds_.clear();
203 
204 }
EcalTriggerPrimitiveDigi * ttTPIds_[NUMB_TCC][NUMB_FE]
EcalElectronicsId * ttEleIds_[NUMB_TCC][NUMB_FE]
std::map< unsigned int, std::vector< unsigned int > * > mapSmIdToTccIds_
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]
void EcalElectronicsMapper::fillMaps ( )
private

Definition at line 411 of file EcalElectronicsMapper.cc.

References EcalElectronicsMapping::dccTowerConstituents(), runTauDisplay::eid, EcalElectronicsMapping::getDetId(), EcalElectronicsMapping::getEcalScDetId(), EcalElectronicsMapping::getElectronicsId(), EcalElectronicsMapping::getTriggerElectronicsId(), EcalElectronicsMapping::getTrigTowerDetId(), mps_fire::i, electrons_cff::ids, 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(), EcalTriggerPrimitiveDigi::setSample(), EcalPseudoStripInputDigi::setSize(), EcalTriggerPrimitiveDigi::setSize(), findQualityFiles::size, srFlags_, EcalElectronicsId::stripId(), EcalElectronicsMapping::tccConstituents(), ecaldqm::tccId(), TCCID_SMID_SHIFT_EB, DataFormats::L1THGCal::towerId, groupFilesInBlocks::tt, tTandPs_, ttDetIds_, ttEleIds_, ecaldqm::ttId(), ttTPIds_, xtalDetIds_, and EcalElectronicsId::xtalId().

Referenced by setEcalElectronicsMapping().

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

Definition at line 377 of file EcalElectronicsMapper.cc.

References myDCCMap_, and DCCDataUnpacker::silentMode_.

Referenced by getSRPBlockLength(), and printStatusRecords().

377  {
378  //get iterator for SM id
379  std::map<unsigned int ,unsigned int>::const_iterator it = myDCCMap_.find(aSMId_);
380 
381  //check if SMid exists and return DCC id
382  if(it!= myDCCMap_.end()) return it->second;
383 
384  //error return
386  edm::LogError("IncorrectMapping") << "DCC requested for SM id: " << aSMId_ << " not found";
387  }
388  return 0;
389 }
static std::atomic< bool > silentMode_
std::map< unsigned int, unsigned int > myDCCMap_
const std::map<unsigned int ,unsigned int>& EcalElectronicsMapper::getDCCMap ( ) const
inline

Get methods for DCCId/SMId and map

Definition at line 94 of file EcalElectronicsMapper.h.

References myDCCMap_.

94 { return myDCCMap_; }
std::map< unsigned int, unsigned int > myDCCMap_
std::string EcalElectronicsMapper::getDCCMapFilePath ( ) const
inline

Retrieves current path do the map file

Definition at line 75 of file EcalElectronicsMapper.h.

References makeMapFromVectors(), and pathToMapFile_.

75 { return pathToMapFile_; }
DetId* EcalElectronicsMapper::getDetIdPointer ( unsigned int  feChannel,
unsigned int  strip,
unsigned int  xtal 
)
inline

Definition at line 96 of file EcalElectronicsMapper.h.

References smId_, and xtalDetIds_.

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

96 { return xtalDetIds_[smId_-1][feChannel-1][strip-1][xtal-1];}
DetId * xtalDetIds_[NUMB_SM][NUMB_FE][NUMB_STRIP][NUMB_XTAL]
unsigned int EcalElectronicsMapper::getEBTCCBlockLength ( )
inline

Definition at line 132 of file EcalElectronicsMapper.h.

References ebTccBlockLength_.

Referenced by DCCEBTCCBlock::DCCEBTCCBlock().

132 { return ebTccBlockLength_; }
unsigned int EcalElectronicsMapper::getEETCCBlockLength ( )
inline

Definition at line 134 of file EcalElectronicsMapper.h.

References eeTccBlockLength_.

134 { return eeTccBlockLength_; }
unsigned int EcalElectronicsMapper::getNumChannelsInDcc ( unsigned int  aDCCId)
inline

Definition at line 142 of file EcalElectronicsMapper.h.

References numChannelsInDcc_.

Referenced by DCCFEBlock::unpack().

142 {return numChannelsInDcc_[aDCCId-1];}
static const unsigned int numChannelsInDcc_[NUMB_SM]
EcalPseudoStripInputDigi* EcalElectronicsMapper::getPSInputDigiPointer ( unsigned int  tccId,
unsigned int  towerId,
unsigned int  psId 
)
inline

Definition at line 108 of file EcalElectronicsMapper.h.

References psInput_.

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

108 { return psInput_[tccId-1][towerId-1][psId-1];}
unsigned tccId(DetId const &)
EcalPseudoStripInputDigi * psInput_[NUMB_TCC][TCC_EB_NUMBTTS][NUMB_STRIP]
l1t::HGCalTowerID towerId
Definition: classes.h:36
EcalPseudoStripInputDigi* EcalElectronicsMapper::getPSInputDigiPointer ( unsigned int  tccId,
unsigned int  psCounter 
)
inline

Definition at line 110 of file EcalElectronicsMapper.h.

References getPSInputDigiPointer(), and tTandPs_.

110  {
111  return getPSInputDigiPointer(tccId, tTandPs_[tccId-1][psCounter-1][0],tTandPs_[tccId-1][psCounter-1][1]);}
unsigned tccId(DetId const &)
EcalPseudoStripInputDigi * getPSInputDigiPointer(unsigned int tccId, unsigned int towerId, unsigned int psId)
short tTandPs_[NUMB_TCC][5 *EcalTrigTowerDetId::kEBTowersPerSM][2]
EcalScDetId* EcalElectronicsMapper::getSCDetIdPointer ( unsigned int  smId,
unsigned int  feChannel 
)
inline

Definition at line 104 of file EcalElectronicsMapper.h.

References scDetIds_.

104 { return scDetIds_[smId-1][feChannel-1];}
EcalScDetId * scDetIds_[NUMB_SM][NUMB_FE]
EcalElectronicsId* EcalElectronicsMapper::getSCElectronicsPointer ( unsigned int  smId,
unsigned int  feChannel 
)
inline

Definition at line 106 of file EcalElectronicsMapper.h.

References scEleIds_.

Referenced by DCCSCBlock::fillEcalElectronicsError().

106 { return scEleIds_[smId-1][feChannel-1];}
EcalElectronicsId * scEleIds_[NUMB_SM][NUMB_FE]
unsigned int EcalElectronicsMapper::getSMId ( unsigned int  aDCCId) const

Definition at line 392 of file EcalElectronicsMapper.cc.

References myDCCMap_, and DCCDataUnpacker::silentMode_.

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

392  {
393  //get iterator map
394  std::map<unsigned int ,unsigned int>::const_iterator it;
395 
396  //try to find SM id for given DCC id
397  for(it = myDCCMap_.begin(); it != myDCCMap_.end(); it++)
398  if(it->second == aDCCId_)
399  return it->first;
400 
401  //error return
403  edm::LogError("IncorrectMapping") << "SM requested DCC id: " << aDCCId_ << " not found";
404  }
405  return 0;
406 }
static std::atomic< bool > silentMode_
std::map< unsigned int, unsigned int > myDCCMap_
std::vector<EcalSrFlag*> EcalElectronicsMapper::getSrFlagPointer ( unsigned int  feChannel)
inline

Definition at line 118 of file EcalElectronicsMapper.h.

References smId_, and srFlags_.

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

118 { return srFlags_[smId_-1][feChannel-1]; }
std::vector< EcalSrFlag * > srFlags_[NUMB_SM][NUMB_FE]
unsigned int EcalElectronicsMapper::getSRPBlockLength ( )
inline

Definition at line 136 of file EcalElectronicsMapper.h.

References getDCCId(), getSMId(), and srpBlockLength_.

136 { return srpBlockLength_; }
std::vector<unsigned int>* EcalElectronicsMapper::getTccs ( unsigned int  smId)
inline

Definition at line 120 of file EcalElectronicsMapper.h.

References mapSmIdToTccIds_.

Referenced by DCCEETCCBlock::checkTccIdAndNumbTTs().

120 { return mapSmIdToTccIds_[smId];}
std::map< unsigned int, std::vector< unsigned int > * > mapSmIdToTccIds_
EcalTriggerPrimitiveDigi* EcalElectronicsMapper::getTPPointer ( unsigned int  tccId,
unsigned int  tower 
)
inline

Definition at line 102 of file EcalElectronicsMapper.h.

References ttTPIds_.

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

102 { return ttTPIds_[tccId-1][tower-1];}
EcalTriggerPrimitiveDigi * ttTPIds_[NUMB_TCC][NUMB_FE]
unsigned tccId(DetId const &)
EcalTrigTowerDetId* EcalElectronicsMapper::getTTDetIdPointer ( unsigned int  tccId,
unsigned int  tower 
)
inline

Definition at line 98 of file EcalElectronicsMapper.h.

References ttDetIds_.

98 { return ttDetIds_[tccId-1][tower-1];}
unsigned tccId(DetId const &)
EcalTrigTowerDetId * ttDetIds_[NUMB_TCC][NUMB_FE]
EcalElectronicsId* EcalElectronicsMapper::getTTEleIdPointer ( unsigned int  tccId,
unsigned int  tower 
)
inline

Definition at line 100 of file EcalElectronicsMapper.h.

References ttEleIds_.

Referenced by DCCTowerBlock::fillEcalElectronicsError().

100 { return ttEleIds_[tccId-1][tower-1];}
EcalElectronicsId * ttEleIds_[NUMB_TCC][NUMB_FE]
unsigned tccId(DetId const &)
unsigned int EcalElectronicsMapper::getUnfilteredTowerBlockLength ( )
inline

Definition at line 130 of file EcalElectronicsMapper.h.

References unfilteredFEBlockLength_.

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

130 { return unfilteredFEBlockLength_; }
bool EcalElectronicsMapper::isGhost ( const int  FED,
const int  CCU,
const int  VFE 
)

Definition at line 730 of file EcalElectronicsMapper.cc.

References spr::find(), ghost_, NUMB_SM, and numChannelsInDcc_.

Referenced by DCCSCBlock::unpackXtalData().

731 {
732  if (ghost_.find(FED) == ghost_.end())
733  return false;
734 
735  if (ghost_[FED].find(CCU) == ghost_[FED].end())
736  return false;
737 
738  if (ghost_[FED][CCU].find(VFE) == ghost_[FED][CCU].end())
739  return false;
740 
741  return true;
742 }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
std::map< int, std::map< int, std::map< int, bool > > > ghost_
bool EcalElectronicsMapper::isTCCExternal ( unsigned int  TCCId)
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 279 of file EcalElectronicsMapper.cc.

References createfilelist::int, myDCCMap_, AlCaHLTBitMon_QueryRunRegistry::string, tmp, and findQualityFiles::v.

Referenced by getDCCMapFilePath().

281 {
282 
283  // in case as non standard set of DCCId:FedId pairs was provided
284  if ( orderedFedUnpackList.size() == orderedDCCIdList.size() &&
285  !orderedFedUnpackList.empty())
286  {
287  edm::LogInfo("EcalElectronicsMapper") << "DCCIdList/FedUnpackList lists given. Being loaded.";
288 
289  std::string correspondence("list of pairs DCCId:FedId : ");
290  char onePair[50];
291  for (int v=0; v< ((int)orderedFedUnpackList.size()); v++) {
292  myDCCMap_[ orderedDCCIdList[v] ] = orderedFedUnpackList[v] ;
293 
294  sprintf( onePair, " %d:%d", orderedDCCIdList[v], orderedFedUnpackList[v]);
295  std::string tmp(onePair);
296  correspondence += tmp;
297  }
298  edm::LogInfo("EcalElectronicsMapper") << correspondence;
299 
300  }
301  else
302  { // default set of DCCId:FedId for ECAL
303 
304  edm::LogInfo("EcalElectronicsMapper") << "No input DCCIdList/FedUnpackList lists given for ECAL unpacker"
305  << "(or given with different number of elements). "
306  << " Loading default association DCCIdList:FedUnpackList,"
307  << "i.e. 1:601 ... 53:653, 54:654.";
308 
309  for (unsigned int v=1; v<=54; v++) {
310  myDCCMap_[ v ] = (v+600) ; }
311  }
312 
313  return true;
314 }
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
std::map< unsigned int, unsigned int > myDCCMap_
const EcalElectronicsMapping* EcalElectronicsMapper::mapping ( )
inline
unsigned int EcalElectronicsMapper::numbTriggerTSamples ( )
inline

Definition at line 128 of file EcalElectronicsMapper.h.

References numbTriggerTSamples_.

128 { return numbTriggerTSamples_; }
unsigned int EcalElectronicsMapper::numbXtalTSamples ( )
inline
void EcalElectronicsMapper::resetPointers ( )

Definition at line 18 of file EcalElectronicsMapper.cc.

References computeEBTCCBlockLength(), computeEETCCBlockLength(), computeUnfilteredFEBlockLength(), ebTccBlockLength_, eeTccBlockLength_, electrons_cff::ids, 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().

18  {
19 
20  // Reset Arrays
21  for(unsigned int sm=0; sm < NUMB_SM; sm++){
22  for(unsigned int fe=0; fe< NUMB_FE; fe++){
23 
24  for(unsigned int strip=0; strip<NUMB_STRIP;strip++){
25  for(unsigned int xtal=0; xtal<NUMB_XTAL;xtal++){
26 
27  //Reset DFrames and xtalDetIds
28  xtalDetIds_[sm][fe][strip][xtal]=nullptr;
29  }
30  }
31 
32  //Reset SC Det Ids
33  //scDetIds_[sm][fe]=0;
34  scEleIds_[sm][fe]=nullptr;
35  //srFlags_[sm][fe]=0;
36  }
37  }
38 
39 
40  //Reset TT det Ids
41  for( unsigned int tccid=0; tccid < NUMB_TCC; tccid++){
42  for(unsigned int tpg =0; tpg<NUMB_FE;tpg++){
43  ttDetIds_[tccid][tpg]=nullptr;
44  ttTPIds_[tccid][tpg]=nullptr;
45  ttEleIds_[tccid][tpg]=nullptr;
46  }
47  }
48 
49  // reset trigger electronics Id
50  for (int tccid=0; tccid<NUMB_TCC; tccid++){
51  for (int ttid=0; ttid<TCC_EB_NUMBTTS; ttid++){
52  for (int ps=0; ps<NUMB_STRIP; ps++){
53  psInput_[tccid][ttid][ps]=nullptr;
54  }}}
55 
56  // initialize TCC maps
58  for (int psCounter=0; psCounter<EcalTrigTowerDetId::kEBTowersPerSM*5; psCounter++) {
59  for (int u=0; u<2; u++){
60  tTandPs_[tccId][psCounter][u]=-1;
61  } } }
62 
63 
64 
65  //Fill map sm id to tcc ids
66  std::vector<unsigned int> * ids;
67  ids = new std::vector<unsigned int>;
68  ids->push_back(1); ids->push_back(18);ids->push_back(19);ids->push_back(36);
70 
71  ids = new std::vector<unsigned int>;
72  ids->push_back(2); ids->push_back(3);ids->push_back(20);ids->push_back(21);
74 
75  ids = new std::vector<unsigned int>;
76  ids->push_back(4); ids->push_back(5);ids->push_back(22);ids->push_back(23);
78 
79  ids = new std::vector<unsigned int>;
80  ids->push_back(6); ids->push_back(7);ids->push_back(24);ids->push_back(25);
82 
83  ids = new std::vector<unsigned int>;
84  ids->push_back(8); ids->push_back(9);ids->push_back(26);ids->push_back(27);
86 
87  ids = new std::vector<unsigned int>;
88  ids->push_back(10); ids->push_back(11);ids->push_back(28);ids->push_back(29);
90 
91  ids = new std::vector<unsigned int>;
92  ids->push_back(12); ids->push_back(13);ids->push_back(30);ids->push_back(31);
94 
95  ids = new std::vector<unsigned int>;
96  ids->push_back(14); ids->push_back(15);ids->push_back(32);ids->push_back(33);
98 
99  ids = new std::vector<unsigned int>;
100  ids->push_back(16); ids->push_back(17);ids->push_back(34);ids->push_back(35);
101  mapSmIdToTccIds_[9]= ids;
102 
103  ids = new std::vector<unsigned int>;
104  ids->push_back(73); ids->push_back(90);ids->push_back(91);ids->push_back(108);
105  mapSmIdToTccIds_[46]= ids;
106 
107  ids = new std::vector<unsigned int>;
108  ids->push_back(74); ids->push_back(75);ids->push_back(92);ids->push_back(93);
109  mapSmIdToTccIds_[47]= ids;
110 
111  ids = new std::vector<unsigned int>;
112  ids->push_back(76); ids->push_back(77);ids->push_back(94);ids->push_back(95);
113  mapSmIdToTccIds_[48]= ids;
114 
115  ids = new std::vector<unsigned int>;
116  ids->push_back(78); ids->push_back(79);ids->push_back(96);ids->push_back(97);
117  mapSmIdToTccIds_[49]= ids;
118 
119  ids = new std::vector<unsigned int>;
120  ids->push_back(80); ids->push_back(81);ids->push_back(98);ids->push_back(99);
121  mapSmIdToTccIds_[50]= ids;
122 
123  ids = new std::vector<unsigned int>;
124  ids->push_back(82); ids->push_back(83);ids->push_back(100);ids->push_back(101);
125  mapSmIdToTccIds_[51]= ids;
126 
127  ids = new std::vector<unsigned int>;
128  ids->push_back(84); ids->push_back(85);ids->push_back(102);ids->push_back(103);
129  mapSmIdToTccIds_[52]= ids;
130 
131  ids = new std::vector<unsigned int>;
132  ids->push_back(86); ids->push_back(87);ids->push_back(104);ids->push_back(105);
133  mapSmIdToTccIds_[53]= ids;
134 
135  ids = new std::vector<unsigned int>;
136  ids->push_back(88); ids->push_back(89);ids->push_back(106);ids->push_back(107);
137  mapSmIdToTccIds_[54]= ids;
138 
139 
140  //Compute data block sizes
144 
145 
146 }
EcalTriggerPrimitiveDigi * ttTPIds_[NUMB_TCC][NUMB_FE]
EcalElectronicsId * ttEleIds_[NUMB_TCC][NUMB_FE]
unsigned tccId(DetId const &)
std::map< unsigned int, std::vector< unsigned int > * > mapSmIdToTccIds_
EcalPseudoStripInputDigi * psInput_[NUMB_TCC][TCC_EB_NUMBTTS][NUMB_STRIP]
unsigned int computeEETCCBlockLength()
EcalTrigTowerDetId * ttDetIds_[NUMB_TCC][NUMB_FE]
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]
bool EcalElectronicsMapper::setActiveDCC ( unsigned int  dccId)

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

Definition at line 211 of file EcalElectronicsMapper.cc.

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

Referenced by EcalRawToDigi::produce().

211  {
212 
213  bool ret(true);
214 
215  //Update active dcc and associated smId
216  dccId_ = dccId;
217 
218  smId_ = getSMId(dccId_);
219 
220  if(!smId_) ret = false;
221 
222  return ret;
223 
224  }
unsigned int getSMId(unsigned int aDCCId) const
unsigned dccId(DetId const &)
bool EcalElectronicsMapper::setDCCMapFilePath ( std::string  aPath_)

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

Definition at line 227 of file EcalElectronicsMapper.cc.

References pathToMapFile_.

227  {
228 
229 
230  //try to open a dccMapFile in the given path
231  std::ifstream dccMapFile_(aPath_.c_str());
232 
233  //if not successful return false
234  if(!dccMapFile_.is_open()) return false;
235 
236  //else close file and accept given path
237  dccMapFile_.close();
238  pathToMapFile_ = aPath_;
239 
240  return true;
241 }
void EcalElectronicsMapper::setEcalElectronicsMapping ( const EcalElectronicsMapping m)

Definition at line 206 of file EcalElectronicsMapper.cc.

References fillMaps(), funct::m, and mappingBuilder_.

206  {
208  fillMaps();
209 }
const EcalElectronicsMapping * mappingBuilder_
void EcalElectronicsMapper::setupGhostMap ( )
private

Definition at line 672 of file EcalElectronicsMapper.cc.

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

Referenced by EcalElectronicsMapper().

673 {
674  // number of 'ghost' VFEs
675  const int n = 44;
676 
677  // here is a list of all 'ghost' VFEs
678  // in format {FED, CCU, VFE}
679  const struct {int FED, CCU, VFE;} v[n] = {
680  {601, 10, 5},
681  {601, 34, 3},
682  {601, 34, 4},
683  {601, 34, 5},
684  {602, 32, 5},
685  {603, 12, 5},
686  {603, 30, 5},
687  {604, 12, 5},
688  {604, 30, 5},
689  {605, 32, 5},
690  {606, 10, 5},
691  {606, 34, 3},
692  {606, 34, 4},
693  {606, 34, 5},
694  {608, 27, 3},
695  {608, 27, 4},
696  {608, 27, 5},
697  {608, 3, 3},
698  {608, 3, 4},
699  {608, 3, 5},
700  {608, 30, 5},
701  {608, 6, 5},
702  {646, 10, 5},
703  {646, 34, 3},
704  {646, 34, 4},
705  {646, 34, 5},
706  {647, 32, 5},
707  {648, 12, 5},
708  {648, 30, 5},
709  {649, 12, 5},
710  {649, 30, 5},
711  {650, 32, 5},
712  {651, 10, 5},
713  {651, 34, 3},
714  {651, 34, 4},
715  {651, 34, 5},
716  {653, 27, 3},
717  {653, 27, 4},
718  {653, 27, 5},
719  {653, 3, 3},
720  {653, 3, 4},
721  {653, 3, 5},
722  {653, 30, 5},
723  {653, 6, 5}
724  };
725 
726  for (int i = 0; i < n; ++i)
727  ghost_[v[i].FED][v[i].CCU][v[i].VFE] = true;
728 }
std::map< int, std::map< int, std::map< int, bool > > > ghost_

Friends And Related Function Documentation

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

Print current map

Definition at line 317 of file EcalElectronicsMapper.cc.

Referenced by mapping().

317  {
318  //print class information
319  o << "---------------------------------------------------------";
320 
321  if(aMapper_.pathToMapFile_.empty()){
322  o << "No correct input for DCC map has been given yet...";
323  }
324  else{
325  o << "DCC Map (Map file: " << aMapper_.pathToMapFile_ << " )" << "SM id\t\tDCCid ";
326 
327  //get DCC map and iterator
328  std::map<unsigned int ,unsigned int > aMap;
329  aMap=aMapper_.myDCCMap_;
330  std::map<unsigned int ,unsigned int >::iterator iter;
331 
332  //print info contained in map
333  for(iter = aMap.begin(); iter != aMap.end(); iter++)
334  o << iter->first << "\t\t" << iter->second;
335  }
336 
337  o << "---------------------------------------------------------";
338  return o;
339 }

Member Data Documentation

unsigned int EcalElectronicsMapper::dccId_
private

Definition at line 188 of file EcalElectronicsMapper.h.

Referenced by getActiveDCC(), and setActiveDCC().

unsigned int EcalElectronicsMapper::ebTccBlockLength_
private

Definition at line 196 of file EcalElectronicsMapper.h.

Referenced by getEBTCCBlockLength(), and resetPointers().

unsigned int EcalElectronicsMapper::eeTccBlockLength_
private

Definition at line 196 of file EcalElectronicsMapper.h.

Referenced by getEETCCBlockLength(), and resetPointers().

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

Definition at line 224 of file EcalElectronicsMapper.h.

Referenced by isGhost(), and setupGhostMap().

const EcalElectronicsMapping* EcalElectronicsMapper::mappingBuilder_
private

Definition at line 213 of file EcalElectronicsMapper.h.

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

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

Definition at line 186 of file EcalElectronicsMapper.h.

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

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

Definition at line 184 of file EcalElectronicsMapper.h.

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

unsigned int EcalElectronicsMapper::numbTriggerTSamples_
private

Definition at line 182 of file EcalElectronicsMapper.h.

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

unsigned int EcalElectronicsMapper::numbXtalTSamples_
private

Definition at line 180 of file EcalElectronicsMapper.h.

Referenced by computeUnfilteredFEBlockLength(), and numbXtalTSamples().

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 198 of file EcalElectronicsMapper.h.

Referenced by fillMaps(), getNumChannelsInDcc(), and isGhost().

std::string EcalElectronicsMapper::pathToMapFile_
private
EcalPseudoStripInputDigi* EcalElectronicsMapper::psInput_[NUMB_TCC][TCC_EB_NUMBTTS][NUMB_STRIP]
private
EcalScDetId* EcalElectronicsMapper::scDetIds_[NUMB_SM][NUMB_FE]
private

Definition at line 203 of file EcalElectronicsMapper.h.

Referenced by getSCDetIdPointer().

EcalElectronicsId* EcalElectronicsMapper::scEleIds_[NUMB_SM][NUMB_FE]
private
unsigned int EcalElectronicsMapper::smId_
private
std::vector<EcalSrFlag*> EcalElectronicsMapper::srFlags_[NUMB_SM][NUMB_FE]
private

Definition at line 208 of file EcalElectronicsMapper.h.

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

unsigned int EcalElectronicsMapper::srpBlockLength_
private

Definition at line 194 of file EcalElectronicsMapper.h.

Referenced by getSRPBlockLength().

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

Definition at line 211 of file EcalElectronicsMapper.h.

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

EcalTrigTowerDetId* EcalElectronicsMapper::ttDetIds_[NUMB_TCC][NUMB_FE]
private
EcalElectronicsId* EcalElectronicsMapper::ttEleIds_[NUMB_TCC][NUMB_FE]
private
EcalTriggerPrimitiveDigi* EcalElectronicsMapper::ttTPIds_[NUMB_TCC][NUMB_FE]
private

Definition at line 207 of file EcalElectronicsMapper.h.

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

unsigned int EcalElectronicsMapper::unfilteredFEBlockLength_
private

Definition at line 192 of file EcalElectronicsMapper.h.

Referenced by getUnfilteredTowerBlockLength(), and resetPointers().

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

Definition at line 202 of file EcalElectronicsMapper.h.

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