|  | ATLAS Offline Software
    | 
 
 
 
#include <MdtCalibInput.h>
|  | 
|  | MdtCalibInput (const Identifier &id, const int16_t adc, const int16_t tdc, const MuonGMR4::MdtReadoutElement *reEle, const ActsTrk::GeometryContext &gctx) | 
|  | Minimal constructor in the PhaseII geomerty setup.  More... 
 | 
|  | 
|  | MdtCalibInput (const Identifier &id, const int16_t adc, const int16_t tdc, const MuonGM::MdtReadoutElement *reEle) | 
|  | Minimal constructor in the legacy geomerty setup.  More... 
 | 
|  | 
|  | MdtCalibInput (const MdtDigit &digit, const MuonGM::MuonDetectorManager &detMgr) | 
|  | Constructor taking the Mdt digit & the legacy II detector manager.  More... 
 | 
|  | 
|  | MdtCalibInput (const MdtDigit &digit, const MuonGMR4::MuonDetectorManager &detMgr, const ActsTrk::GeometryContext &gctx) | 
|  | Constructor taking the Mdt digit & the Phase II detector manager.  More... 
 | 
|  | 
|  | MdtCalibInput (const Muon::MdtPrepData &prd) | 
|  | Constructor taking the MdtPrepdata.  More... 
 | 
|  | 
|  | MdtCalibInput (const xAOD::MdtDriftCircle &prd, const ActsTrk::GeometryContext &gctx) | 
|  | Constructor taking taking the xAOD::MdtDriftCircle.  More... 
 | 
|  | 
|  | MdtCalibInput (MdtCalibInput &&other)=default | 
|  | 
| MdtCalibInput & | operator= (MdtCalibInput &&other)=default | 
|  | 
|  | ~MdtCalibInput () | 
|  | 
| const Identifier & | identify () const | 
|  | Returns the Identifier of the hit.  More... 
 | 
|  | 
| int16_t | tdc () const | 
|  | Returns the tdc counts of the hit.  More... 
 | 
|  | 
| int16_t | adc () const | 
|  | Returns the amount of accumulated charge.  More... 
 | 
|  | 
| const MuonGM::MdtReadoutElement * | legacyDescriptor () const | 
|  | Returns the legacy readout element.  More... 
 | 
|  | 
| const MuonGMR4::MdtReadoutElement * | decriptor () const | 
|  | Returns the R4 readout element.  More... 
 | 
|  | 
| const Amg::Vector3D & | closestApproach () const | 
|  | Returns the point of closest approach to the wire.  More... 
 | 
|  | 
| void | setClosestApproach (const Amg::Vector3D &approach) | 
|  | Sets the closest approach.  More... 
 | 
|  | 
| const Amg::Vector3D & | trackDirection () const | 
|  | Returns the track direction (Can be zero)  More... 
 | 
|  | 
| void | setTrackDirection (const Amg::Vector3D &trackDir, bool hasPhi) | 
|  | Sets the direction of the externally determined track.  More... 
 | 
|  | 
| bool | trackDirHasPhi () const | 
|  | Returns whether the track has a phi constaint or not.  More... 
 | 
|  | 
| double | timeOfFlight () const | 
|  | Returns the time of flight.  More... 
 | 
|  | 
| void | setTimeOfFlight (const double toF) | 
|  | Sets the time of flight (Usually globPos.mag() * inverseSpeed of light)  More... 
 | 
|  | 
| double | triggerTime () const | 
|  | Returns the trigger offset time.  More... 
 | 
|  | 
| void | setTriggerTime (const double trigTime) | 
|  | Sets the trigger offset time.  More... 
 | 
|  | 
| double | distanceToTrack () const | 
|  | Returns the distance to track (signed)  More... 
 | 
|  | 
| Amg::Vector2D | projectMagneticField (const Amg::Vector3D &fieldInGlob) const | 
|  | Splits the B-field into the components that point along the transverse track direction & along the tube wire.  More... 
 | 
|  | 
| double | signalPropagationDistance () const | 
|  | Calculates the distance that the signal has to travel along the wire.  More... 
 | 
|  | 
| const Trk::StraightLineSurface & | legacySurface () const | 
|  | Returns the assocaited ideal surface (Throw exception if no legacy RE is available)  More... 
 | 
|  | 
| const Amg::Vector3D & | surfaceCenter () const | 
|  | Returns the center of the associated surface.  More... 
 | 
|  | 
| double | tubeLength () const | 
|  | Returns the tube length.  More... 
 | 
|  | 
| double | readOutSide () const | 
|  | Returns the sign of the readout position in local coordinates.  More... 
 | 
|  | 
| double | innerTubeR () const | 
|  | Returns the inner tube radius.  More... 
 | 
|  | 
Definition at line 36 of file MdtCalibInput.h.
 
◆ ReadoutEle_t
Variant type to store the legacy & Phase-II style readout geometry in a single variable. 
Definition at line 161 of file MdtCalibInput.h.
 
 
◆ BFieldComp
◆ MdtCalibInput() [1/7]
Minimal constructor in the PhaseII geomerty setup. 
It takes all necessary ingredients to run later the calibration loop. 
- Parameters
- 
  
    | id | Identifier of the hit to calibrate |  | adc | Recorded adc counts from the tube |  | tdc | Recorded tdc counts from the tube |  | detMgr | Pointer to the associated readout element |  | gctx | Geometry context to globally align the tube within ATLAS |  
 
Definition at line 32 of file MdtCalibInput.cxx.
   42    m_hash{std::get<const MuonGMR4::MdtReadoutElement*>(
m_RE)->measurementHash(
m_id)}  {}
 
 
 
 
◆ MdtCalibInput() [2/7]
Minimal constructor in the legacy geomerty setup. 
It takes all necessary ingredients to run later the calibration loop. 
- Parameters
- 
  
    | id | Identifier of the hit to calibrate |  | adc | Recorded adc counts from the tube |  | tdc | Recorded tdc counts from the tube |  | reEle | Pointer to the associated readout element 
 |  
 
Definition at line 50 of file MdtCalibInput.cxx.
 
 
◆ MdtCalibInput() [3/7]
Constructor taking the Mdt digit & the legacy II detector manager. 
- Parameters
- 
  
    | digit | Digit containing all adc & tdc information |  | detMgr | Reference to the Detector manager to fetch the Proper readout element |  | gctx | Geometry context to globally align the tube within ATLAS |  
 
Definition at line 59 of file MdtCalibInput.cxx.
 
 
◆ MdtCalibInput() [4/7]
Constructor taking the Mdt digit & the Phase II detector manager. 
- Parameters
- 
  
    | digit | Digit containing all adc & tdc information |  | detMgr | Reference to the Detector manager to fetch the Proper readout element |  | gctx | Geometry context to globally align the tube within ATLAS |  
 
Definition at line 44 of file MdtCalibInput.cxx.
   48                  detMgr.getMdtReadoutElement(
digit.identify()), gctx){}
 
 
 
 
◆ MdtCalibInput() [5/7]
◆ MdtCalibInput() [6/7]
Constructor taking taking the xAOD::MdtDriftCircle. 
- Parameters
- 
  
    | prd | Reference to the uncalibrated Drift circle |  | gctx | Geometry context to place the drift circle globally within ATLAS |  
 
Definition at line 65 of file MdtCalibInput.cxx.
 
 
◆ MdtCalibInput() [7/7]
◆ ~MdtCalibInput()
  
  | 
        
          | MdtCalibInput::~MdtCalibInput | ( |  | ) |  |  | default | 
 
 
◆ adc()
      
        
          | int16_t MdtCalibInput::adc | ( |  | ) | const | 
      
 
 
