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 >
 

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

◆ 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 51 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 519 of file MuonLayerHough.cxx.

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

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