CMS 3D CMS Logo

MuonErrorMatrix.h

Go to the documentation of this file.
00001 #ifndef MUONERRORMATRIX_H
00002 #define MUONERRORMATRIX_H
00003 
00021 #include <TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h>
00022 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00023 
00024 #include <TFile.h>
00025 #include <TProfile3D.h>
00026 #include <TString.h>
00027 #include <TAxis.h>
00028 
00029 
00030 class MuonErrorMatrix{
00031  public:
00033   enum action { use , constructor};
00035   MuonErrorMatrix(const edm::ParameterSet & pset);
00036   
00038   ~MuonErrorMatrix();
00039 
00041   void close();
00042   
00044   CurvilinearTrajectoryError get(GlobalVector momentum);
00045   CurvilinearTrajectoryError getFast(GlobalVector momentum);
00046 
00048   static  void multiply(CurvilinearTrajectoryError & initial_error, const CurvilinearTrajectoryError & scale_error);
00049 
00051   static  bool divide(CurvilinearTrajectoryError & num_error, const CurvilinearTrajectoryError & denom_error);
00052 
00054   inline TProfile3D * get(int i , int j) {return Index(i,j);}
00055   inline uint index(int i, int j){return Pindex(i,j);}
00056 
00058   static const TString vars[5];
00059 
00061   static double Term(const AlgebraicSymMatrix55 & curv, int i, int j);
00062 
00064   int findBin(TAxis * axis, double value);
00065 
00066  private:
00068   std::string theCategory;
00069 
00071   TDirectory * theD;
00073   TProfile3D * theData[15];
00074   TProfile3D * theData_fast[5][5];
00075   
00076 
00078   inline int Pindex(int i , int j) {
00079     static const int offset[5]={0,5,5+4,5+4+3,5+4+3+2};
00080     return offset[i]+abs(j-i);}
00082   inline TProfile3D * Index(int i , int j) {
00083     return theData[Pindex(i,j)];}
00084 
00085 
00087   double Value(GlobalVector & momentum, int i, int j);
00089   double Rms(GlobalVector & momentum, int i, int j);
00090   
00091 
00092 };
00093 
00094 
00095 
00096 #endif

Generated on Tue Jun 9 17:44:34 2009 for CMSSW by  doxygen 1.5.4