PamCut: MiscCuts/OBTQualCut/OBTQualCut.cpp Source File

- Main Page
- Classes
- Files

- File List
- File Members

# MiscCuts/OBTQualCut/OBTQualCut.cpp

Go to the documentation of this file.

    00001 /*
    00002  * OBTQualCut.cpp
    00003  *
    00004  *  Created on: 10-mar-2009
    00005  *      Author: Sergio Ricciarini, Nicola Mori
    00006  */
    00007
    00010 #include "OBTQualCut.h"
    00011
    00012 int OBTQualCut::Check(PamLevel2 *event){
    00013
    00014   // Check first event; TO BE CHANGED BACK
    00015   if (_previousRun==numeric_limits<UInt_t>::max()) {
    00016     _previousRun = event->GetRunInfo()->ID;
    00017     _previousOBT = event->GetOrbitalInfo()->OBT;
    00018     return OBT_INVALID;
    00019   }
    00020
    00021   // Check run
    00022   if (event->GetRunInfo()->ID != _previousRun){ // overwrite info on previous run and OBT
    00023     _previousRun = event->GetRunInfo()->ID;
    00024     _previousOBT = event->GetOrbitalInfo()->OBT;
    00025 //    return OBT_NEWRUN; TO BE CHANGED BACK
    00026         return CUTOK;
    00027   }
    00028
    00029   // the run is the same as the previous event: check OBT
    00030
    00031   // Check OBT
    00032   if (event->GetOrbitalInfo()->OBT <= _previousOBT){ // invalid OBT: do not overwrite info on previous run and OBT
    00033     return OBT_INVALID;
    00034   }
    00035
    00036   // The OBT is good: overwrite info on previous OBT
    00037   _previousOBT = event->GetOrbitalInfo()->OBT;
    00038   return CUTOK;
    00039
    00040 }