| 3280 |
if ( higp > 0.164 ) higp = 0.164; |
if ( higp > 0.164 ) higp = 0.164; |
| 3281 |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp11[rj] != 0.))){ |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp11[rj] != 0.))){ |
| 3282 |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
| 3283 |
Float_t nyc1[5]={ 0.0015, 0.0015, ws13-0.0015, ws13-0.0015, 0.0015}; |
Float_t nyc1[5]={ 0.0015, 0.0015, (float)(ws13-0.0015), (float)(ws13-0.0015), 0.0015}; |
| 3284 |
Float_t nxc[5]; |
Float_t nxc[5]; |
| 3285 |
Float_t nyc[5]; |
Float_t nyc[5]; |
| 3286 |
for (Int_t i = 0; i<5 ; i++) { |
for (Int_t i = 0; i<5 ; i++) { |
| 3366 |
if ( higp > 0.203 ) higp = 0.203; |
if ( higp > 0.203 ) higp = 0.203; |
| 3367 |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp12[j] != 0.))){ |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp12[j] != 0.))){ |
| 3368 |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
| 3369 |
Float_t nyc1[5]={ -0.0015, -0.0015, -ws13+0.0015, -ws13+0.0015, -0.0015}; |
Float_t nyc1[5]={ -0.0015, -0.0015, (float)(-ws13+0.0015), (float)(-ws13+0.0015), -0.0015}; |
| 3370 |
Float_t nxc[5]; |
Float_t nxc[5]; |
| 3371 |
Float_t nyc[5]; |
Float_t nyc[5]; |
| 3372 |
for (Int_t i = 0; i<5 ; i++) { |
for (Int_t i = 0; i<5 ; i++) { |
| 3455 |
if ( higp > 0.089 ) higp = 0.089; |
if ( higp > 0.089 ) higp = 0.089; |
| 3456 |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp21[j] != 0.))){ |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp21[j] != 0.))){ |
| 3457 |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
| 3458 |
Float_t nyc1[5]={ 0.0015, 0.0015, ws2-0.0015, ws2-0.0015, 0.}; |
Float_t nyc1[5]={ 0.0015, 0.0015, (float)(ws2-0.0015), (float)(ws2-0.0015), 0.}; |
| 3459 |
Float_t nxc[5]; |
Float_t nxc[5]; |
| 3460 |
Float_t nyc[5]; |
Float_t nyc[5]; |
| 3461 |
for (Int_t i = 0; i<5 ; i++) { |
for (Int_t i = 0; i<5 ; i++) { |
| 3546 |
if ( higp > 0.074 ) higp = 0.074; |
if ( higp > 0.074 ) higp = 0.074; |
| 3547 |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp22[rj] != 0.))){ |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp22[rj] != 0.))){ |
| 3548 |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
| 3549 |
Float_t nyc1[5]={ -0.0015, -0.0015, -ws2+0.0015, -ws2+0.0015, -0.0015}; |
Float_t nyc1[5]={ -0.0015, -0.0015, (float)(-ws2+0.0015), (float)(-ws2+0.0015), -0.0015}; |
| 3550 |
Float_t nxc[5]; |
Float_t nxc[5]; |
| 3551 |
Float_t nyc[5]; |
Float_t nyc[5]; |
| 3552 |
for (Int_t i = 0; i<5 ; i++) { |
for (Int_t i = 0; i<5 ; i++) { |
| 3637 |
if ( higp > 0.074 ) higp = 0.074; |
if ( higp > 0.074 ) higp = 0.074; |
| 3638 |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp31[rj] != 0.))){ |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp31[rj] != 0.))){ |
| 3639 |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
| 3640 |
Float_t nyc1[5]={ 0.0015, 0.0015, ws13-0.0015, ws13-0.0015, 0.0015}; |
Float_t nyc1[5]={ 0.0015, 0.0015, (float)(ws13-0.0015), (float)(ws13-0.0015), 0.0015}; |
| 3641 |
Float_t nxc[5]; |
Float_t nxc[5]; |
| 3642 |
Float_t nyc[5]; |
Float_t nyc[5]; |
| 3643 |
for (Int_t i = 0; i<5 ; i++) { |
for (Int_t i = 0; i<5 ; i++) { |
| 3725 |
if ( higp > 0.089 ) higp = 0.089; |
if ( higp > 0.089 ) higp = 0.089; |
| 3726 |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp32[j] != 0.))){ |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp32[j] != 0.))){ |
| 3727 |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
| 3728 |
Float_t nyc1[5]={ -0.0015, -0.0015, -ws13+0.0015, -ws13+0.0015, -0.0015}; |
Float_t nyc1[5]={ -0.0015, -0.0015, (float)(-ws13+0.0015), (float)(-ws13+0.0015), -0.0015}; |
| 3729 |
Float_t nxc[5]; |
Float_t nxc[5]; |
| 3730 |
Float_t nyc[5]; |
Float_t nyc[5]; |
| 3731 |
for (Int_t i = 0; i<5 ; i++) { |
for (Int_t i = 0; i<5 ; i++) { |
| 4101 |
// |
// |
| 4102 |
if ( true ){ |
if ( true ){ |
| 4103 |
// PMTs |
// PMTs |
| 4104 |
Float_t xc1[5]={ 0., 0.014*var.sfx, 0.014*var.sfx-var.sfx*var.sfx*pmt1*cos(apmt1), -var.sfx*var.sfx*pmt1*cos(apmt1), 0.}; |
Float_t xc1[5]={ 0., (float)(0.014*var.sfx), (float)(0.014*var.sfx-var.sfx*var.sfx*pmt1*cos(apmt1)), (float)(-var.sfx*var.sfx*pmt1*cos(apmt1)), 0.}; |
| 4105 |
Float_t yc1[5]={ 0., 0.011*var.sfy, 0.011*var.sfy+var.sfy*var.sfy*pmt1*sin(apmt1), var.sfy*var.sfy*pmt1*sin(apmt1), 0.}; |
Float_t yc1[5]={ 0., (float)(0.011*var.sfy), (float)(0.011*var.sfy+var.sfy*var.sfy*pmt1*sin(apmt1)), (float)(var.sfy*var.sfy*pmt1*sin(apmt1)), 0.}; |
| 4106 |
Float_t xc2[5]={ 0., 0.011*var.sfx, 0.011*var.sfx-pmt2*var.sfx*var.sfx*cos(apmt2), -pmt2*var.sfx*var.sfx*cos(apmt2), 0.}; |
Float_t xc2[5]={ 0., (float)(0.011*var.sfx), (float)(0.011*var.sfx-pmt2*var.sfx*var.sfx*cos(apmt2)), (float)(-pmt2*var.sfx*var.sfx*cos(apmt2)), 0.}; |
| 4107 |
Float_t yc2[5]={ 0., 0.015*var.sfy, 0.015*var.sfy+var.sfy*pmt2*var.sfy*sin(apmt2), var.sfy*pmt2*var.sfy*sin(apmt2), 0.}; |
Float_t yc2[5]={ 0., (float)(0.015*var.sfy), (float)(0.015*var.sfy+var.sfy*pmt2*var.sfy*sin(apmt2)), (float)(var.sfy*pmt2*var.sfy*sin(apmt2)), 0.}; |
| 4108 |
// SCINTs |
// SCINTs |
| 4109 |
Float_t xcc1[10]={-0.149, -0.090165, -0.090165, -0.149, -0.242, -0.257, -0.212, -0.257, -0.242, -0.149}; |
Float_t xcc1[10]={-0.149, -0.090165, -0.090165, -0.149, -0.242, -0.257, -0.212, -0.257, -0.242, -0.149}; |
| 4110 |
Float_t ycc1[10]={ 0.169, 0.108165, -0.108165, -0.169, -0.169, -0.158, 0., 0.158, 0.169, 0.169}; |
Float_t ycc1[10]={ 0.169, 0.108165, -0.108165, -0.169, -0.169, -0.158, 0., 0.158, 0.169, 0.169}; |
| 5539 |
linea->SetLineWidth(2); |
linea->SetLineWidth(2); |
| 5540 |
linea->SetLineColor(sigcol2); |
linea->SetLineColor(sigcol2); |
| 5541 |
linea->Draw(); |
linea->Draw(); |
| 5542 |
Float_t tx[5] = {x-0.3, x+0.3, x+0.3, x-0.3, x-0.3}; |
Float_t tx[5] = {(float)(x-0.3), (float)(x+0.3), (float)(x+0.3), (float)(x-0.3), (float)(x-0.3)}; |
| 5543 |
Float_t tz[5] = {0., 0., 0.5, 0.5, 0.}; |
Float_t tz[5] = {0., 0., 0.5, 0.5, 0.}; |
| 5544 |
TPolyLine *tlinea = new TPolyLine(5,tx,tz); |
TPolyLine *tlinea = new TPolyLine(5,tx,tz); |
| 5545 |
tlinea->SetLineWidth(1); |
tlinea->SetLineWidth(1); |
| 5569 |
linea->SetLineWidth(2); |
linea->SetLineWidth(2); |
| 5570 |
linea->SetLineColor(sigcol2); |
linea->SetLineColor(sigcol2); |
| 5571 |
linea->Draw(); |
linea->Draw(); |
| 5572 |
Float_t tx[5] = {x-0.3, x+0.3, x+0.3, x-0.3, x-0.3}; |
Float_t tx[5] = {(float)(x-0.3), (float)(x+0.3), (float)(x+0.3), (float)(x-0.3), (float)(x-0.3)}; |
| 5573 |
Float_t tz[5] = {0., 0., 0.5, 0.5, 0.}; |
Float_t tz[5] = {0., 0., 0.5, 0.5, 0.}; |
| 5574 |
TPolyLine *tlinea = new TPolyLine(5,tx,tz); |
TPolyLine *tlinea = new TPolyLine(5,tx,tz); |
| 5575 |
tlinea->SetLineColor(dcol); |
tlinea->SetLineColor(dcol); |
| 6037 |
// printf("qua \n"); |
// printf("qua \n"); |
| 6038 |
Int_t npoint = 100; |
Int_t npoint = 100; |
| 6039 |
Float_t zin[100]; |
Float_t zin[100]; |
| 6040 |
Double_t xout[100]; |
// Double_t xout[100]; |
| 6041 |
Double_t yout[100]; |
// Double_t yout[100]; |
| 6042 |
Int_t ifail = 0; |
Int_t ifail = 0; |
| 6043 |
Int_t trcol = 10; |
Int_t trcol = 10; |
| 6044 |
// |
// |
| 6056 |
Float_t tzy1[15]; |
Float_t tzy1[15]; |
| 6057 |
// |
// |
| 6058 |
for ( Int_t e = 0; e < 100 ; e++) { |
for ( Int_t e = 0; e < 100 ; e++) { |
| 6059 |
xout[e] = 0.; |
// xout[e] = 0.; |
| 6060 |
yout[e] = 0.; |
// yout[e] = 0.; |
| 6061 |
// |
// |
| 6062 |
tx[e] = 0.; |
tx[e] = 0.; |
| 6063 |
ty[e] = 0.; |
ty[e] = 0.; |
| 6232 |
// |
// |
| 6233 |
stringstream xevent; |
stringstream xevent; |
| 6234 |
stringstream yevent; |
stringstream yevent; |
| 6235 |
Float_t sdexy[2][22][96]; |
// Float_t sdexy[2][22][96]; |
| 6236 |
Float_t sdexyc[2][22][96]; |
// Float_t sdexyc[2][22][96]; |
| 6237 |
// |
// |
| 6238 |
for (Int_t m = 0; m < 22; m++){ |
for (Int_t m = 0; m < 22; m++){ |
| 6239 |
for (Int_t l = 0; l < 2; l++){ |
for (Int_t l = 0; l < 2; l++){ |
| 6248 |
// |
// |
| 6249 |
// determine what kind of event we are going to analyze |
// determine what kind of event we are going to analyze |
| 6250 |
// |
// |
| 6251 |
bool isCOMP = 0; |
// bool isCOMP = 0; |
| 6252 |
bool isFULL = 0; |
// bool isFULL = 0; |
| 6253 |
bool isRAW = 0; |
bool isRAW = 0; |
| 6254 |
if ( de->stwerr[se] & (1 << 16) ) isCOMP = 1; |
// if ( de->stwerr[se] & (1 << 16) ) isCOMP = 1; |
| 6255 |
if ( de->stwerr[se] & (1 << 17) ) isFULL = 1; |
// if ( de->stwerr[se] & (1 << 17) ) isFULL = 1; |
| 6256 |
if ( de->stwerr[se] & (1 << 3) ) isRAW = 1; |
if ( de->stwerr[se] & (1 << 3) ) isRAW = 1; |
| 6257 |
// |
// |
| 6258 |
// save the prevoius energy deposit and calibration in sbase, sdexy, sdexyc |
// save the prevoius energy deposit and calibration in sbase, sdexy, sdexyc |
| 6262 |
for (Int_t nn = 0; nn < 96; nn++){ |
for (Int_t nn = 0; nn < 96; nn++){ |
| 6263 |
if ( nn%16 == 0 ) pre++; |
if ( nn%16 == 0 ) pre++; |
| 6264 |
evento.base[l][m][pre] = calib.calbase[l][m][pre]; |
evento.base[l][m][pre] = calib.calbase[l][m][pre]; |
| 6265 |
sdexy[l][m][nn] = evento.dexy[l][m][nn]; |
// sdexy[l][m][nn] = evento.dexy[l][m][nn]; |
| 6266 |
evento.dexy[l][m][nn] = de->dexy[l][m][nn] ; |
evento.dexy[l][m][nn] = de->dexy[l][m][nn] ; |
| 6267 |
sdexyc[l][m][nn] = evento.dexy[l][m][nn]; |
// sdexyc[l][m][nn] = evento.dexy[l][m][nn]; |
| 6268 |
evento.dexyc[l][m][nn] = de->dexy[l][m][nn] ; |
evento.dexyc[l][m][nn] = de->dexy[l][m][nn] ; |
| 6269 |
}; |
}; |
| 6270 |
}; |
}; |
| 6360 |
// Define variables |
// Define variables |
| 6361 |
// |
// |
| 6362 |
UInt_t etime = var.etime; |
UInt_t etime = var.etime; |
| 6363 |
Float_t estrip[2][22][96], ener, basel,sdexy[2][22][96],sdexyc[2][22][96]; |
Float_t estrip[2][22][96], ener, basel;//,sdexy[2][22][96],sdexyc[2][22][96]; |
| 6364 |
Int_t badstrip = 0; |
Int_t badstrip = 0; |
| 6365 |
qtot = 0.; |
qtot = 0.; |
| 6366 |
nstrip = 0; |
nstrip = 0; |
| 6456 |
// |
// |
| 6457 |
// determine what kind of event we are going to analyze |
// determine what kind of event we are going to analyze |
| 6458 |
// |
// |
| 6459 |
bool isCOMP = 0; |
// bool isCOMP = 0; |
| 6460 |
bool isFULL = 0; |
// bool isFULL = 0; |
| 6461 |
bool isRAW = 0; |
bool isRAW = 0; |
| 6462 |
if ( de->stwerr[se] & (1 << 16) ) isCOMP = 1; |
// if ( de->stwerr[se] & (1 << 16) ) isCOMP = 1; |
| 6463 |
if ( de->stwerr[se] & (1 << 17) ) isFULL = 1; |
// if ( de->stwerr[se] & (1 << 17) ) isFULL = 1; |
| 6464 |
if ( de->stwerr[se] & (1 << 3) ) isRAW = 1; |
if ( de->stwerr[se] & (1 << 3) ) isRAW = 1; |
| 6465 |
// |
// |
| 6466 |
// save the prevoius energy deposit and calibration in sbase, sdexy, sdexyc |
// save the prevoius energy deposit and calibration in sbase, sdexy, sdexyc |
| 6470 |
for (Int_t nn = 0; nn < 96; nn++){ |
for (Int_t nn = 0; nn < 96; nn++){ |
| 6471 |
if ( nn%16 == 0 ) pre++; |
if ( nn%16 == 0 ) pre++; |
| 6472 |
evento.base[l][m][pre] = calib.calbase[l][m][pre]; |
evento.base[l][m][pre] = calib.calbase[l][m][pre]; |
| 6473 |
sdexy[l][m][nn] = evento.dexy[l][m][nn]; |
// sdexy[l][m][nn] = evento.dexy[l][m][nn]; |
| 6474 |
evento.dexy[l][m][nn] = de->dexy[l][m][nn] ; |
evento.dexy[l][m][nn] = de->dexy[l][m][nn] ; |
| 6475 |
sdexyc[l][m][nn] = evento.dexy[l][m][nn]; |
// sdexyc[l][m][nn] = evento.dexy[l][m][nn]; |
| 6476 |
evento.dexyc[l][m][nn] = de->dexy[l][m][nn] ; |
evento.dexyc[l][m][nn] = de->dexy[l][m][nn] ; |
| 6477 |
}; |
}; |
| 6478 |
}; |
}; |
| 6481 |
// |
// |
| 6482 |
Int_t done = 0; |
Int_t done = 0; |
| 6483 |
Int_t rdone = 0; |
Int_t rdone = 0; |
| 6484 |
Int_t fdone = 0; |
// Int_t fdone = 0; |
| 6485 |
pre = -1; |
pre = -1; |
| 6486 |
for (Int_t n =0 ; n < 96; n++){ |
for (Int_t n =0 ; n < 96; n++){ |
| 6487 |
if ( n%16 == 0 ) { |
if ( n%16 == 0 ) { |
| 6488 |
pre++; |
pre++; |
| 6489 |
done = 0; |
done = 0; |
| 6490 |
rdone = 0; |
rdone = 0; |
| 6491 |
fdone = 0; |
// fdone = 0; |
| 6492 |
}; |
}; |
| 6493 |
// |
// |
| 6494 |
// baseline check and calculation |
// baseline check and calculation |
| 6710 |
} |
} |
| 6711 |
|
|
| 6712 |
void FEVdetector::Calo1stcalib(){ |
void FEVdetector::Calo1stcalib(){ |
| 6713 |
Float_t estrip[2][22][96]; |
// Float_t estrip[2][22][96]; |
| 6714 |
// |
// |
| 6715 |
// this is the value of the mip for each strip. To be changed when we will have the real values |
// this is the value of the mip for each strip. To be changed when we will have the real values |
| 6716 |
// |
// |
| 6728 |
for (Int_t k = 0; k < 22; k++ ){ |
for (Int_t k = 0; k < 22; k++ ){ |
| 6729 |
for (Int_t l = 0; l < 96; l++ ){ |
for (Int_t l = 0; l < 96; l++ ){ |
| 6730 |
calib.calped[m][k][l] = 0. ; |
calib.calped[m][k][l] = 0. ; |
| 6731 |
estrip[m][k][l] = 0.; |
// estrip[m][k][l] = 0.; |
| 6732 |
}; |
}; |
| 6733 |
}; |
}; |
| 6734 |
} |
} |