Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:22:01

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef PROTOTYPE3_PROTOTYPE3FEM_H
0004 #define PROTOTYPE3_PROTOTYPE3FEM_H
0005 
0006 #include <string>
0007 #include <vector>
0008 
0009 namespace PROTOTYPE3_FEM
0010 {
0011 /*! Packet ID */
0012 const int PACKET_ID = 21101;
0013 
0014 /*! Number of ADC Samples per tower */
0015 const int NSAMPLES = 24;
0016 
0017 /*! Number of Inner HCAL towers */
0018 const int NCH_IHCAL_ROWS = 4;
0019 const int NCH_IHCAL_COLUMNS = 4;
0020 
0021 /*! Number of Outer HCAL towers */
0022 const int NCH_OHCAL_ROWS = 4;
0023 const int NCH_OHCAL_COLUMNS = 4;
0024 
0025 /*! Number of EMCAL towers */
0026 const int NCH_EMCAL_ROWS = 8;
0027 const int NCH_EMCAL_COLUMNS = 8;
0028 
0029 /*! Error assigned to saturated ADCs */
0030 const int SATURATED_ADC_ERROR = 100;
0031 
0032 /*! Error assigned to dead channels */
0033 const int DEAD_CHANNEL_ERROR = 300;
0034 
0035 //! FEM mapping of channel -> calorimeter col and rows
0036 int GetHBDCh(const std::string &caloname, int i_column, int i_row);
0037 
0038 //! Abhisek's power-law + exp fit
0039 bool SampleFit_PowerLawExp(              //
0040     const std::vector<double> &samples,  //
0041     double &peak,                        //
0042     double &peak_sample,                 //
0043     double &pedstal,                     //
0044     const int verbosity = 0);
0045 
0046 // Abhisek's power-law + exp signal shape model
0047 double SignalShape_PowerLawExp(double *x, double *par);
0048 
0049 //! special treatment for EMCal tagging packet
0050 //! See also
0051 //! https://wiki.bnl.gov/sPHENIX/index.php/2017_calorimeter_beam_test#What_is_new_in_the_data_structures_in_2017
0052 //! Result stored in RUN_INFO node under variable EMCAL_Is_HighEta
0053 const int PACKET_EMCAL_HIGHETA_FLAG = 905;
0054 
0055 }  // namespace PROTOTYPE3_FEM
0056 
0057 #endif