CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes
HGCalTriggerGeometryV9Imp1 Class Reference
Inheritance diagram for HGCalTriggerGeometryV9Imp1:
HGCalTriggerGeometryBase

Public Member Functions

bool disconnectedModule (const unsigned) const final
 
geom_set getCellsFromModule (const unsigned) const final
 
geom_set getCellsFromTriggerCell (const unsigned) const final
 
unsigned getLinksInModule (const unsigned module_id) const final
 
unsigned getModuleFromCell (const unsigned) const final
 
unsigned getModuleFromTriggerCell (const unsigned) const final
 
GlobalPoint getModulePosition (const unsigned) const final
 
unsigned getModuleSize (const unsigned module_id) const final
 
geom_set getNeighborsFromTriggerCell (const unsigned) const final
 
geom_ordered_set getOrderedCellsFromModule (const unsigned) const final
 
geom_ordered_set getOrderedTriggerCellsFromModule (const unsigned) const final
 
unsigned getTriggerCellFromCell (const unsigned) const final
 
GlobalPoint getTriggerCellPosition (const unsigned) const final
 
geom_set getTriggerCellsFromModule (const unsigned) const final
 
 HGCalTriggerGeometryV9Imp1 (const edm::ParameterSet &conf)
 
void initialize (const CaloGeometry *) final
 
void initialize (const HGCalGeometry *, const HGCalGeometry *, const HGCalGeometry *) final
 
void initialize (const HGCalGeometry *, const HGCalGeometry *, const HGCalGeometry *, const HGCalGeometry *) final
 
unsigned lastTriggerLayer () const final
 
void reset () final
 
unsigned triggerLayer (const unsigned) const final
 
bool validCell (const unsigned) const final
 
bool validTriggerCell (const unsigned) const final
 
- Public Member Functions inherited from HGCalTriggerGeometryBase
const HcalGeometrybhGeometry () const
 
const HcalTopologybhTopology () const
 
const CaloGeometrycaloGeometry () const
 
const HGCalGeometryeeGeometry () const
 
const HGCalTopologyeeTopology () const
 
const HGCalGeometryfhGeometry () const
 
const HGCalTopologyfhTopology () const
 
 HGCalTriggerGeometryBase (const edm::ParameterSet &conf)
 
const HGCalGeometryhscGeometry () const
 
const HGCalTopologyhscTopology () const
 
const HGCalGeometryhsiGeometry () const
 
const HGCalTopologyhsiTopology () const
 
bool isV9Geometry () const
 
bool isWithNoseGeometry () const
 
const std::string & name () const
 
const HGCalGeometrynoseGeometry () const
 
const HGCalTopologynoseTopology () const
 
void setWithNoseGeometry (const bool isNose)
 
virtual ~HGCalTriggerGeometryBase ()
 

Private Types

typedef std::unordered_map< int, std::set< std::pair< short, short > > > neighbor_map
 

Private Member Functions

int detIdWaferType (unsigned det, unsigned layer, short waferU, short waferV) const
 
void fillInvalidTriggerCells ()
 
void fillMaps ()
 
void fillNeighborMap (const edm::FileInPath &, neighbor_map &, bool)
 
unsigned layerWithOffset (unsigned) const
 
unsigned packCellId (unsigned type, unsigned cell) const
 
unsigned packCellId (unsigned type, unsigned cellU, unsigned cellV) const
 
unsigned packIetaIphi (unsigned ieta, unsigned iphi) const
 
unsigned packLayerWaferId (unsigned layer, unsigned wafer) const
 
unsigned packTriggerCell (unsigned, unsigned) const
 
unsigned packTriggerCellWithType (unsigned, unsigned, unsigned) const
 
unsigned packWaferCellId (unsigned subdet, unsigned wafer, unsigned cell) const
 
unsigned packWaferId (int waferU, int waferV) const
 
void unpackCellId (unsigned cell, unsigned &cellU, unsigned &cellV) const
 
void unpackIetaIphi (unsigned ieta_iphi, unsigned &ieta, unsigned &iphi) const
 
void unpackLayerWaferId (unsigned layer_wafer, unsigned &layer, unsigned &wafer) const
 
void unpackWaferCellId (unsigned wafer_cell, unsigned &wafer, unsigned &cell) const
 
void unpackWaferId (unsigned wafer, int &waferU, int &waferV) const
 
bool validCellId (unsigned det, unsigned cell_id) const
 
bool validTriggerCellFromCells (const unsigned) const
 

Private Attributes

std::unordered_map< unsigned, unsigned > cells_to_trigger_cells_
 
std::unordered_map< unsigned, unsigned > cells_to_trigger_cells_sci_
 
std::unordered_set< unsigned > disconnected_layers_
 
std::unordered_set< unsigned > disconnected_modules_
 
unsigned heOffset_ = 0
 
unsigned hSc_links_per_module_ = 1
 
unsigned hSc_wafers_per_module_ = 3
 
std::unordered_set< unsigned > invalid_triggercells_
 
edm::FileInPath l1tCellNeighborsMapping_
 
edm::FileInPath l1tCellNeighborsSciMapping_
 
edm::FileInPath l1tCellsMapping_
 
edm::FileInPath l1tCellsSciMapping_
 
edm::FileInPath l1tLinksMapping_
 
edm::FileInPath l1tModulesMapping_
 
edm::FileInPath l1tWafersMapping_
 
unsigned last_trigger_layer_ = 0
 
std::unordered_map< unsigned, unsigned > links_per_module_
 
std::unordered_multimap< unsigned, unsigned > module_to_wafers_
 
std::unordered_map< unsigned, unsigned short > number_trigger_cells_in_wafers_
 
std::unordered_map< unsigned, unsigned short > number_trigger_cells_in_wafers_sci_
 
unsigned totalLayers_ = 0
 
neighbor_map trigger_cell_neighbors_
 
neighbor_map trigger_cell_neighbors_sci_
 
std::unordered_multimap< unsigned, unsigned > trigger_cells_to_cells_
 
std::unordered_multimap< unsigned, unsigned > trigger_cells_to_cells_sci_
 
std::vector< unsigned > trigger_layers_
 
std::unordered_map< unsigned, unsigned > wafer_to_module_
 
std::unordered_map< unsigned, unsigned > wafers_old_to_wafers_
 
std::unordered_map< unsigned, unsigned > wafers_to_wafers_old_
 

Additional Inherited Members

- Public Types inherited from HGCalTriggerGeometryBase
typedef std::unordered_map< unsigned, unsigned > geom_map
 
typedef std::set< unsigned > geom_ordered_set
 
typedef std::unordered_set< unsigned > geom_set
 
- Protected Member Functions inherited from HGCalTriggerGeometryBase
void setCaloGeometry (const CaloGeometry *geom)
 
void setEEGeometry (const HGCalGeometry *geom)
 
void setHScGeometry (const HGCalGeometry *geom)
 
void setHSiGeometry (const HGCalGeometry *geom)
 
void setNoseGeometry (const HGCalGeometry *geom)
 

Detailed Description

Definition at line 13 of file HGCalTriggerGeometryV9Imp1.cc.

Member Typedef Documentation

◆ neighbor_map

typedef std::unordered_map<int, std::set<std::pair<short, short> > > HGCalTriggerGeometryV9Imp1::neighbor_map
private

Definition at line 80 of file HGCalTriggerGeometryV9Imp1.cc.

Constructor & Destructor Documentation

◆ HGCalTriggerGeometryV9Imp1()

HGCalTriggerGeometryV9Imp1::HGCalTriggerGeometryV9Imp1 ( const edm::ParameterSet conf)

Definition at line 118 of file HGCalTriggerGeometryV9Imp1.cc.

119  : HGCalTriggerGeometryBase(conf),
120  l1tCellsMapping_(conf.getParameter<edm::FileInPath>("L1TCellsMapping")),
121  l1tCellsSciMapping_(conf.getParameter<edm::FileInPath>("L1TCellsSciMapping")),
122  l1tWafersMapping_(conf.getParameter<edm::FileInPath>("L1TWafersMapping")),
123  l1tModulesMapping_(conf.getParameter<edm::FileInPath>("L1TModulesMapping")),
124  l1tLinksMapping_(conf.getParameter<edm::FileInPath>("L1TLinksMapping")),
125  l1tCellNeighborsMapping_(conf.getParameter<edm::FileInPath>("L1TCellNeighborsMapping")),
126  l1tCellNeighborsSciMapping_(conf.getParameter<edm::FileInPath>("L1TCellNeighborsSciMapping")),
127  hSc_links_per_module_(conf.getParameter<unsigned>("ScintillatorLinksPerModule")),
128  hSc_wafers_per_module_(conf.getParameter<unsigned>("ScintillatorWafersPerModule")) {
129  std::vector<unsigned> tmp_vector = conf.getParameter<std::vector<unsigned>>("DisconnectedModules");
130  std::move(tmp_vector.begin(), tmp_vector.end(), std::inserter(disconnected_modules_, disconnected_modules_.end()));
131  tmp_vector = conf.getParameter<std::vector<unsigned>>("DisconnectedLayers");
132  std::move(tmp_vector.begin(), tmp_vector.end(), std::inserter(disconnected_layers_, disconnected_layers_.end()));
133 }

References disconnected_layers_, disconnected_modules_, edm::ParameterSet::getParameter(), and eostools::move().

Member Function Documentation

◆ detIdWaferType()

int HGCalTriggerGeometryV9Imp1::detIdWaferType ( unsigned  det,
unsigned  layer,
short  waferU,
short  waferV 
) const
private

Definition at line 999 of file HGCalTriggerGeometryV9Imp1.cc.

999  {
1000  int wafer_type = 0;
1001  switch (det) {
1002  case DetId::HGCalEE:
1003  wafer_type = eeTopology().dddConstants().getTypeHex(layer, waferU, waferV);
1004  break;
1005  case DetId::HGCalHSi:
1006  wafer_type = hsiTopology().dddConstants().getTypeHex(layer, waferU, waferV);
1007  break;
1008  default:
1009  break;
1010  };
1011  return wafer_type;
1012 }

References HGCalTopology::dddConstants(), HGCalTriggerGeometryBase::eeTopology(), HGCalDDDConstants::getTypeHex(), DetId::HGCalEE, DetId::HGCalHSi, HGCalTriggerGeometryBase::hsiTopology(), phase1PixelTopology::layer, HGCalWaferIndex::waferU(), and HGCalWaferIndex::waferV().

Referenced by fillInvalidTriggerCells(), getCellsFromTriggerCell(), getOrderedTriggerCellsFromModule(), and getTriggerCellsFromModule().

◆ disconnectedModule()

bool HGCalTriggerGeometryV9Imp1::disconnectedModule ( const unsigned  module_id) const
finalvirtual

Implements HGCalTriggerGeometryBase.

Definition at line 930 of file HGCalTriggerGeometryV9Imp1.cc.

930  {
931  bool disconnected = false;
932  if (disconnected_modules_.find(HGCalDetId(module_id).wafer()) != disconnected_modules_.end())
933  disconnected = true;
934  if (disconnected_layers_.find(layerWithOffset(module_id)) != disconnected_layers_.end())
935  disconnected = true;
936  return disconnected;
937 }

References disconnected_layers_, disconnected_modules_, and layerWithOffset().

◆ fillInvalidTriggerCells()

void HGCalTriggerGeometryV9Imp1::fillInvalidTriggerCells ( )
private

Definition at line 751 of file HGCalTriggerGeometryV9Imp1.cc.

