Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4TpcPadBaselineShift.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHG4TpcPadBaselineShift.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef G4TPC_PHG4TpcPadBaselineShift_H
4 #define G4TPC_PHG4TpcPadBaselineShift_H
5 
6 #include <fun4all/SubsysReco.h>
7 
8 #include <climits>
9 #include <cmath>
10 #include <string>
11 
12 class PHCompositeNode;
13 
14 class TTree;
15 class TFile;
16 
21 
22 struct ActsSurfaceMaps;
24 
26 {
27  public:
28  PHG4TpcPadBaselineShift(const std::string &name = "PHG4TpcPadBaselineShift");
29 
30  virtual ~PHG4TpcPadBaselineShift();
31  int Init(PHCompositeNode *topNode) override;
32  int InitRun(PHCompositeNode *topNode) override;
33  int process_event(PHCompositeNode *topNode) override;
34  //int ResetEvent(PHCompositeNode *topNode) override;
35 
36  //int EndRun(const int runnumber) override;
37 
38  int End(PHCompositeNode *topNode) override;
39 
40  //int Reset(PHCompositeNode * /*topNode*/) override;
41 
42  //void Print(const std::string &what = "ALL") const override;
43 
44  void setScale(float CScale);
45  void setFileName(const std::string &filename);
46  void writeTree(int f_writeTree);
47  void set_drift_velocity(float vd) {_drift_velocity = vd;}
48 
49  private:
50  bool is_in_sector_boundary(int phibin, int sector, PHG4TpcCylinderGeom *layergeom);
51  float _hit_z = NAN;
52  float _hit_r = NAN;
53  float _hit_phi = NAN;
54  float _hit_e = NAN;
55  int _hit_adc = INT_MIN;
56  int _hit_adc_bls = INT_MIN;
57  int _hit_layer = INT_MIN;
58  int _hit_sector = INT_MIN;
59 
65 
66  // bool do_hit_assoc = true;
67  // double pedestal = 74.4;
68  int _writeTree = 0;
69  double SectorFiducialCut = 0.5;
70 
71  // int NSearch = 2;
72  int NZBinsMax = 0;
73  float _CScale = 1.;
74 
75  double AdcClockPeriod = 53.0; // ns
76  unsigned int MaxTBins = 498;
77  float _drift_velocity = 8.0e-03;
78 
79  TFile *outfile = nullptr;
80  std::string _filename = "./hitsBLS.root";
81 
82  TTree *_rawHits = nullptr;
83 };
84 
85 #endif // PHG4TpcPadBaselineShift_H