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 hitData_entry &entry, const MuonGM::MuonDetectorManager *detManager, const std::shared_ptr< MMT_Parameters > par, const std::vector< ROOT::Math::XYZVector > &planeCoordinates)
 
 MMT_Hit (const MMT_Hit *hit)
 
 ~MMT_Hit ()=default
 
int getART () const
 
int getAge () const
 
int getBC () const
 
int getChannel () const
 
int getGasGap () const
 
const std::string & getModule () const
 
int getMultiplet () const
 
int getPlane () const
 
char getSector () const
 
double getRZSlope () const
 
double getYZSlope () const
 
int getVMM () const
 
int getMMFE8 () const
 
float getShift () const
 
const std::string & getStationName () const
 
int getStationEta () const
 
int getStationPhi () const
 
double getR () const
 
double getRp () const
 
double getX () const
 
double getY () const
 
double getZ () const
 
double getPitchOverZ () const
 
float getTime () const
 
bool isNoise () const
 
bool isX () const
 
bool isU () const
 
bool isV () const
 
void printHit () const
 
void setAge (int age)
 
void setAsNoise ()
 
void setBC (int bc)
 
void setRZSlope (double slope)
 
void setYZSlope (double slope)
 
void setY (double y)
 
void setZ (double z)
 
bool verifyHit () const
 

Private Attributes

char m_sector
 
std::string m_module
 
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_multiplet
 
int m_gasgap
 
int m_strip
 
double m_localX
 
double m_RZslope
 
double m_YZslope
 
int m_BC_time
 
int m_age
 
double m_Y
 
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 14 of file MMT_Hit.h.

Constructor & Destructor Documentation

◆ MMT_Hit() [1/2]

MMT_Hit::MMT_Hit ( const hitData_entry entry,
const MuonGM::MuonDetectorManager detManager,
const std::shared_ptr< MMT_Parameters par,
const std::vector< ROOT::Math::XYZVector > &  planeCoordinates 
)

Definition at line 13 of file MMT_Hit.cxx.

13  {
14  m_sector = par->getSector();
15 
16  std::string module(1, m_sector);
17  module += (std::abs(entry.station_eta) == 1) ? "M1" : "M2";
18  m_module = module;
19 
20  m_station_name = "MM";
22  m_VMM_chip = entry.VMM_chip;
23  m_MMFE_VMM = entry.MMFE_VMM;
24  m_ART_ASIC = std::ceil(1.*entry.MMFE_VMM/2);
25  m_station_eta = entry.station_eta;
26  m_station_phi = entry.station_phi;
27  m_multiplet = entry.multiplet;
28  m_gasgap = entry.gasgap;
29  m_plane = entry.plane;
30  m_strip = entry.strip;
31  m_localX = entry.localX;
32  m_BC_time = entry.BC_time;
33  m_age = entry.BC_time;
34  m_Y = -1.;
35  m_Z = -1.;
36  m_R = -1.;
37  m_Rp = -1.;
38  m_isNoise = false;
39  m_time = entry.gtime;
40  m_RZslope = -1.;
41  m_YZslope = -1.;
42  m_PitchOverZ = -1.;
43  m_shift = -1.;
44 
45  if(m_strip > 8191 || m_strip<0){
46  m_strip = 0;
47  }
48  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)
49 
50  // region represent the index of the mmfe8 in the plane
51  int region = int(float(istrip)/(64*8));
52  // map of mmfe8s layer,radius(MMFE8 index on sector)
53  unsigned int mmfe8s[8][16];
54  // loop on layers
55  for( unsigned int L=0; L<8; L++){
56  // loop on pcbs
57  for(unsigned int p=1; p<9; p++){
58  // loop on sides
59  for(unsigned int s=0; s<2; s++){ //loop on 0 (Left) and 1 (Right), same convention used also later
60  unsigned int R = (L%2==s) ? (p-1)*2 : (p-1)*2+1;
61  mmfe8s[L][R]=s;
62  }
63  }
64  }
65  // re-assigning as seems not to work with new stand-alone run with RecoTf from HITS samples
66  m_MMFE_VMM = region; // index of the MMFE8 board on the layer
67  m_VMM_chip = int(1. *istrip /64.); // index of the VMM chip on the layer
68  // art asic id
69  if(!int(m_plane/2.)%2){
70  if (mmfe8s[m_plane][region]==1){ //Right
71  m_ART_ASIC = 1-int(region/8);
72  }else{
73  m_ART_ASIC = int(region/8);
74  }
75  }else{
76  if (mmfe8s[m_plane][region]==0){ //Left
77  m_ART_ASIC = 1-int(region/8);
78  }else{
79  m_ART_ASIC = int(region/8);
80  }
81  }
82 
83  // if Right side add 2 to the ART Asic Index
84  if(mmfe8s[m_plane][region]==0){
85  m_ART_ASIC+=2;
86  }
87 
89  const MuonGM::MMReadoutElement* readout = detManager->getMMReadoutElement(strip_id);
90  Amg::Vector3D globalPos(0.0, 0.0, 0.0);
91  if(readout->stripGlobalPosition(strip_id, globalPos)) {
92 
93  MMDetectorHelper aHelper;
94  char side = (globalPos.z() > 0.) ? 'A' : 'C';
96  MMReadoutParameters roP = mm->GetReadoutParameters();
97 
98  m_R = globalPos.perp();
99  m_Z = globalPos.z();
101  m_RZslope = m_R / m_Z;
102 
103  int eta = std::abs(m_station_eta)-1;
104  double base = par->getYbase(m_plane, eta);
105  m_Y = base + m_strip*roP.stripPitch - roP.stripPitch/2.;
106  m_YZslope = m_Y / m_Z;
107 
108  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
109  double roundedSlope = 0.1 + index*((0.6 - 0.1)/1000.);
110  m_Rp = roP.distanceFromZAxis + roundedSlope*(planeCoordinates[m_plane].Z() - planeCoordinates[0].Z());
111  m_shift = m_Rp / m_Z;
112  }
113 }

