|
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);
79 if(!readMmPass.isValid()){
80 ATH_MSG_ERROR(
"Cannot find conditions data container for MM passivation!");
81 return StatusCode::FAILURE;
83 writeHandle.addDependency(readMmPass);
84 success = theBuilder.BuildReadoutGeometry(MuonMgrData.get(), readMmPass.cptr());
87 success = theBuilder.BuildReadoutGeometry(MuonMgrData.get(),
nullptr);
90 ATH_MSG_FATAL(
"unable to add NSW ReadoutGeometry in the MuonDetectorManager in conditions store");
91 return StatusCode::FAILURE;
101 if (!readILinesHandle.isValid()){
102 ATH_MSG_FATAL(
"Failed to retrieve the CSC I-line container "<<readILinesHandle.fullKey());
103 return StatusCode::FAILURE;
105 writeHandle.addDependency(readILinesHandle);
114 if (!readMdtAsBuiltHandle.isValid()) {
116 return StatusCode::FAILURE;
118 writeHandle.addDependency(readMdtAsBuiltHandle);
127 if(!readNswAsBuilt.isValid()) {
128 ATH_MSG_ERROR(
"Cannot find conditions data container for NSW as-built!");
129 return StatusCode::FAILURE;
131 writeHandle.addDependency(readNswAsBuilt);
137 if(!readsTGCAsBuilt2.isValid()){
138 ATH_MSG_ERROR(
"Cannot find conditions data container for sTGC as-built 2");
139 return StatusCode::FAILURE;
141 writeHandle.addDependency(readsTGCAsBuilt2);
151 if (!readALinesHandle.isValid()) {
153 return StatusCode::FAILURE;
155 writeHandle.addDependency(readALinesHandle);
157 }
else ATH_MSG_INFO(
"Do not apply the A Lines of the alignment");
164 if (!readBLinesHandle.isValid()) {
166 return StatusCode::FAILURE;
168 writeHandle.addDependency(readBLinesHandle);
170 }
else ATH_MSG_INFO(
"Do not apply the B Lines of the alignment");
176 if (world->refCount() != 2) {
177 ATH_MSG_FATAL(
"The leaking reference counter to the GeoModel world detected "<<world->refCount());
178 return StatusCode::FAILURE;
180 ATH_CHECK(writeHandle.record(std::move(MuonMgrData)));
181 ATH_MSG_INFO(
"recorded new " << writeHandle.key() <<
" with range " << writeHandle.getRange() <<
" into Conditions Store");
183 return StatusCode::SUCCESS;
191 if (MuonDetMgrDS->getTreeTop(0)==detMgr.
getTreeTop(0))
return StatusCode::SUCCESS;
196 GeoVolumeCursor detStoreCursor{MuonDetMgrDS->getTreeTop(0)};
197 while (!detStoreCursor.atEnd()) {
198 PVConstLink worldNode(detStoreCursor.getVolume());
200 const GeoLogVol* logVol = worldNode->getLogVol();
201 const std::string_view vname = logVol->getName();
202 detStoreCursor.next();
203 if (vname.find(
"Station") != std::string::npos)
continue;
205 const GeoVPhysVol& pvConstLink = *worldNode;
206 ATH_MSG_DEBUG(
"Volume in the static world "<<vname<<
" "<<
typeid(pvConstLink).
name()
208 condMgrWorld->add(make_intrusive<GeoTransform>(
transform));
209 condMgrWorld->add(const_pointer_cast(worldNode));
211 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
Gaudi::Property< bool > m_applysTGCAsBuilt2
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< BLineContainer > m_readBLineKey
const MmIdHelper * mmIdHelper() const
bool empty() const
Test if the key is blank.
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.
static EventIDRange infiniteRunLB()
Produces an EventIDRange that is infinite in RunLumi and invalid in Time.
const sTgcIdHelper * stgcIdHelper() const
SG::ReadCondHandleKey< ALineContainer > m_readALineKey
SG::ReadCondHandleKey< sTGCAsBuiltData2 > m_readsTGCAsBuilt2Key
void setsTGCAsBuilt2(const sTGCAsBuiltData2 *stgcAsBuilt2)
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)
Gaudi::Property< bool > m_applyMmPassivation
macros to associate a CLID to a type
virtual StatusCode initialize() override final