ATLAS Offline Software
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 &stationName, 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 ()=default
 
int getART () const
 
int getAge () const
 
int getBC () const
 
int getChannel () const
 
int getPlane () const
 
char getSector () const
 
double getRZSlope () const
 
int getVMM () const
 
double getShift () 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
 
bool infSlope () const
 
void setAge (int age)
 
void setAsNoise ()
 

Private Attributes

double m_RZslope {-1}
 
double m_Rp {-1}
 
double m_Z {-1}
 
double m_R {-1}
 
double m_PitchOverZ {-1}
 
double m_shift {-1}
 
float m_time
 
int m_VMM_chip
 
int m_ART_ASIC
 
int m_plane
 
int m_station_eta
 
int m_station_phi
 
int m_sector_phi
 
int m_strip
 
int m_BC_time
 
int m_age
 
char m_sector
 
bool m_isNoise {false}
 
bool m_isX {false}
 
bool m_isU {false}
 
bool m_isV {false}
 

Detailed Description

Definition at line 13 of file MMT_Hit.h.

Constructor & Destructor Documentation

◆ MMT_Hit()

MMT_Hit::MMT_Hit ( const Identifier id,
const std::string &  stationName,
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.

12  : m_time(stripTime),
13  m_station_eta(stEta), m_station_phi(stPhi), m_sector_phi(sectorPhi),
15  m_BC_time(BC), m_age(BC),
17  {
18  m_plane = (multiplet-1)*4 + gasGap-1;
19 
20  switch (m_plane) {
21  case 0:
22  case 1:
23  case 6:
24  case 7:
25  m_isX = true;
26  break;
27  case 2:
28  case 4:
29  m_isU = true;
30  break;
31  case 3:
32  case 5:
33  m_isV = true;
34  break;
35  }
36 
37  // here needed the absolute index of the strip on the sector layer (m_strip is only up to 5119)
38  const int istrip = (std::abs(m_station_eta)-1) * (64*8*10) + m_strip;
39 
40  // region represent the index of the MMFE8 board in the plane
41  const int region = int(float(istrip)/(64*8));
42 
43  // map of mmfe8s layer,radius(MMFE8 index on sector)
44  unsigned int mmfe8s[8][16];
45  // loop on layers
46  for( unsigned int L=0; L<8; L++){
47  // loop on pcbs
48  for(unsigned int p=1; p<9; p++){
49  // loop on sides
50  for(unsigned int s=0; s<2; s++){ //loop on 0 (Left) and 1 (Right), same convention used also later
51  unsigned int R = (L%2==s) ? (p-1)*2 : (p-1)*2+1;
52  mmfe8s[L][R]=s;
53  }
54  }
55  }
56 
57  m_VMM_chip = int(1. *istrip /64.); // index of the VMM chip on the layer
58  // art asic id
59  if(!(int(m_plane/2.)%2)){
60  if (mmfe8s[m_plane][region]==1){ //Right
61  m_ART_ASIC = 1-int(region/8);
62  }else{
63  m_ART_ASIC = int(region/8);
64  }
65  }else{
66  if (mmfe8s[m_plane][region]==0){ //Left
67  m_ART_ASIC = 1-int(region/8);
68  }else{
69  m_ART_ASIC = int(region/8);
70  }
71  }
72 
73  // if Left side add 2 to the ART Asic Index
74  if(mmfe8s[m_plane][region]==0){
75  m_ART_ASIC+=2;
76  }
77 
78  const MuonGM::MMReadoutElement* readout = detManager->getMMReadoutElement(id);
79  Amg::Vector3D globalPos(0.0, 0.0, 0.0);
80  if(readout->stripGlobalPosition(id, globalPos)) {
81  m_R = globalPos.perp();
82  m_Z = globalPos.z();
83  m_PitchOverZ = (readout->getDesign(id))->inputPitch/m_Z;
84  m_RZslope = m_R / m_Z;
85  const double distanceFromZAxis = readout->absTransform().translation().perp() - 0.5*readout->getRsize();
86 
87  Identifier tmpId = detManager->mmIdHelper()->channelID(stationName, 1, 1, 1, 1, 1);
88  const MuonGM::MMReadoutElement* roEl = detManager->getMMReadoutElement(tmpId);
89  int tmpStrip = (roEl->getDesign(tmpId))->nMissedBottomEta + 1;
90  tmpId = detManager->mmIdHelper()->channelID(stationName, 1, 1, 1, 1, tmpStrip);
91  globalPos = Amg::Vector3D::Zero();
92  if(roEl->stripGlobalPosition(tmpId, globalPos)) {
93  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
94  m_Rp = distanceFromZAxis + (0.1 + index*((0.6 - 0.1)/1000.))*(std::abs(m_Z) - globalPos.z());
95  m_shift = m_Rp / m_Z;
96  }
97  }
98 }

◆ ~MMT_Hit()

MMT_Hit::~MMT_Hit ( )
default

Member Function Documentation

◆ getAge()

int MMT_Hit::getAge ( ) const
inline

Definition at line 25 of file MMT_Hit.h.

25 { return m_age; }

◆ getART()

int MMT_Hit::getART ( ) const
inline

Definition at line 24 of file MMT_Hit.h.

24 { return m_ART_ASIC; }

◆ getBC()

int MMT_Hit::getBC ( ) const
inline

Definition at line 26 of file MMT_Hit.h.

26 { return m_BC_time; }

◆ getChannel()

int MMT_Hit::getChannel ( ) const
inline

Definition at line 27 of file MMT_Hit.h.

27 { return m_strip; }

◆ getPitchOverZ()

double MMT_Hit::getPitchOverZ ( ) const
inline

Definition at line 39 of file MMT_Hit.h.

39 { return m_PitchOverZ; }

◆ getPlane()

int MMT_Hit::getPlane ( ) const
inline

Definition at line 28 of file MMT_Hit.h.

28 { return m_plane; }

◆ getR()

double MMT_Hit::getR ( ) const
inline

Definition at line 36 of file MMT_Hit.h.

36 { return m_R; }

◆ getRp()

double MMT_Hit::getRp ( ) const
inline

Definition at line 37 of file MMT_Hit.h.

37 { return m_Rp; }

◆ getRZSlope()

double MMT_Hit::getRZSlope ( ) const
inline

Definition at line 30 of file MMT_Hit.h.

30 { return m_RZslope; }

◆ getSector()

char MMT_Hit::getSector ( ) const
inline

Definition at line 29 of file MMT_Hit.h.

29 { return m_sector; }

◆ getSectorPhi()

int MMT_Hit::getSectorPhi ( ) const
inline

Definition at line 35 of file MMT_Hit.h.

35 { return m_sector_phi; }

◆ getShift()

double MMT_Hit::getShift ( ) const
inline

Definition at line 32 of file MMT_Hit.h.

32 { return m_shift; }

◆ getStationEta()

int MMT_Hit::getStationEta ( ) const
inline

Definition at line 33 of file MMT_Hit.h.

33 { return m_station_eta; }

◆ getStationPhi()

int MMT_Hit::getStationPhi ( ) const
inline

Definition at line 34 of file MMT_Hit.h.

34 { return m_station_phi; }

◆ getTime()

float MMT_Hit::getTime ( ) const
inline

Definition at line 40 of file MMT_Hit.h.

40 { return m_time; }

◆ getVMM()

int MMT_Hit::getVMM ( ) const
inline

Definition at line 31 of file MMT_Hit.h.

31 { return m_VMM_chip; }

◆ getZ()

double MMT_Hit::getZ ( ) const
inline

Definition at line 38 of file MMT_Hit.h.

38 { return m_Z; }

◆ infSlope()

bool MMT_Hit::infSlope ( ) const
inline

Definition at line 45 of file MMT_Hit.h.

45 { return std::isinf(m_RZslope); }

◆ isNoise()

bool MMT_Hit::isNoise ( ) const
inline

Definition at line 41 of file MMT_Hit.h.

41 { return m_isNoise; }

◆ isU()

bool MMT_Hit::isU ( ) const
inline

Definition at line 43 of file MMT_Hit.h.

43 { return m_isU; }

◆ isV()

bool MMT_Hit::isV ( ) const
inline

Definition at line 44 of file MMT_Hit.h.

44 { return m_isV; }

◆ isX()

bool MMT_Hit::isX ( ) const
inline

Definition at line 42 of file MMT_Hit.h.

42 { return m_isX; }

◆ setAge()

void MMT_Hit::setAge ( int  age)
inline

Definition at line 48 of file MMT_Hit.h.

48 { m_age = age; }

◆ setAsNoise()

void MMT_Hit::setAsNoise ( )
inline

Definition at line 49 of file MMT_Hit.h.

49 { m_isNoise = true; }

Member Data Documentation

◆ m_age

int MMT_Hit::m_age
private

Definition at line 64 of file MMT_Hit.h.

◆ m_ART_ASIC

int MMT_Hit::m_ART_ASIC
private

Definition at line 57 of file MMT_Hit.h.

◆ m_BC_time

int MMT_Hit::m_BC_time
private

Definition at line 63 of file MMT_Hit.h.

◆ m_isNoise

bool MMT_Hit::m_isNoise {false}
private

Definition at line 66 of file MMT_Hit.h.

◆ m_isU

bool MMT_Hit::m_isU {false}
private

Definition at line 68 of file MMT_Hit.h.

◆ m_isV

bool MMT_Hit::m_isV {false}
private

Definition at line 69 of file MMT_Hit.h.

◆ m_isX

bool MMT_Hit::m_isX {false}
private

Definition at line 67 of file MMT_Hit.h.

◆ m_PitchOverZ

double MMT_Hit::m_PitchOverZ {-1}
private

Definition at line 54 of file MMT_Hit.h.

◆ m_plane

int MMT_Hit::m_plane
private

Definition at line 58 of file MMT_Hit.h.

◆ m_R

double MMT_Hit::m_R {-1}
private

Definition at line 53 of file MMT_Hit.h.

◆ m_Rp

double MMT_Hit::m_Rp {-1}
private

Definition at line 52 of file MMT_Hit.h.

◆ m_RZslope

double MMT_Hit::m_RZslope {-1}
private

Definition at line 52 of file MMT_Hit.h.

◆ m_sector

char MMT_Hit::m_sector
private

Definition at line 65 of file MMT_Hit.h.

◆ m_sector_phi

int MMT_Hit::m_sector_phi
private

Definition at line 61 of file MMT_Hit.h.

◆ m_shift

double MMT_Hit::m_shift {-1}
private

Definition at line 54 of file MMT_Hit.h.

◆ m_station_eta

int MMT_Hit::m_station_eta
private

Definition at line 59 of file MMT_Hit.h.

◆ m_station_phi

int MMT_Hit::m_station_phi
private

Definition at line 60 of file MMT_Hit.h.

◆ m_strip

int MMT_Hit::m_strip
private

Definition at line 62 of file MMT_Hit.h.

◆ m_time

float MMT_Hit::m_time
private

Definition at line 55 of file MMT_Hit.h.

◆ m_VMM_chip

int MMT_Hit::m_VMM_chip
private

Definition at line 56 of file MMT_Hit.h.

◆ m_Z

double MMT_Hit::m_Z {-1}
private

Definition at line 53 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:59
MMT_Hit::m_isX
bool m_isX
Definition: MMT_Hit.h:67
dumpTgcDigiDeadChambers.gasGap
list gasGap
Definition: dumpTgcDigiDeadChambers.py:33
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:65
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
MMT_Hit::m_R
double m_R
Definition: MMT_Hit.h:53
dumpTgcDigiDeadChambers.stationName
dictionary stationName
Definition: dumpTgcDigiDeadChambers.py:30
index
Definition: index.py:1
MMT_Hit::m_RZslope
double m_RZslope
Definition: MMT_Hit.h:52
MMT_Hit::m_Rp
double m_Rp
Definition: MMT_Hit.h:52
MuonGM::MMReadoutElement::getDesign
const MuonChannelDesign * getDesign(const Identifier &id) const
returns the MuonChannelDesign class for the given identifier
Definition: MMReadoutElement.h:190
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:57
MuonGM::MuonDetectorManager::mmIdHelper
const MmIdHelper * mmIdHelper() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h:247
MMT_Hit::m_Z
double m_Z
Definition: MMT_Hit.h:53
MMT_Hit::m_sector_phi
int m_sector_phi
Definition: MMT_Hit.h:61
MMT_Hit::m_age
int m_age
Definition: MMT_Hit.h:64
MMT_Hit::m_PitchOverZ
double m_PitchOverZ
Definition: MMT_Hit.h:54
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
MMT_Hit::m_plane
int m_plane
Definition: MMT_Hit.h:58
MMT_Hit::m_VMM_chip
int m_VMM_chip
Definition: MMT_Hit.h:56
MMT_Hit::m_isV
bool m_isV
Definition: MMT_Hit.h:69
grepfile.age
age
Definition: grepfile.py:26
MuonGM::MMReadoutElement::stripGlobalPosition
bool stripGlobalPosition(const Identifier &id, Amg::Vector3D &gpos) const
Definition: MMReadoutElement.h:277
MMT_Hit::m_station_phi
int m_station_phi
Definition: MMT_Hit.h:60
AnalysisUtils::Delta::R
double R(const INavigable4Momentum *p1, const double v_eta, const double v_phi)
Definition: AnalysisMisc.h:49
MMT_Hit::m_isU
bool m_isU
Definition: MMT_Hit.h:68
MMT_Hit::m_time
float m_time
Definition: MMT_Hit.h:55
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:63
python.CaloAddPedShiftConfig.int
int
Definition: CaloAddPedShiftConfig.py:45
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:257
MMT_Hit::m_strip
int m_strip
Definition: MMT_Hit.h:62
MuonGM::MMReadoutElement
An MMReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station con...
Definition: MMReadoutElement.h:25
python.SystemOfUnits.s
float s
Definition: SystemOfUnits.py:147
MMT_Hit::m_isNoise
bool m_isNoise
Definition: MMT_Hit.h:66
MmIdHelper::channelID
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int channel) const
Definition: MmIdHelper.cxx:736
MMT_Hit::m_shift
double m_shift
Definition: MMT_Hit.h:54
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
python.SystemOfUnits.L
float L
Definition: SystemOfUnits.py:92
Identifier
Definition: IdentifierFieldParser.cxx:14