// $Id$ // // File: DBCALGeometry.h // Created: Thu Nov 17 15:10:51 CST 2005 // Creator: gluexuser (on Linux hydra.phys.uregina.ca 2.4.20-8smp i686) // #ifndef _DBCALGeometry_ #define _DBCALGeometry_ #include #include using namespace jana; // create a single number channel id which is useful in algorithms // if M L S are module layer sector the bit map looks like: // MMMM MMMM LLLL SSSS #define MODULE_SHIFT 8 #define MODULE_MASK 0xFF00 #define LAYER_SHIFT 4 #define LAYER_MASK 0x00F0 #define SECTOR_SHIFT 0 #define SECTOR_MASK 0X000F #define PI 3.14159265358 // with this set one will utilize the default summing -- see DBCALGeometry.cc // for a description of summed geometry. // // Author's note: this is seen as a temporary feature to study effects of // two different summing schemes. A preprocessor macro is not the best way // to change the functionality of code, but mcsmear doesn't use factories to // provide objects so its parameters aren't helpful. #define BCAL_SUM_CELL class DBCALGeometry : public JObject { public: JOBJECT_PUBLIC( DBCALGeometry ); DBCALGeometry(); enum End { kUpstream, kDownstream }; static const int NBCALMODS=48; ///< number of modules //the distinction between inner layers and outer layers is important, since only the inner layers have TDC readout #ifdef BCAL_SUM_CELL static const int NBCALLAYSIN=3; ///< number of readout layers in inner BCAL (first 6 SiPM layers) static const int NBCALLAYSOUT=1; ///< number of readout layers in outer BCAL (outer 4 SiPM layers) #else static const int NBCALLAYSIN=6; static const int NBCALLAYSOUT=4; #endif static int NSUMLAYSIN[NBCALLAYSIN]; ///< number of radial SiPM layers summed for digitization in each inner readout layer static int NSUMLAYSOUT[NBCALLAYSOUT]; ///< number of radial SiPM layers summed for digitization in each outer readout layer static int NSUMSECSIN; ///< for the inner layers, the number of SiPM that will be summed in the azimuthal direction static int NSUMSECSOUT; ///< for the outer layer(s), the number of SiPM that will be summed in the azimuthal direction static int NBCALSECSIN; ///