ATLAS Offline Software
Loading...
Searching...
No Matches
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 isX () const
bool isU () const
bool isV () const
bool infSlope () const
void setAge (int age)

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_isX {false}
bool m_isU {false}
bool m_isV {false}

Detailed Description

Definition at line 13 of file TrigT1NSWSimTools/src/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 TrigT1NSWSimTools/src/MMT_Hit.cxx.

12 : m_time(stripTime),
13 m_station_eta(stEta), m_station_phi(stPhi), m_sector_phi(sectorPhi),
14 m_strip(channel),
15 m_BC_time(BC), m_age(BC),
16 m_sector(stationName[2])
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
86 Identifier tmpId = detManager->mmIdHelper()->channelID(stationName, 1, 1, 1, 1, 1);
87 const MuonGM::MMReadoutElement* roEl = detManager->getMMReadoutElement(tmpId);
88 const double distanceFromZAxis = roEl->absTransform().translation().perp() - 0.5*roEl->getRsize();
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}
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int channel) const
const MuonChannelDesign * getDesign(const Identifier &id) const
returns the MuonChannelDesign class for the given identifier
bool stripGlobalPosition(const Identifier &id, Amg::Vector3D &gpos) const
const MMReadoutElement * getMMReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
Eigen::Matrix< double, 3, 1 > Vector3D
double R(const INavigable4Momentum *p1, const double v_eta, const double v_phi)
str index
Definition DeMoScan.py:362

◆ ~MMT_Hit()

MMT_Hit::~MMT_Hit ( )
default

Member Function Documentation

◆ getAge()

int MMT_Hit::getAge ( ) const
inline

Definition at line 25 of file TrigT1NSWSimTools/src/MMT_Hit.h.

25{ return m_age; }

◆ getART()

int MMT_Hit::getART ( ) const
inline

Definition at line 24 of file TrigT1NSWSimTools/src/MMT_Hit.h.

24{ return m_ART_ASIC; }

◆ getBC()

int MMT_Hit::getBC ( ) const
inline

Definition at line 26 of file TrigT1NSWSimTools/src/MMT_Hit.h.

26{ return m_BC_time; }

◆ getChannel()

int MMT_Hit::getChannel ( ) const
inline

Definition at line 27 of file TrigT1NSWSimTools/src/MMT_Hit.h.

27{ return m_strip; }

◆ getPitchOverZ()

double MMT_Hit::getPitchOverZ ( ) const
inline

Definition at line 39 of file TrigT1NSWSimTools/src/MMT_Hit.h.

39{ return m_PitchOverZ; }

◆ getPlane()

int MMT_Hit::getPlane ( ) const
inline

Definition at line 28 of file TrigT1NSWSimTools/src/MMT_Hit.h.

28{ return m_plane; }

◆ getR()

double MMT_Hit::getR ( ) const
inline

Definition at line 36 of file TrigT1NSWSimTools/src/MMT_Hit.h.

36{ return m_R; }

◆ getRp()

double MMT_Hit::getRp ( ) const
inline

Definition at line 37 of file TrigT1NSWSimTools/src/MMT_Hit.h.

37{ return m_Rp; }

◆ getRZSlope()

double MMT_Hit::getRZSlope ( ) const
inline

Definition at line 30 of file TrigT1NSWSimTools/src/MMT_Hit.h.

30{ return m_RZslope; }

◆ getSector()

char MMT_Hit::getSector ( ) const
inline

Definition at line 29 of file TrigT1NSWSimTools/src/MMT_Hit.h.

29{ return m_sector; }

◆ getSectorPhi()

int MMT_Hit::getSectorPhi ( ) const
inline

Definition at line 35 of file TrigT1NSWSimTools/src/MMT_Hit.h.

35{ return m_sector_phi; }

◆ getShift()

double MMT_Hit::getShift ( ) const
inline

Definition at line 32 of file TrigT1NSWSimTools/src/MMT_Hit.h.

32{ return m_shift; }

◆ getStationEta()

int MMT_Hit::getStationEta ( ) const
inline

Definition at line 33 of file TrigT1NSWSimTools/src/MMT_Hit.h.

33{ return m_station_eta; }

◆ getStationPhi()

int MMT_Hit::getStationPhi ( ) const
inline

Definition at line 34 of file TrigT1NSWSimTools/src/MMT_Hit.h.

34{ return m_station_phi; }

◆ getTime()

float MMT_Hit::getTime ( ) const
inline

Definition at line 40 of file TrigT1NSWSimTools/src/MMT_Hit.h.

40{ return m_time; }

◆ getVMM()

int MMT_Hit::getVMM ( ) const
inline

Definition at line 31 of file TrigT1NSWSimTools/src/MMT_Hit.h.

