File indexing completed on 2025-12-17 09:20:21
0001 #ifndef MICROMEGAS_MicromegasCombinedDataCalibration_H
0002 #define MICROMEGAS_MicromegasCombinedDataCalibration_H
0003
0004
0005
0006
0007
0008
0009 #include "MicromegasMapping.h"
0010
0011 #include <fun4all/SubsysReco.h>
0012
0013 #include <map>
0014 #include <memory>
0015 #include <string>
0016
0017 class PHCompositeNode;
0018 class TFile;
0019 class TH1;
0020 class TH2;
0021 class TProfile;
0022
0023
0024 class MicromegasCombinedDataCalibration : public SubsysReco
0025 {
0026 public:
0027
0028
0029 MicromegasCombinedDataCalibration( const std::string &name = "MicromegasCombinedDataCalibration" );
0030
0031
0032 int Init(PHCompositeNode*) override;
0033
0034
0035 int InitRun(PHCompositeNode*) override;
0036
0037
0038 int process_event(PHCompositeNode*) override;
0039
0040
0041 int End(PHCompositeNode*) override;
0042
0043
0044 void set_sample_min( uint16_t value ) { m_sample_min = value; }
0045
0046
0047 void set_sample_max( uint16_t value ) { m_sample_max = value; }
0048
0049
0050 void set_calibration_file( const std::string& value ) { m_calibration_filename = value; }
0051
0052
0053 void set_do_evaluation( bool value ) { m_do_evaluation = value; }
0054
0055
0056 void set_evaluation_file( const std::string& value ) { m_evaluation_filename = value; }
0057
0058 private:
0059
0060 std::string m_rawhitnodename = "MICROMEGASRAWHIT";
0061
0062
0063 MicromegasMapping m_mapping;
0064
0065
0066 uint16_t m_sample_min = 0;
0067
0068
0069 uint16_t m_sample_max = 100;
0070
0071
0072 std::string m_calibration_filename = "TPOT_Pedestal_000.root";
0073
0074
0075 using histogram_map_t = std::map<int, TH2*>;
0076 histogram_map_t m_histogram_map;
0077
0078
0079 using profile_map_t = std::map<int, TProfile*>;
0080 profile_map_t m_profile_map;
0081
0082
0083 bool m_do_evaluation = false;
0084
0085
0086 std::string m_evaluation_filename = "MicromegasCombinedDataEvaluation.root";
0087
0088
0089 std::unique_ptr<TFile> m_evaluation_file;
0090
0091
0092 };
0093
0094 #endif