PamCut: MiscCuts/LTGeoFillCut/LTGeoFillCut.cpp Source File

- Main Page
- Classes
- Files

- File List
- File Members

# MiscCuts/LTGeoFillCut/LTGeoFillCut.cpp

Go to the documentation of this file.

    00001 /*
    00002  * LTGeoFillCut.cpp
    00003  *
    00004  *  Created on: 26-mar-2009
    00005  *      Author: Nicola Mori
    00006  *  Last update: 30-apr-2009, S. Ricciarini
    00007  */
    00008
    00011 #include "LTGeoFillCut.h"
    00012
    00013 int LTGeoFillCut::Check(PamLevel2 *event) {
    00014
    00015   float thresholdRig = _thresholdCoeff * event->GetOrbitalInfo()->GetCutoffSVL();
    00016
    00017   if (thresholdRig >= _binning[_binning.size() - 1] ||
    00018       thresholdRig < _binning[0]) {
    00019
    00020     return 0;
    00021   }
    00022
    00023   return CUTOK;
    00024 }
    00025
    00026 void LTGeoFillCut::OnGood(PamLevel2 *event) {
    00027
    00028   float ltime=0.16 * (float) (event->GetTrigLevel2()->dltime[0]) / 1000.; // seconds
    00029   _histogram_tot += ltime;
    00030
    00031   float thresholdRig = _thresholdCoeff * event->GetOrbitalInfo()->GetCutoffSVL();
    00032
    00033   //Bin upper limit identification
    00034   int i = 1;
    00035   while (thresholdRig >= _binning[i]){
    00036     i++;
    00037   }
    00038
    00039   _histogram[i-1] += ltime; // seconds
    00040
    00041 }