Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:18:25

0001 #ifndef MYDEBUGTOOLS_H
0002 #define MYDEBUGTOOLS_H
0003 
0004 
0005 #include <map>
0006 #include <iostream>
0007 #include <iomanip>
0008 #include <TMatrixD.h>
0009 #include <assert.h>
0010 #include <sstream>
0011 #include <TMath.h>
0012 #include <TVector3.h>
0013 
0014 /*
0015 using namespace std;
0016 
0017 ofstream file("debug.txt");
0018 
0019 
0020 
0021 void outputMatrix(TMatrixDSym matrix, std::string caption = "")
0022 {
0023     if (caption != "") file << caption << endl;
0024     for (int i=0; i<matrix.GetNrows(); i++)
0025     {
0026         for (int j=0; j<matrix.GetNcols(); j++)
0027         {
0028             file << setw(12) << matrix[i][j] << "  ";
0029         }
0030         file << endl;
0031     }
0032 }
0033 
0034 void outputMatrix(TMatrixD matrix, std::string caption = "")
0035 {
0036     if (caption != "") file << caption << endl;
0037     for (int i=0; i<matrix.GetNrows(); i++)
0038     {
0039         for (int j=0; j<matrix.GetNcols(); j++)
0040         {
0041             file << setw(12) << matrix[i][j] << "  ";
0042         }
0043         file << endl;
0044     }
0045 }
0046 
0047 void outputVector(TVectorD vector, std::string caption)
0048 {
0049     if (caption != "") file << caption << endl;
0050     for (int i=0; i<vector.GetNoElements(); i++)
0051     {
0052         file << setw(12) << vector[i] << "  ";
0053     }
0054     file << endl;
0055 }
0056 
0057 void outputVector(TVector3 vector, std::string caption)
0058 {
0059     if (caption != "") file << caption << endl;
0060     for (int i=0; i<3; i++)
0061     {
0062         file << setw(12) << vector[i] << "  ";
0063     }
0064     file << endl;
0065 }
0066 */
0067 #endif