◆ MMT_Hit() [2/2]

MMT_Hit::MMT_Hit ( const MMT_Hit hit)

Definition at line 115 of file MMT_Hit.cxx.

116  : m_sector (hit->m_sector),
117  m_module (hit->m_module),
119  m_VMM_chip (hit->m_VMM_chip),
120  m_MMFE_VMM (hit->m_MMFE_VMM),
121  m_ART_ASIC (hit->m_ART_ASIC),
122  m_plane (hit->m_plane),
125  m_multiplet (hit->m_multiplet),
126  m_gasgap (hit->m_gasgap),
127  m_strip (hit->m_strip),
128  m_localX (hit->m_localX),
129  m_RZslope (hit->m_RZslope),
130  m_YZslope (hit->m_YZslope),
131  m_BC_time (hit->m_BC_time),
132  m_age (hit->m_age),
133  m_Y (hit->m_Y),
134  m_Z (hit->m_Z),
135  m_PitchOverZ (hit->m_PitchOverZ),
136  m_R (hit->m_R),
137  m_Rp (hit->m_Rp),
138  m_isNoise (hit->m_isNoise),
139  m_time (hit->m_time),
140  m_shift (hit->m_shift)
141 {
142 }

◆ ~MMT_Hit()

MMT_Hit::~MMT_Hit ( )
default

Member Function Documentation

◆ getAge()

int MMT_Hit::getAge ( ) const
inline

Definition at line 21 of file MMT_Hit.h.

21 { return m_age; }

◆ getART()

int MMT_Hit::getART ( ) const
inline

Definition at line 20 of file MMT_Hit.h.

20 { return m_ART_ASIC; }

◆ getBC()

int MMT_Hit::getBC ( ) const
inline

Definition at line 22 of file MMT_Hit.h.

22 { return m_BC_time; }

◆ getChannel()

int MMT_Hit::getChannel ( ) const
inline

Definition at line 23 of file MMT_Hit.h.

23 { return m_strip; }

◆ getGasGap()

int MMT_Hit::getGasGap ( ) const
inline

Definition at line 24 of file MMT_Hit.h.

24 { return m_gasgap; }

◆ getMMFE8()

int MMT_Hit::getMMFE8 ( ) const
inline

Definition at line 32 of file MMT_Hit.h.

32 { return m_MMFE_VMM; }

◆ getModule()

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

Definition at line 25 of file MMT_Hit.h.

25 { return m_module; }

◆ getMultiplet()

