10 |
|
|
11 |
#include "TrkNucleiZCut.h" |
#include "TrkNucleiZCut.h" |
12 |
|
|
13 |
const float TrkNucleiZCut::_sigmaZ[] = { 0.09, 0.1, 0.17, 0.34, 0.44, 0.59 }; // the charge-width in a layer for Z=1..6 |
const float TrkNucleiZCut::_meanRigMean[] = { .992, 1.99, 3., 4., 5., 6. }; // the charge distribution peak for Z=1..6 |
14 |
|
const float TrkNucleiZCut::_sigmaRigMean[] = { 0.06, 0.1, 0.17, 0.34, 0.44, 0.59 }; // the charge-width for Z=1..6 |
15 |
|
|
16 |
|
const float TrkNucleiZCut::_meanBetaMean[] = { 1., 2., 3., 4., 5., 6. }; // the charge distribution peak for Z=1..6 |
17 |
|
const float TrkNucleiZCut::_sigmaBetaMean[] = { 0.09, 0.1, 0.17, 0.34, 0.44, 0.59 }; // the charge-width for Z=1..6 |
18 |
|
|
19 |
|
|
20 |
int TrkNucleiZCut::Check(PamLevel2 *event) { |
int TrkNucleiZCut::Check(PamLevel2 *event) { |
44 |
// ******** Check the mean charge value ******** |
// ******** Check the mean charge value ******** |
45 |
if (_howToCheck == TRKNUCLEIZ_CHECKMEAN) { |
if (_howToCheck == TRKNUCLEIZ_CHECKMEAN) { |
46 |
|
|
47 |
Float_t charge; |
Float_t charge, meanZ, sigmaZ; |
48 |
switch (_method) { |
switch (_method) { |
49 |
case TRKNUCLEIZ_DEFL: |
case TRKNUCLEIZ_RIG: |
50 |
charge = _trkNuclei->GetZ_Rigidity(); |
charge = _trkNuclei->GetZ_Rigidity(); |
51 |
|
meanZ = _meanRigMean[_Z-1]; |
52 |
|
sigmaZ = _sigmaRigMean[_Z-1]; |
53 |
break; |
break; |
54 |
case TRKNUCLEIZ_BETA: |
case TRKNUCLEIZ_BETA: |
55 |
charge = _trkNuclei->GetZ_Beta(event->GetTrack(0)->GetToFTrack()->beta[12]); |
charge = _trkNuclei->GetZ_Beta(event->GetTrack(0)->GetToFTrack()->beta[12]); |
56 |
|
meanZ = _meanBetaMean[_Z-1]; |
57 |
|
sigmaZ = _sigmaBetaMean[_Z-1]; |
58 |
break; |
break; |
59 |
} |
} |
60 |
|
|
61 |
if ((charge > _Z + _upperLimit * _sigmaZ[_Z - 1]) || (charge < _Z - _lowerLimit * _sigmaZ[_Z - 1])) { |
if ((charge > meanZ + _upperLimit * sigmaZ) || (charge < meanZ - _lowerLimit * sigmaZ)) { |
62 |
return TRKNUCLEIZ_OUTOFBOUNDS; |
return TRKNUCLEIZ_OUTOFBOUNDS; |
63 |
} |
} |
64 |
|
|
71 |
Float_t charge[6] = { 0., 0., 0., 0., 0., 0. }; |
Float_t charge[6] = { 0., 0., 0., 0., 0., 0. }; |
72 |
nValid = 0; |
nValid = 0; |
73 |
switch (_method) { |
switch (_method) { |
74 |
case TRKNUCLEIZ_DEFL: |
case TRKNUCLEIZ_RIG: |
75 |
for (int ip = 0; ip < 6; ip++) { |
for (int ip = 0; ip < 6; ip++) { |
76 |
charge[ip] = _trkNuclei->GetZ_Rigidity(ip); |
charge[ip] = _trkNuclei->GetZ_Rigidity(ip); |
77 |
if (charge[ip] > 0.) { |
if (charge[ip] > 0.) { |
91 |
|
|
92 |
for (int ip = 0; ip < 6; ip++) { |
for (int ip = 0; ip < 6; ip++) { |
93 |
if (charge[ip] > 0.) // Check only good layers |
if (charge[ip] > 0.) // Check only good layers |
94 |
if ((charge[ip] > _Z + _upperLimit * _sigmaZ[_Z - 1]) || (charge[ip] < _Z - _lowerLimit * _sigmaZ[_Z - 1])) { |
// Currently, no calibration for single layers is available. Z is used as a mean value, while for sigma |
95 |
|
// we use the standard values use for mean dE/dx Vs. beta. |
96 |
|
if ((charge[ip] > _Z + _upperLimit * _sigmaBetaMean[_Z - 1]) || (charge[ip] < _Z - _lowerLimit * _sigmaBetaMean[_Z - 1])) { |
97 |
return TRKNUCLEIZ_OUTOFBOUNDS; |
return TRKNUCLEIZ_OUTOFBOUNDS; |
98 |
} |
} |
99 |
} |
} |