Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHTruthVertexing.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHTruthVertexing.h
1 
7 #ifndef TRACKRECO_PHTRUTHVERTEXING_H
8 #define TRACKRECO_PHTRUTHVERTEXING_H
9 
10 
11 // rootcint barfs with this header so we need to hide it
12 #include <gsl/gsl_rng.h>
13 
14 #include <string> // for string
15 #include <vector>
16 
17 #include "PHInitVertexing.h"
18 
19 // forward declarations
20 class PHCompositeNode;
22 
27 
29 {
30  public:
31  PHTruthVertexing(const std::string &name = "PHTruthVertexing");
32  ~PHTruthVertexing() override;
33 
34  void set_vertex_error(const float &x_err, const float &y_err, const float &z_err)
35  {
36  _vertex_error.resize(3);
37  _vertex_error[0] = x_err;
38  _vertex_error[1] = y_err;
39  _vertex_error[2] = z_err;
40  }
41 
42  const std::vector<float> &get_vertex_error() const
43  {
44  return _vertex_error;
45  }
47  {
49  }
50  void set_embed_only(bool embed_only)
51  {
52  _embed_only = embed_only;
53  }
55  { _track_map_name = name; }
56  protected:
57 
58  int Setup(PHCompositeNode *topNode) override;
59 
60  int Process(PHCompositeNode *topNode) override;
61 
62  int End(PHCompositeNode * /*topNode*/) override;
63 
64  private:
66  int GetNodes(PHCompositeNode *topNode);
67 
69 
71 
73  std::vector<float> _vertex_error;
74 
76  bool _associate_tracks = false;
77  std::string _track_map_name = "SvtxTrackMap";
79 };
80 
81 #endif