int MMT_Hit::getMultiplet ( ) const
inline

Definition at line 26 of file MMT_Hit.h.

26 { return m_multiplet; }

◆ getPitchOverZ()

double MMT_Hit::getPitchOverZ ( ) const
inline

Definition at line 42 of file MMT_Hit.h.

42 { return m_PitchOverZ; }

◆ getPlane()

int MMT_Hit::getPlane ( ) const
inline

Definition at line 27 of file MMT_Hit.h.

27 { return m_plane; }

◆ getR()

double MMT_Hit::getR ( ) const
inline

Definition at line 37 of file MMT_Hit.h.

37 { return m_R; }

◆ getRp()

double MMT_Hit::getRp ( ) const
inline

Definition at line 38 of file MMT_Hit.h.

38 { return m_Rp; }

◆ getRZSlope()

double MMT_Hit::getRZSlope ( ) const
inline

Definition at line 29 of file MMT_Hit.h.

29 { return m_RZslope; }

◆ getSector()

char MMT_Hit::getSector ( ) const
inline

Definition at line 28 of file MMT_Hit.h.

28 { return m_sector; }

◆ getShift()

float MMT_Hit::getShift ( ) const
inline

Definition at line 33 of file MMT_Hit.h.

33 { return m_shift; }

◆ getStationEta()

int MMT_Hit::getStationEta ( ) const
inline

Definition at line 35 of file MMT_Hit.h.

35 { return m_station_eta; }

◆ getStationName()

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

Definition at line 34 of file MMT_Hit.h.

34 { return m_station_name; }

◆ getStationPhi()

int MMT_Hit::getStationPhi ( ) const
inline

Definition at line 36 of file MMT_Hit.h.

36 { return m_station_phi; }

◆ getTime()

float MMT_Hit::getTime ( ) const
inline

Definition at line 43 of file MMT_Hit.h.

43 { return m_time; }

◆ getVMM()

int MMT_Hit::getVMM ( ) const
inline

Definition at line 31 of file MMT_Hit.h.

31 { return m_VMM_chip; }

◆ getX()

double MMT_Hit::getX ( ) const
inline

Definition at line 39 of file MMT_Hit.h.

39 { return m_localX; }

◆ getY()

double MMT_Hit::getY ( ) const
inline

Definition at line 40 of file MMT_Hit.h.

40 { return m_Y; }

◆ getYZSlope()

double MMT_Hit::getYZSlope ( ) const
inline

Definition at line 30 of file MMT_Hit.h.

30 { return m_YZslope; }

◆ getZ()

double MMT_Hit::getZ ( ) const
inline

Definition at line 41 of file MMT_Hit.h.

41 { return m_Z; }

◆ isNoise()

bool MMT_Hit::isNoise ( ) const
inline

Definition at line 44 of file MMT_Hit.h.

44 { return m_isNoise; }

◆ isU()

bool MMT_Hit::isU ( ) const

Definition at line 149 of file MMT_Hit.cxx.

149  {
150  int id = this->getPlane();
151  return (id == 2 || id == 4);
152 }

◆ isV()

bool MMT_Hit::isV ( ) const

Definition at line 154 of file MMT_Hit.cxx.

154  {
155  int id = this->getPlane();
156  return (id == 3 || id == 5);
157 }

◆ isX()

bool MMT_Hit::isX ( ) const

Definition at line 144 of file MMT_Hit.cxx.

144  {
145  int id = this->getPlane();
146  return (id == 0 || id == 1 || id == 6 || id == 7);
147 }

◆ printHit()

void MMT_Hit::printHit ( ) const

◆ setAge()

void MMT_Hit::setAge ( int  age)
inline

Definition at line 49 of file MMT_Hit.h.

49 { m_age = age; }

◆ setAsNoise()

void MMT_Hit::setAsNoise ( )
inline

Definition at line 50 of file MMT_Hit.h.

50 { m_isNoise = true; }

◆ setBC()

void MMT_Hit::setBC ( int  bc)
inline

Definition at line 51 of file MMT_Hit.h.

51 { m_BC_time = bc; }

◆ setRZSlope()

void MMT_Hit::setRZSlope ( double  slope)
inline

Definition at line 52 of file MMT_Hit.h.

52 { m_RZslope = slope; }

