File indexing completed on 2025-08-06 08:18:35
0001
0002
0003 #ifndef PHTRUTHSILICONASSOCIATION_H
0004 #define PHTRUTHSILICONASSOCIATION_H
0005
0006 #include <fun4all/SubsysReco.h>
0007 #include <trackbase/TrkrDefs.h>
0008
0009 #include <gsl/gsl_rng.h>
0010 #include <memory>
0011 #include <set>
0012 #include <string>
0013 #include <vector>
0014
0015 class PHCompositeNode;
0016 class TrackSeedContainer;
0017 class TrackSeed;
0018 class SvtxVertexMap;
0019 class TrkrClusterContainer;
0020 class TrkrClusterHitAssoc;
0021 class TrkrHitTruthAssoc;
0022 class PHG4TruthInfoContainer;
0023 class PHG4HitContainer;
0024 class PHG4Particle;
0025 class TrkrClusterCrossingAssoc;
0026 class ActsGeometry;
0027
0028 class PHTruthSiliconAssociation : public SubsysReco
0029 {
0030 public:
0031 PHTruthSiliconAssociation(const std::string &name = "PHTruthSiliconAssociation");
0032
0033 int Init(PHCompositeNode *topNode) override;
0034
0035 int InitRun(PHCompositeNode *topNode) override;
0036
0037 int process_event(PHCompositeNode *topNode) override;
0038
0039
0040 int ResetEvent(PHCompositeNode *topNode) override;
0041
0042
0043 int EndRun(const int runnumber) override;
0044
0045
0046 int End(PHCompositeNode *topNode) override;
0047
0048
0049 int Reset(PHCompositeNode * ) override;
0050
0051 void Print(const std::string &what = "ALL") const override;
0052
0053 private:
0054 int GetNodes(PHCompositeNode *topNode);
0055
0056
0057
0058 unsigned int buildTrackSeed(const std::set<TrkrDefs::cluskey> &clusters, PHG4Particle *g4particle, TrackSeedContainer *container);
0059
0060 std::vector<PHG4Particle *> getG4PrimaryParticle(TrackSeed *track);
0061 std::set<TrkrDefs::cluskey> getSiliconClustersFromParticle(PHG4Particle *g4particle);
0062 std::set<short int> getInttCrossings(TrackSeed *si_track) const;
0063
0064 PHG4TruthInfoContainer *_g4truth_container{nullptr};
0065 PHG4HitContainer *_g4hits_tpc{nullptr};
0066 PHG4HitContainer *_g4hits_mvtx{nullptr};
0067 PHG4HitContainer *_g4hits_intt{nullptr};
0068
0069 TrkrClusterContainer *_cluster_map{nullptr};
0070
0071 TrkrClusterHitAssoc *_cluster_hit_map{nullptr};
0072 TrkrHitTruthAssoc *_hit_truth_map{nullptr};
0073 TrackSeedContainer *_tpc_track_map{nullptr};
0074 TrackSeedContainer *_silicon_track_map{nullptr};
0075 TrackSeedContainer *_svtx_seed_map{nullptr};
0076 TrackSeed *_tracklet{nullptr};
0077
0078 TrkrClusterCrossingAssoc *_cluster_crossing_map{nullptr};
0079 ActsGeometry *_tgeometry{nullptr};
0080
0081
0082 class Deleter
0083 {
0084 public:
0085
0086 void operator()(gsl_rng *rng) const { gsl_rng_free(rng); }
0087 };
0088
0089
0090
0091 std::unique_ptr<gsl_rng, Deleter> m_rng;
0092 };
0093
0094 #endif