HighLAND
Functions
ND::GeomId::P0D Namespace Reference

Define the P0D specific geometry identifiers. More...

Functions

TGeometryId Detector ()
 Define a geometry identifier to the entire P0D detector.
 
bool IsP0D (TGeometryId id)
 Check if the id is for the P0D.
 
TGeometryId SuperP0Dule (int sP0Dule)
 
int GetSuperP0Dule (TGeometryId id)
 
TGeometryId P0Dule (int p0dule)
 
int GetP0Dule (TGeometryId id)
 
TGeometryId Target (int target)
 
int GetTarget (TGeometryId id)
 
TGeometryId ECalRadiator (int radiator)
 
int GetECalRadiator (TGeometryId id)
 
TGeometryId TargetRadiator (int radiator)
 
int GetTargetRadiator (TGeometryId id)
 
TGeometryId Bar (int p0dule, int layer, int bar)
 
int GetBarP0Dule (TGeometryId id)
 
int GetBarLayer (TGeometryId id)
 
int GetBarNumber (TGeometryId id)
 

Detailed Description

Define the P0D specific geometry identifiers.

Function Documentation

§ Bar()

ND::TGeometryId ND::GeomId::P0D::Bar ( int  p0dule,
int  layer,
int  bar 
)

The geometry identifiers for p0d scintillators. The P0Dules are numbered from 0 to 39 with 0 as the most upstream. The layer is 0 (X), or 1 (Y), and the bar is from 0 to 125 (X) or 133 (Y). Bar 0 has the most negative coordinate.

Definition at line 262 of file ND280GeomId.cxx.

264  {
265  TSettableGeometryId id;
266  id.SetField(ND::GeomId::Def::kP0D,
271  ND::GeomId::Def::P0D::kSeqIdLSB);
272  id.SetField(0,
274  ND::GeomId::Def::P0D::Bar::kSP0DuleLSB);
275  id.SetField(P0Dule,
277  ND::GeomId::Def::P0D::Bar::kP0DuleLSB);
278  id.SetField(layer,
280  ND::GeomId::Def::P0D::Bar::kLayerLSB);
281  id.SetField(bar,
283  ND::GeomId::Def::P0D::Bar::kBarLSB);
284  return id;
285 }
const GeomIdBit kDetectorIdLSB
The least significant bit of the detector identifier.
const GeomIdBit kDetectorIdMSB
const GeomIdBit kSeqIdMSB

§ ECalRadiator()

ND::TGeometryId ND::GeomId::P0D::ECalRadiator ( int  radiator)

The geometry identifiers for the P0D lead radiators. The lead radiators are numbered from 0 to 13 from the upstream end of the P0D.

Definition at line 198 of file ND280GeomId.cxx.

198  {
199  TSettableGeometryId id;
200  id.SetField(ND::GeomId::Def::kP0D,
203  id.SetField(ND::GeomId::Def::P0D::kGlobal,
205  ND::GeomId::Def::P0D::kSeqIdLSB);
208  ND::GeomId::Def::P0D::Global::kSeqIdLSB);
209  id.SetField(radiator,
211  ND::GeomId::Def::P0D::Global::kFieldLSB);
212  return id;
213 }
const GeomIdBit kDetectorIdLSB
The least significant bit of the detector identifier.
const GeomIdBit kDetectorIdMSB
const GeomIdBit kFieldMSB
The sequence value for this type of global volume.
const GeomIdBit kSeqIdMSB

§ GetBarLayer()

int ND::GeomId::P0D::GetBarLayer ( TGeometryId  id)

Get the P0D Bar Layer number from an id. If the provided geometry id is not for a P0D bar, then this returns -1. The P0Dule layers are numbered 0 (x) and 1 (y).

Definition at line 299 of file ND280GeomId.cxx.

