11 {
12
13
14
15
16
17
18 int strawGasType=99;
19
20 if (useGasMix==0) {
21
22 if ( statusHT==2 || statusHT==3 ) { strawGasType = 0; }
23 else if ( statusHT==5 ) { strawGasType = 1; }
24 else if ( statusHT==1 || statusHT==4 ) { strawGasType = 2; }
25 else if ( statusHT==6 ) { strawGasType = 0; }
26 else if ( statusHT==7 ) { strawGasType = 0; }
27
28
29 else {
30 if (log) { *
log << MSG::FATAL <<
"StrawGasType: StrawStatus = " << statusHT
31 << ", must be 'Good(2)||Xenon(3)' or 'Dead(1)||Argon(4)' or 'Krypton(5)!'"
32 <<
", or 'EmulateArgon(6)' or 'EmulateKrypton(7)'" <<
endmsg; }
33 }
34 }
35 else if (useGasMix==1) { strawGasType = 0; }
36 else if (useGasMix==2) { strawGasType = 1; }
37 else if (useGasMix==3) { strawGasType = 2; }
38
39 if ( strawGasType<0 || strawGasType>2 ) {
40 if (log) { *
log << MSG::FATAL <<
"StrawGasType: strawGasType value (" << strawGasType <<
") must be 0(Xe), 1(Kr) or 2(Ar)!" <<
endmsg; }
41 throw std::exception();
42 }
43
44 return strawGasType;
45
46 }