File indexing completed on 2025-08-06 08:18:51
0001 #ifndef G4MBD_BBCDIGITIZATION_H
0002 #define G4MBD_BBCDIGITIZATION_H
0003
0004 #include <fun4all/SubsysReco.h>
0005
0006 #include <Rtypes.h>
0007
0008 #include <gsl/gsl_rng.h>
0009
0010 #include <cmath>
0011 #include <map>
0012 #include <array>
0013 #include <string>
0014
0015
0016 class PHCompositeNode;
0017 class PHG4HitContainer;
0018 class PHG4TruthInfoContainer;
0019 class EventHeader;
0020 class MbdPmtContainer;
0021 class TDatabasePDG;
0022 class TRandom3;
0023 class TH1;
0024 class TH2;
0025 class TF1;
0026
0027 class MbdDigitization : public SubsysReco
0028 {
0029 public:
0030
0031 MbdDigitization(const std::string &name = "MbdDigitization");
0032
0033 ~MbdDigitization() override;
0034
0035
0036 int Init(PHCompositeNode *) override;
0037
0038
0039 int InitRun(PHCompositeNode *) override;
0040
0041
0042 int process_event(PHCompositeNode *) override;
0043
0044
0045
0046
0047
0048 int End(PHCompositeNode *) override { return 0; }
0049
0050
0051 void set_tres(const Float_t tr) { _tres = tr; }
0052
0053 private:
0054 void CreateNodes(PHCompositeNode *topNode);
0055 void GetNodes(PHCompositeNode *);
0056
0057 Float_t f_vx = NAN;
0058 Float_t f_vy = NAN;
0059 Float_t f_vz = NAN;
0060 Float_t f_vt = NAN;
0061 Float_t f_pmtq[128]{};
0062 Float_t f_pmtt0[128]{};
0063 Float_t f_pmtt1[128]{};
0064 Float_t f_pmtnpe[128]{};
0065
0066
0067 std::array<Float_t,128> _gains = {};
0068
0069 TF1 *gaussian = nullptr;
0070
0071
0072 TDatabasePDG *_pdg = nullptr;
0073 gsl_rng *m_RandomGenerator = nullptr;
0074 unsigned int m_Seed = 0;
0075 Float_t _tres = NAN;
0076
0077 std::map<int, int> _pids;
0078
0079
0080 PHG4TruthInfoContainer *_truth_container {nullptr};
0081 PHG4HitContainer *_bbchits {nullptr};
0082
0083
0084 MbdPmtContainer *_bbcpmts {nullptr};
0085 };
0086
0087 #endif