67 for (
int i = 0 ; i < 9 ; ++i )
w[i] = 1;
188 return w[0] * w[1] * w[2] * w[3]
189 * w[4] * w[5] * w[6] * w[7]
205 if (atype ==
"biasx") {
210 }
else if (atype ==
"biasy") {
215 }
else if (atype ==
"biasz") {
220 }
else if (atype ==
"biast") {
225 }
else if (atype ==
"biasp") {
230 }
else if (atype ==
"biase") {
235 }
else if (atype ==
"biaspt") {
240 }
else if (atype ==
"biaspp") {
253 if (
XBias ==
false) {
278 vals[0] =
XBiasH(
size_t(0));
280 for (ii = 1; ii < maxbin; ii++) {
282 vals[ii] =
XBiasH(
size_t(ii)) + vals[ii - 1];
283 sum = sum +
XBiasH(
size_t(ii));
286 for (ii = 0; ii < maxbin; ii++) {
287 vals[ii] = vals[ii] /
sum;
303 G4int biasn2 = numberOfBin / 2;
304 G4int biasn3 = numberOfBin - 1;
305 while (biasn1 != biasn3 - 1) {
310 biasn2 = biasn1 + (biasn3 - biasn1 + 1) / 2;
320 w[0] = NatProb / w[0];
322 G4cout <<
"X bin weight " << w[0] <<
" " << rndm <<
G4endl;
330 if (
YBias ==
false) {
345 vals[0] =
YBiasH(
size_t(0));
347 for (ii = 1; ii < maxbin; ii++) {
349 vals[ii] =
YBiasH(
size_t(ii)) + vals[ii - 1];
350 sum = sum +
YBiasH(
size_t(ii));
353 for (ii = 0; ii < maxbin; ii++) {
354 vals[ii] = vals[ii] /
sum;
364 G4int biasn2 = numberOfBin / 2;
365 G4int biasn3 = numberOfBin - 1;
366 while (biasn1 != biasn3 - 1) {
371 biasn2 = biasn1 + (biasn3 - biasn1 + 1) / 2;
378 w[1] = NatProb / w[1];
380 G4cout <<
"Y bin weight " << w[1] <<
" " << rndm <<
G4endl;
388 if (
ZBias ==
false) {
403 vals[0] =
ZBiasH(
size_t(0));
405 for (ii = 1; ii < maxbin; ii++) {
407 vals[ii] =
ZBiasH(
size_t(ii)) + vals[ii - 1];
408 sum = sum +
ZBiasH(
size_t(ii));
411 for (ii = 0; ii < maxbin; ii++) {
412 vals[ii] = vals[ii] /
sum;
424 G4int biasn2 = numberOfBin / 2;
425 G4int biasn3 = numberOfBin - 1;
426 while (biasn1 != biasn3 - 1) {
431 biasn2 = biasn1 + (biasn3 - biasn1 + 1) / 2;
438 w[2] = NatProb / w[2];
440 G4cout <<
"Z bin weight " << w[2] <<
" " << rndm <<
G4endl;
467 for (ii = 1; ii < maxbin; ii++) {
469 vals[ii] =
ThetaBiasH(
size_t(ii)) + vals[ii - 1];
473 for (ii = 0; ii < maxbin; ii++) {
474 vals[ii] = vals[ii] /
sum;
486 G4int biasn2 = numberOfBin / 2;
487 G4int biasn3 = numberOfBin - 1;
488 while (biasn1 != biasn3 - 1) {
493 biasn2 = biasn1 + (biasn3 - biasn1 + 1) / 2;
500 w[3] = NatProb / w[3];
502 G4cout <<
"Theta bin weight " << w[3] <<
" " << rndm
528 for (ii = 1; ii < maxbin; ii++) {
530 vals[ii] =
PhiBiasH(
size_t(ii)) + vals[ii - 1];
534 for (ii = 0; ii < maxbin; ii++) {
535 vals[ii] = vals[ii] /
sum;
547 G4int biasn2 = numberOfBin / 2;
548 G4int biasn3 = numberOfBin - 1;
549 while (biasn1 != biasn3 - 1) {
554 biasn2 = biasn1 + (biasn3 - biasn1 + 1) / 2;
561 w[4] = NatProb / w[4];
563 G4cout <<
"Phi bin weight " << w[4] <<
" " << rndm <<
G4endl;
588 for (ii = 1; ii < maxbin; ii++) {
594 for (ii = 0; ii < maxbin; ii++) {
595 vals[ii] = vals[ii] /
sum;
607 G4int biasn2 = numberOfBin / 2;
608 G4int biasn3 = numberOfBin - 1;
609 while (biasn1 != biasn3 - 1) {
614 biasn2 = biasn1 + (biasn3 - biasn1 + 1) / 2;
621 w[5] = NatProb / w[5];
623 G4cout <<
"Energy bin weight " << w[5] <<
" " << rndm
651 for (ii = 1; ii < maxbin; ii++) {
657 for (ii = 0; ii < maxbin; ii++) {
658 vals[ii] = vals[ii] /
sum;
670 G4int biasn2 = numberOfBin / 2;
671 G4int biasn3 = numberOfBin - 1;
672 while (biasn1 != biasn3 - 1) {
677 biasn2 = biasn1 + (biasn3 - biasn1 + 1) / 2;
685 w[6] = NatProb / w[6];
687 G4cout <<
"PosTheta bin weight " << w[6] <<
" " << rndm
713 for (ii = 1; ii < maxbin; ii++) {
719 for (ii = 0; ii < maxbin; ii++) {
720 vals[ii] = vals[ii] /
sum;
732 G4int biasn2 = numberOfBin / 2;
733 G4int biasn3 = numberOfBin - 1;
734 while (biasn1 != biasn3 - 1) {
739 biasn2 = biasn1 + (biasn3 - biasn1 + 1) / 2;
746 w[7] = NatProb / w[7];
748 G4cout <<
"PosPhi bin weight " << w[7] <<
" " << rndm