CMS 3D CMS Logo

MuonErrorMatrix Class Reference

This class holds an error matrix paramertization. More...

#include <RecoMuon/TrackingTools/interface/MuonErrorMatrix.h>

List of all members.

Public Types

enum  action { use, constructor }
 enum type to define if the class is used as a tool or to be created More...

Public Member Functions

void close ()
 close the root file attached to the class
int findBin (TAxis *axis, double value)
 method to get the bin index, taking care of under/overlow: first(1)/last(GetNbins())returned
TProfile3D * get (int i, int j)
 actually get access to the TProfile3D used for the parametrization
CurvilinearTrajectoryError get (GlobalVector momentum)
 main method to be used. Retrieve a 5x5 symetrical matrix according to parametrization of error or scale factor
CurvilinearTrajectoryError getFast (GlobalVector momentum)
uint index (int i, int j)
 MuonErrorMatrix (const edm::ParameterSet &pset)
 constructor from a parameter set
 ~MuonErrorMatrix ()
 destructor

Static Public Member Functions

static bool divide (CurvilinearTrajectoryError &num_error, const CurvilinearTrajectoryError &denom_error)
 divide term by term the two matrix
static void multiply (CurvilinearTrajectoryError &initial_error, const CurvilinearTrajectoryError &scale_error)
 multiply term by term the two matrix
static double Term (const AlgebraicSymMatrix55 &curv, int i, int j)
 provide the numerical value used. sigma or correlation factor

Static Public Attributes

static const TString vars [5] = {"#frac{q}{|p|}","#lambda","#varphi_{0}","X_{T}","Y_{T}"}
 names of the variables of the 5x5 error matrix

Private Member Functions

TProfile3D * Index (int i, int j)
 internal method to get access to the profiles
int Pindex (int i, int j)
 internal methods to get the index of a matrix term.
double Rms (GlobalVector &momentum, int i, int j)
 internal method that retreives the error on the value of the parametrization for term i,j
double Value (GlobalVector &momentum, int i, int j)
 internal method that retreives the value of the parametrization for term i,j

Private Attributes

std::string theCategory
 log category: "MuonErrorMatrix"
TDirectory * theD
 the attached root file, where the parametrization is saved
TProfile3D * theData [15]
 15 TProfile, each holding he parametrization of each term of the 5x5
TProfile3D * theData_fast [5][5]


Detailed Description

This class holds an error matrix paramertization.

Either the error matrix value or scale factors. The implementation uses TProfile3D with pt, eta, phi axis. Error/Scale factor matrix is obtained using get(GlobalVector momentum)

Dates
2007/09/04 13:28
Revision
1.4

Author:
Jean-Roch Vlimant UCSB

Finn Rebassoo UCSB

Definition at line 30 of file MuonErrorMatrix.h.


Member Enumeration Documentation

enum MuonErrorMatrix::action

enum type to define if the class is used as a tool or to be created

Enumerator:
use 
constructor 

Definition at line 33 of file MuonErrorMatrix.h.

00033 { use , constructor};


Constructor & Destructor Documentation

MuonErrorMatrix::MuonErrorMatrix ( const edm::ParameterSet pset  ) 

constructor from a parameter set

Definition at line 16 of file MuonErrorMatrix.cc.

References a, constructor, data, test_cfg::dirName, lat::endl(), edm::ParameterSet::exists(), cmsRelvalreport::exit, aod_PYTHIA_cfg::fileName, edm::FileInPath::fullPath(), edm::ParameterSet::getParameter(), i, j, LogDebug, maxEta, HLT_VtxMuL3::maxPhi, HLT_VtxMuL3::minPhi, trajectoryFilterForConversions_cfi::minPt, Pi, Pindex(), theCategory, theD, theData, theData_fast, use, values, and vars.

