#include <DBSpecToDetUnit.h>
Public Member Functions | |
uint32_t | operator() (const ChamberLocationSpec &location, const FebLocationSpec &feb) |
Definition at line 8 of file DBSpecToDetUnit.h.
uint32_t DBSpecToDetUnit::operator() | ( | const ChamberLocationSpec & | location, |
const FebLocationSpec & | feb | ||
) |
Definition at line 12 of file DBSpecToDetUnit.cc.
References Reference_intrackfit_cff::barrel, ChamberLocationSpec::barrelOrEndcap, RPCDetId::buildfromDB(), ChamberLocationSpec::chamberLocationName(), debug, edm::MessageDrop::debugEnabled, ChamberLocationSpec::diskOrWheel, edm::MessageDrop::instance(), ChamberLocationSpec::layer, FebLocationSpec::localEtaPartition, LogDebug, DetId::rawId(), ChamberLocationSpec::sector, and ChamberLocationSpec::subsector.
{ static bool debug = edm::MessageDrop::instance()->debugEnabled; // REGION int region = -2; bool barrel = (ch.barrelOrEndcap==1); if (barrel) region = 0; else if (ch.diskOrWheel<0) region = -1; else if (ch.diskOrWheel>0) region = 1; //ROLL string localEtaPartVal[6]={"Forward","Central","Backward","A","B","C"}; string nroll = localEtaPartVal[feb.localEtaPartition-1]; //SUBSECTOR string subsecVal[5]={"--","-","0","+","++"}; string subsec=subsecVal[ch.subsector+2]; // build RPCdetId try { RPCDetId dn; dn.buildfromDB(region, ch.diskOrWheel, ch.layer, ch.sector, subsec, nroll, " "); return dn.rawId(); } catch(...) { if (debug) LogDebug ("CondFormas/DBSpecToDetInit") <<" Problem with RPCDetId, got exception!! " <<"DB Chamber "<<ch.chamberLocationName()<<" roll "<<nroll; return 0; } }