Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:28:53

0001 #ifndef TR_FastLine_H_
0002 #define TR_FastLine_H_
0003 
0004 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
0005 
0006 /**
0007    Calculate the Line parameters (n1, n2, c) of a Line in Rho*Phi-Z. A Line
0008    is defined by 
0009    n1*x + n2*y + c = 0. (== n1*RHOPHI + n2*Z + c)
0010    If rho is not specified, the Line parameters are calculated in R-Z.
0011    
0012    Implementation: Matthias Winkler 21.02.2001
0013  */
0014 
0015 class FastLine {
0016 public:
0017   FastLine(const GlobalPoint& outerHit, const GlobalPoint& innerHit);
0018 
0019   FastLine(const GlobalPoint& outerHit, const GlobalPoint& innerHit, double rho);
0020 
0021   ~FastLine() {}
0022 
0023   double n1() const { return theN1; }
0024 
0025   double n2() const { return theN2; }
0026 
0027   double c() const { return theC; }
0028 
0029   bool isValid() const { return theValid; }
0030 
0031 private:
0032   GlobalPoint theOuterHit;
0033   GlobalPoint theInnerHit;
0034   double theRho;
0035 
0036   double theN1;
0037   double theN2;
0038   double theC;
0039 
0040   bool theValid;
0041 
0042   void createLineParameters();
0043 };
0044 
0045 #endif  //TR_FastLine_H_