00016                                                                :theD(0){
00017   theCategory="MuonErrorMatrix";
00018   std::string action = iConfig.getParameter<std::string>("action");
00019 
00020   bool madeFromCff=iConfig.exists("errorMatrixValuesPSet");
00021   edm::ParameterSet errorMatrixValuesPSet;
00022 
00023   std::string fileName;
00024   if (!madeFromCff){ fileName = iConfig.getParameter<std::string>("rootFileName");}
00025   else { errorMatrixValuesPSet =iConfig.getParameter<edm::ParameterSet>("errorMatrixValuesPSet");}
00026   MuonErrorMatrix::action a= use;
00027 
00028    int NPt=5;
00029    std::vector<double> xBins;
00030    double * xBinsArray = 0;
00031    double minPt=1;
00032    double maxPt=200;
00033    int NEta=5;
00034    std::vector<double> yBins;
00035    double * yBinsArray =0;
00036    double minEta=0;
00037    double maxEta=2.5;
00038    int NPhi=1;
00039    double minPhi=-TMath::Pi();
00040    double maxPhi=TMath::Pi();
00041 
00042   if (action!="use"){
00043     a = constructor;
00044     
00045     NPt = iConfig.getParameter<int>("NPt");
00046     if (NPt!=0){
00047       minPt = iConfig.getParameter<double>("minPt");
00048       maxPt = iConfig.getParameter<double>("maxPt");}
00049     else{
00050       xBins = iConfig.getParameter<std::vector<double> >("PtBins");
00051       if (xBins.size()==0){edm::LogError( theCategory)<<"Npt=0 and no entries in the vector. I will do aseg fault soon.";}
00052       NPt = xBins.size()-1;
00053       xBinsArray = &(xBins.front());
00054       minPt = xBins.front();
00055       maxPt = xBins.back();}
00056 
00057     NEta = iConfig.getParameter<int>("NEta");
00058     if (NEta!=0){
00059       minEta = iConfig.getParameter<double>("minEta");
00060       maxEta = iConfig.getParameter<double>("maxEta");}
00061     else{
00062       yBins = iConfig.getParameter<std::vector<double> >("EtaBins");
00063       if (yBins.size()==0){edm::LogError( theCategory)<<"NEta=0 and no entries in the vector. I will do aseg fault soon.";}
00064       NEta = yBins.size()-1;
00065       yBinsArray = &(yBins.front());
00066       minPt = yBins.front();
00067       maxPt = yBins.back();}
00068 
00069     NPhi = iConfig.getParameter<int>("NPhi");
00070     std::stringstream get(iConfig.getParameter<std::string>("minPhi"));
00071     if (get.str() =="-Pi")
00072       { minPhi =-TMath::Pi();}
00073     else if(get.str() =="Pi")
00074       { minPhi =TMath::Pi();}
00075     else { get>>minPhi;}
00076     get.str(iConfig.getParameter<std::string>("maxPhi"));
00077         if (get.str() =="-Pi")
00078       { maxPhi =-TMath::Pi();}
00079     else if(get.str() =="Pi")
00080       { maxPhi =TMath::Pi();}
00081     else { get>>maxPhi;}
00082   }//action!=use
00083   else if (madeFromCff){
00084 
00085     xBins = errorMatrixValuesPSet.getParameter<std::vector<double> >("xAxis");
00086     NPt = xBins.size()-1;
00087     xBinsArray = &(xBins.front());
00088     minPt = xBins.front();
00089     maxPt = xBins.back();
00090     
00091     yBins = errorMatrixValuesPSet.getParameter<std::vector<double> >("yAxis");
00092     NEta = yBins.size()-1;
00093     yBinsArray = &(yBins.front());
00094     minPt = yBins.front();
00095     maxPt = yBins.back();
00096 
00097     std::vector<double> zBins = errorMatrixValuesPSet.getParameter<std::vector<double> >("zAxis");
00098     NPhi=1;
00099     if (zBins.size()!=2){
00100       edm::LogError(theCategory)<<"please specify a zAxis with 2 entries only. more bins not implemented yet.";}
00101     minPhi=zBins.front();
00102     maxPhi=zBins.back();
00103 
00104   }
00105 
00106   if (a==use){
00107     if (!madeFromCff){
00108       edm::LogInfo(theCategory)<<"using an error matrix object from: "<<fileName;
00109       edm::FileInPath data(fileName);
00110       std::string fullpath = data.fullPath();
00111       gROOT->cd();
00112       theD = new TFile(fullpath.c_str());
00113       theD->SetWritable(false);
00114     }else{
00115       static uint neverTheSame=0;
00116       std::stringstream dirName("MuonErrorMatrixDirectory");
00117       dirName<<neverTheSame++;
00118       edm::LogInfo(theCategory)<<"using an error matrix object from configuration file. putting memory histograms to: "<<dirName.str();
00119       gROOT->cd();
00120       theD = new TDirectory(dirName.str().c_str(),"transient directory to host MuonErrorMatrix TProfile3D");
00121       theD->SetWritable(false);
00122     }
00123   }
00124   else{
00125     edm::LogInfo(theCategory)<<"creating  an error matrix object: "<<fileName;
00126     theD = new TFile(fileName.c_str(),"recreate");
00127   }
00128 
00129   if (a==use && !madeFromCff ){gROOT->cd();}
00130   else {theD->cd();}
00131 
00132   for (int i=0;i!=5;i++){for (int j=i;j!=5;j++){
00133       TString pfname(Form("pf3_V%1d%1d",i+1,j+1));
00134       TProfile3D * pf =0;
00135       if (a==use && !madeFromCff ){
00136         //read from the rootfile
00137         edm::LogVerbatim(theCategory)<<"getting "<<pfname<<" from "<<fileName;
00138         pf = (TProfile3D *)theD->Get(pfname);
00139         theData[Pindex(i,j)]=pf;
00140         theData_fast[i][j]=pf;    theData_fast[j][i]=pf;
00141       }
00142       else{
00143         //        curvilinear coordinate system
00144         //need to make some input parameter to be to change the number of bins
00145 
00146         TString pftitle;
00147         if (i==j){pftitle="#sigma_{"+vars[i]+"}";}
00148         else{pftitle="#rho("+vars[i]+","+vars[j]+")";}
00149         edm::LogVerbatim(theCategory)<<"booking "<<pfname<<" into "<<fileName;
00150         pf = new TProfile3D(pfname,pftitle,NPt,minPt,maxPt,NEta,minEta,maxEta,NPhi,minPhi,maxPhi,"S");      
00151         pf->SetXTitle("muon p_{T} [GeV]");
00152         pf->SetYTitle("muon |#eta|");
00153         pf->SetZTitle("muon #varphi");
00154 
00155         //set variable size binning
00156         if (xBinsArray){
00157           pf->GetXaxis()->Set(NPt,xBinsArray);}
00158         if (yBinsArray){
00159           pf->GetYaxis()->Set(NEta,yBinsArray);}
00160 
00161         if (madeFromCff){
00162           edm::ParameterSet pSet = errorMatrixValuesPSet.getParameter<edm::ParameterSet>(pfname.Data());
00163           //set the values from the configuration file itself
00164           std::vector<double> values = pSet.getParameter<std::vector<double> >("values");
00165           unsigned int iX=pf->GetNbinsX();
00166           unsigned int iY=pf->GetNbinsY();
00167           unsigned int iZ=pf->GetNbinsZ();
00168           uint continuous_i=0;
00169           for(unsigned int ix=1;ix<=iX;++ix){
00170             for(unsigned int iy=1;iy<=iY;++iy){
00171               for(unsigned int iz=1;iz<=iZ;++iz){
00172                 pf->Fill(pf->GetXaxis()->GetBinCenter(ix),
00173                          pf->GetYaxis()->GetBinCenter(iy),
00174                          pf->GetZaxis()->GetBinCenter(iz),
00175                          values[continuous_i++]);
00176               }}}
00177         }
00178       }
00179 
00180       LogDebug(theCategory)<<" index "<<i<<":"<<j<<" -> "<<Pindex(i,j);
00181       theData[Pindex(i,j)]=pf;
00182       theData_fast[i][j]=pf;      theData_fast[j][i]=pf;
00183       if (!pf){
00184         edm::LogError(theCategory)<<" profile "<<pfname<<" in file "<<fileName<<" is not valid. exiting.";
00185         exit(1);
00186       }
00187     }}
00188     
00189   //verify it
00190   for (int i=0;i!=15;i++){ 
00191     if (theData[i]) {edm::LogVerbatim(theCategory)<<i<<" :"<<theData[i]->GetName()
00192                                                   <<" "<< theData[i]->GetTitle()<<std::endl;}}
00193  
00194 }

