Skip to content
Snippets Groups Projects
Commit f4935c90 authored by Edward Moyse's avatar Edward Moyse
Browse files

Merge branch 'opt.MuonReadoutGeometry-20210318' into 'master'

MuonReadoutGeometry: Speed up RpcReadoutElement ctor.

See merge request atlas/athena!41757
parents c97a2701 b39e8f37
No related branches found
No related tags found
6 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!41757MuonReadoutGeometry: Speed up RpcReadoutElement ctor.
......@@ -18,6 +18,7 @@
#include "AthenaKernel/getMessageSvc.h"
#include "GaudiKernel/MsgStream.h"
#include "GeoModelKernel/GeoFullPhysVol.h"
#include "GeoModelUtilities/GeoVisitVolumes.h"
#include "MuonReadoutGeometry/GenericRPCCache.h"
#include "MuonReadoutGeometry/RpcReadoutSet.h"
#include "TrkSurfaces/PlaneSurface.h"
......@@ -61,24 +62,21 @@ namespace MuonGM {
if (mgr->MinimalGeoFlag() == 0) {
if (GeoFullPhysVol* pvc = dynamic_cast<GeoFullPhysVol*> (pv)) {
unsigned int nchildvol = pvc->getNChildVols();
int lgg = 0;
int llay = 0;
std::string::size_type npos;
for (unsigned ich=0; ich<nchildvol; ++ich) {
PVConstLink pc = pvc->getChildVol(ich);
for (const GeoVolumeVec_t::value_type& p1 : geoGetVolumes (pvc)) {
const GeoVPhysVol* pc = p1.first;
std::string childname = (pc->getLogVol())->getName();
if ((npos = childname.find("layer")) != std::string::npos ) {
llay ++;
unsigned int nch1 = pc->getNChildVols();
lgg = 0;
for (unsigned ngv=0; ngv<nch1; ++ngv) {
PVConstLink pcgv = pc->getChildVol(ngv);
for (const GeoVolumeVec_t::value_type& p2 : geoGetVolumes (pc)) {
const GeoVPhysVol* pcgv = p2.first;
std::string childname1 = (pcgv->getLogVol())->getName();
if ((npos = childname1.find("gas volume")) != std::string::npos ) {
lgg ++;
PVConstLink pcgg = pcgv->getChildVol(0);
GeoTrf::Transform3D trans = pvc->getXToChildVol(ich)*pc->getXToChildVol(ngv)*pcgv->getXToChildVol(0);
GeoTrf::Transform3D trans = p1.second*p2.second*pcgv->getXToChildVol(0);
m_Xlg[llay-1][lgg-1] = trans;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment