Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Private Attributes | List of all members
MMT_Hit Class Reference

#include <MMT_Hit.h>

Collaboration diagram for MMT_Hit:

Public Member Functions

 MMT_Hit (const Identifier &id, const std::string_view stName, const int stEta, const int stPhi, const int sectorPhi, const int multiplet, const int gasGap, const int channel, const float stripTime, const int BC, const MuonGM::MuonDetectorManager *detManager)
 
 MMT_Hit (const MMT_Hit *hit)
 
 ~MMT_Hit ()=default
 
int getART () const
 
int getAge () const
 
int getBC () const
 
int getChannel () const
 
int getGasGap () const
 
int getMultiplet () const
 
int getPlane () const
 
char getSector () const
 
double getRZSlope () const
 
int getVMM () const
 
int getMMFE8 () const
 
float getShift () const
 
const std::string & getStationName () const
 
int getStationEta () const
 
int getStationPhi () const
 
int getSectorPhi () const
 
double getR () const
 
double getRp () const
 
double getZ () const
 
double getPitchOverZ () const
 
float getTime () const
 
bool isNoise () const
 
bool isX () const
 
bool isU () const
 
bool isV () const
 
void setAge (int age)
 
void setAsNoise ()
 
void setBC (int bc)
 
void setRZSlope (double slope)
 
void setZ (double z)
 
bool infSlope () const
 

Private Attributes

char m_sector
 
std::string m_station_name
 
int m_VMM_chip
 
int m_MMFE_VMM
 
int m_ART_ASIC
 
int m_plane
 
int m_station_eta
 
int m_station_phi
 
int m_sector_phi
 
int m_multiplet
 
int m_gasgap
 
int m_strip
 
double m_RZslope
 
int m_BC_time
 
int m_age
 
double m_Z
 
double m_PitchOverZ
 
double m_R
 
double m_Rp
 
bool m_isNoise
 
float m_time
 
float m_shift
 

Detailed Description

Definition at line 13 of file MMT_Hit.h.

Constructor & Destructor Documentation

◆ MMT_Hit() [1/2]

MMT_Hit::MMT_Hit ( const Identifier id,
const std::string_view  stName,
const int  stEta,
const int  stPhi,
const int  sectorPhi,
const int  multiplet,
const int  gasGap,
const int  channel,
const float  stripTime,
const int  BC,
const MuonGM::MuonDetectorManager detManager 
)

Definition at line 7 of file MMT_Hit.cxx.

8  : m_station_name(stName), m_station_eta(stEta), m_station_phi(stPhi), m_sector_phi(sectorPhi), m_multiplet(multiplet), m_gasgap(gasGap), m_strip(channel),
9  m_BC_time(BC), m_age(BC), m_time(stripTime)
10  {
11  m_sector = stName[2];
12  m_plane = (multiplet-1)*4 + gasGap-1;
13  m_Z = -1.;
14  m_R = -1.;
15  m_Rp = -1.;
16  m_isNoise = false;
17  m_RZslope = -1.;
18  m_PitchOverZ = -1.;
19  m_shift = -1.;
20 
21  int istrip = (std::abs(m_station_eta)-1) * (64*8*10) + m_strip; //here needed the absolute index of the strip on the sector layer (m_strip is only up to 5119)
22 
23  // region represent the index of the mmfe8 in the plane
24  int region = int(float(istrip)/(64*8));
25  // map of mmfe8s layer,radius(MMFE8 index on sector)
26  unsigned int mmfe8s[8][16];
27  // loop on layers
28  for( unsigned int L=0; L<8; L++){
29  // loop on pcbs
30  for(unsigned int p=1; p<9; p++){
31  // loop on sides
32  for(unsigned int s=0; s<2; s++){ //loop on 0 (Left) and 1 (Right), same convention used also later
33  unsigned int R = (L%2==s) ? (p-1)*2 : (p-1)*2+1;
34  mmfe8s[L][R]=s;
35  }
36  }
37  }
38 
39  m_MMFE_VMM = region; // index of the MMFE8 board on the layer
40  m_VMM_chip = int(1. *istrip /64.); // index of the VMM chip on the layer
41  // art asic id
42  if(!int(m_plane/2.)%2){
43  if (mmfe8s[m_plane][region]==1){ //Right
44  m_ART_ASIC = 1-int(region/8);
45  }else{
46  m_ART_ASIC = int(region/8);
47  }
48  }else{
49  if (mmfe8s[m_plane][region]==0){ //Left
50  m_ART_ASIC = 1-int(region/8);
51  }else{
52  m_ART_ASIC = int(region/8);
53  }
54  }
55 
56  // if Right side add 2 to the ART Asic Index
57  if(mmfe8s[m_plane][region]==0){
58  m_ART_ASIC+=2;
59  }
60 
61  const MuonGM::MMReadoutElement* readout = detManager->getMMReadoutElement(id);
62  Amg::Vector3D globalPos(0.0, 0.0, 0.0);
63  if(readout->stripGlobalPosition(id, globalPos)) {
64  m_R = globalPos.perp();
65  m_Z = globalPos.z();
66  m_PitchOverZ = (readout->getDesign(id))->inputPitch/m_Z;
67  m_RZslope = m_R / m_Z;
68  const double distanceFromZAxis = readout->absTransform().translation().perp() - 0.5*readout->getRsize();
69 
70  Identifier tmpId = detManager->mmIdHelper()->channelID(m_station_name, 1, 1, 1, 1, 1);
71  const MuonGM::MMReadoutElement* roEl = detManager->getMMReadoutElement(tmpId);
72  int tmpStrip = (roEl->getDesign(tmpId))->nMissedBottomEta + 1;
73  tmpId = detManager->mmIdHelper()->channelID(m_station_name, 1, 1, 1, 1, tmpStrip);
74  globalPos = Amg::Vector3D::Zero();
75  if(roEl->stripGlobalPosition(tmpId, globalPos)) {
76  double index = std::round((std::abs(m_RZslope)-0.1)/5e-04); // 0.0005 is approx. the step in slope achievable with a road size of 8 strips
77  m_Rp = distanceFromZAxis + (0.1 + index*((0.6 - 0.1)/1000.))*(std::abs(m_Z) - globalPos.z());
78  m_shift = m_Rp / m_Z;
79  }
80  }
81 }

◆ MMT_Hit() [2/2]

MMT_Hit::MMT_Hit ( const MMT_Hit hit)

Definition at line 83 of file MMT_Hit.cxx.

84  : m_sector (hit->m_sector),
86  m_VMM_chip (hit->m_VMM_chip),
87  m_MMFE_VMM (hit->m_MMFE_VMM),
88  m_ART_ASIC (hit->m_ART_ASIC),
89  m_plane (hit->m_plane),
93  m_multiplet (hit->m_multiplet),
94  m_gasgap (hit->m_gasgap),
95  m_strip (hit->m_strip),
96  m_RZslope (hit->m_RZslope),
97  m_BC_time (hit->m_BC_time),
98  m_age (hit->m_age),
99  m_Z (hit->m_Z),
100  m_PitchOverZ (hit->m_PitchOverZ),
101  m_R (hit->m_R),
102  m_Rp (hit->m_Rp),
103  m_isNoise (hit->m_isNoise),
104  m_time (hit->m_time),
105  m_shift (hit->m_shift)
106 {
107 }

◆ ~MMT_Hit()

MMT_Hit::~MMT_Hit ( )
default

Member Function Documentation

◆ getAge()

int MMT_Hit::getAge ( ) const
inline

Definition at line 20 of file MMT_Hit.h.

20 { return m_age; }

◆ getART()

int MMT_Hit::getART ( ) const
inline

Definition at line 19 of file MMT_Hit.h.

19 { return m_ART_ASIC; }

◆ getBC()

int MMT_Hit::getBC ( ) const
inline

Definition at line 21 of file MMT_Hit.h.

21 { return m_BC_time; }

◆ getChannel()

int MMT_Hit::getChannel ( ) const
inline

Definition at line 22 of file MMT_Hit.h.

22 { return m_strip; }

◆ getGasGap()

int MMT_Hit::getGasGap ( ) const
inline

Definition at line 23 of file MMT_Hit.h.

23 { return m_gasgap; }

◆ getMMFE8()

int MMT_Hit::getMMFE8 ( ) const
inline

Definition at line 29 of file MMT_Hit.h.

29 { return m_MMFE_VMM; }

◆ getMultiplet()

int MMT_Hit::getMultiplet ( ) const
inline

Definition at line 24 of file MMT_Hit.h.

24 { return m_multiplet; }

◆ getPitchOverZ()

double MMT_Hit::getPitchOverZ ( ) const
inline

Definition at line 38 of file MMT_Hit.h.

38 { return m_PitchOverZ; }

◆ getPlane()

int MMT_Hit::getPlane ( ) const
inline

Definition at line 25 of file MMT_Hit.h.

25 { return m_plane; }

◆ getR()

double MMT_Hit::getR ( ) const
inline

Definition at line 35 of file MMT_Hit.h.

35 { return m_R; }

◆ getRp()

double MMT_Hit::getRp ( ) const
inline

Definition at line 36 of file MMT_Hit.h.

36 { return m_Rp; }

◆ getRZSlope()

double MMT_Hit::getRZSlope ( ) const
inline

Definition at line 27 of file MMT_Hit.h.

27 { return m_RZslope; }

◆ getSector()

char MMT_Hit::getSector ( ) const
inline

Definition at line 26 of file MMT_Hit.h.

26 { return m_sector; }

◆ getSectorPhi()

int MMT_Hit::getSectorPhi ( ) const
inline

Definition at line 34 of file MMT_Hit.h.

34 { return m_sector_phi; }

◆ getShift()

float MMT_Hit::getShift ( ) const
inline

Definition at line 30 of file MMT_Hit.h.

30 { return m_shift; }

◆ getStationEta()

int MMT_Hit::getStationEta ( ) const
inline

Definition at line 32 of file MMT_Hit.h.

32 { return m_station_eta; }

◆ getStationName()

const std::string& MMT_Hit::getStationName ( ) const
inline

Definition at line 31 of file MMT_Hit.h.

31 { return m_station_name; }

◆ getStationPhi()

int MMT_Hit::getStationPhi ( ) const
inline

Definition at line 33 of file MMT_Hit.h.

33 { return m_station_phi; }

◆ getTime()

float MMT_Hit::getTime ( ) const
inline

Definition at line 39 of file MMT_Hit.h.

39 { return m_time; }

◆ getVMM()

int MMT_Hit::getVMM ( ) const
inline

Definition at line 28 of file MMT_Hit.h.

28 { return m_VMM_chip; }

◆ getZ()

double MMT_Hit::getZ ( ) const
inline

Definition at line 37 of file MMT_Hit.h.

37 { return m_Z; }

◆ infSlope()

bool MMT_Hit::infSlope ( ) const

Definition at line 121 of file MMT_Hit.cxx.

121  {
122  return std::isinf(m_RZslope);
123 }

◆ isNoise()

bool MMT_Hit::isNoise ( ) const
inline

Definition at line 40 of file MMT_Hit.h.

40 { return m_isNoise; }

◆ isU()

bool MMT_Hit::isU ( ) const

Definition at line 113 of file MMT_Hit.cxx.

113  {
114  return (m_plane == 2 || m_plane == 4);
115 }

◆ isV()

bool MMT_Hit::isV ( ) const

Definition at line 117 of file MMT_Hit.cxx.

117  {
118  return (m_plane == 3 || m_plane == 5);
119 }

◆ isX()

bool MMT_Hit::isX ( ) const

Definition at line 109 of file MMT_Hit.cxx.

109  {
110  return (m_plane == 0 || m_plane == 1 || m_plane == 6 || m_plane == 7);
111 }

◆ setAge()

void MMT_Hit::setAge ( int  age)
inline

Definition at line 44 of file MMT_Hit.h.

44 { m_age = age; }

◆ setAsNoise()

void MMT_Hit::setAsNoise ( )
inline

Definition at line 45 of file MMT_Hit.h.

45 { m_isNoise = true; }

◆ setBC()

void MMT_Hit::setBC ( int  bc)
inline

Definition at line 46 of file MMT_Hit.h.

46 { m_BC_time = bc; }

◆ setRZSlope()

void MMT_Hit::setRZSlope ( double  slope)
inline

Definition at line 47 of file MMT_Hit.h.

47 { m_RZslope = slope; }

◆ setZ()

void MMT_Hit::setZ ( double  z)
inline

Definition at line 48 of file MMT_Hit.h.

48 { m_Z = z; }

Member Data Documentation

◆ m_age

int MMT_Hit::m_age
private

Definition at line 65 of file MMT_Hit.h.

◆ m_ART_ASIC

int MMT_Hit::m_ART_ASIC
private

Definition at line 56 of file MMT_Hit.h.

◆ m_BC_time

int MMT_Hit::m_BC_time
private

Definition at line 65 of file MMT_Hit.h.

◆ m_gasgap

int MMT_Hit::m_gasgap
private

Definition at line 62 of file MMT_Hit.h.

◆ m_isNoise

bool MMT_Hit::m_isNoise
private

Definition at line 68 of file MMT_Hit.h.

◆ m_MMFE_VMM

int MMT_Hit::m_MMFE_VMM
private

Definition at line 55 of file MMT_Hit.h.

◆ m_multiplet

int MMT_Hit::m_multiplet
private

Definition at line 61 of file MMT_Hit.h.

◆ m_PitchOverZ

double MMT_Hit::m_PitchOverZ
private

Definition at line 66 of file MMT_Hit.h.

◆ m_plane

int MMT_Hit::m_plane
private

Definition at line 57 of file MMT_Hit.h.

◆ m_R

double MMT_Hit::m_R
private

Definition at line 67 of file MMT_Hit.h.

◆ m_Rp

double MMT_Hit::m_Rp
private

Definition at line 67 of file MMT_Hit.h.

◆ m_RZslope

double MMT_Hit::m_RZslope
private

Definition at line 64 of file MMT_Hit.h.

◆ m_sector

char MMT_Hit::m_sector
private

Definition at line 52 of file MMT_Hit.h.

◆ m_sector_phi

int MMT_Hit::m_sector_phi
private

Definition at line 60 of file MMT_Hit.h.

◆ m_shift

float MMT_Hit::m_shift
private

Definition at line 69 of file MMT_Hit.h.

◆ m_station_eta

int MMT_Hit::m_station_eta
private

Definition at line 58 of file MMT_Hit.h.

◆ m_station_name

std::string MMT_Hit::m_station_name
private

Definition at line 53 of file MMT_Hit.h.

◆ m_station_phi

int MMT_Hit::m_station_phi
private

Definition at line 59 of file MMT_Hit.h.

◆ m_strip

int MMT_Hit::m_strip
private

Definition at line 63 of file MMT_Hit.h.

◆ m_time

float MMT_Hit::m_time
private

Definition at line 69 of file MMT_Hit.h.

◆ m_VMM_chip

int MMT_Hit::m_VMM_chip
private

Definition at line 54 of file MMT_Hit.h.

◆ m_Z

double MMT_Hit::m_Z
private

Definition at line 66 of file MMT_Hit.h.


