Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHTruthClustering.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHTruthClustering.h
1 
7 #ifndef TRACKRECO_PHTRUTHCLUSTERING_H
8 #define TRACKRECO_PHTRUTHCLUSTERING_H
9 
10 #include <fun4all/SubsysReco.h>
11 #include <trackbase/TrkrDefs.h>
12 
13 // rootcint barfs with this header so we need to hide it
14 #include <gsl/gsl_rng.h>
15 
16 class PHG4Hit;
17 class PHG4HitContainer;
18 class PHG4Particle;
22 class TrkrCluster;
24 class ActsGeometry;
25 
26 #include <string> // for string
27 #include <vector>
28 #include <map>
29 #include <set>
30 #include <memory>
31 
32 // forward declarations
33 class PHCompositeNode;
35 
37 {
38 public:
39  PHTruthClustering(const std::string &name = "PHTruthClustering");
40  ~PHTruthClustering() override;
41 
42  int InitRun(PHCompositeNode *topNode) override;
43  int process_event(PHCompositeNode *topNode) override;
44  int End(PHCompositeNode *topNode) override;
45 
47 
48 private:
50 int GetNodes(PHCompositeNode *topNode);
51 
52 std::map<TrkrDefs::cluskey, TrkrCluster* > all_truth_clusters(PHG4Particle* particle);
53 std::set<PHG4Hit*> all_truth_hits(PHG4Particle* particle);
54 
55  void LayerClusterG4Hits(std::set<PHG4Hit*> truth_hits, std::vector<PHG4Hit*> &contributing_hits, std::vector<double> &contributing_hits_energy, std::vector<std::vector<double>> &contributing_hits_entry, std::vector<std::vector<double>> &contributing_hits_exit, float layer, float &x, float &y, float &z, float &t, float &e);
56 
57  void G4ClusterSize(TrkrDefs::cluskey& ckey, unsigned int layer, std::vector<std::vector<double>> contributing_hits_entry,std::vector<std::vector<double>> contributing_hits_exit, float &g4phisize, float &g4zsize);
58 
59  float line_circle_intersection(float x[], float y[], float z[], float radius);
60  unsigned int getTpcSector(double x, double y);
61 
62  unsigned int getAdcValue(double gedep);
63 
64  int iclus = 0;
65 
68 
73 
79  const unsigned int _nlayers_maps = 3;
80  const unsigned int _nlayers_intt = 4;
81  const unsigned int _nlayers_tpc = 48;
82  const unsigned int _nlayers_mms = 2;
83 
84  double clus_err_rphi[57] = {0};
85  double clus_err_z[57] = {0};
86 
87  double mvtx_clus_err_rphi = 5e-04;
88  double mvtx_clus_err_z = 5e-04;
89  double intt_clus_err_rphi = 25e-04;
90  double intt_clus_err_z = 1.0;
91  double tpc_inner_clus_err_rphi = 200e-04;
92  double tpc_inner_clus_err_z = 750e-04;
93  double tpc_outer_clus_err_rphi = 150e-04;
94  double tpc_outer_clus_err_z = 500e-04;
95  double mms_layer55_clus_err_rphi = 100e-04;
96  double mms_layer55_clus_err_z = 25.0;
98  double mms_layer56_clus_err_z = 200e-04;
99 
101 
102 };
103 
104 #endif