Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:20:29

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 
0022   double MaxAdc(int n, int low_bin = 0, int high_bin = 9999) const;  // Signal is averaged over "avg" number of bins interatively within the bin range [low_bin,high_bin]
0023   int MaxBin(int n) const;
0024   double Integral(int low_bin, int high_bin) const;
0025   int NAboveThreshold(double upper_thr, double lower_thr) const;
0026   double PulseWidth(double upper_thr, double lower_thr) const;
0027   void PedestalCorrected(int low_bin, int high_bin);
0028 
0029  private:
0030   CDBInterface *m_cdb{nullptr};
0031   TpcDiodeContainer *diodes{nullptr};
0032   std::string calibdir;
0033   std::string m_DiodeContainerName;
0034   std::vector<double> adc;
0035 };
0036 
0037 #endif