Skip to content
Merged
Show file tree
Hide file tree
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 @@ -188,34 +188,20 @@ public List<FittedCluster> ClusterSplitter(FittedCluster clus, int nextClsStartI
}
}
}
//no gaps
List<Hit> contigArrayOfHits = new ArrayList<>(); //contiguous cluster

boolean passCluster = true;
for (int l = 1; l <= Constants.NLAYR; l++) {
for (int i = 0; i < newClus.size(); i++) {
if (newClus.get(i).get_Layer() == l) {
contigArrayOfHits.add(newClus.get(i));
}
}
}
for (int i = 0; i < contigArrayOfHits.size() - 1; i++) { //if there is a gap do not include in list
if (contigArrayOfHits.get(i + 1).get_Layer() - contigArrayOfHits.get(i).get_Layer() > 1) {
passCluster = false;

//Limits for cluster candiates
boolean passCluster = false;
int nLayers = count_nlayers_in_cluster(newClus);
if((!isExceptionalCluster(newClus) && nLayers >= Constants.DC_MIN_NLAYERS)
|| (isExceptionalCluster(newClus) && nLayers >= Constants.DC_MIN_NLAYERS - 1)) {
//require consistency with line
cf.SetFitArray(newClus, "LC");
cf.Fit(newClus, true);
if ((nLayers == 6 && newClus.get_fitProb() > 0.9) || (nLayers == 5 && newClus.get_fitProb() > 0.85)
|| (nLayers == 4 && newClus.get_fitProb() > 0.75) || (nLayers == 3 && newClus.get_fitProb() > 0.65)) {
passCluster = true;
}
}
//require 4 layers to make a cluster
if ((!isExceptionalCluster(contigArrayOfHits) && count_nlayers_in_cluster(contigArrayOfHits) < Constants.DC_MIN_NLAYERS)
|| (isExceptionalCluster(contigArrayOfHits) && count_nlayers_in_cluster(contigArrayOfHits) < Constants.DC_MIN_NLAYERS - 1)) {
passCluster = false;
}

//require consistency with line
cf.SetFitArray(newClus, "LC");
cf.Fit(newClus, true);
if (newClus.get_fitProb() < 0.9) {
passCluster = false;
}

if (!(splitclusters.contains(newClus)) && passCluster) {
splitclusters.add(newClus);
Expand Down Expand Up @@ -314,7 +300,7 @@ public int count_nlayers_hit(Hit[] hits_inlayer) {
* @param hitsInClus the hits in a cluster
* @return the number of layers in a cluster
*/
int count_nlayers_in_cluster(List<Hit> hitsInClus) {
int count_nlayers_in_cluster(List<? extends Hit> hitsInClus) {
// count hits in each layer
int nlayr = 6;
int[] nlayers = new int[nlayr];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@ public List<FittedCluster> FindHitBasedClusters(List<Hit> allhits, ClusterCleane
int idSharedHits = numTDCBankRows + 10000;
for (FittedCluster clus : fittedClusList) {
if (clus != null && ((!ct.isExceptionalFittedCluster(clus) && clus.size() >= Constants.DC_MIN_NLAYERS) ||
(ct.isExceptionalFittedCluster(clus) && clus.size() >= Constants.DC_MIN_NLAYERS-1)) && clus.get_fitProb()>Constants.HITBASEDTRKGMINFITHI2PROB) {
(ct.isExceptionalFittedCluster(clus) && clus.size() >= Constants.DC_MIN_NLAYERS-1))
&& ((ct.count_nlayers_in_cluster(clus) < Constants.DC_MIN_NLAYERS && clus.get_fitProb() > 0.4) || (ct.count_nlayers_in_cluster(clus) >= Constants.DC_MIN_NLAYERS && clus.get_fitProb()>Constants.HITBASEDTRKGMINFITHI2PROB))) {

// update the hits
for (FittedHit fhit : clus) {
Expand Down