Skip to content

Commit 8924938

Browse files
authored
reset limit for prob in DC clustering and cancel requirement that no skipped layer for cluster candidates from splitter (#500)
1 parent f1aaaca commit 8924938

2 files changed

Lines changed: 15 additions & 28 deletions

File tree

reconstruction/dc/src/main/java/org/jlab/rec/dc/cluster/ClusterCleanerUtilities.java

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -188,34 +188,20 @@ public List<FittedCluster> ClusterSplitter(FittedCluster clus, int nextClsStartI
188188
}
189189
}
190190
}
191-
//no gaps
192-
List<Hit> contigArrayOfHits = new ArrayList<>(); //contiguous cluster
193-
194-
boolean passCluster = true;
195-
for (int l = 1; l <= Constants.NLAYR; l++) {
196-
for (int i = 0; i < newClus.size(); i++) {
197-
if (newClus.get(i).get_Layer() == l) {
198-
contigArrayOfHits.add(newClus.get(i));
199-
}
200-
}
201-
}
202-
for (int i = 0; i < contigArrayOfHits.size() - 1; i++) { //if there is a gap do not include in list
203-
if (contigArrayOfHits.get(i + 1).get_Layer() - contigArrayOfHits.get(i).get_Layer() > 1) {
204-
passCluster = false;
191+
192+
//Limits for cluster candiates
193+
boolean passCluster = false;
194+
int nLayers = count_nlayers_in_cluster(newClus);
195+
if((!isExceptionalCluster(newClus) && nLayers >= Constants.DC_MIN_NLAYERS)
196+
|| (isExceptionalCluster(newClus) && nLayers >= Constants.DC_MIN_NLAYERS - 1)) {
197+
//require consistency with line
198+
cf.SetFitArray(newClus, "LC");
199+
cf.Fit(newClus, true);
200+
if ((nLayers == 6 && newClus.get_fitProb() > 0.9) || (nLayers == 5 && newClus.get_fitProb() > 0.85)
201+
|| (nLayers == 4 && newClus.get_fitProb() > 0.75) || (nLayers == 3 && newClus.get_fitProb() > 0.65)) {
202+
passCluster = true;
205203
}
206204
}
207-
//require 4 layers to make a cluster
208-
if ((!isExceptionalCluster(contigArrayOfHits) && count_nlayers_in_cluster(contigArrayOfHits) < Constants.DC_MIN_NLAYERS)
209-
|| (isExceptionalCluster(contigArrayOfHits) && count_nlayers_in_cluster(contigArrayOfHits) < Constants.DC_MIN_NLAYERS - 1)) {
210-
passCluster = false;
211-
}
212-
213-
//require consistency with line
214-
cf.SetFitArray(newClus, "LC");
215-
cf.Fit(newClus, true);
216-
if (newClus.get_fitProb() < 0.9) {
217-
passCluster = false;
218-
}
219205

220206
if (!(splitclusters.contains(newClus)) && passCluster) {
221207
splitclusters.add(newClus);
@@ -314,7 +300,7 @@ public int count_nlayers_hit(Hit[] hits_inlayer) {
314300
* @param hitsInClus the hits in a cluster
315301
* @return the number of layers in a cluster
316302
*/
317-
int count_nlayers_in_cluster(List<Hit> hitsInClus) {
303+
int count_nlayers_in_cluster(List<? extends Hit> hitsInClus) {
318304
// count hits in each layer
319305
int nlayr = 6;
320306
int[] nlayers = new int[nlayr];

reconstruction/dc/src/main/java/org/jlab/rec/dc/cluster/ClusterFinder.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,8 @@ public List<FittedCluster> FindHitBasedClusters(List<Hit> allhits, ClusterCleane
236236
int idSharedHits = numTDCBankRows + 10000;
237237
for (FittedCluster clus : fittedClusList) {
238238
if (clus != null && ((!ct.isExceptionalFittedCluster(clus) && clus.size() >= Constants.DC_MIN_NLAYERS) ||
239-
(ct.isExceptionalFittedCluster(clus) && clus.size() >= Constants.DC_MIN_NLAYERS-1)) && clus.get_fitProb()>Constants.HITBASEDTRKGMINFITHI2PROB) {
239+
(ct.isExceptionalFittedCluster(clus) && clus.size() >= Constants.DC_MIN_NLAYERS-1))
240+
&& ((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))) {
240241

241242
// update the hits
242243
for (FittedHit fhit : clus) {

0 commit comments

Comments
 (0)