Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DBCALGeometry Class Reference

#include <DBCALGeometry.h>

+ Inheritance diagram for DBCALGeometry:

Public Types

enum  End { kUpstream, kDownstream }
 

Public Member Functions

 JOBJECT_PUBLIC (DBCALGeometry)
 
 DBCALGeometry (int runnumber)
 MMD: Looking at the code for the DBCALGeometry::phi( int fADC_cell ) method, I have to conclude that sectors are numbered 1 through 4. Judging by what else I've seen, I have to conclude that layers are numbered 1 through 4 or 1 through 10. This is now the standard that I will use. More...
 
float GetBCAL_inner_rad () const
 
const float * GetBCAL_radii () const
 
float GetBCAL_center () const
 
float GetBCAL_length () const
 
float GetBCAL_phi_shift () const
 
float GetBCAL_outer_rad () const
 
float GetBCAL_middle_rad () const
 
float GetBCAL_middle_cell () const
 
float * GetBCAL_cell_radii ()
 
float GetBCAL_Nmodules () const
 
float GetBCAL_Nlayers () const
 
float GetBCAL_Nsectors () const
 
float GetBCAL_NInnerLayers () const
 
float GetBCAL_NOuterLayers () const
 
float GetBCAL_NInnerSectors () const
 
float GetBCAL_NOuterSectors () const
 
float GetBCAL_c_effective () const
 
float GetBCAL_attenutation_length () const
 
int cellId (int module, int layer, int sector) const
 these functions are about encoding/decoding module/layer/sector info in a cellId More...
 
int module (int cellId) const
 This method can be used for the SiPM ID or for the fADC ID since they are defined in the same way. More...
 
int layer (int cellId) const
 This method can be used for the SiPM ID or for the fADC ID since they are defined in the same way. More...
 
int sector (int cellId) const
 This method can be used for the SiPM ID or for the fADC ID since they are defined in the same way. More...
 
int fADC_layer (int SiPM_cellId) const
 these functions are about finding which readout cell contains a specific SiPM cell More...
 
int fADC_sector (int SiPM_cellId) const
 
int fADCId (int module, int SiPM_layer, int SiPM_sector) const
 
int NSiPMs (int fADCId) const
 
float phi (int fADC_cellId) const
 these functions are about the physical location and dimensions of a readout cell More...
 
float phiSize (int fADC_cellId) const
 
float r (int fADC_cellId) const
 
float rSize (int fADC_cellId) const
 
int fADCcellId_rphi (float r, float phi) const
 these are missing functions that fill in some previous gaps. More...
 
int getglobalchannelnumber (int module, int layer, int sector, int end) const
 Return a BCAL channel number, in order of significance (module, layer, sector, end). More...
 
int getendchannelnumber (int module, int layer, int sector) const
 Return a channel number for either end, in order of significance (module, layer, sector). More...
 
int getglobalsector (int module, int sector) const
 
int getsector (int globalsector) const
 
int getmodule (int globalsector) const
 

Private Member Functions

 DBCALGeometry ()
 
void Initialize (int runnumber)
 

Private Attributes

const int NBCALMODS =48
 number of modules More...
 
const int NBCALLAYERS =4
 number of layers in a module More...
 
const int NBCALSECTORS =4
 number of sectors in a module More...
 
const int NBCALLAYSIN =3
 number of readout layers in inner BCAL (first 6 SiPM layers) More...
 
const int NBCALLAYSOUT =1
 number of readout layers in outer BCAL (outer 4 SiPM layers) More...
 
vector< int > NSUMLAYSIN = {1,2,3}
 number of radial SiPM layers summed for digitization in each inner readout layer More...
 
vector< int > NSUMLAYSOUT = {4}
 number of radial SiPM layers summed for digitization in each outer readout layer More...
 
const int NBCALSECSIN =4
 number of sectors in inner region More...
 
const int NBCALSECSOUT =4
 number of sectors in outer region More...
 
float BCALINNERRAD =0.
 innner radius of BCAL in cm More...
 
float fADC_radius [5] = {}
 BCAL layer radii (4 layers total) More...
 
float GLOBAL_CENTER =0.
 center of BCAL in gloobal coordinate system More...
 
float BCALFIBERLENGTH =0.
 BCAL Scintilator fiber lenth in cm. More...
 
float BCAL_PHI_SHIFT =0.
 overall phi roation of BCAL in radians More...
 
const int BCALMID =7
 first outer layer (default 7) More...
 
float BCALMIDRAD = m_radius[BCALMID-1]
 mid radius of BCAL in cm (boundary between inner and outer layers) More...
 
float BCALOUTERRAD =86.17
 outer radius of BCAL in cm More...
 
float C_EFFECTIVE =16.75
 speed of light in fibers More...
 
float ATTEN_LENGTH =520.
 attenuation length More...
 
float m_radius [11]
 

Detailed Description

Definition at line 26 of file DBCALGeometry.h.

Member Enumeration Documentation

Enumerator
kUpstream 
kDownstream 

Definition at line 34 of file DBCALGeometry.h.

Constructor & Destructor Documentation

DBCALGeometry::DBCALGeometry ( int  runnumber)

MMD: Looking at the code for the DBCALGeometry::phi( int fADC_cell ) method, I have to conclude that sectors are numbered 1 through 4. Judging by what else I've seen, I have to conclude that layers are numbered 1 through 4 or 1 through 10. This is now the standard that I will use.

End if groupings do not evenly divide SiPM cells

Definition at line 18 of file DBCALGeometry.cc.

References BCALMID, Initialize(), NBCALLAYSIN, NBCALLAYSOUT, NSUMLAYSIN, and NSUMLAYSOUT.

DBCALGeometry::DBCALGeometry ( )
private

Member Function Documentation

int DBCALGeometry::cellId ( int  module,
int  layer,
int  sector 
) const

these functions are about encoding/decoding module/layer/sector info in a cellId

This object can be used for the SiPM ID or for the fADC ID since they are defined in the same way (4 bits for sector then 4 bits for layer then 8 bits for module.)

Definition at line 150 of file DBCALGeometry.cc.

References LAYER_SHIFT, MODULE_SHIFT, and SECTOR_SHIFT.

Referenced by DBCALPoint::DBCALPoint(), DBCALCluster_factory::evnt(), DEventSourceHDDM::Extract_DBCALSiPMHit(), fADCId(), DBCALCluster::makeFromPoints(), and DBCALCluster_factory::overlap().

int DBCALGeometry::fADC_layer ( int  SiPM_cellId) const

these functions are about finding which readout cell contains a specific SiPM cell

Definition at line 161 of file DBCALGeometry.cc.

References BCALMID, layer(), NBCALLAYSIN, NBCALLAYSOUT, NSUMLAYSIN, and NSUMLAYSOUT.

Referenced by fADCId().

int DBCALGeometry::fADC_sector ( int  SiPM_cellId) const

Definition at line 191 of file DBCALGeometry.cc.

References BCALMID, layer(), and sector().

Referenced by fADCId().

int DBCALGeometry::fADCcellId_rphi ( float  r,
float  phi 
) const

these are missing functions that fill in some previous gaps.

fADCcellId_rphi

Method to get the fADC cell ID from an (R, phi) combination.
R in cm and phi in radians.

Method to get the fADC cell ID from an (R, phi) combination. R in cm and phi in radians.

Definition at line 376 of file DBCALGeometry.cc.

References BCALINNERRAD, BCALOUTERRAD, fADCId(), m_radius, module(), and sector().

int DBCALGeometry::fADCId ( int  module,
int  SiPM_layer,
int  SiPM_sector 
) const

Definition at line 212 of file DBCALGeometry.cc.

References cellId(), fADC_layer(), and fADC_sector().

Referenced by fADCcellId_rphi().

float DBCALGeometry::GetBCAL_attenutation_length ( ) const
inline

Definition at line 67 of file DBCALGeometry.h.

Referenced by DMCTrigger_factory::brun().

float DBCALGeometry::GetBCAL_c_effective ( ) const
inline

Definition at line 64 of file DBCALGeometry.h.

float* DBCALGeometry::GetBCAL_cell_radii ( )
inline

Definition at line 46 of file DBCALGeometry.h.

float DBCALGeometry::GetBCAL_middle_cell ( ) const
inline

Definition at line 45 of file DBCALGeometry.h.

Referenced by JEventProcessor_event_size::brun().

float DBCALGeometry::GetBCAL_middle_rad ( ) const
inline

Definition at line 44 of file DBCALGeometry.h.

float DBCALGeometry::GetBCAL_NInnerLayers ( ) const
inline

Definition at line 53 of file DBCALGeometry.h.

float DBCALGeometry::GetBCAL_NInnerSectors ( ) const
inline

Definition at line 55 of file DBCALGeometry.h.

float DBCALGeometry::GetBCAL_Nlayers ( ) const
inline

Definition at line 50 of file DBCALGeometry.h.

float DBCALGeometry::GetBCAL_Nmodules ( ) const
inline

Definition at line 49 of file DBCALGeometry.h.

float DBCALGeometry::GetBCAL_NOuterLayers ( ) const
inline

Definition at line 54 of file DBCALGeometry.h.

float DBCALGeometry::GetBCAL_NOuterSectors ( ) const
inline

Definition at line 56 of file DBCALGeometry.h.

float DBCALGeometry::GetBCAL_Nsectors ( ) const
inline

Definition at line 51 of file DBCALGeometry.h.

float DBCALGeometry::GetBCAL_outer_rad ( ) const
inline

Definition at line 43 of file DBCALGeometry.h.

float DBCALGeometry::GetBCAL_phi_shift ( ) const

Definition at line 115 of file DBCALGeometry.cc.

References BCAL_PHI_SHIFT.

const float * DBCALGeometry::GetBCAL_radii ( ) const

Definition at line 99 of file DBCALGeometry.cc.

References fADC_radius.

int DBCALGeometry::getendchannelnumber ( int  module,
int  layer,
int  sector 
) const

Return a channel number for either end, in order of significance (module, layer, sector).

Definition at line 414 of file DBCALGeometry.cc.

int DBCALGeometry::getglobalchannelnumber ( int  module,
int  layer,
int  sector,
int  end 
) const

Return a BCAL channel number, in order of significance (module, layer, sector, end).

Definition at line 409 of file DBCALGeometry.cc.

Referenced by JEventProcessor_BCAL_LEDonline::evnt().

int DBCALGeometry::getglobalsector ( int  module,
int  sector 
) const
int DBCALGeometry::getmodule ( int  globalsector) const

Definition at line 431 of file DBCALGeometry.cc.

int DBCALGeometry::getsector ( int  globalsector) const

Definition at line 424 of file DBCALGeometry.cc.

References sector().

DBCALGeometry::JOBJECT_PUBLIC ( DBCALGeometry  )
int DBCALGeometry::layer ( int  cellId) const

This method can be used for the SiPM ID or for the fADC ID since they are defined in the same way.

Definition at line 132 of file DBCALGeometry.cc.

References LAYER_MASK, and LAYER_SHIFT.

Referenced by fADC_layer(), fADC_sector(), NSiPMs(), r(), and rSize().

int DBCALGeometry::module ( int  cellId) const

This method can be used for the SiPM ID or for the fADC ID since they are defined in the same way.

Definition at line 123 of file DBCALGeometry.cc.

References MODULE_MASK, and MODULE_SHIFT.

Referenced by fADCcellId_rphi(), and phi().

int DBCALGeometry::NSiPMs ( int  fADCId) const

Return the number of SiPMs summed for the given fADCId

Definition at line 230 of file DBCALGeometry.cc.

References layer(), NBCALLAYSIN, NBCALLAYSOUT, NSUMLAYSIN, and NSUMLAYSOUT.

float DBCALGeometry::phi ( int  fADC_cellId) const

these functions are about the physical location and dimensions of a readout cell

Definition at line 320 of file DBCALGeometry.cc.

References getglobalsector(), module(), and sector().

Referenced by DBCALPoint::DBCALPoint(), and DBCALCluster_factory::overlap().

float DBCALGeometry::phiSize ( int  fADC_cellId) const

Definition at line 353 of file DBCALGeometry.cc.

Referenced by DBCALPoint::DBCALPoint(), and DBCALCluster_factory::overlap().

float DBCALGeometry::r ( int  fADC_cellId) const
float DBCALGeometry::rSize ( int  fADC_cellId) const

Definition at line 286 of file DBCALGeometry.cc.

References BCALMID, layer(), m_radius, NBCALLAYSIN, NSUMLAYSIN, and NSUMLAYSOUT.

Referenced by DBCALPoint::DBCALPoint().

int DBCALGeometry::sector ( int  cellId) const

This method can be used for the SiPM ID or for the fADC ID since they are defined in the same way.

Definition at line 141 of file DBCALGeometry.cc.

References SECTOR_MASK, and SECTOR_SHIFT.

Referenced by fADC_sector(), fADCcellId_rphi(), getglobalsector(), getsector(), and phi().

Member Data Documentation

float DBCALGeometry::ATTEN_LENGTH =520.
private

attenuation length

Definition at line 134 of file DBCALGeometry.h.

Referenced by DTrigger_factory::brun().

float DBCALGeometry::BCAL_PHI_SHIFT =0.
private

overall phi roation of BCAL in radians

Definition at line 125 of file DBCALGeometry.h.

Referenced by GetBCAL_phi_shift(), and Initialize().

float DBCALGeometry::BCALFIBERLENGTH =0.
private

BCAL Scintilator fiber lenth in cm.

Definition at line 124 of file DBCALGeometry.h.

Referenced by DTrigger_factory::brun(), GetBCAL_length(), and Initialize().

float DBCALGeometry::BCALINNERRAD =0.
private

innner radius of BCAL in cm

Definition at line 121 of file DBCALGeometry.h.

Referenced by fADCcellId_rphi(), GetBCAL_inner_rad(), and Initialize().

const int DBCALGeometry::BCALMID =7
private

first outer layer (default 7)

Definition at line 129 of file DBCALGeometry.h.

Referenced by DBCALGeometry(), fADC_layer(), fADC_sector(), r(), and rSize().

float DBCALGeometry::BCALMIDRAD = m_radius[BCALMID-1]
private

mid radius of BCAL in cm (boundary between inner and outer layers)

Definition at line 130 of file DBCALGeometry.h.

float DBCALGeometry::BCALOUTERRAD =86.17
private

outer radius of BCAL in cm

Definition at line 131 of file DBCALGeometry.h.

Referenced by fADCcellId_rphi().

float DBCALGeometry::C_EFFECTIVE =16.75
private

speed of light in fibers

Definition at line 133 of file DBCALGeometry.h.

float DBCALGeometry::fADC_radius[5] = {}
private

BCAL layer radii (4 layers total)

Definition at line 122 of file DBCALGeometry.h.

Referenced by GetBCAL_radii(), and Initialize().

float DBCALGeometry::GLOBAL_CENTER =0.
private

center of BCAL in gloobal coordinate system

Definition at line 123 of file DBCALGeometry.h.

Referenced by GetBCAL_center(), and Initialize().

float DBCALGeometry::m_radius[11]
private
Initial value:
= { 64.3,
66.3,
68.3,
70.3,
72.3,
74.3,
76.3,
78.77,
81.24,
83.70,
86.17}

Definition at line 136 of file DBCALGeometry.h.

Referenced by fADCcellId_rphi(), r(), and rSize().

const int DBCALGeometry::NBCALLAYERS =4
private

number of layers in a module

Definition at line 102 of file DBCALGeometry.h.

const int DBCALGeometry::NBCALLAYSIN =3
private

number of readout layers in inner BCAL (first 6 SiPM layers)

Definition at line 106 of file DBCALGeometry.h.

Referenced by DBCALGeometry(), fADC_layer(), NSiPMs(), r(), and rSize().

const int DBCALGeometry::NBCALLAYSOUT =1
private

number of readout layers in outer BCAL (outer 4 SiPM layers)

Definition at line 107 of file DBCALGeometry.h.

Referenced by DBCALGeometry(), fADC_layer(), and NSiPMs().

const int DBCALGeometry::NBCALMODS =48
private

number of modules

Definition at line 101 of file DBCALGeometry.h.

const int DBCALGeometry::NBCALSECSIN =4
private

number of sectors in inner region

Definition at line 113 of file DBCALGeometry.h.

const int DBCALGeometry::NBCALSECSOUT =4
private

number of sectors in outer region

Definition at line 114 of file DBCALGeometry.h.

const int DBCALGeometry::NBCALSECTORS =4
private

number of sectors in a module

Definition at line 103 of file DBCALGeometry.h.

vector<int> DBCALGeometry::NSUMLAYSIN = {1,2,3}
private

number of radial SiPM layers summed for digitization in each inner readout layer

Definition at line 111 of file DBCALGeometry.h.

Referenced by DBCALGeometry(), fADC_layer(), NSiPMs(), r(), and rSize().

vector<int> DBCALGeometry::NSUMLAYSOUT = {4}
private

number of radial SiPM layers summed for digitization in each outer readout layer

Definition at line 112 of file DBCALGeometry.h.

Referenced by DBCALGeometry(), fADC_layer(), NSiPMs(), r(), and rSize().


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