HighLAND
Functions
ND::GeomId::FGD Namespace Reference

Define the FGD specific geometry identifiers. More...

Functions

bool IsFGD (TGeometryId id)
 Check if this is an FGD id.
 
TGeometryId FGD (int mod)
 
int GetFGD (TGeometryId id)
 Get the FGD number. This returns -1 if the id is invalid.
 
TGeometryId FGD1 ()
 The geometry identifier for FGD1.
 
TGeometryId FGD2 ()
 The geometry identifier for FGD2. FGD2 has the water targets.
 
TGeometryId Target (int i)
 The geometry identifier for the targets.
 
int GetTarget (TGeometryId id)
 
TGeometryId Layer (int fgd, int module, int layer)
 
int GetLayerFGD (TGeometryId id)
 
int GetLayerModule (TGeometryId id)
 
int GetLayerNumber (TGeometryId id)
 
TGeometryId Bar (int fgd, int module, int layer, int bar)
 
int GetBarFGD (TGeometryId id)
 
int GetBarModule (TGeometryId id)
 
int GetBarLayer (TGeometryId id)
 
int GetBarNumber (TGeometryId id)
 
bool IsFGD1 (TGeometryId id)
 
bool IsFGD2 (TGeometryId id)
 

Detailed Description

Define the FGD specific geometry identifiers.

Function Documentation

§ Bar()

ND::TGeometryId ND::GeomId::FGD::Bar ( int  fgd,
int  module,
int  layer,
int  bar 
)

The geometry identifiers for FGD scintillators. The FGD indicates which FGD the bar is in (0: FGD1, 1: FGD2). The module gives the glued plane of X and Y bars in the FGD. The layer (x or y) indicates which orientation the bars have (0: X, 1: Y). The bar is the number of bar in the layer.

Definition at line 615 of file ND280GeomId.cxx.

618  {
619  TSettableGeometryId id;
620  if (fgd<0 || fgd>1) {
621  ND280Warn("FGD out of range [0,1]: " << fgd);
622  return id;
623  }
624  id.SetField(ND::GeomId::Def::kFGD,
629  ND::GeomId::Def::FGD::kSeqIdLSB);
630  id.SetField(fgd,
632  ND::GeomId::Def::FGD::Bar::kModuleLSB);
633  id.SetField(module,
635  ND::GeomId::Def::FGD::Bar::kPlaneLSB);
636  id.SetField(layer,
638  ND::GeomId::Def::FGD::Bar::kLayerLSB);
639  id.SetField(bar,
641  ND::GeomId::Def::FGD::Bar::kBarLSB);
642  return id;
643 }
const GeomIdBit kDetectorIdLSB
The least significant bit of the detector identifier.
const GeomIdBit kSeqIdMSB
const GeomIdBit kDetectorIdMSB

§ FGD()

ND::TGeometryId ND::GeomId::FGD::FGD ( int  mod)

The geometry identifier for the FGD modules. This count starts from zero and runs from upstream to downstream. 0 is the upstream FGD (FGD1). 1 is the downstream FGD (FGD2 – The water target FGD).

Definition at line 568 of file ND280GeomId.cxx.

568  {
569  TSettableGeometryId id;
570  if (fgd<0 || fgd>1) {
571  ND280Warn("FGD out of range [0,1]: " << fgd);
572  return id;
573  }
574  id.SetField(ND::GeomId::Def::kFGD,
577  id.SetField(ND::GeomId::Def::FGD::kGlobal,
579  ND::GeomId::Def::FGD::kSeqIdLSB);
582  ND::GeomId::Def::FGD::Global::kSeqIdLSB);
583  id.SetField(fgd,
585  ND::GeomId::Def::FGD::Global::kFieldLSB);
586  return id;
587 }
const GeomIdBit kDetectorIdLSB
The least significant bit of the detector identifier.
const GeomIdBit kSeqIdMSB
const GeomIdBit kFieldMSB
The sequence value for this type of global volume.
const GeomIdBit kDetectorIdMSB

§ GetBarFGD()

int ND::GeomId::FGD::GetBarFGD ( TGeometryId  id)

