Protection in case of wrong wavelength values
authorgvolpe <gvolpe@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 18 Aug 2009 16:15:35 +0000 (16:15 +0000)
committergvolpe <gvolpe@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 18 Aug 2009 16:15:35 +0000 (16:15 +0000)
HMPID/AliHMPIDPreprocessor.cxx

index 9386ff5..377ee05 100644 (file)
@@ -338,6 +338,11 @@ Double_t AliHMPIDPreprocessor::ProcTrans(TMap* pMap)
     pVal=(AliDCSValue*)pWaveLenght->At(0);
     Double_t lambda = pVal->GetFloat();
 
+    if(lambda<150. || lambda>230.){ 
+        AliWarning(Form("Wrong value for HMP_DET/HMP_INFR/HMP_INFR_TRANPLANT/HMP_INFR_TRANPLANT_MEASURE.mesure%i.waveLenght  -----> Default E mean used!!!!!",i));
+        return DefaultEMean(); // to be checked
+      } 
+
     Double_t photEn = 1239.842609/lambda;     // 1239.842609 from nm to eV
     
     if(photEn<AliHMPIDParam::EPhotMin() || photEn>AliHMPIDParam::EPhotMax()) continue;