751  {
752  unsigned n_layers_ee = eeTopology().dddConstants().layers(true);
753  for (unsigned layer = 1; layer <= n_layers_ee; layer++) {
754  for (const auto& waferuv_wafer : wafers_to_wafers_old_) {
755  int waferu = 0;
756  int waferv = 0;
757  unpackWaferId(waferuv_wafer.first, waferu, waferv);
758  unsigned waferee_type = detIdWaferType(DetId::HGCalEE, layer, waferu, waferv);
759  unsigned waferfh_type = detIdWaferType(DetId::HGCalHSi, layer, waferu, waferv);
760  unsigned trigger_wafer = waferuv_wafer.second;
761  // loop on the trigger cells in each wafer
762  for (int trigger_cell = 0; trigger_cell < number_trigger_cells_in_wafers_.at(waferee_type); trigger_cell++) {
763  for (int zside : {-1, 1}) {
764  HGCalDetId trigger_cell_id(ForwardSubdetector::HGCEE, zside, layer, 1, trigger_wafer, trigger_cell);
765  if (!validTriggerCellFromCells(trigger_cell_id))
766  invalid_triggercells_.emplace(trigger_cell_id);
767  for (unsigned neighbor : getNeighborsFromTriggerCell(trigger_cell_id)) {
768  auto wafer_itr = wafers_old_to_wafers_.find(HGCalDetId(neighbor).wafer());
769  if (wafer_itr == wafers_old_to_wafers_.end())
770  invalid_triggercells_.emplace(neighbor);
771  else if (!validTriggerCellFromCells(neighbor))
772  invalid_triggercells_.emplace(neighbor);
773  }
774  }
775  }
776  for (int trigger_cell = 0; trigger_cell < number_trigger_cells_in_wafers_.at(waferfh_type); trigger_cell++) {
777  for (int zside : {-1, 1}) {
778  HGCalDetId trigger_cell_id(ForwardSubdetector::HGCHEF, zside, layer, 1, trigger_wafer, trigger_cell);
779  if (!validTriggerCellFromCells(trigger_cell_id))
780  invalid_triggercells_.emplace(trigger_cell_id);
781  for (unsigned neighbor : getNeighborsFromTriggerCell(trigger_cell_id)) {
782  auto wafer_itr = wafers_old_to_wafers_.find(HGCalDetId(neighbor).wafer());
783  if (wafer_itr == wafers_old_to_wafers_.end())
784  invalid_triggercells_.emplace(neighbor);
785  else if (!validTriggerCellFromCells(neighbor))
786  invalid_triggercells_.emplace(neighbor);
787  }
788  }
789  }
790  }
791  }
792  unsigned n_layers_hsc = hscTopology().dddConstants().layers(true);
793  unsigned first_layer_hsc = hscTopology().dddConstants().firstLayer();
794  for (unsigned layer = first_layer_hsc; layer <= first_layer_hsc + n_layers_hsc; layer++) {
796  for (const auto& module_ncells : number_trigger_cells_in_wafers_sci_) {
797  unsigned trigger_wafer = module_ncells.first;
798  // loop on the trigger cells in each wafer
799  for (int trigger_cell = 1; trigger_cell < module_ncells.second; trigger_cell++) {
800  for (int zside : {-1, 1}) {
801  HGCalDetId trigger_cell_id(ForwardSubdetector::HGCHEB, zside, layer, type, trigger_wafer, trigger_cell);
802  if (!validTriggerCellFromCells(trigger_cell_id))
803  invalid_triggercells_.emplace(trigger_cell_id);
804  for (unsigned neighbor : getNeighborsFromTriggerCell(trigger_cell_id)) {
805  if (!validTriggerCellFromCells(neighbor))
806  invalid_triggercells_.emplace(neighbor);
807  }
808  }
809  }
810  }
811  }
812 }

References HGCalTopology::dddConstants(), detIdWaferType(), HGCalTriggerGeometryBase::eeTopology(), HGCalDDDConstants::firstLayer(), getNeighborsFromTriggerCell(), HGCalDDDConstants::getTypeTrap(), DetId::HGCalEE, DetId::HGCalHSi, HGCEE, HGCHEB, HGCHEF, HGCalTriggerGeometryBase::hscTopology(), invalid_triggercells_, phase1PixelTopology::layer, HGCalDDDConstants::layers(), number_trigger_cells_in_wafers_, number_trigger_cells_in_wafers_sci_, unpackWaferId(), validTriggerCellFromCells(), wafers_old_to_wafers_, wafers_to_wafers_old_, and ecaldqm::zside().

Referenced by initialize().

◆ fillMaps()

void HGCalTriggerGeometryV9Imp1::fillMaps ( )
private

Definition at line 573 of file HGCalTriggerGeometryV9Imp1.cc.

573  {
574  //
575  // read module mapping file
576  std::ifstream l1tModulesMappingStream(l1tModulesMapping_.fullPath());
577  if (!l1tModulesMappingStream.is_open()) {
578  throw cms::Exception("MissingDataFile") << "Cannot open HGCalTriggerGeometry L1TModulesMapping file\n";
579  }
580  short trigger_wafer = 0;
581  short module = 0;
582  short layer = 0;
583  for (; l1tModulesMappingStream >> layer >> trigger_wafer >> module;) {
584  wafer_to_module_.emplace(packLayerWaferId(layer, trigger_wafer), module);
585  module_to_wafers_.emplace(packLayerWaferId(layer, module), trigger_wafer);
586  }
587  if (!l1tModulesMappingStream.eof()) {
588  throw cms::Exception("BadGeometryFile")
589  << "Error reading L1TModulesMapping '" << layer << " " << trigger_wafer << " " << module << "' \n";
590  }
591  l1tModulesMappingStream.close();
592  // read links mapping file
593  std::ifstream l1tLinksMappingStream(l1tLinksMapping_.fullPath());
594  if (!l1tLinksMappingStream.is_open()) {
595  throw cms::Exception("MissingDataFile") << "Cannot open HGCalTriggerGeometry L1TLinksMapping file\n";
596  }
597  short links = 0;
598  for (; l1tLinksMappingStream >> layer >> module >> links;) {
599  if (module_to_wafers_.find(packLayerWaferId(layer, module)) == module_to_wafers_.end()) {
600  throw cms::Exception("BadGeometryFile")
601  << "Error reading L1TLinksMapping: (" << layer << "," << module << ") is not defined in the module file \n";
602  }
603  links_per_module_.emplace(packLayerWaferId(layer, module), links);
604  }
605  if (!l1tLinksMappingStream.eof()) {
606  throw cms::Exception("BadGeometryFile")
607  << "Error reading L1TLinksMapping '" << layer << " " << module << " " << links << "' \n";
608  }
609  l1tLinksMappingStream.close();
610  // read trigger cell mapping file
611  std::ifstream l1tCellsMappingStream(l1tCellsMapping_.fullPath());
612  if (!l1tCellsMappingStream.is_open()) {
613  throw cms::Exception("MissingDataFile") << "Cannot open HGCalTriggerGeometry L1TCellsMapping file\n";
614  }
615  short type = 0;
616  short cellu = 0;
617  short cellv = 0;
618  short trigger_cell = 0;
619  for (; l1tCellsMappingStream >> type >> cellu >> cellv >> trigger_cell;) {
620  unsigned cell_key = packCellId(type, cellu, cellv);
621  unsigned trigger_cell_key = packCellId(type, trigger_cell);
622  // fill cell <-> trigger cell mappings
623  cells_to_trigger_cells_.emplace(cell_key, trigger_cell);
624  trigger_cells_to_cells_.emplace(trigger_cell_key, cell_key);
625  // fill number of trigger cells in wafers
626  auto itr_insert = number_trigger_cells_in_wafers_.emplace(type, 0);
627  if (trigger_cell + 1 > itr_insert.first->second)
628  itr_insert.first->second = trigger_cell + 1;
629  }
630  if (!l1tCellsMappingStream.eof()) {
631  throw cms::Exception("BadGeometryFile")
632  << "Error reading L1TCellsMapping '" << type << " " << cellu << " " << cellv << " " << trigger_cell << "' \n";
633  }
634  l1tCellsMappingStream.close();
635  // read scintillator trigger cell mapping file
636  std::ifstream l1tCellsSciMappingStream(l1tCellsSciMapping_.fullPath());
637  if (!l1tCellsSciMappingStream.is_open()) {
638  throw cms::Exception("MissingDataFile") << "Cannot open HGCalTriggerGeometry L1TCellsSciMapping file\n";
639  }
640  short ieta = 0;
641  short iphi = 0;
642  trigger_wafer = 0;
643  trigger_cell = 0;
644  for (; l1tCellsSciMappingStream >> ieta >> iphi >> trigger_wafer >> trigger_cell;) {
645  unsigned cell_key = packIetaIphi(ieta, iphi);
646  unsigned trigger_cell_key = packWaferCellId(ForwardSubdetector::HGCHEB, trigger_wafer, trigger_cell);
647  // fill cell <-> trigger cell mappings
648  cells_to_trigger_cells_sci_.emplace(cell_key, trigger_cell_key);
649  trigger_cells_to_cells_sci_.emplace(trigger_cell_key, cell_key);
650  // fill number of trigger cells in wafers
651  auto itr_insert = number_trigger_cells_in_wafers_sci_.emplace(trigger_wafer, 0);
652  if (trigger_cell + 1 > itr_insert.first->second)
653  itr_insert.first->second = trigger_cell + 1;
654  }
655  if (!l1tCellsSciMappingStream.eof()) {
656  throw cms::Exception("BadGeometryFile") << "Error reading L1TCellsSciMapping '" << ieta << " " << iphi << " "
657  << trigger_wafer << " " << trigger_cell << "' \n";
658  }
659  l1tCellsSciMappingStream.close();
660  // read wafer mapping file
661  std::ifstream l1tWafersMappingStream(l1tWafersMapping_.fullPath());
662  if (!l1tWafersMappingStream.is_open()) {
663  throw cms::Exception("MissingDataFile") << "Cannot open HGCalTriggerGeometry L1TWafersMapping file\n";
664  }
665  short waferu = 0;
666  short waferv = 0;
667  trigger_wafer = 0;
668  for (; l1tWafersMappingStream >> waferu >> waferv >> trigger_wafer;) {
669  unsigned wafer_key = packWaferId(waferu, waferv);
670  // fill wafer u,v <-> old wafer ID mappings
671  wafers_to_wafers_old_.emplace(wafer_key, trigger_wafer);
672  wafers_old_to_wafers_.emplace(trigger_wafer, wafer_key);
673  }
674  if (!l1tWafersMappingStream.eof()) {
675  throw cms::Exception("BadGeometryFile")
676  << "Error reading L1TWafersMapping '" << waferu << " " << waferv << " " << trigger_wafer << "' \n";
677  }
678  l1tWafersMappingStream.close();
679 }

References cells_to_trigger_cells_, cells_to_trigger_cells_sci_, Exception, edm::FileInPath::fullPath(), HGCHEB, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, l1tCellsMapping_, l1tCellsSciMapping_, l1tLinksMapping_, l1tModulesMapping_, l1tWafersMapping_, phase1PixelTopology::layer, electronStore::links, links_per_module_, module_to_wafers_, number_trigger_cells_in_wafers_, number_trigger_cells_in_wafers_sci_, packCellId(), packIetaIphi(), packLayerWaferId(), packWaferCellId(), packWaferId(), trigger_cells_to_cells_, trigger_cells_to_cells_sci_, wafer_to_module_, wafers_old_to_wafers_, and wafers_to_wafers_old_.

Referenced by initialize().

◆ fillNeighborMap()

void HGCalTriggerGeometryV9Imp1::fillNeighborMap ( const edm::FileInPath file,
neighbor_map neighbors_map,
bool  scintillator 
)
private

Definition at line 681 of file HGCalTriggerGeometryV9Imp1.cc.

