CMS 3D CMS Logo

List of all members | Public Member Functions
DBSpecToDetUnit Class Reference

#include <DBSpecToDetUnit.h>

Public Member Functions

uint32_t operator() (const ChamberLocationSpec &location, const FebLocationSpec &feb)
 

Detailed Description

Definition at line 8 of file DBSpecToDetUnit.h.

Member Function Documentation

◆ operator()()

uint32_t DBSpecToDetUnit::operator() ( const ChamberLocationSpec location,
const FebLocationSpec feb 
)

Definition at line 13 of file DBSpecToDetUnit.cc.

13  {
14  // REGION
15  int region = -2;
16  bool barrel = (ch.barrelOrEndcap == 1);
17  if (barrel)
18  region = 0;
19  else if (ch.diskOrWheel < 0)
20  region = -1;
21  else if (ch.diskOrWheel > 0)
22  region = 1;
23 
24  //ROLL
25  string localEtaPartVal[6] = {"Forward", "Central", "Backward", "A", "B", "C"};
26  string nroll = localEtaPartVal[feb.localEtaPartition - 1];
27 
28  //SUBSECTOR
29  string subsecVal[5] = {"--", "-", "0", "+", "++"};
30  string subsec = subsecVal[ch.subsector + 2];
31 
32  // build RPCdetId
33  try {
34  RPCDetId dn;
35  dn.buildfromDB(region, ch.diskOrWheel, ch.layer, ch.sector, subsec, nroll, " ");
36  return dn.rawId();
37  } catch (cms::Exception& e) {
38  LogDebug("CondFormas/DBSpecToDetInit") << " Problem with RPCDetId, got exception!! "
39  << "DB Chamber " << ch.chamberLocationName() << " roll " << nroll << e;
40  return 0;
41  }
42 }

References Reference_intrackfit_cff::barrel, ChamberLocationSpec::barrelOrEndcap, RPCDetId::buildfromDB(), ChamberLocationSpec::chamberLocationName(), ChamberLocationSpec::diskOrWheel, MillePedeFileConverter_cfg::e, ChamberLocationSpec::layer, FebLocationSpec::localEtaPartition, LogDebug, DetId::rawId(), HLT_FULL_cff::region, ChamberLocationSpec::sector, and ChamberLocationSpec::subsector.

FebLocationSpec::localEtaPartition
char localEtaPartition
Definition: FebLocationSpec.h:15
Reference_intrackfit_cff.barrel
list barrel
Definition: Reference_intrackfit_cff.py:37
RPCDetId
Definition: RPCDetId.h:16
RPCDetId::buildfromDB
void buildfromDB(int region, int ring, int layer, int sector, const std::string &subsector, const std::string &roll, const std::string &dbname)
Definition: RPCDetId.cc:35
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:223
HLT_FULL_cff.region
region
Definition: HLT_FULL_cff.py:88338
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
cms::Exception
Definition: Exception.h:70
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37