ATLAS Offline Software
StripOfflineData.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
6 //Local includes
8 
9 #include <string>
10 #include <TVector3.h>
11 
12 namespace NSWL1 {
13 
15  StripData(),
16  m_id(id), m_helper(helper),m_trig_bcid(0),m_band_id(-1),m_phi_id(-1)
17  {
18  m_strip_charge_6bit=digit-> charge_6bit();
19  m_strip_charge_10bit= digit-> charge_10bit();
21  m_strip_time=digit->time();
22  }
23 
25  // StripOfflineData doesn't own the helper, so nothing to do here
26  }
27 
29  m_trig_bcid = bcid;
30  }
33  }
36  }
37 
40  }
41 
44 
45  }
46 
47 
48  void StripOfflineData::setBandId(int band_id){
49  m_band_id = band_id;
50  }
51 
52  void StripOfflineData::setPhiId(int phi_id) {
53  m_phi_id = phi_id;
54  }
55 
56 
59  float StripOfflineData::time() const { return m_strip_time; }
61  int StripOfflineData::trig_BCID() const { return m_trig_bcid; }
63 
67 
68  int StripOfflineData::bandId() const { return m_band_id; }
69  int StripOfflineData::phiId() const { return m_phi_id; }
70 
72  int StripOfflineData::sideId() const {
73  if (m_helper) return (m_helper->stationEta(m_id)<0)? 0 : 1;
74  return -1;
75  }
76 
78  if (m_helper) return std::abs(m_helper->stationEta(m_id ) );
79  return -1;
80  }
81 
83  if (m_helper) {
84  return m_helper->stationPhi(m_id);
85  }
86  return -1;
87  }
88 
89 
90 
91  std::string StripOfflineData::stationName() const {
92  if (m_helper) {
94  }
95  return "";
96  }
97 
98  char StripOfflineData::type() const {
99  if (m_helper) {
100  std::string stName = m_helper->stationNameString(m_helper->stationName(m_id));
101  bool isSmall = stName[2]=='S';
102  return (isSmall)? 'S' : 'L';
103  }
104  return -1;
105  }
106 
108  return m_sectorType;
109  }
110 
111 
113  if (m_helper) {
114  std::string stName = m_helper->stationNameString(m_helper->stationName(m_id));
115  bool isSmall = stName[2]=='S';
116  return isSmall;
117  }
118  return 0;
119  }
120 
121 
123  if (m_helper) return m_helper->multilayer(m_id) ;
124  return -1;
125  }
126 
128  if (m_helper) return m_helper->gasGap(m_id) ;
129  return -1;
130  }
131 
133  if (m_helper) return m_helper->channel(m_id) ;
134  return -1;
135  }
136 
137  float StripOfflineData::globX() const {
138  return m_x;
139  }
140  float StripOfflineData::globY() const {
141  return m_y;
142  }
143  float StripOfflineData::globZ() const {
144  return m_z;
145  }
146 
148  return TVector3(globX(),globY(),globZ()).Eta();
149  }
150 
151 
153  m_x=pos;
154  }
156  m_y=pos;
157  }
159  m_z=pos;
160  }
161 
162  float StripOfflineData::locX() const {
163  return m_lx;
164  }
165  float StripOfflineData::locY() const {
166  return m_ly;
167  }
168  float StripOfflineData::locZ() const {
169  return m_lz;
170  }
171 
172 
174  return m_read_strip;
175  }
176 
177  void StripOfflineData::set_readStrip(bool readStrip){
179  }
180 
181 
183  m_lx=pos;
184  }
186  m_ly=pos;
187  }
189  m_lz=pos;
190  }
191 
193  m_sideId=id;
194  }
196  m_sectorType=t;
197  }
199  m_sectorId=id;
200  }
202  m_moduleId=mod;
203  }
205  m_wedgeId=wg;
206  }
208  m_layerId=lr;
209  }
210 
211 
212 
213 
214 }
sTgcIdHelper::multilayer
int multilayer(const Identifier &id) const
Definition: sTgcIdHelper.cxx:1017
NSWL1::StripOfflineData::setLayerId
void setLayerId(int)
Definition: StripOfflineData.cxx:207
NSWL1::StripOfflineData::m_trig_bcid
int m_trig_bcid
Definition: StripOfflineData.h:39
NSWL1::StripOfflineData::globY
float globY() const
global Y pos
Definition: StripOfflineData.cxx:140
NSWL1::StripOfflineData::m_y
float m_y
Definition: StripOfflineData.h:47
NSWL1::StripOfflineData::m_padTrigIndex
int m_padTrigIndex
Definition: StripOfflineData.h:40
NSWL1::StripOfflineData::sideId
int sideId() const
helper methods decoding the hit fragment position within the NSW detector
Definition: StripOfflineData.cxx:72
NSWL1::StripOfflineData::bandId
int bandId() const
get the band id
Definition: StripOfflineData.cxx:68
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
NSWL1::StripOfflineData::setSectorId
void setSectorId(int)
Definition: StripOfflineData.cxx:198
NSWL1::StripOfflineData::~StripOfflineData
~StripOfflineData()
Definition: StripOfflineData.cxx:24
NSWL1::StripOfflineData::charge
float charge() const
NSWL1::StripOfflineData::setPhiId
void setPhiId(int phi_id)
get the band id
Definition: StripOfflineData.cxx:52
NSWL1::StripOfflineData::setTrigBCID
void setTrigBCID(int bcid)
Definition: StripOfflineData.cxx:28
NSWL1::StripOfflineData::set_locZ
void set_locZ(float pos)
Definition: StripOfflineData.cxx:188
NSWL1::StripOfflineData::locY
float locY() const
local Y pos
Definition: StripOfflineData.cxx:165
Identifier::get_identifier32
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
NSWL1::StripOfflineData::m_lx
float m_lx
Definition: StripOfflineData.h:48
NSWL1::StripOfflineData::channelId
int channelId() const
get the channel
Definition: StripOfflineData.cxx:132
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
MuonIdHelper::stationName
int stationName(const Identifier &id) const
Definition: MuonIdHelper.cxx:800
NSWL1::StripOfflineData::m_sectorType
int m_sectorType
Definition: StripOfflineData.h:52
checkRpcDigits.digit
digit
Definition: checkRpcDigits.py:186
NSWL1::StripOfflineData::m_strip_charge
float m_strip_charge
Definition: StripOfflineData.h:41
NSWL1::StripOfflineData::globX
float globX() const
Use this for clustering.
Definition: StripOfflineData.cxx:137
Identifier32::get_compact
value_type get_compact() const
Get the compact id.
Definition: Identifier32.h:44
NSWL1::StripOfflineData::m_band_id
int m_band_id
Definition: StripOfflineData.h:45
NSWL1::StripData
abstract class to interface the data hit fragment output from the Strip TDS
Definition: TrigT1NSWSimTools/TrigT1NSWSimTools/StripData.h:30
NSWL1::StripOfflineData::set_locY
void set_locY(float pos)
Definition: StripOfflineData.cxx:185
NSWL1::StripOfflineData::m_layerId
int m_layerId
Definition: StripOfflineData.h:56
runBeamSpotCalibration.helper
helper
Definition: runBeamSpotCalibration.py:112
sTgcDigit
Definition: sTgcDigit.h:20
NSWL1::StripOfflineData::layer
int layer() const
get the gas gap (ranging from 0 to 3, 1 is at lowest |z|)
Definition: StripOfflineData.cxx:127
NSWL1::StripOfflineData::setModuleId
void setModuleId(int)
Definition: StripOfflineData.cxx:201
NSWL1::StripOfflineData::sectorType
int sectorType() const
helper methods decoding the hit fragment position within the NSW detector
Definition: StripOfflineData.cxx:107
sTgcIdHelper::channel
int channel(const Identifier &id) const override
Definition: sTgcIdHelper.cxx:1027
maskDeadModules.mod
mod
Definition: maskDeadModules.py:36
NSWL1::StripOfflineData::locZ
float locZ() const
local Z pos
Definition: StripOfflineData.cxx:168
NSWL1::StripOfflineData::etaCenter
float etaCenter() const
Definition: StripOfflineData.cxx:147
NSWL1::StripOfflineData::set_globX
void set_globX(float pos)
Definition: StripOfflineData.cxx:152
NSWL1::StripOfflineData::moduleId
int moduleId() const
get the physics module (ranging from 0 at lowest R to 3 at highest R)
Definition: StripOfflineData.cxx:77
NSWL1::StripOfflineData::type
char type() const
Definition: StripOfflineData.cxx:98
NSWL1::StripOfflineData::isSmall
int isSmall() const
get the side (0==sideC, 1==sideA)
Definition: StripOfflineData.cxx:112
sTgcIdHelper::gasGap
int gasGap(const Identifier &id) const override
get the hashes
Definition: sTgcIdHelper.cxx:1020
NSWL1::StripOfflineData::setBandId
void setBandId(int band_id)
get the band id
Definition: StripOfflineData.cxx:48
NSWL1::StripOfflineData::set_locX
void set_locX(float pos)
Definition: StripOfflineData.cxx:182
NSWL1::StripOfflineData::locX
float locX() const
local X pos
Definition: StripOfflineData.cxx:162
NSWL1::StripOfflineData::trigIndex
int trigIndex() const
Definition: StripOfflineData.cxx:62
StripOfflineData.h
NSWL1::StripOfflineData::m_wedgeId
int m_wedgeId
Definition: StripOfflineData.h:55
NSWL1::StripOfflineData::id
uint32_t id() const
methods for retrieving the bare data
Definition: StripOfflineData.cxx:58
MuonIdHelper::stationPhi
int stationPhi(const Identifier &id) const
Definition: MuonIdHelper.cxx:810
NSWL1::StripOfflineData::setWedgeId
void setWedgeId(int)
Definition: StripOfflineData.cxx:204
NSWL1::StripOfflineData::StripOfflineData
StripOfflineData(Identifier id, const sTgcIdHelper *helper, const sTgcDigit *digit)
Definition: StripOfflineData.cxx:14
MuonIdHelper::stationNameString
const std::string & stationNameString(const int &index) const
Definition: MuonIdHelper.cxx:854
NSWL1::StripOfflineData::set_globZ
void set_globZ(float pos)
Definition: StripOfflineData.cxx:158
NSWL1::StripOfflineData::m_sideId
int m_sideId
Definition: StripOfflineData.h:51
NSWL1::StripOfflineData::trig_BCID
int trig_BCID() const
get the trigger BCID
Definition: StripOfflineData.cxx:61
NSWL1::StripOfflineData::strip_charge
float strip_charge() const
get the strip charge
Definition: StripOfflineData.cxx:64
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:227
NSWL1::StripOfflineData::m_strip_charge_10bit
int m_strip_charge_10bit
Definition: StripOfflineData.h:43
NSWL1::StripOfflineData::m_strip_charge_6bit
int m_strip_charge_6bit
Definition: StripOfflineData.h:44
charge
double charge(const T &p)
Definition: AtlasPID.h:756
NSWL1::StripOfflineData::m_x
float m_x
Definition: StripOfflineData.h:47
sTgcIdHelper
Definition: sTgcIdHelper.h:55
xAOD::bcid
setEventNumber setTimeStamp bcid
Definition: EventInfo_v1.cxx:133
MuonIdHelper::stationEta
int stationEta(const Identifier &id) const
Definition: MuonIdHelper.cxx:805
NSWL1::StripOfflineData::Identity
Identifier Identity() const
return indentifier
Definition: StripOfflineData.cxx:60
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
NSWL1::StripOfflineData::setStripCharge_6bit
void setStripCharge_6bit(int charge)
Definition: StripOfflineData.cxx:34
NSWL1::StripOfflineData::m_moduleId
int m_moduleId
Definition: StripOfflineData.h:54
NSWL1::StripOfflineData::setSideId
void setSideId(int)
Definition: StripOfflineData.cxx:192
NSWL1::StripOfflineData::setSectorType
void setSectorType(int)
Definition: StripOfflineData.cxx:195
NSWL1::StripOfflineData::m_id
const Identifier m_id
offline identifier of the strip hit
Definition: StripOfflineData.h:37
NSWL1::StripOfflineData::phiId
int phiId() const
get the phi id
Definition: StripOfflineData.cxx:69
NSWL1::StripOfflineData::m_strip_time
float m_strip_time
Definition: StripOfflineData.h:42
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
NSWL1::StripOfflineData::setTrigIndex
void setTrigIndex(int)
Definition: StripOfflineData.cxx:31
NSWL1::StripOfflineData::m_ly
float m_ly
Definition: StripOfflineData.h:48
NSWL1::StripOfflineData::m_lz
float m_lz
Definition: StripOfflineData.h:48
NSWL1::StripOfflineData::time
float time() const
global X pos
Definition: StripOfflineData.cxx:59
NSWL1::StripOfflineData::m_sectorId
int m_sectorId
Definition: StripOfflineData.h:53
NSWL1::StripOfflineData::set_globY
void set_globY(float pos)
Definition: StripOfflineData.cxx:155
NSWL1::StripOfflineData::wedge
int wedge() const
get the multiplet (ranging from 0 to 1, 1 is at lowest |z|)
Definition: StripOfflineData.cxx:122
NSWL1::StripOfflineData::strip_charge_6bit
int strip_charge_6bit() const
get the strip charge in 6 bit
Definition: StripOfflineData.cxx:65
NSWL1
A trigger trigger candidate for a stgc sector.
Definition: NSWL1Simulation.cxx:9
NSWL1::StripOfflineData::sectorId
int sectorId() const
get the sector (ranging from 0 to 15)
Definition: StripOfflineData.cxx:82
NSWL1::StripOfflineData::m_z
float m_z
Definition: StripOfflineData.h:47
NSWL1::StripOfflineData::m_phi_id
int m_phi_id
Definition: StripOfflineData.h:46
NSWL1::StripOfflineData::setStripCharge
void setStripCharge(float charge)
Definition: StripOfflineData.cxx:42
NSWL1::StripOfflineData::readStrip
bool readStrip() const
Check if strip should be read.
Definition: StripOfflineData.cxx:173
NSWL1::StripOfflineData::m_helper
const sTgcIdHelper * m_helper
helper for the identifier decoding
Definition: StripOfflineData.h:38
NSWL1::StripOfflineData::set_readStrip
void set_readStrip(bool readStrip)
Definition: StripOfflineData.cxx:177
NSWL1::StripOfflineData::stationName
std::string stationName() const
Definition: StripOfflineData.cxx:91
NSWL1::StripOfflineData::setStripCharge_10bit
void setStripCharge_10bit(int charge)
Definition: StripOfflineData.cxx:38
NSWL1::StripOfflineData::strip_charge_10bit
int strip_charge_10bit() const
get the strip charge in 10 bit
Definition: StripOfflineData.cxx:66
NSWL1::StripOfflineData::m_read_strip
bool m_read_strip
Definition: StripOfflineData.h:49
NSWL1::StripOfflineData::globZ
float globZ() const
globzl Z pos
Definition: StripOfflineData.cxx:143
Identifier
Definition: IdentifierFieldParser.cxx:14