77 |
static float dEdxLayer; |
static float dEdxLayer; |
78 |
static unsigned int badLayers; |
static unsigned int badLayers; |
79 |
|
|
80 |
int trkSeqNo = 0; |
int idx = 0; |
81 |
for (int i = 0; i < event->GetToFLevel2()->ntrk(); i++) { |
for (int i = 0; i < event->GetToFLevel2()->ntrk(); i++) { |
82 |
if (event->GetToFLevel2()->GetToFTrkVar(i)->trkseqno == event->GetTrack(0)->GetTrkTrack()->GetSeqNo()) |
if (event->GetToFLevel2()->GetToFTrkVar(i)->trkseqno == event->GetTrack(0)->GetTrkTrack()->GetSeqNo()) |
83 |
trkSeqNo = i; |
idx = i; |
84 |
} |
} |
85 |
|
|
86 |
dEdx = 0.; |
dEdx = 0.; |
87 |
badLayers = 0; |
badLayers = 0; |
88 |
if ((_layers & S11) == S11) { |
if ((_layers & S11) == S11) { |
89 |
dEdxLayer = event->GetToFLevel2()->GetdEdx(trkSeqNo, 0, 100); |
dEdxLayer = event->GetToFLevel2()->GetdEdx(idx, 0, 100); |
90 |
if (dEdxLayer > 0. && dEdxLayer < 4090) |
if (dEdxLayer > 0. && dEdxLayer < 4090) |
91 |
dEdx += dEdxLayer; |
dEdx += dEdxLayer; |
92 |
else |
else |
93 |
badLayers++; |
badLayers++; |
94 |
} |
} |
95 |
if ((_layers & S12) == S12) { |
if ((_layers & S12) == S12) { |
96 |
dEdxLayer = event->GetToFLevel2()->GetdEdx(trkSeqNo, 1, 100); |
dEdxLayer = event->GetToFLevel2()->GetdEdx(idx, 1, 100); |
97 |
if (dEdxLayer > 0. && dEdxLayer < 4090) |
if (dEdxLayer > 0. && dEdxLayer < 4090) |
98 |
dEdx += dEdxLayer; |
dEdx += dEdxLayer; |
99 |
else |
else |
100 |
badLayers++; |
badLayers++; |
101 |
} |
} |
102 |
if ((_layers & S21) == S21) { |
if ((_layers & S21) == S21) { |
103 |
dEdxLayer = event->GetToFLevel2()->GetdEdx(trkSeqNo, 2, 100); |
dEdxLayer = event->GetToFLevel2()->GetdEdx(idx, 2, 100); |
104 |
if (dEdxLayer > 0. && dEdxLayer < 4090) |
if (dEdxLayer > 0. && dEdxLayer < 4090) |
105 |
dEdx += dEdxLayer; |
dEdx += dEdxLayer; |
106 |
else |
else |
107 |
badLayers++; |
badLayers++; |
108 |
} |
} |
109 |
if ((_layers & S22) == S22) { |
if ((_layers & S22) == S22) { |
110 |
dEdxLayer = event->GetToFLevel2()->GetdEdx(trkSeqNo, 3, 100); |
dEdxLayer = event->GetToFLevel2()->GetdEdx(idx, 3, 100); |
111 |
if (dEdxLayer > 0. && dEdxLayer < 4090) |
if (dEdxLayer > 0. && dEdxLayer < 4090) |
112 |
dEdx += dEdxLayer; |
dEdx += dEdxLayer; |
113 |
else |
else |
114 |
badLayers++; |
badLayers++; |
115 |
} |
} |
116 |
if ((_layers & S31) == S31) { |
if ((_layers & S31) == S31) { |
117 |
dEdxLayer = event->GetToFLevel2()->GetdEdx(trkSeqNo, 4, 100); |
dEdxLayer = event->GetToFLevel2()->GetdEdx(idx, 4, 100); |
118 |
if (dEdxLayer > 0. && dEdxLayer < 4090) |
if (dEdxLayer > 0. && dEdxLayer < 4090) |
119 |
dEdx += dEdxLayer; |
dEdx += dEdxLayer; |
120 |
else |
else |
121 |
badLayers++; |
badLayers++; |
122 |
} |
} |
123 |
if ((_layers & S32) == S32) { |
if ((_layers & S32) == S32) { |
124 |
dEdxLayer = event->GetToFLevel2()->GetdEdx(trkSeqNo, 5, 100); |
dEdxLayer = event->GetToFLevel2()->GetdEdx(idx, 5, 100); |
125 |
if (dEdxLayer > 0. && dEdxLayer < 4090) |
if (dEdxLayer > 0. && dEdxLayer < 4090) |
126 |
dEdx += dEdxLayer; |
dEdx += dEdxLayer; |
127 |
else |
else |