HighLAND
Functions
ND::GeomId::ECal Namespace Reference

Define the geometry identifiers for a generic (uk) ecal. More...

Functions

TGeometryId Module (int ecal, int clam, int module)
 
TGeometryId Container (int ecal, int clam, int module)
 
TGeometryId Layer (int ecal, int clam, int module, int layer)
 The layer within the ecal.
 
TGeometryId Radiator (int ecal, int clam, int module, int radiator)
 The geometry identifier for the radiators.
 
TGeometryId Bar (int ecal, int clam, int module, int layer, int bar)
 The geometry identifiers for the scintillators.
 
int GetModuleECal (TGeometryId id)
 Access the information for an ECal Module.
 
int GetModuleClam (TGeometryId id)
 
int GetModuleNumber (TGeometryId id)
 
int GetLayerECal (TGeometryId id)
 
int GetLayerClam (TGeometryId id)
 
int GetLayerModule (TGeometryId id)
 
int GetLayerNumber (TGeometryId id)
 
int GetRadiatorECal (TGeometryId id)
 
int GetRadiatorClam (TGeometryId id)
 
int GetRadiatorModule (TGeometryId id)
 
int GetRadiatorNumber (TGeometryId id)
 
int GetBarECal (TGeometryId id)
 
int GetBarClam (TGeometryId id)
 
int GetBarModule (TGeometryId id)
 
int GetBarLayer (TGeometryId id)
 
int GetBarNumber (TGeometryId id)
 

Detailed Description

Define the geometry identifiers for a generic (uk) ecal.

Function Documentation

§ Container()

ND::TGeometryId ND::GeomId::ECal::Container ( int  ecal,
int  clam,
int  module 
)

The geometry identifier for barrel ECal container modules The ecal must be ND::GeomId::Def::kTECal Clams and modules are in in Module()

Definition at line 855 of file ND280GeomId.cxx.

855  {
856  TSettableGeometryId id;
857  if (ecal == ND::GeomId::Def::kTECal) {
858  if (clam != 0 && clam != 1) {
859  ND280Error("Tracker ECal container with invalid clam: " << clam);
860  return id;
861  }
862  if (module<0 || 2<module) {
863  ND280Error("Tracker ECal container with invalid module: " << module);
864  return id;
865  }
866  }
867  else if (ecal == ND::GeomId::Def::kPECal) {
868  if (clam != 0 && clam != 1) {
869  ND280Error("P0D ECal container with invalid clam: " << clam);
870  return id;
871  }
872  if (module<0 || 2<module) {
873  ND280Error("P0D ECal container with invalid module: " << module);
874  return id;
875  }
876  }
877  else {
878  ND280Error("Container for non-contained ECal: " << ecal);
879  return id;
880  }
881 
882  id.SetField(ecal,
885  id.SetField(ND::GeomId::Def::ECal::kGlobal,
887  ND::GeomId::Def::ECal::kSeqIdLSB);
888  id.SetField(module*2+clam,
890  ND::GeomId::Def::ECal::kModuleLSB);
891 
894  ND::GeomId::Def::ECal::Global::kSeqIdLSB);
895  id.SetField(0,
897  ND::GeomId::Def::ECal::Global::kFieldLSB);
898 
899  return id;
900 }
const GeomIdBit kDetectorIdLSB
The least significant bit of the detector identifier.
const GeomIdBit kDetectorIdMSB
const GeomIdBit kModuleMSB
const GeomIdBit kSeqIdMSB
const GeomIdBit kFieldMSB
The sequence value for this type of global volume.

§ GetBarECal()

int ND::GeomId::ECal::GetBarECal ( TGeometryId  id)

Get the layer or bar number. This returns -1 if the id is invalid.

Definition at line 1195 of file ND280GeomId.cxx.

