--- PamCut/TofCuts/TofDedxHCut/TofDedxHCut.cpp 2011/09/30 10:16:36 1.3 +++ PamCut/TofCuts/TofDedxHCut/TofDedxHCut.cpp 2011/11/29 10:20:16 1.4 @@ -16,32 +16,64 @@ const float TofDedxHCut::_S31_SA_params[] = { 1.6, 1.2, -0.15, -2., 0.8, 1.6, 1.2, -0.2, 0., 0.8 }; const float TofDedxHCut::_S32_SA_params[] = { 1.6, 1.2, -0.15, -2., 0.8, 1.6, 1.2, -0.2, 0., 0.8 }; -TofDedxHCut::TofDedxHCut(const char *cutName, unsigned int layer, bool standAlone) : +const float TofDedxHCut::_S11_SA_params_strict[] = { 1.5, 1.2, -0.15, -1.7, 0.8, 1.6, 1.2, -0.2, -0.8, 0.8 }; +const float TofDedxHCut::_S12_SA_params_strict[] = { 1.5, 1.2, -0.15, -1.7, 0.8, 1.6, 1.2, -0.2, -0.8, 0.8 }; +const float TofDedxHCut::_S21_SA_params_strict[] = { 1.6, 1.2, -0.15, -1.7, 0.8, 1.6, 1.2, -0.2, -0.8, 0.8 }; +const float TofDedxHCut::_S22_SA_params_strict[] = { 1.6, 1.2, -0.15, -1.7, 0.8, 1.6, 1.2, -0.2, -0.8, 0.8 }; +const float TofDedxHCut::_S31_SA_params_strict[] = { 1.6, 1.2, -0.15, -1.7, 0.8, 1.6, 1.2, -0.2, -0.8, 0.8 }; +const float TofDedxHCut::_S32_SA_params_strict[] = { 1.6, 1.2, -0.15, -1.7, 0.8, 1.6, 1.2, -0.2, -0.8, 0.8 }; + +TofDedxHCut::TofDedxHCut(const char *cutName, unsigned int layer, bool standAlone, bool strict) : PamCut(cutName), _layer(layer), _standAlone(standAlone), _p(NULL) { - switch (_layer) { - case S11: - _p = _S11_SA_params; - break; - case S12: - _p = _S12_SA_params; - break; - case S21: - _p = _S21_SA_params; - break; - case S22: - _p = _S22_SA_params; - break; - case S31: - _p = _S31_SA_params; - break; - case S32: - _p = _S32_SA_params; - break; - default: - _p = _S21_SA_params; + if (strict) { + switch (_layer) { + case S11: + _p = _S11_SA_params_strict; + break; + case S12: + _p = _S12_SA_params_strict; + break; + case S21: + _p = _S21_SA_params_strict; + break; + case S22: + _p = _S22_SA_params_strict; + break; + case S31: + _p = _S31_SA_params_strict; + break; + case S32: + _p = _S32_SA_params_strict; + break; + default: + _p = _S21_SA_params_strict; + } + } + else { + switch (_layer) { + case S11: + _p = _S11_SA_params; + break; + case S12: + _p = _S12_SA_params; + break; + case S21: + _p = _S21_SA_params; + break; + case S22: + _p = _S22_SA_params; + break; + case S31: + _p = _S31_SA_params; + break; + case S32: + _p = _S32_SA_params; + break; + default: + _p = _S21_SA_params; + } } - } int TofDedxHCut::Check(PamLevel2 *event) {