31{ return m_VMM_chip; }

◆ getZ()

double MMT_Hit::getZ ( ) const
inline

Definition at line 38 of file TrigT1NSWSimTools/src/MMT_Hit.h.

38{ return m_Z; }

◆ infSlope()

bool MMT_Hit::infSlope ( ) const
inline

Definition at line 44 of file TrigT1NSWSimTools/src/MMT_Hit.h.

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

◆ isU()

bool MMT_Hit::isU ( ) const
inline

Definition at line 42 of file TrigT1NSWSimTools/src/MMT_Hit.h.

42{ return m_isU; }

◆ isV()

bool MMT_Hit::isV ( ) const
inline

Definition at line 43 of file TrigT1NSWSimTools/src/MMT_Hit.h.

43{ return m_isV; }

◆ isX()

bool MMT_Hit::isX ( ) const
inline

Definition at line 41 of file TrigT1NSWSimTools/src/MMT_Hit.h.

41{ return m_isX; }

◆ setAge()

void MMT_Hit::setAge ( int age)
inline

Definition at line 47 of file TrigT1NSWSimTools/src/MMT_Hit.h.

47{ m_age = age; }

Member Data Documentation

◆ m_age

int MMT_Hit::m_age
private

Definition at line 62 of file TrigT1NSWSimTools/src/MMT_Hit.h.

◆ m_ART_ASIC

int MMT_Hit::m_ART_ASIC
private

Definition at line 55 of file TrigT1NSWSimTools/src/MMT_Hit.h.

◆ m_BC_time

int MMT_Hit::m_BC_time
private

Definition at line 61 of file TrigT1NSWSimTools/src/MMT_Hit.h.

◆ m_isU

bool MMT_Hit::m_isU {false}
private

Definition at line 65 of file TrigT1NSWSimTools/src/MMT_Hit.h.

65{false};

◆ m_isV

bool MMT_Hit::m_isV {false}
private

Definition at line 66 of file TrigT1NSWSimTools/src/MMT_Hit.h.

66{false};

◆ m_isX

bool MMT_Hit::m_isX {false}
private

Definition at line 64 of file TrigT1NSWSimTools/src/MMT_Hit.h.

64{false};

◆ m_PitchOverZ

double MMT_Hit::m_PitchOverZ {-1}
private

Definition at line 52 of file TrigT1NSWSimTools/src/MMT_Hit.h.

52{-1}, m_shift{-1};

◆ m_plane

int MMT_Hit::m_plane
private

Definition at line 56 of file TrigT1NSWSimTools/src/MMT_Hit.h.

◆ m_R

double MMT_Hit::m_R {-1}
private

Definition at line 51 of file TrigT1NSWSimTools/src/MMT_Hit.h.

51{-1}, m_R{-1};

◆ m_Rp

double MMT_Hit::m_Rp {-1}
private

Definition at line 50 of file TrigT1NSWSimTools/src/MMT_Hit.h.

50{-1}, m_Rp{-1};

◆ m_RZslope

double MMT_Hit::m_RZslope {-1}
private

Definition at line 50 of file TrigT1NSWSimTools/src/MMT_Hit.h.

50{-1}, m_Rp{-1};

◆ m_sector

char MMT_Hit::m_sector
private

Definition at line 63 of file TrigT1NSWSimTools/src/MMT_Hit.h.

◆ m_sector_phi

int MMT_Hit::m_sector_phi
private

Definition at line 59 of file TrigT1NSWSimTools/src/MMT_Hit.h.

◆ m_shift

double MMT_Hit::m_shift {-1}
private

Definition at line 52 of file TrigT1NSWSimTools/src/MMT_Hit.h.

52{-1}, m_shift{-1};

◆ m_station_eta

int MMT_Hit::m_station_eta
private

Definition at line 57 of file TrigT1NSWSimTools/src/MMT_Hit.h.

◆ m_station_phi

int MMT_Hit::m_station_phi
private

Definition at line 58 of file TrigT1NSWSimTools/src/MMT_Hit.h.

◆ m_strip

int MMT_Hit::m_strip
private

Definition at line 60 of file TrigT1NSWSimTools/src/MMT_Hit.h.

◆ m_time

float MMT_Hit::m_time
private

Definition at line 53 of file TrigT1NSWSimTools/src/MMT_Hit.h.

◆ m_VMM_chip

int MMT_Hit::m_VMM_chip
private

Definition at line 54 of file TrigT1NSWSimTools/src/MMT_Hit.h.

◆ m_Z

double MMT_Hit::m_Z {-1}
private

Definition at line 51 of file TrigT1NSWSimTools/src/MMT_Hit.h.

51{-1}, m_R{-1};

The documentation for this class was generated from the following files: