11 |
|
|
12 |
int TrkDedxHeCut::Check(PamLevel2 *event) { |
int TrkDedxHeCut::Check(PamLevel2 *event) { |
13 |
|
|
14 |
TrkTrack *track = event->GetTrack(0)->GetTrkTrack(); |
// TrkTrack *track = event->GetTrack(0)->GetTrkTrack(); |
15 |
|
if(event->GetNTracks(_trkAlg)==0)return 0; |
16 |
|
ExtTrack *track = event->GetTrack(0,_trkAlg)->GetExtTrack(); |
17 |
|
|
18 |
|
|
19 |
float R = track->GetRigidity(); |
float R = track->GetRigidity(); |
20 |
//float dEdx = track->GetDEDX(); |
//float dEdx = track->GetDEDX(); |
21 |
|
|
25 |
float totReleaseY = 0., maxReleaseY = 0.; |
float totReleaseY = 0., maxReleaseY = 0.; |
26 |
int nX = 0, nY = 0; |
int nX = 0, nY = 0; |
27 |
float dEdxView = 0; |
float dEdxView = 0; |
|
/* |
|
|
ToFLevel2 *tofL2 = event->GetToFLevel2(); |
|
|
int trkSeqNo = 0; |
|
|
for (int i = 0; i < event->GetToFLevel2()->ntrk(); i++) { |
|
|
if (tofL2->GetToFTrkVar(i)->trkseqno == track->GetSeqNo()) { |
|
|
trkSeqNo = i; |
|
|
break; |
|
|
} |
|
|
} |
|
|
if ((tofL2->GetdEdx(trkSeqNo, 0, 100) + tofL2->GetdEdx(trkSeqNo, 1, 100) + tofL2->GetdEdx(trkSeqNo, 2, 100) |
|
|
+ tofL2->GetdEdx(trkSeqNo, 3, 100)) / 4. < 2) { |
|
|
cout << "Check" << endl; |
|
|
for (int ip = 0; ip < 6; ip++) { |
|
|
cout << "TOF" << ip << ": " << tofL2->GetdEdx(trkSeqNo, ip, 100) << endl; |
|
|
dEdxView = track->GetDEDX(ip, 0); |
|
|
if (dEdxView > 0 && track->XGood(ip)) |
|
|
cout << "X" << ip << ": " << dEdxView << endl; |
|
|
dEdxView = track->GetDEDX(ip, 1); |
|
|
if (dEdxView > 0 && track->YGood(ip)) |
|
|
cout << "Y" << ip << ": " << dEdxView << endl; |
|
|
} |
|
|
} |
|
|
*/ |
|
28 |
for (int ip = 0; ip < 6; ip++) { |
for (int ip = 0; ip < 6; ip++) { |
29 |
// X view |
// X view |
30 |
dEdxView = track->GetDEDX(ip, 0); |
dEdxView = track->GetDEDX(ip, 0); |