17 |
const float TofDedxHeCut::_S32_SA_params[] = { 0.48, 0.024, -2.4, 3.4, 2.5, 0.64, -0.0071, 3.2, 1.3, 2.3 }; |
const float TofDedxHeCut::_S32_SA_params[] = { 0.48, 0.024, -2.4, 3.4, 2.5, 0.64, -0.0071, 3.2, 1.3, 2.3 }; |
18 |
|
|
19 |
TofDedxHeCut::TofDedxHeCut(const char *cutName, unsigned int layer, bool standAlone) : |
TofDedxHeCut::TofDedxHeCut(const char *cutName, unsigned int layer, bool standAlone) : |
20 |
PamCut(cutName), _layer(layer), _standAlone(standAlone), _p(NULL) { |
PamCut(cutName), _layer(layer), _standAlone(standAlone), _p(NULL) { |
21 |
|
|
22 |
switch (_layer) { |
switch (_layer) { |
23 |
case S11: |
case S11: |
47 |
int TofDedxHeCut::Check(PamLevel2 *event) { |
int TofDedxHeCut::Check(PamLevel2 *event) { |
48 |
|
|
49 |
static int trkSeqNo; |
static int trkSeqNo; |
50 |
|
static int idx; |
51 |
if (_standAlone) |
if (_standAlone) |
52 |
trkSeqNo = 0; |
trkSeqNo = -1; |
53 |
else { |
else |
54 |
for (int i = 0; i < event->GetToFLevel2()->ntrk(); i++) { |
trkSeqNo = event->GetTrack(0)->GetTrkTrack()->GetSeqNo(); |
55 |
if (event->GetToFLevel2()->GetToFTrkVar(i)->trkseqno == event->GetTrack(0)->GetTrkTrack()->GetSeqNo()) |
|
56 |
trkSeqNo = i; |
for (int i = 0; i < event->GetToFLevel2()->ntrk(); i++) { |
57 |
} |
if (event->GetToFLevel2()->GetToFTrkVar(i)->trkseqno == trkSeqNo) |
58 |
|
idx = i; |
59 |
} |
} |
60 |
|
|
61 |
float beta = event->GetToFLevel2()->GetToFTrkVar(trkSeqNo)->beta[12]; |
float beta = event->GetToFLevel2()->GetToFTrkVar(idx)->beta[12]; |
62 |
|
|
63 |
static unsigned int auxLayer; |
static unsigned int auxLayer; |
64 |
static float dEdx; |
static float dEdx; |
72 |
while (auxLayer > 0) { |
while (auxLayer > 0) { |
73 |
if ((auxLayer & 0x1) == 1) { |
if ((auxLayer & 0x1) == 1) { |
74 |
//cout << auxLayer << " " << currLayer << endl; |
//cout << auxLayer << " " << currLayer << endl; |
75 |
dEdx += event->GetToFLevel2()->GetdEdx(trkSeqNo, currLayer, 100); |
dEdx += event->GetToFLevel2()->GetdEdx(idx, currLayer, 100); |
76 |
nLayers++; |
nLayers++; |
77 |
} |
} |
78 |
currLayer++; |
currLayer++; |