19 |
// For PMTs 4,8,39,41 (counting 0..47) no charge was calculated |
// For PMTs 4,8,39,41 (counting 0..47) no charge was calculated |
20 |
// calibration arrays now including correct brackets to avoid |
// calibration arrays now including correct brackets to avoid |
21 |
// compiler warnings |
// compiler warnings |
22 |
|
//06-aug-2009: charge_layer_trk_raw and charge_layer_std_raw |
23 |
|
// added: These are the "raw" values before doing the 2nd-order |
24 |
|
// correction |
25 |
//***************************************************** |
//***************************************************** |
26 |
#include <ToFNuclei.h> |
#include <ToFNuclei.h> |
27 |
|
|
57 |
ncount_trk = 0.; |
ncount_trk = 0.; |
58 |
charge_trk = 0.; |
charge_trk = 0.; |
59 |
memset (charge_layer_trk,0,6*sizeof(Float_t)); // |
memset (charge_layer_trk,0,6*sizeof(Float_t)); // |
60 |
|
memset (charge_layer_trk_raw,0,6*sizeof(Float_t)); // |
61 |
memset (charge_PMT_trk,0,48*sizeof(Float_t)); // |
memset (charge_PMT_trk,0,48*sizeof(Float_t)); // |
62 |
memset (layerinfo_trk,0,6*sizeof(Int_t)); // |
memset (layerinfo_trk,0,6*sizeof(Int_t)); // |
63 |
ncount_std = 0.; |
ncount_std = 0.; |
64 |
charge_std = 0.; |
charge_std = 0.; |
65 |
memset (charge_layer_std,0,6*sizeof(Float_t)); // |
memset (charge_layer_std,0,6*sizeof(Float_t)); // |
66 |
|
memset (charge_layer_std_raw,0,6*sizeof(Float_t)); // |
67 |
memset (charge_PMT_std,0,48*sizeof(Float_t)); // |
memset (charge_PMT_std,0,48*sizeof(Float_t)); // |
68 |
memset (layerinfo_std,0,6*sizeof(Int_t)); // |
memset (layerinfo_std,0,6*sizeof(Int_t)); // |
69 |
}; |
}; |
435 |
if ((beta_mean < 0.05) || (beta_mean > 2.0)) { |
if ((beta_mean < 0.05) || (beta_mean > 2.0)) { |
436 |
for (Int_t jj=0; jj<48;jj++) charge_PMT_trk[jj] = 1001.; |
for (Int_t jj=0; jj<48;jj++) charge_PMT_trk[jj] = 1001.; |
437 |
for (Int_t jj=0; jj<6;jj++) charge_layer_trk[jj] = 1001.; |
for (Int_t jj=0; jj<6;jj++) charge_layer_trk[jj] = 1001.; |
438 |
|
for (Int_t jj=0; jj<6;jj++) charge_layer_trk_raw[jj] = 1001.; |
439 |
for (Int_t jj=0; jj<6;jj++) layerinfo_trk[jj] = 1001.; |
for (Int_t jj=0; jj<6;jj++) layerinfo_trk[jj] = 1001.; |
440 |
charge_trk = 1001.; |
charge_trk = 1001.; |
441 |
ncount_trk = 0; |
ncount_trk = 0; |
572 |
|
|
573 |
|
|
574 |
//========================================================================== |
//========================================================================== |
575 |
|
//============= Layercharge without 2nd-order correction ================= |
576 |
|
//========================================================================== |
577 |
|
|
578 |
|
for (Int_t jj=0; jj<6;jj++) charge_layer_trk_raw[jj] = Layercharge[jj]; |
579 |
|
|
580 |
|
//========================================================================== |
581 |
//========================= 2nd-order correction ======================= |
//========================= 2nd-order correction ======================= |
582 |
//========================================================================== |
//========================================================================== |
583 |
|
|
595 |
if ((ic>0)&&(ic<=5)) c_corr = c_corr/(1.*ic) ; |
if ((ic>0)&&(ic<=5)) c_corr = c_corr/(1.*ic) ; |
596 |
if (ic>5) c_corr = c_corr/6. ; |
if (ic>5) c_corr = c_corr/6. ; |
597 |
|
|
598 |
|
//cout<<"beta "<<xb<<" layer "<<ii<<" ic "<<ic<<" => "<<c_corr<<endl; |
599 |
|
//cout<<xb<<" "<<ic<<" "<<c_corr<<endl; |
600 |
|
|
601 |
Layercharge[ii] = Layercharge[ii]/c_corr; |
Layercharge[ii] = Layercharge[ii]/c_corr; |
602 |
|
|
603 |
} |
} |
984 |
if ((beta_mean < 0.05) || (beta_mean > 2.0)) { |
if ((beta_mean < 0.05) || (beta_mean > 2.0)) { |
985 |
for (Int_t jj=0; jj<48;jj++) charge_PMT_std[jj] = 1001.; |
for (Int_t jj=0; jj<48;jj++) charge_PMT_std[jj] = 1001.; |
986 |
for (Int_t jj=0; jj<6;jj++) charge_layer_std[jj] = 1001.; |
for (Int_t jj=0; jj<6;jj++) charge_layer_std[jj] = 1001.; |
987 |
|
for (Int_t jj=0; jj<6;jj++) charge_layer_std_raw[jj] = 1001.; |
988 |
for (Int_t jj=0; jj<6;jj++) layerinfo_std[jj] = 1001.; |
for (Int_t jj=0; jj<6;jj++) layerinfo_std[jj] = 1001.; |
989 |
charge_std = 1001.; |
charge_std = 1001.; |
990 |
ncount_std = 0; |
ncount_std = 0; |
1145 |
//for (Int_t ilay=0; ilay<6; ilay ++) cout<<Layercharge[ilay]<<" "; |
//for (Int_t ilay=0; ilay<6; ilay ++) cout<<Layercharge[ilay]<<" "; |
1146 |
|
|
1147 |
//========================================================================== |
//========================================================================== |
1148 |
|
//============= Layercharge without 2nd-order correction ================= |
1149 |
|
//========================================================================== |
1150 |
|
|
1151 |
|
for (Int_t jj=0; jj<6;jj++) charge_layer_std_raw[jj] = Layercharge[jj]; |
1152 |
|
|
1153 |
|
//========================================================================== |
1154 |
//========================= 2nd-order correction ======================= |
//========================= 2nd-order correction ======================= |
1155 |
//========================================================================== |
//========================================================================== |
1156 |
|
|