Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4CylinderCellReco.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHG4CylinderCellReco.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef G4DETECTORS_PHG4CYLINDERCELLRECO_H
4 #define G4DETECTORS_PHG4CYLINDERCELLRECO_H
5 
6 #include <phparameter/PHParameterContainerInterface.h>
7 
8 #include <fun4all/SubsysReco.h>
9 
10 #include <map>
11 #include <set>
12 #include <string>
13 #include <utility> // for pair
14 
15 class PHCompositeNode;
16 class PHG4Cell;
17 
19 {
20  public:
21  explicit PHG4CylinderCellReco(const std::string &name = "CYLINDERRECO");
22 
23  ~PHG4CylinderCellReco() override {}
24 
26  int InitRun(PHCompositeNode *topNode) override;
27 
29  int process_event(PHCompositeNode *topNode) override;
30 
31  int ResetEvent(PHCompositeNode *topNode) override;
32 
33 // cppcheck-suppress virtualCallInConstructor
34  void SetDefaultParameters() override;
35 
36  void Detector(const std::string &d);
37  void cellsize(const int i, const double sr, const double sz);
38  void etaphisize(const int i, const double deltaeta, const double deltaphi);
39  void checkenergy(const int i = 1) { chkenergyconservation = i; }
40  void OutputDetector(const std::string &d) { outdetector = d; }
41 
42  double get_timing_window_min(const int i) { return tmin_max[i].first; }
43  double get_timing_window_max(const int i) { return tmin_max[i].second; }
44  void set_timing_window(const int detid, const double tmin, const double tmax);
45 
46  protected:
47  void set_size(const int i, const double sizeA, const double sizeB);
48  int CheckEnergy(PHCompositeNode *topNode);
49 
50  std::map<int, int> binning;
51  std::map<int, std::pair<double, double> > cell_size; // cell size in phi/z
52  std::map<int, std::pair<double, double> > zmin_max; // zmin/zmax for each layer for faster lookup
53  std::map<int, double> phistep;
54  std::map<int, double> etastep;
55  std::set<int> implemented_detid;
62  std::map<int, std::pair<int, int>> n_phi_z_bins;
63  std::map<unsigned long long, PHG4Cell *> cellptmap; // This map holds the hit cells
64  std::map<unsigned long long, PHG4Cell *>::iterator it;
65  std::map<int, std::pair<double, double>> tmin_max;
66  std::map<int, double> m_DeltaTMap;
67 
68  int nbins[2];
70 
72  double sum_energy_g4hit = 0.;
73 };
74 
75 #endif