Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
InttVertexFinder.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file InttVertexFinder.h
1 #ifndef INTT_INTTVERTEXFINDER_H
2 #define INTT_INTTVERTEXFINDER_H
3 
4 #include <fun4all/SubsysReco.h>
5 
6 #include <string>
7 
8 class PHCompositeNode;
9 class ActsGeometry;
11 class TH1;
12 class InttVertexMap;
13 
15 {
16  public:
17  InttVertexFinder(const std::string &name = "InttVertexFinder");
18  ~InttVertexFinder() override;
19 
21  int Init(PHCompositeNode * /*topNode*/) override;
22 
24  int InitRun(PHCompositeNode *topNode) override;
25 
27  int process_event(PHCompositeNode *topNode) override;
28 
30  int End(PHCompositeNode * /*topNode*/) override { return 0; }
31 
32  void setBeamCenter(double x = 0, double y = 0)
33  {
34  xbeam_ = x;
35  ybeam_ = y;
36  }
37 
38  private:
39  int createNodes(PHCompositeNode *topNode);
40  double calculateZvertex(double *zcenter = nullptr, double *zrms = nullptr, double *zmean = nullptr);
41 
42  private:
43  // node tree storage pointers
47 
48  TH1 *h_zvtxseed_ = nullptr;
49 
50  // settings
51  //
52  double xbeam_ = 0.;
53  double ybeam_ = 0.;
54 };
55 
56 #endif