ATLAS Offline Software
Public Member Functions | Public Attributes | Private Attributes | List of all members
NSWL1::PadOfflineData Class Reference

class modeling the pad hit fragment for the NSW L1 offline simulation More...

#include <PadOfflineData.h>

Inheritance diagram for NSWL1::PadOfflineData:
Collaboration diagram for NSWL1::PadOfflineData:

Public Member Functions

 PadOfflineData (Identifier id, float time, uint16_t bc_tag, const MuonGM::MuonDetectorManager *detMgr)
 
 ~PadOfflineData ()
 
Identifier Identity () const
 methods for retrieving the bare data More...
 
uint32_t id () const
 get the 32 bit word identifing the fragment More...
 
uint16_t BC_Tag () const
 get the BCID More...
 
float time () const
 get the arrival time after the delay is applied More...
 
int sideId () const
 helper methods decoding the hit fragment position within the NSW detector More...
 
int moduleId () const
 get the physics module (ranging from 1 at lowest R to 3 at highest R) More...
 
int sectorId () const
 get the sector (ranging from 1 to 8) More...
 
int sectorType () const
 get the sector type (ranging from 0 to 1, Small and Large) More...
 
int multipletId () const
 get the multiplet (ranging from 1 to 2, 1 is at lowest |z|) More...
 
int gasGapId () const
 get the gas gap (ranging from 1 to 4, 1 is at lowest |z|) More...
 
int channelId () const
 get the channel More...
 
int padEtaId () const
 get the pad eta channel
More...
 
int padPhiId () const
 get the pad phi channel More...
 
int padNumber () const
 
int triggerSectorNumber () const
 
float stationPhiAngle () const
 
void fillGeometricInformation ()
 

Public Attributes

float m_cornerXyz [4][3] {}
 

Private Attributes

const Identifier m_id
 offline identifier of the PAD hit More...
 
const MuonGM::MuonDetectorManagerm_detMgr
 
float m_time
 signal arrival time after electronics delay is applied More...
 
uint16_t m_bc_tag
 BC Tag. More...
 

Detailed Description

class modeling the pad hit fragment for the NSW L1 offline simulation

This holds the BDCI plus the hit offline identifier with the corresponding helper. Additional data can be added provding the relative access methods are also added in the abstract class.

Author
Alessandro Di Mattia dimat.nosp@m.tia@.nosp@m.cern..nosp@m.ch Alaettin Serhan Mete amete.nosp@m.@cer.nosp@m.n.ch

Definition at line 36 of file PadOfflineData.h.

Constructor & Destructor Documentation

◆ PadOfflineData()

NSWL1::PadOfflineData::PadOfflineData ( Identifier  id,
float  time,
uint16_t  bc_tag,
const MuonGM::MuonDetectorManager detMgr 
)

Definition at line 18 of file PadOfflineData.cxx.

18  :
19  PadData(),
20  m_id(id),m_detMgr(detMgr),m_time(time),m_bc_tag(bc_tag)
21  {
22  }

◆ ~PadOfflineData()

NSWL1::PadOfflineData::~PadOfflineData ( )

Definition at line 24 of file PadOfflineData.cxx.

24  {
25  // PaddOfflineData doesn't own the helper, so nothing to do here
26  }

Member Function Documentation

◆ BC_Tag()

uint16_t NSWL1::PadOfflineData::BC_Tag ( ) const
virtual

get the BCID

Implements NSWL1::PadData.

Definition at line 31 of file PadOfflineData.cxx.

31 { return m_bc_tag; }

◆ channelId()

int NSWL1::PadOfflineData::channelId ( ) const
virtual

get the channel

Implements NSWL1::PadData.

Definition at line 65 of file PadOfflineData.cxx.

65  {
66  if (m_detMgr) return m_detMgr->stgcIdHelper()->channel(m_id);
67  return -1;
68  }

◆ fillGeometricInformation()

void NSWL1::PadOfflineData::fillGeometricInformation ( )

Definition at line 117 of file PadOfflineData.cxx.