683  {
684  // Fill trigger neighbor map
685  std::ifstream l1tCellNeighborsMappingStream(file.fullPath());
686  if (!l1tCellNeighborsMappingStream.is_open()) {
687  throw cms::Exception("MissingDataFile") << "Cannot open HGCalTriggerGeometry L1TCellNeighborsMapping file\n";
688  }
689  const unsigned line_size = 512;
690  for (std::array<char, line_size> buffer; l1tCellNeighborsMappingStream.getline(&buffer[0], line_size);) {
691  std::string line(&buffer[0]);
692  // Extract keys consisting of the module id
693  // and of the trigger cell id
694  // Match patterns (X,Y)
695  // where X is a number with less than 4 digis
696  // and Y is a number with less than 4 digits
697  // For the scintillator case, match instead (X,Y,Z) patterns
698  std::regex key_regex(scintillator ? "\\(\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*\\)"
699  : "\\(\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*\\)");
700  std::vector<std::string> key_tokens{std::sregex_token_iterator(line.begin(), line.end(), key_regex), {}};
701  if (key_tokens.empty()) {
702  throw cms::Exception("BadGeometry") << "Syntax error in the L1TCellNeighborsMapping:\n"
703  << " Cannot find the trigger cell key in line:\n"
704  << " '" << &buffer[0] << "'\n";
705  }
706  std::regex digits_regex("\\d{1,3}");
707  std::vector<std::string> module_tc{
708  std::sregex_token_iterator(key_tokens[0].begin(), key_tokens[0].end(), digits_regex), {}};
709  // get module and cell id
710  unsigned map_key = 0;
711  if (scintillator) {
712  int type = std::stoi(module_tc[0]);
713  int module = std::stoi(module_tc[1]);
714  int trigger_cell = std::stoi(module_tc[2]);
715  map_key = packTriggerCellWithType(type, module, trigger_cell);
716  } else {
717  int module = std::stoi(module_tc[0]);
718  int trigger_cell = std::stoi(module_tc[1]);
719  map_key = packTriggerCell(module, trigger_cell);
720  }
721  // Extract neighbors
722  // Match patterns (X,Y)
723  // where X is a number with less than 4 digits
724  // and Y is a number with less than 4 digits
725  std::regex neighbors_regex("\\(\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*\\)");
726  std::vector<std::string> neighbors_tokens{std::sregex_token_iterator(line.begin(), line.end(), neighbors_regex),
727  {}};
728  if ((scintillator && neighbors_tokens.empty()) || (!scintillator && neighbors_tokens.size() < 2)) {
729  throw cms::Exception("BadGeometry") << "Syntax error in the L1TCellNeighborsMapping:\n"
730  << " Cannot find any neighbor in line:\n"
731  << " '" << &buffer[0] << "'\n";
732  }
733  auto itr_insert = neighbors_map.emplace(map_key, std::set<std::pair<short, short>>());
734  // The first element for silicon neighbors is the key, so start at index 1
735  unsigned first_element = (scintillator ? 0 : 1);
736  for (unsigned i = first_element; i < neighbors_tokens.size(); i++) {
737  const auto& neighbor = neighbors_tokens[i];
738  std::vector<std::string> pair_neighbor{std::sregex_token_iterator(neighbor.begin(), neighbor.end(), digits_regex),
739  {}};
740  short neighbor_module(std::stoi(pair_neighbor[0]));
741  short neighbor_cell(std::stoi(pair_neighbor[1]));
742  itr_insert.first->second.emplace(neighbor_module, neighbor_cell);
743  }
744  }
745  if (!l1tCellNeighborsMappingStream.eof()) {
746  throw cms::Exception("BadGeometryFile") << "Error reading L1TCellNeighborsMapping'\n";
747  }
748  l1tCellNeighborsMappingStream.close();
749 }