The documentation for this class was generated from the following files:
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
MMT_Hit::m_station_eta
int m_station_eta
Definition: MMT_Hit.h:58
dumpTgcDigiDeadChambers.gasGap
list gasGap
Definition: dumpTgcDigiDeadChambers.py:33
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
MuonGM::MuonReadoutElement::absTransform
const Amg::Transform3D & absTransform() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:210
MMT_Hit::m_sector
char m_sector
Definition: MMT_Hit.h:52
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
MMT_Hit::m_R
double m_R
Definition: MMT_Hit.h:67
index
Definition: index.py:1
MMT_Hit::m_RZslope
double m_RZslope
Definition: MMT_Hit.h:64
MMT_Hit::m_Rp
double m_Rp
Definition: MMT_Hit.h:67
MuonGM::MMReadoutElement::getDesign
const MuonChannelDesign * getDesign(const Identifier &id) const
returns the MuonChannelDesign class for the given identifier
Definition: MMReadoutElement.h:191
MuonGM::round
float round(const float toRound, const unsigned int decimals)
Definition: Mdt.cxx:27
MMT_Hit::m_ART_ASIC
int m_ART_ASIC
Definition: MMT_Hit.h:56
MuonGM::MuonDetectorManager::mmIdHelper
const MmIdHelper * mmIdHelper() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h:241
MMT_Hit::m_Z
double m_Z
Definition: MMT_Hit.h:66
MMT_Hit::m_sector_phi
int m_sector_phi
Definition: MMT_Hit.h:60
MMT_Hit::m_age
int m_age
Definition: MMT_Hit.h:65
MMT_Hit::m_shift
float m_shift
Definition: MMT_Hit.h:69
MMT_Hit::m_PitchOverZ
double m_PitchOverZ
Definition: MMT_Hit.h:66
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
MMT_Hit::m_gasgap
int m_gasgap
Definition: MMT_Hit.h:62
MMT_Hit::m_plane
int m_plane
Definition: MMT_Hit.h:57
MMT_Hit::m_VMM_chip
int m_VMM_chip
Definition: MMT_Hit.h:54
z
#define z
grepfile.age
age
Definition: grepfile.py:26
MuonGM::MMReadoutElement::stripGlobalPosition
bool stripGlobalPosition(const Identifier &id, Amg::Vector3D &gpos) const
Definition: MMReadoutElement.h:280
python.LArMinBiasAlgConfig.int
int
Definition: LArMinBiasAlgConfig.py:59
MMT_Hit::m_station_phi
int m_station_phi
Definition: MMT_Hit.h:59
MMT_Hit::m_MMFE_VMM
int m_MMFE_VMM
Definition: MMT_Hit.h:55
AnalysisUtils::Delta::R
double R(const INavigable4Momentum *p1, const double v_eta, const double v_phi)
Definition: AnalysisMisc.h:49
MMT_Hit::m_multiplet
int m_multiplet
Definition: MMT_Hit.h:61
MMT_Hit::m_station_name
std::string m_station_name
Definition: MMT_Hit.h:53
MMT_Hit::m_time
float m_time
Definition: MMT_Hit.h:69
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Muon::EnumDefs::BC
@ BC
Definition: MuonEnumDefs.h:13
MMT_Hit::m_BC_time
int m_BC_time
Definition: MMT_Hit.h:65
MuonGM::MuonReadoutElement::getRsize
double getRsize() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:197
MuonGM::MuonDetectorManager::getMMReadoutElement
const MMReadoutElement * getMMReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx:255
MMT_Hit::m_strip
int m_strip
Definition: MMT_Hit.h:63
MuonGM::MMReadoutElement
An MMReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station con...
Definition: MMReadoutElement.h:25
MMT_Hit::m_isNoise
bool m_isNoise
Definition: MMT_Hit.h:68
MmIdHelper::channelID
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int channel) const
Definition: MmIdHelper.cxx:736
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
Identifier
Definition: IdentifierFieldParser.cxx:14