ATLAS Offline Software
Public Member Functions | Static Public Member Functions | List of all members
BuildNSWReadoutGeometry Class Reference

#include <BuildNSWReadoutGeometry.h>

Collaboration diagram for BuildNSWReadoutGeometry:

Public Member Functions

 BuildNSWReadoutGeometry ()
 

Static Public Member Functions

static bool BuildReadoutGeometry (MuonGM::MuonDetectorManager *mgr, const NswPassivationDbData *)
 

Detailed Description

Definition at line 15 of file BuildNSWReadoutGeometry.h.

Constructor & Destructor Documentation

◆ BuildNSWReadoutGeometry()

BuildNSWReadoutGeometry::BuildNSWReadoutGeometry ( )
default

Member Function Documentation

◆ BuildReadoutGeometry()

bool BuildNSWReadoutGeometry::BuildReadoutGeometry ( MuonGM::MuonDetectorManager mgr,
const NswPassivationDbData passivData 
)
static

Definition at line 23 of file BuildNSWReadoutGeometry.cxx.

23  {
24  bool geoBuilt = true;
25 
26  ServiceHandle<IAGDDtoGeoSvc> svc("AGDDtoGeoSvc", "MMDetectorHelper");
27  if (svc.retrieve().isFailure()) { std::abort(); }
28  IAGDDtoGeoSvc::LockedController c = svc->getController();
29  detectorList& dList = c->GetDetectorStore().GetDetectorList();
30  detectorList::const_iterator it;
31  for (it = dList.begin(); it != dList.end(); ++it) {
32  std::vector<AGDDDetectorPositioner*>& dPos = ((*it).second)->GetDetectorPositioners();
33  for (unsigned int i = 0; i < dPos.size(); i++) {
34  std::string chTag = dPos[i]->ID.detectorAddress;
35  GeoFullPhysVol* vol = dPos[i]->theVolume;
36 
37  std::string stName = chTag.substr(0, 4);
38 
39  int etaIndex{999}, phiIndex{999}, mLayer{999}, iSide{0};
40  int iLS = atoi((chTag.substr(3, 1)).c_str()); // sTG3 and sMD3 are small chambers for small sectors
41  if (iLS == 3)
42  iLS = 1; // small
43  else
44  iLS = 0; // large
45  if (chTag.substr(13, 1) == "A")
46  iSide = 1;
47  else if (chTag.substr(13, 1) == "C")
48  iSide = -1;
49  etaIndex = iSide * atoi((chTag.substr(5, 1)).c_str());
50  phiIndex = atoi((chTag.substr(12, 1)).c_str());
51  mLayer = atoi((chTag.substr(7, 1)).c_str());
52  std::string vName = vol->getLogVol()->getName();
53  std::string sName = vName.substr(vName.find('-') + 1);
54 
55  if (chTag.substr(0, 3) == "sMD") {
56  std::unique_ptr<MMReadoutElement> re = std::make_unique<MMReadoutElement>(vol, sName, etaIndex, phiIndex, mLayer, mgr, passivData);
57  re->initDesign();
58  re->fillCache();
59  mgr->addMMReadoutElement(std::move(re));
60  } else if (chTag.substr(0, 3) == "sTG") {
61  std::unique_ptr<sTgcReadoutElement> re = std::make_unique<sTgcReadoutElement>(vol, sName, etaIndex, phiIndex, mLayer, mgr);
62  std::string myVolName = (chTag.substr(0, 8)).c_str();
63  re->initDesign(2.6);
64  re->fillCache();
65  mgr->addsTgcReadoutElement(std::move(re));
66  }
67  }
68  }
69  return geoBuilt;
70 }

The documentation for this class was generated from the following files:
CxxUtils::LockedPointer
A pointer together with a movable lock.
Definition: LockedPointer.h:35
skel.it
it
Definition: skel.GENtoEVGEN.py:396
python.compareNtuple.vName
vName
Definition: compareNtuple.py:23
detectorList
std::map< std::string, AGDDDetector * > detectorList
Definition: AGDDDetectorStore.h:9
BchCleanup.mgr
mgr
Definition: BchCleanup.py:294
lumiFormat.i
int i
Definition: lumiFormat.py:85
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
eflowRec::phiIndex
unsigned int phiIndex(float phi, float binsize)
calculate phi index for a given phi
Definition: EtaPhiLUT.cxx:23
re
const boost::regex re(r_e)
CxxUtils::atoi
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
Definition: Control/CxxUtils/Root/StringUtils.cxx:85
python.compressB64.c
def c
Definition: compressB64.py:93
ServiceHandle< IAGDDtoGeoSvc >