10 #include <ecl/modules/eclBackgroundStudy/ECLCrystalData.h>
13 #include <framework/logging/Logger.h>
17 #define PI 3.14159265358979323846
18 #define DEGTORAD 1.74532925199432955e-02
24 3, 3, 4, 4, 4, 6, 6, 6, 6, 6, 6, 9, 9,
25 9, 9, 9, 9, 9 , 9, 9, 9, 9, 9 , 9, 9, 9, 9, 9 , 9, 9, 9, 9, 9,
26 9, 9, 9, 9, 9 , 9, 9, 9, 9, 9 , 9, 9, 9, 9, 9 , 9, 9, 9, 9, 9,
28 9, 9, 6, 6, 6, 6, 6, 4, 4, 4
31 int const ECLCrystalData::sumPrevious[24] = {0, 3, 6, 10, 14, 18, 24, 30, 36, 42, 48, 54, 63, 72, 81, 90, 96, 102, 108, 114, 120, 124, 128, 132};
34 float const ECLCrystalData::CrystalMassEndcap[132] = {4.99, 5.01, 4.99, 5.82, 5.94, 5.83, 4.75, 4.76, 4.77, 4.74, 5.14, 5.16, 5.16,
35 5.14, 5.76, 5.8, 5.79, 5.78, 4.14, 4.28, 4.15, 4.16, 4.28, 4.14, 4.32, 4.34,
36 4.34, 4.34, 4.34, 4.32, 4.85, 4.87, 4.87, 4.87, 4.87, 4.85, 4.99, 5.02, 5.02,
37 5.02, 5.02, 4.99, 5.37, 5.39, 5.39, 5.39, 5.39, 5.37, 5.89, 5.92, 5.92, 5.92,
38 5.92, 5.9, 4.03, 4.12, 4.05, 4.05, 4.12, 4.05, 4.05, 4.12, 4.03, 4.16, 4.18,
39 4.18, 4.18, 4.18, 4.18, 4.18, 4.18, 4.16, 4.47, 4.49, 4.49, 4.49, 4.49, 4.49,
40 4.49, 4.49, 4.47, 4.26, 4.34, 4.28, 4.28, 4.34, 4.28, 4.28, 4.34, 4.26, 5.88,
41 5.91, 5.91, 5.91, 5.91, 5.88, 5.46, 5.48, 5.48, 5.48, 5.48, 5.46, 5.02, 5.04,
42 5.04, 5.04, 5.04, 5.02, 4.63, 4.65, 4.65, 4.65, 4.65, 4.63, 4.4, 4.53, 4.42,
43 4.42, 4.53, 4.4, 5.74, 5.77, 5.76, 5.74, 5.09, 5.11, 5.11, 5.09, 4.56, 4.58,
49 4.786, 4.807, 4.828, 4.848, 4.868, 4.887, 4.906, 4.923, 4.940,
50 4.955, 4.969, 4.981, 4.992, 5.001, 5.008, 5.013, 5.016, 5.017,
51 5.016, 4.455, 4.455, 5.016, 5.017, 5.016, 5.013, 5.008, 5.001,
52 4.992, 4.981, 4.969, 4.955, 4.940, 4.923, 4.906, 4.887, 4.868,
58 double const ECLCrystalData::theta[69] = {13.9486666667, 15.4862, 17.110575, 18.757625, 20.255425, 21.8637333333,
59 23.4259666667, 24.96125, 26.4777833333, 27.9407, 29.36275, 30.8382555556,
60 32.2618444444, 33.667039, 35.062886, 36.509337, 38.007345, 39.557769,
61 41.161373, 42.818633, 44.530027, 46.295838, 48.115876, 49.990235, 51.91882,
62 53.900865, 55.935415, 58.021324, 60.157158, 62.3412, 64.571442, 66.8455,
63 69.160698, 71.513983, 73.902011, 76.321253, 78.767888, 81.237718, 83.726351,
64 86.229301, 88.741891, 90, 90, 91.258109, 93.770699, 96.273649, 98.762282,
65 101.232112, 103.678747, 106.097989, 108.486017, 110.839302, 113.154501,
66 115.428558, 117.658801, 119.842842, 121.978676, 124.064585, 126.099135,
67 128.2902222222, 130.4424444444, 132.6918333333, 134.9551666667, 137.3811666667,
68 139.9081666667, 142.5951666667, 145.374, 148.0185, 150.8355
74 217.25, 217.25, 217.25,
75 218.72, 218.72, 218.72,
76 220.29, 220.29, 220.29, 220.29,
77 222.00, 222.00, 222.00, 222.00,
78 223.96, 223.96, 223.96, 223.96,
79 226.01, 226.01, 226.01, 226.01, 226.01, 226.01,
80 228.21, 228.21, 228.21, 228.21, 228.21, 228.21,
81 230.67, 230.67, 230.67, 230.67, 230.67, 230.67,
82 233.20, 233.20, 233.20, 233.20, 233.20, 233.20,
83 235.89, 235.89, 235.89, 235.89, 235.89, 235.89,
84 238.89, 238.89, 238.89, 238.89, 238.89, 238.89,
85 241.94, 241.94, 241.94, 241.94, 241.94, 241.94, 241.94, 241.94, 241.94,
86 245.16, 245.16, 245.16, 245.16, 245.16, 245.16, 245.16, 245.16, 245.16,
88 172.06, 172.06, 172.06, 172.06, 172.06, 172.06, 172.06, 172.06, 172.06,
89 165.69, 165.69, 165.69, 165.69, 165.69, 165.69, 165.69, 165.69, 165.69,
90 159.78, 159.78, 159.78, 159.78, 159.78, 159.78,
91 154.36, 154.36, 154.36, 154.36, 154.36, 154.36,
92 149.37, 149.37, 149.37, 149.37, 149.37, 149.37,
93 144.82, 144.82, 144.82, 144.82, 144.82, 144.82,
94 140.67, 140.67, 140.67, 140.67, 140.67, 140.67,
95 136.89, 136.89, 136.89, 136.89,
96 133.49, 133.49, 133.49, 133.49,
97 133.49, 133.49, 133.49, 133.49
102 double const ECLCrystalData::BarrelZ[46] = {210.15, 200.14, 190.44, 181.05, 171.95, 163.03, 154.45, 146.10, 137.98, 129.99, 122.27, 114.72, 107.34, 100.05, 92.96, 86.00, 79.15, 72.36, 65.72, 59.16, 52.69, 46.22, 39.87, 33.56, 27.29, 21.01, 14.81, 8.62, 2.78, -2.78, -14.81, -21.01, -27.29, -33.56, -39.87, -46.22, -52.69, -59.16, -65.72, -72.36, -79.15, -86.00, -92.95, -100.05, -107 - 28};
202 B2ERROR(
"ERROR: invalid theta_ID=" <<
m_theta_ID);
208 return m_theta_ID < 13 || m_theta_ID > 58 ;
253 int forwRing[13] = {0, 3, 6, 10, 14, 18, 24, 30, 36, 42, 48, 54, 63 };
254 return forwRing[ThetaId] * 16 + PhiId;
256 }
else if (ThetaId > 58) {
257 int backRing[10] = {0, 9, 18, 24, 30, 36, 42, 48, 52, 56} ;
258 return 7776 + backRing[ThetaId - 59] * 16 + PhiId;
262 return 1152 + 144 * (ThetaId - 13) + PhiId;
268 B2ERROR(
"ECL ECLGeometryPar Mapping " << cid <<
". Out of range.");
270 }
else if (cid < 3 * 16) {
275 }
else if (cid < 6 * 16) {
280 }
else if (cid < 10 * 16) {
285 }
else if (cid < 14 * 16) {
290 }
else if (cid < 18 * 16) {
295 }
else if (cid < 24 * 16) {
300 }
else if (cid < 30 * 16) {
305 }
else if (cid < 36 * 16) {
310 }
else if (cid < 42 * 16) {
315 }
else if (cid < 48 * 16) {
320 }
else if (cid < 54 * 16) {
325 }
else if (cid < 63 * 16) {
330 }
else if (cid < 72 * 16) {
335 }
else if (cid < 7776) {
340 }
else if (cid < 7776 + 9 * 16) {
345 }
else if (cid < 7776 + 18 * 16) {
350 }
else if (cid < 7776 + 24 * 16) {
355 }
else if (cid < 7776 + 30 * 16) {
360 }
else if (cid < 7776 + 36 * 16) {
365 }
else if (cid < 7776 + 42 * 16) {
370 }
else if (cid < 7776 + 48 * 16) {
375 }
else if (cid < 7776 + 52 * 16) {
380 }
else if (cid < 7776 + 56 * 16) {
385 }
else if (cid < 7776 + 60 * 16) {
391 B2ERROR(
"ECL ECLCrystalData Mapping " << cid <<
". Out of range.");
void Eval()
Set values for the crystal.
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 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.
int m_cell_ID
Cell ID of crystal.
static const int sumPrevious[24]
Number of crystals in preceding theta rings (endcaps only)
bool IsEndCap()
True if crystal is in endcaps.
~ECLCrystalData()
destructor
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.
int m_theta_ID
theta ID of crystal
bool IsBarrel()
True if crystal is in barrel.
double EvalX()
Set X value of crystal.
float m_PosX
Crystal Position - X.
int GetCellID()
return cell ID
static const double BarrelZ[46]
BarrelCrystalID to z-coordinate.
Abstract base class for different kinds of events.