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 
24 
25 #include <TFile.h>
26 #include <TProfile3D.h>
27 #include <TString.h>
28 #include <TAxis.h>
29 
30 
32  public:
34  enum action { use , constructor};
36  MuonErrorMatrix(const edm::ParameterSet & pset);
37 
40 
42  void close();
43 
45  CurvilinearTrajectoryError get(GlobalVector momentum,bool convolute=true);
47 
49  static void multiply(CurvilinearTrajectoryError & initial_error, const CurvilinearTrajectoryError & scale_error);
50 
52  static bool divide(CurvilinearTrajectoryError & num_error, const CurvilinearTrajectoryError & denom_error);
53 
55  inline TProfile3D * get(int i , int j) {return Index(i,j);}
56  inline unsigned int index(int i, int j){return Pindex(i,j);}
57 
59  static const TString vars[5];
60 
62  static double Term(const AlgebraicSymMatrix55 & curv, int i, int j);
63 
65  int findBin(TAxis * axis, double value);
66 
69 
72 
75 
78 
79  private:
81  std::string theCategory;
82 
84  TDirectory * theD;
86  TProfile3D * theData[15];
87  TProfile3D * theData_fast[5][5];
88 
92 
94  inline int Pindex(int i , int j) {
95  static const int offset[5]={0,5,5+4,5+4+3,5+4+3+2};
96  return offset[i]+abs(j-i);}
98  inline TProfile3D * Index(int i , int j) {
99  return theData[Pindex(i,j)];}
100 
101 
103  double Value(GlobalVector & momentum, int i, int j,bool convolute=true);
105  double Rms(GlobalVector & momentum, int i, int j);
106 
107 
108 };
109 
110 
111 
112 #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
#define abs(x)
Definition: mlp_lapack.h:159
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
void complicatedTerm(const AlgebraicSymMatrix55 &input, AlgebraicSymMatrix55 &output)
convert sigma/rho -&gt; sigma2/COV
TermAction theTermAction[15]
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.
unsigned int offset(bool)
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...
char state
Definition: procUtils.cc:75
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