References edmScanValgrind::buffer, mps_fire::end, Exception, FrontierConditions_GlobalTag_cff::file, mps_fire::i, mps_splice::line, packTriggerCell(), packTriggerCellWithType(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by initialize().

◆ getCellsFromModule()

HGCalTriggerGeometryBase::geom_set HGCalTriggerGeometryV9Imp1::getCellsFromModule ( const unsigned  module_id) const
finalvirtual

Implements HGCalTriggerGeometryBase.

Definition at line 331 of file HGCalTriggerGeometryV9Imp1.cc.

331  {
332  geom_set cell_det_ids;
333  geom_set trigger_cells = getTriggerCellsFromModule(module_id);
334  for (auto trigger_cell_id : trigger_cells) {
335  geom_set cells = getCellsFromTriggerCell(trigger_cell_id);
336  cell_det_ids.insert(cells.begin(), cells.end());
337  }
338  return cell_det_ids;
339 }

References cells, getCellsFromTriggerCell(), and getTriggerCellsFromModule().

Referenced by getModulePosition().

◆ getCellsFromTriggerCell()

HGCalTriggerGeometryBase::geom_set HGCalTriggerGeometryV9Imp1::getCellsFromTriggerCell ( const unsigned  trigger_cell_id) const
finalvirtual

Implements HGCalTriggerGeometryBase.

Definition at line 282 of file HGCalTriggerGeometryV9Imp1.cc.

283  {
284  HGCalDetId trigger_cell_det_id(trigger_cell_id);
285  geom_set cell_det_ids;
286  unsigned subdet = trigger_cell_det_id.subdetId();
287  unsigned trigger_wafer = trigger_cell_det_id.wafer();
288  unsigned trigger_cell = trigger_cell_det_id.cell();
289  unsigned layer = trigger_cell_det_id.layer();
290  // Scintillator
291  if (subdet == ForwardSubdetector::HGCHEB) {
293  const auto& cell_range =
294  trigger_cells_to_cells_sci_.equal_range(packWaferCellId(subdet, trigger_wafer, trigger_cell));
295  for (auto tc_c_itr = cell_range.first; tc_c_itr != cell_range.second; tc_c_itr++) {
296  unsigned ieta = 0;
297  unsigned iphi = 0;
298  unpackIetaIphi(tc_c_itr->second, ieta, iphi);
299  unsigned cell_det_id = HGCScintillatorDetId(type, layer, trigger_cell_det_id.zside() * ieta, iphi).rawId();
300  if (validCellId(subdet, cell_det_id))
301  cell_det_ids.emplace(cell_det_id);
302  }
303  }
304  // Silicon
305  else {
306  int waferu = 0;
307  int waferv = 0;
308  auto wafer_itr = wafers_old_to_wafers_.find(trigger_wafer);
309  if (wafer_itr == wafers_old_to_wafers_.end()) {
310  throw cms::Exception("BadGeometry") << "HGCalTriggerGeometry: Trigger wafer ID " << trigger_wafer
311  << " is not mapped to any wafer. The wafer mapping should be modified.\n";
312  }
313  unpackWaferId(wafer_itr->second, waferu, waferv);
314  DetId::Detector det =
315  (trigger_cell_det_id.subdetId() == ForwardSubdetector::HGCEE ? DetId::HGCalEE : DetId::HGCalHSi);
316  unsigned wafer_type = detIdWaferType(det, layer, waferu, waferv);
317  const auto& cell_range = trigger_cells_to_cells_.equal_range(packCellId(wafer_type, trigger_cell));
318  for (auto tc_c_itr = cell_range.first; tc_c_itr != cell_range.second; tc_c_itr++) {
319  unsigned cellu = 0;
320  unsigned cellv = 0;
321  unpackCellId(tc_c_itr->second, cellu, cellv);
322  unsigned cell_det_id =
323  HGCSiliconDetId(det, trigger_cell_det_id.zside(), wafer_type, layer, waferu, waferv, cellu, cellv).rawId();
324  if (validCellId(subdet, cell_det_id))
325  cell_det_ids.emplace(cell_det_id);
326  }
327  }
328  return cell_det_ids;
329 }

References HGCalDetId::cell(), HGCalTopology::dddConstants(), detIdWaferType(), Exception, HGCalDDDConstants::getTypeTrap(), DetId::HGCalEE, DetId::HGCalHSi, HGCEE, HGCHEB, HGCalTriggerGeometryBase::hscTopology(), LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, HGCalDetId::layer(), phase1PixelTopology::layer, packCellId(), packWaferCellId(), DetId::subdetId(), trigger_cells_to_cells_, trigger_cells_to_cells_sci_, unpackCellId(), unpackIetaIphi(), unpackWaferId(), validCellId(), HGCalDetId::wafer(), wafers_old_to_wafers_, and HGCalDetId::zside().

Referenced by getCellsFromModule(), getOrderedCellsFromModule(), getTriggerCellPosition(), and validTriggerCellFromCells().

◆ getLinksInModule()

unsigned HGCalTriggerGeometryV9Imp1::getLinksInModule ( const unsigned  module_id) const
finalvirtual

Implements HGCalTriggerGeometryBase.

Definition at line 493 of file HGCalTriggerGeometryV9Imp1.cc.

493  {
494  HGCalDetId module_det_id(module_id);
495  unsigned links = 0;
496  unsigned module = module_det_id.wafer();
497  unsigned layer = layerWithOffset(module_det_id);
498  // Scintillator
499  if (module_det_id.subdetId() == ForwardSubdetector::HGCHEB) {
501  }
502  // Silicon
503  else {
504  const unsigned sector0_mask = 0x7F;
505  module = (module & sector0_mask);
507  }
508  return links;
509 }

References HGCHEB, hSc_links_per_module_, phase1PixelTopology::layer, layerWithOffset(), electronStore::links, links_per_module_, packLayerWaferId(), DetId::subdetId(), and HGCalDetId::wafer().

◆ getModuleFromCell()

unsigned HGCalTriggerGeometryV9Imp1::getModuleFromCell ( const unsigned  cell_id) const
finalvirtual

Implements HGCalTriggerGeometryBase.

Definition at line 248 of file HGCalTriggerGeometryV9Imp1.cc.

248  {
250 }

References getModuleFromTriggerCell(), and getTriggerCellFromCell().

◆ getModuleFromTriggerCell()

unsigned HGCalTriggerGeometryV9Imp1::getModuleFromTriggerCell ( const unsigned  trigger_cell_id) const
finalvirtual

Implements HGCalTriggerGeometryBase.

Definition at line 252 of file HGCalTriggerGeometryV9Imp1.cc.

252  {
253  HGCalDetId trigger_cell_det_id(trigger_cell_id);
254  unsigned module = 0;
255  // Scintillator
256  if (trigger_cell_det_id.subdetId() == ForwardSubdetector::HGCHEB) {
257  // For scintillator, the module ID is currently encoded as the wafer in HGCalDetId
258  module = trigger_cell_det_id.wafer();
259  }
260  // Silicon
261  else {
262  unsigned layer_with_offset = layerWithOffset(trigger_cell_id);
263  auto module_itr = wafer_to_module_.find(packLayerWaferId(layer_with_offset, trigger_cell_det_id.wafer()));
264  if (module_itr == wafer_to_module_.end()) {
265  throw cms::Exception("BadGeometry")
266  << trigger_cell_det_id << "HGCalTriggerGeometry: Wafer " << trigger_cell_det_id.wafer()
267  << " is not mapped to any trigger module. The module mapping should be modified. See "
268  "https://twiki.cern.ch/twiki/bin/viewauth/CMS/HGCALTriggerPrimitivesSimulation#Trigger_geometry for "
269  "details.\n";
270  }
271  module = module_itr->second;
272  }
273  return HGCalDetId((ForwardSubdetector)trigger_cell_det_id.subdetId(),
274  trigger_cell_det_id.zside(),
275  trigger_cell_det_id.layer(),
276  trigger_cell_det_id.waferType(),
277  module,
279  .rawId();
280 }

References Exception, HGCHEB, HGCalDetId::kHGCalCellMask, HGCalDetId::layer(), layerWithOffset(), packLayerWaferId(), DetId::subdetId(), HGCalDetId::wafer(), wafer_to_module_, HGCalDetId::waferType(), and HGCalDetId::zside().

Referenced by getModuleFromCell().

◆ getModulePosition()

GlobalPoint HGCalTriggerGeometryV9Imp1::getModulePosition ( const unsigned  module_det_id) const
finalvirtual

Implements HGCalTriggerGeometryBase.

Definition at line 550 of file HGCalTriggerGeometryV9Imp1.cc.

550  {
551  unsigned subdet = HGCalDetId(module_det_id).subdetId();
552  // Position: barycenter of the module.
553  Basic3DVector<float> moduleVector(0., 0., 0.);
554  const auto cell_ids = getCellsFromModule(module_det_id);
555  // Scintillator
556  if (subdet == ForwardSubdetector::HGCHEB) {
557  for (const auto& cell : cell_ids) {
558  moduleVector += hscGeometry()->getPosition(cell).basicVector();
559  }
560  }
561  // Silicon
562  else {
563  for (const auto& cell : cell_ids) {
564  HGCSiliconDetId cellDetId(cell);
565  moduleVector += (cellDetId.det() == DetId::HGCalEE ? eeGeometry()->getPosition(cellDetId)
566  : hsiGeometry()->getPosition(cellDetId))
567  .basicVector();
568  }
569  }
570  return GlobalPoint(moduleVector / cell_ids.size());
571 }

References PV3DBase< T, PVType, FrameType >::basicVector(), DetId::det(), HGCalTriggerGeometryBase::eeGeometry(), getCellsFromModule(), HGCalGeometry::getPosition(), DetId::HGCalEE, HGCHEB, HGCalTriggerGeometryBase::hscGeometry(), HGCalTriggerGeometryBase::hsiGeometry(), and DetId::subdetId().

◆ getModuleSize()

unsigned HGCalTriggerGeometryV9Imp1::getModuleSize ( const unsigned  module_id) const
finalvirtual

Implements HGCalTriggerGeometryBase.

Definition at line 511 of file HGCalTriggerGeometryV9Imp1.cc.

511  {
512  HGCalDetId module_det_id(module_id);
513  unsigned module = module_det_id.wafer();
514  unsigned layer = layerWithOffset(module_det_id);
515  unsigned nWafers = 1;
516  // Scintillator
517  if (module_det_id.subdetId() == ForwardSubdetector::HGCHEB) {
518  nWafers = hSc_wafers_per_module_;
519  }
520  // Silicon
521  else {
522  nWafers = module_to_wafers_.count(packLayerWaferId(layer, module));
523  }
524  return nWafers;
525 }

References HGCHEB, hSc_wafers_per_module_, phase1PixelTopology::layer, layerWithOffset(), module_to_wafers_, packLayerWaferId(), DetId::subdetId(), and HGCalDetId::wafer().

◆ getNeighborsFromTriggerCell()

HGCalTriggerGeometryBase::geom_set HGCalTriggerGeometryV9Imp1::getNeighborsFromTriggerCell ( const unsigned  trigger_cell_id) const
finalvirtual

Implements HGCalTriggerGeometryBase.

Definition at line 452 of file HGCalTriggerGeometryV9Imp1.cc.

453  {
454  HGCalDetId trigger_cell_det_id(trigger_cell_id);
455  // Choose scintillator or silicon map
456  const auto& neighbors_map =
457  (trigger_cell_det_id.subdetId() == ForwardSubdetector::HGCHEB ? trigger_cell_neighbors_sci_
459  unsigned layer = trigger_cell_det_id.layer();
460  unsigned type =
461  (trigger_cell_det_id.subdetId() == ForwardSubdetector::HGCHEB ? hscTopology().dddConstants().getTypeTrap(layer)
462  : 1);
463  unsigned module = trigger_cell_det_id.wafer();
464  unsigned trigger_cell = trigger_cell_det_id.cell();
465  // retrieve neighbors
466  unsigned trigger_cell_key = (trigger_cell_det_id.subdetId() == ForwardSubdetector::HGCHEB
467  ? packTriggerCellWithType(type, module, trigger_cell)
468  : packTriggerCell(module, trigger_cell));
469  geom_set neighbor_detids;
470  auto neighbors_itr = neighbors_map.find(trigger_cell_key);
471  if (neighbors_itr == neighbors_map.end()) {
472  throw cms::Exception("BadGeometry") << "HGCalTriggerGeometry: Neighbors are not defined for trigger cell "
473  << trigger_cell << " in module " << module
474  << ". The trigger cell neighbor mapping should be modified. \n";
475  }
476  const auto& neighbors = neighbors_itr->second;
477  // create HGCalDetId of neighbors and check their validity
478  neighbor_detids.reserve(neighbors.size());
479  for (const auto& module_tc : neighbors) {
480  HGCalDetId neighbor_det_id((ForwardSubdetector)trigger_cell_det_id.subdetId(),
481  trigger_cell_det_id.zside(),
482  layer,
483  type,
484  module_tc.first,
485  module_tc.second);
486  if (validTriggerCell(neighbor_det_id.rawId())) {
487  neighbor_detids.emplace(neighbor_det_id.rawId());
488  }
489  }
490  return neighbor_detids;
491 }

References HGCalDetId::cell(), HGCalTopology::dddConstants(), Exception, HGCalDDDConstants::getTypeTrap(), HGCHEB, HGCalTriggerGeometryBase::hscTopology(), HGCalDetId::layer(), phase1PixelTopology::layer, packTriggerCell(), packTriggerCellWithType(), DetId::subdetId(), trigger_cell_neighbors_, trigger_cell_neighbors_sci_, validTriggerCell(), HGCalDetId::wafer(), and HGCalDetId::zside().

Referenced by fillInvalidTriggerCells().

◆ getOrderedCellsFromModule()

HGCalTriggerGeometryBase::geom_ordered_set HGCalTriggerGeometryV9Imp1::getOrderedCellsFromModule ( const unsigned  module_id) const
finalvirtual

Implements HGCalTriggerGeometryBase.

Definition at line 341 of file HGCalTriggerGeometryV9Imp1.cc.

342  {
343  geom_ordered_set cell_det_ids;
344  geom_ordered_set trigger_cells = getOrderedTriggerCellsFromModule(module_id);
345  for (auto trigger_cell_id : trigger_cells) {
346  geom_set cells = getCellsFromTriggerCell(trigger_cell_id);
347  cell_det_ids.insert(cells.begin(), cells.end());
348  }
349  return cell_det_ids;
350 }

References cells, getCellsFromTriggerCell(), and getOrderedTriggerCellsFromModule().

◆ getOrderedTriggerCellsFromModule()

HGCalTriggerGeometryBase::geom_ordered_set HGCalTriggerGeometryV9Imp1::getOrderedTriggerCellsFromModule ( const unsigned  module_id) const
finalvirtual

Implements HGCalTriggerGeometryBase.

Definition at line 402 of file HGCalTriggerGeometryV9Imp1.cc.

403  {
404  HGCalDetId module_det_id(module_id);
405  geom_ordered_set trigger_cell_det_ids;
406  unsigned module = module_det_id.wafer();
407  unsigned layer = module_det_id.layer();
408  // Scintillator
409  if (module_det_id.subdetId() == ForwardSubdetector::HGCHEB) {
410  // loop on the trigger cells in each module
411  for (int trigger_cell = 0; trigger_cell < number_trigger_cells_in_wafers_sci_.at(module); trigger_cell++) {
412  HGCalDetId trigger_cell_id((ForwardSubdetector)module_det_id.subdetId(),
413  module_det_id.zside(),
414  layer,
415  module_det_id.waferType(),
416  module,
417  trigger_cell);
418  if (validTriggerCell(trigger_cell_id))
419  trigger_cell_det_ids.emplace(trigger_cell_id.rawId());
420  }
421  }
422  // EE or FH
423  else {
424  auto wafer_itrs = module_to_wafers_.equal_range(packLayerWaferId(layerWithOffset(module_id), module));
425  // loop on the wafers included in the module
426  for (auto wafer_itr = wafer_itrs.first; wafer_itr != wafer_itrs.second; wafer_itr++) {
427  unsigned wafer = wafer_itr->second;
428  auto waferuv_itr = wafers_old_to_wafers_.find(wafer);
429  if (waferuv_itr == wafers_old_to_wafers_.end())
430  continue;
431  int waferu = 0;
432  int waferv = 0;
433  unpackWaferId(waferuv_itr->second, waferu, waferv);
434  DetId::Detector det = (module_det_id.subdetId() == ForwardSubdetector::HGCEE ? DetId::HGCalEE : DetId::HGCalHSi);
435  unsigned wafer_type = detIdWaferType(det, layer, waferu, waferv);
436  // loop on the trigger cells in each wafer
437  for (int trigger_cell = 0; trigger_cell < number_trigger_cells_in_wafers_.at(wafer_type); trigger_cell++) {
438  HGCalDetId trigger_cell_id((ForwardSubdetector)module_det_id.subdetId(),
439  module_det_id.zside(),
440  layer,
441  module_det_id.waferType(),
442  wafer,
443  trigger_cell);
444  if (validTriggerCell(trigger_cell_id))
445  trigger_cell_det_ids.emplace(trigger_cell_id.rawId());
446  }
447  }
448  }
449  return trigger_cell_det_ids;
450 }

References detIdWaferType(), DetId::HGCalEE, DetId::HGCalHSi, HGCEE, HGCHEB, HGCalDetId::layer(), phase1PixelTopology::layer, layerWithOffset(), module_to_wafers_, number_trigger_cells_in_wafers_, number_trigger_cells_in_wafers_sci_, packLayerWaferId(), DetId::subdetId(), unpackWaferId(), validTriggerCell(), HGCalDetId::wafer(), wafers_old_to_wafers_, HGCalDetId::waferType(), and HGCalDetId::zside().

Referenced by getOrderedCellsFromModule().

◆ getTriggerCellFromCell()

unsigned HGCalTriggerGeometryV9Imp1::getTriggerCellFromCell ( const unsigned  cell_id) const
finalvirtual

Implements HGCalTriggerGeometryBase.

Definition at line 190 of file HGCalTriggerGeometryV9Imp1.cc.

190  {
191  unsigned det = DetId(cell_id).det();
192  unsigned subdet = 0;
193  int zside = 0;
194  unsigned tc_type = 1;
195  unsigned layer = 0;
196  unsigned wafer_trigger_cell = 0;
197  unsigned trigger_cell = 0;
198  // Scintillator
199  if (det == DetId::HGCalHSc) {
200  HGCScintillatorDetId cell_det_id(cell_id);
201  unsigned ieta = cell_det_id.ietaAbs();
202  unsigned iphi = cell_det_id.iphi();
203  tc_type = cell_det_id.type();
204  layer = cell_det_id.layer();
206  zside = cell_det_id.zside();
207  auto trigger_cell_itr = cells_to_trigger_cells_sci_.find(packIetaIphi(ieta, iphi));
208  if (trigger_cell_itr == cells_to_trigger_cells_sci_.end()) {
209  throw cms::Exception("BadGeometry")
210  << "HGCalTriggerGeometry: scintillator cell ieta=" << ieta << ", iphi=" << iphi
211  << " is not mapped to any trigger cell. The trigger cell mapping should be modified.\n";
212  }
213  trigger_cell = 0;
214  wafer_trigger_cell = 0;
215  unpackWaferCellId(trigger_cell_itr->second, wafer_trigger_cell, trigger_cell);
216  }
217  // Silicon
218  else if (det == DetId::HGCalEE || det == DetId::HGCalHSi) {
219  HGCSiliconDetId cell_det_id(cell_id);
221  layer = cell_det_id.layer();
222  zside = cell_det_id.zside();
223  int type = cell_det_id.type();
224  int waferu = cell_det_id.waferU();
225  int waferv = cell_det_id.waferV();
226  unsigned cellu = cell_det_id.cellU();
227  unsigned cellv = cell_det_id.cellV();
228  auto trigger_cell_itr = cells_to_trigger_cells_.find(packCellId(type, cellu, cellv));
229  if (trigger_cell_itr == cells_to_trigger_cells_.end()) {
230  throw cms::Exception("BadGeometry")
231  << "HGCalTriggerGeometry: HGCal cell " << cellu << "," << cellv << " in wafer type " << type
232  << " is not mapped to any trigger cell. The trigger cell mapping should be modified.\n";
233  }
234  auto wafer_trigger_cell_itr = wafers_to_wafers_old_.find(packWaferId(waferu, waferv));
235  if (wafer_trigger_cell_itr == wafers_to_wafers_old_.end()) {
236  throw cms::Exception("BadGeometry")
237  << "HGCalTriggerGeometry: Wafer " << waferu << "," << waferv
238  << " is not mapped to any trigger wafer ID. The wafer mapping should be modified.\n";
239  }
240  trigger_cell = trigger_cell_itr->second;
241  wafer_trigger_cell = wafer_trigger_cell_itr->second;
242  }
243  // Using the old HGCalDetId for trigger cells is temporary
244  // For easy switch between V8 and V9 geometries
245  return HGCalDetId((ForwardSubdetector)subdet, zside, layer, tc_type, wafer_trigger_cell, trigger_cell).rawId();
246 }

References cells_to_trigger_cells_, cells_to_trigger_cells_sci_, HGCSiliconDetId::cellU(), HGCSiliconDetId::cellV(), DetId::det(), Exception, DetId::HGCalEE, DetId::HGCalHSc, DetId::HGCalHSi, HGCEE, HGCHEB, HGCHEF, LEDCalibrationChannels::ieta, HGCScintillatorDetId::ietaAbs(), HGCScintillatorDetId::iphi(), LEDCalibrationChannels::iphi, HGCScintillatorDetId::layer(), HGCSiliconDetId::layer(), phase1PixelTopology::layer, packCellId(), packIetaIphi(), packWaferId(), DetId::rawId(), HGCScintillatorDetId::type(), HGCSiliconDetId::type(), unpackWaferCellId(), wafers_to_wafers_old_, HGCSiliconDetId::waferU(), HGCSiliconDetId::waferV(), HGCScintillatorDetId::zside(), HGCSiliconDetId::zside(), and ecaldqm::zside().

Referenced by getModuleFromCell().

◆ getTriggerCellPosition()

GlobalPoint HGCalTriggerGeometryV9Imp1::getTriggerCellPosition ( const unsigned  trigger_cell_det_id) const
finalvirtual

Implements HGCalTriggerGeometryBase.

Definition at line 527 of file HGCalTriggerGeometryV9Imp1.cc.

527  {
528  unsigned subdet = HGCalDetId(trigger_cell_det_id).subdetId();
529  // Position: barycenter of the trigger cell.
530  Basic3DVector<float> triggerCellVector(0., 0., 0.);
531  const auto cell_ids = getCellsFromTriggerCell(trigger_cell_det_id);
532  // Scintillator
533  if (subdet == ForwardSubdetector::HGCHEB) {
534  for (const auto& cell : cell_ids) {
535  triggerCellVector += hscGeometry()->getPosition(cell).basicVector();
536  }
537  }
538  // Silicon
539  else {
540  for (const auto& cell : cell_ids) {
541  HGCSiliconDetId cellDetId(cell);
542  triggerCellVector += (cellDetId.det() == DetId::HGCalEE ? eeGeometry()->getPosition(cellDetId)
543  : hsiGeometry()->getPosition(cellDetId))
544  .basicVector();
545  }
546  }
547  return GlobalPoint(triggerCellVector / cell_ids.size());
548 }

References PV3DBase< T, PVType, FrameType >::basicVector(), DetId::det(), HGCalTriggerGeometryBase::eeGeometry(), getCellsFromTriggerCell(), HGCalGeometry::getPosition(), DetId::HGCalEE, HGCHEB, HGCalTriggerGeometryBase::hscGeometry(), HGCalTriggerGeometryBase::hsiGeometry(), and DetId::subdetId().

◆ getTriggerCellsFromModule()

HGCalTriggerGeometryBase::geom_set HGCalTriggerGeometryV9Imp1::getTriggerCellsFromModule ( const unsigned  module_id) const
finalvirtual

Implements HGCalTriggerGeometryBase.

Definition at line 352 of file HGCalTriggerGeometryV9Imp1.cc.

353  {
354  HGCalDetId module_det_id(module_id);
355  geom_set trigger_cell_det_ids;
356  unsigned module = module_det_id.wafer();
357  unsigned layer = module_det_id.layer();
358  // Scintillator
359  if (module_det_id.subdetId() == ForwardSubdetector::HGCHEB) {
360  // loop on the trigger cells in each module
361  for (int trigger_cell = 0; trigger_cell < number_trigger_cells_in_wafers_sci_.at(module); trigger_cell++) {
362  HGCalDetId trigger_cell_id((ForwardSubdetector)module_det_id.subdetId(),
363  module_det_id.zside(),
364  layer,
365  module_det_id.waferType(),
366  module,
367  trigger_cell);
368  if (validTriggerCell(trigger_cell_id))
369  trigger_cell_det_ids.emplace(trigger_cell_id.rawId());
370  }
371  }
372  // Silicon
373  else {
374  auto wafer_itrs = module_to_wafers_.equal_range(packLayerWaferId(layerWithOffset(module_id), module));
375  // loop on the wafers included in the module
376  for (auto wafer_itr = wafer_itrs.first; wafer_itr != wafer_itrs.second; wafer_itr++) {
377  unsigned wafer = wafer_itr->second;
378  auto waferuv_itr = wafers_old_to_wafers_.find(wafer);
379  if (waferuv_itr == wafers_old_to_wafers_.end())
380  continue;
381  int waferu = 0;
382  int waferv = 0;
383  unpackWaferId(waferuv_itr->second, waferu, waferv);
384  DetId::Detector det = (module_det_id.subdetId() == ForwardSubdetector::HGCEE ? DetId::HGCalEE : DetId::HGCalHSi);
385  unsigned wafer_type = detIdWaferType(det, layer, waferu, waferv);
386  // loop on the trigger cells in each wafer
387  for (int trigger_cell = 0; trigger_cell < number_trigger_cells_in_wafers_.at(wafer_type); trigger_cell++) {
388  HGCalDetId trigger_cell_id((ForwardSubdetector)module_det_id.subdetId(),
389  module_det_id.zside(),
390  layer,
391  module_det_id.waferType(),
392  wafer,
393  trigger_cell);
394  if (validTriggerCell(trigger_cell_id))
395  trigger_cell_det_ids.emplace(trigger_cell_id.rawId());
396  }
397  }
398  }
399  return trigger_cell_det_ids;
400 }

References detIdWaferType(), DetId::HGCalEE, DetId::HGCalHSi, HGCEE, HGCHEB, HGCalDetId::layer(), phase1PixelTopology::layer, layerWithOffset(), module_to_wafers_, number_trigger_cells_in_wafers_, number_trigger_cells_in_wafers_sci_, packLayerWaferId(), DetId::subdetId(), unpackWaferId(), validTriggerCell(), HGCalDetId::wafer(), wafers_old_to_wafers_, HGCalDetId::waferType(), and HGCalDetId::zside().

Referenced by getCellsFromModule().

◆ initialize() [1/3]

void HGCalTriggerGeometryV9Imp1::initialize ( const CaloGeometry calo_geometry)
finalvirtual

Implements HGCalTriggerGeometryBase.

Definition at line 150 of file HGCalTriggerGeometryV9Imp1.cc.

150  {
151  throw cms::Exception("BadGeometry")
152  << "HGCalTriggerGeometryV9Imp1 geometry cannot be initialized with the V7/V8 HGCAL geometry";
153 }

References Exception.

◆ initialize() [2/3]

void HGCalTriggerGeometryV9Imp1::initialize ( const HGCalGeometry hgc_ee_geometry,
const HGCalGeometry hgc_hsi_geometry,
const HGCalGeometry hgc_hsc_geometry 
)
finalvirtual

Implements HGCalTriggerGeometryBase.

Definition at line 155 of file HGCalTriggerGeometryV9Imp1.cc.

157  {
158  setEEGeometry(hgc_ee_geometry);
159  setHSiGeometry(hgc_hsi_geometry);
160  setHScGeometry(hgc_hsc_geometry);
163  trigger_layers_.resize(totalLayers_ + 1);
164  trigger_layers_[0] = 0; // layer number 0 doesn't exist
165  unsigned trigger_layer = 1;
166  for (unsigned layer = 1; layer < trigger_layers_.size(); layer++) {
167  if (disconnected_layers_.find(layer) == disconnected_layers_.end()) {
168  // Increase trigger layer number if the layer is not disconnected
169  trigger_layers_[layer] = trigger_layer;
170  trigger_layer++;
171  } else {
172  trigger_layers_[layer] = 0;
173  }
174  }
175  last_trigger_layer_ = trigger_layer - 1;
176  fillMaps();
180 }

References HGCalTopology::dddConstants(), disconnected_layers_, HGCalTriggerGeometryBase::eeTopology(), fillInvalidTriggerCells(), fillMaps(), fillNeighborMap(), heOffset_, HGCalTriggerGeometryBase::hsiTopology(), l1tCellNeighborsMapping_, l1tCellNeighborsSciMapping_, last_trigger_layer_, phase1PixelTopology::layer, HGCalDDDConstants::layers(), HGCalTriggerGeometryBase::setEEGeometry(), HGCalTriggerGeometryBase::setHScGeometry(), HGCalTriggerGeometryBase::setHSiGeometry(), totalLayers_, trigger_cell_neighbors_, trigger_cell_neighbors_sci_, and trigger_layers_.

◆ initialize() [3/3]

void HGCalTriggerGeometryV9Imp1::initialize ( const HGCalGeometry hgc_ee_geometry,
const HGCalGeometry hgc_hsi_geometry,
const HGCalGeometry hgc_hsc_geometry,
const HGCalGeometry hgc_nose_geometry 
)
finalvirtual

Implements HGCalTriggerGeometryBase.

Definition at line 182 of file HGCalTriggerGeometryV9Imp1.cc.

185  {
186  throw cms::Exception("BadGeometry") << "HGCalTriggerGeometryV9Imp1 geometry cannot be initialized with the "
187  "HFNose geometry; use HGCalTriggerGeometryV9Imp2";
188 }

References Exception.

◆ lastTriggerLayer()

unsigned HGCalTriggerGeometryV9Imp1::lastTriggerLayer ( ) const
inlinefinalvirtual

Implements HGCalTriggerGeometryBase.

Definition at line 45 of file HGCalTriggerGeometryV9Imp1.cc.

45 { return last_trigger_layer_; }

References last_trigger_layer_.

◆ layerWithOffset()

unsigned HGCalTriggerGeometryV9Imp1::layerWithOffset ( unsigned  id) const
private

Definition at line 1014 of file HGCalTriggerGeometryV9Imp1.cc.

1014  {
1015  HGCalDetId detid(id);
1016  unsigned layer = 0;
1017  switch (detid.subdetId()) {
1019  layer = detid.layer();
1020  break;
1022  layer = heOffset_ + detid.layer();
1023  break;
1025  layer = heOffset_ + detid.layer();
1026  break;
1027  };
1028  return layer;
1029 }

References heOffset_, HGCEE, HGCHEB, HGCHEF, HGCalDetId::layer(), phase1PixelTopology::layer, and DetId::subdetId().

Referenced by disconnectedModule(), getLinksInModule(), getModuleFromTriggerCell(), getModuleSize(), getOrderedTriggerCellsFromModule(), getTriggerCellsFromModule(), and triggerLayer().

◆ packCellId() [1/2]

unsigned HGCalTriggerGeometryV9Imp1::packCellId ( unsigned  type,
unsigned  cell 
) const
private

Definition at line 836 of file HGCalTriggerGeometryV9Imp1.cc.

836  {
837  unsigned packed_value = 0;
838  packed_value |= ((cell & HGCalDetId::kHGCalCellMask) << HGCalDetId::kHGCalCellOffset);
840  return packed_value;
841 }

References HGCalDetId::kHGCalCellMask, HGCalDetId::kHGCalCellOffset, HGCSiliconDetId::kHGCalTypeMask, and HGCSiliconDetId::kHGCalTypeOffset.

◆ packCellId() [2/2]

unsigned HGCalTriggerGeometryV9Imp1::packCellId ( unsigned  type,
unsigned  cellU,
unsigned  cellV 
) const
private

◆ packIetaIphi()

unsigned HGCalTriggerGeometryV9Imp1::packIetaIphi ( unsigned  ieta,
unsigned  iphi 
) const
private

◆ packLayerWaferId()

unsigned HGCalTriggerGeometryV9Imp1::packLayerWaferId ( unsigned  layer,
unsigned  wafer 
) const
private

◆ packTriggerCell()

unsigned HGCalTriggerGeometryV9Imp1::packTriggerCell ( unsigned  module,
unsigned  trigger_cell 
) const
private

Definition at line 982 of file HGCalTriggerGeometryV9Imp1.cc.

982  {
983  unsigned packed_value = 0;
984  packed_value |= ((trigger_cell & HGCalDetId::kHGCalCellMask) << HGCalDetId::kHGCalCellOffset);
985  packed_value |= ((module & HGCalDetId::kHGCalWaferMask) << HGCalDetId::kHGCalWaferOffset);
986  return packed_value;
987 }

References HGCalDetId::kHGCalCellMask, HGCalDetId::kHGCalCellOffset, HGCalDetId::kHGCalWaferMask, and HGCalDetId::kHGCalWaferOffset.

Referenced by fillNeighborMap(), and getNeighborsFromTriggerCell().

◆ packTriggerCellWithType()

unsigned HGCalTriggerGeometryV9Imp1::packTriggerCellWithType ( unsigned  type,
unsigned  module,
unsigned  trigger_cell 
) const
private

◆ packWaferCellId()

unsigned HGCalTriggerGeometryV9Imp1::packWaferCellId ( unsigned  subdet,
unsigned  wafer,
unsigned  cell 
) const
private

Definition at line 814 of file HGCalTriggerGeometryV9Imp1.cc.

814  {
815  unsigned packed_value = 0;
816  const int kSubdetMask = 0x7;
817  packed_value |= ((cell & HGCalDetId::kHGCalCellMask) << HGCalDetId::kHGCalCellOffset);
818  packed_value |= ((wafer & HGCalDetId::kHGCalWaferMask) << HGCalDetId::kHGCalWaferOffset);
819  packed_value |= ((subdet & kSubdetMask) << (HGCalDetId::kHGCalWaferTypeOffset));
820  return packed_value;
821 }

References HGCalDetId::kHGCalCellMask, HGCalDetId::kHGCalCellOffset, HGCalDetId::kHGCalWaferMask, HGCalDetId::kHGCalWaferOffset, and HGCalDetId::kHGCalWaferTypeOffset.

Referenced by fillMaps(), and getCellsFromTriggerCell().

◆ packWaferId()

unsigned HGCalTriggerGeometryV9Imp1::packWaferId ( int  waferU,
int  waferV 
) const
private

◆ reset()

void HGCalTriggerGeometryV9Imp1::reset ( void  )
finalvirtual

◆ triggerLayer()

unsigned HGCalTriggerGeometryV9Imp1::triggerLayer ( const unsigned  id) const
finalvirtual

Implements HGCalTriggerGeometryBase.

Definition at line 939 of file HGCalTriggerGeometryV9Imp1.cc.

939  {
940  unsigned layer = layerWithOffset(id);
941  if (layer >= trigger_layers_.size())
942  return 0;
943  return trigger_layers_[layer];
944 }

References phase1PixelTopology::layer, layerWithOffset(), and trigger_layers_.

◆ unpackCellId()

void HGCalTriggerGeometryV9Imp1::unpackCellId ( unsigned  cell,
unsigned &  cellU,
unsigned &  cellV 
) const
private

◆ unpackIetaIphi()

void HGCalTriggerGeometryV9Imp1::unpackIetaIphi ( unsigned  ieta_iphi,
unsigned &  ieta,
unsigned &  iphi 
) const
private

◆ unpackLayerWaferId()

void HGCalTriggerGeometryV9Imp1::unpackLayerWaferId ( unsigned  layer_wafer,
unsigned &  layer,
unsigned &  wafer 
) const
private

◆ unpackWaferCellId()

void HGCalTriggerGeometryV9Imp1::unpackWaferCellId ( unsigned  wafer_cell,
unsigned &  wafer,
unsigned &  cell 
) const
private

◆ unpackWaferId()

void HGCalTriggerGeometryV9Imp1::unpackWaferId ( unsigned  wafer,
int &  waferU,
int &  waferV 
) const
private

◆ validCell()

bool HGCalTriggerGeometryV9Imp1::validCell ( const unsigned  cell_id) const
finalvirtual

Implements HGCalTriggerGeometryBase.

Definition at line 903 of file HGCalTriggerGeometryV9Imp1.cc.

903  {
904  bool is_valid = false;
905  unsigned det = DetId(cell_id).det();
906  switch (det) {
907  case DetId::HGCalEE:
908  is_valid = eeTopology().valid(cell_id);
909  break;
910  case DetId::HGCalHSi:
911  is_valid = hsiTopology().valid(cell_id);
912  break;
913  case DetId::HGCalHSc:
914  is_valid = hscTopology().valid(cell_id);
915  break;
916  case DetId::Forward:
917  is_valid = noseTopology().valid(cell_id);
918  break;
919  default:
920  is_valid = false;
921  break;
922  }
923  return is_valid;
924 }

References DetId::det(), HGCalTriggerGeometryBase::eeTopology(), DetId::Forward, DetId::HGCalEE, DetId::HGCalHSc, DetId::HGCalHSi, HGCalTriggerGeometryBase::hscTopology(), HGCalTriggerGeometryBase::hsiTopology(), HGCalTriggerGeometryBase::noseTopology(), and HGCalTopology::valid().

◆ validCellId()

bool HGCalTriggerGeometryV9Imp1::validCellId ( unsigned  det,
unsigned  cell_id 
) const
private

Definition at line 963 of file HGCalTriggerGeometryV9Imp1.cc.

963  {
964  bool is_valid = false;
965  switch (subdet) {
967  is_valid = eeTopology().valid(cell_id);
968  break;
970  is_valid = hsiTopology().valid(cell_id);
971  break;
973  is_valid = hscTopology().valid(cell_id);
974  break;
975  default:
976  is_valid = false;
977  break;
978  }
979  return is_valid;
980 }

References HGCalTriggerGeometryBase::eeTopology(), HGCEE, HGCHEB, HGCHEF, HGCalTriggerGeometryBase::hscTopology(), HGCalTriggerGeometryBase::hsiTopology(), and HGCalTopology::valid().

Referenced by getCellsFromTriggerCell(), and validTriggerCellFromCells().

◆ validTriggerCell()

bool HGCalTriggerGeometryV9Imp1::validTriggerCell ( const unsigned  trigger_cell_id) const
finalvirtual

Implements HGCalTriggerGeometryBase.

Definition at line 926 of file HGCalTriggerGeometryV9Imp1.cc.

926  {
927  return invalid_triggercells_.find(trigger_cell_id) == invalid_triggercells_.end();
928 }

References invalid_triggercells_.

Referenced by getNeighborsFromTriggerCell(), getOrderedTriggerCellsFromModule(), and getTriggerCellsFromModule().

◆ validTriggerCellFromCells()

bool HGCalTriggerGeometryV9Imp1::validTriggerCellFromCells ( const unsigned  trigger_cell_id) const
private

Definition at line 946 of file HGCalTriggerGeometryV9Imp1.cc.

946  {
947  // Check the validity of a trigger cell with the
948  // validity of the cells. One valid cell in the
949  // trigger cell is enough to make the trigger cell
950  // valid.
951  HGCalDetId trigger_cell_det_id(trigger_cell_id);
952  unsigned subdet = trigger_cell_det_id.subdetId();
953  const geom_set cells = getCellsFromTriggerCell(trigger_cell_id);
954  bool is_valid = false;
955  for (const auto cell_id : cells) {
956  is_valid |= validCellId(subdet, cell_id);
957  if (is_valid)
958  break;
959  }
960  return is_valid;
961 }

References cells, getCellsFromTriggerCell(), DetId::subdetId(), and validCellId().

Referenced by fillInvalidTriggerCells().

Member Data Documentation

◆ cells_to_trigger_cells_

std::unordered_map<unsigned, unsigned> HGCalTriggerGeometryV9Imp1::cells_to_trigger_cells_
private

Definition at line 66 of file HGCalTriggerGeometryV9Imp1.cc.

Referenced by fillMaps(), getTriggerCellFromCell(), and reset().

◆ cells_to_trigger_cells_sci_

std::unordered_map<unsigned, unsigned> HGCalTriggerGeometryV9Imp1::cells_to_trigger_cells_sci_
private

Definition at line 68 of file HGCalTriggerGeometryV9Imp1.cc.

Referenced by fillMaps(), getTriggerCellFromCell(), and reset().

◆ disconnected_layers_

std::unordered_set<unsigned> HGCalTriggerGeometryV9Imp1::disconnected_layers_
private

◆ disconnected_modules_

std::unordered_set<unsigned> HGCalTriggerGeometryV9Imp1::disconnected_modules_
private

Definition at line 85 of file HGCalTriggerGeometryV9Imp1.cc.

Referenced by disconnectedModule(), and HGCalTriggerGeometryV9Imp1().

◆ heOffset_

unsigned HGCalTriggerGeometryV9Imp1::heOffset_ = 0
private

◆ hSc_links_per_module_

unsigned HGCalTriggerGeometryV9Imp1::hSc_links_per_module_ = 1
private

Definition at line 57 of file HGCalTriggerGeometryV9Imp1.cc.

Referenced by getLinksInModule().

◆ hSc_wafers_per_module_

unsigned HGCalTriggerGeometryV9Imp1::hSc_wafers_per_module_ = 3
private

Definition at line 58 of file HGCalTriggerGeometryV9Imp1.cc.

Referenced by getModuleSize().

◆ invalid_triggercells_

std::unordered_set<unsigned> HGCalTriggerGeometryV9Imp1::invalid_triggercells_
private

Definition at line 74 of file HGCalTriggerGeometryV9Imp1.cc.

Referenced by fillInvalidTriggerCells(), and validTriggerCell().

◆ l1tCellNeighborsMapping_

edm::FileInPath HGCalTriggerGeometryV9Imp1::l1tCellNeighborsMapping_
private

Definition at line 54 of file HGCalTriggerGeometryV9Imp1.cc.

Referenced by initialize().

◆ l1tCellNeighborsSciMapping_

edm::FileInPath HGCalTriggerGeometryV9Imp1::l1tCellNeighborsSciMapping_
private

Definition at line 55 of file HGCalTriggerGeometryV9Imp1.cc.

Referenced by initialize().

◆ l1tCellsMapping_

edm::FileInPath HGCalTriggerGeometryV9Imp1::l1tCellsMapping_
private

Definition at line 49 of file HGCalTriggerGeometryV9Imp1.cc.

Referenced by fillMaps().

◆ l1tCellsSciMapping_

edm::FileInPath HGCalTriggerGeometryV9Imp1::l1tCellsSciMapping_
private

Definition at line 50 of file HGCalTriggerGeometryV9Imp1.cc.

Referenced by fillMaps().

◆ l1tLinksMapping_

edm::FileInPath HGCalTriggerGeometryV9Imp1::l1tLinksMapping_
private

Definition at line 53 of file HGCalTriggerGeometryV9Imp1.cc.

Referenced by fillMaps().

◆ l1tModulesMapping_

edm::FileInPath HGCalTriggerGeometryV9Imp1::l1tModulesMapping_
private

Definition at line 52 of file HGCalTriggerGeometryV9Imp1.cc.

Referenced by fillMaps().

◆ l1tWafersMapping_

edm::FileInPath HGCalTriggerGeometryV9Imp1::l1tWafersMapping_
private

Definition at line 51 of file HGCalTriggerGeometryV9Imp1.cc.

Referenced by fillMaps().

◆ last_trigger_layer_

unsigned HGCalTriggerGeometryV9Imp1::last_trigger_layer_ = 0
private

Definition at line 88 of file HGCalTriggerGeometryV9Imp1.cc.

Referenced by initialize(), and lastTriggerLayer().

◆ links_per_module_

std::unordered_map<unsigned, unsigned> HGCalTriggerGeometryV9Imp1::links_per_module_
private

Definition at line 63 of file HGCalTriggerGeometryV9Imp1.cc.

Referenced by fillMaps(), and getLinksInModule().

◆ module_to_wafers_

std::unordered_multimap<unsigned, unsigned> HGCalTriggerGeometryV9Imp1::module_to_wafers_
private

◆ number_trigger_cells_in_wafers_

std::unordered_map<unsigned, unsigned short> HGCalTriggerGeometryV9Imp1::number_trigger_cells_in_wafers_
private

◆ number_trigger_cells_in_wafers_sci_

std::unordered_map<unsigned, unsigned short> HGCalTriggerGeometryV9Imp1::number_trigger_cells_in_wafers_sci_
private

◆ totalLayers_

unsigned HGCalTriggerGeometryV9Imp1::totalLayers_ = 0
private

Definition at line 92 of file HGCalTriggerGeometryV9Imp1.cc.

Referenced by initialize().

◆ trigger_cell_neighbors_

neighbor_map HGCalTriggerGeometryV9Imp1::trigger_cell_neighbors_
private

Definition at line 81 of file HGCalTriggerGeometryV9Imp1.cc.

Referenced by getNeighborsFromTriggerCell(), initialize(), and reset().

◆ trigger_cell_neighbors_sci_

neighbor_map HGCalTriggerGeometryV9Imp1::trigger_cell_neighbors_sci_
private

Definition at line 82 of file HGCalTriggerGeometryV9Imp1.cc.

Referenced by getNeighborsFromTriggerCell(), initialize(), and reset().

◆ trigger_cells_to_cells_

std::unordered_multimap<unsigned, unsigned> HGCalTriggerGeometryV9Imp1::trigger_cells_to_cells_
private

Definition at line 67 of file HGCalTriggerGeometryV9Imp1.cc.

Referenced by fillMaps(), getCellsFromTriggerCell(), and reset().

◆ trigger_cells_to_cells_sci_

std::unordered_multimap<unsigned, unsigned> HGCalTriggerGeometryV9Imp1::trigger_cells_to_cells_sci_
private

Definition at line 69 of file HGCalTriggerGeometryV9Imp1.cc.

Referenced by fillMaps(), getCellsFromTriggerCell(), and reset().

◆ trigger_layers_

std::vector<unsigned> HGCalTriggerGeometryV9Imp1::trigger_layers_
private

Definition at line 87 of file HGCalTriggerGeometryV9Imp1.cc.

Referenced by initialize(), and triggerLayer().

◆ wafer_to_module_

std::unordered_map<unsigned, unsigned> HGCalTriggerGeometryV9Imp1::wafer_to_module_
private

Definition at line 61 of file HGCalTriggerGeometryV9Imp1.cc.

Referenced by fillMaps(), getModuleFromTriggerCell(), and reset().

◆ wafers_old_to_wafers_

std::unordered_map<unsigned, unsigned> HGCalTriggerGeometryV9Imp1::wafers_old_to_wafers_
private

◆ wafers_to_wafers_old_

std::unordered_map<unsigned, unsigned> HGCalTriggerGeometryV9Imp1::wafers_to_wafers_old_
private
HGCalDetId::kHGCalWaferTypeMask
static const int kHGCalWaferTypeMask
Definition: HGCalDetId.h:15
HGCSiliconDetId::kHGCalWaferUMask
static const int kHGCalWaferUMask
Definition: HGCSiliconDetId.h:113
HGCalTriggerGeometryBase::eeTopology
const HGCalTopology & eeTopology() const
Definition: HGCalTriggerGeometryBase.h:65
HGCalTriggerGeometryV9Imp1::validTriggerCell
bool validTriggerCell(const unsigned) const final
Definition: HGCalTriggerGeometryV9Imp1.cc:926
mps_fire.i
i
Definition: mps_fire.py:428
HGCalTriggerGeometryV9Imp1::disconnected_modules_
std::unordered_set< unsigned > disconnected_modules_
Definition: HGCalTriggerGeometryV9Imp1.cc:85
HGCalTopology::dddConstants
const HGCalDDDConstants & dddConstants() const
Definition: HGCalTopology.h:98
HGCalTriggerGeometryV9Imp1::fillNeighborMap
void fillNeighborMap(const edm::FileInPath &, neighbor_map &, bool)
Definition: HGCalTriggerGeometryV9Imp1.cc:681
HGCalTriggerGeometryBase::hsiGeometry
const HGCalGeometry * hsiGeometry() const
Definition: HGCalTriggerGeometryBase.h:57
HGCalDetId::kHGCalWaferOffset
static const int kHGCalWaferOffset
Definition: HGCalDetId.h:12
HGCalTriggerGeometryV9Imp1::wafers_old_to_wafers_
std::unordered_map< unsigned, unsigned > wafers_old_to_wafers_
Definition: HGCalTriggerGeometryV9Imp1.cc:73
HGCalTriggerGeometryV9Imp1::totalLayers_
unsigned totalLayers_
Definition: HGCalTriggerGeometryV9Imp1.cc:92
HGCalTriggerGeometryV9Imp1::l1tCellsMapping_
edm::FileInPath l1tCellsMapping_
Definition: HGCalTriggerGeometryV9Imp1.cc:49
HGCalTriggerGeometryV9Imp1::last_trigger_layer_
unsigned last_trigger_layer_
Definition: HGCalTriggerGeometryV9Imp1.cc:88
HGCalDDDConstants::firstLayer
int firstLayer() const
Definition: HGCalDDDConstants.h:53
HGCSiliconDetId::kHGCalCellVMask
static const int kHGCalCellVMask
Definition: HGCSiliconDetId.h:111
ecaldqm::zside
int zside(DetId const &)
Definition: EcalDQMCommonUtils.cc:189
ForwardSubdetector
ForwardSubdetector
Definition: ForwardSubdetector.h:4
DetId::det
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
HGCSiliconDetId::kHGCalWaferUOffset
static const int kHGCalWaferUOffset
Definition: HGCSiliconDetId.h:112
HGCalTriggerGeometryV9Imp1::getTriggerCellFromCell
unsigned getTriggerCellFromCell(const unsigned) const final
Definition: HGCalTriggerGeometryV9Imp1.cc:190
HGCSiliconDetId::kHGCalWaferUSignMask
static const int kHGCalWaferUSignMask
Definition: HGCSiliconDetId.h:115
HGCalTriggerGeometryV9Imp1::l1tLinksMapping_
edm::FileInPath l1tLinksMapping_
Definition: HGCalTriggerGeometryV9Imp1.cc:53
HGCalWaferIndex::waferU
int32_t waferU(const int32_t index)
Definition: HGCalWaferIndex.cc:27
HGCalTriggerGeometryV9Imp1::packWaferId
unsigned packWaferId(int waferU, int waferV) const
Definition: HGCalTriggerGeometryV9Imp1.cc:851
HGCalTriggerGeometryV9Imp1::hSc_wafers_per_module_
unsigned hSc_wafers_per_module_
Definition: HGCalTriggerGeometryV9Imp1.cc:58
HGCalTriggerGeometryV9Imp1::wafer_to_module_
std::unordered_map< unsigned, unsigned > wafer_to_module_
Definition: HGCalTriggerGeometryV9Imp1.cc:61
HGCalTriggerGeometryV9Imp1::packLayerWaferId
unsigned packLayerWaferId(unsigned layer, unsigned wafer) const
Definition: HGCalTriggerGeometryV9Imp1.cc:823
HGCSiliconDetId::kHGCalCellUMask
static const int kHGCalCellUMask
Definition: HGCSiliconDetId.h:109
cells
const caConstants::TupleMultiplicity const CAHitNtupletGeneratorKernelsGPU::HitToTuple cms::cuda::AtomicPairCounter const GPUCACell *__restrict__ cells
Definition: CAHitNtupletGeneratorKernelsImpl.h:33
HGCSiliconDetId::kHGCalTypeMask
static const int kHGCalTypeMask
Definition: HGCSiliconDetId.h:125
HGCalTriggerGeometryV9Imp1::invalid_triggercells_
std::unordered_set< unsigned > invalid_triggercells_
Definition: HGCalTriggerGeometryV9Imp1.cc:74
HGCalTriggerGeometryV9Imp1::packIetaIphi
unsigned packIetaIphi(unsigned ieta, unsigned iphi) const
Definition: HGCalTriggerGeometryV9Imp1.cc:864
HGCalDDDConstants::getTypeHex
int getTypeHex(int layer, int waferU, int waferV) const
Definition: HGCalDDDConstants.cc:428
HGCalTriggerGeometryV9Imp1::trigger_layers_
std::vector< unsigned > trigger_layers_
Definition: HGCalTriggerGeometryV9Imp1.cc:87
HGCalTriggerGeometryBase::setEEGeometry
void setEEGeometry(const HGCalGeometry *geom)
Definition: HGCalTriggerGeometryBase.h:107
HGCalTriggerGeometryV9Imp1::fillInvalidTriggerCells
void fillInvalidTriggerCells()
Definition: HGCalTriggerGeometryV9Imp1.cc:751
HGCalTriggerGeometryV9Imp1::validCellId
bool validCellId(unsigned det, unsigned cell_id) const
Definition: HGCalTriggerGeometryV9Imp1.cc:963
HGCalTriggerGeometryV9Imp1::l1tWafersMapping_
edm::FileInPath l1tWafersMapping_
Definition: HGCalTriggerGeometryV9Imp1.cc:51
DetId::kSubdetMask
static const int kSubdetMask
Definition: DetId.h:20
HGCSiliconDetId
Definition: HGCSiliconDetId.h:22
HGCalTriggerGeometryV9Imp1::l1tCellNeighborsSciMapping_
edm::FileInPath l1tCellNeighborsSciMapping_
Definition: HGCalTriggerGeometryV9Imp1.cc:55
edmScanValgrind.buffer
buffer
Definition: edmScanValgrind.py:171
HGCalTriggerGeometryV9Imp1::links_per_module_
std::unordered_map< unsigned, unsigned > links_per_module_
Definition: HGCalTriggerGeometryV9Imp1.cc:63
DetId::kSubdetOffset
static const int kSubdetOffset
Definition: DetId.h:22
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
HGCalDetId::kHGCalWaferMask
static const int kHGCalWaferMask
Definition: HGCalDetId.h:13
DetId
Definition: DetId.h:17
edm::FileInPath
Definition: FileInPath.h:64
DetId::HGCalHSi
Definition: DetId.h:33
DetId::HGCalEE
Definition: DetId.h:32
HGCSiliconDetId::kHGCalWaferVMask
static const int kHGCalWaferVMask
Definition: HGCSiliconDetId.h:117
HGCalTriggerGeometryV9Imp1::getTriggerCellsFromModule
geom_set getTriggerCellsFromModule(const unsigned) const final
Definition: HGCalTriggerGeometryV9Imp1.cc:352
HGCalTriggerGeometryV9Imp1::packTriggerCell
unsigned packTriggerCell(unsigned, unsigned) const
Definition: HGCalTriggerGeometryV9Imp1.cc:982
HGCalTriggerGeometryV9Imp1::heOffset_
unsigned heOffset_
Definition: HGCalTriggerGeometryV9Imp1.cc:91
mps_fire.end
end
Definition: mps_fire.py:242
HGCalWaferIndex::waferV
int32_t waferV(const int32_t index)
Definition: HGCalWaferIndex.cc:32
HGCalTriggerGeometryV9Imp1::getNeighborsFromTriggerCell
geom_set getNeighborsFromTriggerCell(const unsigned) const final
Definition: HGCalTriggerGeometryV9Imp1.cc:452
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
HGCalTriggerGeometryV9Imp1::detIdWaferType
int detIdWaferType(unsigned det, unsigned layer, short waferU, short waferV) const
Definition: HGCalTriggerGeometryV9Imp1.cc:999
HGCSiliconDetId::kHGCalWaferVSignOffset
static const int kHGCalWaferVSignOffset
Definition: HGCSiliconDetId.h:118
HGCalTriggerGeometryV9Imp1::fillMaps
void fillMaps()
Definition: HGCalTriggerGeometryV9Imp1.cc:573
HGCalTriggerGeometryBase::setHSiGeometry
void setHSiGeometry(const HGCalGeometry *geom)
Definition: HGCalTriggerGeometryBase.h:108
HGCalTriggerGeometryV9Imp1::unpackWaferCellId
void unpackWaferCellId(unsigned wafer_cell, unsigned &wafer, unsigned &cell) const
Definition: HGCalTriggerGeometryV9Imp1.cc:871
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
HGCalTriggerGeometryV9Imp1::packCellId
unsigned packCellId(unsigned type, unsigned cellU, unsigned cellV) const
Definition: HGCalTriggerGeometryV9Imp1.cc:843
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HGCSiliconDetId::kHGCalWaferVSignMask
static const int kHGCalWaferVSignMask
Definition: HGCSiliconDetId.h:119
HGCEE
Definition: ForwardSubdetector.h:8
HGCalTriggerGeometryV9Imp1::l1tCellNeighborsMapping_
edm::FileInPath l1tCellNeighborsMapping_
Definition: HGCalTriggerGeometryV9Imp1.cc:54
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
HGCalTriggerGeometryV9Imp1::cells_to_trigger_cells_
std::unordered_map< unsigned, unsigned > cells_to_trigger_cells_
Definition: HGCalTriggerGeometryV9Imp1.cc:66
HGCalDetId::kHGCalLayerOffset
static const int kHGCalLayerOffset
Definition: HGCalDetId.h:16
HGCalTriggerGeometryV9Imp1::getCellsFromModule
geom_set getCellsFromModule(const unsigned) const final
Definition: HGCalTriggerGeometryV9Imp1.cc:331
HGCalTriggerGeometryV9Imp1::unpackCellId
void unpackCellId(unsigned cell, unsigned &cellU, unsigned &cellV) const
Definition: HGCalTriggerGeometryV9Imp1.cc:884
HGCalTriggerGeometryV9Imp1::wafers_to_wafers_old_
std::unordered_map< unsigned, unsigned > wafers_to_wafers_old_
Definition: HGCalTriggerGeometryV9Imp1.cc:72
HGCalTriggerGeometryV9Imp1::unpackIetaIphi
void unpackIetaIphi(unsigned ieta_iphi, unsigned &ieta, unsigned &iphi) const
Definition: HGCalTriggerGeometryV9Imp1.cc:898
HGCalTriggerGeometryV9Imp1::l1tCellsSciMapping_
edm::FileInPath l1tCellsSciMapping_
Definition: HGCalTriggerGeometryV9Imp1.cc:50
HGCScintillatorDetId::kHGCalRadiusOffset
static const int kHGCalRadiusOffset
Definition: HGCScintillatorDetId.h:83
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
HGCalTriggerGeometryBase::geom_ordered_set
std::set< unsigned > geom_ordered_set
Definition: HGCalTriggerGeometryBase.h:23
gainCalibHelper::gainCalibPI::type
type
Definition: SiPixelGainCalibHelper.h:40
HGCalDDDConstants::layers
unsigned int layers(bool reco) const
Definition: HGCalDDDConstants.cc:561
HGCScintillatorDetId::kHGCalPhiOffset
static const int kHGCalPhiOffset
Definition: HGCScintillatorDetId.h:81
HGCScintillatorDetId::kHGCalRadiusMask
static const int kHGCalRadiusMask
Definition: HGCScintillatorDetId.h:84
FrontierConditions_GlobalTag_cff.file
file
Definition: FrontierConditions_GlobalTag_cff.py:13
HGCalDDDConstants::getTypeTrap
int getTypeTrap(int layer) const
Definition: HGCalDDDConstants.cc:419
HGCalTriggerGeometryV9Imp1::getModuleFromTriggerCell
unsigned getModuleFromTriggerCell(const unsigned) const final
Definition: HGCalTriggerGeometryV9Imp1.cc:252
HGCalTriggerGeometryV9Imp1::packTriggerCellWithType
unsigned packTriggerCellWithType(unsigned, unsigned, unsigned) const
Definition: HGCalTriggerGeometryV9Imp1.cc:989
HGCalTriggerGeometryBase::geom_set
std::unordered_set< unsigned > geom_set
Definition: HGCalTriggerGeometryBase.h:22
DetId::Detector
Detector
Definition: DetId.h:24
HGCalGeometry::getPosition
GlobalPoint getPosition(const DetId &id) const
Definition: HGCalGeometry.cc:198
HGCalTriggerGeometryV9Imp1::getOrderedTriggerCellsFromModule
geom_ordered_set getOrderedTriggerCellsFromModule(const unsigned) const final
Definition: HGCalTriggerGeometryV9Imp1.cc:402
HGCSiliconDetId::kHGCalWaferVOffset
static const int kHGCalWaferVOffset
Definition: HGCSiliconDetId.h:116
HGCSiliconDetId::kHGCalTypeOffset
static const int kHGCalTypeOffset
Definition: HGCSiliconDetId.h:124
HGCScintillatorDetId::kHGCalPhiMask
static const int kHGCalPhiMask
Definition: HGCScintillatorDetId.h:82
HGCalTriggerGeometryBase::setHScGeometry
void setHScGeometry(const HGCalGeometry *geom)
Definition: HGCalTriggerGeometryBase.h:109
HGCalTriggerGeometryV9Imp1::module_to_wafers_
std::unordered_multimap< unsigned, unsigned > module_to_wafers_
Definition: HGCalTriggerGeometryV9Imp1.cc:62
HGCalDetId::kHGCalWaferTypeOffset
static const int kHGCalWaferTypeOffset
Definition: HGCalDetId.h:14
PV3DBase::basicVector
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:53
HGCalTriggerGeometryV9Imp1::trigger_cells_to_cells_sci_
std::unordered_multimap< unsigned, unsigned > trigger_cells_to_cells_sci_
Definition: HGCalTriggerGeometryV9Imp1.cc:69
HGCalDetId
Definition: HGCalDetId.h:8
HGCalTriggerGeometryBase::eeGeometry
const HGCalGeometry * eeGeometry() const
Definition: HGCalTriggerGeometryBase.h:41
HGCalDetId::kHGCalCellMask
static const int kHGCalCellMask
Definition: HGCalDetId.h:11
HGCalTriggerGeometryV9Imp1::l1tModulesMapping_
edm::FileInPath l1tModulesMapping_
Definition: HGCalTriggerGeometryV9Imp1.cc:52
eostools.move
def move(src, dest)
Definition: eostools.py:511
HGCalTriggerGeometryV9Imp1::trigger_cell_neighbors_
neighbor_map trigger_cell_neighbors_
Definition: HGCalTriggerGeometryV9Imp1.cc:81
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
HGCalDetId::kHGCalLayerMask
static const int kHGCalLayerMask
Definition: HGCalDetId.h:17
HGCalTriggerGeometryBase::hsiTopology
const HGCalTopology & hsiTopology() const
Definition: HGCalTriggerGeometryBase.h:68
HGCScintillatorDetId
Definition: HGCScintillatorDetId.h:23
DetId::HGCalHSc
Definition: DetId.h:34
Exception
Definition: hltDiff.cc:245
HGCalTriggerGeometryV9Imp1::getCellsFromTriggerCell
geom_set getCellsFromTriggerCell(const unsigned) const final
Definition: HGCalTriggerGeometryV9Imp1.cc:282
electronStore.links
links
Definition: electronStore.py:149
HGCalTriggerGeometryV9Imp1::disconnected_layers_
std::unordered_set< unsigned > disconnected_layers_
Definition: HGCalTriggerGeometryV9Imp1.cc:86
HGCalDetId::kHGCalCellOffset
static const int kHGCalCellOffset
Definition: HGCalDetId.h:10
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
HGCalTriggerGeometryV9Imp1::validTriggerCellFromCells
bool validTriggerCellFromCells(const unsigned) const
Definition: HGCalTriggerGeometryV9Imp1.cc:946
HGCalTriggerGeometryV9Imp1::trigger_cell_neighbors_sci_
neighbor_map trigger_cell_neighbors_sci_
Definition: HGCalTriggerGeometryV9Imp1.cc:82
HGCalTriggerGeometryBase::HGCalTriggerGeometryBase
HGCalTriggerGeometryBase(const edm::ParameterSet &conf)
Definition: HGCalTriggerGeometryBase.cc:3
HGCalTopology::valid
bool valid(const DetId &id) const override
Is this a valid cell id.
Definition: HGCalTopology.cc:464
HGCalTriggerGeometryBase::hscGeometry
const HGCalGeometry * hscGeometry() const
Definition: HGCalTriggerGeometryBase.h:58
HGCSiliconDetId::kHGCalWaferUSignOffset
static const int kHGCalWaferUSignOffset
Definition: HGCSiliconDetId.h:114
HGCHEF
Definition: ForwardSubdetector.h:9
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
HGCalTriggerGeometryV9Imp1::trigger_cells_to_cells_
std::unordered_multimap< unsigned, unsigned > trigger_cells_to_cells_
Definition: HGCalTriggerGeometryV9Imp1.cc:67
HGCSiliconDetId::kHGCalCellVOffset
static const int kHGCalCellVOffset
Definition: HGCSiliconDetId.h:110
HGCalTriggerGeometryV9Imp1::layerWithOffset
unsigned layerWithOffset(unsigned) const
Definition: HGCalTriggerGeometryV9Imp1.cc:1014
HGCalTriggerGeometryV9Imp1::packWaferCellId
unsigned packWaferCellId(unsigned subdet, unsigned wafer, unsigned cell) const
Definition: HGCalTriggerGeometryV9Imp1.cc:814
DetId::Forward
Definition: DetId.h:30
HGCalTriggerGeometryV9Imp1::unpackWaferId
void unpackWaferId(unsigned wafer, int &waferU, int &waferV) const
Definition: HGCalTriggerGeometryV9Imp1.cc:889
mps_splice.line
line
Definition: mps_splice.py:76
HGCalTriggerGeometryV9Imp1::hSc_links_per_module_
unsigned hSc_links_per_module_
Definition: HGCalTriggerGeometryV9Imp1.cc:57
HGCalTriggerGeometryV9Imp1::cells_to_trigger_cells_sci_
std::unordered_map< unsigned, unsigned > cells_to_trigger_cells_sci_
Definition: HGCalTriggerGeometryV9Imp1.cc:68
HGCalTriggerGeometryV9Imp1::number_trigger_cells_in_wafers_
std::unordered_map< unsigned, unsigned short > number_trigger_cells_in_wafers_
Definition: HGCalTriggerGeometryV9Imp1.cc:70
HGCalTriggerGeometryV9Imp1::number_trigger_cells_in_wafers_sci_
std::unordered_map< unsigned, unsigned short > number_trigger_cells_in_wafers_sci_
Definition: HGCalTriggerGeometryV9Imp1.cc:71
Basic3DVector< float >
HGCalTriggerGeometryBase::noseTopology
const HGCalTopology & noseTopology() const
Definition: HGCalTriggerGeometryBase.h:64
edm::FileInPath::fullPath
std::string fullPath() const
Definition: FileInPath.cc:161
HGCHEB
Definition: ForwardSubdetector.h:10
HGCSiliconDetId::kHGCalCellUOffset
static const int kHGCalCellUOffset
Definition: HGCSiliconDetId.h:108
HGCalTriggerGeometryBase::hscTopology
const HGCalTopology & hscTopology() const
Definition: HGCalTriggerGeometryBase.h:69