Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHTruthSiliconAssociation.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHTruthSiliconAssociation.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef PHTRUTHSILICONASSOCIATION_H
4 #define PHTRUTHSILICONASSOCIATION_H
5 
6 #include <fun4all/SubsysReco.h>
7 #include <trackbase/TrkrDefs.h>
8 
9 #include <string>
10 #include <set>
11 #include <vector>
12 #include <memory>
13 #include <gsl/gsl_rng.h>
14 
15 class PHCompositeNode;
16 class TrackSeedContainer;
17 class TrackSeed;
18 class SvtxVertexMap;
21 class TrkrHitTruthAssoc;
23 class PHG4HitContainer;
24 class PHG4Particle;
26 class ActsGeometry;
27 
29 {
30  public:
31 
32  PHTruthSiliconAssociation(const std::string &name = "PHTruthSiliconAssociation");
33 
34  int Init(PHCompositeNode *topNode) override;
35 
36  int InitRun(PHCompositeNode *topNode) override;
37 
38  int process_event(PHCompositeNode *topNode) override;
39 
41  int ResetEvent(PHCompositeNode *topNode) override;
42 
44  int EndRun(const int runnumber) override;
45 
47  int End(PHCompositeNode *topNode) override;
48 
50  int Reset(PHCompositeNode * /*topNode*/) override;
51 
52  void Print(const std::string &what = "ALL") const override;
53 
54  private:
55 
56  int GetNodes(PHCompositeNode* topNode);
57  // void copySiliconClustersToCorrectedMap( );
58  //void makeSvtxSeedMap();
59 
60  unsigned int buildTrackSeed(std::set<TrkrDefs::cluskey> clusters, PHG4Particle *g4particle, TrackSeedContainer* container);
61 
62  std::vector<PHG4Particle*> getG4PrimaryParticle(TrackSeed *track);
63  std::set<TrkrDefs::cluskey> getSiliconClustersFromParticle(PHG4Particle* g4particle);
64  std::set<short int> getInttCrossings(TrackSeed *si_track) const;
65 
70 
78  TrackSeed *_tracklet{nullptr};
82 
84  class Deleter
85  {
86  public:
88  void operator() (gsl_rng* rng) const { gsl_rng_free(rng); }
89  };
90 
92 
93  std::unique_ptr<gsl_rng, Deleter> m_rng;
94 
95 };
96 
97 #endif // PHTRUTHSILICONASSOCIATION_H