8 #ifndef _DBCALGeometry_
9 #define _DBCALGeometry_
11 #include <JANA/JObject.h>
12 #include <JANA/JFactory.h>
19 #define MODULE_SHIFT 8
20 #define MODULE_MASK 0xFF00
22 #define LAYER_MASK 0x00F0
23 #define SECTOR_SHIFT 0
24 #define SECTOR_MASK 0X000F
37 float GetBCAL_inner_rad()
const;
38 const float* GetBCAL_radii()
const;
39 float GetBCAL_center()
const;
40 float GetBCAL_length()
const;
41 float GetBCAL_phi_shift()
const;
70 int cellId(
int module,
int layer,
int sector )
const;
71 int module(
int cellId )
const;
72 int layer(
int cellId )
const;
73 int sector(
int cellId )
const;
76 int fADC_layer(
int SiPM_cellId )
const;
77 int fADC_sector(
int SiPM_cellId )
const;
78 int fADCId(
int module,
int SiPM_layer,
int SiPM_sector )
const;
79 int NSiPMs(
int fADCId)
const;
82 float phi(
int fADC_cellId )
const;
83 float phiSize(
int fADC_cellId )
const;
84 float r(
int fADC_cellId )
const;
85 float rSize(
int fADC_cellId )
const;
88 int fADCcellId_rphi(
float r,
float phi )
const;
89 int getglobalchannelnumber(
int module,
int layer,
int sector,
int end)
const;
90 int getendchannelnumber(
int module,
int layer,
int sector)
const;
91 int getglobalsector(
int module,
int sector)
const;
92 int getsector(
int globalsector)
const;
93 int getmodule(
int globalsector)
const;
98 void Initialize(
int runnumber);
101 const int NBCALMODS=48;
102 const int NBCALLAYERS=4;
103 const int NBCALSECTORS=4;
106 const int NBCALLAYSIN=3;
107 const int NBCALLAYSOUT=1;
111 vector<int> NSUMLAYSIN = {1,2,3};
112 vector<int> NSUMLAYSOUT = {4};
113 const int NBCALSECSIN=4;
114 const int NBCALSECSOUT=4;
121 float BCALINNERRAD=0.;
122 float fADC_radius[5] = {};
123 float GLOBAL_CENTER=0.;
124 float BCALFIBERLENGTH=0.;
130 float BCALMIDRAD = m_radius[BCALMID-1];
131 float BCALOUTERRAD=86.17;
133 float C_EFFECTIVE=16.75;
134 float ATTEN_LENGTH=520.;
136 float m_radius[11] = { 64.3,
151 #endif // _DBCALGeometry_
float GetBCAL_NOuterLayers() const
float GetBCAL_Nlayers() const
float * GetBCAL_cell_radii()
float GetBCAL_attenutation_length() const
float GetBCAL_NOuterSectors() const
float GetBCAL_Nmodules() const
float GetBCAL_middle_rad() const
static float BCAL_PHI_SHIFT
float GetBCAL_NInnerSectors() const
float GetBCAL_outer_rad() const
float GetBCAL_NInnerLayers() const
float GetBCAL_c_effective() const
float GetBCAL_middle_cell() const
float GetBCAL_Nsectors() const