ATLAS Offline Software
Classes | Typedefs | Enumerations | Functions | Variables
MuonHough Namespace Reference

Classes

class  Hit
 struct containing all hit information needed for the Hough transform More...
 
class  HitDebugInfo
 struct containing additional debug information on the hits that is not needed for the actual alg but very useful for debugging More...
 
struct  MuonDebugInfo
 struct containing truth or track information More...
 
class  MuonDetectorDescription
 class managing geometry of the Hough spaces More...
 
class  MuonDetectorHough
 class managing all Hough transforms in the detector More...
 
struct  MuonLayerHough
 
class  MuonLayerHoughSelector
 
struct  MuonPhiLayerHough
 
class  MuonSectorHough
 class managing all precision Hough transforms in a sector More...
 
struct  PhiHit
 struct containing all hit information needed for the Hough transform More...
 
struct  RegionDescriptor
 struct containing all information to build a Hough transform for a given chamber index More...
 
struct  SegDebugInfo
 struct containing truth or segment information More...
 
struct  SortHitsPerLayer
 struct to sort the hits More...
 

Typedefs

using HitVec = std::vector< std::shared_ptr< MuonHough::Hit > >
 
using RegionDescriptionVec = std::vector< RegionDescriptor >
 
using PhiHitVec = std::vector< std::shared_ptr< MuonHough::PhiHit > >
 
using valPair = std::pair< int, float >
 
using ChIdx = Muon::MuonStationIndex::ChIndex
 

Enumerations

enum  DetectorTechnology { MDT, CSC, RPC, TGC }
 enum to identify the muondetectortechnology More...
 
enum  MuonHoughTransformers {
  hough_xy, hough_rzcosmics, hough_curved_at_a_cylinder, hough_rz,
  hough_rz_mdt, hough_rz_rpc, hough_yz
}
 enum to identify the different houghtransformers More...
 

Functions

float extrapolate (const MuonLayerHough::Maximum &ref, const MuonLayerHough::Maximum &ex, bool doparabolic=false)
 

Variables

constexpr int phisectors = 16
 number of phi sectors More...
 
constexpr double half_phisector = M_PI / phisectors
 angle of half a sector in rad More...
 
constexpr double two_Pi = 2 * M_PI
 
constexpr double degree_rad_conversion_factor = M_PI / 180.
 
constexpr double rad_degree_conversion_factor = 180. / M_PI
 
constexpr double tan_barrel = 11430. / 14000.
 relation for transition between endcap and barrel 11.43 m (r) / 14m (z) More...
 
constexpr double radius_cylinder = 4000.
 radius of cylinder More...
 
constexpr double z_cylinder = 6000.
 length of cylinder More...
 
constexpr double z_end = 15000.
 z value whereafter no magnetic field / curvature More...
 
constexpr double z_magnetic_range = z_end - z_cylinder
 range where hit is curved in endcap region More...
 
constexpr double z_magnetic_range_squared = z_end * z_end - z_cylinder * z_cylinder
 range where hit is curved in endcap region ('squared') More...
 

Typedef Documentation

◆ ChIdx

Definition at line 9 of file MuonRegionHough.cxx.

◆ HitVec

using MuonHough::HitVec = typedef std::vector<std::shared_ptr<MuonHough::Hit> >

Definition at line 21 of file MuonLayerHough.h.

◆ PhiHitVec

using MuonHough::PhiHitVec = typedef std::vector<std::shared_ptr<MuonHough::PhiHit> >

Definition at line 20 of file MuonPhiLayerHough.h.

◆ RegionDescriptionVec

using MuonHough::RegionDescriptionVec = typedef std::vector<RegionDescriptor>

Definition at line 56 of file MuonLayerHough.h.

◆ valPair

using MuonHough::valPair = typedef std::pair<int, float>

Definition at line 14 of file MuonLayerHoughSelector.cxx.

Enumeration Type Documentation

◆ DetectorTechnology

enum to identify the muondetectortechnology

Enumerator
MDT 
CSC 
RPC 
TGC 

Definition at line 17 of file MuonHoughHit.h.

17 { MDT, CSC, RPC, TGC };

◆ MuonHoughTransformers

