CMS 3D CMS Logo

MuonErrorMatrix.cc
Go to the documentation of this file.
4 
5 #include "TROOT.h"
6 #include "TString.h"
7 #include "TRandom2.h"
8 #include "TMath.h"
9 
10 #include <sstream>
11 #include <atomic>
12 
13 using namespace std;
14 
15 const TString MuonErrorMatrix::vars[5] = {"#frac{q}{|p|}", "#lambda", "#varphi_{0}", "X_{T}", "Y_{T}"};
16 
17 MuonErrorMatrix::MuonErrorMatrix(const edm::ParameterSet &iConfig) : theD(nullptr) {
18  theCategory = "MuonErrorMatrix";
19  std::string action = iConfig.getParameter<std::string>("action");
20 
21  bool madeFromCff = iConfig.exists("errorMatrixValuesPSet");
23 
25  if (!madeFromCff) {
26  fileName = iConfig.getParameter<std::string>("rootFileName");
27  } else {
28  errorMatrixValuesPSet = iConfig.getParameter<edm::ParameterSet>("errorMatrixValuesPSet");
29  }
31 
32  int NPt = 5;
33  std::vector<double> xBins;
34  double *xBinsArray = nullptr;
35  double minPt = 1;
36  double maxPt = 200;
37  int NEta = 5;
38  std::vector<double> yBins;
39  double *yBinsArray = nullptr;
40  double minEta = 0;
41  double maxEta = 2.5;
42  int NPhi = 1;
43  double minPhi = -TMath::Pi();
44  double maxPhi = TMath::Pi();
45 
46  if (action != "use") {
47  a = constructor;
48 
49  NPt = iConfig.getParameter<int>("NPt");
50  if (NPt != 0) {
51  minPt = iConfig.getParameter<double>("minPt");
52  maxPt = iConfig.getParameter<double>("maxPt");
53  } else {
54  xBins = iConfig.getParameter<std::vector<double> >("PtBins");
55  if (xBins.empty()) {
56  edm::LogError(theCategory) << "Npt=0 and no entries in the vector. I will do aseg fault soon.";
57  }
58  NPt = xBins.size() - 1;
59  xBinsArray = &(xBins.front());
60  minPt = xBins.front();
61  maxPt = xBins.back();
62  }
63 
64  NEta = iConfig.getParameter<int>("NEta");
65  if (NEta != 0) {
66  minEta = iConfig.getParameter<double>("minEta");
67  maxEta = iConfig.getParameter<double>("maxEta");
68  } else {
69  yBins = iConfig.getParameter<std::vector<double> >("EtaBins");
70  if (yBins.empty()) {
71  edm::LogError(theCategory) << "NEta=0 and no entries in the vector. I will do aseg fault soon.";
72  }
73  NEta = yBins.size() - 1;
74  yBinsArray = &(yBins.front());
75  minEta = yBins.front();
76  maxEta = yBins.back();
77  }
78 
79  NPhi = iConfig.getParameter<int>("NPhi");
80  std::stringstream get(iConfig.getParameter<std::string>("minPhi"));
81  if (get.str() == "-Pi") {
82  minPhi = -TMath::Pi();
83  } else if (get.str() == "Pi") {
84  minPhi = TMath::Pi();
85  } else {
86  get >> minPhi;
87  }
88  get.str(iConfig.getParameter<std::string>("maxPhi"));
89  if (get.str() == "-Pi") {
90  maxPhi = -TMath::Pi();
91  } else if (get.str() == "Pi") {
92  maxPhi = TMath::Pi();
93  } else {
94  get >> maxPhi;
95  }
96  } //action!=use
97  else if (madeFromCff) {
98  xBins = errorMatrixValuesPSet.getParameter<std::vector<double> >("xAxis");
99  NPt = xBins.size() - 1;
100  xBinsArray = &(xBins.front());
101  minPt = xBins.front();
102  maxPt = xBins.back();
103 
104  yBins = errorMatrixValuesPSet.getParameter<std::vector<double> >("yAxis");
105  NEta = yBins.size() - 1;
106  yBinsArray = &(yBins.front());
107  minEta = yBins.front();
108  maxEta = yBins.back();
109 
110  std::vector<double> zBins = errorMatrixValuesPSet.getParameter<std::vector<double> >("zAxis");
111  NPhi = 1;
112  if (zBins.size() != 2) {
113  edm::LogError(theCategory) << "please specify a zAxis with 2 entries only. more bins not implemented yet.";
114  }
115  minPhi = zBins.front();
116  maxPhi = zBins.back();
117  }
118 
119  if (a == use) {
120  if (!madeFromCff) {
121  edm::LogInfo(theCategory) << "using an error matrix object from: " << fileName;
123  std::string fullpath = data.fullPath();
124  gROOT->cd();
125  theD = new TFile(fullpath.c_str());
126  theD->SetWritable(false);
127  } else {
128  static std::atomic<unsigned int> neverTheSame{0};
129  std::stringstream dirName("MuonErrorMatrixDirectory");
130  dirName << neverTheSame++;
132  << "using an error matrix object from configuration file. putting memory histograms to: " << dirName.str();
133  gROOT->cd();
134  theD = new TDirectory(dirName.str().c_str(), "transient directory to host MuonErrorMatrix TProfile3D");
135  theD->SetWritable(false);
136  }
137  } else {
138  edm::LogInfo(theCategory) << "creating an error matrix object: " << fileName;
139  theD = new TFile(fileName.c_str(), "recreate");
140  }
141 
142  if (a == use && !madeFromCff) {
143  gROOT->cd();
144  } else {
145  theD->cd();
146  }
147 
148  for (int i = 0; i != 5; i++) {
149  for (int j = i; j != 5; j++) {
150  TString pfname(Form("pf3_V%1d%1d", i + 1, j + 1));
151  TProfile3D *pf = nullptr;
152  if (a == use && !madeFromCff) {
153  //read from the rootfile
154  edm::LogVerbatim(theCategory) << "getting " << pfname << " from " << fileName;
155  pf = (TProfile3D *)theD->Get(pfname);
156  theData[Pindex(i, j)] = pf;
157  theData_fast[i][j] = pf;
158  theData_fast[j][i] = pf;
159  } else {
160  // curvilinear coordinate system
161  //need to make some input parameter to be to change the number of bins
162 
163  TString pftitle;
164  if (i == j) {
165  pftitle = "#sigma_{" + vars[i] + "}";
166  } else {
167  pftitle = "#rho(" + vars[i] + "," + vars[j] + ")";
168  }
169  edm::LogVerbatim(theCategory) << "booking " << pfname << " into " << fileName;
170  pf = new TProfile3D(pfname, pftitle, NPt, minPt, maxPt, NEta, minEta, maxEta, NPhi, minPhi, maxPhi, "S");
171  pf->SetXTitle("muon p_{T} [GeV]");
172  pf->SetYTitle("muon |#eta|");
173  pf->SetZTitle("muon #varphi");
174 
175  //set variable size binning
176  if (xBinsArray) {
177  pf->GetXaxis()->Set(NPt, xBinsArray);
178  }
179  if (yBinsArray) {
180  pf->GetYaxis()->Set(NEta, yBinsArray);
181  }
182 
183  if (madeFromCff) {
184  edm::ParameterSet pSet = errorMatrixValuesPSet.getParameter<edm::ParameterSet>(pfname.Data());
185  //set the values from the configuration file itself
186  std::vector<double> values = pSet.getParameter<std::vector<double> >("values");
187  unsigned int iX = pf->GetNbinsX();
188  unsigned int iY = pf->GetNbinsY();
189  unsigned int iZ = pf->GetNbinsZ();
190  unsigned int continuous_i = 0;
191  for (unsigned int ix = 1; ix <= iX; ++ix) {
192  for (unsigned int iy = 1; iy <= iY; ++iy) {
193  for (unsigned int iz = 1; iz <= iZ; ++iz) {
194  LogTrace(theCategory) << "filling profile:"
195  << "\n pt (x)= " << pf->GetXaxis()->GetBinCenter(ix)
196  << "\n eta (y)= " << pf->GetYaxis()->GetBinCenter(iy)
197  << "\n phi (z)= " << pf->GetZaxis()->GetBinCenter(iz)
198  << "\n value= " << values[continuous_i];
199  pf->Fill(pf->GetXaxis()->GetBinCenter(ix),
200  pf->GetYaxis()->GetBinCenter(iy),
201  pf->GetZaxis()->GetBinCenter(iz),
202  values[continuous_i++]);
203  }
204  }
205  }
206  //term action
207  std::string tAction = pSet.getParameter<std::string>("action");
208  if (tAction == "scale")
210  else if (tAction == "assign")
212  else {
213  edm::LogError(theCategory) << " wrong configuration: term action: " << tAction << " is not recognized.";
215  }
216  }
217  }
218 
219  LogDebug(theCategory) << " index " << i << ":" << j << " -> " << Pindex(i, j);
220  theData[Pindex(i, j)] = pf;
221  theData_fast[i][j] = pf;
222  theData_fast[j][i] = pf;
223  if (!pf) {
224  edm::LogError(theCategory) << " profile " << pfname << " in file " << fileName << " is not valid. exiting.";
225  exit(1);
226  }
227  }
228  }
229 
230  //verify it
231  for (int i = 0; i != 15; i++) {
232  if (theData[i]) {
233  edm::LogVerbatim(theCategory) << i << " :" << theData[i]->GetName() << " " << theData[i]->GetTitle() << std::endl;
234  }
235  }
236 }
237 
238 //void MuonErrorMatrix::writeIntoCFF(){}
239 
241  //close the file
242  if (theD) {
243  theD->cd();
244  //write to it first if constructor
245  if (theD->IsWritable()) {
246  for (int i = 0; i != 15; i++) {
247  if (theData[i]) {
248  theData[i]->Write();
249  }
250  }
251  }
252  theD->Close();
253  }
254 }
255 
257 
260  //retrieves a 55 matrix containing (i,i)^2 and (i,j)*(i,i)*(j,j)
261  for (int i = 0; i != 5; i++) {
262  for (int j = i; j != 5; j++) {
263  V(i, j) = Value(momentum, i, j, convolute);
264  }
265  }
267 }
268 
270  //will be faster but make assumptions that could be broken at some point
271  // same bining for all TProfile
273 
274  double pT = momentum.perp();
275  double eta = fabs(momentum.eta());
276  double phi = momentum.phi();
277 
278  //assume all the same axis in X,Y,Z
279  int iBin_x = findBin(theData_fast[0][0]->GetXaxis(), pT);
280  int iBin_y = findBin(theData_fast[0][0]->GetYaxis(), eta);
281  int iBin_z = findBin(theData_fast[0][0]->GetZaxis(), phi);
282 
283  //retreive values
284  double values[5][5]; //sigma_i and rho_ij
285  for (int i = 0; i != 5; i++) {
286  for (int j = i; j != 5; j++) {
287  values[i][j] = theData_fast[i][j]->GetBinContent(iBin_x, iBin_y, iBin_z);
288  }
289  }
290 
291  for (int i = 0; i != 5; i++) {
292  for (int j = i; j != 5; j++) {
293  if (i == j) {
294  //sigma_i * sigma_i
295  V(i, j) = values[i][j];
296  V(i, j) *= V(i, j);
297  } else {
298  //sigma_i * sigma_j * rho_ij
299  V(i, j) = values[i][i] * values[j][j] * values[i][j];
300  }
301  }
302  }
303 
305 }
306 
307 /*CurvilinearTrajectoryError MuonErrorMatrix::get_random(GlobalVector momentum) {
308  static TRandom2 rand;
309  AlgebraicSymMatrix55 V;//result
310  //first proceed with diagonal elements
311  for (int i=0;i!=5;i++){
312  V(i,i)=rand.Gaus( Value(momentum,i,i), Rms(momentum,i,i));}
313 
314  //now proceed with the correlations
315  for (int i=0;i!=5;i++){for (int j=i+1;j<5;j++){
316  double corr = rand.Gaus( Value(momentum,i,j), Rms(momentum,i,j));
317  //assign the covariance from correlation and sigmas
318  V(i,j)= corr * sqrt( V[i][i] * V[j][j]);}}
319  return CurvilinearTrajectoryError(V); }
320 */
321 
322 int MuonErrorMatrix::findBin(TAxis *axis, double value) {
323  //find the proper bin, protecting against under/over flow
324  int result = axis->FindBin(value);
325  if (result <= 0)
326  result = 1; //protect against under flow
327  else if (result > axis->GetNbins())
328  result = axis->GetNbins();
329  return result;
330 }
331 
332 double MuonErrorMatrix::Value(GlobalVector &momentum, int i, int j, bool convolute) {
333  double result = 0;
334  TProfile3D *ij = Index(i, j);
335  if (!ij) {
336  edm::LogError(theCategory) << "cannot get the profile (" << i << ":" << j << ")";
337  return result;
338  }
339 
340  double pT = momentum.perp();
341  double eta = fabs(momentum.eta());
342  double phi = momentum.phi();
343 
344  int iBin_x = findBin(ij->GetXaxis(), pT);
345  int iBin_y = findBin(ij->GetYaxis(), eta);
346  int iBin_z = findBin(ij->GetZaxis(), phi);
347 
348  if (convolute) {
349  if (i != j) {
350  //return the covariance = correlation*sigma_1 *sigma_2;
351  TProfile3D *ii = Index(i, i);
352  TProfile3D *jj = Index(j, j);
353  if (!ii) {
354  edm::LogError(theCategory) << "cannot get the profile (" << i << ":" << i << ")";
355  return result;
356  }
357  if (!jj) {
358  edm::LogError(theCategory) << "cannot get the profile (" << j << ":" << j << ")";
359  return result;
360  }
361 
362  int iBin_i_x = findBin(ii->GetXaxis(), pT);
363  int iBin_i_y = findBin(ii->GetYaxis(), eta);
364  int iBin_i_z = findBin(ii->GetZaxis(), phi);
365  int iBin_j_x = findBin(jj->GetXaxis(), pT);
366  int iBin_j_y = findBin(jj->GetYaxis(), eta);
367  int iBin_j_z = findBin(jj->GetZaxis(), phi);
368 
369  double corr = ij->GetBinContent(iBin_x, iBin_y, iBin_z);
370  double sigma_1 = (ii->GetBinContent(iBin_i_x, iBin_i_y, iBin_i_z));
371  double sigma_2 = (jj->GetBinContent(iBin_j_x, iBin_j_y, iBin_j_z));
372 
373  result = corr * sigma_1 * sigma_2;
374  LogDebug(theCategory) << "for: (pT,eta,phi)=(" << pT << ", " << eta << ", " << phi << ") nterms are"
375  << "\nrho[" << i << "," << j << "]: " << corr << " [" << iBin_x << ", " << iBin_y << ", "
376  << iBin_z << "]"
377  << "\nsigma[" << i << "," << i << "]: " << sigma_1 << "\nsigma[" << j << "," << j
378  << "]: " << sigma_2 << "Covariance[" << i << "," << j << "] is: " << result;
379  return result;
380  } else {
381  //return the variance = sigma_1 **2
382  // result=ij->GetBinContent(iBin);
383  result = ij->GetBinContent(iBin_x, iBin_y, iBin_z);
384  result *= result;
385  LogDebug(theCategory) << "for: (pT,eta,phi)=(" << pT << ", " << eta << ", " << phi << ") sigma^2[" << i << ","
386  << j << "] is: " << result;
387  return result;
388  }
389  } else {
390  //do not convolute
391  result = ij->GetBinContent(iBin_x, iBin_y, iBin_z);
392  return result;
393  }
394 }
395 
396 double MuonErrorMatrix::Rms(GlobalVector &momentum, int i, int j) {
397  double result = 0;
398  TProfile3D *ij = Index(i, j);
399  if (!ij) {
400  edm::LogError(theCategory) << "cannot get the profile (" << i << ":" << i << ")";
401  return result;
402  }
403  double pT = momentum.perp();
404  double eta = fabs(momentum.eta());
405  double phi = momentum.phi();
406 
407  int iBin_x = ij->GetXaxis()->FindBin(pT);
408  int iBin_y = ij->GetYaxis()->FindBin(eta);
409  int iBin_z = ij->GetZaxis()->FindBin(phi);
410  result = ij->GetBinError(iBin_x, iBin_y, iBin_z);
411 
412  LogDebug(theCategory) << "for: (pT,eta,phi)=(" << pT << ", " << eta << ", " << phi << ") error[" << i << "," << j
413  << "] is: " << result;
414  return result;
415 }
416 
417 double MuonErrorMatrix::Term(const AlgebraicSymMatrix55 &curv, int i, int j) {
418  //return sigma or correlation factor
419  double result = 0;
420  if (i == j) {
421  result = curv(i, j);
422  if (result < 0) {
423  //check validity of this guy
424  edm::LogError("MuonErrorMatrix") << "invalid term in the error matrix.\n sii: " << result;
425  return 0;
426  }
427  return sqrt(result);
428  } else {
429  double si = curv(i, i);
430  double sj = curv(j, j);
431  if (si <= 0 || sj <= 0) {
432  //check validity
433  edm::LogError("MuonErrorMatrix") << "invalid term in the error matrix.\n si: " << si << " sj: " << sj
434  << ". result will be corrupted\n"
435  << curv;
436  return 0;
437  }
438  result = curv(i, j) / sqrt(si * sj);
439  return result;
440  }
441  //by default
442  return 0;
443 }
444 
446  const CurvilinearTrajectoryError &scale_error) {
447  //scale term by term the matrix
448  const AlgebraicSymMatrix55 &scale_matrix = scale_error.matrix();
449  AlgebraicSymMatrix55 revised_matrix = initial_error.matrix();
450  // the true type of the matrix is such that [i][j] is the same memory object as [j][i]: looping i:0-5, j:0-5 double multiply the terms
451  // need to loop only on i:0-5, j:i-5
452  for (int i = 0; i != 5; i++) {
453  for (int j = i; j != 5; j++) {
454  revised_matrix(i, j) *= scale_matrix(i, j);
455  }
456  }
457  initial_error = CurvilinearTrajectoryError(revised_matrix);
458 }
460  //divide term by term the matrix
461  const AlgebraicSymMatrix55 &denom_matrix = denom_error.matrix();
462  AlgebraicSymMatrix55 num_matrix = num_error.matrix();
463  // the true type of the matrix is such that [i][j] is the same memory object as [j][i]: looping i:0-5, j:0-5 double multiply the terms
464  // need to loop only on i:0-5, j:i-5
465  for (int i = 0; i != 5; i++) {
466  for (int j = i; j != 5; j++) {
467  if (denom_matrix(i, j) == 0)
468  return false;
469  num_matrix(i, j) /= denom_matrix(i, j);
470  }
471  }
472  num_error = CurvilinearTrajectoryError(num_matrix);
473  return true;
474 }
475 
477  for (int i = 0; i != 5; i++) {
478  for (int j = i; j != 5; j++) {
479  if (i == j)
480  output(i, j) = sqrt(input(i, j)); //sigma
481  else
482  output(i, j) = input(i, j) / sqrt(input(i, i) * input(j, j)); //rho
483  }
484  }
485 }
486 
488  for (int i = 0; i != 5; i++) {
489  for (int j = i; j != 5; j++) {
490  if (i == j)
491  output(i, j) = input(i, j) * input(i, j); //sigma squared
492  else
493  output(i, j) = input(i, j) * input(i, i) * input(j, j); //rho*sigma*sigma
494  }
495  }
496 }
497 
499  LogDebug(theCategory + "|Adjust") << "state: \n" << state;
500  AlgebraicSymMatrix55 simpleTerms;
501  simpleTerm(state.curvilinearError(), simpleTerms);
502  //the above contains sigma(i), rho(i,j)
503  LogDebug(theCategory + "|Adjust") << "state sigma(i), rho(i,j): \n" << simpleTerms;
504 
505  AlgebraicSymMatrix55 simpleValues = get(state.momentum(), false).matrix();
506  LogDebug(theCategory + "|Adjust") << "config: (i,i), (i,j): \n" << simpleValues;
507 
508  for (int i = 0; i != 5; i++) {
509  for (int j = i; j != 5; j++) {
510  //check on each term for desired action
511  switch (theTermAction[Pindex(i, j)]) {
512  case scale: {
513  simpleTerms(i, j) *= simpleValues(i, j);
514  break;
515  }
516  case assign: {
517  simpleTerms(i, j) = simpleValues(i, j);
518  break;
519  }
520  case error: {
521  edm::LogError(theCategory + "|Adjust") << " cannot properly adjust for term: " << i << "," << j;
522  }
523  }
524  }
525  }
526  LogDebug(theCategory + "|Adjust") << "updated state sigma(i), rho(i,j): \n" << simpleTerms;
527 
528  AlgebraicSymMatrix55 finalTerms;
529  complicatedTerm(simpleTerms, finalTerms);
530  LogDebug(theCategory + "|Adjust") << "updated state COV(i,j): \n" << finalTerms;
531 
532  CurvilinearTrajectoryError oMat(finalTerms);
533  state = FreeTrajectoryState(state.parameters(), oMat);
534  LogDebug(theCategory + "|Adjust") << "updated state:\n" << state;
535 }
536 
538  AlgebraicSymMatrix55 simpleTerms;
539  simpleTerm(state.curvilinearError(), simpleTerms);
540  LogDebug(theCategory + "|Adjust") << "state sigma(i), rho(i,j): \n" << simpleTerms;
541 
542  AlgebraicSymMatrix55 simpleValues = get(state.globalMomentum(), false).matrix();
543  LogDebug(theCategory + "|Adjust") << "config: (i,i), (i,j):\n" << simpleValues;
544 
545  for (int i = 0; i != 5; i++) {
546  for (int j = i; j != 5; j++) {
547  //check on each term for desired action
548  switch (theTermAction[Pindex(i, j)]) {
549  case scale: {
550  simpleTerms(i, j) *= simpleValues(i, j);
551  break;
552  }
553  case assign: {
554  simpleTerms(i, j) = simpleValues(i, j);
555  break;
556  }
557  case error: {
558  edm::LogError(theCategory + "|Adjust") << " cannot properly adjust for term: " << i << "," << j;
559  }
560  }
561  }
562  }
563  LogDebug(theCategory + "|Adjust") << "updated state sigma(i), rho(i,j): \n" << simpleTerms;
564 
565  AlgebraicSymMatrix55 finalTerms;
566  complicatedTerm(simpleTerms, finalTerms);
567  LogDebug(theCategory + "|Adjust") << "updated state COV(i,j): \n" << finalTerms;
568 
569  CurvilinearTrajectoryError oMat(finalTerms);
570  state =
571  TrajectoryStateOnSurface(state.weight(), state.globalParameters(), oMat, state.surface(), state.surfaceSide());
572  LogDebug(theCategory + "|Adjust") << "updated state:\n" << state;
573 }
const double Pi
Log< level::Info, true > LogVerbatim
void adjust(FreeTrajectoryState &state)
adjust the error matrix on the state
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
static bool divide(CurvilinearTrajectoryError &num_error, const CurvilinearTrajectoryError &denom_error)
divide term by term the two matrix
T perp() const
Definition: PV3DBase.h:69
int findBin(TAxis *axis, double value)
method to get the bin index, taking care of under/overlow: first(1)/last(GetNbins())returned ...
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
static const TString vars[5]
names of the variables of the 5x5 error matrix
bool exists(std::string const &parameterName) const
checks if a parameter exists
T eta() const
Definition: PV3DBase.h:73
double Value(GlobalVector &momentum, int i, int j, bool convolute=true)
internal method that retreives the value of the parametrization for term i,j
CurvilinearTrajectoryError get(GlobalVector momentum, bool convolute=true)
main method to be used. Retrieve a 5x5 symetrical matrix according to parametrization of error or sca...
double maxEta
~MuonErrorMatrix()
destructor
Log< level::Error, false > LogError
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
#define LogTrace(id)
static std::string const input
Definition: EdmProvDump.cc:47
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t V
dictionary corr
void complicatedTerm(const AlgebraicSymMatrix55 &input, AlgebraicSymMatrix55 &output)
convert sigma/rho -> sigma2/COV
TermAction theTermAction[15]
T sqrt(T t)
Definition: SSEVec.h:19
MuonErrorMatrix(const edm::ParameterSet &pset)
constructor from a parameter set
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.
Definition: value.py:1
TProfile3D * theData_fast[5][5]
ii
Definition: cuy.py:589
Log< level::Info, false > LogInfo
void simpleTerm(const AlgebraicSymMatrix55 &input, AlgebraicSymMatrix55 &output)
convert sigma2/COV -> sigma/rho
const AlgebraicSymMatrix55 & matrix() const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
NEta
set NEta=0 and the vector of double for variable size binning
double Rms(GlobalVector &momentum, int i, int j)
internal method that retreives the error on the value of the parametrization for term i...
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
TDirectory * theD
the attached root file, where the parametrization is saved
double a
Definition: hdecay.h:119
CurvilinearTrajectoryError getFast(GlobalVector momentum)
vars
Definition: DeepTauId.cc:30
TProfile3D * theData[15]
15 TProfile, each holding he parametrization of each term of the 5x5
#define str(s)
std::string theCategory
log category: "MuonErrorMatrix"
void close()
close the root file attached to the class
#define LogDebug(id)
def exit(msg="")
TProfile3D * Index(int i, int j)
internal method to get access to the profiles