11 for (
int icry=0; icry<49; icry++) {
12 if (myMatrix[icry] > maxADC){
13 maxADC = myMatrix[icry];
24 if (mymatrix[xtal]<-50) { E1x1 = -1000.; }
25 else { E1x1 = mymatrix[xtal]; }
34 if ( (mymatrix[xtal-8]<-50) || (mymatrix[xtal-7]<-50) || (mymatrix[xtal-6]<-50) || (mymatrix[xtal-1]<-50) || (mymatrix[xtal]<-50) || (mymatrix[xtal+1]<-50) || (mymatrix[xtal+6]<-50) || (mymatrix[xtal+7]<-50) || (mymatrix[xtal+8]<-50) )
37 { E3x3 = mymatrix[xtal-8] + mymatrix[xtal-7] + mymatrix[xtal-6] + mymatrix[xtal-1] + mymatrix[xtal] + mymatrix[xtal+1] + mymatrix[xtal+6] + mymatrix[xtal+7] + mymatrix[xtal+8]; }
47 if( (mymatrix[xtal-16]<-50) || (mymatrix[xtal-15]<-50) || (mymatrix[xtal-14]<-50) || (mymatrix[xtal-13]<-50) || (mymatrix[xtal-12]<-50) || (mymatrix[xtal-9]<-50) || (mymatrix[xtal-8]<-50) || (mymatrix[xtal-7]<-50) || (mymatrix[xtal-6]<-50) || (mymatrix[xtal-5]<-50) || (mymatrix[xtal-2]<-50) || (mymatrix[xtal-1]<-50) || (mymatrix[xtal]<-50) || (mymatrix[xtal+1]<-50) || (mymatrix[xtal+2]<-50) || (mymatrix[xtal+5]<-50) || (mymatrix[xtal+6]<-50) || (mymatrix[xtal+7]<-50) || (mymatrix[xtal+8]<-50) || (mymatrix[xtal+9]<-50) || (mymatrix[xtal+12]<-50) || (mymatrix[xtal+13]<-50) || (mymatrix[xtal+14]<-50) || (mymatrix[xtal+15]<-50) || (mymatrix[xtal+16]<-50) )
50 { E5x5 = mymatrix[xtal-16] + mymatrix[xtal-15] + mymatrix[xtal-14] + mymatrix[xtal-13] + mymatrix[xtal-12] + mymatrix[xtal-9] + mymatrix[xtal-8] + mymatrix[xtal-7] + mymatrix[xtal-6] + mymatrix[xtal-5] + mymatrix[xtal-2] + mymatrix[xtal-1] + mymatrix[xtal] + mymatrix[xtal+1] + mymatrix[xtal+2] + mymatrix[xtal+5] + mymatrix[xtal+6] + mymatrix[xtal+7] + mymatrix[xtal+8] + mymatrix[xtal+9] + mymatrix[xtal+12] + mymatrix[xtal+13] + mymatrix[xtal+14] + mymatrix[xtal+15] + mymatrix[xtal+16]; }
58 for(
int jj = 0 ;
jj < 5 ;
jj++) energyieta[
jj] = 0.0;
60 for(
int jj = 0 ;
jj < 5 ;
jj++){
61 for (
int ii = 0;
ii < 5 ;
ii++) energyieta[
jj] += mymatrix[(8+
jj)+7*
ii];
68 for(
int jj = 0 ;
jj < 5 ;
jj++) energyiphi[
jj] = 0.0;
70 for(
int jj = 0 ;
jj < 5 ;
jj++){
71 for (
int ii = 0;
ii < 5 ;
ii++) energyiphi[
jj] += mymatrix[(8+7*
jj)+
ii];
109 if (
x[0] > par[0] - par[2]*par[1]) {
113 double nenner =
pow(par[3]/par[2], par[3])*
exp(-par[2]*par[2]/2.);
114 double zaehler = (par[0] -
x[0])/par[1] + par[3]/par[2] - par[2];
115 zaehler =
pow(zaehler, par[3]);
133 ret_val = par[0] + par[1]*
x[0]*
x[0] + par[2]*
x[0]*
x[0]*
x[0] + par[3]*
x[0]*
x[0]*
x[0]*
x[0];
135 ret_val = par[0] + par[4]*
x[0]*
x[0] + par[5]*
x[0]*
x[0]*
x[0] + par[6]*
x[0]*
x[0]*
x[0]*
x[0];
void energy_iphi(double mymatrix[], double *energyiphi)
double ene3x3_xtal(double mymatrix[], int xtal)
double ene1x1_xtal(double mymatrix[], int xtal)
double shapeFunction(double *x, double *par)
double ene5x5_xtal(double mymatrix[], int xtal)
double ene7x7_xtal(double mymatrix[])
double crystalball(double *x, double *par)
int maxAmplitInMatrix(double myMatrix[])
void energy_ieta(double mymatrix[], double *energyieta)
Power< A, B >::type pow(const A &a, const B &b)