forked from sPHENIX-Collaboration/coresoftware
/
PHG4CylinderCellReco.h
73 lines (56 loc) · 2.28 KB
/
PHG4CylinderCellReco.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
// Tell emacs that this is a C++ source
// -*- C++ -*-.
#ifndef G4DETECTORS_PHG4CYLINDERCELLRECO_H
#define G4DETECTORS_PHG4CYLINDERCELLRECO_H
#include <phparameter/PHParameterContainerInterface.h>
#include <fun4all/SubsysReco.h>
#include <map>
#include <set>
#include <string>
#include <utility> // for pair
class PHCompositeNode;
class PHG4Cell;
class PHG4CylinderCellReco : public SubsysReco, public PHParameterContainerInterface
{
public:
explicit PHG4CylinderCellReco(const std::string &name = "CYLINDERRECO");
~PHG4CylinderCellReco() override {}
//! module initialization
int InitRun(PHCompositeNode *topNode) override;
//! event processing
int process_event(PHCompositeNode *topNode) override;
int ResetEvent(PHCompositeNode *topNode) override;
void SetDefaultParameters() override;
void Detector(const std::string &d);
void cellsize(const int i, const double sr, const double sz);
void etaphisize(const int i, const double deltaeta, const double deltaphi);
void checkenergy(const int i = 1) { chkenergyconservation = i; }
void OutputDetector(const std::string &d) { outdetector = d; }
double get_timing_window_min(const int i) { return tmin_max[i].first; }
double get_timing_window_max(const int i) { return tmin_max[i].second; }
void set_timing_window(const int detid, const double tmin, const double tmax);
protected:
void set_size(const int i, const double sizeA, const double sizeB);
int CheckEnergy(PHCompositeNode *topNode);
std::map<int, int> binning;
std::map<int, std::pair<double, double> > cell_size; // cell size in phi/z
std::map<int, std::pair<double, double> > zmin_max; // zmin/zmax for each layer for faster lookup
std::map<int, double> phistep;
std::map<int, double> etastep;
std::set<int> implemented_detid;
std::string detector;
std::string outdetector;
std::string hitnodename;
std::string cellnodename;
std::string geonodename;
std::string seggeonodename;
std::map<int, std::pair<int, int> > n_phi_z_bins;
std::map<unsigned long long, PHG4Cell *> cellptmap; // This map holds the hit cells
std::map<unsigned long long, PHG4Cell *>::iterator it;
std::map<int, std::pair<double, double> > tmin_max;
int nbins[2];
int chkenergyconservation;
double sum_energy_before_cuts;
double sum_energy_g4hit;
};
#endif