Belle II Software  release-06-00-14
ECLCrystalData.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 #pragma once
10 
11 namespace Belle2 {
22  private :
23 
24  //Crystal identifiers
26  int m_cell_ID;
28  int m_phi_ID;
31 
32  //indexes (whatever those mean...)
34  int m_phi_idx;
37 
38  //Crystal properties
40  float m_mass;
42  float m_volume;
44  float EvalMass();
45 
46  //Crystal Location
48  float m_PosR;
50  float m_PosP;
52  float m_PosX;
54  float m_PosY;
56  float m_PosZ;
57 
59  double EvalPhi();
61  double EvalR();
63  double EvalZ();
65  double EvalX();
67  double EvalY();
68 
70  void Mapping(int cid);
71 
72  public :
73 
74 
76  static const int Ring[69];
78  static const int sumPrevious[24];
79 
80  const int nECLCrystalTot = 8736;
81  const int nECLCrystalBAR = 6624;
82  const int nECLCrystalECF = 1152;
83  const int nECLCrystalECB = 960;
87  static const float CrystalMassEndcap[132];
89  static const float CrystalMassBarrel[46];
90 
91 
93  static const double theta[69];
94 
96  static const double EndcapRadius[132];
97 
99  static const double BarrelZ[46];
100 
102  ECLCrystalData();
104  explicit ECLCrystalData(int cid);
106  ECLCrystalData(int tid, int pid);
108  ~ECLCrystalData();
110  void Eval();
112  int GetCrystalIndex();
114  bool IsEndCap();
116  bool IsBarrel();
118  int GetCellID();
120  int GetCellID(int tid, int pid);
121 
123  double GetPhi() { return m_PosP; };
125  inline double GetTheta() { return theta[m_theta_ID]; } ;
127  double GetR() { return m_PosR; };
129  double GetZ() { return m_PosZ; };
131  double GetX() { return m_PosX; };
133  double GetY() { return m_PosY; };
135  double GetMass() { return m_mass; };
137  inline int GetThetaID() { return m_theta_ID; } ;
139  inline int GetPhiID() { return m_phi_ID; } ;
141  inline int GetNperThetaID() { return 16 * Ring[m_theta_ID];};
142 
143 
144  };
146 }
Class for obtaining crystal details for a given crystal cell An evolved look-up table.
void Eval()
Set values for the crystal.
int GetNperThetaID()
get number of crystals in theta ring
const int nECLCrystalTot
Total number of ECL crystals
static const double theta[69]
Theta ID to theta(deg)
float m_PosY
Crystal Position - Y.
float m_mass
Crystal Mass.
float m_PosZ
Crystal Position - Z.
const int nECLCrystalECB
Number of BWD ECL end-capcrystals.
double GetZ()
get z position of crystal
int GetPhiID()
get phiID of crystal
double EvalPhi()
Set phi value of crystal.
double EvalR()
Set R value of crystal.
const int nECLCrystalBAR
Number of Barrel ECL crystals
float EvalMass()
Evaluate mass of crystal.
double EvalZ()
Set Z value of crystal.
int GetCrystalIndex()
return crystal index
float m_volume
Crystal Volume.
double EvalY()
Set Y value of crystal.
static const float CrystalMassEndcap[132]
Barrel crystal mass.
double GetY()
get y position of crystal
int m_cell_ID
Cell ID of crystal.
const int nECLCrystalECF
Number of FWD ECL end-capcrystals.
double GetPhi()
get phi value of crystal
static const int sumPrevious[24]
Number of crystals in preceding theta rings (endcaps only)
bool IsEndCap()
True if crystal is in endcaps.
double GetX()
get x position of crystal
static const int Ring[69]
ECL has 16-fold symmetry in phi.
float m_PosR
Crystal Position - R.
float m_PosP
Crystal Position - P.
static const double EndcapRadius[132]
EndCapCrystalID to radius (spherical)
void Mapping(int cid)
set theta and phi value of crystal
ECLCrystalData()
Blank Constructor.
int m_phi_ID
phi ID of crystal
static const float CrystalMassBarrel[46]
Endcap crystal mass.
double GetTheta()
get theta value of crystal
int m_theta_ID
theta ID of crystal
bool IsBarrel()
True if crystal is in barrel.
double GetR()
get radius of crystal
double GetMass()
get mass of crystal
double EvalX()
Set X value of crystal.
float m_PosX
Crystal Position - X.
int GetThetaID()
get thetaID of crystal
int GetCellID()
return cell ID
static const double BarrelZ[46]
BarrelCrystalID to z-coordinate.
Abstract base class for different kinds of events.