TrackParameters.h

Go to the documentation of this file.
00001 #ifndef ATLFAST_TRACKPARAMETERS_H
00002 #define ATLFAST_TRACKPARAMETERS_H
00003 //
00004 
00005 #include "AtlfastEvent/ITrackParameters.h"
00006 #include "AtlfastEvent/Phi.h"
00007 #include <cmath>
00008 
00009 namespace Atlfast
00010 {
00014   class TrackParameters: public ITrackParameters
00015   {
00016     public:
00017       
00018       TrackParameters() {}
00019       TrackParameters( double eta,
00020                        Phi phi,
00021                        double pT,
00022                        double impactParameter,
00023                        double zPerigee,
00024                        double cotTheta,
00025                        double invPtCharge
00026                      ) :
00027         m_eta(eta),
00028         m_phi(phi),
00029         m_pT(pT),
00030         m_impactParameter(impactParameter),
00031         m_zPerigee(zPerigee),
00032         m_cotTheta(cotTheta),
00033         m_invPtCharge(invPtCharge) {}
00034       
00035       virtual double  eta()             const { return m_eta; }
00036       virtual Phi     phi()             const { return m_phi; } 
00037       virtual double  pT()              const { return m_pT; }
00038       virtual double  impactParameter() const { return m_impactParameter; }
00039       virtual double  zPerigee()        const { return m_zPerigee; }
00040       virtual double  cotTheta()        const { return m_cotTheta; }
00041       virtual double  invPtCharge()     const { return m_invPtCharge; }  
00042       
00043       // derived quantities
00044       double theta() const;
00045       double invPCharge() const;
00046  
00047     private:
00048     
00049       double m_eta;
00050       Phi    m_phi;
00051       double m_pT;
00052       double m_impactParameter;
00053       double m_zPerigee;
00054       double m_cotTheta;
00055       double m_invPtCharge;
00056     
00057   };
00058 
00060   //               inline (no virtual) methods           //
00062   inline double TrackParameters::theta() const
00063   {
00064     double theta = ( m_cotTheta  ?  std::atan( 1.0 / m_cotTheta )  :  M_PI/2 );
00065     if ( theta < 0.0 )  theta += M_PI;
00066     return theta;
00067   }
00068   
00069   inline double TrackParameters::invPCharge() const
00070   {
00071     double sinTheta = ( m_cotTheta  ?  std::sqrt( 1.0 / ( 1.0  + m_cotTheta * m_cotTheta ) )  :  1.0 );
00072     return m_invPtCharge * sinTheta;
00073   }      
00074 
00075 
00076 }
00077 #endif
00078 
00079 

Generated on Fri Sep 21 13:00:09 2007 for AtlfastEvent by  doxygen 1.5.1