Back to home page

sPhenix code displayed by LXR

 
 

    


Warning, /coresoftware/offline/packages/trackreco/PHHybridSeeding.h.outdated is written in an unsupported language. File is not indexed.

0001 #ifndef TRACKRECO_PHHYBRIDSEEDING_H
0002 #define TRACKRECO_PHHYBRIDSEEDING_H
0003 
0004 /*!
0005  *  \file PHHybridSeeding.cc
0006  *  \brief Track Seeding using STAR "CA" algorithm and ALICE simplified Kalman filter
0007  *  \detail 
0008  *  \author Michael Peters
0009  */
0010 //begin
0011 
0012 #include "PHTrackSeeding.h"      // for PHTrackSeeding
0013 #include "ALICEKF.h"
0014 
0015 #include <trackbase/TrkrDefs.h>  // for cluskey
0016 #include <trackbase/TrkrCluster.h>
0017 #include <trackbase_historic/SvtxTrack_v3.h>
0018 
0019 #include <Eigen/Core>
0020 #include <Eigen/Dense>
0021 
0022 #include <cmath>     // for M_PI
0023 #include <map>       // for map
0024 #include <cstdint>  // for uint64_t
0025 #include <string>    // for string
0026 #include <utility>   // for pair
0027 #include <vector>    // for vector
0028 #include <memory>
0029 
0030  
0031 class PHCompositeNode;  // lines 196-196
0032 class SvtxClusterMap;   // lines 202-202
0033 class SvtxHitMap;       // lines 211-211
0034 class SvtxTrackMap;     // lines 204-204
0035 class SvtxVertex;
0036 class SvtxVertexMap;    // lines 206-206
0037 
0038 //end
0039 
0040 class PHHybridSeeding : public PHTrackSeeding
0041 {
0042  public:
0043   PHHybridSeeding(
0044       const std::string &name = "PHHybridSeeding",
0045       double max_sin_phi = 1000.,
0046       double fieldDir = 1,
0047       double search_radius1 = 3.,
0048       double search_angle1 = M_PI/8.,
0049       size_t min_track_size1 = 10,
0050       double search_radius2 = 6.,
0051       double search_angle2 = M_PI/8.,
0052       size_t min_track_size2 = 5,
0053       size_t nthreads = 1
0054       );
0055 
0056   ~PHHybridSeeding() override
0057   {
0058   }
0059   
0060   void set_field_dir(const double rescale)
0061   {
0062 
0063     if(rescale > 0)
0064       _fieldDir = -1;
0065     else
0066     {
0067       _fieldDir = 1;
0068       //_Bz = -1*_Bz;
0069     }
0070   
0071   }
0072   void setSearchRadius(double r1, double r2) {_search_radius1 = r1; _search_radius2 = r2;}
0073   void setSearchAngle(double a1, double a2) {_search_angle1 = a1; _search_angle2 = a2;}
0074   void setMinTrackSize(size_t n1, size_t n2) {_min_track_size1 = n1; _min_track_size2 = n2;}
0075   void setNThreads(size_t n) {_nthreads = n;} 
0076   void setMinFitTrackSize(size_t s) {_min_fit_track_size = s;}
0077 
0078  protected:
0079   int Setup(PHCompositeNode *topNode) override;
0080   int Process(PHCompositeNode *topNode) override;
0081   int InitializeGeometry(PHCompositeNode *topNode);
0082   int End() override;
0083 
0084  private:
0085   /// fetch node pointers
0086 
0087   // node pointers
0088   //nodes to get norm vector
0089 
0090   std::vector<double> _radii_all;
0091 
0092   std::vector<double> _vertex_ids;
0093   std::vector<double> _vertex_x;
0094   std::vector<double> _vertex_y;
0095   std::vector<double> _vertex_z;
0096   std::vector<double> _vertex_xerr;
0097   std::vector<double> _vertex_yerr;
0098   std::vector<double> _vertex_zerr;
0099 
0100   std::map<int, unsigned int> _layer_ilayer_map_all;
0101   std::map<int, unsigned int> _layer_ilayer_map;
0102 
0103   void publishSeeds(std::vector<SvtxTrack_v3> seeds);
0104 
0105   double _max_sin_phi;
0106   double _fieldDir;
0107   double _search_radius1;
0108   double _search_angle1;
0109   size_t _min_track_size1;
0110   double _search_radius2;
0111   double _search_angle2;
0112   size_t _min_track_size2;
0113   size_t _nthreads;
0114   size_t _min_fit_track_size = 5;
0115   std::shared_ptr<ALICEKF> fitter;
0116 };
0117 
0118 #endif