Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHCosmicSeeder.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHCosmicSeeder.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef PHCOSMICSEEDER_H
4 #define PHCOSMICSEEDER_H
5 
6 #include <fun4all/SubsysReco.h>
8 #include <trackbase/TrkrDefs.h>
9 
10 #include <map>
11 #include <string>
12 class PHCompositeNode;
13 class ActsGeometry;
15 class TrackSeedContainer;
16 class TFile;
17 class TNtuple;
18 class PHCosmicSeeder : public SubsysReco
19 {
20  public:
21  using PositionMap = std::map<TrkrDefs::cluskey, Acts::Vector3>;
22  struct seed
23  {
24  float xyslope = std::numeric_limits<float>::quiet_NaN();
25  float xyintercept = std::numeric_limits<float>::quiet_NaN();
26  float rzslope = std::numeric_limits<float>::quiet_NaN();
27  float rzintercept = std::numeric_limits<float>::quiet_NaN();
28  std::set<TrkrDefs::cluskey> ckeys;
29  };
30  using SeedVector = std::vector<seed>;
31  PHCosmicSeeder(const std::string &name = "PHCosmicSeeder");
32 
33  ~PHCosmicSeeder() override;
34  int Init(PHCompositeNode *topNode) override;
35  int InitRun(PHCompositeNode *topNode) override;
36  int process_event(PHCompositeNode *topNode) override;
37  int End(PHCompositeNode *topNode) override;
38  void xyTolerance(float tol) { m_xyTolerance = tol; }
39  void seedAnalysis() { m_analysis = true; }
40 
41  private:
42  int getNodes(PHCompositeNode *topNode);
43  int createNodes(PHCompositeNode *topNode);
44  SeedVector makeSeeds(PositionMap &clusterPositions);
45  SeedVector combineSeeds(SeedVector &initialSeeds, PositionMap &clusterPositions);
47  SeedVector chainSeeds(SeedVector &initialSeeds, PositionMap &clusterPositions);
49 
50  float m_xyTolerance = 2.;
51  float m_rzTolerance = 2.;
52  std::string m_trackMapName = "TpcTrackSeedContainer";
56  TFile *m_outfile = nullptr;
57  TNtuple *m_tup = nullptr;
58  bool m_analysis = false;
59  float m_event = 0;
60 };
61 
62 #endif // PHCOSMICSEEDER_H