File indexing completed on 2025-08-05 08:17:42
0001
0002
0003 #ifndef G4DETECTORS_PHG4BLOCKCELLRECO_H
0004 #define G4DETECTORS_PHG4BLOCKCELLRECO_H
0005
0006 #include <phparameter/PHParameterContainerInterface.h>
0007
0008 #include <fun4all/SubsysReco.h>
0009
0010 #include <map>
0011 #include <set>
0012 #include <string>
0013 #include <utility> // for pair
0014
0015 class PHCompositeNode;
0016
0017 class PHG4BlockCellReco : public SubsysReco, public PHParameterContainerInterface
0018 {
0019 public:
0020 PHG4BlockCellReco(const std::string &name = "BLOCKRECO");
0021
0022 ~PHG4BlockCellReco() override {}
0023
0024
0025 int InitRun(PHCompositeNode *topNode) override;
0026
0027
0028 int process_event(PHCompositeNode *topNode) override;
0029
0030 int ResetEvent(PHCompositeNode *topNode) override;
0031
0032
0033 void SetDefaultParameters() override;
0034
0035 void Detector(const std::string &d) { detector = d; }
0036 void etaxsize(const int i, const double deltaeta, const double deltax);
0037 void checkenergy(const int i = 1) { chkenergyconservation = i; }
0038
0039 void set_timing_window(const int detid, const double tmin, const double tmax);
0040
0041 protected:
0042 void set_size(const int i, const double sizeA, const double sizeB, const int what);
0043 int CheckEnergy(PHCompositeNode *topNode);
0044
0045 double sum_energy_g4hit;
0046 std::map<int, int> binning;
0047 std::map<int, std::pair<double, double> > cell_size;
0048 std::map<int, std::pair<double, double> > zmin_max;
0049 std::map<int, double> xstep;
0050 std::map<int, double> etastep;
0051 std::map<int, std::pair<double, double> > tmin_max;
0052 std::set<int> implemented_detid;
0053 std::string detector;
0054 std::string hitnodename;
0055 std::string cellnodename;
0056 std::string geonodename;
0057 std::string seggeonodename;
0058 std::map<int, std::pair<int, int> > n_x_z_bins;
0059 int chkenergyconservation;
0060 };
0061
0062 #endif