PamCut: MiscCuts/LTQualCut/LTQualCut.cpp Source File

- Main Page
- Classes
- Files

- File List
- File Members

# MiscCuts/LTQualCut/LTQualCut.cpp

Go to the documentation of this file.

    00001 /*
    00002  * LTQualCut.cpp
    00003  *
    00004  *  Created on: 10-mar-2009
    00005  *     Authors: Sergio Ricciarini, Nicola Mori
    00006  */
    00007
    00010 #include "LTQualCut.h"
    00011
    00012 int LTQualCut::Check(PamLevel2 *event) {
    00013   // NOTE: run_id is not generally increasing with time.
    00014
    00015   if (event->GetRunInfo()->ID != _previousRun) {
    00016     _previousRun = event->GetRunInfo()->ID;
    00017     _LT = -1.;
    00018     return LT_NEWRUN;
    00019   }
    00020
    00021   _LT = 0.16 * (float) (event->GetTrigLevel2()->dltime[0]); // this gives LT in ms
    00022
    00023   if (_LT < 0. || _LT >= _timeout) {
    00024     return LT_INVALID;
    00025   }
    00026
    00027   return CUTOK;
    00028 }