|
ATLAS Offline Software
|
#include <MuonStationBuilderCond.h>
|
| MuonStationBuilderCond (const std::string &, const std::string &, const IInterface *) |
|
virtual | ~MuonStationBuilderCond ()=default |
|
virtual StatusCode | initialize () override |
|
virtual DetachedVolumeVec | buildDetachedTrackingVolumes (const EventContext &ctx, SG::WriteCondHandle< Trk::TrackingGeometry > &whandle, bool blend=false) const override |
|
DetachedVolVec | buildDetachedTrackingVolumesImpl (const MuonGM::MuonDetectorManager *muonMgr, bool blend=false) 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 | sysInitialize () override |
| Perform system initialization for an algorithm. 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 > &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 |
|
| DeclareInterfaceID (IDetachedTrackingVolumeBuilderCond, 1, 0) |
| Creates the InterfaceID and interfaceID() method. More...
|
|
|
std::vector< std::pair< const GeoVPhysVol *, std::vector< GMInfo > > > | retrieveGMsensitive (const MuonGM::MuonDetectorManager *muonMgr) const |
|
std::unique_ptr< Trk::DetachedTrackingVolume > | buildDetachedTrackingVolumeType (const MuonGM::MuonDetectorManager *muonMgr, const GeoVPhysVol *gv, GMInfo info) const |
|
void | glueComponents (Trk::DetachedTrackingVolume *) const |
|
void | encloseLayers (const Trk::DetachedTrackingVolume *) const |
|
void | identifyLayers (Trk::DetachedTrackingVolume *, Identifier, int, int, const MuonGM::MuonDetectorManager *) const |
|
void | identifyNSWLayers (Trk::DetachedTrackingVolume &station, const Identifier &id) const |
|
void | identifyPrototype (Trk::TrackingVolume &station, int eta, int phi, const Amg::Transform3D &transf, const MuonGM::MuonDetectorManager *muonMgr) const |
|
Identifier | resolveId (std::string vname, GMInfo gm_info, int &eta, int &phi, const MuonGM::MuonDetectorManager *muonMgr) const |
|
void | checkLayerId (std::string_view comment, const MuonGM::MuonDetectorManager *muonMgr, Identifier id, const Trk::Layer *lay) const |
|
void | getNSWStationsForTranslation (const GeoVPhysVol *pv, const std::string &name, const Amg::Transform3D &, std::vector< std::pair< std::pair< const GeoLogVol *, Trk::MaterialProperties * >, std::vector< Amg::Transform3D >>> &vols, std::vector< std::string > &volNames) const |
|
void | renounceArray (SG::VarHandleKeyArray &handlesArray) |
| remove all handles from I/O resolution More...
|
|
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) |
|
void | extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps) |
| Add StoreName to extra input/output deps as needed. More...
|
|
◆ DetachedVolumeVec
◆ DetachedVolVec
◆ GMInfo
◆ StoreGateSvc_t
◆ MuonStationBuilderCond()
Muon::MuonStationBuilderCond::MuonStationBuilderCond |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~MuonStationBuilderCond()
virtual Muon::MuonStationBuilderCond::~MuonStationBuilderCond |
( |
| ) |
|
|
virtualdefault |
◆ buildDetachedTrackingVolumes()
◆ buildDetachedTrackingVolumesImpl()
Definition at line 99 of file MuonStationBuilderImpl.cxx.
104 std::vector<std::pair<const GeoVPhysVol*, std::vector<GMInfo>>> stations =
retrieveGMsensitive(muonMgr);
106 for (
const auto& mstation : stations) {
114 std::string
name = mstation.first->getLogVol()->getName();
116 if (
name.substr(0, 4) ==
"sTGC" ||
name.substr(0, 2) ==
"MM") {
117 for (
unsigned int i = 0;
i < mstation.second.size();
i++) {
118 std::string sName =
name.substr(
name.find(
'-') + 1);
122 mstation.second[0].first.inverse());
123 std::unique_ptr<Trk::DetachedTrackingVolume> newStat{msType->
clone(
name, trdef)};
130 translatedStations.push_back(std::move(newStat));
133 for (
auto gminfo : mstation.second) {
135 std::unique_ptr<Trk::DetachedTrackingVolume> newStat{msType->
clone(
name, gminfo.first)};
146 translatedStations.push_back(std::move(newStat));
151 ATH_MSG_DEBUG(
"returns " << translatedStations.size() <<
" stations");
152 return translatedStations;
◆ buildDetachedTrackingVolumeType()
Definition at line 917 of file MuonStationBuilderImpl.cxx.
920 const GeoLogVol* clv = cv->getLogVol();
921 const std::string& vname = clv->getName();
922 ATH_MSG_DEBUG(
name() <<
" building station prototype for " << cv->getLogVol()->getName());
924 MuonStationTypeBuilder::Cache cache{};
926 std::unique_ptr<Trk::DetachedTrackingVolume> typeStat{};
928 if (vname.substr(0, 4) ==
"sTGC" || vname.substr(0, 2) ==
"MM") {
929 std::string sName = vname.substr(vname.find(
'-') + 1);
932 if (vname.substr(0, 4) ==
"sTGC" &&
m_idHelperSvc->issTgc(nswId)) {
934 }
else if (vname.substr(0, 2) ==
"MM" &&
m_idHelperSvc->isMM(nswId)) {
943 if (!
m_buildCsc && vname.compare(0, 1,
"C") == 0)
945 if (!
m_buildTgc && vname.compare(0, 1,
"T") == 0)
948 int etaphi = gmInfo.second;
949 int sign = (etaphi < 0) ? -1 : 1;
950 etaphi =
sign * etaphi;
951 int is_mirr = etaphi / 1000;
952 etaphi = etaphi - is_mirr * 1000;
953 int eta = etaphi / 100;
954 int phi = etaphi -
eta * 100;
962 int etaphi = gmInfo.second;
963 int a_etaphi =
static_cast<int>(etaphi / 100000);
964 int sideC =
static_cast<int>(a_etaphi / 10000);
965 a_etaphi -=
sideC * 10000;
966 is_mirr =
static_cast<int>(a_etaphi / 1000);
967 a_etaphi -= is_mirr * 1000;
968 eta =
static_cast<int>(a_etaphi / 100);
969 phi = a_etaphi -
eta * 100;
975 std::string stname = (vname.compare(0, 1,
"T") == 0) ? vname : (clv->getName()).substr(0, vname.size() - 8);
977 if (stname.compare(0, 1,
"B") == 0 &&
eta < 0) {
978 stname = (clv->getName()).substr(0, vname.size() - 8) +
"-";
980 ATH_MSG_VERBOSE(
" new station type " << stname <<
"," << clv->getShape()->type());
981 ATH_MSG_VERBOSE(
" prototype built from eta, phi:" << eta <<
"," << phi);
983 if (stname.compare(0, 2,
"CS") == 0 || stname.compare(0, 1,
"T") == 0) {
985 if (stname.compare(0, 2,
"CS") == 0) {
990 auto layerVec = std ::make_unique<std::vector<Trk::Layer*>>(
Muon::release(layerRepr.second));
991 typeStat = std::make_unique<Trk::DetachedTrackingVolume>(stname, csc_station.release(),
992 layerRepr.first.release(), layerVec.release());
998 auto layerVec = std ::make_unique<std::vector<Trk::Layer*>>(
Muon::release(layerRepr.second));
999 typeStat = std::make_unique<Trk::DetachedTrackingVolume>(stname, tgc_station.release(),
1000 layerRepr.first.release(), layerVec.release());
1004 const GeoShape* shapeS = clv->getShape();
1005 while (shapeS->type() !=
"Trd") {
1006 if (shapeS->type() ==
"Shift") {
1007 const GeoShapeShift* shift =
dynamic_cast<const GeoShapeShift*
>(shapeS);
1008 shapeS = shift->getOp();
1009 }
else if (shapeS->type() ==
"Subtraction") {
1010 const GeoShapeSubtraction* sub =
dynamic_cast<const GeoShapeSubtraction*
>(shapeS);
1011 shapeS = sub->getOpA();
1012 }
else if (shapeS->type() ==
"Union") {
1013 const GeoShapeUnion* uni =
dynamic_cast<const GeoShapeUnion*
>(shapeS);
1014 shapeS = uni->getOpA();
1016 ATH_MSG_WARNING(
"unexpected station shape ? "<< shapeS->type() <<
", station not built");
1020 const GeoTrd* trd =
dynamic_cast<const GeoTrd*
>(shapeS);
1022 double halfX1{0.}, halfX2{0.}, halfY1{0.}, halfY2{0.}, halfZ{0.};
1025 halfX1 = trd->getXHalfLength1();
1026 halfX2 = trd->getXHalfLength2();
1027 halfY1 = trd->getYHalfLength1();
1028 halfY2 = trd->getYHalfLength2();
1029 halfZ = trd->getZHalfLength();
1032 std::unique_ptr<Trk::TrackingVolumeArray> confinedVolumes{};
1033 std::vector<std::unique_ptr<Trk::Layer>> confinedLayers{};
1034 std::unique_ptr<Trk::Volume> envelope;
1035 std::string shape =
"Trd";
1036 if (halfX1 == halfX2 && halfY1 == halfY2)
1038 if (shape ==
"Box") {
1039 auto envBounds = std::make_unique<Trk::CuboidVolumeBounds>(halfX1, halfY1, halfZ);
1042 if (!confinedVolumes) {
1046 envelope = std::make_unique<Trk::Volume>(
nullptr, envBounds.release());
1047 }
else if (shape ==
"Trd") {
1048 std::unique_ptr<Trk::TrapezoidVolumeBounds> envBounds{};
1050 if (halfY1 == halfY2) {
1051 envBounds = std::make_unique<Trk::TrapezoidVolumeBounds>(halfX1, halfX2, halfY1, halfZ);
1052 ATH_MSG_VERBOSE(
"CAUTION!!!: this trapezoid volume does not require XY -> YZ switch");
1054 if (halfY1 != halfY2 && halfX1 == halfX2) {
1056 envBounds = std::make_unique<Trk::TrapezoidVolumeBounds>(halfY1, halfY2, halfZ, halfX1);
1058 if (halfX1 != halfX2 && halfY1 != halfY2) {
1065 envelope = std::make_unique<Trk::Volume>(
makeTransform(transf), envBounds.release());
1071 std::unique_ptr<Trk::TrackingVolume> newType{};
1072 if (!confinedLayers.empty()) {
1073 auto confinedLayerPtr = std::make_unique<std::vector<Trk::Layer*>>(
Muon::release(confinedLayers));
1074 newType = std::make_unique<Trk::TrackingVolume>(*envelope,
m_muonMaterial, confinedLayerPtr.release(), stname);
1076 newType = std::make_unique<Trk::TrackingVolume>(*envelope,
m_muonMaterial,
nullptr, confinedVolumes.release(), stname);
1081 if ((stname.compare(0, 1,
"B") == 0 || stname.compare(0, 1,
"E") == 0))
1088 auto layerVec = std::make_unique<std::vector<Trk::Layer*>>(
Muon::release(layerRepr.second));
1089 typeStat = std::make_unique<Trk::DetachedTrackingVolume>(stname, newType.release(),
1090 layerRepr.first.release(), layerVec.release());
◆ checkLayerId()
◆ 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]
◆ DeclareInterfaceID()
Creates the InterfaceID and interfaceID() method.
◆ 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);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ 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.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ 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.
338 return PBASE::declareProperty(
name, property,
doc);
◆ 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()
◆ encloseLayers()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ 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
◆ getNSWStationsForTranslation()
Definition at line 643 of file MuonStationBuilderImpl.cxx.
652 unsigned int nc =
pv->getNChildVols();
654 <<
pv->getLogVol()->getName() <<
","
655 <<
pv->getLogVol()->getMaterial()->getName()
656 <<
", looping over " <<
nc <<
" children");
658 for (
unsigned int ic = 0;
ic <
nc;
ic++) {
660 const GeoVPhysVol* cv =
pv->getChildVol(
ic);
661 const GeoLogVol* clv = cv->getLogVol();
662 std::string childName = clv->getName();
663 ATH_MSG_DEBUG(
"getNSWStationsForTranslation child " << childName);
665 if (childName.empty()) {
666 childName =
"Spacer";
668 if (childName.size() > 9 && childName.substr(childName.size() - 9, 9) ==
"Sensitive") {
672 std::string cName = childName.compare(0, 3,
"NSW") == 0 || childName.compare(0, 8,
"NewSmall") == 0
676 if (!cv->getNChildVols()) {
678 for (
unsigned int is = 0; is < vols.size(); is++) {
679 if (cName == volNames[is]) {
681 vols[is].
second.front().translation().perp()) <
686 double phiTr = (
transform * transf).translation().phi();
687 if (phiTr > -0.001 && phiTr < 0.4) {
688 vols[is].second.insert(vols[is].
second.begin(),
691 vols[is].second.push_back(
transform * transf);
694 << clv->getName() <<
","
695 << (
transform * transf).translation().perp() <<
","
696 << (
transform * transf).translation().z() <<
","
704 std::vector<Amg::Transform3D> volTr;
709 if (
pv->getLogVol()->getMaterial()->getName() !=
"Ether" &&
710 (childName ==
"MM_Frame" || childName ==
"sTGC_Frame")) {
714 pv->getLogVol()->getMaterial());
715 matComb.addMaterial(newMat, thick / newMat.
x0());
717 << matComb.thickness() <<
", "
719 <<
" mat: " << matComb.thicknessInX0());
723 std::pair<const GeoLogVol*, Trk::MaterialProperties*> cpair(
724 pv->getLogVol(), nMat);
725 vols.emplace_back(cpair, volTr);
727 volNames.push_back(cName);
730 << clv->getMaterial()->getName() <<
", "
731 << volTr.back().translation().z() <<
", "
732 << volTr.back().translation().phi()
733 <<
" mat: " << matComb.thicknessInX0());
◆ glueComponents()
Definition at line 155 of file MuonStationBuilderImpl.cxx.
170 if (cubVolBounds && binUtilityX) {
175 if (low >= 0 &&
up >= 0) {
177 for (
unsigned int i = 0;
i < components.size() - 1; ++
i) {
◆ identifyLayers()
Definition at line 185 of file MuonStationBuilderImpl.cxx.
192 const std::string stationStr =
stationName.substr(0, 3);
193 bool is_valid{
false};
197 stationStr, cscEtaSt, phi + 1, 1, 1, 0, 1, is_valid);
202 stationStr, cscEtaSt, phi + 1, 2, 1, 0, 1, is_valid);
207 for (
int gasgap = 0; gasgap < cscRE->
Ngasgaps(); gasgap++) {
221 if (assocVol && assocLay) {
232 }
else if (stationStr[0] ==
'T') {
235 if (stationStr ==
"T1F") {
237 }
else if (stationStr ==
"T1E") {
239 }
else if (stationStr ==
"T2F") {
241 }
else if (stationStr ==
"T2E") {
243 }
else if (stationStr ==
"T3F") {
245 }
else if (stationStr ==
"T3E") {
247 }
else if (stationStr ==
"T4F") {
258 bool is_valid{
false};
260 return is_valid ? muonMgr->getTgcReadoutElement(
id) :
nullptr;
265 unsigned int phit = 0;
293 Identifier wireId = idHelper.channelID(stationStr, etaSt, phiSt, 1, 0, 1, validId);
308 wireId = idHelper.channelID(stationStr, etaSt, phiSt,
il + 1, 1, 1, validId);
318 if ((
layers[
il]->surfaceRepresentation().transform().inverse() * stripSurf->center()).
mag() > 0.001)
319 ATH_MSG_DEBUG(
"TGC strip plane shifted:"<< st <<
"," << eta <<
"," << phi
326 <<
"," << eta <<
"," << phi);
333 const int nameIndex = idHelper.stationNameIndex(
stationName.substr(0, 3));
337 for (
auto* cVol : cVols) {
338 if (cVol->confinedLayers()) {
341 bool is_valid{
false};
343 for (
auto* cLay : cLays) {
346 Identifier newId = idHelper.channelID(nameIndex, eta, phi,
347 idHelper.multilayer(
id),
348 idHelper.tubeLayer(
id),
352 mdtROE = is_valid ? muonMgr->getMdtReadoutElement(newId) :
nullptr;
355 cLay->setLayerType(newid);
358 double ref = cLay->getRef();
362 double loc = (cLay->surfaceRepresentation().transform().inverse() * mdtROE->
tubePos(newId))[1];
363 if (std::abs(
ref) > 10e6) {
364 double sign = (
ref > 0.) ? 1. : -1.;
367 0.5 * (
sign + 1) * 1e5;
368 if (std::abs(
ref - loc) > 0.001) {
369 cLay->setRef(loc + dec * 1e5 + 0.5 * (
sign + 1) * 1e5);
371 }
else if (std::abs(
ref - loc) > 0.001) {
378 if (!cVol->confinedArbitraryLayers().empty()) {
381 for (
auto* cLay : cLays) {
383 bool is_valid{
false};
385 Identifier newId = idHelper.channelID(nameIndex, eta, phi,
386 idHelper.doubletR(
id), idHelper.doubletZ(
id),
387 idHelper.doubletPhi(
id), idHelper.gasGap(
id),
388 1, idHelper.strip(
id),
391 cLay->setLayerType(newid);
402 for (
auto* cVol : cVols) {
403 if (cVol->confinedLayers()) {
405 cVol->confinedLayers()->arrayObjects();
406 for (
unsigned int il = 0;
il < cLays.size();
il++) {
410 <<
"," << cVol->volumeName()
411 <<
", unidentified active layer:" <<
il);
414 " subvolume " + cVol->volumeName(),
415 muonMgr,
id, cLays[
il]);
418 if (!cVol->confinedArbitraryLayers().empty()) {
420 cVol->confinedArbitraryLayers();
421 for (
unsigned int il = 0;
il < cLays.size();
il++) {
425 <<
"," << cVol->volumeName()
426 <<
", unidentified active layer:" <<
il);
429 station->
name() +
" subvolume " +
431 muonMgr,
id, cLays[
il]);
439 for (
unsigned int il = 0;
il < cLays.size();
il++) {
443 <<
"," << station->
name()
444 <<
", unidentified active layer:" <<
il);
447 muonMgr,
id, cLays[
il]);
◆ identifyNSWLayers()
Definition at line 453 of file MuonStationBuilderImpl.cxx.
459 const bool isStgc{station.
name().substr(0, 4) ==
"sTGC"};
460 const bool isMm{station.
name().substr(0, 2) ==
"MM"};
461 if (!isMm && !isStgc)
return;
462 for (
unsigned int il = 0;
il < lays.size();
il++) {
465 const Identifier lid = idHelper.channelID(
id, idHelper.multilayer(
id),
il + 1, 2, 1);
470 const Identifier lid = idHelper.channelID(
id, idHelper.multilayer(
id),
il + 1, 1);
◆ identifyPrototype()
Definition at line 476 of file MuonStationBuilderImpl.cxx.
483 const std::string stationNameShort =
stationName.substr(0, 3);
485 bool is_valid{
false};
487 if (
m_idHelperSvc->hasMDT() && (stationFirstChar ==
'B' || stationFirstChar ==
'E')) {
490 const int nameIndex = idHelper.stationNameIndex(stationNameShort);
492 const Identifier ele_id = idHelper.channelID(nameIndex, eta, phi,
multi, 1, 1, is_valid);
514 assocLay->
setLayerType(
id.get_identifier32().get_compact());
521 if (confinedVolumes) {
523 for (
auto* vol : vols) {
524 if (!
m_idHelperSvc->hasRPC() || vol->volumeName() !=
"RPC") {
530 int nameIndex =
m_idHelperSvc->rpcIdHelper().stationNameIndex(stationNameShort);
532 if (stationNameShort ==
"BME" || stationNameShort ==
"BMG") {
543 if (stationNameShort.find(
"BMS") != std::string::npos && (std::abs(eta) == 2 || std::abs(eta) == 4)) {
546 else if (stationNameShort.find(
"BOG") != std::string::npos) {
547 if (std::abs(eta) == 7 || std::abs(eta) == 8) {
552 }
else if (stationNameShort.find(
"BOF") != std::string::npos && std::abs(eta) == 4){
563 for (
int doubletZ = 1; doubletZ <= doubletZMax; ++doubletZ) {
582 if (
layer->layerType() == 0 ||
583 !
layer->surfaceRepresentation().isOnSurface(stripLocPos,
false, 0.5*
layer->thickness())){
586 const Amg::Vector3D locPos1 =
layer->surfaceRepresentation().transform().inverse() * stripLocPos;
589 double swap = (std::abs(locPos1[1] - locPos2[0]) > 0.001) ? 20000. : 0.;
610 for (
auto* cVol : cVols) {
611 if (cVol->confinedLayers()) {
613 for (
unsigned int il = 0;
il < cLays.size();
il++) {
620 if (!cVol->confinedArbitraryLayers().empty()) {
622 for (
unsigned int il = 0;
il < cLays.size();
il++) {
633 for (
unsigned int il = 0;
il < cLays.size();
il++) {
◆ initialize()
StatusCode Muon::MuonStationBuilderCond::initialize |
( |
| ) |
|
|
overridevirtual |
◆ 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.
◆ 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.
◆ renounce()
◆ renounceArray()
◆ resolveId()
Definition at line 1101 of file MuonStationBuilderImpl.cxx.
1106 int etaphi = gm_info.second;
1107 int sign = (etaphi < 0) ? -1 : 1;
1108 etaphi =
sign * etaphi;
1109 int is_mirr = etaphi / 1000;
1110 etaphi = etaphi - is_mirr * 1000;
1112 phi = etaphi -
eta * 100;
1122 int etaphi = gm_info.second;
1123 int a_etaphi =
static_cast<int>(etaphi / 100000);
1124 int sideC =
static_cast<int>(a_etaphi / 10000);
1125 a_etaphi -=
sideC * 10000;
1126 is_mirr =
static_cast<int>(a_etaphi / 1000);
1127 a_etaphi -= is_mirr * 1000;
1128 eta =
static_cast<int>(a_etaphi / 100);
1129 phi = a_etaphi -
eta * 100;
1136 ATH_MSG_WARNING(
"Muon station not found! " << vname <<
"," << eta <<
","
1140 if (vname.compare(0, 1,
"T") == 0 || vname.compare(0, 1,
"C") == 0) {
1141 stName = vname.substr(0, 4);
1143 stName = (vname.substr(0, vname.size() - 8));
1144 if (stName.compare(0, 1,
"B") == 0 &&
eta < 0) {
1145 stName = vname.substr(0, vname.size() - 8) +
"-";
1151 bool is_valid{
false};
1152 if (
m_idHelperSvc->hasCSC() && stName.compare(0, 1,
"C") == 0) {
1157 if (vname.compare(0, 1,
"C") == 0) {
1159 if (transf.translation().z() < 0)
1161 double phic = transf.translation().phi() + 0.1;
1163 static_cast<int>(phic < 0 ? 4 * phic /
M_PI + 8 : 4 * phic /
M_PI);
1165 if (vname.compare(0, 1,
"T") == 0) {
1167 std::string sub = vname.substr(7, 2);
1168 if (transf.translation().z() < 0)
1172 else if (sub ==
"02")
1174 else if (sub ==
"03")
1176 else if (sub ==
"04")
1178 else if (sub ==
"05")
1180 else if (sub ==
"06")
1182 else if (sub ==
"07")
1184 else if (sub ==
"08")
1186 else if (sub ==
"09")
1188 else if (sub ==
"10")
1190 else if (sub ==
"11")
1192 else if (sub ==
"12")
1194 else if (sub ==
"13")
1196 else if (sub ==
"14")
1198 else if (sub ==
"15")
1200 else if (sub ==
"16")
1202 else if (sub ==
"17")
1204 else if (sub ==
"18")
1206 else if (sub ==
"19")
1208 else if (sub ==
"20")
1210 else if (sub ==
"21")
1212 else if (sub ==
"22")
1216 int etaSt =
eta - 4;
1219 double phic = transf.translation().phi();
1220 if (vname.compare(2, 1,
"E") == 0 && vname.compare(0, 3,
"T4E") != 0)
1221 phi =
static_cast<int>(phic < 0 ? 24 * phic /
M_PI + 48
1222 : 24 * phic /
M_PI);
1224 phi =
static_cast<int>(phic < 0 ? 12 * phic /
M_PI + 24
1225 : 12 * phic /
M_PI);
1227 stId =
m_idHelperSvc->tgcIdHelper().elementID(vname.substr(0, 3), etaSt,
1229 }
else if (
m_idHelperSvc->hasRPC() && stName.compare(0, 3,
"BML") == 0) {
1232 }
else if (
m_idHelperSvc->hasMDT() && stName.compare(0, 1,
"C") != 0) {
1236 if (!is_valid || !stId.get_compact()) {
1238 << vname <<
"," << eta <<
"," << phi);
1239 if (!stId.get_compact())
◆ retrieveGMsensitive()
Definition at line 745 of file MuonStationBuilderImpl.cxx.
749 std::vector<std::pair<
const GeoVPhysVol*,
750 std::vector<GMInfo>>> sensitive;
758 if (sTGC_top && sTGC_top !=
top) {
759 ATH_MSG_DEBUG(
"sTGC GeoModel branch found:" << sTGC_top->getLogVol()->getName());
760 GeoVolumeCursor vol(sTGC_top);
761 while (!vol.atEnd()) {
762 const GeoVPhysVol* cv = vol.getVolume();
763 const std::string& vname = cv->getLogVol()->getName();
764 if (vname.find(
"sTGC_1") == std::string::npos) {
768 std::vector<std::pair<
const GeoVPhysVol*,
771 while (
it < sensitive.end()) {
772 if (vname == (*it).first->getLogVol()->getName() &&
778 if (
it == sensitive.end()) {
779 std::vector<std::pair<Amg::Transform3D, int>> cloneList;
781 std::make_pair(vol.getTransform(), 0));
782 sensitive.push_back(std::make_pair(cv, cloneList));
786 double phiTr = transf.translation().phi();
787 if (phiTr > -0.001 && phiTr < 0.4)
788 (*it).second.insert((*it).second.begin(),
789 std::make_pair(vol.getTransform(), 0));
791 (*it).second.push_back(std::make_pair(vol.getTransform(), 0));
797 if (MM_top && MM_top !=
top) {
798 ATH_MSG_DEBUG(
"MM GeoModel branch found:" << MM_top->getLogVol()->getName());
799 GeoVolumeCursor vol(MM_top);
800 while (!vol.atEnd()) {
801 const GeoVPhysVol* cv = vol.getVolume();
802 const std::string& vname = cv->getLogVol()->getName();
803 if (vname.find(
"MM_1") == std::string::npos) {
807 std::vector<std::pair<
const GeoVPhysVol*,
810 while (
it < sensitive.end()) {
811 if (vname == (*it).first->getLogVol()->getName() &&
817 if (
it == sensitive.end()) {
818 std::vector<std::pair<Amg::Transform3D, int>> cloneList;
819 cloneList.push_back(std::make_pair(vol.getTransform(), 0));
820 sensitive.push_back(std::make_pair(cv, cloneList));
824 double phiTr = transf.translation().phi();
825 if (phiTr > -0.001 && phiTr < 0.4)
826 (*it).second.insert((*it).second.begin(), std::make_pair(vol.getTransform(), 0));
828 (*it).second.push_back(std::make_pair(vol.getTransform(), 0));
834 GeoVolumeCursor vol(
top);
835 while (!vol.atEnd()) {
836 const GeoVPhysVol* cv = &(*(vol.getVolume()));
837 const std::string& vname = cv->getLogVol()->getName();
838 if (vname.find(
"Station") == std::string::npos &&
839 vname.find(
"MM_1") == std::string::npos &&
840 vname.find(
"sTGC_1") == std::string::npos) {
846 if (vname.substr(0, 1) ==
"T") {
849 const GeoLogVol* tlv = tv->getLogVol();
851 const std::string& tgc_name = tlv->getName();
853 std::vector<std::pair<
const GeoVPhysVol*,
856 while (
it < sensitive.end()) {
857 if (tgc_name == (*it).first->getLogVol()->getName() &&
864 if (
it == sensitive.end()) {
865 std::vector<std::pair<Amg::Transform3D, int>> cloneList;
866 cloneList.push_back(std::make_pair(
transform, vol.getId()));
867 sensitive.push_back(std::make_pair(tv, cloneList));
871 double phiTr = transf.translation().phi();
872 if (phiTr > -0.001 && phiTr < 0.4)
873 (*it).second.insert((*it).second.begin(),
876 (*it).second.push_back(std::make_pair(
transform, vol.getId()));
883 std::vector<std::pair<
const GeoVPhysVol*,
886 while (
it < sensitive.end()) {
887 if (vname == (*it).first->getLogVol()->getName() &&
893 if (
it == sensitive.end()) {
894 std::vector<std::pair<Amg::Transform3D, int>> cloneList;
895 cloneList.push_back(std::make_pair(vol.getTransform(), vol.getId()));
896 sensitive.push_back(std::make_pair(cv, cloneList));
900 double phiTr = transf.translation().phi();
901 if (phiTr > -0.001 && phiTr < 0.4)
902 (*it).second.insert((*it).second.begin(),
903 std::make_pair(vol.getTransform(), vol.getId()));
905 (*it).second.push_back(std::make_pair(vol.getTransform(), vol.getId()));
911 ATH_MSG_DEBUG(
"Number of muon station types in GeoModel tree:" << sensitive.size());
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_buildBarrel
Gaudi::Property<bool> Muon::MuonStationBuilderImpl::m_buildBarrel {this, "BuildBarrelStations", true} |
|
protectedinherited |
◆ m_buildCsc
Gaudi::Property<bool> Muon::MuonStationBuilderImpl::m_buildCsc {this, "BuildCSCStations", true} |
|
protectedinherited |
◆ m_buildEndcap
Gaudi::Property<bool> Muon::MuonStationBuilderImpl::m_buildEndcap {this, "BuildEndcapStations", true} |
|
protectedinherited |
◆ m_buildTgc
Gaudi::Property<bool> Muon::MuonStationBuilderImpl::m_buildTgc {this, "BuildTGCStations", true} |
|
protectedinherited |
◆ m_detStore
◆ m_evtStore
◆ m_gmBrowser
◆ m_idHelperSvc
Initial value:{
this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
Definition at line 56 of file MuonStationBuilderImpl.h.
◆ m_materialConverter
◆ m_muonMaterial
◆ m_muonMgrReadKey
Initial value:{
this, "MuonMgrReadKey", "MuonDetectorManager", "Key of input MuonMgr"}
Definition at line 36 of file MuonStationBuilderCond.h.
◆ m_muonStationTypeBuilder
Initial value:{
this, "StationTypeBuilder",
"Muon::MuonStationTypeBuilder/"
"MuonStationTypeBuilder"}
Helper Tool to create TrackingVolume Arrays.
Definition at line 91 of file MuonStationBuilderImpl.h.
◆ m_trackingVolumeHelper
Initial value:{
this, "TrackingVolumeHelper",
"Trk::TrackingVolumeHelper/TrackingVolumeHelper"}
Helper Tool to create TrackingVolumes.
Definition at line 98 of file MuonStationBuilderImpl.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_volumeConverter
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
const RpcReadoutElement * getRpcReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
GeoVolumeVec_t geoGetVolumes(const GeoGraphNode *node, int depthLimit=1, int sizeHint=20)
Return the child volumes and associated transforms.
void setRef(double)
set the reference measure
void checkLayerId(std::string_view comment, const MuonGM::MuonDetectorManager *muonMgr, Identifier id, const Trk::Layer *lay) const
Amg::Transform3D * makeTransform(const Amg::Transform3D &trf)
constexpr uint8_t stationPhi
station Phi 1 to 8
virtual const Amg::Transform3D & transform() const override
Return local to global transform.
int getNLayers() const
Returns the number of tube layers inside the multilayer.
virtual const BinUtility * binUtility() const =0
Return the BinUtility.
void setLayerType(int identifier)
set the Layer coding
virtual const Amg::Vector3D & center(const Identifier &) const override final
Return the center of the surface associated with this identifier In the case of silicon it returns th...
virtual const Amg::Vector3D & center() const override
Return the center of the element.
Scalar perp() const
perp method - perpenticular length
bool inside(const Amg::Vector3D &gp, double tol=0.) const
Inside() method for checks.
Trk::GMTreeBrowser m_gmBrowser
const TrackingVolume * trackingVolume() const
returns the TrackingVolume
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
void identifyPrototype(Trk::TrackingVolume &station, int eta, int phi, const Amg::Transform3D &transf, const MuonGM::MuonDetectorManager *muonMgr) const
void identifyNSWLayers(Trk::DetachedTrackingVolume &station, const Identifier &id) const
Amg::Transform3D getTransform() const
const TrackingVolume * associatedSubVolume(const Amg::Vector3D &gp) const
Return the associated sub Volume, returns THIS if no subVolume exists.
Gaudi::Property< bool > m_buildTgc
static Material convert(const GeoMaterial *gm)
Single conversion , input type GeoMaterial - output type Trk::MaterialProperties.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
std::vector< SG::VarHandleKeyArray * > m_vhka
An RpcReadoutElement corresponds to a single RPC module; therefore typicaly a barrel muon station con...
#define ATH_MSG_VERBOSE(x)
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
std::vector< std::pair< const GeoVPhysVol *, std::vector< GMInfo > > > retrieveGMsensitive(const MuonGM::MuonDetectorManager *muonMgr) const
const Amg::Vector3D & center() const
Returns the center position of the Surface.
virtual const Trk::PlaneSurface & surface() const override
access to chamber surface (phi orientation), uses the first gas gap
value_type get_compact() const
Get the compact id.
virtual unsigned int arrayObjectsNumber() const =0
Number of Entries in the Array.
int layerType() const
get the Layer coding
Amg::Vector3D channelPos(const Identifier &id) const
Returns the position of the active channel (wireGang or strip)
virtual void setOwner(IDataHandleHolder *o)=0
Amg::Transform3D getRotateZ3D(double angle)
get a rotation transformation around Z-axis
const LayerArray * confinedLayers() const
Return the subLayer array.
const TgcReadoutElement * getTgcReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
virtual StatusCode initialize() override
int compareGeoVolumes(const GeoVPhysVol *gv1, const GeoVPhysVol *gv2, double tolerance, bool printFullInfo=false, int level=0) const
Recursive comparison of trees/branches/volumes : in quiet mode (printFullInfo=False) ,...
virtual bool isOnSurface(const Amg::Vector3D &glopo, const BoundaryCheck &bchk=true, double tol1=0., double tol2=0.) const
This method returns true if the GlobalPosition is on the Surface for both, within or without check of...
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
virtual const Surface & surfaceRepresentation() const =0
Transforms the layer into a Surface representation for extrapolation.
void glueComponents(Trk::DetachedTrackingVolume *) const
const MdtReadoutElement * getMdtReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
ToolHandle< Muon::MuonStationTypeBuilder > m_muonStationTypeBuilder
Helper Tool to create TrackingVolume Arrays.
const CscReadoutElement * getCscReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
CalibratedSpacePoint::Covariance_t inverse(const CalibratedSpacePoint::Covariance_t &mat)
Inverts the parsed matrix.
Eigen::Affine3d Transform3D
bool doesNotDeform(const Amg::Transform3D &trans)
Checks whether the linear part of the transformation rotates or stetches any of the basis vectors.
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
A TgcReadoutElement corresponds to a single TGC chamber; therefore typically a TGC station contains s...
ToolHandle< Trk::ITrackingVolumeHelper > m_trackingVolumeHelper
Helper Tool to create TrackingVolumes.
static const GeoVPhysVol * findTopBranch(const GeoVPhysVol *gv, std::string_view name)
search of top branch : returns mother volume for children matching name
std::unique_ptr< Trk::DetachedTrackingVolume > buildDetachedTrackingVolumeType(const MuonGM::MuonDetectorManager *muonMgr, const GeoVPhysVol *gv, GMInfo info) const
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
static constexpr int NTgcStEtaOffset
Trk::GeoMaterialConverter m_materialConverter
Identifier resolveId(std::string vname, GMInfo gm_info, int &eta, int &phi, const MuonGM::MuonDetectorManager *muonMgr) const
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
DetachedTrackingVolume * clone(const std::string &name, Amg::Transform3D &shift) const
clone with transform
static constexpr int NCscStEtaOffset
Identifier <-> AMDB conversion constants in use.
const std::string & volumeName() const
Returns the VolumeName - for debug reason, might be depreciated later.
Identifier channelID(int stationName, int stationEta, int stationPhi, int chamberLayer, int wireLayer, int measuresPhi, int strip) const
std::string to_string(const DetectorType &type)
void getNSWStationsForTranslation(const GeoVPhysVol *pv, const std::string &name, const Amg::Transform3D &, std::vector< std::pair< std::pair< const GeoLogVol *, Trk::MaterialProperties * >, std::vector< Amg::Transform3D >>> &vols, std::vector< std::string > &volNames) const
Amg::Vector3D stripPos(const Identifier &id) const
virtual BinnedArraySpan< T *const > arrayObjects()=0
Return all objects of the Array non-const we can still modify the T.
const std::string & name() const
returns the Name
StatusCode initialize(bool used=true)
Amg::Transform3D getRotateY3D(double angle)
get a rotation transformation around Y-axis
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_muonMgrReadKey
Eigen::Matrix< double, 3, 1 > Vector3D
virtual int numberOfLayers(bool measphi=true) const override final
number of layers in phi/eta projection, same for eta/phi planes
const MuonStation * getMuonStation(const std::string &stName, int eta, int phi) const
Gaudi::Property< bool > m_buildEndcap
Amg::Vector3D tubePos(const Identifier &id) const
Returns the global position of the given tube.
#define ATH_MSG_WARNING(x)
const boost::regex ref(r_ef)
const TrackingVolumeArray * confinedVolumes() const
Return the subLayer array.
Identifier identify() const override final
Returns the ATLAS Identifier of the MuonReadOutElement.
unsigned constexpr int sideC
virtual PVConstLink getTreeTop(unsigned int i) const
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
const Layer * layerRepresentation() const
returns layer representation
Trk::Material m_muonMaterial
the material
DetachedVolVec buildDetachedTrackingVolumesImpl(const MuonGM::MuonDetectorManager *muonMgr, bool blend=false) const
Gaudi::Property< bool > m_buildCsc
const CscIdHelper * cscIdHelper() const
virtual const Amg::Transform3D & transform(const Identifier &id) const override final
Return local to global transform associated with this identifier.
constexpr uint8_t stationEta
1 to 3
static constexpr int NTgcStatTypeOff
const Layer * associatedLayer(const Amg::Vector3D &gp) const
Return the associated Layer.
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
std::span< T > BinnedArraySpan
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
void identifyLayers(Trk::DetachedTrackingVolume *, Identifier, int, int, const MuonGM::MuonDetectorManager *) const
Scalar mag() const
mag method
std::vector< ObjType * > release(std::vector< std::unique_ptr< ObjType >> &objVec)
Gaudi::Property< bool > m_buildBarrel
int getStationPhi() const
int getStationEta() const
void addDependency(const EventIDRange &range)
std::vector< std::unique_ptr< Trk::DetachedTrackingVolume > > DetachedVolVec