ATLAS Offline Software
MeasurementProcessor.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /***************************************************************************
6  process measurements i.e. extrapolate to surface,
7  compute derivatives and residuals
8  ***************************************************************************/
9 
10 #ifndef TRKIPATFITTERUTILS_MEASUREMENTPROCESSOR_H
11 #define TRKIPATFITTERUTILS_MEASUREMENTPROCESSOR_H
12 
13 //<<<<<< INCLUDES >>>>>>
14 
15 #include <optional>
16 #include <vector>
17 
19 #include "GaudiKernel/ToolHandle.h"
23 //<<<<<< CLASS DECLARATIONS >>>>>>
24 
25 namespace Trk {
26 class FitMeasurement;
27 class FitParameters;
28 class IIntersector;
29 class IPropagator;
30 
31 class MeasurementProcessor {
32  public:
33  MeasurementProcessor(bool asymmetricCaloEnergy,
34  Amg::MatrixX& derivativeMatrix,
35  const ToolHandle<IIntersector>& intersector,
36  std::vector<FitMeasurement*>& measurements,
38  const ToolHandle<IIntersector>& rungeKuttaIntersector,
39  const ToolHandle<IPropagator>& stepPropagator,
40  int useStepPropagator);
42 
43  // implicit copy constructor
44  // implicit assignment operator
45 
46  // compute derivatives and residuals
47  bool calculateDerivatives(void);
48  bool calculateFittedTrajectory(int iteration);
49  void calculateResiduals(void);
50  void fieldIntegralUncertainty(MsgStream& log, Amg::MatrixX& covariance);
51  void propagationDerivatives(void);
52 
53  private:
54  void clusterDerivatives(int derivativeFlag, FitMeasurement& measurement);
55  void driftDerivatives(int derivativeFlag, FitMeasurement& measurement);
57 
58  std::vector<FitMeasurement*> m_alignments;
61  double m_cosPhi0;
62  double m_cosTheta0;
68  // bool m_havePhiPseudo;
69  const ToolHandle<IIntersector>& m_intersector;
71  double m_largeDeltaPhi0;
72  std::vector<FitMeasurement*>& m_measurements;
73  // double m_minDistanceForAngle;
76  bool m_phiInstability;
80  const ToolHandle<IIntersector>& m_rungeKuttaIntersector;
81  const ToolHandle<IPropagator>& m_stepPropagator;
83  std::vector<FitMeasurement*> m_scatterers;
84  double m_sinPhi0;
85  double m_sinTheta0;
86  // double m_toroidTurn;
89  double m_x0;
90  double m_y0;
91  double m_z0;
92  // bool m_zInstability;
94 };
95 
96 } // namespace Trk
97 
98 #endif // TRKIPATFITTERUTILS_MEASUREMENTPROCESSOR_H
Trk::MeasurementProcessor::MeasurementProcessor
MeasurementProcessor(bool asymmetricCaloEnergy, Amg::MatrixX &derivativeMatrix, const ToolHandle< IIntersector > &intersector, std::vector< FitMeasurement * > &measurements, FitParameters *parameters, const ToolHandle< IIntersector > &rungeKuttaIntersector, const ToolHandle< IPropagator > &stepPropagator, int useStepPropagator)
Definition: MeasurementProcessor.cxx:32
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:27
Trk::MeasurementProcessor::calculateFittedTrajectory
bool calculateFittedTrajectory(int iteration)
Definition: MeasurementProcessor.cxx:240
Trk::MeasurementProcessor::m_firstScatteringParameter
int m_firstScatteringParameter
Definition: MeasurementProcessor.h:70
Trk::MagneticFieldProperties
Definition: MagneticFieldProperties.h:31
Trk::MeasurementProcessor::m_qOverPbeforeCalo
double m_qOverPbeforeCalo
Definition: MeasurementProcessor.h:81
Trk::MeasurementProcessor::extrapolateToMeasurements
bool extrapolateToMeasurements(ExtrapolationType type)
Definition: MeasurementProcessor.cxx:977
Trk::MeasurementProcessor::m_derivQOverP1
double m_derivQOverP1
Definition: MeasurementProcessor.h:68
Trk::MeasurementProcessor::m_intersectStartingValue
TrackSurfaceIntersection m_intersectStartingValue
Definition: MeasurementProcessor.h:91
Trk::MeasurementProcessor::m_intersector
const ToolHandle< IIntersector > & m_intersector
Definition: MeasurementProcessor.h:72
Trk::MeasurementProcessor::m_energyResidual
double m_energyResidual
Definition: MeasurementProcessor.h:69
Trk::MeasurementProcessor::m_stepField
Trk::MagneticFieldProperties m_stepField
Definition: MeasurementProcessor.h:96
Trk::MeasurementProcessor::m_useStepPropagator
int m_useStepPropagator
Definition: MeasurementProcessor.h:85
Trk::MeasurementProcessor::m_delta
double m_delta[ExtrapolationTypes]
Definition: MeasurementProcessor.h:66
Trk::MeasurementProcessor::m_asymmetricCaloEnergy
bool m_asymmetricCaloEnergy
Definition: MeasurementProcessor.h:62
Trk::MeasurementProcessor::m_vertexIntersect
TrackSurfaceIntersection m_vertexIntersect
Definition: MeasurementProcessor.h:90
Trk::MeasurementProcessor::m_y0
double m_y0
Definition: MeasurementProcessor.h:93
Trk::MeasurementProcessor::m_measurements
std::vector< FitMeasurement * > & m_measurements
Definition: MeasurementProcessor.h:75
Trk::TrackSurfaceIntersection
Definition: TrackSurfaceIntersection.h:32
Trk::MeasurementProcessor::m_z0
double m_z0
Definition: MeasurementProcessor.h:94
Trk::MeasurementProcessor::m_sinTheta0
double m_sinTheta0
Definition: MeasurementProcessor.h:88
Trk::MeasurementProcessor::m_largeDeltaD0
double m_largeDeltaD0
Definition: MeasurementProcessor.h:73
Trk::MeasurementProcessor::m_rungeKuttaIntersector
const ToolHandle< IIntersector > & m_rungeKuttaIntersector
Definition: MeasurementProcessor.h:83
ExtrapolationType.h
MagneticFieldProperties.h
Trk::MeasurementProcessor::fieldIntegralUncertainty
void fieldIntegralUncertainty(MsgStream &log, Amg::MatrixX &covariance)
Definition: MeasurementProcessor.cxx:417
Trk::MeasurementProcessor::clusterDerivatives
void clusterDerivatives(int derivativeFlag, FitMeasurement &measurement)
Definition: MeasurementProcessor.cxx:563
Trk::MeasurementProcessor::m_phiInstability
bool m_phiInstability
Definition: MeasurementProcessor.h:79
Trk::MeasurementProcessor::driftDerivatives
void driftDerivatives(int derivativeFlag, FitMeasurement &measurement)
Definition: MeasurementProcessor.cxx:753
Trk::MeasurementProcessor::m_scatterers
std::vector< FitMeasurement * > m_scatterers
Definition: MeasurementProcessor.h:86
Trk::FitMeasurement
Definition: FitMeasurement.h:40
Trk::MeasurementProcessor::m_qOverPafterCalo
double m_qOverPafterCalo
Definition: MeasurementProcessor.h:82
Trk::MeasurementProcessor::calculateResiduals
void calculateResiduals(void)
Definition: MeasurementProcessor.cxx:296
Trk::MeasurementProcessor::m_derivQOverP0
double m_derivQOverP0
Definition: MeasurementProcessor.h:67
Trk::MeasurementProcessor::m_parameters
FitParameters * m_parameters
Definition: MeasurementProcessor.h:78
Trk::MeasurementProcessor::m_qOverP
double m_qOverP[ExtrapolationTypes]
Definition: MeasurementProcessor.h:80
Trk::MeasurementProcessor::m_sinPhi0
double m_sinPhi0
Definition: MeasurementProcessor.h:87
EventPrimitives.h
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::ExtrapolationType
ExtrapolationType
Definition: ExtrapolationType.h:18
Trk::MeasurementProcessor::calculateDerivatives
bool calculateDerivatives(void)
Definition: MeasurementProcessor.cxx:123
Trk::MeasurementProcessor::m_largeDeltaPhi0
double m_largeDeltaPhi0
Definition: MeasurementProcessor.h:74
Trk::MeasurementProcessor::m_alignments
std::vector< FitMeasurement * > m_alignments
Definition: MeasurementProcessor.h:61
Trk::MeasurementProcessor::~MeasurementProcessor
~MeasurementProcessor(void)
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
Trk::MeasurementProcessor::m_numericDerivatives
bool m_numericDerivatives
Definition: MeasurementProcessor.h:77
Trk::ExtrapolationTypes
@ ExtrapolationTypes
Definition: ExtrapolationType.h:26
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
Trk::MeasurementProcessor::m_cosPhi0
double m_cosPhi0
Definition: MeasurementProcessor.h:64
physics_parameters.parameters
parameters
Definition: physics_parameters.py:144
Trk::MeasurementProcessor::m_cosTheta0
double m_cosTheta0
Definition: MeasurementProcessor.h:65
Trk::FitParameters
Definition: FitParameters.h:29
TrackSurfaceIntersection.h
Trk::MeasurementProcessor::propagationDerivatives
void propagationDerivatives(void)
Definition: MeasurementProcessor.cxx:541
Trk::MeasurementProcessor::m_caloEnergyMeasurement
FitMeasurement * m_caloEnergyMeasurement
Definition: MeasurementProcessor.h:63
Trk::MeasurementProcessor::m_x0
double m_x0
Definition: MeasurementProcessor.h:92
Trk::MeasurementProcessor::m_stepPropagator
const ToolHandle< IPropagator > & m_stepPropagator
Definition: MeasurementProcessor.h:84