Belle II Software  release-08-01-10
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 /* ECL headers. */
12 #include <ecl/dataobjects/ECLElementNumbers.h>
13 
14 namespace Belle2 {
25  private :
26 
27  //Crystal identifiers
29  int m_cell_ID;
31  int m_phi_ID;
34 
35  //indexes (whatever those mean...)
37  int m_phi_idx;
40 
41  //Crystal properties
43  float m_mass;
45  float m_volume;
47  float EvalMass();
48 
49  //Crystal Location
51  float m_PosR;
53  float m_PosP;
55  float m_PosX;
57  float m_PosY;
59  float m_PosZ;
60 
62  double EvalPhi();
64  double EvalR();
66  double EvalZ();
68  double EvalX();
70  double EvalY();
71 
73  void Mapping(int cid);
74 
75  public :
76 
77 
79  static const int Ring[69];
81  static const int sumPrevious[24];
82 
84  static const float CrystalMassEndcap[132];
86  static const float CrystalMassBarrel[46];
87 
88 
90  static const double theta[69];
91 
93  static const double EndcapRadius[132];
94 
96  static const double BarrelZ[46];
97 
101  explicit ECLCrystalData(int cid);
103  ECLCrystalData(int tid, int pid);
105  ~ECLCrystalData();
107  void Eval();
109  int GetCrystalIndex();
111  bool IsEndCap();
113  bool IsBarrel();
115  int GetCellID();
117  int GetCellID(int tid, int pid);
118 
120  double GetPhi() { return m_PosP; };
122  inline double GetTheta() { return theta[m_theta_ID]; } ;
124  double GetR() { return m_PosR; };
126  double GetZ() { return m_PosZ; };
128  double GetX() { return m_PosX; };
130  double GetY() { return m_PosY; };
132  double GetMass() { return m_mass; };
134  inline int GetThetaID() { return m_theta_ID; } ;
136  inline int GetPhiID() { return m_phi_ID; } ;
138  inline int GetNperThetaID() { return 16 * Ring[m_theta_ID];};
139 
140 
141  };
143 }
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
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.
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.
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.
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.