Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4BlockCellReco.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHG4BlockCellReco.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef G4DETECTORS_PHG4BLOCKCELLRECO_H
4 #define G4DETECTORS_PHG4BLOCKCELLRECO_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 
18 {
19  public:
20  PHG4BlockCellReco(const std::string &name = "BLOCKRECO");
21 
22  ~PHG4BlockCellReco() override {}
23 
25  int InitRun(PHCompositeNode *topNode) override;
26 
28  int process_event(PHCompositeNode *topNode) override;
29 
30  int ResetEvent(PHCompositeNode *topNode) override;
31 
32 // cppcheck-suppress virtualCallInConstructor
33  void SetDefaultParameters() override;
34 
35  void Detector(const std::string &d) { detector = d; }
36  void etaxsize(const int i, const double deltaeta, const double deltax);
37  void checkenergy(const int i = 1) { chkenergyconservation = i; }
38 
39  void set_timing_window(const int detid, const double tmin, const double tmax);
40 
41  protected:
42  void set_size(const int i, const double sizeA, const double sizeB, const int what);
43  int CheckEnergy(PHCompositeNode *topNode);
44 
46  std::map<int, int> binning;
47  std::map<int, std::pair<double, double> > cell_size; // cell size in x/z
48  std::map<int, std::pair<double, double> > zmin_max; // zmin/zmax for each layer for faster lookup
49  std::map<int, double> xstep;
50  std::map<int, double> etastep;
51  std::map<int, std::pair<double, double> > tmin_max;
52  std::set<int> implemented_detid;
58  std::map<int, std::pair<int, int> > n_x_z_bins;
60 };
61 
62 #endif