TrackingTools
KalmanUpdators
src
EtaPhiMeasurementEstimator.cc
Go to the documentation of this file.
1
#include <cmath>
2
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
3
#include "
TrackingTools/KalmanUpdators/interface/EtaPhiMeasurementEstimator.h
"
4
#include "
TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h
"
5
#include "
TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHit.h
"
6
7
#include "
DataFormats/Math/interface/deltaPhi.h
"
8
9
std::pair<bool, double>
EtaPhiMeasurementEstimator::estimate
(
const
TrajectoryStateOnSurface
& tsos,
10
const
TrackingRecHit
& aRecHit)
const
{
11
// As the center of the plane is in the region, no need to waste time to test the hit as well
12
return
std::make_pair(
true
, 1.0);
13
14
/* HERE AS THE SECOND LINE WAS BUGGY... (AND MAY BE NEEDED IF WE MODIFY THE ESTIMATE WRT PLANE TO ACCOUNT FOR DET SPAN
15
16
auto dEta = std::abs(tsos.globalPosition().eta() - aRecHit.globalPosition().eta());
17
auto dPhi = std::abs(deltaPhi(tsos.globalPosition().barePhi(), aRecHit.globalPosition().barePhi()));
18
19
LogDebug("EtaPhiMeasurementEstimator")<< " The state to compare with is \n"<< tsos
20
<< " The hit position is:\n" << aRecHit.globalPosition()
21
<< " deta: "<< dEta<< " dPhi: "<<dPhi;
22
23
if ( (dEta < thedEta) & (dPhi <thedPhi) )
24
return std::make_pair(true, 1.0);
25
else
26
return std::make_pair(false, 0.0);
27
28
*/
29
}
30
31
bool
EtaPhiMeasurementEstimator::estimate
(
const
TrajectoryStateOnSurface
& tsos,
const
Plane
& plane)
const
{
32
auto
dEta
=
std::abs
(tsos.
globalPosition
().
eta
() - plane.
eta
());
33
auto
dPhi
=
std::abs
(
deltaPhi
(tsos.
globalPosition
().
barePhi
(), plane.
phi
()));
34
35
LogDebug
(
"EtaPhiMeasurementEstimator"
) <<
"The state to compare with is \n"
36
<< tsos <<
"\n"
37
<<
"The plane position center is: "
<< plane.
position
() <<
"\n"
38
<<
"the deta = "
<<
thedEta
<<
" --- the dPhi = "
<<
thedPhi
<<
"\n"
39
<<
"deta = "
<< fabs(
dEta
) <<
" --- dPhi = "
<< fabs(
dPhi
);
40
41
// does not take into account bounds... (not sure it was intentional)
42
return
(
dEta
<
thedEta
) & (
dPhi
<
thedPhi
);
43
}
44
45
MeasurementEstimator::Local2DVector
EtaPhiMeasurementEstimator::maximalLocalDisplacement
(
46
const
TrajectoryStateOnSurface
& tsos,
const
Plane
& plane)
const
{
47
return
Local2DVector
(30., 30.);
48
}
TrajectoryStateOnSurface.h
MessageLogger.h
EtaPhiMeasurementEstimator::thedEta
float thedEta
Definition:
EtaPhiMeasurementEstimator.h:29
deltaPhi.h
TrajectoryStateOnSurface::globalPosition
GlobalPoint globalPosition() const
Definition:
TrajectoryStateOnSurface.h:65
TransientTrackingRecHit.h
MeasurementEstimator::Local2DVector
Vector2DBase< float, LocalTag > Local2DVector
Definition:
MeasurementEstimator.h:26
HLT_FULL_cff.dPhi
dPhi
Definition:
HLT_FULL_cff.py:13695
TrajectoryStateOnSurface
Definition:
TrajectoryStateOnSurface.h:16
EtaPhiMeasurementEstimator.h
SiPixelRawToDigiRegional_cfi.deltaPhi
deltaPhi
Definition:
SiPixelRawToDigiRegional_cfi.py:9
Vector2DBase
Definition:
Vector2DBase.h:8
EtaPhiMeasurementEstimator::estimate
std::pair< bool, double > estimate(const TrajectoryStateOnSurface &, const TrackingRecHit &) const override
Definition:
EtaPhiMeasurementEstimator.cc:9
LogDebug
#define LogDebug(id)
Definition:
MessageLogger.h:233
PV3DBase::barePhi
T barePhi() const
Definition:
PV3DBase.h:65
PV3DBase::eta
T eta() const
Definition:
PV3DBase.h:73
GloballyPositioned::eta
T eta() const
Definition:
GloballyPositioned.h:41
GloballyPositioned::phi
T phi() const
Definition:
GloballyPositioned.h:40
EtaPhiMeasurementEstimator::thedPhi
float thedPhi
Definition:
EtaPhiMeasurementEstimator.h:30
TrackingRecHit
Definition:
TrackingRecHit.h:21
GloballyPositioned::position
const PositionType & position() const
Definition:
GloballyPositioned.h:36
HLT_FULL_cff.dEta
dEta
Definition:
HLT_FULL_cff.py:13694
Plane
Definition:
Plane.h:16
funct::abs
Abs< T >::type abs(const T &t)
Definition:
Abs.h:22
EtaPhiMeasurementEstimator::maximalLocalDisplacement
Local2DVector maximalLocalDisplacement(const TrajectoryStateOnSurface &tsos, const Plane &plane) const override
Definition:
EtaPhiMeasurementEstimator.cc:45
Generated for CMSSW Reference Manual by
1.8.16