Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

/**
*
* @author ziegler
* @author ziegler, tongtong
*/
public class DCHBPostClusterAI extends DCEngine {

Expand Down Expand Up @@ -71,7 +71,7 @@ public boolean processDataEvent(DataEvent event) {
//AI
List<Track> trkcands = null;
List<Cross> crosses = null;
List<FittedCluster> clusters = null;
List<FittedCluster> clusters = new ArrayList<>();
List<Segment> segments = null;
List<FittedHit> fhits = null;

Expand Down Expand Up @@ -103,7 +103,6 @@ public boolean processDataEvent(DataEvent event) {
LOGGER.log(Level.FINE, "Pass Cross"+c.printInfo());
}
if (crosses.isEmpty()) {
clusters = new ArrayList<>();
for(Segment seg : segments) {
clusters.add(seg.get_fittedCluster());
}
Expand All @@ -126,14 +125,18 @@ public boolean processDataEvent(DataEvent event) {
dcSwim, true);

// track found
clusters = new ArrayList<>();
int trkId = 1;
if (trkcands.size() > 0) {
// remove overlaps
trkcandFinder.removeOverlappingTracks(trkcands);
for (Track trk : trkcands) {
trk.setIsAITrack(true);

for (Cross c : trk) {
clusters.add(c.get_Segment1().get_fittedCluster());
clusters.add(c.get_Segment2().get_fittedCluster());
}

// reset the id
trk.set_Id(trkId);
trkcandFinder.matchHits(trk.getStateVecs(),
Expand Down Expand Up @@ -312,6 +315,7 @@ public boolean processDataEvent(DataEvent event) {
if (trkcands.isEmpty()) {
event.appendBanks(
writer.fillHBHitsBank(event, fhits),
writer.fillHBClustersBank(event, clusters),
writer.fillHBSegmentsBank(event, segments),
writer.fillHBCrossesBank(event, crosses));
}
Expand Down