Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 
0004 /*!
0005  *  \file         PHTpcClusterMover.h
0006  *  \brief      Class for moving corrected TPC clusters to the nearest TPC readout layer radius
0007  *  \author  Tony Frawley <afrawley@fsu.edu>
0008  */
0009 
0010 #ifndef PHTPCCLUSTERMOVER_H
0011 #define PHTPCCLUSTERMOVER_H
0012 
0013 #include <trackbase/ActsGeometry.h>
0014 #include <trackbase_historic/ActsTransformations.h>
0015 
0016 #include <tpc/TpcGlobalPositionWrapper.h>
0017 
0018 #include <fun4all/SubsysReco.h>
0019 
0020 #include <string>
0021 #include <vector>
0022 
0023 class PHCompositeNode;
0024 class PHG4TpcCylinderGeomContainer;
0025 class SvtxTrack;
0026 class SvtxTrackMap;
0027 class TrkrCluster;
0028 class TrkrClusterContainer;
0029 
0030 class PHTpcClusterMover : public SubsysReco
0031 {
0032  public:
0033   PHTpcClusterMover(const std::string &name = "PHTpcClusterMover");
0034 
0035   int InitRun(PHCompositeNode *topNode) override;
0036   int process_event(PHCompositeNode *topNode) override;
0037   int End(PHCompositeNode *topNode) override;
0038 
0039  private:
0040   int GetNodes(PHCompositeNode *topNode);
0041   int get_circle_circle_intersection(double target_radius, double R, double X0, double Y0, double xref, double yref, double &x, double &y);
0042 
0043   /// acts transformation object
0044   ActsTransformations _transformer;
0045 
0046   double _z_start{0.0};
0047   double _y_start{0.0};
0048   double _x_start{0.0};
0049 
0050   double _z_proj{0.0};
0051   double _y_proj{0.0};
0052   double _x_proj{0.0};
0053 
0054   // range of TPC layers to use in projection to micromegas
0055 
0056   PHG4TpcCylinderGeomContainer *_tpc_geom_container{nullptr};
0057 
0058   SvtxTrackMap *_track_map{nullptr};
0059   SvtxTrack *_track{nullptr};
0060   TrkrClusterContainer *_cluster_map{nullptr};
0061   TrkrClusterContainer *_corrected_cluster_map{nullptr};
0062   ActsGeometry *_tGeometry{nullptr};
0063 
0064   /// global position wrapper
0065   TpcGlobalPositionWrapper m_globalPositionWrapper;
0066 
0067   double layer_radius[48]{0};
0068   //  double inner_tpc_min_radius = 30.0;
0069   //  double mid_tpc_min_radius = 40.0;
0070   //  double outer_tpc_min_radius = 60.0;
0071   //  double outer_tpc_max_radius = 77.0;
0072 
0073   //  double inner_tpc_spacing = 0.0;
0074   //  double mid_tpc_spacing = 0.0;
0075   //  double outer_tpc_spacing = 0.0;
0076 };
0077 
0078 #endif  // PHTPCCLUSTERMOVER_H