 |
ATLAS Offline Software
|
Go to the documentation of this file.
15 #include "GeoModelKernel/GeoVolumeCursor.h"
16 #include "GeoModelKernel/GeoPhysVol.h"
40 return StatusCode::SUCCESS;
50 if (writeHandle.isValid()) {
51 ATH_MSG_DEBUG(
"CondHandle " << writeHandle.fullKey() <<
" is already valid."
52 <<
". In theory this should not be called, but may happen"
53 <<
" if multiple concurrent events are being processed out of order.");
54 return StatusCode::SUCCESS;
62 PVConstLink ATLASWorld = theExpt->
getPhysVol();
63 GeoIntrusivePtr<GeoPhysVol> world{make_intrusive<GeoPhysVol>(ATLASWorld->getLogVol())};
68 std::unique_ptr<MuonGM::MuonDetectorManager> MuonMgrData(
mgr);
76 if(!theBuilder.BuildReadoutGeometry(MuonMgrData.get())){
77 ATH_MSG_FATAL(
"unable to add NSW ReadoutGeometry in the MuonDetectorManager in conditions store");
78 return StatusCode::FAILURE;
82 if(!readMmPass.isValid()){
83 ATH_MSG_ERROR(
"Cannot find conditions data container for MM passivation!");
84 return StatusCode::FAILURE;
86 writeHandle.addDependency(readMmPass);
97 if (!readILinesHandle.isValid()){
98 ATH_MSG_FATAL(
"Failed to retrieve the CSC I-line container "<<readILinesHandle.fullKey());
99 return StatusCode::FAILURE;
101 writeHandle.addDependency(readILinesHandle);
110 if (!readMdtAsBuiltHandle.isValid()) {
112 return StatusCode::FAILURE;
114 writeHandle.addDependency(readMdtAsBuiltHandle);
123 if(!readNswAsBuilt.isValid()) {
124 ATH_MSG_ERROR(
"Cannot find conditions data container for NSW as-built!");
125 return StatusCode::FAILURE;
127 writeHandle.addDependency(readNswAsBuilt);
133 if(!readsTGCAsBuilt.isValid()){
134 ATH_MSG_ERROR(
"Cannot find conditions data container for sTGC as-built");
135 return StatusCode::FAILURE;
137 writeHandle.addDependency(readsTGCAsBuilt);
147 if (!readALinesHandle.isValid()) {
149 return StatusCode::FAILURE;
151 writeHandle.addDependency(readALinesHandle);
153 }
else ATH_MSG_INFO(
"Do not apply the A Lines of the alignment");
160 if (!readBLinesHandle.isValid()) {
162 return StatusCode::FAILURE;
164 writeHandle.addDependency(readBLinesHandle);
166 }
else ATH_MSG_INFO(
"Do not apply the B Lines of the alignment");
172 if (world->refCount() != 2) {
173 ATH_MSG_FATAL(
"The leaking reference counter to the GeoModel world detected "<<world->refCount());
174 return StatusCode::FAILURE;
176 ATH_CHECK(writeHandle.record(std::move(MuonMgrData)));
177 ATH_MSG_INFO(
"recorded new " << writeHandle.key() <<
" with range " << writeHandle.getRange() <<
" into Conditions Store");
179 return StatusCode::SUCCESS;
187 if (MuonDetMgrDS->getTreeTop(0)==detMgr.
getTreeTop(0))
return StatusCode::SUCCESS;
192 GeoVolumeCursor detStoreCursor{MuonDetMgrDS->getTreeTop(0)};
193 while (!detStoreCursor.atEnd()) {
194 PVConstLink worldNode(detStoreCursor.getVolume());
196 const GeoLogVol* logVol = worldNode->getLogVol();
197 const std::string_view vname = logVol->getName();
198 detStoreCursor.next();
199 if (vname.find(
"Station") != std::string::npos)
continue;
201 const GeoVPhysVol& pvConstLink = *worldNode;
202 ATH_MSG_DEBUG(
"Volume in the static world "<<vname<<
" "<<
typeid(pvConstLink).
name()
204 condMgrWorld->add(make_intrusive<GeoTransform>(
transform));
205 condMgrWorld->add(const_pointer_cast(worldNode));
207 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
GeoPhysVol * getPhysVol()
Destructor.
SG::ReadCondHandleKey< NswPassivationDbData > m_condMmPassivKey
MuonDetectorCondAlg(const std::string &name, ISvcLocator *pSvcLocator)
Hold mappings of ranges to condition objects.
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
SG::ReadCondHandleKey< NswAsBuiltDbData > m_readNswAsBuiltKey
ToolHandle< MuonDetectorTool > m_iGeoModelTool
virtual StatusCode execute(const EventContext &ctx) const override final
StatusCode updateCSCInternalAlignmentMap(const ALineContainer &cscIntAline)
StatusCode updateMdtAsBuiltParams(const MdtAsBuiltContainer &a)
Gaudi::Property< bool > m_applyALines
Apply translations and rotations to align the Muon stations.
SG::ReadCondHandleKey< sTGCAsBuiltData > m_readsTGCAsBuiltKey
SG::ReadCondHandleKey< BLineContainer > m_readBLineKey
const MmIdHelper * mmIdHelper() const
bool empty() const
Test if the key is blank.
Gaudi::Property< bool > m_applysTGCAsBuilt
SG::ReadCondHandleKey< ALineContainer > m_readILineKey
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Gaudi::Property< bool > m_applyNswAsBuilt
An algorithm that can be simultaneously executed in multiple threads.
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
StatusCode copyInertMaterial(MuonGM::MuonDetectorManager &detMgr) const
Gaudi::Property< bool > m_applyBLines
Apply the chamber deformation model (Mdts + Nsw)
StatusCode updateDeformations(const BLineContainer &a)
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
a traits class that associates a CLID to a type T It also detects whether T inherits from Gaudi DataO...
::StatusCode StatusCode
StatusCode definition for legacy code.
Eigen::Affine3d Transform3D
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
void setsTGCAsBuilt(const sTGCAsBuiltData *stgcAsBuilt)
static EventIDRange infiniteRunLB()
Produces an EventIDRange that is infinite in RunLumi and invalid in Time.
const sTgcIdHelper * stgcIdHelper() const
SG::ReadCondHandleKey< ALineContainer > m_readALineKey
StatusCode initialize(bool used=true)
SG::ReadCondHandleKey< MdtAsBuiltContainer > m_readMdtAsBuiltKey
Gaudi::Property< bool > m_applyILines
Apply internal transformations on the CSCs.
SG::WriteCondHandleKey< MuonGM::MuonDetectorManager > m_writeDetectorManagerKey
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
Gaudi::Property< bool > m_applyMdtAsBuilt
virtual PVConstLink getTreeTop(unsigned int i) const
void setNswAsBuilt(const NswAsBuiltDbData *nswAsBuiltData)
StatusCode updateAlignment(const ALineContainer &a)
void setMMPassivation(const NswPassivationDbData *passiv)
Gaudi::Property< bool > m_applyMmPassivation
macros to associate a CLID to a type
virtual StatusCode initialize() override final