Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:18:25

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef PHACTSKDTREESEEDING_H
0004 #define PHACTSKDTREESEEDING_H
0005 
0006 #include <trackbase/SpacePoint.h>
0007 
0008 #include <fun4all/SubsysReco.h>
0009 
0010 #include <trackbase/ActsGeometry.h>
0011 #include <trackbase/ClusterErrorPara.h>
0012 
0013 #include <Acts/Seeding/SeedFilterConfig.hpp>
0014 #include <Acts/Seeding/SeedFinderConfig.hpp>
0015 #include <Acts/Seeding/SeedFinderOrthogonalConfig.hpp>
0016 
0017 #include <string>
0018 
0019 class PHCompositeNode;
0020 class TrkrClusterIterationMapv1;
0021 class ActsGeometry;
0022 class TrkrClusterContainer;
0023 class TrackSeedContainer;
0024 class TrkrCluster;
0025 class PHG4CylinderGeomContainer;
0026 class TrackSeed;
0027 
0028 class PHActsKDTreeSeeding : public SubsysReco
0029 {
0030  public:
0031   PHActsKDTreeSeeding(const std::string& name = "PHActsKDTreeSeeding");
0032 
0033   ~PHActsKDTreeSeeding() override;
0034 
0035   int Init(PHCompositeNode* topNode) override;
0036   int InitRun(PHCompositeNode* topNode) override;
0037   int process_event(PHCompositeNode* topNode) override;
0038   int End(PHCompositeNode* topNode) override;
0039 
0040   void useTruthClusters(bool truth) { m_useTruthClusters = truth; }
0041 
0042  private:
0043   void configureSeedFinder();
0044   int getNodes(PHCompositeNode* topNode);
0045   int createNodes(PHCompositeNode* topNode);
0046   SeedContainer runSeeder();
0047   void fillTrackSeedContainer(SeedContainer& seeds);
0048   std::vector<const SpacePoint*> getMvtxSpacePoints();
0049   SpacePointPtr makeSpacePoint(const Surface& surf,
0050                                const TrkrDefs::cluskey key,
0051                                TrkrCluster* clus);
0052 
0053   /// Projects circle fit to INTT radii to find possible INTT clusters
0054   /// belonging to MVTX track stub
0055   void findInttMatches(std::map<TrkrDefs::cluskey, Acts::Vector3>& clusters,
0056                        TrackSeed& seed);
0057 
0058   void matchInttClusters(std::map<TrkrDefs::cluskey, Acts::Vector3>& clusters,
0059                          const double xProj[],
0060                          const double yProj[],
0061                          const double zProj[]);
0062 
0063   Acts::SeedFilterConfig m_seedFilterConfig;
0064   Acts::SeedFinderOrthogonalConfig<SpacePoint> m_seedFinderConfig;
0065   Acts::SeedFinderOptions m_seedFinderOptions;
0066 
0067   /// configured to seed in the MVTX using the middle layer
0068   /// as the seed anchor
0069   /// Defines volume to search for seeds in
0070   float m_rMax = 200. * Acts::UnitConstants::mm;
0071   float m_deltaRMinTopSP = 1. * Acts::UnitConstants::mm;
0072   float m_deltaRMaxTopSP = 20. * Acts::UnitConstants::mm;
0073   float m_deltaRMinBottomSP = 1. * Acts::UnitConstants::mm;
0074   float m_deltaRMaxBottomSP = 20. * Acts::UnitConstants::mm;
0075   float m_collisionRegionMin = -300 * Acts::UnitConstants::mm;
0076   float m_collisionRegionMax = 300 * Acts::UnitConstants::mm;
0077   float m_zMin = -300. * Acts::UnitConstants::mm;
0078   float m_zMax = 300. * Acts::UnitConstants::mm;
0079 
0080   /// max number of seeds a single middle sp can belong to
0081   float m_maxSeedsPerSpM = 1;
0082   float m_cotThetaMax = 2.9;
0083   float m_sigmaScattering = 5;
0084   float m_radLengthPerSeed = 0.05;
0085   float m_minPt = 100.;        // MeV
0086   float m_bFieldInZ = 0.0014;  // kTesla
0087   float m_beamPosX = 0;
0088   float m_beamPosY = 0;
0089 
0090   /// Maximum transverse PCA allowed
0091   float m_impactMax = 20. * Acts::UnitConstants::mm;
0092 
0093   /// Middle spacepoint must fall between these two radii
0094   float m_rMinMiddle = 28. * Acts::UnitConstants::mm;
0095   float m_rMaxMiddle = 36. * Acts::UnitConstants::mm;
0096 
0097   int m_nIteration = 0;
0098   std::string m_trackMapName = "SiliconTrackSeedContainer";
0099   bool m_useTruthClusters = false;
0100 
0101   ClusterErrorPara m_clusErrPara;
0102   float m_uncfactor = 3.175;
0103   const static int m_nInttLayers = 4;
0104   float m_nInttLayerRadii[m_nInttLayers] = {0};
0105   float m_rPhiSearchWin = 0.1;
0106 
0107   PHG4CylinderGeomContainer* m_geomContainerIntt = nullptr;
0108   TrkrClusterIterationMapv1* m_iterationMap = nullptr;
0109   ActsGeometry* m_tGeometry = nullptr;
0110   TrkrClusterContainer* m_clusterMap = nullptr;
0111   TrackSeedContainer* m_seedContainer = nullptr;
0112 };
0113 
0114 #endif  // PHACTSKDTREESEEDING_H