{@ Get the number of the fgd, module, layer, or bar for a geometry id for a bar. This returns -1 if the id is invalid.

Definition at line 645 of file ND280GeomId.cxx.

645  {
646  TSettableGeometryId id(i);
647  if (ND::GeomId::Def::kFGD
648  != id.GetField(ND::GeomId::Def::kDetectorIdMSB,
651  != id.GetField(ND::GeomId::Def::FGD::kSeqIdMSB,
652  ND::GeomId::Def::FGD::kSeqIdLSB)) return -1;
653  return id.GetField(ND::GeomId::Def::FGD::Bar::kModuleMSB,
654  ND::GeomId::Def::FGD::Bar::kModuleLSB);
655 }
const GeomIdBit kDetectorIdLSB
The least significant bit of the detector identifier.
const GeomIdBit kSeqIdMSB
const GeomIdBit kDetectorIdMSB

§ GetLayerFGD()

int ND::GeomId::FGD::GetLayerFGD ( TGeometryId  id)

{@ Get the number of the fgd, module or layer from a geometry id for a layer. This returns -1 if the id is invalid.

Definition at line 754 of file ND280GeomId.cxx.

754  {
755  TSettableGeometryId id(i);
756  if (ND::GeomId::Def::kFGD
757  != id.GetField(ND::GeomId::Def::kDetectorIdMSB,
760  != id.GetField(ND::GeomId::Def::FGD::kSeqIdMSB,
761  ND::GeomId::Def::FGD::kSeqIdLSB)) return -1;
764  ND::GeomId::Def::FGD::Global::kSeqIdLSB)) return -1;
766  ND::GeomId::Def::FGD::Global::Layer::kFGDLSB);
767 }
const GeomIdBit kDetectorIdLSB
The least significant bit of the detector identifier.
const GeomIdBit kSeqIdMSB
const GeomIdBit kDetectorIdMSB

§ GetTarget()

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

Get the FGD target number. This returns -1 if the id is invalid.

Definition at line 710 of file ND280GeomId.cxx.

710  {
711  TSettableGeometryId id(i);
712  if (ND::GeomId::Def::kFGD
713  != id.GetField(ND::GeomId::Def::kDetectorIdMSB,
716  != id.GetField(ND::GeomId::Def::FGD::kSeqIdMSB,
717  ND::GeomId::Def::FGD::kSeqIdLSB)) return -1;
720  ND::GeomId::Def::FGD::Global::kSeqIdLSB)) return -1;
721  return id.GetField(ND::GeomId::Def::FGD::Global::kFieldMSB,
722  ND::GeomId::Def::FGD::Global::kFieldLSB);
723 }
const GeomIdBit kDetectorIdLSB
The least significant bit of the detector identifier.
const GeomIdBit kSeqIdMSB
const GeomIdBit kFieldMSB
The sequence value for this type of global volume.
const GeomIdBit kDetectorIdMSB

§ IsFGD1()

bool ND::GeomId::FGD::IsFGD1 ( TGeometryId  id)

Check if the id is for FGDn. This returns -1 if the id is invalid.

Definition at line 607 of file ND280GeomId.cxx.

607  {
608  return (ND::GeomId::FGD::GetFGD(id) == 0);
609 }
int GetFGD(TGeometryId id)
Get the FGD number. This returns -1 if the id is invalid.

§ Layer()

ND::TGeometryId ND::GeomId::FGD::Layer ( int  fgd,
int  module,
int  layer 
)

A layer within the FGD. The fgd is either 0 or 1. The module is the glued plane of X and Y scintillator bars. The layer is 0 (x) or 1 (y).

Definition at line 725 of file ND280GeomId.cxx.

727  {
728  TSettableGeometryId id;
729  if (fgd<0 || fgd>1) {
730  ND280Warn("FGD out of range [0,1]: " << fgd);
731  return id;
732  }
733  id.SetField(ND::GeomId::Def::kFGD,
736  id.SetField(ND::GeomId::Def::FGD::kGlobal,
738  ND::GeomId::Def::FGD::kSeqIdLSB);
741  ND::GeomId::Def::FGD::Global::kSeqIdLSB);
742  id.SetField(fgd,
744  ND::GeomId::Def::FGD::Global::Layer::kFGDLSB);
745  id.SetField(layer,
747  ND::GeomId::Def::FGD::Global::Layer::kLayerLSB);
748  id.SetField(module,
750  ND::GeomId::Def::FGD::Global::Layer::kModuleLSB);
751  return id;
752 }
const GeomIdBit kDetectorIdLSB
The least significant bit of the detector identifier.
const GeomIdBit kSeqIdMSB
const GeomIdBit kDetectorIdMSB