4#ifndef UTPCMMClusterBuilderTool_h
5#define UTPCMMClusterBuilderTool_h
13#include "GaudiKernel/SystemOfUnits.h"
15#include "TFitResult.h"
16#include "TFitResultPtr.h"
17#include "TGraphErrors.h"
19#include "TLinearFitter.h"
20#include "TMatrixDSym.h"
38 virtual StatusCode
getClusters(
const EventContext& ctx,
39 std::vector<Muon::MMPrepData>&& stripsVect,
40 std::vector<std::unique_ptr<Muon::MMPrepData>>& clustersVect)
const override;
43 const std::vector<NSWCalib::CalibratedStrip>& calibratedStrips,
56 Gaudi::Property<double>
m_alphaMin{
this,
"HoughAlphaMin", -90. };
57 Gaudi::Property<double>
m_alphaMax{
this,
"HoughAlphaMax", 0. };
59 Gaudi::Property<double>
m_selectionCut{
this,
"HoughSelectionCut", 1. * Gaudi::Units::mm};
60 Gaudi::Property<double>
m_dMin{
this,
"HoughDMin", 0.};
61 Gaudi::Property<double>
m_dMax {
this,
"HoughDMax", 0.};
63 Gaudi::Property<double>
m_driftRange{
this,
"HoughExpectedDriftRange", 12.*Gaudi::Units::m};
73 StatusCode
runHoughTrafo(
const std::vector<Muon::MMPrepData>& mmPrd, std::vector<double>& xpos, std::vector<int>& flag,
74 std::vector<int>& idx_selected)
const;
75 StatusCode
fillHoughTrafo(
const std::vector<Muon::MMPrepData>& mmPrd, std::vector<double>& xpos, std::vector<int>& flag,
76 std::unique_ptr<TH2D>& h_hough)
const;
79 StatusCode
findAlphaMax(std::unique_ptr<TH2D>& h_hough, std::vector<std::tuple<double, double>>& maxPos)
const;
80 StatusCode
selectTrack(
const std::vector<Muon::MMPrepData>& mmPrd, std::vector<double>& xpos, std::vector<int>& flag,
81 std::vector<std::tuple<double, double>>& tracks, std::vector<int>& idxGoodStrips)
const;
83 StatusCode
transformParameters(
double alpha,
double d,
double dRMS,
double& slope,
double& intercept,
double& interceptRMS)
const;
84 StatusCode
applyCrossTalkCut(std::vector<int>& idxSelected,
const std::vector<MMPrepData>& MMPrdsOfLayer, std::vector<int>& flag,
85 int& nStripsCut)
const;
86 StatusCode
finalFit(
const std::vector<Identifier>& ids,
const std::vector<float>& stripsPos,
const std::vector<float>& driftDists,
87 const std::vector<
AmgVector(2)>& driftDistErrors,
double& x0,
double& sigmaX0,
double& fitAngle,
88 double& chiSqProb)
const;
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.