299  {
300  TSettableGeometryId id(i);
301  if (ND::GeomId::Def::kP0D
302  != id.GetField(ND::GeomId::Def::kDetectorIdMSB,
305  != id.GetField(ND::GeomId::Def::P0D::kSeqIdMSB,
306  ND::GeomId::Def::P0D::kSeqIdLSB)) return -1;
307  return id.GetField(ND::GeomId::Def::P0D::Bar::kLayerMSB,
308  ND::GeomId::Def::P0D::Bar::kLayerLSB);
309 }
const GeomIdBit kDetectorIdLSB
The least significant bit of the detector identifier.
const GeomIdBit kDetectorIdMSB
const GeomIdBit kSeqIdMSB

§ GetBarNumber()

int ND::GeomId::P0D::GetBarNumber ( TGeometryId  id)

Get the P0D Bar Number from an id. If the provided geometry id is not for a P0D bar, then this returns -1. The Bars are numbered between 0 and 126 (or 134). Bar Number zero hs the tip of the triangle facing upstream. You can use

bool pointsDownstream = (GetBarNumber(id)%2);

to determine which way a bar is facing.

Definition at line 311 of file ND280GeomId.cxx.

311  {
312  TSettableGeometryId id(i);
313  if (ND::GeomId::Def::kP0D
314  != id.GetField(ND::GeomId::Def::kDetectorIdMSB,
317  != id.GetField(ND::GeomId::Def::P0D::kSeqIdMSB,
318  ND::GeomId::Def::P0D::kSeqIdLSB)) return -1;
319  return id.GetField(ND::GeomId::Def::P0D::Bar::kBarMSB,
320  ND::GeomId::Def::P0D::Bar::kBarLSB);
321 }
const GeomIdBit kDetectorIdLSB
The least significant bit of the detector identifier.
const GeomIdBit kDetectorIdMSB
const GeomIdBit kSeqIdMSB

§ GetBarP0Dule()

int ND::GeomId::P0D::GetBarP0Dule ( TGeometryId  id)

Get the P0Dule number for an id. If the provided geometry is not for a P0D bar, then this returns -1. The P0Dule numbering runs from 0 to 39.

Definition at line 287 of file ND280GeomId.cxx.

287  {
288  TSettableGeometryId id(i);
289  if (ND::GeomId::Def::kP0D
290  != id.GetField(ND::GeomId::Def::kDetectorIdMSB,
293  != id.GetField(ND::GeomId::Def::P0D::kSeqIdMSB,
294  ND::GeomId::Def::P0D::kSeqIdLSB)) return -1;
295  return id.GetField(ND::GeomId::Def::P0D::Bar::kP0DuleMSB,
296  ND::GeomId::Def::P0D::Bar::kP0DuleLSB);
297 }
const GeomIdBit kDetectorIdLSB
The least significant bit of the detector identifier.
const GeomIdBit kDetectorIdMSB
const GeomIdBit kSeqIdMSB

§ GetECalRadiator()

int ND::GeomId::P0D::GetECalRadiator ( TGeometryId  id)

If this is an ECal radiator, return it's number, otherwise return -1.

Definition at line 215 of file ND280GeomId.cxx.

215  {
216  TSettableGeometryId id(i);
217  if (ND::GeomId::Def::kP0D
218  != id.GetField(ND::GeomId::Def::kDetectorIdMSB,
221  != id.GetField(ND::GeomId::Def::P0D::kSeqIdMSB,
222  ND::GeomId::Def::P0D::kSeqIdLSB)) return -1;
225  ND::GeomId::Def::P0D::Global::kSeqIdLSB)) return -1;
226  return id.GetField(ND::GeomId::Def::P0D::Global::kFieldMSB,
227  ND::GeomId::Def::P0D::Global::kFieldLSB);
228 }
const GeomIdBit kDetectorIdLSB
The least significant bit of the detector identifier.
const GeomIdBit kDetectorIdMSB
const GeomIdBit kFieldMSB
The sequence value for this type of global volume.
const GeomIdBit kSeqIdMSB

§ GetP0Dule()

int ND::GeomId::P0D::GetP0Dule ( TGeometryId  id)

If this is a P0Dule id, return the P0Dule number, otherwise return -1.

Definition at line 151 of file ND280GeomId.cxx.

151  {
152  TSettableGeometryId id(i);
153  if (ND::GeomId::Def::kP0D
154  != id.GetField(ND::GeomId::Def::kDetectorIdMSB,
157  != id.GetField(ND::GeomId::Def::P0D::kSeqIdMSB,
158  ND::GeomId::Def::P0D::kSeqIdLSB)) return -1;
161  ND::GeomId::Def::P0D::Global::kSeqIdLSB)) return -1;
162  return id.GetField(ND::GeomId::Def::P0D::Global::kFieldMSB,
163  ND::GeomId::Def::P0D::Global::kFieldLSB);
164 }
const GeomIdBit kDetectorIdLSB
The least significant bit of the detector identifier.
const GeomIdBit kDetectorIdMSB
const GeomIdBit kFieldMSB
The sequence value for this type of global volume.
const GeomIdBit kSeqIdMSB

§ GetSuperP0Dule()

int ND::GeomId::P0D::GetSuperP0Dule ( TGeometryId  id)

If this is a super-P0Dule id, return the super-P0Dule number, otherwise return -1.

Definition at line 118 of file ND280GeomId.cxx.

118  {
119  TSettableGeometryId id(i);
120  if (ND::GeomId::Def::kP0D
121  != id.GetField(ND::GeomId::Def::kDetectorIdMSB,
124  != id.GetField(ND::GeomId::Def::P0D::kSeqIdMSB,
125  ND::GeomId::Def::P0D::kSeqIdLSB)) return -1;
128  ND::GeomId::Def::P0D::Global::kSeqIdLSB)) return -1;
129  return id.GetField(ND::GeomId::Def::P0D::Global::kFieldMSB,
130  ND::GeomId::Def::P0D::Global::kFieldLSB);
131 }
const GeomIdBit kDetectorIdLSB
The least significant bit of the detector identifier.
const GeomIdBit kDetectorIdMSB
const GeomIdBit kFieldMSB
The sequence value for this type of global volume.
const GeomIdBit kSeqIdMSB

