forked from sPHENIX-Collaboration/coresoftware
/
PHG4TpcPadBaselineShift.h
81 lines (61 loc) · 2.01 KB
/
PHG4TpcPadBaselineShift.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
74
75
76
77
78
79
80
81
// Tell emacs that this is a C++ source
// -*- C++ -*-.
#ifndef G4TPC_PHG4TpcPadBaselineShift_H
#define G4TPC_PHG4TpcPadBaselineShift_H
#include <fun4all/SubsysReco.h>
#include <climits>
#include <cmath>
#include <string>
#include <utility> // for pair
class PHCompositeNode;
class TTree;
class TFile;
class TrkrHitSetContainer;
class TrkrClusterContainer;
class TrkrClusterHitAssoc;
class PHG4CylinderCellGeom;
struct ActsSurfaceMaps;
struct ActsTrackingGeometry;
class PHG4TpcPadBaselineShift : public SubsysReco
{
public:
PHG4TpcPadBaselineShift(const std::string &name = "PHG4TpcPadBaselineShift");
virtual ~PHG4TpcPadBaselineShift();
int Init(PHCompositeNode *topNode) override;
int InitRun(PHCompositeNode *topNode) override;
int process_event(PHCompositeNode *topNode) override;
//int ResetEvent(PHCompositeNode *topNode) override;
//int EndRun(const int runnumber) override;
int End(PHCompositeNode *topNode) override;
//int Reset(PHCompositeNode * /*topNode*/) override;
//void Print(const std::string &what = "ALL") const override;
void setScale(float CScale);
void setFileName(const std::string &filename);
void writeTree(int f_writeTree);
private:
bool is_in_sector_boundary(int phibin, int sector, PHG4CylinderCellGeom *layergeom);
float _hit_z = NAN;
float _hit_r = NAN;
float _hit_phi = NAN;
float _hit_e = NAN;
int _hit_adc = INT_MIN;
int _hit_adc_bls = INT_MIN;
int _hit_layer = INT_MIN;
int _hit_sector = INT_MIN;
TrkrHitSetContainer *m_hits = nullptr;
TrkrClusterContainer *m_clusterlist = nullptr;
TrkrClusterHitAssoc *m_clusterhitassoc = nullptr;
ActsSurfaceMaps *m_surfMaps = nullptr;
ActsTrackingGeometry *m_tGeometry = nullptr;
// bool do_hit_assoc = true;
// double pedestal = 74.4;
int _writeTree = 0;
double SectorFiducialCut = 0.5;
// int NSearch = 2;
int NZBinsMax = 0;
float _CScale = 1.;
TFile *outfile = nullptr;
std::string _filename = "./hitsBLS.root";
TTree *_rawHits = nullptr;
};
#endif // PHG4TpcPadBaselineShift_H