1195  {
1196  TSettableGeometryId id(i);
1197  int det = ND::GeomId::GetSubSystem(id);
1198  if (det == ND::GeomId::Def::kDSECal) return det;
1199  else if (det == ND::GeomId::Def::kTECal) return det;
1200  else if (det == ND::GeomId::Def::kPECal) return det;
1201  else return -1;
1202 }
int GetSubSystem(TGeometryId id)
Get the sub-system type.
Definition: ND280GeomId.cxx:67

§ GetLayerECal()

int ND::GeomId::ECal::GetLayerECal ( TGeometryId  id)

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

Definition at line 991 of file ND280GeomId.cxx.

991  {
992  TSettableGeometryId id(i);
993  int det = ND::GeomId::GetSubSystem(id);
994  if (det == ND::GeomId::Def::kDSECal) return det;
995  else if (det == ND::GeomId::Def::kTECal) return det;
996  else if (det == ND::GeomId::Def::kPECal) return det;
997  else return -1;
998 }
int GetSubSystem(TGeometryId id)
Get the sub-system type.
Definition: ND280GeomId.cxx:67

§ GetRadiatorECal()

int ND::GeomId::ECal::GetRadiatorECal ( TGeometryId  id)

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

Definition at line 1093 of file ND280GeomId.cxx.

1093  {
1094  TSettableGeometryId id(i);
1095  int det = ND::GeomId::GetSubSystem(id);
1096  if (det == ND::GeomId::Def::kDSECal) return det;
1097  else if (det == ND::GeomId::Def::kTECal) return det;
1098  else if (det == ND::GeomId::Def::kPECal) return det;
1099  else return -1;
1100 }
int GetSubSystem(TGeometryId id)
Get the sub-system type.
Definition: ND280GeomId.cxx:67

§ Module()

ND::TGeometryId ND::GeomId::ECal::Module ( int  ecal,
int  clam,
int  module 
)

The geometry identifier for the tracker ecal modules. The ecal must be either ND::GeomId::Def::kDSECal, ND::GeomId::Def::kPECal, or ND::GeomId::Def::kTECal. The clam is 0 for south (-x) or 1 for north (+x). The module is 0 for bottom, 1 for side, and 2 for top.

Definition at line 803 of file ND280GeomId.cxx.

803  {
804  TSettableGeometryId id;
805  if (ecal == ND::GeomId::Def::kDSECal) {
806  if (clam != 0) {
807  ND280Error("Downstream ECal with invalid clam: " << clam);
808  return id;
809  }
810  if (module != 0) {
811  ND280Error("Downstream ECal with invalid module: " << module);
812  return id;
813  }
814  }
815  else if (ecal == ND::GeomId::Def::kTECal) {
816  if (clam != 0 && clam != 1) {
817  ND280Error("Tracker ECal with invalid clam: " << clam);
818  return id;
819  }
820  if (module<0 || 2<module) {
821  ND280Error("Tracker ECal with invalid module: " << module);
822  return id;
823  }
824  }
825  else if (ecal == ND::GeomId::Def::kPECal) {
826  if (clam != 0 && clam != 1) {
827  ND280Error("P0D ECal with invalid clam: " << clam);
828  return id;
829  }
830  if (module<0 || 2<module) {
831  ND280Error("P0D ECal with invalid module: " << module);
832  return id;
833  }
834  }
835  id.SetField(ecal,
838  id.SetField(ND::GeomId::Def::ECal::kGlobal,
840  ND::GeomId::Def::ECal::kSeqIdLSB);
841  id.SetField(module*2+clam,
843  ND::GeomId::Def::ECal::kModuleLSB);
844 
847  ND::GeomId::Def::ECal::Global::kSeqIdLSB);
848  id.SetField(0,
850  ND::GeomId::Def::ECal::Global::kFieldLSB);
851 
852  return id;
853 }
const GeomIdBit kDetectorIdLSB
The least significant bit of the detector identifier.
const GeomIdBit kDetectorIdMSB
const GeomIdBit kModuleMSB
const GeomIdBit kSeqIdMSB
const GeomIdBit kFieldMSB
The sequence value for this type of global volume.
A special case for one of a kind global volumes.