§ GetTarget()

int ND::GeomId::P0D::GetTarget ( TGeometryId  id)

If this is a water target, return it's number, otherwise return -1.

Definition at line 183 of file ND280GeomId.cxx.

183  {
184  TSettableGeometryId id(i);
185  if (ND::GeomId::Def::kP0D
186  != id.GetField(ND::GeomId::Def::kDetectorIdMSB,
189  != id.GetField(ND::GeomId::Def::P0D::kSeqIdMSB,
190  ND::GeomId::Def::P0D::kSeqIdLSB)) return -1;
193  ND::GeomId::Def::P0D::Global::kSeqIdLSB)) return -1;
194  return id.GetField(ND::GeomId::Def::P0D::Global::kFieldMSB,
195  ND::GeomId::Def::P0D::Global::kFieldLSB);
196 }
const GeomIdBit kDetectorIdLSB
The least significant bit of the detector identifier.
const GeomIdBit kDetectorIdMSB
One of the water target modules.
const GeomIdBit kFieldMSB
The sequence value for this type of global volume.
const GeomIdBit kSeqIdMSB

§ GetTargetRadiator()

int ND::GeomId::P0D::GetTargetRadiator ( TGeometryId  id)

If this is a target radiator, return it's number, otherwise return -1.

Definition at line 247 of file ND280GeomId.cxx.

247  {
248  TSettableGeometryId id(i);
249  if (ND::GeomId::Def::kP0D
250  != id.GetField(ND::GeomId::Def::kDetectorIdMSB,
253  != id.GetField(ND::GeomId::Def::P0D::kSeqIdMSB,
254  ND::GeomId::Def::P0D::kSeqIdLSB)) return -1;
257  ND::GeomId::Def::P0D::Global::kSeqIdLSB)) return -1;
258  return id.GetField(ND::GeomId::Def::P0D::Global::kFieldMSB,
259  ND::GeomId::Def::P0D::Global::kFieldLSB);
260 }
const GeomIdBit kDetectorIdLSB
The least significant bit of the detector identifier.
const GeomIdBit kDetectorIdMSB
One of the brass target radiators.
const GeomIdBit kFieldMSB
The sequence value for this type of global volume.
const GeomIdBit kSeqIdMSB

§ P0Dule()

ND::TGeometryId ND::GeomId::P0D::P0Dule ( int  p0dule)

