CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_1/src/RecoTracker/TkTrackingRegions/src/OuterHitPhiPrediction.cc

Go to the documentation of this file.
00001 #include <cmath>
00002 #include "RecoTracker/TkTrackingRegions/interface/OuterHitPhiPrediction.h"
00003 
00004 OuterHitPhiPrediction::Range 
00005     OuterHitPhiPrediction::operator()(float radius) const 
00006 {
00007 
00008   if( std::max(fabs(theCurvature.min()), fabs(theCurvature.max())) > 1./radius) 
00009       return Range(-M_PI,M_PI); 
00010   
00011   float Phi_r = asin(radius*theCurvature.max()/2 + theOriginRBound/radius);
00012   float curv0 = theCurvature.mean();
00013 
00014   if (curv0 == 0.) {
00015     return Range( thePhiAtVertex.min() - Phi_r - theTolerance.left(),
00016                   thePhiAtVertex.max() + Phi_r + theTolerance.right());
00017   } 
00018   else {
00019     float Phi_0 = asin(radius*curv0/2);
00020     float Phi_m = asin(radius*theCurvature.min()/2-theOriginRBound/radius);
00021     return Range( thePhiAtVertex.min() + Phi_0 + Phi_m - theTolerance.left(),
00022                   thePhiAtVertex.max() + Phi_0 + Phi_r + theTolerance.right());
00023   } 
00024 }