17 for(
unsigned int i=0;
i<tracks.size();
i++)
24 tracks.at(
i).setPassedOR(0);
32 for(
unsigned int j=
i+1; j<tracks.size(); j++)
41 tracks.at(j).setPassedOR(0);
48 int nOverlappingHits = 0;
52 if(nOverlappingHits >= NumOfHitPerGrouping)
60 int nNotOverlappingHits=0;
64 if(nNotOverlappingHits <= NumOfHitPerGrouping)
74 return StatusCode::SUCCESS;
120 return nonOverlapHits;
127 float minChi2=100000.;
132 float t_chi2 = RMtracks.at(dup).getChi2ndof();
133 int t_nhitlayers = RMtracks.at(dup).getFPGATrackSimHits().size();
134 for(
auto& hit : RMtracks.at(dup).getFPGATrackSimHits())
142 if(t_nhitlayers>maxHitLayers)
146 RMtracks.at(prevID).setPassedOR(0);
149 maxHitLayers=t_nhitlayers;
152 else if(t_nhitlayers==maxHitLayers)
158 RMtracks.at(prevID).setPassedOR(0);
165 RMtracks.at(dup).setPassedOR(0);
170 RMtracks.at(dup).setPassedOR(0);
228 nMissing = FPGATrackSimMapping->PlaneMap_1st(subregion)->getNCoords();
234 for (
unsigned layer = 0;
layer < FPGATrackSimMapping->PlaneMap_1st(subregion)->getNLogiLayers();
layer++)
241 int ix = FPGATrackSimMapping->PlaneMap_1st(subregion)->getCoordOffset(
layer);
243 if (FPGATrackSimMapping->PlaneMap_1st(subregion)->isSCT(
layer))
245 missing_mask |= 1 << ix;
250 missing_mask |= (1<<ix) | (1<<iy);
256 if (FPGATrackSimMapping->PlaneMap_1st(subregion)->isSCT(
layer)) missStrip =
true;
257 else missPixel =
true;
260 else if (!((wclayers >>
layer) & 1)) {
261 int ix = FPGATrackSimMapping->PlaneMap_1st(subregion)->getCoordOffset(
layer);
263 if (FPGATrackSimMapping->PlaneMap_1st(subregion)->isSCT(
layer))
265 missing_mask |= 1 << ix;
270 missing_mask |= (1<<ix) | (1<<iy);
293 track_cands.resize(combs.size(), temp);
300 for (
size_t icomb = 0; icomb < combs.size(); icomb++)
303 track_cands[icomb].setTrackID(idbase + icomb);
304 track_cands[icomb].setNLayers(FPGATrackSimMapping->PlaneMap_1st(subregion)->getNLogiLayers());
307 track_cands[icomb].setIdealRadii(SUBREGIONMAP->
getAvgRadii(0));
308 track_cands[icomb].setPassedOR(1);
310 std::vector<int>
const & hit_indices = combs[icomb];
311 for (
unsigned layer = 0;
layer < FPGATrackSimMapping->PlaneMap_1st(subregion)->getNLogiLayers();
layer++)
313 if (hit_indices[
layer] < 0)
321 if (wcbits & (1 <<
layer ) ) {
326 track_cands[icomb].setFPGATrackSimHit(
layer, newhit);
330 const std::shared_ptr<const FPGATrackSimHit> hit = road.
getHits(
layer)[hit_indices[
layer]];
336 if (
layer == 0)
throw (std::out_of_range(
"makeTrackCandidates: Attempt to access vector at element -1"));
339 track_cands[icomb].setValidCand(
false);
342 track_cands[icomb].setFPGATrackSimHit(
layer, *hit);
347 idbase += combs.size();
373 if (hit.
getR() == 0.0) {
387 if (hit.
getZ() >= 0.) {
395 if (hit.
getZ() >= 0.) {
424 if(volumeID == 10)
offset = 0;
425 if(volumeID == 8)
offset = 4;
426 if(volumeID == 12)
offset = 10;
427 if(volumeID == 0)
offset = 16;
428 if(volumeID == -2)
offset = 21;
429 if(volumeID == 2)
offset = 30;
451 if(volumeID == -999)
return -999;
454 if(layerID == 0)
offset = 21;
455 if(layerID == 1)
offset = 21+15;
456 if(layerID == 2)
offset = 21+15+6;
457 if(layerID == 3)
offset = 21+15+6+23;
458 if(layerID == 4)
offset = 21+15+6+23+6;
459 if(layerID == 5)
offset = 21+15+6+23+6+11;
460 if(layerID == 6)
offset = 21+15+6+23+6+11+8;
461 if(layerID == 7)
offset = 21+15+6+23+6+11+8+8;
462 if(layerID == 8)
offset = 21+15+6+23+6+11+8+8+9;
467 if(layerID == 0)
offset = 116;
468 if(layerID == 1)
offset = 116+15;
469 if(layerID == 2)
offset = 116+15+6;
470 if(layerID == 3)
offset = 116+15+6+23;
471 if(layerID == 4)
offset = 116+15+6+23+6;
472 if(layerID == 5)
offset = 116+15+6+23+6+11;
473 if(layerID == 6)
offset = 116+15+6+23+6+11+8;
474 if(layerID == 7)
offset = 116+15+6+23+6+11+8+8;
475 if(layerID == 8)
offset = 116+15+6+23+6+11+8+8+9;