CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
OuterHitCompatibility.cc
Go to the documentation of this file.
6 
11 
13 {
14  GlobalPoint hitPos = hit->globalPosition();
15  float hitR = hitPos.perp();
16  float hitPhi = hitPos.phi();
17 
18  if ( !checkPhi(hitPhi, hitR) ) return false;
19 
20  float hitZ = hitPos.z();
21  if ( !(*theRZCompatibility)(hitR,hitZ) ) return false;
22 
23  return true;
24 }
25 
26 
28 {
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 false;
37 
38  float hitZ = hitPos.z();
39  if ( !(*theRZCompatibility)(hitR,hitZ) ) return false;
40 
41  return true;
42 }
43 
T perp() const
Definition: PV3DBase.h:72
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
const HitRZCompatibility * theRZCompatibility
virtual GlobalPoint globalPosition() const =0
bool operator()(const TransientTrackingRecHit *hit) const
T z() const
Definition: PV3DBase.h:64
Definition: DetId.h:18
const T & get() const
Definition: EventSetup.h:55
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
DetId geographicalId() const
virtual LocalPoint localPosition() const =0
bool checkPhi(float phi, float r) const