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

Commit

Permalink
cluster status is 1 in the case where any hit is a possible double hi…
Browse files Browse the repository at this point in the history
…t and not just the seed hit
  • Loading branch information
ajhobart authored and raffaelladevita committed Feb 27, 2023
1 parent 176e09a commit f41356f
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,14 @@ public ArrayList<CNDCluster> findClusters(ArrayList<CndHit> hits, CalibrationCon

double energy_cluster;
double pathlengththroughbar;
double cluster_status; //1 is at least one hit is possibly a double hit

for(int k =0; k<j/*clustered_hits.size()*/; k++)
{

energy_cluster=0;
pathlengththroughbar=0;
cluster_status = 0;
CndHit seedHit = (CndHit) clustered_hits.getItem(k).get(0);

CNDCluster acluster = new CNDCluster(k+1, seedHit.Sector(), seedHit.Layer() );
Expand All @@ -179,6 +181,7 @@ public ArrayList<CNDCluster> findClusters(ArrayList<CndHit> hits, CalibrationCon
theHit.set_AssociatedClusterID(k+1);

energy_cluster += theHit.Edep();
cluster_status += theHit.get_status();
pathlengththroughbar += theHit.tLength()/10.0;


Expand All @@ -202,7 +205,14 @@ public ArrayList<CNDCluster> findClusters(ArrayList<CndHit> hits, CalibrationCon
acluster.set_time(seedHit.Time());
acluster.set_nhits(clustered_hits.getItem(k).size());
acluster.set_energysum(energy_cluster);
acluster.set_status(seedHit.get_status());
if(cluster_status>0)
{
acluster.set_status(1);
}
else
{
acluster.set_status(0);
}
acluster.set_pathLengthThruBar(pathlengththroughbar);


Expand Down

0 comments on commit f41356f

Please sign in to comment.