117  {
118  if (m_detMgr ==nullptr) return;
120  const Trk::PlaneSurface &surface = rdoEl->surface(this->Identity());
121  std::array<Amg::Vector2D, 4> local_pad_corners{make_array<Amg::Vector2D, 4>(Amg::Vector2D::Zero())};
122  //From MuonPadDesign... read pad local corners
123  bool check=rdoEl->padCorners(this->Identity(),local_pad_corners);
124  if(! check ){
125  std::cout<<"Unable to get pad corners!"<<std::endl;
126  return;
127  }
128  Amg::Vector3D pad_corner_global{Amg::Vector3D::Zero()};
129  for(unsigned int i=0; i<4; i++) {
130  surface.localToGlobal(local_pad_corners.at(i), pad_corner_global, pad_corner_global);
131  this->m_cornerXyz[i][0] = pad_corner_global.x();
132  this->m_cornerXyz[i][1] = pad_corner_global.y();
133  this->m_cornerXyz[i][2] = pad_corner_global.z();
134  }
135  return;
136  }

◆ gasGapId()

int NSWL1::PadOfflineData::gasGapId ( ) const
virtual

get the gas gap (ranging from 1 to 4, 1 is at lowest |z|)

Implements NSWL1::PadData.

Definition at line 60 of file PadOfflineData.cxx.

60  {
61  if (m_detMgr) return m_detMgr->stgcIdHelper()->gasGap(m_id);
62  return -1;
63  }

◆ id()

uint32_t NSWL1::PadOfflineData::id ( ) const
virtual

get the 32 bit word identifing the fragment

methods for retrieving the bare data

Implements NSWL1::PadData.

Definition at line 29 of file PadOfflineData.cxx.

29 { return m_id.get_identifier32().get_compact(); }

◆ Identity()

Identifier NSWL1::PadOfflineData::Identity ( ) const

methods for retrieving the bare data

Definition at line 30 of file PadOfflineData.cxx.

30 {return m_id;}

◆ moduleId()

int NSWL1::PadOfflineData::moduleId ( ) const
virtual

get the physics module (ranging from 1 at lowest R to 3 at highest R)

Implements NSWL1::PadData.

Definition at line 40 of file PadOfflineData.cxx.

40  {
41  if (m_detMgr) return std::abs(m_detMgr->stgcIdHelper()->stationEta(m_id));
42  return -1;
43  }

◆ multipletId()

int NSWL1::PadOfflineData::multipletId ( ) const
virtual

get the multiplet (ranging from 1 to 2, 1 is at lowest |z|)

Implements NSWL1::PadData.

Definition at line 55 of file PadOfflineData.cxx.

55  {
56  if (m_detMgr) return m_detMgr->stgcIdHelper()->multilayer(m_id);
57  return -1;
58  }

◆ padEtaId()

int NSWL1::PadOfflineData::padEtaId ( ) const
virtual

get the pad eta channel

Implements NSWL1::PadData.

Definition at line 70 of file PadOfflineData.cxx.

70  {
71  if (m_detMgr) return m_detMgr->stgcIdHelper()->padEta(m_id);
72  return -1;
73  }

◆ padNumber()

int NSWL1::PadOfflineData::padNumber ( ) const
virtual

Implements NSWL1::PadData.

Definition at line 101 of file PadOfflineData.cxx.

101  {//pad numbers from Y.R
102  if(m_detMgr == nullptr ) return nullPadNumber;
103  int modId=moduleId();//id to use pad encoding {1,2,3}/S {4,5,6} L
104  if(sectorType() ==1) modId+=3;
105  return 1000*modId+(padPhiId()-1)*18+padEtaId();
106  }

◆ padPhiId()

int NSWL1::PadOfflineData::padPhiId ( ) const
virtual

get the pad phi channel

Implements NSWL1::PadData.

Definition at line 75 of file PadOfflineData.cxx.

75  {
76  if (m_detMgr) return m_detMgr->stgcIdHelper()->padPhi(m_id);
77  return -1;
78  }

◆ sectorId()