enum to identify the different houghtransformers

Enumerator
hough_xy 
hough_rzcosmics 
hough_curved_at_a_cylinder 
hough_rz 
hough_rz_mdt 
hough_rz_rpc 
hough_yz 

Definition at line 14 of file MuonHoughPattern.h.

Function Documentation

◆ extrapolate()

float MuonHough::extrapolate ( const MuonLayerHough::Maximum ref,
const MuonLayerHough::Maximum ex,
bool  doparabolic = false 
)

Definition at line 521 of file MuonLayerHough.cxx.

521  {
522  // z is always the precision plane. r is the reference plane, simple and robust
523  double ref_z = ref.getGlobalZ();
524  double ref_r = ref.getGlobalR();
525  double ex_z = ex.getGlobalZ();
526  double ex_r = ex.getGlobalR();
527  float theta_ref = ref.getGlobalTheta();
528  if (!doparabolic || ref_z == 0 || theta_ref == 0) { // do linear extrapolation
529  if (!ex.isEndcap()) { // if extrapolate to barell
530  return ex_z - ex_r / ref_r * ref_z;
531  } else { // if extrapolate to endcap
532  return ex_r - ex_z * ref_r / ref_z;
533  }
534  } else { // do parabolic
535  float expected = 0;
536  float extrapolated_diff = 9999;
537  const float tan_theta_ref = std::tan(theta_ref);
538  const float invtan_theta_ref = 1. / tan_theta_ref;
539  float r_start = static_cast<int>(ref.hough->m_descriptor.chIndex) % 2 > 0
540  ? 4900.
541  : 5200.; // start of barrel B field; values could be further optimized; 5500.:6500.
542  float z_start = 8500.; // start of endcap B field; used to be 6500; should start at 8500
543  float z_end = 12500.; // end of endcap B field; used to be 12000; should end at 12500
544  float r_SL = ref_r + (ex_z - ref_z) * tan_theta_ref;
545  float z_SL = ref_z + (ex_r - ref_r) * invtan_theta_ref;
546  // start extrapolation
547  if (!ref.isEndcap()) { // this is starting with barrel chamber; BEE is 6
548  float rgeo = ref_r * ref_r - r_start * r_start;
549  float rhoInv = (invtan_theta_ref * ref_r - ref_z) / rgeo;
550  if (!ex.isEndcap()) { // this ends with barrel chamber; BEE is 6
551  expected = ref_z + (ex_r - ref_r) * invtan_theta_ref + (ex_r - ref_r) * (ex_r - ref_r) * rhoInv;
552  extrapolated_diff = ex_z - expected;
553  } // end with barrel to barrel extrapolation
554  else { // this is a barrel to endcap extrapolation, mostly in the transition region
555  // recalculate z start
556  z_start = ref_z + (r_start - ref_r) * invtan_theta_ref + (r_start - ref_r) * (r_start - ref_r) * rhoInv;
557  float zgeo = ref_z * ref_z - z_start * z_start;
558  float rho = (tan_theta_ref * ref_z - ref_r) / zgeo;
559  expected = ref_r + (ex_z - ref_z) * tan_theta_ref + (ex_z - ref_z) * (ex_z - ref_z) * rho;
560  extrapolated_diff = ex_r - expected;
561  }
562  } else { // this starts with endcap chamber;
563  // swap the starting position if on the other side
564  if (tan_theta_ref < 0) {
565  z_start = -z_start;
566  z_end = -z_end;
567  }
568  if (ex.isEndcap()) { // extrapolate to endcap
569  if (std::abs(ref_z) < std::abs(z_end)) { // extrapolate from EI or EE, have to use linear
570  expected = r_SL;
571  } else { // from EM or EO or EE
572  if (std::abs(ex_z) > std::abs(z_start)) { // extrapolate to EM or EO
573  // extrapolate to outer layer, just using theta of the middle measurement; only works if the theta measurement
574  // is correct can extrapolate with either the outside theta or middle theta; outside theta is better; farther
575  // away from the B field
576  expected = r_SL;
577  } else { // to EI
578  float r_end = ref_r + (z_end - ref_z) * tan_theta_ref;
579  float zgeo = z_start * z_start - z_end * z_end;
580  float rhoInv = (r_end - z_end * tan_theta_ref) / zgeo;
581  float tantheta = tan_theta_ref - 2 * (z_end - z_start) * rhoInv;
582  expected = ex_z * tantheta + (ex_z - z_start) * (ex_z - z_start) * rhoInv;
583  }
584  }
585  extrapolated_diff = ex_r - expected;
586  } else { // exrapolate to barrel; again verly likely to be in transition region, complicated B field; just use linear
587  expected = z_SL;
588  extrapolated_diff = ex_z - expected;
589  }
590  }
591  return extrapolated_diff;
592  } // end of parabolic extrapolation
593  }