MuonErrorMatrix::~MuonErrorMatrix (  ) 

destructor

Definition at line 208 of file MuonErrorMatrix.cc.

References close().

00208                                    {
00209   close();
00210 }


Member Function Documentation

void MuonErrorMatrix::close ( void   ) 

close the root file attached to the class

Definition at line 198 of file MuonErrorMatrix.cc.

References i, theD, and theData.

Referenced by ~MuonErrorMatrix().

00198                            {
00199   //close the file
00200   if (theD){
00201     theD->cd();
00202     //write to it first if constructor
00203     if (theD->IsWritable()){
00204       for (int i=0;i!=15;i++){ if (theData[i]) { theData[i]->Write();}}}
00205     theD->Close();
00206   }}

bool MuonErrorMatrix::divide ( CurvilinearTrajectoryError num_error,
const CurvilinearTrajectoryError denom_error 
) [static]

divide term by term the two matrix

Definition at line 389 of file MuonErrorMatrix.cc.

References i, j, and CurvilinearTrajectoryError::matrix().

00389                                                                                                                   {
00390   //divide term by term the matrix
00391   const AlgebraicSymMatrix55 & denom_matrix=denom_error.matrix();
00392   AlgebraicSymMatrix55 num_matrix = num_error.matrix();
00393   // 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
00394   // need to loop only on i:0-5, j:i-5
00395   for(int i = 0;i!=5;i++){for(int j = i;j!=5;j++){
00396       if (denom_matrix(i,j)==0) return false;
00397       num_matrix(i,j)/=denom_matrix(i,j);
00398     }}
00399   num_error = CurvilinearTrajectoryError(num_matrix);
00400   return true;
00401 }

