11 #ifndef InvMatrixUtils_h
12 #define InvMatrixUtils_h
21 #include "CLHEP/Geometry/Point3D.h"
22 #include "CLHEP/Matrix/GenMatrix.h"
23 #include "CLHEP/Matrix/Matrix.h"
24 #include "CLHEP/Matrix/Vector.h"
52 HepGeom::Point3D<Float_t>
TBposition (
const Float_t amplit[7][7],
53 const Float_t beamEne,
54 const Float_t w0 = 4.0,
55 const Float_t x0 = 8.9,
56 const Float_t a0 = 6.2,
57 const Float_t sideX = 24.06,
58 const Float_t sideY = 22.02) ;
94 int extract (std::vector<int> *
output ,
const std::string & dati) ;
98 const CLHEP::HepMatrix & SigmaMatrix,
99 const CLHEP::HepMatrix & StatisticMatrix,
100 std::string
fileName =
"calibOutput.txt") ;
106 const CLHEP::HepMatrix & sigmaMatrix,
107 const CLHEP::HepMatrix & statisticMatrix,
108 std::string
fileName =
"calibOutput.txt",
109 std::string genTag =
"CAL_GENTAG",
110 std::string
method =
"CAL_METHOD",
111 std::string
version =
"CAL_VERSION",
112 std::string
type =
"CAL_TYPE") ;
118 int etaRef,
int phiRef,
119 const CLHEP::HepMatrix & sigmaMatrix,
120 const CLHEP::HepMatrix & statisticMatrix,
121 std::string
fileName =
"calibOutput.txt",
122 std::string genTag =
"CAL_GENTAG",
123 std::string
method =
"CAL_METHOD",
124 std::string
version =
"CAL_VERSION",
125 std::string
type =
"CAL_TYPE") ;
130 const CLHEP::HepMatrix & sigmaMatrix,
131 const CLHEP::HepMatrix & statisticMatrix,
132 std::string SMnumber =
"1",
133 double calibThres = 0.01,
134 std::string
fileName =
"calibOutput.txt",
135 std::string genTag =
"CAL_GENTAG",
136 std::string
method =
"CAL_METHOD",
137 std::string
version =
"CAL_VERSION",
138 std::string
type =
"CAL_TYPE") ;
143 const std::string & inputFileName,
144 double defaultVal = 1.) ;
149 const std::string & inputFileName) ;
172 std::pair<int,int>
findSupport (TH1F & histogram,
double thres = 0.) ;
179 CLHEP::HepMatrix *
input,
185 template <
class Type>
192 superModules[
e][
p] = val ;
TH1D * smartError(TH1D *strip)
int xtalFromiEtaiPhi(const int &iEta, const int &iPhi)
int readCMSSWcoeff(CLHEP::HepMatrix &calibcoeff, const std::string &inputFileName, double defaultVal=1.)
double etaCorrE1E49(int eta)
void mtrReset(Type superModules[85][20], const Type val)
void mtrTransfer(double output[85][20], CLHEP::HepMatrix *input, double Default)
int readCMSSWcoeffForComparison(CLHEP::HepMatrix &calibcoeff, const std::string &inputFileName)
double effectiveSigma(TH1F &histogram, int vSteps=100)
int iphiFromXtal(const int &xtal)
int writeCMSSWCoeff(const CLHEP::HepMatrix &lMatrix, double calibThres, float ERef, const CLHEP::HepMatrix &sigmaMatrix, const CLHEP::HepMatrix &statisticMatrix, std::string fileName="calibOutput.txt", std::string genTag="CAL_GENTAG", std::string method="CAL_METHOD", std::string version="CAL_VERSION", std::string type="CAL_TYPE")
TH1D * smartProfile(TH2F *strip, double width)
int phiFromXtal(const int &xtal)
TH1D * smartGausProfile(TH2F *strip, double width)
int writeCalibTxt(const CLHEP::HepMatrix &AmplitudeMatrix, const CLHEP::HepMatrix &SigmaMatrix, const CLHEP::HepMatrix &StatisticMatrix, std::string fileName="calibOutput.txt")
TFile * getGlobalTFile(std::string name="Inv MatrixTFile.root")
TCanvas * getGlobalCanvas(std::string name="Inv MatrixCanvas")
int translateCoeff(const CLHEP::HepMatrix &calibcoeff, const CLHEP::HepMatrix &sigmaMatrix, const CLHEP::HepMatrix &statisticMatrix, std::string SMnumber="1", double calibThres=0.01, std::string fileName="calibOutput.txt", std::string genTag="CAL_GENTAG", std::string method="CAL_METHOD", std::string version="CAL_VERSION", std::string type="CAL_TYPE")
int saveGlobalTFile(std::string name="Inv MatrixFile.root")
int extract(std::vector< int > *output, const std::string &dati)
double get3x3(const Float_t energy[7][7])
int ietaFromXtal(const int &xtal)
double get5x5(const Float_t energy[7][7])
std::pair< int, int > findSupport(TH1F &histogram, double thres=0.)
double etaCorrE1E9(int eta)
CLHEP::HepMatrix * getSavedMatrix(const std::string &name)
int xtalFromEtaPhi(const int &myEta, const int &myPhi)
int parseConfigFile(const TString &config)
double etaCorrE1E25(int eta)
HepGeom::Point3D< Float_t > TBposition(const Float_t amplit[7][7], const Float_t beamEne, const Float_t w0=4.0, const Float_t x0=8.9, const Float_t a0=6.2, const Float_t sideX=24.06, const Float_t sideY=22.02)
int etaFromXtal(const int &xtal)