The geometry identifiers for the P0D scintillator modules. The P0Dules are number 0 to 39 from the upstream end of the P0D.

Definition at line 134 of file ND280GeomId.cxx.

134  {
135  TSettableGeometryId id;
136  id.SetField(ND::GeomId::Def::kP0D,
139  id.SetField(ND::GeomId::Def::P0D::kGlobal,
141  ND::GeomId::Def::P0D::kSeqIdLSB);
144  ND::GeomId::Def::P0D::Global::kSeqIdLSB);
145  id.SetField(p0dule,
147  ND::GeomId::Def::P0D::Global::kFieldLSB);
148  return id;
149 }
const GeomIdBit kDetectorIdLSB
The least significant bit of the detector identifier.
const GeomIdBit kDetectorIdMSB
const GeomIdBit kFieldMSB
The sequence value for this type of global volume.
const GeomIdBit kSeqIdMSB

§ SuperP0Dule()

ND::TGeometryId ND::GeomId::P0D::SuperP0Dule ( int  sP0Dule)

The geometry identifiers for the P0D super-P0Dules. The super-P0Dules are number 0 to 3 from the upstream end of the P0D.

  • 0 – Upstream ECal
  • 1 – Upstream Water Target
  • 2 – Central Water Target
  • 3 – Central ECal.

Definition at line 101 of file ND280GeomId.cxx.

101  {
102  TSettableGeometryId id;
103  id.SetField(ND::GeomId::Def::kP0D,
106  id.SetField(ND::GeomId::Def::P0D::kGlobal,
108  ND::GeomId::Def::P0D::kSeqIdLSB);
111  ND::GeomId::Def::P0D::Global::kSeqIdLSB);
112  id.SetField(sP0Dule,
114  ND::GeomId::Def::P0D::Global::kFieldLSB);
115  return id;
116 }
const GeomIdBit kDetectorIdLSB
The least significant bit of the detector identifier.
const GeomIdBit kDetectorIdMSB
const GeomIdBit kFieldMSB
The sequence value for this type of global volume.
const GeomIdBit kSeqIdMSB

§ Target()

ND::TGeometryId ND::GeomId::P0D::Target ( int  target)

The geometry identifiers for the P0D water targets. The targets are numbered from 0 to 24 from the upstream end of the P0D.

Definition at line 166 of file ND280GeomId.cxx.

166  {
167  TSettableGeometryId id;
168  id.SetField(ND::GeomId::Def::kP0D,
171  id.SetField(ND::GeomId::Def::P0D::kGlobal,
173  ND::GeomId::Def::P0D::kSeqIdLSB);
176  ND::GeomId::Def::P0D::Global::kSeqIdLSB);
177  id.SetField(target,
179  ND::GeomId::Def::P0D::Global::kFieldLSB);
180  return id;
181 }
const GeomIdBit kDetectorIdLSB
The least significant bit of the detector identifier.
const GeomIdBit kDetectorIdMSB
One of the water target modules.
const GeomIdBit kFieldMSB
The sequence value for this type of global volume.
const GeomIdBit kSeqIdMSB

§ TargetRadiator()

ND::TGeometryId ND::GeomId::P0D::TargetRadiator ( int  radiator)

The geometry identifiers for the P0D brass radiators. The brass radiators are numbered from 0 to 24 from the upstream end of the P0D.

Definition at line 230 of file ND280GeomId.cxx.

230  {
231  TSettableGeometryId id;
232  id.SetField(ND::GeomId::Def::kP0D,
235  id.SetField(ND::GeomId::Def::P0D::kGlobal,
237  ND::GeomId::Def::P0D::kSeqIdLSB);
240  ND::GeomId::Def::P0D::Global::kSeqIdLSB);
241  id.SetField(targetRadiator,
243  ND::GeomId::Def::P0D::Global::kFieldLSB);
244  return id;
245 }
const GeomIdBit kDetectorIdLSB
The least significant bit of the detector identifier.
const GeomIdBit kDetectorIdMSB
One of the brass target radiators.
const GeomIdBit kFieldMSB
The sequence value for this type of global volume.
const GeomIdBit kSeqIdMSB