◆ setY()

void MMT_Hit::setY ( double  y)
inline

Definition at line 54 of file MMT_Hit.h.

54 { m_Y = y; }

◆ setYZSlope()

void MMT_Hit::setYZSlope ( double  slope)
inline

Definition at line 53 of file MMT_Hit.h.

53 { m_YZslope = slope; }

◆ setZ()

void MMT_Hit::setZ ( double  z)
inline

Definition at line 55 of file MMT_Hit.h.

55 { m_Z = z; }

◆ verifyHit()

bool MMT_Hit::verifyHit ( ) const

Definition at line 159 of file MMT_Hit.cxx.

159  {
160  /*
161  * Put here all Hit checks, probably redundant if digitization is ok
162  */
163  if (this->getBC() < 0.) return false;
164  else if (std::isinf(this->getRZSlope())) return false;
165  else if (this->getChannel() < 1 || this->getChannel() > 8192) return false;
166  else return true;
167 }

Member Data Documentation

◆ m_age

int MMT_Hit::m_age
private

Definition at line 72 of file MMT_Hit.h.

◆ m_ART_ASIC

int MMT_Hit::m_ART_ASIC
private

Definition at line 63 of file MMT_Hit.h.

◆ m_BC_time

int MMT_Hit::m_BC_time
private

Definition at line 72 of file MMT_Hit.h.

◆ m_gasgap

int MMT_Hit::m_gasgap
private

Definition at line 68 of file MMT_Hit.h.

◆ m_isNoise

bool MMT_Hit::m_isNoise
private

Definition at line 75 of file MMT_Hit.h.

◆ m_localX

double MMT_Hit::m_localX
private

Definition at line 70 of file MMT_Hit.h.

◆ m_MMFE_VMM

int MMT_Hit::m_MMFE_VMM
private

Definition at line 62 of file MMT_Hit.h.

◆ m_module

std::string MMT_Hit::m_module
private

Definition at line 60 of file MMT_Hit.h.

◆ m_multiplet

int MMT_Hit::m_multiplet
private

Definition at line 67 of file MMT_Hit.h.

◆ m_PitchOverZ

double MMT_Hit::m_PitchOverZ
private

Definition at line 73 of file MMT_Hit.h.

◆ m_plane

int MMT_Hit::m_plane
private

Definition at line 64 of file MMT_Hit.h.

◆ m_R

double MMT_Hit::m_R
private

Definition at line 74 of file MMT_Hit.h.

◆ m_Rp

double MMT_Hit::m_Rp
private

Definition at line 74 of file MMT_Hit.h.

◆ m_RZslope

double MMT_Hit::m_RZslope
private

Definition at line 71 of file MMT_Hit.h.

◆ m_sector

char MMT_Hit::m_sector
private

Definition at line 59 of file MMT_Hit.h.

◆ m_shift

float MMT_Hit::m_shift
private

Definition at line 76 of file MMT_Hit.h.

◆ m_station_eta

int MMT_Hit::m_station_eta
private

Definition at line 65 of file MMT_Hit.h.

◆ m_station_name

std::string MMT_Hit::m_station_name
private

Definition at line 60 of file MMT_Hit.h.

◆ m_station_phi

int MMT_Hit::m_station_phi
private

Definition at line 66 of file MMT_Hit.h.

◆ m_strip

int MMT_Hit::m_strip
private

Definition at line 69 of file MMT_Hit.h.

◆ m_time

float MMT_Hit::m_time
private

Definition at line 76 of file MMT_Hit.h.

◆ m_VMM_chip

int MMT_Hit::m_VMM_chip
private

Definition at line 61 of file MMT_Hit.h.

◆ m_Y

double MMT_Hit::m_Y
private

Definition at line 73 of file MMT_Hit.h.

◆ m_YZslope

double MMT_Hit::m_YZslope
private

Definition at line 71 of file MMT_Hit.h.

◆ m_Z

double MMT_Hit::m_Z
private

Definition at line 73 of file MMT_Hit.h.