◆ center()
Translational part of the local -> global transform. 
Definition at line 203 of file MdtCalibInput.cxx.
 
 
◆ closestApproach()
Returns the point of closest approach to the wire. 
Definition at line 105 of file MdtCalibInput.cxx.
 
 
◆ decriptor()
Returns the R4 readout element. 
Definition at line 96 of file MdtCalibInput.cxx.
   98          using REType = std::decay_t<decltype(
re)>;
 
   99          if constexpr( std::is_same_v<REType, const MuonGMR4::MdtReadoutElement*>){
 
 
 
 
◆ distanceToTrack()
      
        
          | double MdtCalibInput::distanceToTrack | ( |  | ) | const | 
      
 
 
◆ identify()
◆ innerTubeR()
      
        
          | double MdtCalibInput::innerTubeR | ( |  | ) | const | 
      
 
Returns the inner tube radius. 
Definition at line 169 of file MdtCalibInput.cxx.
  170    const double tubeR = std::visit([](
const auto& 
re) -> 
double {
 
  171        using REType = std::decay_t<decltype(
re)>;
 
  172       if constexpr(std::is_same_v<REType, const MuonGMR4::MdtReadoutElement*>){
 
  173          return re->innerTubeRadius();
 
  174       } 
else if (std::is_same_v<REType, const MuonGM::MdtReadoutElement*>) {
 
  175          return re->innerTubeRadius();
 
 
 
 
◆ legacyDescriptor()
Returns the legacy readout element. 
Definition at line 87 of file MdtCalibInput.cxx.
   89          using REType = std::decay_t<decltype(
re)>;
 
   90          if constexpr( std::is_same_v<REType, const MuonGM::MdtReadoutElement*>){
 
 
 
 
◆ legacySurface()
Returns the assocaited ideal surface (Throw exception if no legacy RE is available) 
Definition at line 138 of file MdtCalibInput.cxx.
  140    assert(
re != 
nullptr);
 
 
 
 
◆ localToGlobal()
Local to global transformation of the tube. 
Definition at line 192 of file MdtCalibInput.cxx.
  194          using REType = std::decay_t<decltype(
re)>;
 
  195          if constexpr(std::is_same_v<REType, const MuonGMR4::MdtReadoutElement*>){
 
  196             assert(
m_gctx != 
nullptr);
 
  198          } 
else if (std::is_same_v<REType, const MuonGM::MdtReadoutElement*>) {
 
 
 
 
◆ operator=()
◆ projectMagneticField()
Splits the B-field into the components that point along the transverse track direction & along the tube wire. 
Rotate the B-field into the rest frame of the tube (Z-axis along the wire)
In the local coordinate system, the wire points along the z-axis
Convert kilo tesla into tesla... Waaait whaat?
Definition at line 125 of file MdtCalibInput.cxx.
  132    const double perpendComp = locTrkDir.block<2,1>(0,0).
dot(locBField.block<2,1>(0,0)) 
 
  134    const double paralelComp = locBField.z();
 
 
 
 
◆ readOutSide()
      
        
          | double MdtCalibInput::readOutSide | ( |  | ) | const | 
      
 
Returns the sign of the readout position in local coordinates. 
By convention the new readout geometry points along the negative z-axis
Definition at line 180 of file MdtCalibInput.cxx.
  182    const double roSide = std::visit([
this](
const auto& 
re) ->
double{
 
  183                using REType = std::decay_t<decltype(
re)>;
 
  184                if constexpr(std::is_same_v<REType, const MuonGMR4::MdtReadoutElement*>){
 
  185                   return re->getParameters().readoutSide;
 
  186                } 
else if (std::is_same_v<REType, const MuonGM::MdtReadoutElement*>) {
 
  187                   return re->tubeFrame_localROPos(
identify()).z() > 0. ? 1. : -1.;
 
 
 
 
◆ setClosestApproach()
◆ setTimeOfFlight()
      
        
          | void MdtCalibInput::setTimeOfFlight | ( | const double | toF | ) |  | 
      
 
Sets the time of flight (Usually globPos.mag() * inverseSpeed of light) 
Definition at line 116 of file MdtCalibInput.cxx.
 
 
◆ setTrackDirection()
Sets the direction of the externally determined track. 
- Parameters
- 
  
    | trackDir | Direction vector of the track (global frame) |  | hasPhi | Flag whether the track direction contains phi information |  
 
Definition at line 110 of file MdtCalibInput.cxx.
 
 
◆ setTriggerTime()
      
        
          | void MdtCalibInput::setTriggerTime | ( | const double | trigTime | ) |  | 
      
 
 
◆ signalPropagationDistance()
      
        
          | double MdtCalibInput::signalPropagationDistance | ( |  | ) | const | 
      
 
Calculates the distance that the signal has to travel along the wire. 
Definition at line 143 of file MdtCalibInput.cxx.
  144    const double propDist = std::visit([
this](
const auto& 
re) ->
double {
 
  145                using REType = std::decay_t<decltype(
re)>;
 
  146                if constexpr(std::is_same_v<REType, const MuonGMR4::MdtReadoutElement*>){
 
  147                   assert(
m_gctx != 
nullptr);
 
  149                } 
else if (std::is_same_v<REType, const MuonGM::MdtReadoutElement*>) {
 
 
 
 
◆ surfaceCenter()
◆ tdc()
      
        
          | int16_t MdtCalibInput::tdc | ( |  | ) | const | 
      
 
 
◆ timeOfFlight()
      
        
          | double MdtCalibInput::timeOfFlight | ( |  | ) | const | 
      
 
 
◆ trackDirection()
◆ trackDirHasPhi()
      
        
          | bool MdtCalibInput::trackDirHasPhi | ( |  | ) | const | 
      
 
Returns whether the track has a phi constaint or not. 
Definition at line 114 of file MdtCalibInput.cxx.
 
 
◆ triggerTime()
      
        
          | double MdtCalibInput::triggerTime | ( |  | ) | const | 
      
 
 
◆ tubeLength()
      
        
          | double MdtCalibInput::tubeLength | ( |  | ) | const | 
      
 
Returns the tube length. 
Definition at line 158 of file MdtCalibInput.cxx.
  159    const double tubeLength  = std::visit([
this](
const auto& 
re) ->
double{
 
  160                using REType = std::decay_t<decltype(
re)>;
 
  161                if constexpr(std::is_same_v<REType, const MuonGMR4::MdtReadoutElement*>){
 
  163                } 
else if (std::is_same_v<REType, const MuonGM::MdtReadoutElement*>) {
 
 
 
 
◆ m_adc
  
  | 
        
          | int16_t MdtCalibInput::m_adc {0} |  | private | 
 
 
◆ m_approach
◆ m_distToTrack
  
  | 
        
          | double MdtCalibInput::m_distToTrack {0.} |  | private | 
 
 
◆ m_gctx
Geometry context, needed to fetch the alignment. 
Definition at line 159 of file MdtCalibInput.h.
 
 
◆ m_hash
◆ m_id
◆ m_RE
Pointer to the associated readout element. 
Definition at line 163 of file MdtCalibInput.h.
 
 
◆ m_tdc
  
  | 
        
          | int16_t MdtCalibInput::m_tdc {0} |  | private | 
 
 
◆ m_ToF
◆ m_trackDir
◆ m_trackHasPhi
  
  | 
        
          | bool MdtCalibInput::m_trackHasPhi {false} |  | private | 
 
Does the track direction contain a phi constraint. 
Definition at line 171 of file MdtCalibInput.h.
 
 
◆ m_trigTime
  
  | 
        
          | double MdtCalibInput::m_trigTime {0.} |  | private | 
 
 
◆ s_inverseSpeed
  
  | 
        
          | constexpr double MdtCalibInput::s_inverseSpeed {1. / Gaudi::Units::c_light} |  | staticconstexprprivate | 
 
 
The documentation for this class was generated from the following files:
 
int16_t tdc() const
Returns the TDC (typically range is 0 to 2500)
Eigen::Matrix< double, 2, 1 > Vector2D
IdentifierHash measurementHash() const
Returns the hash of the measurement channel (tube (x) layer)
const Identifier & identify() const
: Returns the Athena identifier of the drift circle.
const Amg::Vector3D & center() const
Returns the center position of the Surface.
int adc() const
Returns the ADC (typically range is 0 to 250)
setScaleOne setStatusOne setSaturated int16_t
const MuonGMR4::MdtReadoutElement * readoutElement() const
Retrieve the associated MdtReadoutElement.
const MdtReadoutElement * getMdtReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
Amg::Vector3D localMeasurementPos() const
: Return the measurement's position vector in the local frame.
Eigen::Affine3d Transform3D
virtual const Amg::Vector3D & globalPosition() const
Returns the global position of the CENTER of the drift tube (i.e.
def dot(G, fn, nodesToHighlight=[])
Identifier identify() const
return the identifier
int16_t adc() const
Returns the ADC (typically range is 0 to 250)
int tdc() const
Returns the TDC (typically range is 0 to 2500).
Eigen::Matrix< double, 3, 1 > Vector3D
const boost::regex re(r_e)
virtual const Trk::Surface & surface() const override final
Return surface associated with this detector element.
virtual const MuonGM::MdtReadoutElement * detectorElement() const override
Returns the detector element corresponding to this PRD.