ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
TestBeam
TBRec
src
TBPlaneTrackingAlgo.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef TBREC_TBPLANETRACKINGALGO_H
6
#define TBREC_TBPLANETRACKINGALGO_H
7
8
#include "
AthenaBaseComps/AthAlgorithm.h
"
9
10
#include "
TBEvent/TBHitPlaneCont.h
"
11
12
#include <utility>
13
#include <vector>
14
19
20
class
TBPlaneTrackingAlgo
:
public
AthAlgorithm
{
21
public
:
22
24
// Contructor & Destructor //
26
TBPlaneTrackingAlgo
(
const
std::string& name, ISvcLocator* pSvcLocator);
27
virtual
~TBPlaneTrackingAlgo
(){};
28
29
// public methods //
30
virtual
StatusCode
initialize
()
override
;
31
virtual
StatusCode
execute
(
const
EventContext& ctx)
override
;
32
virtual
StatusCode
finalize
()
override
;
33
34
private
:
35
void
FillRandomHit
();
36
StatusCode
getnewcalib
();
37
38
39
// Private function members //
40
45
bool
fitPlane
(
const
TBHitPlaneCont
* hitPlaneCont,
double
&a1,
double
&a2,
46
double
&
chi2
, std::vector<double> &residual);
47
51
bool
fitHits
(
const
std::vector<double> & u,
const
std::vector<double> & w,
52
const
std::vector<double> & eu,
// const std::vector<double> & ew,
53
double
&a1,
double
&a2);
54
58
double
getResidual
(
const
double
& u,
const
double
& w,
const
double
&a1,
59
const
double
&a2);
60
64
double
getChi2
(
const
std::vector<double> &v_u,
65
const
std::vector<double> &v_w,
66
const
std::vector<double> &v_eu,
67
// const std::vector<double> &v_ew,
68
const
double
&a1,
const
double
&a2);
69
73
StatusCode
buildHits
();
74
75
//Used to test this algo set to true if you want to debug
76
bool
m_testAlgo
;
77
TBHitPlaneCont
m_hitPlaneCont_u
;
78
TBHitPlaneCont
m_hitPlaneCont_v
;
79
80
// Positions of BPC needed to construct hits
81
std::vector<float>
m_bpc_posZX
,
m_bpc_posZY
,
m_bpc_posX
,
m_bpc_posY
;
82
std::vector<float>
m_bpc_errposZX
,
m_bpc_errposZY
,
m_bpc_errposX
,
m_bpc_errposY
;
83
std::vector<float>
m_bpc_errmeasX
,
m_bpc_errmeasY
;
84
85
std::vector<std::string>
m_bpc_names
;
86
87
// filename containing positions constants
88
std::string
m_calib_filename
;
89
unsigned
int
m_runnumber
;
90
91
};
92
93
#endif
AthAlgorithm.h
TBHitPlaneCont.h
AthAlgorithm::AthAlgorithm
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition
AthAlgorithm.cxx:10
TBHitPlaneCont
Holds a set of TBHitPlane objects.
Definition
TBHitPlaneCont.h:20
TBPlaneTrackingAlgo::m_bpc_posX
std::vector< float > m_bpc_posX
Definition
TBPlaneTrackingAlgo.h:81
TBPlaneTrackingAlgo::m_testAlgo
bool m_testAlgo
Definition
TBPlaneTrackingAlgo.h:76
TBPlaneTrackingAlgo::getChi2
double getChi2(const std::vector< double > &v_u, const std::vector< double > &v_w, const std::vector< double > &v_eu, const double &a1, const double &a2)
Calculates the chi2 += ((u_i - a1 - a2*w_i)/eu)^2.
Definition
TBPlaneTrackingAlgo.cxx:291
TBPlaneTrackingAlgo::m_bpc_errmeasX
std::vector< float > m_bpc_errmeasX
Definition
TBPlaneTrackingAlgo.h:83
TBPlaneTrackingAlgo::buildHits
StatusCode buildHits()
Build HitPlaneCont from BPC.
Definition
TBPlaneTrackingAlgo.cxx:355
TBPlaneTrackingAlgo::initialize
virtual StatusCode initialize() override
Definition
TBPlaneTrackingAlgo.cxx:42
TBPlaneTrackingAlgo::m_bpc_errposY
std::vector< float > m_bpc_errposY
Definition
TBPlaneTrackingAlgo.h:82
TBPlaneTrackingAlgo::getnewcalib
StatusCode getnewcalib()
Definition
TBPlaneTrackingAlgo.cxx:415
TBPlaneTrackingAlgo::m_bpc_posZX
std::vector< float > m_bpc_posZX
Definition
TBPlaneTrackingAlgo.h:81
TBPlaneTrackingAlgo::fitPlane
bool fitPlane(const TBHitPlaneCont *hitPlaneCont, double &a1, double &a2, double &chi2, std::vector< double > &residual)
Fit data to the function u = a1 + a2*w.
Definition
TBPlaneTrackingAlgo.cxx:182
TBPlaneTrackingAlgo::FillRandomHit
void FillRandomHit()
Definition
TBPlaneTrackingAlgo.cxx:314
TBPlaneTrackingAlgo::m_bpc_posY
std::vector< float > m_bpc_posY
Definition
TBPlaneTrackingAlgo.h:81
TBPlaneTrackingAlgo::execute
virtual StatusCode execute(const EventContext &ctx) override
Execute method.
Definition
TBPlaneTrackingAlgo.cxx:49
TBPlaneTrackingAlgo::fitHits
bool fitHits(const std::vector< double > &u, const std::vector< double > &w, const std::vector< double > &eu, double &a1, double &a2)
Fit data to the function u = a1 + a2*w.
Definition
TBPlaneTrackingAlgo.cxx:235
TBPlaneTrackingAlgo::m_bpc_names
std::vector< std::string > m_bpc_names
Definition
TBPlaneTrackingAlgo.h:85
TBPlaneTrackingAlgo::m_bpc_errposZY
std::vector< float > m_bpc_errposZY
Definition
TBPlaneTrackingAlgo.h:82
TBPlaneTrackingAlgo::m_bpc_errposZX
std::vector< float > m_bpc_errposZX
Definition
TBPlaneTrackingAlgo.h:82
TBPlaneTrackingAlgo::m_bpc_errmeasY
std::vector< float > m_bpc_errmeasY
Definition
TBPlaneTrackingAlgo.h:83
TBPlaneTrackingAlgo::m_bpc_posZY
std::vector< float > m_bpc_posZY
Definition
TBPlaneTrackingAlgo.h:81
TBPlaneTrackingAlgo::finalize
virtual StatusCode finalize() override
Definition
TBPlaneTrackingAlgo.cxx:174
TBPlaneTrackingAlgo::m_hitPlaneCont_u
TBHitPlaneCont m_hitPlaneCont_u
Definition
TBPlaneTrackingAlgo.h:77
TBPlaneTrackingAlgo::m_bpc_errposX
std::vector< float > m_bpc_errposX
Definition
TBPlaneTrackingAlgo.h:82
TBPlaneTrackingAlgo::m_calib_filename
std::string m_calib_filename
Definition
TBPlaneTrackingAlgo.h:88
TBPlaneTrackingAlgo::~TBPlaneTrackingAlgo
virtual ~TBPlaneTrackingAlgo()
Definition
TBPlaneTrackingAlgo.h:27
TBPlaneTrackingAlgo::m_hitPlaneCont_v
TBHitPlaneCont m_hitPlaneCont_v
Definition
TBPlaneTrackingAlgo.h:78
TBPlaneTrackingAlgo::getResidual
double getResidual(const double &u, const double &w, const double &a1, const double &a2)
Calculates the residual-> r = (u_i - a1 - a2*w_i).
Definition
TBPlaneTrackingAlgo.cxx:283
TBPlaneTrackingAlgo::TBPlaneTrackingAlgo
TBPlaneTrackingAlgo(const std::string &name, ISvcLocator *pSvcLocator)
Definition
TBPlaneTrackingAlgo.cxx:21
TBPlaneTrackingAlgo::m_runnumber
unsigned int m_runnumber
Definition
TBPlaneTrackingAlgo.h:89
chi2
double chi2(TH1 *h0, TH1 *h1)
Definition
comparitor.cxx:525
Generated on
for ATLAS Offline Software by
1.17.0