Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHTrackClusterAssociator.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHTrackClusterAssociator.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef PHACTSTRACKCLUSTERASSOCIATOR_H
4 #define PHACTSTRACKCLUSTERASSOCIATOR_H
5 
6 #include <fun4all/SubsysReco.h>
8 
9 #include <map>
10 #include <string>
11 #include <vector>
12 
13 class PHCompositeNode;
14 class SvtxTrackMap;
15 class SvtxVertexMap;
16 class SvtxVertex;
17 class RawCluster;
19 class TowerInfoContainer;
22 
24 {
25  public:
26  PHTrackClusterAssociator(const std::string& name = "PHTrackClusterAssociator");
27 
28  ~PHTrackClusterAssociator() override;
29 
30  int InitRun(PHCompositeNode* topNode) override;
31  int process_event(PHCompositeNode* topNode) override;
32  int ResetEvent(PHCompositeNode* topNode) override;
33  int End(PHCompositeNode* topNode) override;
34 
35  void setCaloRadius(const std::string& name, double rad)
36  {
37  m_caloRadii.insert(std::make_pair(name, rad));
38  }
39 
40  private:
41  int getNodes(PHCompositeNode* topNode);
42  int createNodes(PHCompositeNode* topNode);
43  int getCaloNodes(PHCompositeNode* topNode, const int caloLayer);
44  int matchTracks(PHCompositeNode* topNode, const int caloLayer);
45  RawCluster* getCluster(double phi, double eta, SvtxVertex* vertex);
48 
51  const static int m_nCaloLayers = 3;
52  std::vector<std::string> m_caloNames;
55  std::map<std::string, float> m_caloRadii;
56 
60 
62 
63  bool m_useCemcPosRecalib = false;
64  bool m_calosAvailable = true;
65 };
66 
67 #endif // PHACTSTRACKCLUSTERASSOCIATOR_H