22 using std::numeric_limits;
34 , fMaxNofMissingHits()
43 const vector<lit::parallel::LitScalPixelHit*>&
hits,
44 const vector<lit::parallel::LitScalTrack*>& trackSeeds,
45 vector<lit::parallel::LitScalTrack*>&
tracks) {
47 fUsedSeedsSet.clear();
49 fHitData.SetNofStations(fLayout.GetNofStations());
51 for (fIteration = 0; fIteration < fNofIterations; fIteration++) {
56 InitTrackSeeds(trackSeeds);
62 for_each(fTracks.begin(), fTracks.end(),
DeleteObject());
67 static int eventNo = 0;
68 cout <<
"LitTrackFinderNN::DoFind: eventNo=" << eventNo++ << endl;
72 const vector<lit::parallel::LitScalPixelHit*>&
hits) {
73 unsigned int nofHits =
hits.size();
74 for (
unsigned int iHit = 0; iHit < nofHits; iHit++) {
76 if (fUsedHitsSet.find(hit->
refId) != fUsedHitsSet.end()) {
continue; }
83 const vector<lit::parallel::LitScalTrack*>& trackSeeds) {
84 unsigned int nofSeeds = trackSeeds.size();
85 for (
unsigned int iTrack = 0; iTrack < nofSeeds; iTrack++) {
95 PropagateVirtualStations(par);
99 fTracks.push_back(track);
105 unsigned char nofVirtualStations = fLayout.GetNofVirtualStations();
106 unsigned char nofSteps = (nofVirtualStations - 1) / 2;
107 for (
unsigned char iStep = 0; iStep < nofSteps; iStep++) {
109 fLayout.GetVirtualStation(2 * iStep + 0);
111 fLayout.GetVirtualStation(2 * iStep + 1);
113 fLayout.GetVirtualStation(2 * iStep + 2);
127 if (thickness > 0) LitAddMaterial<fscal>(par, thickness);
132 if (thickness > 0) LitAddMaterial<fscal>(par, thickness);
137 if (thickness > 0) LitAddMaterial<fscal>(par, thickness);
143 unsigned char stationId,
147 if (nofVirtualStations == 1) {
153 if (thickness > 0) LitAddMaterial<fscal>(par, thickness);
156 unsigned char nofSteps = (nofVirtualStations - 1) / 2;
157 for (
unsigned char iStep = 0; iStep < nofSteps; iStep++) {
177 if (thickness > 0) LitAddMaterial<fscal>(par, thickness);
182 if (thickness > 0) LitAddMaterial<fscal>(par, thickness);
187 if (thickness > 0) LitAddMaterial<fscal>(par, thickness);
194 unsigned int nofTracks = fTracks.size();
195 for (
unsigned int iTrack = 0; iTrack < nofTracks; iTrack++) {
198 unsigned char nofStations = fLayout.GetNofStations();
199 for (
int iStation = 0; iStation < nofStations; iStation++) {
203 fscal zMin = fHitData.GetMinZPos(iStation);
206 const vector<int>& bins = fHitData.GetZPosBins(iStation);
207 map<int, LitTrackParamScal> binParamMap;
208 vector<int>::const_iterator itBins;
209 for (itBins = bins.begin(); itBins != bins.end(); itBins++) {
217 map<int, LitTrackParamScal>::iterator itMap;
218 for (itMap = binParamMap.begin(); itMap != binParamMap.end(); itMap++) {
219 (*itMap).second = par;
222 PropagateToStation(iStation, tpar);
236 const vector<LitScalPixelHit*>&
hits = fHitData.GetHits(iStation);
237 unsigned int nofHits =
hits.size();
238 for (
unsigned int iHit = 0; iHit < nofHits; iHit++) {
240 int bin = fHitData.GetBinByZPos(iStation, hit->
Z);
241 assert(binParamMap.find(bin) != binParamMap.end());
248 fscal maxErrX = fHitData.GetMaxErrX(iStation);
250 fSigmaCoef[fIteration] * (
sqrt(tpar.
C0 + maxErrX * maxErrX));
251 fscal maxErrY = fHitData.GetMaxErrY(iStation);
253 fSigmaCoef[fIteration] * (
sqrt(tpar.
C5 + maxErrY * maxErrY));
255 (hit->
X < (tpar.
X + devX)) && (hit->
X > (tpar.
X - devX))
256 && (hit->
Y < (tpar.
Y + devY)) && (hit->
Y > (tpar.
Y - devY));
257 if (!hitInside)
continue;
261 bool hitInValidationGate = chi < fChiSqStripHitCut[fIteration];
272 if (minHit != NULL) {
290 unsigned int nofTracks = fTracks.size();
291 for (
unsigned int iTrack = 0; iTrack < nofTracks; iTrack++) {
299 unsigned int nofTracks = fTracks.size();
300 for (
unsigned int iTrack = 0; iTrack < nofTracks; iTrack++) {
302 if (!track->
IsGood()) {
continue; }
303 for (
unsigned int iHit = 0; iHit < track->
GetNofHits(); iHit++) {
310 vector<lit::parallel::LitScalTrack*>&
tracks) {
311 unsigned int nofTracks = fTracks.size();
312 for (
unsigned int iTrack = 0; iTrack < nofTracks; iTrack++) {
314 if (!track->
IsGood()) {
continue; }