Belle II Software  release-08-01-10
ECLGeometryPar Class Reference

The Class for ECL Geometry Parameters. More...

#include <ECLGeometryPar.h>

Collaboration diagram for ECLGeometryPar:

Classes

struct  CrystalGeom_t
 crystal geometry More...
 

Public Member Functions

 ECLGeometryPar ()
 Constructor.
 
virtual ~ECLGeometryPar ()
 Destructor.
 
void clear ()
 Clears.
 
void Print () const
 Print some debug information.
 
void read ()
 Gets geometry parameters from PhysicalVolumeStore.
 
void Mapping (int cid)
 Mapping theta, phi Id.
 
int GetCellID (int ThetaId, int PhiId)
 Get Cell Id.
 
int GetCellID ()
 Get Cell Id.
 
int GetThetaID ()
 Get Theta Id.
 
int GetPhiID ()
 Get Phi Id.
 
int ECLVolumeToCellID (const G4VTouchable *)
 Get Cell Id (LEP: new way) More...
 
int TouchableToCellID (const G4VTouchable *)
 The same as above but without sanity checks.
 
int TouchableDiodeToCellID (const G4VTouchable *)
 Mapping from G4VTouchable copyNumbers to Crystal CellID.
 
G4ThreeVector getCrystalPos (int cid)
 The Position of crystal.
 
G4ThreeVector getCrystalVec (int cid)
 The direction of crystal.
 
ROOT::Math::XYZVector GetCrystalPos (int cid)
 The Position of crystal.
 
ROOT::Math::XYZVector GetCrystalVec (int cid)
 The direction of crystal.
 
double time2sensor (int cid, const G4ThreeVector &hit_pos)
 function to calculate flight time to diode sensor
 

Static Public Member Functions

static ECLGeometryParInstance ()
 Static method to get a reference to the ECLGeometryPar instance. More...
 

Private Member Functions

void InitCrystal (int cid)
 initialise the crystal
 

Private Attributes

G4Transform3D * m_ECLForwardGlobalT = nullptr
 Global transformations for the forward part.
 
G4Transform3D * m_ECLBackwardGlobalT = nullptr
 Global transformations for the backward part.
 
G4Transform3D * m_ECLBarrelGlobalT = nullptr
 Global transformations for the barrel part.
 
std::vector< CrystalGeom_tm_crystals
 the crystals
 
CrystalGeom_t m_current_crystal
 the current crystal
 
int mPar_cellID
 The Cell ID information.
 
int mPar_thetaID
 The Theta ID information.
 
int mPar_phiID
 The Phi ID information.
 
int m_ini_cid
 initial crystal ID
 

Static Private Attributes

static ECLGeometryParm_B4ECLGeometryParDB = 0
 Pointer that saves the instance of this class.
 

Detailed Description

The Class for ECL Geometry Parameters.

This class provides ECL gemetry parameters for simulation, reconstruction and so on. These parameters are got from geometry description

Definition at line 44 of file ECLGeometryPar.h.

Member Function Documentation

◆ ECLVolumeToCellID()

int ECLVolumeToCellID ( const G4VTouchable *  touch)

Get Cell Id (LEP: new way)

Mapping from G4VTouchable copyNumbers to Crystal CellID

Definition at line 478 of file ECLGeometryPar.cc.

479 {
480  int depth = touch->GetHistoryDepth();
481  if ((depth != 3) && (depth != 5)) {
482  B2WARNING("ECLGeometryPar::ECLVolumeToCellID: History depth = " << depth << " is out of range: should be 3 or 5.");
483  return -1;
484  }
485  const G4String& vname = touch->GetVolume()->GetName();
486  std::size_t pos0 = vname.find("lv_forward_crystal_");
487  std::size_t pos1 = vname.find("lv_barrel_crystal_");
488  std::size_t pos2 = vname.find("lv_backward_crystal_");
489  if (pos0 == string::npos && pos1 == string::npos && pos2 == string::npos) {
490  B2WARNING("ECLGeometryPar::ECLVolumeToCellID: Volume name does not match pattern. NAME=" << vname);
491  return -1;
492  }
493  return TouchableToCellID(touch);
494 }
int TouchableToCellID(const G4VTouchable *)
The same as above but without sanity checks.

◆ Instance()

ECLGeometryPar * Instance ( )
static

Static method to get a reference to the ECLGeometryPar instance.

Returns
A reference to an instance of this class.

Definition at line 168 of file ECLGeometryPar.cc.


The documentation for this class was generated from the following files: