File indexing completed on 2025-12-17 09:21:09
0001
0002
0003
0004
0005
0006
0007 #ifndef TRACKRECO_PRELIMDISTORTIONCORRECTIONAUAU_H
0008 #define TRACKRECO_PRELIMDISTORTIONCORRECTIONAUAU_H
0009
0010 #include "ALICEKF.h"
0011 #include "nanoflann.hpp"
0012
0013
0014 #include <fun4all/SubsysReco.h>
0015 #include <tpc/TpcDistortionCorrection.h>
0016 #include <trackbase/TrkrDefs.h>
0017
0018 #include <Eigen/Core>
0019
0020
0021 #include <memory>
0022 #include <string>
0023 #include <vector>
0024
0025 class ActsGeometry;
0026 class PHCompositeNode;
0027 class TpcDistortionCorrectionContainer;
0028 class TrkrClusterContainer;
0029 class SvtxTrackMap;
0030 class TrackSeedContainer;
0031 class TrackSeed_v2;
0032
0033 class PrelimDistortionCorrectionAuAu : public SubsysReco
0034 {
0035 public:
0036
0037
0038 PrelimDistortionCorrectionAuAu(const std::string &name = "PrelimDistortionCorrectionAuAu");
0039
0040
0041 ~PrelimDistortionCorrectionAuAu() override = default;
0042
0043 int InitRun(PHCompositeNode *topNode) override;
0044 int process_event(PHCompositeNode *topNode) override;
0045 int End(PHCompositeNode *topNode) override;
0046
0047
0048 void set_field_dir(double)
0049 {}
0050
0051
0052 void useConstBField(bool)
0053 {}
0054
0055
0056 void setConstBField(float)
0057 {}
0058
0059 void useFixedClusterError(bool opt){_use_fixed_clus_err = opt;}
0060 void setFixedClusterError(int i, double val){_fixed_clus_err.at(i) = val;}
0061 void use_truth_clusters(bool truth) { _use_truth_clusters = truth; }
0062 void set_pp_mode(bool mode) {_pp_mode = mode;}
0063
0064 void setNeonFraction(double frac) { Ne_frac = frac; };
0065 void setArgonFraction(double frac) { Ar_frac = frac; };
0066 void setCF4Fraction(double frac) { CF4_frac = frac; };
0067 void setNitrogenFraction(double frac) { N2_frac = frac; };
0068 void setIsobutaneFraction(double frac) { isobutane_frac = frac; };
0069
0070 private:
0071
0072
0073 using PositionMap = std::map<TrkrDefs::cluskey, Acts::Vector3>;
0074 void publishSeeds(std::vector<TrackSeed_v2>& seeds, const PositionMap &positions) const;
0075
0076
0077 TpcDistortionCorrection m_distortionCorrection;
0078
0079 bool _use_truth_clusters = false;
0080
0081
0082 int get_nodes(PHCompositeNode *topNode);
0083
0084 size_t _min_clusters_per_track = 3;
0085 double _max_sin_phi = 1.;
0086 bool _pp_mode = false;
0087
0088 TrkrClusterContainer *_cluster_map = nullptr;
0089
0090 TrackSeedContainer *_track_map = nullptr;
0091
0092
0093 ActsGeometry *_tgeometry = nullptr;
0094
0095
0096
0097
0098 TpcDistortionCorrectionContainer *m_dcc_module_edge{nullptr};
0099 TpcDistortionCorrectionContainer *m_dcc_static{nullptr};
0100 TpcDistortionCorrectionContainer *m_dcc_average{nullptr};
0101
0102
0103 std::unique_ptr<ALICEKF> fitter;
0104
0105 bool _use_fixed_clus_err = false;
0106 std::array<double,3> _fixed_clus_err = {.1,.1,.1};
0107
0108 double Ne_frac = 0.00;
0109 double Ar_frac = 0.75;
0110 double CF4_frac = 0.20;
0111 double N2_frac = 0.00;
0112 double isobutane_frac = 0.05;
0113
0114 };
0115
0116 #endif