 |
ATLAS Offline Software
|
#include <MuonChamberToolTest.h>
|
| | ~MuonChamberToolTest ()=default |
| |
| StatusCode | execute (const EventContext &ctx) const override |
| |
| StatusCode | initialize () override |
| |
| bool | isReEntrant () const override final |
| |
| template<class EnevelopeType > |
| StatusCode | testReadoutEle (const ActsTrk::GeometryContext &gctx, const TgcReadoutElement &tgc, const EnevelopeType &chamber, const Acts::Volume &detVol) const |
| |
| template<class EnevelopeType > |
| StatusCode | testReadoutEle (const ActsTrk::GeometryContext &gctx, const MmReadoutElement &mm, const EnevelopeType &chamber, const Acts::Volume &detVol) const |
| |
| virtual StatusCode | sysInitialize () override |
| | Override sysInitialize. More...
|
| |
| virtual bool | isClonable () const override |
| | Specify if the algorithm is clonable. More...
|
| |
| virtual unsigned int | cardinality () const override |
| | Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
|
| |
| virtual StatusCode | sysExecute (const EventContext &ctx) override |
| | Execute an algorithm. More...
|
| |
| virtual const DataObjIDColl & | extraOutputDeps () const override |
| | Return the list of extra output dependencies. More...
|
| |
| virtual bool | filterPassed (const EventContext &ctx) const |
| |
| virtual void | setFilterPassed (bool state, const EventContext &ctx) const |
| |
| ServiceHandle< StoreGateSvc > & | evtStore () |
| | The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
|
| |
| const ServiceHandle< StoreGateSvc > & | evtStore () const |
| | The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
|
| |
| const ServiceHandle< StoreGateSvc > & | detStore () const |
| | The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
|
| |
| virtual StatusCode | sysStart () override |
| | Handle START transition. More...
|
| |
| virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| | Return this algorithm's input handles. More...
|
| |
| virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| | Return this algorithm's output handles. More...
|
| |
| Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T, V, H > &t) |
| |
| Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| | Declare a new Gaudi property. More...
|
| |
| Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| | Declare a new Gaudi property. More...
|
| |
| Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
| |
| Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| | Declare a new Gaudi property. More...
|
| |
| Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| | Declare a new Gaudi property. More...
|
| |
| void | updateVHKA (Gaudi::Details::PropertyBase &) |
| |
| MsgStream & | msg () const |
| |
| MsgStream & | msg (const MSG::Level lvl) const |
| |
| bool | msgLvl (const MSG::Level lvl) const |
| |
|
| std::array< Amg::Vector3D, 8 > | cornerPoints (const Acts::Volume &volume) const |
| | Returns the 8 edge points from a trapezoidal / cuboid volume. More...
|
| |
| std::array< Amg::Vector3D, 8 > | cornerPoints (const Acts::GeometryContext &gctx, const Acts::StrawSurface &surface) const |
| |
| std::array< Amg::Vector3D, 4 > | cornerPoints (const Acts::GeometryContext &gctx, const Acts::PlaneSurface &) const |
| |
| void | saveEnvelope (const ActsTrk::GeometryContext &gctx, const std::string &envName, const Acts::Volume &envelopeVol, const std::vector< const MuonGMR4::MuonReadoutElement * > &assocRE, const std::vector< std::shared_ptr< Acts::Volume >> &subVolumes={}) const |
| |
| StatusCode | checkChambers (const ActsTrk::GeometryContext &gctx) const |
| | Check whether the chamber envelopes are consistent. More...
|
| |
| StatusCode | checkEnvelopes (const ActsTrk::GeometryContext &gctx) const |
| | Check envelopes. More...
|
| |
| template<class EnvelopeType > |
| StatusCode | allReadoutInEnvelope (const ActsTrk::GeometryContext &ctx, const EnvelopeType &envelope) const |
| | Checks whether the readout elements of an enevelope are completely embedded into the envelope. More...
|
| |
| template<class EnvelopeType > |
| StatusCode | pointInside (const EnvelopeType &envelope, const Acts::Volume &boundVol, const Amg::Vector3D &point, const std::string &descr, const Identifier &channelId) const |
| | Checks whether the point is inside of an envelope object, i.e. More...
|
| |
| StatusCode | pointInside (const Acts::TrackingVolume &volume, const Amg::Vector3D &point, const std::string &descr, const Identifier &chamberId) const |
| | Checks whether the point is inside a tracking volume. More...
|
| |
| bool | hasOverlap (const std::array< Amg::Vector3D, 8 > &chamberEdges, const Acts::Volume &volume) const |
| |
| template<class EnvelopeType > |
| StatusCode | testReadoutEle (const ActsTrk::GeometryContext &gctx, const MdtReadoutElement &readOutEle, const EnvelopeType &envelope, const Acts::Volume &boundVol) const |
| | Checks whether all channels of a given readout element are fully covered by the envelope. More...
|
| |
| template<class EnvelopeType > |
| StatusCode | testReadoutEle (const ActsTrk::GeometryContext &gctx, const RpcReadoutElement &readOutEle, const EnvelopeType &envelope, const Acts::Volume &boundVol) const |
| |
| template<class EnvelopeType > |
| StatusCode | testReadoutEle (const ActsTrk::GeometryContext &gctx, const TgcReadoutElement &readOutEle, const EnvelopeType &envelope, const Acts::Volume &boundVol) const |
| |
| template<class EnvelopeType > |
| StatusCode | testReadoutEle (const ActsTrk::GeometryContext &gctx, const sTgcReadoutElement &readOutEle, const EnvelopeType &envelope, const Acts::Volume &boundVol) const |
| |
| template<class EnvelopeType > |
| StatusCode | testReadoutEle (const ActsTrk::GeometryContext &gctx, const MmReadoutElement &readOutEle, const EnvelopeType &envelope, const Acts::Volume &boundVol) const |
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &) |
| | specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &) |
| | specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &) |
| | specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &) |
| | specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
| |
|
| ServiceHandle< Muon::IMuonIdHelperSvc > | m_idHelperSvc |
| |
| SG::ReadHandleKey< ActsTrk::GeometryContext > | m_geoCtxKey {this, "AlignmentKey", "ActsAlignment", "cond handle key"} |
| |
| ServiceHandle< ActsTrk::ITrackingGeometrySvc > | m_trackingGeometrySvc {this, "TrackingGeometrySvc","ActsTrackingGeometrySvc"} |
| |
| Gaudi::Property< unsigned > | m_overlapSamples {this, "overlapSamples", 100} |
| | Number of points to scan along the lines between two volume corners to check whether they belong to an another volume. More...
|
| |
| Gaudi::Property< std::string > | m_overlapChambObj {this, "chamberOverlapFile", "OverlapingChambers.obj"} |
| | Name of the chamber output obj file. More...
|
| |
| Gaudi::Property< bool > | m_ignoreOverlapCh {this, "ignoreChamberOverlap", true} |
| | The overlap of chamber volumes does not lead to a failure. More...
|
| |
| Gaudi::Property< bool > | m_dumpObjs {this, "dumpVolumes" , false} |
| | Dump the chambers & sectors as separate obj files. More...
|
| |
| const MuonDetectorManager * | m_detMgr {nullptr} |
| |
| DataObjIDColl | m_extendedExtraObjects |
| | Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More...
|
| |
| StoreGateSvc_t | m_evtStore |
| | Pointer to StoreGate (event store by default) More...
|
| |
| StoreGateSvc_t | m_detStore |
| | Pointer to StoreGate (detector store by default) More...
|
| |
| std::vector< SG::VarHandleKeyArray * > | m_vhka |
| |
| bool | m_varHandleArraysDeclared |
| |
Definition at line 29 of file MuonChamberToolTest.h.
◆ StoreGateSvc_t
◆ ~MuonChamberToolTest()
| MuonGMR4::MuonChamberToolTest::~MuonChamberToolTest |
( |
| ) |
|
|
default |
◆ allReadoutInEnvelope()
template<class EnvelopeType >
Checks whether the readout elements of an enevelope are completely embedded into the envelope.
Definition at line 119 of file MuonChamberToolTest.cxx.
121 std::shared_ptr<Acts::Volume> boundVol = envelope.boundingVolume(gctx);
123 for(
const MuonReadoutElement* readOut : reEles) {
124 if constexpr (std::is_same_v<EnvelopeType, SpectrometerSector>) {
125 if (readOut->msSector() != &envelope) {
127 <<std::endl<<(*readOut->msSector())<<std::endl<<envelope);
128 return StatusCode::FAILURE;
130 }
else if constexpr (std::is_same_v<EnvelopeType, Chamber>) {
131 if (readOut->chamber() != &envelope) {
133 <<std::endl<<(*readOut->chamber())<<std::endl<<envelope);
134 return StatusCode::FAILURE;
137 switch (readOut->detectorType()) {
139 const auto* detEle =
static_cast<const TgcReadoutElement*
>(readOut);
143 const auto* detEle =
static_cast<const MdtReadoutElement*
>(readOut);
147 const auto* detEle =
static_cast<const RpcReadoutElement*
>(readOut);
151 const auto* detEle =
static_cast<const MmReadoutElement*
>(readOut);
155 const auto* detEle =
static_cast<const sTgcReadoutElement*
>(readOut);
161 return StatusCode::FAILURE;
165 ATH_MSG_DEBUG(
"All "<<reEles.size()<<
" readout elements are embedded in "<<envelope);
166 return StatusCode::SUCCESS;
◆ cardinality()
Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
Override this to return 0 for reentrant algorithms.
Override this to return 0 for reentrant algorithms.
Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.
◆ checkChambers()
Check whether the chamber envelopes are consistent.
Check the overlap with other chambers
Definition at line 280 of file MuonChamberToolTest.cxx.
285 ATH_MSG_INFO(
"Fetched "<<chambers.size()<<
" chambers.");
286 std::vector<const Chamber*> chamberVec{chambers.begin(), chambers.end()};
291 if (missChamb != allRE.end()) {
292 ATH_MSG_FATAL(
"The chamber "<<(*(*missChamb)->chamber())<<
" is not in the chamber set");
293 return StatusCode::FAILURE;
296 std::set<const Chamber*> overlapChambers{};
297 std::stringstream overlapstream{};
298 for (std::size_t chIdx = 0; chIdx< chamberVec.size(); ++chIdx) {
304 Acts::abs(
chamber.stationEta()),
305 chamber.stationEta() > 0 ?
'A' :
'C',
310 const std::array<Amg::Vector3D, 8> chambCorners =
cornerPoints(*
chamber.boundingVolume(gctx));
312 std::vector<const Chamber*> overlaps{};
313 for (std::size_t chIdx1 = 0; chIdx1<chamberVec.size(); ++chIdx1) {
314 if (chIdx == chIdx1) {
317 const Chamber* overlapTest{chamberVec[chIdx1]};
318 if (
hasOverlap(chambCorners, *(overlapTest->boundingVolume(gctx)))) {
319 overlaps.push_back(overlapTest);
322 if (overlaps.empty()) {
325 overlapstream<<
"The chamber "<<
chamber<<
" overlaps with "<<std::endl;
326 for (
const Chamber* itOverlaps : overlaps) {
327 overlapstream<<
" *** "<<(*itOverlaps)<<std::endl;
329 overlapstream<<std::endl<<std::endl;
330 overlapChambers.insert(overlaps.begin(), overlaps.end());
331 overlapChambers.insert(chamberVec[chIdx]);
333 if (!overlapChambers.empty()) {
334 Acts::ObjVisualization3D visualHelper{};
335 for (
const Chamber*
hasOverlap: overlapChambers) {
336 Acts::GeometryView3D::drawVolume(visualHelper, *
hasOverlap->boundingVolume(gctx), gctx.
context());
345 return overlapChambers.empty() ||
m_ignoreOverlapCh ? StatusCode::SUCCESS : StatusCode::FAILURE;
◆ checkEnvelopes()
Check envelopes.
Definition at line 348 of file MuonChamberToolTest.cxx.
351 for (
const MuonReadoutElement*
re : allREs) {
352 if (!
re->msSector()) {
354 return StatusCode::FAILURE;
359 if (sectorFromDet !=
re->msSector()) {
362 <<
" is not the one attached to the readout geometry \n"<<(*
re->msSector())<<
"\n"<<(*sectorFromDet));
363 return StatusCode::FAILURE;
369 for (
const SpectrometerSector* sector : sectors) {
372 chName(sector->chamberIndex()),
373 sector->side() >0?
'A' :
'C',
374 sector->stationPhi() ),
375 *sector->boundingVolume(gctx), sector->readoutEles(),
376 chamberVolumes(gctx, *sector));
379 const std::shared_ptr<Acts::Volume> secVolume = sector->boundingVolume(gctx);
382 unsigned int edgeCount{0};
385 chamber->readoutEles().front()->identify()));
389 return StatusCode::SUCCESS;
◆ cornerPoints() [1/3]
| std::array< Amg::Vector3D, 4 > MuonGMR4::MuonChamberToolTest::cornerPoints |
( |
const Acts::GeometryContext & |
gctx, |
|
|
const Acts::PlaneSurface & |
surface |
|
) |
| const |
|
private |
Account for the stereo angle of the micromega geometry
Definition at line 210 of file MuonChamberToolTest.cxx.
212 if(surface.bounds().type() == Acts::SurfaceBounds::BoundsType::eRectangle) {
213 const Acts::RectangleBounds& bounds =
static_cast<const Acts::RectangleBounds&
>(surface.bounds());
214 using BoundEnum = Acts::RectangleBounds::BoundValues;
216 unsigned int edgeIdx{0};
217 for(
const double signX : {-1., 1.}) {
218 for (
const double signY : { -1., 1.}) {
219 const Amg::Vector3D edge{signX < 0 ? bounds.get(BoundEnum::eMinX) : bounds.get(BoundEnum::eMaxX),
220 signY < 0 ? bounds.get(BoundEnum::eMinY) : bounds.get(BoundEnum::eMaxY), 0.};
221 edges[edgeIdx] = surface.transform(gctx) * edge;
226 }
else if(surface.bounds().type() == Acts::SurfaceBounds::BoundsType::eTrapezoid) {
227 using BoundEnum = Acts::TrapezoidBounds::BoundValues;
228 const auto& bounds =
static_cast<const Acts::TrapezoidBounds&
>(surface.bounds());
229 unsigned int edgeIdx{0};
232 for (
const double signX : {-1., 1.}) {
233 for (
const double signY : { -1., 1.}) {
235 Amg::Vector3D(signX*bounds.get(signY < 0 ? BoundEnum::eHalfLengthXnegY : BoundEnum::eHalfLengthXposY),
236 signY*bounds.get(BoundEnum::eHalfLengthY), 0.)};
238 edges[edgeIdx] = surface.transform(gctx) * edge;
245 ATH_MSG_FATAL(
"The surface bounds are neither a rectangle nor a trapezoid, this is not supported yet");
◆ cornerPoints() [2/3]
| std::array< Amg::Vector3D, 8 > MuonGMR4::MuonChamberToolTest::cornerPoints |
( |
const Acts::GeometryContext & |
gctx, |
|
|
const Acts::StrawSurface & |
surface |
|
) |
| const |
|
private |
Definition at line 189 of file MuonChamberToolTest.cxx.
191 using BoundEnum = Acts::LineBounds::BoundValues;
192 const auto& bounds =
static_cast<const Acts::LineBounds&
>(surface.bounds());
193 unsigned int edgeIdx{0};
196 for (
const double signX : {-1., 1.}) {
197 for (
const double signY : { -1., 1.}) {
198 for (
const double signZ: {-1., 1.}) {
200 signY*bounds.get(BoundEnum::eR),
201 signZ*bounds.get(BoundEnum::eHalfLengthZ)};
202 edges[edgeIdx] = surface.transform(gctx) * edge;
◆ cornerPoints() [3/3]
| std::array< Amg::Vector3D, 8 > MuonGMR4::MuonChamberToolTest::cornerPoints |
( |
const Acts::Volume & |
volume | ) |
const |
|
private |
Returns the 8 edge points from a trapezoidal / cuboid volume.
Definition at line 169 of file MuonChamberToolTest.cxx.
171 unsigned int edgeIdx{0};
173 const auto& bounds = volume.volumeBounds();
174 for (
const double signX : {-1., 1.}) {
175 for (
const double signY : { -1., 1.}) {
176 for (
const double signZ: {-1., 1.}) {
180 edges[edgeIdx] = volume.transform() * edge;
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
| name | Name of the property. |
| hndl | Object holding the property value. |
| doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
| name | Name of the property. |
| hndl | Object holding the property value. |
| doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
| name | Name of the property. |
| property | Object holding the property value. |
| doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.
Definition at line 333 of file AthCommonDataStore.h.
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
| name | Name of the property. |
| property | Object holding the property value. |
| doc | Documentation string for the property. |
This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
| StatusCode MuonGMR4::MuonChamberToolTest::execute |
( |
const EventContext & |
ctx | ) |
const |
|
override |
Check that all chambers covered by their sector envelopes
Definition at line 411 of file MuonChamberToolTest.cxx.
414 std::shared_ptr<const Acts::TrackingGeometry> trackingGeometry =
m_trackingGeometrySvc->trackingGeometry();
419 return StatusCode::SUCCESS;
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ extraOutputDeps()
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.
◆ filterPassed()
◆ hasOverlap()
| bool MuonGMR4::MuonChamberToolTest::hasOverlap |
( |
const std::array< Amg::Vector3D, 8 > & |
chamberEdges, |
|
|
const Acts::Volume & |
volume |
|
) |
| const |
|
private |
First check that there's at least a chance that the edges might overlap with the center
The bound values contain the half length's if the minDist is within reach Then continue the check
Definition at line 249 of file MuonChamberToolTest.cxx.
254 double minDist = 1._km;
256 minDist =
std::min(minDist, (edge - center).
mag());
260 std::vector<double> boundValues = volume.volumeBounds().values();
261 if (std::ranges::none_of(boundValues, [minDist](
const double bound){
262 return minDist < 2.5*bound;
267 for (
unsigned edge1 = 1; edge1 < chamberEdges.size(); ++edge1) {
268 for (
unsigned edge2 = 0; edge2 < edge1; ++edge2) {
272 if (volume.inside(testPoint)) {
◆ initialize()
| StatusCode MuonGMR4::MuonChamberToolTest::initialize |
( |
| ) |
|
|
override |
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ isClonable()
◆ isReEntrant()
| bool MuonGMR4::MuonChamberToolTest::isReEntrant |
( |
| ) |
const |
|
inlinefinaloverride |
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ pointInside() [1/2]
Checks whether the point is inside a tracking volume.
- Parameters
-
| volume | Reference to the tracking volume to check |
| point | Point that needs to be inside the volume |
| descr | Description of the point |
| chamberId | Identifier for more information if the point is outside |
Definition at line 102 of file MuonChamberToolTest.cxx.
107 return StatusCode::SUCCESS;
109 const std::array<Amg::Vector3D, 8> volumeCorners =
cornerPoints(volume);
111 <<
descr <<
" "<<
Amg::toString(volume.itransform()* point)<<
" is not part of the chamber volume. The corners of the volume are:");
112 for(
const auto& corner : volumeCorners) {
115 return StatusCode::FAILURE;
◆ pointInside() [2/2]
template<class EnvelopeType >
Checks whether the point is inside of an envelope object, i.e.
the spectrometer sector or the chamber
- Parameters
-
| envelope | Reference to the envelope to check |
| boundVol | Reference to the bounding volume representing the envelope |
| point | Point that needs to be inside the volume |
| descr | Description of the point |
| channelId | Identifier for more information if the point is outside |
Why does the strip design give a different result than the Acts bounds?
Definition at line 66 of file MuonChamberToolTest.cxx.
74 Acts::Vector3 posInVolFrame((boundVol.transform().inverse()) * point);
75 if (boundVol.volumeBounds().inside(posInVolFrame,
tolerance)) {
77 <<
", point "<<
descr <<
" is inside of the chamber "<<std::endl<<chamb<<std::endl
78 <<
"Local position:" <<
Amg::toString(boundVol.itransform() * point));
79 return StatusCode::SUCCESS;
83 StripDesign planeTrapezoid{};
84 planeTrapezoid.defineTrapezoid(chamb.halfXShort(), chamb.halfXLong(), chamb.halfY());
88 if (std::abs(locPos.z()) - chamb.halfZ() < -
tolerance &&
89 planeTrapezoid.insideTrapezoid(axisSwap*locPos.block<2,1>(0,0))) {
90 return StatusCode::SUCCESS;
92 planeTrapezoid.defineStripLayout(locPos.y() * Amg::Vector2D::UnitX(), 1, 1, 1);
95 <<std::endl<<std::endl<<chamb<<std::endl<<
"Local position "<<
Amg::toString(locPos)
96 <<
", "<<planeTrapezoid
99 return StatusCode::FAILURE;
◆ renounce()
◆ renounceArray()
◆ saveEnvelope()
Definition at line 391 of file MuonChamberToolTest.cxx.
396 Acts::ObjVisualization3D visualHelper{};
397 std::ranges::for_each(assocRE, [&visualHelper, &gctx](
const MuonReadoutElement*
re){
398 std::ranges::for_each(
re->getSurfaces(),[&visualHelper, &gctx](
const std::shared_ptr<Acts::Surface>& surface){
399 Acts::GeometryView3D::drawSurface(visualHelper, *surface, gctx.context());
402 std::ranges::for_each(subVols, [&visualHelper, &gctx](
const std::shared_ptr<Acts::Volume>& subVol ){
403 Acts::GeometryView3D::drawVolume(visualHelper,*subVol, gctx.
context(), Amg::Transform3D::Identity(),
404 Acts::s_viewPassive);
406 Acts::GeometryView3D::drawVolume(visualHelper, envelopeVol, gctx.
context());
407 ATH_MSG_DEBUG(
"Save new envelope 'MsTrackTest_"<<envName<<
".obj'");
408 visualHelper.write(
std::format(
"MsTrackTest_{:}.obj", envName));
◆ setFilterPassed()
◆ sysExecute()
Execute an algorithm.
We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.
Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.
◆ sysInitialize()
Override sysInitialize.
Override sysInitialize from the base class.
Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc
Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc
Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.
Reimplemented in InputMakerBase, and HypoBase.
Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.
110 if (
sc.isFailure()) {
118 if ( cs.retrieve().isFailure() ) {
120 return StatusCode::SUCCESS;
122 if (cs->regHandle(
this,*
h).isFailure()) {
123 sc = StatusCode::FAILURE;
124 ATH_MSG_ERROR(
"unable to register WriteCondHandle " <<
h->fullKey()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ testReadoutEle() [1/7]
template<class EnvelopeType >
Checks whether all channels of a given readout element are fully covered by the envelope.
- Parameters
-
| gctx | Geometry context carrying all alignment & global transformations |
| readOutEle | Readout element to test |
| envelope | Reference to the envelope to check |
| boundVol | Bounding volume representing the envelope |
Definition at line 422 of file MuonChamberToolTest.cxx.
429 for (
unsigned int tube = 1;
tube <= mdtMl.numTubesInLay(); ++
tube) {
430 const IdentifierHash idHash = mdtMl.measurementHash(
layer,
tube);
431 if (!mdtMl.isValid(idHash)){
435 const Identifier measId{mdtMl.measurementId(idHash)};
443 "bottom of the tube box", measId));
445 "sealing of the tube box", measId));
448 "wall to the previous tube", measId));
450 "wall to the next tube", measId));
453 return StatusCode::SUCCESS;
◆ testReadoutEle() [2/7]
template<class EnevelopeType >
◆ testReadoutEle() [3/7]
template<class EnvelopeType >
◆ testReadoutEle() [4/7]
template<class EnvelopeType >
Definition at line 456 of file MuonChamberToolTest.cxx.
466 for (
bool measPhi : {
false,
true}) {
467 const int nStrips = measPhi ? rpc.nPhiStrips() : rpc.nEtaStrips();
469 const Identifier stripId = idHelper.channelID(rpc.identify(),rpc.doubletZ(),
478 return StatusCode::SUCCESS;
◆ testReadoutEle() [5/7]
template<class EnvelopeType >
Definition at line 518 of file MuonChamberToolTest.cxx.
526 for(
unsigned int nch = 1; nch <= stgc.nChTypes(); ++nch){
528 const unsigned int nStrips = stgc.numChannels(gasGapHash);
532 const Identifier stripId = idHelper.channelID(stgc.identify(), stgc.multilayer(),
gasGap, nch,
strip);
535 if(channelType == sTgcReadoutElement::ReadoutChannelType::Wire || channelType == sTgcReadoutElement::ReadoutChannelType::Strip){
542 return StatusCode::SUCCESS;
◆ testReadoutEle() [6/7]
template<class EnvelopeType >
◆ testReadoutEle() [7/7]
template<class EnevelopeType >
◆ updateVHKA()
◆ m_detMgr
◆ m_detStore
◆ m_dumpObjs
| Gaudi::Property<bool> MuonGMR4::MuonChamberToolTest::m_dumpObjs {this, "dumpVolumes" , false} |
|
private |
◆ m_evtStore
◆ m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Empty if no symlinks were found.
Definition at line 114 of file AthCommonReentrantAlgorithm.h.
◆ m_geoCtxKey
◆ m_idHelperSvc
Initial value:{this, "IdHelperSvc",
"Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
Definition at line 121 of file MuonChamberToolTest.h.
◆ m_ignoreOverlapCh
| Gaudi::Property<bool> MuonGMR4::MuonChamberToolTest::m_ignoreOverlapCh {this, "ignoreChamberOverlap", true} |
|
private |
The overlap of chamber volumes does not lead to a failure.
In fact, the overlap between the T4 & BIS78 chambers is found to be unavoidable without boolean shapes in the tracking geometry
Definition at line 133 of file MuonChamberToolTest.h.
◆ m_overlapChambObj
| Gaudi::Property<std::string> MuonGMR4::MuonChamberToolTest::m_overlapChambObj {this, "chamberOverlapFile", "OverlapingChambers.obj"} |
|
private |
◆ m_overlapSamples
| Gaudi::Property<unsigned> MuonGMR4::MuonChamberToolTest::m_overlapSamples {this, "overlapSamples", 100} |
|
private |
Number of points to scan along the lines between two volume corners to check whether they belong to an another volume.
Definition at line 128 of file MuonChamberToolTest.h.
◆ m_trackingGeometrySvc
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
GeoModel::TransientConstSharedPtr< Chamber > ChamberPtr
std::vector< const SpectrometerSector * > MuonSectorSet
static IdentifierHash createHash(const int gasGap, const int strip)
Chamber
Define chamber types and locations.
std::string find(const std::string &s)
return a remapped string
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)
@ Tgc
Resitive Plate Chambers.
The MuonReadoutElement is an abstract class representing the geometry representing the muon detector.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
double halfXhighY(const Acts::VolumeBounds &bounds)
Returns the half-Y length @ posiive Y for the parsed volume bounds (Trapezoid/ Cuboid)
ReadoutChannelType
ReadoutChannelType to distinguish the available readout channels Pad - pad readout channel Strip - et...
double halfY(const Acts::VolumeBounds &bounds)
Returns the half-Y length for the parsed volume bounds (Trapezoid/ Cuboid)
std::vector< const MuonReadoutElement * > getAllReadoutElements() const
Returns the list of all detector elements.
double halfZ(const Acts::VolumeBounds &bounds)
Returns the half-Z length for the parsed volume bounds (Trapezoid/ Cuboid)
#define ATH_MSG_VERBOSE(x)
SpectrometerSector::ChamberSet ChamberSet
double halfXlowY(const Acts::VolumeBounds &bounds)
Returns the half-X length @ negative Y for the parsed volume bounds (Trapezoid/ Cuboid)
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
Amg::Transform3D getRotateZ3D(double angle)
get a rotation transformation around Z-axis
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
virtual const DataObjIDColl & extraOutputDeps() const override
Return the list of extra output dependencies.
static IdentifierHash createHash(const unsigned int gasGap, const unsigned int channelType, const unsigned int channel, const unsigned int wireInGrp=0)
Create a measurement hash from the Identifier fields.
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
The ReadoutGeomCnvAlg converts the Run4 Readout geometry build from the GeoModelXML into the legacy M...
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
@ Mm
Maybe not needed in the migration.
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
::StatusCode StatusCode
StatusCode definition for legacy code.
const std::string & chName(ChIndex index)
convert ChIndex into a string
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
virtual StatusCode sysExecute(const EventContext &ctx) override
Execute an algorithm.
Eigen::Affine3d Transform3D
std::vector< const MuonReadoutElement * > ReadoutSet
Define the list of read out elements of the chamber.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
int nStrips(const MuonGM::TgcReadoutElement &readoutEle, int layer)
std::string to_string(const DetectorType &type)
std::vector< const Chamber * > MuonChamberSet
Eigen::Matrix< double, 3, 1 > Vector3D
MuonSectorSet getAllSectors() const
: Returns all MuonChambers associated with the readout geometry
#define ATH_MSG_WARNING(x)
const boost::regex re(r_e)
@ Rpc
Monitored Drift Tubes.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
virtual StatusCode sysInitialize() override
Override sysInitialize.
MuonChamberSet getAllChambers() const
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Scalar mag() const
mag method
const SpectrometerSector * getSectorEnvelope(const Identifier &channelId) const
Retrieves the spectrometer envelope enclosing the channel's readout element.
Acts::GeometryContext context() const