| 1 |
pam-fi |
1.1 |
/* |
| 2 |
|
|
* LTGeoFillCut.cpp |
| 3 |
|
|
* |
| 4 |
|
|
* Created on: 26-mar-2009 |
| 5 |
|
|
* Author: Nicola Mori |
| 6 |
|
|
* Last update: 30-apr-2009, S. Ricciarini |
| 7 |
|
|
*/ |
| 8 |
|
|
|
| 9 |
|
|
/*! @file LTGeoFillCut.cpp The TrkRigGeoCut class implementation file */ |
| 10 |
|
|
|
| 11 |
|
|
#include "LTGeoFillCut.h" |
| 12 |
|
|
|
| 13 |
|
|
int LTGeoFillCut::Check(PamLevel2 *event) { |
| 14 |
|
|
|
| 15 |
|
|
float thresholdRig = _thresholdCoeff * event->GetOrbitalInfo()->GetCutoffSVL(); |
| 16 |
|
|
|
| 17 |
|
|
if (thresholdRig >= _binning[_binning.size() - 1] || |
| 18 |
|
|
thresholdRig < _binning[0]) { |
| 19 |
|
|
|
| 20 |
|
|
return 0; |
| 21 |
|
|
} |
| 22 |
|
|
|
| 23 |
|
|
return CUTOK; |
| 24 |
|
|
} |
| 25 |
|
|
|
| 26 |
|
|
void LTGeoFillCut::OnGood(PamLevel2 *event) { |
| 27 |
|
|
|
| 28 |
|
|
float ltime=0.16 * (float) (event->GetTrigLevel2()->dltime[0]) / 1000.; // seconds |
| 29 |
|
|
_histogram_tot += ltime; |
| 30 |
|
|
|
| 31 |
|
|
float thresholdRig = _thresholdCoeff * event->GetOrbitalInfo()->GetCutoffSVL(); |
| 32 |
|
|
|
| 33 |
|
|
//Bin upper limit identification |
| 34 |
|
|
int i = 1; |
| 35 |
|
|
while (thresholdRig >= _binning[i]){ |
| 36 |
|
|
i++; |
| 37 |
|
|
} |
| 38 |
|
|
|
| 39 |
|
|
_histogram[i-1] += ltime; // seconds |
| 40 |
|
|
|
| 41 |
|
|
} |