int MuonErrorMatrix::findBin ( TAxis *  axis,
double  value 
)

method to get the bin index, taking care of under/overlow: first(1)/last(GetNbins())returned

Definition at line 271 of file MuonErrorMatrix.cc.

References HLT_VtxMuL3::result.

Referenced by getFast(), and Value().

00271                                                       {
00272   //find the proper bin, protecting against under/over flow
00273   int result = axis->FindBin(value);
00274   if (result <= 0) result=1; //protect against under flow
00275   else if (result > axis->GetNbins() ) result = axis->GetNbins();
00276   return result;}

TProfile3D* MuonErrorMatrix::get ( int  i,
int  j 
) [inline]

actually get access to the TProfile3D used for the parametrization

Definition at line 54 of file MuonErrorMatrix.h.

References i, Index(), and j.

00054 {return Index(i,j);}

CurvilinearTrajectoryError MuonErrorMatrix::get ( GlobalVector  momentum  ) 

main method to be used. Retrieve a 5x5 symetrical matrix according to parametrization of error or scale factor

Definition at line 214 of file MuonErrorMatrix.cc.

References i, j, V, and Value().

Referenced by TSGFromPropagation::adjust(), TSGForRoadSearch::adjust(), MuonErrorMatrixAdjuster::fix_cov_matrix(), and TSGFromPropagation::init().

