1 |
pam-fi |
1.1 |
/* |
2 |
|
|
* TofDedxHeCut.cpp |
3 |
|
|
* |
4 |
|
|
* Created on: 03/ago/2009 |
5 |
|
|
* Author: Nicola Mori |
6 |
|
|
*/ |
7 |
|
|
|
8 |
|
|
/*! @file TofDedxHeCut.cpp The TofDedxHeCut class implementation file. */ |
9 |
|
|
|
10 |
|
|
#include "TofDedxHeCut.h" |
11 |
|
|
|
12 |
|
|
int TofDedxHeCut::Check(PamLevel2 *event) { |
13 |
|
|
|
14 |
pam-fi |
1.2 |
int trkSeqNo; |
15 |
|
|
if(_standAlone) |
16 |
|
|
trkSeqNo = 0; |
17 |
|
|
else |
18 |
|
|
trkSeqNo = event->GetTrack(0)->GetToFTrack()->trkseqno; |
19 |
|
|
|
20 |
|
|
float beta = event->GetToFLevel2()->GetToFTrkVar(trkSeqNo)->beta[12]; |
21 |
|
|
|
22 |
|
|
//float beta = event->GetTrack(0)->GetToFTrack()->beta[12]; |
23 |
|
|
//int trkSeqNo = event->GetTrack(0)->GetToFTrack()->trkseqno; |
24 |
pam-fi |
1.1 |
float dEdx = event->GetToFLevel2()->GetdEdx(trkSeqNo, 0, 100) + event->GetToFLevel2()->GetdEdx(trkSeqNo, 1, 100) |
25 |
|
|
+ event->GetToFLevel2()->GetdEdx(trkSeqNo, 2, 100) + event->GetToFLevel2()->GetdEdx(trkSeqNo, 3, 100); |
26 |
|
|
dEdx /= 4; |
27 |
|
|
|
28 |
pam-fi |
1.2 |
if (dEdx < 1 / (0.2 * (beta - 0.06)) - 2.) |
29 |
pam-fi |
1.1 |
return 0; |
30 |
|
|
|
31 |
pam-fi |
1.2 |
if (dEdx > 1 / (0.25 * (beta - 0.12))) |
32 |
pam-fi |
1.1 |
return 1; |
33 |
|
|
|
34 |
|
|
if (dEdx < 11. * beta - 7.7) |
35 |
|
|
return 2; |
36 |
|
|
|
37 |
|
|
return CUTOK; |
38 |
|
|
} |