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