int NSWL1::PadOfflineData::sectorId ( ) const
virtual

get the sector (ranging from 1 to 8)

Implements NSWL1::PadData.

Definition at line 45 of file PadOfflineData.cxx.

45  {
46  if(m_detMgr) { return m_detMgr->stgcIdHelper()->stationPhi(m_id); }
47  return -1;
48  }

◆ sectorType()

int NSWL1::PadOfflineData::sectorType ( ) const
virtual

get the sector type (ranging from 0 to 1, Small and Large)

Implements NSWL1::PadData.

Definition at line 50 of file PadOfflineData.cxx.

50  {
51  if(m_detMgr) { return m_detMgr->stgcIdHelper()->isSmall(m_id) ? 0 : 1; }
52  return -1;
53  }

◆ sideId()

int NSWL1::PadOfflineData::sideId ( ) const
virtual

helper methods decoding the hit fragment position within the NSW detector

get the side (0==sideC, 1==sideA)

Implements NSWL1::PadData.

Definition at line 35 of file PadOfflineData.cxx.

35  {
36  if (m_detMgr) return (m_detMgr->stgcIdHelper()->stationEta(m_id)<0)? 0 : 1;
37  return -1;
38  }

◆ stationPhiAngle()

float NSWL1::PadOfflineData::stationPhiAngle ( ) const

Definition at line 80 of file PadOfflineData.cxx.

80  {
81  float phiAngle=-999;
82  switch( this->sectorType() ){
83 
84  case(0)://S
85  phiAngle=(2*this->sectorId()-1 )*(M_PI/8);
86  break;
87 
88  case(1)://L
89  phiAngle=(this->sectorId()-1)*(M_PI/4);
90  break;
91 
92  default:
93  break;
94  }
95 
96  if(phiAngle > M_PI) phiAngle-=2*M_PI;
97 
98  return phiAngle;
99  }

◆ time()

float NSWL1::PadOfflineData::time ( ) const

get the arrival time after the delay is applied

Definition at line 32 of file PadOfflineData.cxx.

32 { return m_time; }

◆ triggerSectorNumber()

int NSWL1::PadOfflineData::triggerSectorNumber ( ) const
virtual

Implements NSWL1::PadData.

Definition at line 107 of file PadOfflineData.cxx.

107  {
108  if(m_detMgr == nullptr ) return -1;
109  if(this->sectorType() == 0 ){//S
110  return this->sectorId()*2;
111  }
112  else{//L
113  return 2*this->sectorId()-1;
114  }
115  }

Member Data Documentation

◆ m_bc_tag

uint16_t NSWL1::PadOfflineData::m_bc_tag
private

BC Tag.

Definition at line 42 of file PadOfflineData.h.

◆ m_cornerXyz

float NSWL1::PadOfflineData::m_cornerXyz[4][3] {}

Definition at line 73 of file PadOfflineData.h.

◆ m_detMgr

const MuonGM::MuonDetectorManager* NSWL1::PadOfflineData::m_detMgr
private

Definition at line 40 of file PadOfflineData.h.

◆ m_id

const Identifier NSWL1::PadOfflineData::m_id
private

offline identifier of the PAD hit

Definition at line 39 of file PadOfflineData.h.

◆ m_time

float NSWL1::PadOfflineData::m_time
private

signal arrival time after electronics delay is applied

Definition at line 41 of file PadOfflineData.h.


