ATLAS Offline Software
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 
29 namespace ROOT {
30  namespace Minuit2 {
31 
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 
52  virtual ~TileMuonTrackDistance() {
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  }
73  double GetMeanY() {
74  return m_meanY;
75  }
77  double GetMeanZ() {
78  return m_meanZ;
79  }
80 
82  void SetWeighted(bool weight) {
84  }
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 }
ROOT::Minuit2::TileMuonTrackDistance::GetWeighted
bool GetWeighted()
Get weight/no-weight flag.
Definition: TileMuonTrackDistance.h:114
ROOT::Minuit2::TileMuonTrackDistance::GetMeanX
double GetMeanX()
X mean getter.
Definition: TileMuonTrackDistance.h:97
ROOT::Minuit2::TileMuonTrackDistance::m_meanY
double m_meanY
Definition: TileMuonTrackDistance.h:132
ROOT::Minuit2::TileMuonTrackDistance::m_doWeighted
bool m_doWeighted
Weight/no-weight flag.
Definition: TileMuonTrackDistance.h:129
Monitored::Z
@ Z
Definition: HistogramFillerUtils.h:24
ROOT::Minuit2::TileMuonTrackDistance::m_theZ
std::vector< double > m_theZ
Vector of cell center Z coordinates.
Definition: TileMuonTrackDistance.h:124
x
#define x
Monitored::X
@ X
Definition: HistogramFillerUtils.h:24
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:189
ROOT::Minuit2::TileMuonTrackDistance::~TileMuonTrackDistance
virtual ~TileMuonTrackDistance()
Definition: TileMuonTrackDistance.h:80
ROOT::Minuit2::TileMuonTrackDistance::Distance2SinglePoint
double Distance2SinglePoint(double x, double y, double z, const std::vector< double > &par) const
Returns squared distance from point to track defined by par.
Definition: TileMuonTrackDistance.cxx:84
ROOT::Minuit2::TileMuonTrackDistance::SetWeighted
void SetWeighted(bool weight)
Set weight/no-weight flag.
Definition: TileMuonTrackDistance.h:110
ROOT::Minuit2::TileMuonTrackDistance::m_theE
std::vector< double > m_theE
Vector of cell energies.
Definition: TileMuonTrackDistance.h:126
z
#define z
ROOT::Minuit2::TileMuonTrackDistance::TileMuonTrackDistance
TileMuonTrackDistance(const std::vector< double > &X, const std::vector< double > &Y, const std::vector< double > &Z, const std::vector< double > &E)
Constructor.
Definition: TileMuonTrackDistance.h:75
ROOT::Minuit2::TileMuonTrackDistance::GetMeanZ
double GetMeanZ()
Z mean getter.
Definition: TileMuonTrackDistance.h:105
ROOT::Minuit2::TileMuonTrackDistance::Means
void Means()
Calculates means (weighted or not) of cell positions.
Definition: TileMuonTrackDistance.cxx:28
ROOT::Minuit2::TileMuonTrackDistance::m_theY
std::vector< double > m_theY
Vector of cell center Y coordinates.
Definition: TileMuonTrackDistance.h:122
Monitored::Y
@ Y
Definition: HistogramFillerUtils.h:24
ROOT::Minuit2::TileMuonTrackDistance::GetMeanY
double GetMeanY()
Y mean getter.
Definition: TileMuonTrackDistance.h:101
createCoolChannelIdFile.par
par
Definition: createCoolChannelIdFile.py:29
VP1PartSpect::E
@ E
Definition: VP1PartSpectFlags.h:21
ROOT::Minuit2::TileMuonTrackDistance::ClosestPoint
CLHEP::Hep3Vector ClosestPoint(CLHEP::Hep3Vector *dataPoint, const std::vector< double > &par) const
Returns point in track defined by par closest to dataPoint.
Definition: TileMuonTrackDistance.cxx:93
y
#define y
ROOT::Minuit2::TileMuonTrackDistance::m_meanZ
double m_meanZ
Definition: TileMuonTrackDistance.h:133
ROOT::Minuit2::TileMuonTrackDistance::m_meanX
double m_meanX
Definition: TileMuonTrackDistance.h:131
ROOT::Minuit2::TileMuonTrackDistance::Up
virtual double Up() const override
Definition: TileMuonTrackDistance.h:85
ROOT::Minuit2::TileMuonTrackDistance::m_theX
std::vector< double > m_theX
Vector of cell center X coordinates.
Definition: TileMuonTrackDistance.h:120
ROOT::Minuit2::TileMuonTrackDistance::operator()
virtual double operator()(const std::vector< double > &) const override
Provides Chi-square in function of parameter vector.
Definition: TileMuonTrackDistance.cxx:62
ROOT
Selection rules: declare transient members.
Definition: DataVector.h:580