--- DarthVader/CalorimeterLevel2/src/CaloLevel0.cpp 2009/11/25 09:38:30 1.27 +++ DarthVader/CalorimeterLevel2/src/CaloLevel0.cpp 2010/01/29 05:49:24 1.30 @@ -741,7 +741,7 @@ // if ( !ncalibs ) return(-110); // - calo->GetEntry(calibno); + if ( calo->GetEntry(calibno) <= 0) throw -36; if ( verbose ) printf(" PULSE2 using entry %u from file %s",calibno,fcalname.Data()); // // retrieve calibration table @@ -822,7 +822,7 @@ // if ( !ncalibs ) return(-110); // - calo1->GetEntry(calibno); + if ( calo1->GetEntry(calibno) <= 0 ) throw -36; if ( verbose ) printf(" PULSE1 using entry %u from file %s",calibno,fcalname.Data()); // // retrieve calibration table @@ -1184,7 +1184,7 @@ // // get entry ei // - l0calo->GetEntry(ei); + if ( l0calo->GetEntry(ei) <= 0 ) throw -36; // // if it was not a selftrigger event, could it ever been a selftrigger event? if so trigty = 3. // @@ -1438,7 +1438,7 @@ ener = dexyc[l][m][n]; ener0 += ener; clevel1->estrip[n][m][l] = 0.; - totbase += de->base[l][m][pre]; + totbase += de->base[l][m][pre]/96.; totped += fabs(calped[l][m][n]); if ( de->base[l][m][pre] < 0 ) negbase = true; if ( base0>0 && base0 < 30000. ){ @@ -1464,8 +1464,9 @@ // // check if there were problems with 5.7 or glitches in the power supply // - if ( ((ener0 == 0. && cbase0 == 0.) || negbase || totbase > 196600. || totped < 1. ) && !pproblem && clevel2->perr[se] == 0){ // check pedestal and baseline 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.] - if ( verbose ) printf(" L0 entry %i : calorimeter power problems! event marked as bad perr %f swerr %X view %i plane %i \n",ei,de->perror[se],de->stwerr[se],l,m); + // if ( ((ener0 == 0. && cbase0 == 0.) || negbase || totbase > 196600. || totped < 1. ) && !pproblem && clevel2->perr[se] == 0){ // check pedestal and baseline 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.] + if ( ((ener0 == 0. && cbase0 == 0.) || negbase || totbase > 32700. || totped < 1. ) && !pproblem && clevel2->perr[se] == 0){ // check pedestal and baseline 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.] + if ( verbose ) printf(" L0 entry %i : calorimeter power problems! event marked as bad perr %f swerr %X view %i plane %i negbase %i totbase %f totped %f\n",ei,de->perror[se],de->stwerr[se],l,m, negbase, totbase, totped); pproblem = true; pe++; }; @@ -1758,11 +1759,19 @@ clevel1->estrip[j4][m][l] = 0.; }; // + if ( debug ) printf(" STRIP: view %i plane %i strip %i energy: %f \n",l,m,j4,clevel1->estrip[j4][m][l]); + // // code and save the energy for each strip in svstrip // if ( clevel1->estrip[j4][m][l] > clevel1->emin ){ // Float_t savel1 = clevel1->estrip[j4][m][l]; + // + if ( m == 18 && l == 0 ){ + if ( debug ) printf(" Resetting plane 18X for variable calculation: view %i plane %i strip %i \n",l,m,j4); + clevel1->estrip[j4][m][l] = 0.; // SAVE STRIPS VALUE FOR PLANE 18 X but DO NOT USE IT FOR VARIABLE CALCULATION + }; + if ( debug ) printf(" HIT STRIP: view %i plane %i strip %i energy: %f \n",l,m,j4,clevel1->estrip[j4][m][l]); // if ( dexyc[l][m][j4] == 32767. ){ if ( dexyc[l][m][j4] > 32000. ){ savel1 += 5000.; @@ -2187,7 +2196,7 @@ // if ( !ncalibs ) return(-110); // - calo->GetEntry(calibno[s]); + if ( calo->GetEntry(calibno[s]) <= 0 ) throw -36; // if (ce->cstwerr[s] != 0 && ce->cperror[s] == 0 ) { for ( Int_t d=0 ; d<11 ;d++ ){