ATLAS Offline Software
Loading...
Searching...
No Matches
TileMuonTrackDistance.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5/********************************************************************
6 *
7 * NAME: TileMuonTrackDistance
8 * PACKAGE: offline/TileCalorimeter/TileCosmicAlgs
9 *
10 * AUTHOR : J. Maneira
11 * CREATED: 10-Jul-2006
12 *
13 * PURPOSE: Minuit fit function for TileMuonFitter
14 * Supplies summed distance from cells to track
15 *
16 * Input: Cells
17 * Output: Track parameters
18 *
19 ********************************************************************/
20
21// C++ STL includes
22#include <vector>
23
24// external packages declarations
25#include "Minuit2/FCNBase.h"
26#include "CLHEP/Vector/ThreeVector.h"
27
28namespace ROOT {
29 namespace Minuit2 {
30
40
41 class TileMuonTrackDistance: public FCNBase {
42
43 public:
44
46 TileMuonTrackDistance(const std::vector<double>& X, const std::vector<double>& Y, const std::vector<double>& Z,
47 const std::vector<double>& E)
48 : m_theX(X), m_theY(Y), m_theZ(Z), m_theE(E), m_doWeighted(false), m_meanX(0.0), m_meanY(0.0), m_meanZ(0.0) {
49 }
50
52 }
53
55 virtual double operator()(const std::vector<double>&) const override;
56 virtual double Up() const override {
57 return 1.;
58 }
59
61 void Means();
63 double Distance2SinglePoint(double x, double y, double z, const std::vector<double>& par) const;
65 CLHEP::Hep3Vector ClosestPoint(CLHEP::Hep3Vector *dataPoint, const std::vector<double>& par) const;
66
68 double GetMeanX() {
69 return m_meanX;
70 }
71
72 double GetMeanY() {
73 return m_meanY;
74 }
75
76 double GetMeanZ() {
77 return m_meanZ;
78 }
79
81 void SetWeighted(bool weight) {
82 m_doWeighted = weight;
83 }
84
85 bool GetWeighted() {
86 return m_doWeighted;
87 }
88
89 private:
91 std::vector<double> m_theX;
93 std::vector<double> m_theY;
95 std::vector<double> m_theZ;
97 std::vector<double> m_theE;
98
101
102 double m_meanX;
103 double m_meanY;
104 double m_meanZ;
105
106 };
107
108 }
109}
#define y
#define x
#define z
bool GetWeighted()
Get weight/no-weight flag.
virtual double operator()(const std::vector< double > &) const override
Provides Chi-square in function of parameter vector.
double Distance2SinglePoint(double x, double y, double z, const std::vector< double > &par) const
Returns squared distance from point to track defined by par.
void SetWeighted(bool weight)
Set weight/no-weight flag.
void Means()
Calculates means (weighted or not) of cell positions.
std::vector< double > m_theX
Vector of cell center X coordinates.
std::vector< double > m_theZ
Vector of cell center Z coordinates.
std::vector< double > m_theY
Vector of cell center Y coordinates.
TileMuonTrackDistance(const std::vector< double > &X, const std::vector< double > &Y, const std::vector< double > &Z, const std::vector< double > &E)
Constructor.
CLHEP::Hep3Vector ClosestPoint(CLHEP::Hep3Vector *dataPoint, const std::vector< double > &par) const
Returns point in track defined by par closest to dataPoint.
virtual double Up() const override
std::vector< double > m_theE
Vector of cell energies.
Selection rules: declare transient members.
Definition DataVector.h:580