File indexing completed on 2025-08-06 08:17:53
0001 #ifndef MICROMEGAS_MICROMEGASCOMBINEDDATADECODER_H
0002 #define MICROMEGAS_MICROMEGASCOMBINEDDATADECODER_H
0003
0004
0005
0006
0007
0008
0009 #include "MicromegasCalibrationData.h"
0010 #include "MicromegasHotChannelMapData.h"
0011 #include "MicromegasMapping.h"
0012
0013 #include <fun4all/SubsysReco.h>
0014
0015 #include <memory>
0016 #include <string>
0017
0018 class PHCompositeNode;
0019
0020
0021 class MicromegasCombinedDataDecoder : public SubsysReco
0022 {
0023 public:
0024
0025 MicromegasCombinedDataDecoder(const std::string& name = "MicromegasCombinedDataDecoder");
0026
0027
0028 int Init(PHCompositeNode*) override;
0029
0030
0031 int InitRun(PHCompositeNode*) override;
0032
0033
0034 int process_event(PHCompositeNode*) override;
0035
0036
0037 int End(PHCompositeNode*) override;
0038
0039
0040 void set_calibration_file(const std::string& value) { m_calibration_filename = value; }
0041
0042
0043 void set_hot_channel_map_file(const std::string& value) { m_hot_channel_map_filename = value; }
0044
0045
0046 void set_n_sigma(double value) { m_n_sigma = value; }
0047
0048
0049
0050 void set_min_adc(double value) { m_min_adc = value; }
0051
0052
0053 void set_sample_min(uint16_t value) { m_sample_min = value; }
0054
0055
0056 void set_sample_max(uint16_t value) { m_sample_max = value; }
0057
0058 private:
0059
0060 std::string m_rawhitnodename = "MICROMEGASRAWHIT";
0061
0062
0063
0064 std::string m_calibration_filename = "TPOT_Pedestal_000.root";
0065 MicromegasCalibrationData m_calibration_data;
0066
0067
0068
0069
0070 std::string m_hot_channel_map_filename;
0071 MicromegasHotChannelMapData m_hot_channels;
0072
0073
0074
0075 MicromegasMapping m_mapping;
0076
0077
0078 double m_n_sigma = 5;
0079
0080
0081
0082 double m_min_adc = 50;
0083
0084
0085 uint16_t m_sample_min = 0;
0086
0087
0088 uint16_t m_sample_max = 100;
0089
0090
0091 using hitcountmap_t = std::map<TrkrDefs::hitsetkey, int>;
0092 hitcountmap_t m_hitcounts;
0093 };
0094
0095 #endif