00214                                                                       {
00215   AlgebraicSymMatrix55 V;
00216   for (int i=0;i!=5;i++){for (int j=i;j!=5;j++){
00217       V(i,j) = Value(momentum,i,j);}}
00218   return CurvilinearTrajectoryError(V);}

CurvilinearTrajectoryError MuonErrorMatrix::getFast ( GlobalVector  momentum  ) 

Definition at line 220 of file MuonErrorMatrix.cc.

References eta, PV3DBase< T, PVType, FrameType >::eta(), findBin(), i, j, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), phi, theData_fast, V, and values.

00220                                                                          {
00221   //will be faster but make assumptions that could be broken at some point
00222   //  same bining for all TProfile
00223   AlgebraicSymMatrix55 V;
00224 
00225   double pT = momentum.perp();
00226   double eta = fabs(momentum.eta());
00227   double phi = momentum.phi();
00228 
00229   //assume all the same axis in X,Y,Z
00230   int iBin_x= findBin(theData_fast[0][0]->GetXaxis(),pT);
00231   int iBin_y= findBin(theData_fast[0][0]->GetYaxis(),eta);
00232   int iBin_z= findBin(theData_fast[0][0]->GetZaxis(),phi);
00233 
00234   //retreive values
00235   double values[5][5]; //sigma_i and rho_ij
00236   for (int i=0;i!=5;i++){for (int j=i;j!=5;j++){
00237       values[i][j]=theData_fast[i][j]->GetBinContent(iBin_x, iBin_y, iBin_z);
00238     }}
00239 
00240   for (int i=0;i!=5;i++){for (int j=i;j!=5;j++){
00241       if (i==j){
00242         //sigma_i * sigma_i
00243         V(i,j) = values[i][j];
00244         V(i,j)*=V(i,j);
00245       }
00246       else{
00247         //sigma_i * sigma_j * rho_ij
00248         V(i,j) = values[i][i] * values[j][j] * values[i][j];
00249       }
00250     }}
00251 
00252   return CurvilinearTrajectoryError(V);}

TProfile3D* MuonErrorMatrix::Index ( int  i,
int  j 
) [inline, private]

internal method to get access to the profiles

Definition at line 82 of file MuonErrorMatrix.h.

References Pindex(), and theData.

Referenced by get(), Rms(), and Value().

00082                                            {
00083     return theData[Pindex(i,j)];}

uint MuonErrorMatrix::index ( int  i,
int  j 
) [inline]

Definition at line 55 of file MuonErrorMatrix.h.

References Pindex().

00055 {return Pindex(i,j);}

void MuonErrorMatrix::multiply ( CurvilinearTrajectoryError initial_error,
const CurvilinearTrajectoryError scale_error 
) [static]

multiply term by term the two matrix

Definition at line 378 of file MuonErrorMatrix.cc.

References i, j, and CurvilinearTrajectoryError::matrix().

Referenced by TSGFromPropagation::adjust(), and TSGForRoadSearch::adjust().

00378                                                                                                                         {
00379   //scale term by term the matrix
00380   const AlgebraicSymMatrix55 & scale_matrix=scale_error.matrix();
00381   AlgebraicSymMatrix55 revised_matrix = initial_error.matrix();
00382   // 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
00383   // need to loop only on i:0-5, j:i-5
00384   for(int i = 0;i!=5;i++){for(int j = i;j!=5;j++){
00385       revised_matrix(i,j)*=scale_matrix(i,j);
00386     }}
00387   initial_error = CurvilinearTrajectoryError(revised_matrix);
00388 }

int MuonErrorMatrix::Pindex ( int  i,
int  j 
) [inline, private]

internal methods to get the index of a matrix term.

Definition at line 78 of file MuonErrorMatrix.h.

References funct::abs(), and offset.

Referenced by Index(), index(), and MuonErrorMatrix().

00078                                    {
00079     static const int offset[5]={0,5,5+4,5+4+3,5+4+3+2};
00080     return offset[i]+abs(j-i);}