Variable Documentation

◆ degree_rad_conversion_factor

constexpr double MuonHough::degree_rad_conversion_factor = M_PI / 180.
constexpr

Definition at line 17 of file MuonHoughMathUtils.h.

◆ half_phisector

constexpr double MuonHough::half_phisector = M_PI / phisectors
constexpr

angle of half a sector in rad

Definition at line 21 of file MuonHoughHit.h.

◆ phisectors

constexpr int MuonHough::phisectors = 16
constexpr

number of phi sectors

Definition at line 19 of file MuonHoughHit.h.

◆ rad_degree_conversion_factor

constexpr double MuonHough::rad_degree_conversion_factor = 180. / M_PI
constexpr

Definition at line 18 of file MuonHoughMathUtils.h.

◆ radius_cylinder

constexpr double MuonHough::radius_cylinder = 4000.
constexpr

radius of cylinder

Definition at line 24 of file MuonHoughMathUtils.h.

◆ tan_barrel

constexpr double MuonHough::tan_barrel = 11430. / 14000.
constexpr

relation for transition between endcap and barrel 11.43 m (r) / 14m (z)

Definition at line 22 of file MuonHoughMathUtils.h.

◆ two_Pi

constexpr double MuonHough::two_Pi = 2 * M_PI
constexpr

Definition at line 16 of file MuonHoughMathUtils.h.

◆ z_cylinder

constexpr double MuonHough::z_cylinder = 6000.
constexpr

length of cylinder

Definition at line 26 of file MuonHoughMathUtils.h.

◆ z_end

constexpr double MuonHough::z_end = 15000.
constexpr

z value whereafter no magnetic field / curvature

Definition at line 28 of file MuonHoughMathUtils.h.

◆ z_magnetic_range

constexpr double MuonHough::z_magnetic_range = z_end - z_cylinder
constexpr

range where hit is curved in endcap region

Definition at line 30 of file MuonHoughMathUtils.h.

◆ z_magnetic_range_squared

constexpr double MuonHough::z_magnetic_range_squared = z_end * z_end - z_cylinder * z_cylinder
constexpr

range where hit is curved in endcap region ('squared')

Definition at line 32 of file MuonHoughMathUtils.h.

MuonHough::hough_rzcosmics
@ hough_rzcosmics
Definition: MuonHoughPattern.h:14
MuonHough::hough_rz_mdt
@ hough_rz_mdt
Definition: MuonHoughPattern.h:14
MuonHough::hough_rz_rpc
@ hough_rz_rpc
Definition: MuonHoughPattern.h:14
MuonHough::hough_yz
@ hough_yz
Definition: MuonHoughPattern.h:14
MuonHough::hough_xy
@ hough_xy
Definition: MuonHoughPattern.h:14
TGC
Definition: TgcBase.h:6
MuonHough::z_end
constexpr double z_end
z value whereafter no magnetic field / curvature
Definition: MuonHoughMathUtils.h:28
drawFromPickle.tan
tan
Definition: drawFromPickle.py:36
MuonHough::hough_curved_at_a_cylinder
@ hough_curved_at_a_cylinder
Definition: MuonHoughPattern.h:14
RPC
@ RPC
Definition: RegSelEnums.h:32
ref
const boost::regex ref(r_ef)
CSC
@ CSC
Definition: RegSelEnums.h:34
fitman.rho
rho
Definition: fitman.py:532
MDT
@ MDT
Definition: RegSelEnums.h:31
MuonHough::hough_rz
@ hough_rz
Definition: MuonHoughPattern.h:14