ECCE @ EIC 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  void SetDefaultParameters() override;
34 
35  void Detector(const std::string &d);
36  void cellsize(const int i, const double sr, const double sz);
37  void etaphisize(const int i, const double deltaeta, const double deltaphi);
38  void checkenergy(const int i = 1) { chkenergyconservation = i; }
39  void OutputDetector(const std::string &d) { outdetector = d; }
40 
41  double get_timing_window_min(const int i) { return tmin_max[i].first; }
42  double get_timing_window_max(const int i) { return tmin_max[i].second; }
43  void set_timing_window(const int detid, const double tmin, const double tmax);
44 
45  protected:
46  void set_size(const int i, const double sizeA, const double sizeB);
47  int CheckEnergy(PHCompositeNode *topNode);
48 
49  std::map<int, int> binning;
50  std::map<int, std::pair<double, double> > cell_size; // cell size in phi/z
51  std::map<int, std::pair<double, double> > zmin_max; // zmin/zmax for each layer for faster lookup
52  std::map<int, double> phistep;
53  std::map<int, double> etastep;
54  std::set<int> implemented_detid;
55  std::string detector;
56  std::string outdetector;
57  std::string hitnodename;
58  std::string cellnodename;
59  std::string geonodename;
60  std::string seggeonodename;
61  std::map<int, std::pair<int, int> > n_phi_z_bins;
62  std::map<unsigned long long, PHG4Cell *> cellptmap; // This map holds the hit cells
63  std::map<unsigned long long, PHG4Cell *>::iterator it;
64  std::map<int, std::pair<double, double> > tmin_max;
65 
66  int nbins[2];
68 
71 };
72 
73 #endif