/[PAMELA software]/PamCut/TrkCuts/RigFillCut/RigFillCut.cpp
ViewVC logotype

Contents of /PamCut/TrkCuts/RigFillCut/RigFillCut.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (download) (vendor branch)
Wed May 27 13:30:08 2009 UTC (15 years, 6 months ago) by pam-fi
Branch: DEV
CVS Tags: v0r00
Changes since 1.1: +0 -0 lines
First import

1 /*
2 * RigFillCut.cpp
3 *
4 * Created on: 27-mar-2009
5 * Author: Nicola Mori, S. Ricciarini
6 */
7
8 /*! @file RigFillCut.cpp The TrkRigGeoCut class implementation file */
9
10 #include "RigFillCut.h"
11
12 int RigFillCut::Check(PamLevel2 *event) {
13
14 float rigThreshold = _thresholdCoeff * event->GetOrbitalInfo()->GetCutoffSVL();
15
16 if (rigThreshold > _binning[_binning.size() - 1] || rigThreshold < _binning[0]) {
17 return THRESHRIGOUT;
18 }
19
20 float rig = event->GetTrack(0)->GetTrkTrack()->GetRigidity();
21
22 if (rig > _binning[_binning.size() - 1] || rig < _binning[0]) {
23 return RIGOUT;
24 }
25
26 return CUTOK;
27 }
28
29 void RigFillCut::OnGood(PamLevel2 *event) {
30
31 float rigThreshold = _thresholdCoeff * event->GetOrbitalInfo()->GetCutoffSVL();
32 float rig = event->GetTrack(0)->GetTrkTrack()->GetRigidity();
33
34 //Bin identification: value must be less than (<) bin maximum
35
36 int i = 1;
37 while (rig >= _binning[i]) {
38 i++;
39 }
40 i--;
41
42 // cout << _binning[i] << " < " << rig << " < " << _binning[i+1] << endl;
43
44 int j = 1;
45 while (rigThreshold >= _binning[j]) {
46 j++;
47 }
48 j--;
49
50 // cout << _binning[j] << " < " << rigCutoff << " < " << _binning[j+1] << endl;
51 // cout << endl;
52
53 _histogram[i][j]++;
54 }

  ViewVC Help
Powered by ViewVC 1.1.23