File indexing completed on 2026-09-11 08:27:43
0001 #ifndef HGCROC_H
0002 #define HGCROC_H
0003
0004 #include <vector>
0005 #include "Tile.h"
0006
0007 class Hgcroc: public Tile {
0008
0009 public:
0010 Hgcroc():Tile(ReadOut::Type::Hgcroc){}
0011 ~Hgcroc(){}
0012 std::vector<int> GetADCWaveform(void) const;
0013 std::vector<int> GetTOAWaveform(void) const;
0014 std::vector<int> GetTOTWaveform(void) const;
0015 int GetFirstTOASample (void);
0016 int GetCorrectedFirstTOASample(double);
0017 int GetFirstSampleAboveTh(void);
0018 int GetMaxSampleADC (void);
0019 int GetNsample(void) const ;
0020 double GetRawTOT(void) const;
0021 double GetCorrectedTOT(void) const;
0022 double GetRawTOA(void) const;
0023 double GetCorrectedTOA(void) const;
0024
0025 int GetPedestal(void) const;
0026
0027 void SetADCWaveform(std::vector<int>);
0028 void AppendWaveformADC(int);
0029 void ResetADCWaveformPoint(int, int);
0030
0031 void SetTOAWaveform(std::vector<int>);
0032 void AppendWaveformTOA(int);
0033 void ResetTOAWaveformPoint(int, int);
0034
0035 void SetTOTWaveform(std::vector<int>);
0036 void AppendWaveformTOT(int);
0037 void ResetTOTWaveformPoint(int, int);
0038
0039 bool IsSaturatedADC(void) const;
0040 int IsBelowPed(double) const;
0041 void SetNsample(int);
0042 void SetCorrectedTOT(double);
0043 int SetCorrectedTOA(int);
0044 void SetPedestal(int);
0045
0046 int GetLinearizedRawTOA();
0047
0048 double GetIntegratedADC() {return integrated_adc;};
0049 double GetIntegratedTOT() {return integrated_tot;};
0050 double GetIntegratedValue() {return integrated_value;};
0051 double GetTOATimeResolution(void) {return (double)(25./1024);};
0052
0053 void SetIntegratedADC(double val) { integrated_adc = val; }
0054 void SetIntegratedTOT(double val) { integrated_tot = val; }
0055 void SetIntegratedValue(double val) { integrated_value = val; }
0056
0057 void PrintWaveFormDebugInfo( double, double, double);
0058 protected:
0059 int Nsample;
0060 std::vector<int> adc_waveform;
0061 std::vector<int> toa_waveform;
0062 std::vector<int> tot_waveform;
0063 int TOA = -10e5;
0064 int TOT = -10e5;
0065 int pedestal = 0;
0066
0067
0068 double integrated_adc = 0.;
0069 double integrated_tot = 0.;
0070 double integrated_value = 0.;
0071
0072 private:
0073
0074 ClassDef(Hgcroc,2)
0075 };
0076
0077
0078 #endif