CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MuonErrorMatrix.h
Go to the documentation of this file.
1 #ifndef MUONERRORMATRIX_H
2 #define MUONERRORMATRIX_H
3 
22 
23 #include <TFile.h>
24 #include <TProfile3D.h>
25 #include <TString.h>
26 #include <TAxis.h>
27 
28 
30  public:
32  enum action { use , constructor};
34  MuonErrorMatrix(const edm::ParameterSet & pset);
35 
38 
40  void close();
41 
43  CurvilinearTrajectoryError get(GlobalVector momentum,bool convolute=true);
45 
47  static void multiply(CurvilinearTrajectoryError & initial_error, const CurvilinearTrajectoryError & scale_error);
48 
50  static bool divide(CurvilinearTrajectoryError & num_error, const CurvilinearTrajectoryError & denom_error);
51 
53  inline TProfile3D * get(int i , int j) {return Index(i,j);}
54  inline unsigned int index(int i, int j){return Pindex(i,j);}
55 
57  static const TString vars[5];
58 
60  static double Term(const AlgebraicSymMatrix55 & curv, int i, int j);
61 
63  int findBin(TAxis * axis, double value);
64 
67 
70 
72  void adjust(FreeTrajectoryState & state);
73 
75  void adjust(TrajectoryStateOnSurface & state);
76 
77  private:
80 
82  TDirectory * theD;
84  TProfile3D * theData[15];
85  TProfile3D * theData_fast[5][5];
86 
90 
92  inline int Pindex(int i , int j) {
93  static const int offset[5]={0,5,5+4,5+4+3,5+4+3+2};
94  return offset[i]+abs(j-i);}
96  inline TProfile3D * Index(int i , int j) {
97  return theData[Pindex(i,j)];}
98 
99 
101  double Value(GlobalVector & momentum, int i, int j,bool convolute=true);
103  double Rms(GlobalVector & momentum, int i, int j);
104 
105 
106 };
107 
108 
109 
110 #endif
int i
Definition: DBlmapReader.cc:9
void adjust(FreeTrajectoryState &state)
adjust the error matrix on the state
static bool divide(CurvilinearTrajectoryError &num_error, const CurvilinearTrajectoryError &denom_error)
divide term by term the two matrix
int findBin(TAxis *axis, double value)
method to get the bin index, taking care of under/overlow: first(1)/last(GetNbins())returned ...
static const TString vars[5]
names of the variables of the 5x5 error matrix
unsigned int index(int i, int j)
double Value(GlobalVector &momentum, int i, int j, bool convolute=true)
internal method that retreives the value of the parametrization for term i,j
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
~MuonErrorMatrix()
destructor
static double Term(const AlgebraicSymMatrix55 &curv, int i, int j)
provide the numerical value used. sigma or correlation factor
action
enum type to define if the class is used as a tool or to be created
static std::string const input
Definition: EdmProvDump.cc:43
void complicatedTerm(const AlgebraicSymMatrix55 &input, AlgebraicSymMatrix55 &output)
convert sigma/rho -&gt; sigma2/COV
TermAction theTermAction[15]
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
MuonErrorMatrix(const edm::ParameterSet &pset)
constructor from a parameter set
int j
Definition: DBlmapReader.cc:9
TermAction
decide whether to scale of to assigne terms
static void multiply(CurvilinearTrajectoryError &initial_error, const CurvilinearTrajectoryError &scale_error)
multiply term by term the two matrix
int Pindex(int i, int j)
internal methods to get the index of a matrix term.
TProfile3D * theData_fast[5][5]
void simpleTerm(const AlgebraicSymMatrix55 &input, AlgebraicSymMatrix55 &output)
convert sigma2/COV -&gt; sigma/rho
double Rms(GlobalVector &momentum, int i, int j)
internal method that retreives the error on the value of the parametrization for term i...
TDirectory * theD
the attached root file, where the parametrization is saved
CurvilinearTrajectoryError getFast(GlobalVector momentum)
TProfile3D * theData[15]
15 TProfile, each holding he parametrization of each term of the 5x5
std::string theCategory
log category: &quot;MuonErrorMatrix&quot;
void close()
close the root file attached to the class
TProfile3D * Index(int i, int j)
internal method to get access to the profiles