ATLAS Offline Software
Loading...
Searching...
No Matches
TileMuonTrackDistance.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 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 "RVersion.h"
27#include "CLHEP/Vector/ThreeVector.h"
28
29namespace ROOT {
30 namespace Minuit2 {
31
41
42 class TileMuonTrackDistance: public FCNBase {
43
44 public:
45
47 TileMuonTrackDistance(const std::vector<double>& X, const std::vector<double>& Y, const std::vector<double>& Z,
48 const std::vector<double>& E)
49 : 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) {
50 }
51
53 }
54
56 virtual double operator()(const std::vector<double>&) const override;
57 virtual double Up() const override {
58 return 1.;
59 }
60
62 void Means();
64 double Distance2SinglePoint(double x, double y, double z, const std::vector<double>& par) const;
66 CLHEP::Hep3Vector ClosestPoint(CLHEP::Hep3Vector *dataPoint, const std::vector<double>& par) const;
67
69 double GetMeanX() {
70 return m_meanX;
71 }
72
73 double GetMeanY() {
74 return m_meanY;
75 }
76
77 double GetMeanZ() {
78 return m_meanZ;
79 }
80
82 void SetWeighted(bool weight) {
83 m_doWeighted = weight;
84 }
85
86 bool GetWeighted() {
87 return m_doWeighted;
88 }
89
90 private:
92 std::vector<double> m_theX;
94 std::vector<double> m_theY;
96 std::vector<double> m_theZ;
98 std::vector<double> m_theE;
99
102
103 double m_meanX;
104 double m_meanY;
105 double m_meanZ;
106
107 };
108
109 }
110}
#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:581