Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
RecoTracker
TkTrackingRegions
src
OuterHitCompatibility.cc
Go to the documentation of this file.
1
#include "
RecoTracker/TkTrackingRegions/interface/OuterHitCompatibility.h
"
2
#include "
TrackingTools/DetLayers/interface/PhiLess.h
"
3
#include "
DataFormats/Common/interface/Handle.h
"
4
#include "
FWCore/Framework/interface/ESHandle.h
"
5
#include "
DataFormats/TrackingRecHit/interface/TrackingRecHit.h
"
6
7
#include "
Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h
"
8
#include "
Geometry/Records/interface/TrackerDigiGeometryRecord.h
"
9
#include "
Geometry/CommonDetUnit/interface/GeomDetType.h
"
10
#include "
Geometry/CommonDetUnit/interface/GeomDetUnit.h
"
11
12
bool
OuterHitCompatibility::operator()
(
const
TransientTrackingRecHit
*
hit
)
const
13
{
14
GlobalPoint
hitPos = hit->
globalPosition
();
15
float
hitR = hitPos.
perp
();
16
float
hitPhi = hitPos.
phi
();
17
18
if
( !
checkPhi
(hitPhi, hitR) )
return
0;
19
20
float
hitZ = hitPos.
z
();
21
if
( !(*
theRZCompatibility
)(hitR,hitZ) )
return
0;
22
23
return
1;
24
}
25
26
27
bool
OuterHitCompatibility::operator()
(
const
TrackingRecHit
*
hit
,
const
edm::EventSetup
& iSetup)
const
28
{
29
edm::ESHandle<TrackerGeometry>
tracker
;
30
iSetup.
get
<
TrackerDigiGeometryRecord
>().
get
(tracker);
31
DetId
tmp
=hit->
geographicalId
();
32
GlobalPoint
hitPos = tracker->idToDet(tmp)->surface().toGlobal(hit->
localPosition
());
33
float
hitR = hitPos.
perp
();
34
float
hitPhi = hitPos.
phi
();
35
36
if
( !
checkPhi
(hitPhi, hitR) )
return
0;
37
38
float
hitZ = hitPos.
z
();
39
if
( !(*
theRZCompatibility
)(hitR,hitZ) )
return
0;
40
41
return
1;
42
}
43
44
bool
OuterHitCompatibility::checkPhi
(
const
float
&
phi
,
const
float
&
r
)
const
45
{
46
OuterHitPhiPrediction::Range
hitPhiRange =
thePhiPrediction
(r);
47
PhiLess
less;
48
bool
phiOK = less(hitPhiRange.
min
(),
phi
) && less(phi,hitPhiRange.
max
());
49
return
phiOK;
50
}
51
TrackerDigiGeometryRecord.h
PV3DBase::perp
T perp() const
Definition:
PV3DBase.h:66
PixelRecoRange::max
T max() const
Definition:
PixelRecoRange.h:25
csvReporter.r
tuple r
Definition:
csvReporter.py:25
PixelRecoRange< float >
PV3DBase::phi
Geom::Phi< T > phi() const
Definition:
PV3DBase.h:63
TrackingRecHit
Definition:
TrackingRecHit.h:10
Handle.h
PixelRecoRange::min
T min() const
Definition:
PixelRecoRange.h:24
PhiLess
Definition:
PhiLess.h:12
OuterHitCompatibility::thePhiPrediction
OuterHitPhiPrediction thePhiPrediction
Definition:
OuterHitCompatibility.h:44
OuterHitCompatibility.h
OuterHitCompatibility::theRZCompatibility
const HitRZCompatibility * theRZCompatibility
Definition:
OuterHitCompatibility.h:43
GeomDetType.h
TrackingRecHit.h
OuterHitCompatibility::operator()
bool operator()(const TransientTrackingRecHit *hit) const
Definition:
OuterHitCompatibility.cc:12
edm::ESHandle< TrackerGeometry >
PV3DBase::z
T z() const
Definition:
PV3DBase.h:58
ESHandle.h
patCandidatesForDimuonsSequences_cff.tracker
tuple tracker
Definition:
patCandidatesForDimuonsSequences_cff.py:69
edm::EventSetup
Definition:
EventSetup.h:44
GeomDetUnit.h
DetId
Definition:
DetId.h:20
PhiLess.h
edm::EventSetup::get
const T & get() const
Definition:
EventSetup.h:55
TransientTrackingRecHit
Definition:
TransientTrackingRecHit.h:14
hit
Definition:
SiStripHitEffFromCalibTree.cc:87
tmp
std::vector< std::vector< double > > tmp
Definition:
MVATrainer.cc:100
Point3DBase< float, GlobalTag >
TransientTrackingRecHit::globalPosition
virtual GlobalPoint globalPosition() const
Definition:
TransientTrackingRecHit.cc:12
OuterHitCompatibility::checkPhi
bool checkPhi(const float &phi, const float &r) const
Definition:
OuterHitCompatibility.cc:44
TrackerGeometry.h
TrackingRecHit::geographicalId
DetId geographicalId() const
Definition:
TrackingRecHit.h:53
TrackerDigiGeometryRecord
Definition:
TrackerDigiGeometryRecord.h:32
TrackingRecHit::localPosition
virtual LocalPoint localPosition() const =0
phi
Definition:
DDAxes.h:10
Generated for CMSSW Reference Manual by
1.8.5