double MuonErrorMatrix::Rms ( GlobalVector momentum,
int  i,
int  j 
) [private]

internal method that retreives the error on the value of the parametrization for term i,j

Definition at line 332 of file MuonErrorMatrix.cc.

References eta, PV3DBase< T, PVType, FrameType >::eta(), Index(), LogDebug, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), phi, HLT_VtxMuL3::result, and theCategory.

00332                                                                   {
00333   double result=0;
00334   TProfile3D * ij = Index(i,j);
00335   if (!ij){edm::LogError(theCategory)<<"cannot get the profile ("<<i<<":"<<i<<")"; return result;} 
00336   double pT = momentum.perp();
00337   double eta = fabs(momentum.eta());
00338   double phi = momentum.phi();
00339   
00340   int iBin_x= ij->GetXaxis()->FindBin(pT);
00341   int iBin_y= ij->GetYaxis()->FindBin(eta);
00342   int iBin_z= ij->GetZaxis()->FindBin(phi);
00343   result=ij->GetBinError(iBin_x,iBin_y,iBin_z);
00344 
00345   LogDebug(theCategory)<<"for: (pT,eta,phi)=("<<pT<<", "<<eta<<", "<<phi<<") error["<<i<<","<<j<<"] is: "<<result;
00346   return result;
00347 }

double MuonErrorMatrix::Term ( const AlgebraicSymMatrix55 curv,
int  i,
int  j 
) [static]

provide the numerical value used. sigma or correlation factor

Definition at line 349 of file MuonErrorMatrix.cc.

References HLT_VtxMuL3::result, and funct::sqrt().

00349                                                                            {
00350   //return sigma or correlation factor
00351   double result=0;
00352   if (i==j){
00353     result = curv(i,j);
00354     if (result<0){
00355       //check validity of this guy
00356       edm::LogError("MuonErrorMatrix")<<"invalid term in the error matrix.\n sii: "<< result;
00357       return 0;}
00358     return sqrt(result);}
00359   else{
00360     double si = curv(i,i);
00361     double sj = curv(j,j);
00362 
00363     if (si<=0 || sj<=0){
00364       edm::LogError("MuonErrorMatrix")<<"invalid term in the error matrix.\n si: "
00365                                 <<si<<" sj: "<<sj<<". result will be corrupted\n"<<curv;
00366       return 0;}
00367 
00368     si=sqrt(si);
00369     sj=sqrt(sj);
00370     //check validity
00371 
00372     return result = curv(i,j)/(si*sj);}
00373   //by default
00374   return 0;
00375 }

double MuonErrorMatrix::Value ( GlobalVector momentum,
int  i,
int  j 
) [private]

internal method that retreives the value of the parametrization for term i,j

Definition at line 279 of file MuonErrorMatrix.cc.

References eta, PV3DBase< T, PVType, FrameType >::eta(), findBin(), Index(), LogDebug, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), phi, HLT_VtxMuL3::result, and theCategory.

Referenced by get().

