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