File indexing completed on 2025-08-06 08:19:25
0001
0002
0003
0004 #ifndef G4MICROMEGAS_PHG4MICROMEGASDIGITIZER_H
0005 #define G4MICROMEGAS_PHG4MICROMEGASDIGITIZER_H
0006
0007
0008
0009
0010
0011
0012 #include <fun4all/SubsysReco.h>
0013
0014 #include <phparameter/PHParameterInterface.h>
0015
0016 #include <gsl/gsl_rng.h>
0017
0018 #include <memory>
0019 #include <string> // for string
0020
0021 class PHCompositeNode;
0022
0023 class PHG4MicromegasDigitizer : public SubsysReco, public PHParameterInterface
0024 {
0025 public:
0026 PHG4MicromegasDigitizer(const std::string &name = "PHG4MicromegasDigitizer");
0027
0028
0029 int InitRun(PHCompositeNode *) override;
0030
0031
0032 int process_event(PHCompositeNode *topNode) override;
0033
0034
0035 void SetDefaultParameters() override;
0036
0037 private:
0038
0039 double add_noise() const;
0040
0041
0042 double m_adc_threshold = 2700;
0043
0044
0045 double m_enc = 670;
0046
0047
0048 double m_pedestal = 50000;
0049
0050
0051 double m_volts_per_charge = 20;
0052
0053
0054 double m_volt_per_electron_signal = 0;
0055
0056
0057 double m_volt_per_electron_noise = 0;
0058
0059
0060
0061 static constexpr double m_adc_per_volt = 1024. / 2200;
0062
0063
0064 class Deleter
0065 {
0066 public:
0067
0068 void operator()(gsl_rng *rng) const { gsl_rng_free(rng); }
0069 };
0070
0071
0072
0073 std::unique_ptr<gsl_rng, Deleter> m_rng;
0074 };
0075
0076 #endif