The documentation for this class was generated from the following files:
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
base
std::string base
Definition: hcg.cxx:78
MMT_Hit::m_station_eta
int m_station_eta
Definition: MMT_Hit.h:65
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
MMT_Hit::m_YZslope
double m_YZslope
Definition: MMT_Hit.h:71
MMT_Hit::m_sector
char m_sector
Definition: MMT_Hit.h:59
MMT_Hit::m_R
double m_R
Definition: MMT_Hit.h:74
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
index
Definition: index.py:1
MMT_Hit::m_RZslope
double m_RZslope
Definition: MMT_Hit.h:71
MMT_Hit::m_Rp
double m_Rp
Definition: MMT_Hit.h:74
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:63
MMT_Hit::m_Y
double m_Y
Definition: MMT_Hit.h:73
MuonGM::MuonDetectorManager::mmIdHelper
const MmIdHelper * mmIdHelper() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h:244
MMT_Hit::m_Z
double m_Z
Definition: MMT_Hit.h:73
MMT_Hit::m_module
std::string m_module
Definition: MMT_Hit.h:60
TRT::Hit::side
@ side
Definition: HitInfo.h:83
MMT_Hit::m_age
int m_age
Definition: MMT_Hit.h:72
MMT_Hit::m_shift
float m_shift
Definition: MMT_Hit.h:76
MMT_Hit::m_PitchOverZ
double m_PitchOverZ
Definition: MMT_Hit.h:73
python.PyAthena.module
module
Definition: PyAthena.py:131
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
MMT_Hit::m_gasgap
int m_gasgap
Definition: MMT_Hit.h:68
MMDetectorDescription
Definition: MMDetectorDescription.h:45
MMT_Hit::m_plane
int m_plane
Definition: MMT_Hit.h:64
MMT_Hit::m_VMM_chip
int m_VMM_chip
Definition: MMT_Hit.h:61
z
#define z
grepfile.age
age
Definition: grepfile.py:26
MMT_Hit::getChannel
int getChannel() const
Definition: MMT_Hit.h:23
MuonGM::MMReadoutElement::stripGlobalPosition
bool stripGlobalPosition(const Identifier &id, Amg::Vector3D &gpos) const
Definition: MMReadoutElement.h:280
MMReadoutParameters::stripPitch
double stripPitch
Definition: MMDetectorDescription.h:19
MMT_Hit::m_station_phi
int m_station_phi
Definition: MMT_Hit.h:66
MMT_Hit::m_MMFE_VMM
int m_MMFE_VMM
Definition: MMT_Hit.h:62
AnalysisUtils::Delta::R
double R(const INavigable4Momentum *p1, const double v_eta, const double v_phi)
Definition: AnalysisMisc.h:49
MMDetectorHelper::Get_MMDetector
MMDetectorDescription * Get_MMDetector(char type, int ieta, int iphi, int layer=1, char side='A')
Definition: MMDetectorHelper.cxx:41
MMT_Hit::m_multiplet
int m_multiplet
Definition: MMT_Hit.h:67
MMT_Hit::m_station_name
std::string m_station_name
Definition: MMT_Hit.h:60
GetAllXsec.entry
list entry
Definition: GetAllXsec.py:132
MMT_Hit::m_time
float m_time
Definition: MMT_Hit.h:76
createCoolChannelIdFile.par
par
Definition: createCoolChannelIdFile.py:29
MMT_Hit::getBC
int getBC() const
Definition: MMT_Hit.h:22
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
MMT_Hit::m_BC_time
int m_BC_time
Definition: MMT_Hit.h:72
y
#define y
MMT_Hit::getRZSlope
double getRZSlope() const
Definition: MMT_Hit.h:29
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:69
MuonGM::MMReadoutElement
An MMReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station con...
Definition: MMReadoutElement.h:25
MMT_Hit::getPlane
int getPlane() const
Definition: MMT_Hit.h:27
MMT_Hit::m_localX
double m_localX
Definition: MMT_Hit.h:70
MMDetectorHelper
Definition: MMDetectorHelper.h:24
MMReadoutParameters::distanceFromZAxis
double distanceFromZAxis
Definition: MMDetectorDescription.h:26
MMT_Hit::m_isNoise
bool m_isNoise
Definition: MMT_Hit.h:75
MmIdHelper::channelID
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int channel) const
Definition: MmIdHelper.cxx:736
MMReadoutParameters
Definition: MMDetectorDescription.h:18
Identifier
Definition: IdentifierFieldParser.cxx:14