ATLAS Offline Software
CscBipolarStripFitter.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 CscBipolarStripFitter_H
6 #define CscBipolarStripFitter_H
7 // K. Nikolopoulos
9 // V. Chernyatin and M. Schernau
10 // Oct 2007
11 //
12 // CSC Strip fitter using the bipolar waveform of the pulse
13 //
14 //
15 #include <vector>
16 
19 #include "GaudiKernel/ToolHandle.h"
20 
21 class ICscCalibTool;
22 class CscIdHelper;
23 namespace Muon {
24  class CscStripPrepData;
25 }
26 
27 class CscBipolarStripFitter : virtual public ICscStripFitter, public AthAlgTool {
28 public: // Ctors and dtor.
29  // Constructor.
30  CscBipolarStripFitter(const std::string &, const std::string &, const IInterface *);
31 
32  // Destructor.
34 
35 public: // AlgTool methods
36  // Initialization.
37  StatusCode initialize() override;
38 
39 public: // Interface methods
40  // Tell compiler not to hide other fit methods.
42 
43  // Fit a list of sample charges using the calibration tool.
44  // If that fit fails, the peak channel is used.
45  Result fit(const ChargeList &charges, double samplingTime, Identifier &stripId) const;
46 
47 private:
49 
50  // Calibration tool.
51  ToolHandle<ICscCalibTool> m_cscCalibTool{
52  this,
53  "cscCalibTool",
54  "",
55  };
56 
57  static double FindInitValues(double *x, double *initValues, int *maxsample) ;
58  double FindPow(double z) const;
59  static void InvertMatrix(double matrix[][3], const int dim, const int *) ;
60  static void InvertSymmetric4x4(double W[][4]) ;
61  void Derivative(double A[][3], double fp[][1], double p0[][1], int imeas, const int *meas) const;
62  int TheFitter(double *x, const double ex, const double *initValues, int imeas, int *meas, int ipar, int *par, double *chi2,
63  double *result) const;
64 
65  // Job options.
66  double m_qerr; // Charge error for a successful fit.
67  double m_terr; // Time error for a succcessful fit.
68  double m_qerr_fail; // Charge error for a failed fit.
69  double m_terr_fail; // Time error for a failed fit.
70  double m_qerrprop; // Charge calibration error
71  double m_n;
72  double m_n2;
73  double m_zmax;
75  double m_tsampling;
76 };
77 
78 #endif
CscBipolarStripFitter::m_zmax
double m_zmax
Definition: CscBipolarStripFitter.h:73
CscBipolarStripFitter::fit
Result fit(const ChargeList &charges, double samplingTime, Identifier &stripId) const
Definition: CscBipolarStripFitter.cxx:74
CscBipolarStripFitter::m_cscCalibTool
ToolHandle< ICscCalibTool > m_cscCalibTool
Definition: CscBipolarStripFitter.h:51
CscBipolarStripFitter::m_terr_fail
double m_terr_fail
Definition: CscBipolarStripFitter.h:69
yodamerge_tmp.dim
dim
Definition: yodamerge_tmp.py:239
get_generator_info.result
result
Definition: get_generator_info.py:21
CscBipolarStripFitter::m_n2
double m_n2
Definition: CscBipolarStripFitter.h:72
Trk::PrepRawDataType::CscStripPrepData
@ CscStripPrepData
CscBipolarStripFitter::m_tsampling
double m_tsampling
Definition: CscBipolarStripFitter.h:75
JetTiledMap::W
@ W
Definition: TiledEtaPhiMap.h:44
ICscStripFitter::fit
virtual Result fit(const ChargeList &ChargeList, double samplingTime, bool samplingPhase, Identifier &sid) const
Definition: ICscStripFitter.cxx:16
CscBipolarStripFitter::TheFitter
int TheFitter(double *x, const double ex, const double *initValues, int imeas, int *meas, int ipar, int *par, double *chi2, double *result) const
Definition: CscBipolarStripFitter.cxx:294
Muon
This class provides conversion from CSC RDO data to CSC Digits.
Definition: TrackSystemController.h:45
x
#define x
A
CscBipolarStripFitter::m_n
double m_n
Definition: CscBipolarStripFitter.h:71
z
#define z
trigmenu_modify_prescale_json.fp
fp
Definition: trigmenu_modify_prescale_json.py:53
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ICscStripFitter
Definition: ICscStripFitter.h:19
AthAlgTool.h
CscBipolarStripFitter::m_qerrprop
double m_qerrprop
Definition: CscBipolarStripFitter.h:70
CscBipolarStripFitter::m_bipolarNormalization
double m_bipolarNormalization
Definition: CscBipolarStripFitter.h:74
chi2
double chi2(TH1 *h0, TH1 *h1)
Definition: comparitor.cxx:522
CscBipolarStripFitter::Derivative
void Derivative(double A[][3], double fp[][1], double p0[][1], int imeas, const int *meas) const
Definition: CscBipolarStripFitter.cxx:267
ICscCalibTool
Definition: ICscCalibTool.h:24
CscBipolarStripFitter::m_qerr
double m_qerr
Definition: CscBipolarStripFitter.h:66
ICscStripFitter::Result
Definition: ICscStripFitter.h:25
CscBipolarStripFitter::InvertSymmetric4x4
static void InvertSymmetric4x4(double W[][4])
Definition: CscBipolarStripFitter.cxx:223
CscBipolarStripFitter::initialize
StatusCode initialize() override
Definition: CscBipolarStripFitter.cxx:41
CscBipolarStripFitter::~CscBipolarStripFitter
~CscBipolarStripFitter()=default
ICscStripFitter::ChargeList
std::vector< float > ChargeList
Definition: ICscStripFitter.h:55
createCoolChannelIdFile.par
par
Definition: createCoolChannelIdFile.py:29
CscBipolarStripFitter::m_qerr_fail
double m_qerr_fail
Definition: CscBipolarStripFitter.h:68
CscBipolarStripFitter::InvertMatrix
static void InvertMatrix(double matrix[][3], const int dim, const int *)
Definition: CscBipolarStripFitter.cxx:175
CscBipolarStripFitter::m_phelper
const CscIdHelper * m_phelper
Definition: CscBipolarStripFitter.h:48
python.testIfMatch.matrix
matrix
Definition: testIfMatch.py:66
CscIdHelper
Definition: CscIdHelper.h:52
CscBipolarStripFitter
Definition: CscBipolarStripFitter.h:27
CscBipolarStripFitter::CscBipolarStripFitter
CscBipolarStripFitter(const std::string &, const std::string &, const IInterface *)
Definition: CscBipolarStripFitter.cxx:29
ICscStripFitter.h
CscBipolarStripFitter::m_terr
double m_terr
Definition: CscBipolarStripFitter.h:67
AthAlgTool
Definition: AthAlgTool.h:26
CscBipolarStripFitter::FindPow
double FindPow(double z) const
Definition: CscBipolarStripFitter.cxx:170
CscBipolarStripFitter::FindInitValues
static double FindInitValues(double *x, double *initValues, int *maxsample)
Definition: CscBipolarStripFitter.cxx:129
TRTCalib_cfilter.p0
p0
Definition: TRTCalib_cfilter.py:129
Identifier
Definition: IdentifierFieldParser.cxx:14