Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-03 08:18:01

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef ZDCINFO_ZDCRECO_H
0004 #define ZDCINFO_ZDCRECO_H
0005 
0006 //===========================================================
0007 /// \author Ejiro Umaka
0008 //===========================================================
0009 
0010 #include <cdbobjects/CDBTTree.h>
0011 
0012 #include <fun4all/SubsysReco.h>
0013 
0014 #include <gsl/gsl_const_cgsm.h>
0015 
0016 #include <string>  // for string
0017 #include <vector>  // for vector
0018 
0019 class PHCompositeNode;
0020 class Zdcinfo;
0021 
0022 class ZdcReco : public SubsysReco
0023 {
0024  public:
0025   ZdcReco(const std::string &name = "ZdcReco");
0026   ~ZdcReco() override;
0027   int InitRun(PHCompositeNode *topNode) override;
0028   int process_event(PHCompositeNode *topNode) override;
0029   void ResetMe();
0030   void set_zdc1_cut(const float f) { _zdc1_e = f; }
0031   void set_zdc2_cut(const float g) { _zdc2_e = g; }
0032   void set_smd_threshold(const float d) { _smd_e = d; }
0033 
0034  private:
0035   void CompSmdPos();
0036   CDBTTree *cdbttree{nullptr};
0037   Zdcinfo *m_zdcinfo{nullptr};
0038   std::string m_Detector{"ZDC"};
0039   std::string m_fieldname;
0040   std::string m_calibName;
0041   bool m_overrideCalibName{false};
0042   bool m_overrideFieldName{false};
0043   bool smd_north_fired{false};
0044   bool smd_south_fired{false};
0045   std::vector<float> vsmdadc;
0046   std::vector<float> vsmdtime;
0047   std::vector<float> vzdcadc;
0048   std::vector<float> vzdctime;
0049   float smd_adc[32]{0.0};
0050   float smd_pos[4]{0.0};
0051   float _radius_south{0.};
0052   float _radius_north{0.};
0053   const double _t{17.623};                                // convert to ns
0054   const double _c{GSL_CONST_CGSM_SPEED_OF_LIGHT / 1.e9};  // speed of light in cm/ns
0055   float _z_vertex{0.};
0056   float _zdc1_e{65.0};
0057   float _zdc2_e{20.0};
0058   float _smd_e{5.0};
0059   float _sumS{0.};
0060   float _sumN{0.};
0061   float _sumSden{0.};
0062   float _sumNden{0.};
0063   float _sumSt{0.};
0064   float _sumNt{0.};
0065   int _nhor{0};
0066   int _nver{0};
0067   int _shor{0};
0068   int _sver{0};
0069 };
0070 
0071 #endif  // ZDCRECO_H