--- chewbacca/YodaProfiler/src/PamelaDBOperations.cpp 2009/11/25 09:39:50 1.26 +++ chewbacca/YodaProfiler/src/PamelaDBOperations.cpp 2009/11/25 11:19:26 1.27 @@ -4258,8 +4258,12 @@ // check pedestal values for one plane, if all zeros calibration is not valid (calorimeter power problems) [8th data reduction bug, fixed on 25/11/2009 by E.M.] // totped = 0.; + Int_t ns = 0; + if ( section == 2 ) ns = 3; + if ( section == 3 ) ns = 1; + if ( section == 1 ) ns = 2; for (UInt_t ss=0; ss<96; ss++){ - totped += calibCalPed->calped[section][0][ss]; + totped += fabs(calibCalPed->calped[ns][0][ss]); } if ( totped < 1. ){ if ( IsDebug() ) printf(" Section %i totped %f - No calibration data! Calorimeter power problems? \n",section,totped); @@ -4448,8 +4452,12 @@ // check pulse values for one plane, if all zeros calibration is not valid (calorimeter power problems) [8th data reduction bug, fixed on 25/11/2009 by E.M.] // totpul = 0.; + Int_t ns = 0; + if ( section == 2 ) ns = 3; + if ( section == 3 ) ns = 1; + if ( section == 1 ) ns = 2; for (UInt_t ss=0; ss<96; ss++){ - totpul += cp1->calpuls[section][0][ss]; + totpul += cp1->calpuls[ns][0][ss]; } if ( totpul >= 3145632. ){ if ( IsDebug() ) printf(" PULSE1 Section %i totpul %f - No calibration data! Calorimeter power problems? \n",section,totpul); @@ -4617,8 +4625,12 @@ // check pulse values for one plane, if all zeros calibration is not valid (calorimeter power problems) [8th data reduction bug, fixed on 25/11/2009 by E.M.] // totpul = 0.; + Int_t ns = 0; + if ( section == 2 ) ns = 3; + if ( section == 3 ) ns = 1; + if ( section == 1 ) ns = 2; for (UInt_t ss=0; ss<96; ss++){ - totpul += cp2->calpuls[section][0][ss]; + totpul += cp2->calpuls[ns][0][ss]; } if ( totpul >= 3145632. ){ if ( IsDebug() ) printf(" PULSE2 Section %i totpul %f - No calibration data! Calorimeter power problems? \n",section,totpul);