|
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 194 of file MdtIntersectGeometry.cxx.
195 if ((mydetEl->
getStationName()).find(
"BMG") != std::string::npos) {
196 PVConstLink cv = mydetEl->getMaterialGeom();
197 int nGrandchildren = cv->getNChildVols();
198 if (nGrandchildren <= 0)
return;
200 std::vector<int> tubes;
201 geoGetIds([&](
int id) { tubes.push_back(
id); }, &*cv);
215 if (
it != tubes.end() && *
it == want_id) {
218 it = std::lower_bound(tubes.begin(), tubes.end(), want_id);
219 if (
it != tubes.end() && *
it == want_id) {
228 <<
"), phi(" <<
phi <<
"), eta(" <<
eta <<
"), name(" <<
name <<
") and adding multilayerId("
229 << deadTubeMLId <<
")." <<
endmsg;
◆ init()
void Muon::MdtIntersectGeometry::init |
( |
MsgStream & |
msg | ) |
|
|
private |
Definition at line 93 of file MdtIntersectGeometry.cxx.
118 msg << MSG::WARNING <<
"MdtIntersectGeometry::init() - failed to get readout element for ML0" <<
endmsg;
135 bool goodMl0{
false}, goodMl1{
false};
143 int firstMlIndex = 1;
144 if (goodMl0 && !goodMl1) {
147 }
else if (!goodMl0 && goodMl1) {
152 firstIdml0 = firstIdml1;
154 }
else if (!goodMl0 && !goodMl1) {
155 msg << MSG::WARNING <<
"MdtIntersectGeometry::init() - neither multilayer is good" <<
endmsg;
183 double tubeDist = (secondTubeMl0 - firstTubeMl0).
y();
184 double tubeStage = (firstTubeMl0lay1 - firstTubeMl0).
y();
185 double layDist = (firstTubeMl0lay1 - firstTubeMl0).
z();
187 m_mdtGeometry = std::make_unique<TrkDriftCircleMath::MdtChamberGeometry>(
188 m_chid,
m_idHelperSvc, nml, nlay, ntube0, ntube1, firstTube0, firstTube1, tubeDist, tubeStage, layDist,
m_detElMl0->
center().theta());
191 if (!goodMl0 && goodMl1)
m_mdtGeometry->isSecondMultiLayer(
true);
◆ intersection()
Implements Muon::MuonIntersectGeometry.
Definition at line 31 of file MdtIntersectGeometry.cxx.
35 log << MSG::WARNING <<
"MdtIntersectGeometry::intersection() - MdtIntersectGeometry not correctly initialized "
43 double dxdy = std::abs(ldir.y()) > 0.001 ? ldir.x() / ldir.y() : 1000.;
45 double lineAngle = std::atan2(ldir.z(), ldir.y());
54 for (; dit != dit_end; ++dit) {
57 double xint = dxdy * (dit->position().x() - lpos.y()) + lpos.x();
63 intersects.emplace_back(tubeid, dit->dr(), distWall);
65 intersect.setTubeIntersects(std::move(intersects));
◆ mdtChamberGeometry()
◆ operator=()
◆ transform()
◆ tubeLength()
double Muon::MdtIntersectGeometry::tubeLength |
( |
const int |
ml, |
|
|
const int |
layer, |
|
|
const int |
tube |
|
) |
| const |
|
private |
Definition at line 70 of file MdtIntersectGeometry.cxx.
72 if (ml < 0 || ml > 1){
73 THROW_EXCEPTION(__func__<<
"() got called with ml="<<ml<<
" which is definetly out of range");
75 if (layer < 0 || layer > 3) {
76 THROW_EXCEPTION(__func__<<
"() got called with layer="<<
layer<<
" which is definetly out of range");
79 THROW_EXCEPTION(__func__<<
"() got called with tube="<<
tube<<
" which is definetly out of range");
83 int theTube =
tube + 1;
84 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_detElMl0
◆ m_detElMl1
◆ m_detMgr
◆ 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 MuonGM::MdtReadoutElement * m_detElMl0
const IMuonIdHelperSvc * m_idHelperSvc
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...
virtual Amg::Transform3D GlobalToAmdbLRSTransform() const
std::shared_ptr< TrkDriftCircleMath::MdtChamberGeometry > m_mdtGeometry
int stationName(const Identifier &id) const
#define THROW_EXCEPTION(MSG)
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
unsigned int nMDTinStation() const
How many MDT chambers are in the station.
void init(MsgStream &msg)
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
double tubeLength(const int ml, const int layer, const int tube) const
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.
const MuonGM::MdtReadoutElement * m_detElMl1
std::optional< double > intersect(const AmgVector(N)&posA, const AmgVector(N)&dirA, const AmgVector(N)&posB, const AmgVector(N)&dirB)
Calculates the point of closest approach of two lines.
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.
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.
const MuonGM::MuonDetectorManager * m_detMgr
bool isGoodMultilayer(const Identifier &Id) const
Amg::Transform3D m_transform