CMS 3D CMS Logo

TracksterLinkingbySkeletons.h
Go to the documentation of this file.
1 #ifndef RecoHGCal_TICL_TracksterLinkingAlgoBySkeletons_H
2 #define RecoHGCal_TICL_TracksterLinkingAlgoBySkeletons_H
3 
20 #include <array>
21 
22 namespace ticl {
23 
25  public:
28  cms::Ort::ONNXRuntime const* onnxRuntime = nullptr);
29 
31 
32  void linkTracksters(const Inputs& input,
33  std::vector<Trackster>& resultTracksters,
34  std::vector<std::vector<unsigned int>>& linkedResultTracksters,
35  std::vector<std::vector<unsigned int>>& linkedTracksterIdToInputTracksterId) override;
36 
37  std::array<ticl::Vector, 3> findSkeletonNodes(const ticl::Trackster& trackster,
38  float lower_percentage,
39  float upper_percentage,
40  const std::vector<reco::CaloCluster>& layerClusters,
41  const hgcal::RecHitTools& rhtools);
42 
43  bool areCompatible(const ticl::Trackster& myTrackster,
44  const ticl::Trackster& otherTrackster,
45  const std::array<ticl::Vector, 3>& mySkeleton,
46  const std::array<ticl::Vector, 3>& otherSkeleton);
47 
48  void initialize(const HGCalDDDConstants* hgcons,
49  const hgcal::RecHitTools rhtools,
50  const edm::ESHandle<MagneticField> bfieldH,
51  const edm::ESHandle<Propagator> propH) override;
52 
54  iDesc.add<double>("track_time_quality_threshold", 0.5);
55  iDesc.add<double>("wind", 0.036);
56  iDesc.add<unsigned int>("min_num_lcs", 7);
57  iDesc.add<double>("min_trackster_energy", 10.);
58  iDesc.add<double>("pca_quality_th", 0.85);
59  iDesc.add<double>("dot_prod_th", 0.97);
60  iDesc.add<std::vector<double>>("max_distance_projective_sqr", {60., 60.});
61  iDesc.add<std::vector<double>>("min_distance_z", {30., 30.});
62  iDesc.add<std::vector<double>>("max_distance_projective_sqr_closest_points", {60., 60.});
63  iDesc.add<std::vector<double>>("max_z_distance_closest_points", {35., 35.});
64  iDesc.add<std::vector<double>>("cylinder_radius_sqr", {9., 9.});
66  }
67 
68  private:
70 
71  void buildLayers();
72 
73  void dumpLinksFound(std::vector<std::vector<unsigned>>& resultCollection, const char* label) const;
74 
76  float del_;
77  unsigned int min_num_lcs_;
80  float dot_prod_th_;
81  std::vector<double> max_distance_projective_sqr_;
82  std::vector<double> min_distance_z_;
84  std::vector<double> max_z_distance_closest_points_;
85  std::vector<double> cylinder_radius_sqr_;
86 
88 
89  std::unique_ptr<GeomDet> firstDisk_[2];
90  std::unique_ptr<GeomDet> interfaceDisk_[2];
91 
93 
96  };
97 
98 } // namespace ticl
99 
100 #endif
math::XYZVectorF Vector
Definition: Trackster.h:21
edm::ESHandle< MagneticField > bfield_
void linkTracksters(const Inputs &input, std::vector< Trackster > &resultTracksters, std::vector< std::vector< unsigned int >> &linkedResultTracksters, std::vector< std::vector< unsigned int >> &linkedTracksterIdToInputTracksterId) override
bool areCompatible(const ticl::Trackster &myTrackster, const ticl::Trackster &otherTrackster, const std::array< ticl::Vector, 3 > &mySkeleton, const std::array< ticl::Vector, 3 > &otherSkeleton)
static std::string const input
Definition: EdmProvDump.cc:50
char const * label
TracksterLinkingbySkeletons(const edm::ParameterSet &conf, edm::ConsumesCollector iC, cms::Ort::ONNXRuntime const *onnxRuntime=nullptr)
std::array< ticl::Vector, 3 > findSkeletonNodes(const ticl::Trackster &trackster, float lower_percentage, float upper_percentage, const std::vector< reco::CaloCluster > &layerClusters, const hgcal::RecHitTools &rhtools)
std::unique_ptr< GeomDet > interfaceDisk_[2]
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::vector< double > max_distance_projective_sqr_closest_points_
static void fillPSetDescription(edm::ParameterSetDescription &desc)
std::unique_ptr< GeomDet > firstDisk_[2]
void initialize(const HGCalDDDConstants *hgcons, const hgcal::RecHitTools rhtools, const edm::ESHandle< MagneticField > bfieldH, const edm::ESHandle< Propagator > propH) override
Definition: Common.h:10
void dumpLinksFound(std::vector< std::vector< unsigned >> &resultCollection, const char *label) const
static void fillPSetDescription(edm::ParameterSetDescription &iDesc)