CMS 3D CMS Logo

MuonErrorMatrix.h
Go to the documentation of this file.
1 #ifndef MUONERRORMATRIX_H
2 #define MUONERRORMATRIX_H
3 
18 
19 #include <TFile.h>
20 #include <TProfile3D.h>
21 #include <TString.h>
22 #include <TAxis.h>
23 
25 public:
27  enum action { use, constructor };
30 
33 
35  void close();
36 
38  CurvilinearTrajectoryError get(GlobalVector momentum, bool convolute = true);
40 
42  static void multiply(CurvilinearTrajectoryError& initial_error, const CurvilinearTrajectoryError& scale_error);
43 
45  static bool divide(CurvilinearTrajectoryError& num_error, const CurvilinearTrajectoryError& denom_error);
46 
48  inline TProfile3D* get(int i, int j) { return Index(i, j); }
49  inline unsigned int index(int i, int j) { return Pindex(i, j); }
50 
52  static const TString vars[5];
53 
55  static double Term(const AlgebraicSymMatrix55& curv, int i, int j);
56 
58  int findBin(TAxis* axis, double value);
59 
62 
65 
68 
71 
72 private:
75 
77  TDirectory* theD;
79  TProfile3D* theData[15];
80  TProfile3D* theData_fast[5][5];
81 
85 
87  inline int Pindex(int i, int j) {
88  static const int offset[5] = {0, 5, 5 + 4, 5 + 4 + 3, 5 + 4 + 3 + 2};
89  return offset[i] + abs(j - i);
90  }
92  inline TProfile3D* Index(int i, int j) { return theData[Pindex(i, j)]; }
93 
95  double Value(GlobalVector& momentum, int i, int j, bool convolute = true);
97  double Rms(GlobalVector& momentum, int i, int j);
98 };
99 
100 #endif
Vector3DBase
Definition: Vector3DBase.h:8
MuonErrorMatrix::theD
TDirectory * theD
the attached root file, where the parametrization is saved
Definition: MuonErrorMatrix.h:77
TrajectoryStateOnSurface.h
MuonErrorMatrix::scale
Definition: MuonErrorMatrix.h:83
mps_fire.i
i
Definition: mps_fire.py:428
MuonErrorMatrix::Index
TProfile3D * Index(int i, int j)
internal method to get access to the profiles
Definition: MuonErrorMatrix.h:92
FreeTrajectoryState.h
input
static const std::string input
Definition: EdmProvDump.cc:48
MuonErrorMatrix::multiply
static void multiply(CurvilinearTrajectoryError &initial_error, const CurvilinearTrajectoryError &scale_error)
multiply term by term the two matrix
Definition: MuonErrorMatrix.cc:445
MuonErrorMatrix::Pindex
int Pindex(int i, int j)
internal methods to get the index of a matrix term.
Definition: MuonErrorMatrix.h:87
MuonErrorMatrix::get
TProfile3D * get(int i, int j)
actually get access to the TProfile3D used for the parametrization
Definition: MuonErrorMatrix.h:48
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:72
MuonErrorMatrix::assign
Definition: MuonErrorMatrix.h:83
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
MuonErrorMatrix::theTermAction
TermAction theTermAction[15]
Definition: MuonErrorMatrix.h:84
MuonErrorMatrix::use
Definition: MuonErrorMatrix.h:27
MuonErrorMatrix::Rms
double Rms(GlobalVector &momentum, int i, int j)
internal method that retreives the error on the value of the parametrization for term i,...
Definition: MuonErrorMatrix.cc:396
CurvilinearTrajectoryError
Definition: CurvilinearTrajectoryError.h:27
vars
vars
Definition: DeepTauId.cc:164
MuonErrorMatrix::theCategory
std::string theCategory
log category: "MuonErrorMatrix"
Definition: MuonErrorMatrix.h:74
MuonErrorMatrix::close
void close()
close the root file attached to the class
Definition: MuonErrorMatrix.cc:240
MuonErrorMatrix::index
unsigned int index(int i, int j)
Definition: MuonErrorMatrix.h:49
MuonErrorMatrix::Term
static double Term(const AlgebraicSymMatrix55 &curv, int i, int j)
provide the numerical value used. sigma or correlation factor
Definition: MuonErrorMatrix.cc:417
MuonErrorMatrix::error
Definition: MuonErrorMatrix.h:83
MuonErrorMatrix::getFast
CurvilinearTrajectoryError getFast(GlobalVector momentum)
Definition: MuonErrorMatrix.cc:269
MuonErrorMatrix::adjust
void adjust(FreeTrajectoryState &state)
adjust the error matrix on the state
Definition: MuonErrorMatrix.cc:498
edm::ParameterSet
Definition: ParameterSet.h:47
MuonErrorMatrix::get
CurvilinearTrajectoryError get(GlobalVector momentum, bool convolute=true)
main method to be used. Retrieve a 5x5 symetrical matrix according to parametrization of error or sca...
Definition: MuonErrorMatrix.cc:258
MuonErrorMatrix::action
action
enum type to define if the class is used as a tool or to be created
Definition: MuonErrorMatrix.h:27
MuonErrorMatrix::Value
double Value(GlobalVector &momentum, int i, int j, bool convolute=true)
internal method that retreives the value of the parametrization for term i,j
Definition: MuonErrorMatrix.cc:332
value
Definition: value.py:1
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
MuonErrorMatrix::complicatedTerm
void complicatedTerm(const AlgebraicSymMatrix55 &input, AlgebraicSymMatrix55 &output)
convert sigma/rho -> sigma2/COV
Definition: MuonErrorMatrix.cc:487
MuonErrorMatrix::MuonErrorMatrix
MuonErrorMatrix(const edm::ParameterSet &pset)
constructor from a parameter set
Definition: MuonErrorMatrix.cc:17
MuonErrorMatrix::findBin
int findBin(TAxis *axis, double value)
method to get the bin index, taking care of under/overlow: first(1)/last(GetNbins())returned
Definition: MuonErrorMatrix.cc:322
MuonErrorMatrix::constructor
Definition: MuonErrorMatrix.h:27
RunInfoPI::state
state
Definition: RunInfoPayloadInspectoHelper.h:16
FreeTrajectoryState
Definition: FreeTrajectoryState.h:27
MuonErrorMatrix
Definition: MuonErrorMatrix.h:24
MuonErrorMatrix::divide
static bool divide(CurvilinearTrajectoryError &num_error, const CurvilinearTrajectoryError &denom_error)
divide term by term the two matrix
Definition: MuonErrorMatrix.cc:459
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
ParameterSet.h
MuonErrorMatrix::theData_fast
TProfile3D * theData_fast[5][5]
Definition: MuonErrorMatrix.h:80
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82
AlgebraicSymMatrix55
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
Definition: AlgebraicROOTObjects.h:23
MuonErrorMatrix::simpleTerm
void simpleTerm(const AlgebraicSymMatrix55 &input, AlgebraicSymMatrix55 &output)
convert sigma2/COV -> sigma/rho
Definition: MuonErrorMatrix.cc:476
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
MuonErrorMatrix::theData
TProfile3D * theData[15]
15 TProfile, each holding he parametrization of each term of the 5x5
Definition: MuonErrorMatrix.h:79
MuonErrorMatrix::TermAction
TermAction
decide whether to scale of to assigne terms
Definition: MuonErrorMatrix.h:83
MuonErrorMatrix::~MuonErrorMatrix
~MuonErrorMatrix()
destructor
Definition: MuonErrorMatrix.cc:256