The documentation for this class was generated from the following files:
MuonGM::sTgcReadoutElement::padCorners
bool padCorners(const Identifier &id, std::array< Amg::Vector2D, 4 > &corners) const
pad corners
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/sTgcReadoutElement.h:358
sTgcIdHelper::multilayer
int multilayer(const Identifier &id) const
Definition: sTgcIdHelper.cxx:1017
NSWL1::PadOfflineData::moduleId
int moduleId() const
get the physics module (ranging from 1 at lowest R to 3 at highest R)
Definition: PadOfflineData.cxx:40
M_PI
#define M_PI
Definition: ActiveFraction.h:11
Identifier::get_identifier32
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
NSWL1::PadOfflineData::sectorType
int sectorType() const
get the sector type (ranging from 0 to 1, Small and Large)
Definition: PadOfflineData.cxx:50
MuonGM::MuonClusterReadoutElement::surface
virtual const Trk::PlaneSurface & surface() const override
access to chamber surface (phi orientation), uses the first gas gap
Definition: MuonClusterReadoutElement.h:123
Identifier32::get_compact
value_type get_compact() const
Get the compact id.
Definition: Identifier32.h:44
NSWL1::PadOfflineData::m_detMgr
const MuonGM::MuonDetectorManager * m_detMgr
Definition: PadOfflineData.h:40
NSWL1::PadOfflineData::padEtaId
int padEtaId() const
get the pad eta channel
Definition: PadOfflineData.cxx:70
MuonIdHelper::isSmall
bool isSmall(const Identifier &id) const
Definition: MuonIdHelper.cxx:831
sTgcIdHelper::channel
int channel(const Identifier &id) const override
Definition: sTgcIdHelper.cxx:1027
NSWL1::PadData::PadData
PadData()
Definition: PadData.h:54
lumiFormat.i
int i
Definition: lumiFormat.py:85
MuonGM::sTgcReadoutElement
An sTgcReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station c...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/sTgcReadoutElement.h:30
NSWL1::PadOfflineData::Identity
Identifier Identity() const
methods for retrieving the bare data
Definition: PadOfflineData.cxx:30
sTgcIdHelper::gasGap
int gasGap(const Identifier &id) const override
get the hashes
Definition: sTgcIdHelper.cxx:1020
MuonGM::MuonDetectorManager::stgcIdHelper
const sTgcIdHelper * stgcIdHelper() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h:241
NSWL1::PadOfflineData::m_time
float m_time
signal arrival time after electronics delay is applied
Definition: PadOfflineData.h:41
NSWL1::nullPadNumber
const int nullPadNumber
Definition: tdr_compat_enum.h:21
NSWL1::PadOfflineData::padPhiId
int padPhiId() const
get the pad phi channel
Definition: PadOfflineData.cxx:75
MuonIdHelper::stationPhi
int stationPhi(const Identifier &id) const
Definition: MuonIdHelper.cxx:810
MuonIdHelper::stationEta
int stationEta(const Identifier &id) const
Definition: MuonIdHelper.cxx:805
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
LArNewCalib_Delay_OFC_Cali.check
check
Definition: LArNewCalib_Delay_OFC_Cali.py:267
NSWL1::PadOfflineData::m_cornerXyz
float m_cornerXyz[4][3]
Definition: PadOfflineData.h:73
sTgcIdHelper::padPhi
int padPhi(const Identifier &id) const
Definition: sTgcIdHelper.cxx:679
NSWL1::PadOfflineData::m_bc_tag
uint16_t m_bc_tag
BC Tag.
Definition: PadOfflineData.h:42
NSWL1::PadOfflineData::time
float time() const
get the arrival time after the delay is applied
Definition: PadOfflineData.cxx:32
Trk::PlaneSurface
Definition: PlaneSurface.h:64
NSWL1::PadOfflineData::m_id
const Identifier m_id
offline identifier of the PAD hit
Definition: PadOfflineData.h:39
sTgcIdHelper::padEta
int padEta(const Identifier &id) const
Definition: sTgcIdHelper.cxx:669
MuonGM::MuonDetectorManager::getsTgcReadoutElement
const sTgcReadoutElement * getsTgcReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx:259
NSWL1::PadOfflineData::sectorId
int sectorId() const
get the sector (ranging from 1 to 8)
Definition: PadOfflineData.cxx:45
Trk::PlaneSurface::localToGlobal
virtual void localToGlobal(const Amg::Vector2D &locp, const Amg::Vector3D &mom, Amg::Vector3D &glob) const override final
Specified for PlaneSurface: LocalToGlobal method without dynamic memory allocation.
Definition: PlaneSurface.cxx:204
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32