Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:18:07

0001 #ifndef DIODERECO__H
0002 #define DIODERECO__H
0003 
0004 #include <fun4all/SubsysReco.h>
0005 
0006 #include <string>
0007 #include <vector>
0008 
0009 class CDBInterface;
0010 class PHCompositeNode;
0011 class TpcDiodeContainer;
0012 
0013 class DiodeReco : public SubsysReco
0014 {
0015  public:
0016   DiodeReco(const std::string &name = "DiodeReco");
0017   ~DiodeReco() override = default;
0018 
0019   int InitRun(PHCompositeNode *topNode) override;
0020   int process_event(PHCompositeNode *topNode) override;
0021   int End(PHCompositeNode *topNode) override;
0022 
0023   double MaxAdc(int n, int low_bin = 0, int high_bin = 9999);  // Signal is averaged over "avg" number of bins interatively within the bin range [low_bin,high_bin]
0024   int MaxBin(int n);
0025   double Integral(int low_bin, int high_bin);
0026   int NAboveThreshold(double upper_thr, double lower_thr);
0027   double PulseWidth(double upper_thr, double lower_thr);
0028   void PedestalCorrected(int low_bin, int high_bin);
0029 
0030  private:
0031   CDBInterface *m_cdb{nullptr};
0032   std::string calibdir;
0033   TpcDiodeContainer *diodes{nullptr};
0034   std::string m_DiodeContainerName;
0035   std::vector<double> adc;
0036 };
0037 
0038 #endif