RecoTracker
TkTrackingRegions
src
OuterHitCompatibility.h
Go to the documentation of this file.
1
#ifndef RecoTracker_TkTrackingRegions_OuterHitCompatibility_H
2
#define RecoTracker_TkTrackingRegions_OuterHitCompatibility_H
3
9
#include "
FWCore/Framework/interface/EventSetup.h
"
10
#include "
DataFormats/GeometryVector/interface/GlobalPoint.h
"
11
#include "
OuterHitPhiPrediction.h
"
12
#include "
RecoTracker/TkTrackingRegions/interface/HitRZCompatibility.h
"
13
#include "
DataFormats/TrackingRecHit/interface/TrackingRecHit.h
"
14
#include "
TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHit.h
"
15
#include "
DataFormats/GeometryVector/interface/VectorUtil.h
"
16
#include "
DataFormats/Math/interface/approx_atan2.h
"
17
18
#include "
FWCore/Utilities/interface/Visibility.h
"
19
20
template
<
typename
Algo>
21
class
dso_internal
OuterHitCompatibility
{
22
public
:
23
OuterHitCompatibility
(
const
OuterHitPhiPrediction
& phiPrediction,
const
Algo
& rzCompatibility)
24
: thePhiPrediction(phiPrediction), theRZCompatibility(rzCompatibility) {}
25
26
bool
operator()
(
const
TrackingRecHit
&
hit
)
const
{
27
auto
hitPos =
hit
.globalPosition();
28
auto
hitR = hitPos.perp();
29
30
auto
hitZ = hitPos.
z
();
31
if
(!theRZCompatibility(hitR, hitZ))
32
return
false
;
33
34
auto
hitPhi = unsafe_atan2f<9>(hitPos.y(), hitPos.x());
35
36
return
checkPhi(hitPhi, hitR);
37
}
38
39
bool
checkPhi
(
float
phi
,
float
r
)
const
{
40
auto
hitPhiRange = thePhiPrediction(
r
);
41
bool
phiOK =
Geom::phiLess
(hitPhiRange.min(),
phi
) &&
Geom::phiLess
(
phi
, hitPhiRange.max());
42
return
phiOK;
43
}
44
45
private
:
46
OuterHitPhiPrediction
thePhiPrediction
;
47
Algo
theRZCompatibility
;
48
};
49
#endif
Visibility.h
VectorUtil.h
TransientTrackingRecHit.h
OuterHitCompatibility::OuterHitCompatibility
OuterHitCompatibility(const OuterHitPhiPrediction &phiPrediction, const Algo &rzCompatibility)
Definition:
OuterHitCompatibility.h:23
OuterHitCompatibility::checkPhi
bool checkPhi(float phi, float r) const
Definition:
OuterHitCompatibility.h:39
TrackingRecHit.h
HitRZCompatibility.h
OuterHitCompatibility::operator()
bool operator()(const TrackingRecHit &hit) const
Definition:
OuterHitCompatibility.h:26
Algo
Definition:
fakeMenu.h:6
hit::z
double z
Definition:
SiStripHitEffFromCalibTree.cc:91
OuterHitCompatibility
Definition:
OuterHitCompatibility.h:21
OuterHitPhiPrediction
Definition:
OuterHitPhiPrediction.h:12
Geom::phiLess
bool phiLess(float phi1, float phi2)
Definition:
VectorUtil.h:18
approx_atan2.h
dso_internal
#define dso_internal
Definition:
Visibility.h:13
OuterHitCompatibility::thePhiPrediction
OuterHitPhiPrediction thePhiPrediction
Definition:
OuterHitCompatibility.h:46
TrackingRecHit
Definition:
TrackingRecHit.h:21
alignCSCRings.r
r
Definition:
alignCSCRings.py:93
DDAxes::phi
OuterHitCompatibility::theRZCompatibility
Algo theRZCompatibility
Definition:
OuterHitCompatibility.h:47
OuterHitPhiPrediction.h
EventSetup.h
GlobalPoint.h
hit
Definition:
SiStripHitEffFromCalibTree.cc:88
Generated for CMSSW Reference Manual by
1.8.16