00279                                                                     {
00280   double result=0;
00281   TProfile3D * ij = Index(i,j);
00282   if (!ij) {edm::LogError(theCategory)<<"cannot get the profile ("<<i<<":"<<j<<")"; return result;}
00283   
00284   double pT = momentum.perp();
00285   double eta = fabs(momentum.eta());
00286   double phi = momentum.phi();
00287 
00288   int iBin_x= findBin(ij->GetXaxis(),pT);
00289   int iBin_y= findBin(ij->GetYaxis(),eta);
00290   int iBin_z= findBin(ij->GetZaxis(),phi);
00291 
00292   if (i!=j){
00293     //return the covariance = correlation*sigma_1 *sigma_2;
00294     TProfile3D * ii = Index(i,i);
00295     TProfile3D * jj = Index(j,j);
00296     if (!ii){edm::LogError(theCategory)<<"cannot get the profile ("<<i<<":"<<i<<")"; return result;}
00297     if (!jj){edm::LogError(theCategory)<<"cannot get the profile ("<<j<<":"<<j<<")"; return result;}
00298 
00299 
00300     int iBin_i_x = findBin(ii->GetXaxis(),pT);
00301     int iBin_i_y = findBin(ii->GetYaxis(),eta);
00302     int iBin_i_z = findBin(ii->GetZaxis(),phi);
00303     int iBin_j_x = findBin(jj->GetXaxis(),pT);
00304     int iBin_j_y = findBin(jj->GetYaxis(),eta);
00305     int iBin_j_z = findBin(jj->GetZaxis(),phi);
00306 
00307     double corr = ij->GetBinContent(iBin_x,iBin_y,iBin_z);
00308     double sigma_1 = (ii->GetBinContent(iBin_i_x,iBin_i_y,iBin_i_z));
00309     double sigma_2 = (jj->GetBinContent(iBin_j_x,iBin_j_y,iBin_j_z));
00310 
00311     LogDebug(theCategory)<<"for: (pT,eta,phi)=("<<pT<<", "<<eta<<", "<<phi<<") nterms are"
00312                        <<"\nrho["<<i<<","<<j<<"]: "<<corr<<" ["<< iBin_x<<", "<<iBin_y<<", "<<iBin_z<<"]"
00313       //                       <<"\nsigma^2["<<i<<","<<i<<"]: "<< sigma2_1<<" ["<< iBin_i_x<<", "<<iBin_i_y<<", "<<iBin_i_z<<"]"
00314       //                       <<"\nsigma^2["<<j<<","<<j<<"]: "<< sigma2_2<<" ["<< iBin_i_x<<", "<<iBin_i_y<<", "<<iBin_i_z<<"]"
00315                        <<"\nsigma["<<i<<","<<i<<"]: "<< sigma_1
00316                        <<"\nsigma["<<j<<","<<j<<"]: "<< sigma_2;
00317     
00318     result=corr*sigma_1*sigma_2;
00319     LogDebug(theCategory)<<"for: (pT,eta,phi)=("<<pT<<", "<<eta<<", "<<phi<<") Covariance["<<i<<","<<j<<"] is: "<<result;
00320     return result;
00321   }
00322   else{
00323     //return the variance = sigma_1 **2
00324     //    result=ij->GetBinContent(iBin);
00325     result=ij->GetBinContent(iBin_x,iBin_y,iBin_z);
00326     result*=result;
00327     LogDebug(theCategory)<<"for: (pT,eta,phi)=("<<pT<<", "<<eta<<", "<<phi<<") sigma^2["<<i<<","<<j<<"] is: "<<result;
00328     return result;
00329   }
00330 }


Member Data Documentation

std::string MuonErrorMatrix::theCategory [private]

log category: "MuonErrorMatrix"

Definition at line 68 of file MuonErrorMatrix.h.

Referenced by MuonErrorMatrix(), Rms(), and Value().

TDirectory* MuonErrorMatrix::theD [private]

the attached root file, where the parametrization is saved

Definition at line 71 of file MuonErrorMatrix.h.

Referenced by close(), and MuonErrorMatrix().

TProfile3D* MuonErrorMatrix::theData[15] [private]

15 TProfile, each holding he parametrization of each term of the 5x5

Definition at line 73 of file MuonErrorMatrix.h.

Referenced by close(), Index(), and MuonErrorMatrix().

TProfile3D* MuonErrorMatrix::theData_fast[5][5] [private]

Definition at line 74 of file MuonErrorMatrix.h.

Referenced by getFast(), and MuonErrorMatrix().

const TString MuonErrorMatrix::vars = {"#frac{q}{|p|}","#lambda","#varphi_{0}","X_{T}","Y_{T}"} [static]

names of the variables of the 5x5 error matrix

Definition at line 58 of file MuonErrorMatrix.h.

Referenced by MuonErrorMatrix().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:28:43 2009 for CMSSW by  doxygen 1.5.4