 |
ATLAS Offline Software
|
#include <MdtIntersectGeometry.h>
Definition at line 23 of file MdtIntersectGeometry.h.
◆ MdtIntersectGeometry() [1/2]
◆ MdtIntersectGeometry() [2/2]
◆ ~MdtIntersectGeometry()
Muon::MdtIntersectGeometry::~MdtIntersectGeometry |
( |
| ) |
|
|
virtualdefault |
◆ chamberId()
◆ fillDeadTubes()
Definition at line 204 of file MdtIntersectGeometry.cxx.
205 if ((mydetEl->
getStationName()).find(
"BMG") != std::string::npos) {
206 PVConstLink cv = mydetEl->getMaterialGeom();
207 int nGrandchildren = cv->getNChildVols();
208 if (nGrandchildren <= 0)
return;
210 std::vector<int> tubes;
211 geoGetIds([&](
int id) { tubes.push_back(
id); }, &*cv);
225 if (
it != tubes.end() && *
it == want_id) {
228 it = std::lower_bound(tubes.begin(), tubes.end(), want_id);
229 if (
it != tubes.end() && *
it == want_id) {
238 <<
"), phi(" <<
phi <<
"), eta(" <<
eta <<
"), name(" <<
name <<
") and adding multilayerId("
239 << deadTubeMLId <<
")." <<
endmsg;
◆ init()
Definition at line 100 of file MdtIntersectGeometry.cxx.
125 msg << MSG::WARNING <<
"MdtIntersectGeometry::init() - failed to get readout element for ML0" <<
endmsg;
142 bool goodMl0{
false}, goodMl1{
false};
150 int firstMlIndex = 1;
151 if (goodMl0 && !goodMl1) {
154 }
else if (!goodMl0 && goodMl1) {
159 firstIdml0 = firstIdml1;
161 }
else if (!goodMl0 && !goodMl1) {
162 msg << MSG::WARNING <<
"MdtIntersectGeometry::init() - neither multilayer is good" <<
endmsg;
190 double tubeDist = (secondTubeMl0 - firstTubeMl0).
y();
191 double tubeStage = (firstTubeMl0lay1 - firstTubeMl0).
y();
192 double layDist = (firstTubeMl0lay1 - firstTubeMl0).
z();
194 m_mdtGeometry = std::make_unique<TrkDriftCircleMath::MdtChamberGeometry>(
195 m_chid,
m_idHelperSvc, nml, nlay, ntube0, ntube1, firstTube0, firstTube1, tubeDist, tubeStage, layDist, detElMl0->
center().theta());
198 if (!goodMl0 && goodMl1)
m_mdtGeometry->isSecondMultiLayer(
true);
◆ intersection()
Implements Muon::MuonIntersectGeometry.
Definition at line 31 of file MdtIntersectGeometry.cxx.
36 log << MSG::WARNING <<
"MdtIntersectGeometry::intersection() - MdtIntersectGeometry not correctly initialized "
44 double dxdy = std::abs(ldir.y()) > 0.001 ? ldir.x() / ldir.y() : 1000.;
46 double lineAngle = std::atan2(ldir.z(), ldir.y());
58 for (; dit != dit_end; ++dit) {
61 double xint = dxdy * (dit->position().x() - lpos.y()) + lpos.x();
66 double distWall = std::abs(xint) - 0.5 *
tubeLength(detElMl0, detElMl1,
68 intersects.emplace_back(tubeid, dit->dr(), distWall);
70 intersect.setTubeIntersects(std::move(intersects));
◆ mdtChamberGeometry()
◆ operator=()
◆ transform()
◆ tubeLength()
Definition at line 75 of file MdtIntersectGeometry.cxx.
79 if (ml < 0 || ml > 1){
80 THROW_EXCEPTION(__func__<<
"() got called with ml="<<ml<<
" which is definetly out of range");
82 if (layer < 0 || layer > 3) {
83 THROW_EXCEPTION(__func__<<
"() got called with layer="<<
layer<<
" which is definetly out of range");
86 THROW_EXCEPTION(__func__<<
"() got called with tube="<<
tube<<
" which is definetly out of range");
90 int theTube =
tube + 1;
91 int theLayer =
layer + 1;
◆ m_chid
◆ m_dbData
◆ m_deadTubes
std::vector<Identifier> Muon::MdtIntersectGeometry::m_deadTubes {} |
|
private |
◆ m_deadTubesML
std::set<Identifier> Muon::MdtIntersectGeometry::m_deadTubesML {} |
|
private |
◆ m_hashMl0
◆ m_hashMl1
◆ m_idHelperSvc
◆ m_mdtGeometry
◆ m_transform
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
int multilayer(const Identifier &id) const
Access to components of the ID.
int getNLayers() const
Returns the number of tube layers inside the multilayer.
const IMuonIdHelperSvc * m_idHelperSvc
Scalar phi() const
phi method
std::string find(const std::string &s)
return a remapped string
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...
Scalar eta() const
pseudorapidity method
virtual Amg::Transform3D GlobalToAmdbLRSTransform() const
std::shared_ptr< TrkDriftCircleMath::MdtChamberGeometry > m_mdtGeometry
IdentifierHash detectorElementHash() const
Returns the IdentifierHash of the detector element.
int stationName(const Identifier &id) const
IMessageSvc * getMessageSvc(bool quiet=false)
const MdtCondDbData * m_dbData
Implementation of 2 dimensional vector class.
std::vector< DriftCircle > DCVec
const Amg::Transform3D & transform() const
std::vector< Identifier > m_deadTubes
const MdtReadoutElement * getMdtReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
const std::string & getStationName() const
double getActiveTubeLength(const int tubeLayer, const int tube) const
void init(const MuonGM::MuonDetectorManager *detMgr, MsgStream &msg)
unsigned int nMDTinStation() const
How many MDT chambers are in the station.
bool is_valid() const
Check if id is in a valid state.
int stationPhi(const Identifier &id) const
std::string print_to_string(Identifier id, const IdContext *context=0) const
or provide the printout in string form
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int tubeLayer, int tube) const
virtual const MdtIdHelper & mdtIdHelper() const =0
access to MdtIdHelper
DCVec::const_iterator DCCit
int stationEta(const Identifier &id) const
Eigen::Matrix< double, 3, 1 > Vector3D
#define THROW_EXCEPTION(MESSAGE)
void geoGetIds(FUNCTION f, const GeoGraphNode *node, int depthLimit=1)
Template helper for running the visitor.
Amg::Vector3D tubePos(const Identifier &id) const
Returns the global position of the given tube.
std::optional< double > intersect(const AmgVector(N)&posA, const AmgVector(N)&dirA, const AmgVector(N)&posB, const AmgVector(N)&dirB)
Calculates the point B' along the line B that's closest to a second line A.
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
const PlainObject unit() const
This is a plugin that makes Eigen look like CLHEP & defines some convenience methods.
std::set< Identifier > m_deadTubesML
Identifier identify() const override final
Returns the ATLAS Identifier of the MuonReadOutElement.
double tubeLength(const MuonGM::MdtReadoutElement *detElMl0, const MuonGM::MdtReadoutElement *detElMl1, const int ml, const int layer, const int tube) const
void fillDeadTubes(const MuonGM::MdtReadoutElement *mydetEl, MsgStream &msg)
Identifier multilayerID(const Identifier &channeldID) const
static constexpr int maxNTubesPerLayer
The maxNTubesPerLayer represents the absolute maximum of tubes which are built into a single multilay...
std::vector< MuonTubeIntersect > TubeIntersects
int getNtubesperlayer() const
Returns the number of tubes in each tube layer.
bool isGoodMultilayer(const Identifier &Id) const
Amg::Transform3D m_transform