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) ;
98 const CLHEP::HepMatrix & SigmaMatrix,
99 const CLHEP::HepMatrix & StatisticMatrix,
106 const CLHEP::HepMatrix & sigmaMatrix,
107 const CLHEP::HepMatrix & statisticMatrix,
118 int etaRef,
int phiRef,
119 const CLHEP::HepMatrix & sigmaMatrix,
120 const CLHEP::HepMatrix & statisticMatrix,
130 const CLHEP::HepMatrix & sigmaMatrix,
131 const CLHEP::HepMatrix & statisticMatrix,
133 double calibThres = 0.01,
144 double defaultVal = 1.) ;
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 mtrTransfer(double output[SCMaxEta][SCMaxPhi], 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)
void mtrReset(Type superModules[SCMaxEta][SCMaxPhi], const Type val)