Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:27:57

0001 #ifndef OuterDetCompatibility_H
0002 #define OuterDetCompatibility_H
0003 
0004 /** check det compatibility by comparistion of det BoundPlane ranges
0005     with phi,r,z ranges (given at construction). */
0006 
0007 #include "OuterHitPhiPrediction.h"
0008 #include "RecoTracker/TkTrackingRegions/interface/HitRZConstraint.h"
0009 #include "TrackingTools/DetLayers/interface/BarrelDetLayer.h"
0010 #include "TrackingTools/DetLayers/interface/ForwardDetLayer.h"
0011 #include "TrackingTools/DetLayers/interface/MeasurementEstimator.h"
0012 #include "RecoTracker/TkMSParametrization/interface/PixelRecoRange.h"
0013 
0014 #include "FWCore/Utilities/interface/Visibility.h"
0015 
0016 class dso_internal OuterDetCompatibility {
0017 public:
0018   typedef PixelRecoRange<float> Range;
0019 
0020   OuterDetCompatibility(const BarrelDetLayer* layer,
0021                         const OuterHitPhiPrediction::Range& phiRange,
0022                         const Range& rRange,
0023                         const Range& zRange)
0024       : theLayer(layer), barrel(true), hitDetPhiRange(phiRange), hitDetRRange(rRange), hitDetZRange(zRange) {}
0025 
0026   OuterDetCompatibility(const ForwardDetLayer* layer,
0027                         const OuterHitPhiPrediction::Range& phiRange,
0028                         const Range& rRange,
0029                         const Range& zRange)
0030       : theLayer(layer), barrel(false), hitDetPhiRange(phiRange), hitDetRRange(rRange), hitDetZRange(zRange) {}
0031 
0032   bool operator()(const BoundPlane& plane) const;
0033 
0034   MeasurementEstimator::Local2DVector maximalLocalDisplacement(const TrajectoryStateOnSurface& ts,
0035                                                                const BoundPlane& plane) const;
0036   MeasurementEstimator::Local2DVector maximalLocalDisplacement(const GlobalPoint& ts, const BoundPlane& plane) const;
0037 
0038   GlobalPoint center() const;
0039 
0040   const OuterHitPhiPrediction::Range& phiRange() const { return hitDetPhiRange; }
0041   const Range& rRange() const { return hitDetRRange; }
0042   const Range& zRange() const { return hitDetZRange; }
0043 
0044 private:
0045   bool checkPhi(const OuterHitPhiPrediction::Range& detPhiRange) const;
0046   bool checkR(const Range& detRRange) const;
0047   bool checkZ(const Range& detZRange) const;
0048 
0049   double loc_dist(double radius, double ts_phi, double range_phi, double cosGamma) const;
0050 
0051 private:
0052   const DetLayer* theLayer;
0053   bool barrel;
0054   OuterHitPhiPrediction::Range hitDetPhiRange;
0055   Range hitDetRRange, hitDetZRange;
0056 };
0057 
0058 #endif