1290 |
float RMAXsp = CaloElectron_parameters::Get()->RMAXsp; |
float RMAXsp = CaloElectron_parameters::Get()->RMAXsp; |
1291 |
float RMAX = CaloElectron_parameters::Get()->RMAX; |
float RMAX = CaloElectron_parameters::Get()->RMAX; |
1292 |
|
|
1293 |
double x1,x2,x3,x4,x5,x6,ps[3]; |
double x1,x2,x3,x4,x5,ps[3]; |
1294 |
|
// double x1,x2,x3,x4,x5,x6,ps[3]; |
1295 |
x1 = DEAD; |
x1 = DEAD; |
1296 |
x2 = x1 + PITCH*32; |
x2 = x1 + PITCH*32; |
1297 |
x3 = x2 + DEAD + GLUE + DEAD; |
x3 = x2 + DEAD + GLUE + DEAD; |
1298 |
x4 = x3 + PITCH*32; |
x4 = x3 + PITCH*32; |
1299 |
x5 = x4 + DEAD + GLUE + DEAD; |
x5 = x4 + DEAD + GLUE + DEAD; |
1300 |
x6 = x5 + PITCH*32; |
// x6 = x5 + PITCH*32; |
1301 |
ps[0] = x1; |
ps[0] = x1; |
1302 |
ps[1] = x3; |
ps[1] = x3; |
1303 |
ps[2] = x5; |
ps[2] = x5; |
1866 |
fx.SetParameter(2,file_rc); |
fx.SetParameter(2,file_rc); |
1867 |
|
|
1868 |
// sensitive area |
// sensitive area |
1869 |
double x1,x2,x3,x4,x5,x6,ps[3]; |
// double x1,x2,x3,x4,x5,x6,ps[3]; |
1870 |
|
double x1,x2,x3,x4,x5,ps[3]; |
1871 |
x1 = DEAD; |
x1 = DEAD; |
1872 |
x2 = x1 + PITCH*32; |
x2 = x1 + PITCH*32; |
1873 |
x3 = x2 + DEAD + GLUE + DEAD; |
x3 = x2 + DEAD + GLUE + DEAD; |
1874 |
x4 = x3 + PITCH*32; |
x4 = x3 + PITCH*32; |
1875 |
x5 = x4 + DEAD + GLUE + DEAD; |
x5 = x4 + DEAD + GLUE + DEAD; |
1876 |
x6 = x5 + PITCH*32; |
// x6 = x5 + PITCH*32; |
1877 |
ps[0] = x1; |
ps[0] = x1; |
1878 |
ps[1] = x3; |
ps[1] = x3; |
1879 |
ps[2] = x5; |
ps[2] = x5; |
1935 |
// integrale veloce |
// integrale veloce |
1936 |
// |
// |
1937 |
|
|
1938 |
double fmi,fma,k,c; |
// double fmi,fma,k,c; |
1939 |
|
double fmi,fma,k; |
1940 |
fx.SetParameter(3,xmi); |
fx.SetParameter(3,xmi); |
1941 |
fmi = fx.Integral(ymi,yma); |
fmi = fx.Integral(ymi,yma); |
1942 |
fx.SetParameter(3,xma); |
fx.SetParameter(3,xma); |
1943 |
fma = fx.Integral(ymi,yma); |
fma = fx.Integral(ymi,yma); |
1944 |
k = 0.; |
k = 0.; |
1945 |
if(fmi>0.&&fma>0.&&(xma-xmi)>0.)k=log(fma/fmi)/(xma-xmi); |
if(fmi>0.&&fma>0.&&(xma-xmi)>0.)k=log(fma/fmi)/(xma-xmi); |
1946 |
c = log(fmi)-k*xmi; |
//c = log(fmi)-k*xmi; |
1947 |
if(fabs(k)>1.e-6)integral += (fma-fmi)/k; |
if(fabs(k)>1.e-6)integral += (fma-fmi)/k; |
1948 |
|
|
1949 |
}else{ |
}else{ |
2403 |
// ///////////////////////////////////// |
// ///////////////////////////////////// |
2404 |
float stoll_g = 5;//maximum n.strips from gaps |
float stoll_g = 5;//maximum n.strips from gaps |
2405 |
float stoll_b = 10;//maximum n.strips from borders |
float stoll_b = 10;//maximum n.strips from borders |
2406 |
float toll = stoll_b*PITCH;//3.;//(cm) distance of shower axis from border on the last silicon plane |
// float toll = stoll_b*PITCH;//3.;//(cm) distance of shower axis from border on the last silicon plane |
2407 |
float qmin = 10;//(mip)minimum energy deposit per plane |
float qmin = 10;//(mip)minimum energy deposit per plane |
2408 |
// |
// |
2409 |
|
|
2422 |
// ------------------------------- |
// ------------------------------- |
2423 |
// shower axis must be contained within 3 cm (on the last plane) |
// shower axis must be contained within 3 cm (on the last plane) |
2424 |
// (otherwise the shower maximum could be not properly evaluated) |
// (otherwise the shower maximum could be not properly evaluated) |
2425 |
bool CONTAINED = false; |
// bool CONTAINED = false; |
2426 |
// |
// |
2427 |
// last silicon plane |
// last silicon plane |
2428 |
// |
// |
2429 |
int ip = 21; |
int ip = 21; |
2430 |
int iv = 0;//x |
int iv = 0;//x |
2431 |
cstrip.Set(iv,ip,0); |
// cstrip.Set(iv,ip,0); |
2432 |
float xcorner_l = cstrip.GetX(); |
// float xcorner_l = cstrip.GetX(); |
2433 |
float ycorner_l = cstrip.GetY(); |
// float ycorner_l = cstrip.GetY(); |
2434 |
cstrip.Set(iv,ip,95); |
cstrip.Set(iv,ip,95); |
2435 |
float xcorner_r = cstrip.GetX(); |
// float xcorner_r = cstrip.GetX(); |
2436 |
float ycorner_r = cstrip.GetY(); |
// float ycorner_r = cstrip.GetY(); |
2437 |
// |
// |
2438 |
if( |
// if( |
2439 |
trkcoordx[ip][iv] > xcorner_l + toll && |
// trkcoordx[ip][iv] > xcorner_l + toll && |
2440 |
trkcoordx[ip][iv] < xcorner_r - toll && |
// trkcoordx[ip][iv] < xcorner_r - toll && |
2441 |
trkcoordy[ip][iv] > ycorner_l + toll && |
// trkcoordy[ip][iv] > ycorner_l + toll && |
2442 |
trkcoordy[ip][iv] < ycorner_r - toll && |
// trkcoordy[ip][iv] < ycorner_r - toll && |
2443 |
true)CONTAINED = true; |
// true)CONTAINED = true; |
2444 |
// |
// |
2445 |
// if(!CONTAINED)return; // discard event if shower is not contained |
// if(!CONTAINED)return; // discard event if shower is not contained |
2446 |
|
|