Skip to content
This repository has been archived by the owner on May 18, 2023. It is now read-only.

Commit

Permalink
Fixes:
Browse files Browse the repository at this point in the history
Clusters: removal of isolated noise hits near the cluster.
Hits: Looser hit-on-track matching requirement at HitBased level to 
ensure that hit-on-track candidates are used by TimeBased tracking.
Fitter: Filtering on swimming inwards from last to first measurement site.
  • Loading branch information
zieglerv committed Mar 12, 2019
1 parent 79fdf8d commit 3f9e635
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ public FittedCluster SecondariesRemover(FittedCluster clus, ClusterFitter cf, In
}
hitsInSameLayerLists.add(hitsInLayer);
} else {
baseClusterHits.addAll(hitsInLayer); // safe all good hits to base cluster
baseClusterHits.addAll(hitsInLayer); // save all good hits to base cluster
}
}
}
Expand Down Expand Up @@ -774,7 +774,7 @@ public List<Hit> HitListPruner(List<Hit> hits) {
* @param clus
* @return a new cluster that is contiguous
*/
public FittedCluster IsolatedHitsPruner(FittedCluster clus) {
public void IsolatedHitsPruner(FittedCluster clus) {

int min = 1000;
int max = -1000;
Expand Down Expand Up @@ -810,26 +810,33 @@ public FittedCluster IsolatedHitsPruner(FittedCluster clus) {
int layer = clus.get(i).get_Layer();
if (layer == 1) // look of neighbor in next layer
{
if (HitArray[layer][wire - 1] != null || HitArray[layer][wire - 2] != null || HitArray[layer][wire] != null || HitArray[layer - 1][wire - 2] != null || HitArray[layer - 1][wire] != null) {
if (HitArray[layer-1][wire - 2] != null || HitArray[layer-1][wire] != null
|| HitArray[layer][wire - 2] != null || HitArray[layer][wire - 1] != null || HitArray[layer][wire] != null
) {
fcluster.add(clus.get(i));
}
}
if (layer == 6) // look of neighbor in previous layer
{
if (HitArray[layer - 2][wire - 1] != null || HitArray[layer - 2][wire - 2] != null || HitArray[layer - 2][wire] != null || HitArray[layer - 1][wire - 2] != null || HitArray[layer - 1][wire] != null) {
if (HitArray[layer-2][wire - 2] != null || HitArray[layer-2][wire - 1] != null || HitArray[layer-2][wire] != null
|| HitArray[layer-1][wire - 2] != null || HitArray[layer-1][wire] != null
) {
fcluster.add(clus.get(i));
}
}
if (layer > 1 && layer < 6) // look of neighbor in next and previous layers
{
if (HitArray[layer][wire - 1] != null || HitArray[layer][wire - 2] != null || HitArray[layer][wire] != null || HitArray[layer - 2][wire - 1] != null || HitArray[layer - 2][wire - 2] != null || HitArray[layer - 2][wire] != null || HitArray[layer - 1][wire - 2] != null || HitArray[layer - 1][wire] != null) {
if (HitArray[layer-2][wire - 2] != null || HitArray[layer-2][wire - 1] != null || HitArray[layer-2][wire] != null
|| HitArray[layer-1][wire - 2] != null || HitArray[layer-1][wire] != null
|| HitArray[layer][wire - 2] != null || HitArray[layer][wire - 1] != null || HitArray[layer][wire] != null
) {
fcluster.add(clus.get(i));
}
}

}

return fcluster;
clus.clear();
clus.addAll(fcluster);
}

public void outOfTimersRemover(FittedCluster fClus, boolean removeHit) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public List<FittedCluster> FindHitBasedClusters(List<Hit> allhits, ClusterCleane
continue;
//System.out.println(" I passed this cluster "+clus.printInfo());
FittedCluster fClus = new FittedCluster(clus);
//FittedCluster fClus = ct.IsolatedHitsPruner(fclus);
//ct.IsolatedHitsPruner(fClus);
// Flag out-of-timers
//if(Constants.isSimulation==true) {
ct.outOfTimersRemover(fClus, true); // remove outoftimers
Expand All @@ -204,7 +204,7 @@ public List<FittedCluster> FindHitBasedClusters(List<Hit> allhits, ClusterCleane
continue;
selectedClusList.add(fClus);
}

//System.out.println(" Clusters Step 2");
// for(FittedCluster c : selectedClusList)
// for(FittedHit h : c)
Expand All @@ -217,17 +217,22 @@ public List<FittedCluster> FindHitBasedClusters(List<Hit> allhits, ClusterCleane

cf.SetFitArray(clus, "LC");
cf.Fit(clus, true);

if (clus.get_fitProb() > Constants.HITBASEDTRKGMINFITHI2PROB || clus.size() < Constants.HITBASEDTRKGNONSPLITTABLECLSSIZE) {
if(clus.get_fitProb()<Constants.HITBASEDTRKGMINFITHI2PROB) {
ct.IsolatedHitsPruner(clus);
}
if (clus.get_fitProb() > Constants.HITBASEDTRKGMINFITHI2PROB ||
(clus.size() < Constants.HITBASEDTRKGNONSPLITTABLECLSSIZE && clus.get_fitProb()!=0) ){
fittedClusList.add(clus); //if the chi2 prob is good enough, then just add the cluster, or if the cluster is not split-able because it has too few hits
} else {
} else {

List<FittedCluster> splitClus = ct.ClusterSplitter(clus, selectedClusList.size(), cf);
fittedClusList.addAll(splitClus);
}
}

ArrayList rmHits = new ArrayList<FittedHit>();
for (FittedCluster clus : fittedClusList) {
if (clus != null && clus.size() > 3 ) {
if (clus != null && clus.size() > 3 && clus.get_fitProb()>Constants.HITBASEDTRKGMINFITHI2PROB) {
rmHits.clear();
// update the hits
for (FittedHit fhit : clus) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ public void matchHits(List<StateVec> stateVecAtPlanesList, Track trk,
for (FittedHit h1 : c.get_Segment1()) {
if (Math.abs(st.getZ() - h1.get_Z()) < 0.1 && c.get_Segment1().get_Id()>-1) {
try {
if((h1.get_X() - st.getProjector())>h1.get_CellSize()*2)
if((h1.get_X() - st.getProjector())>h1.get_CellSize()*20)
continue;
FittedHit ch1 = (FittedHit) ((FittedHit) h1.clone());
ch1.set_Id(h1.get_Id());
Expand Down Expand Up @@ -652,7 +652,7 @@ public void matchHits(List<StateVec> stateVecAtPlanesList, Track trk,
for (FittedHit h1 : c.get_Segment2()) {
if (Math.abs(st.getZ() - h1.get_Z()) < 0.1 && c.get_Segment2().get_Id()>-1) {
try {
if((h1.get_X() - st.getProjector())>h1.get_CellSize()*2)
if((h1.get_X() - st.getProjector())>h1.get_CellSize()*20)
continue;
FittedHit ch1 = (FittedHit) ((FittedHit) h1.clone());
ch1.set_Id(h1.get_Id());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,17 @@ public void runFitter(int sector) {
this.chi2kf = 0;
if (i > 1) {
//get new state vec at 1st measurement after propagating back from the last filtered state
sv.transport(sector,
svzLength - 1,
0,
sv.trackTraj.get(svzLength - 1),
sv.trackCov.get(svzLength- 1));
// sv.transport(sector,
// svzLength - 1,
// 0,
// sv.trackTraj.get(svzLength - 1),
// sv.trackCov.get(svzLength- 1));
for (int k = svzLength-1; k > 0; k--) {
sv.transport(sector, k, k - 1,
sv.trackTraj.get(k),
sv.trackCov.get(k));
this.filter(k - 1);
}
}
for (int k = 0; k < svzLength - 1; k++) {
sv.transport(sector, k, k + 1,
Expand Down

0 comments on commit 3f9e635

Please sign in to comment.