Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

430 atof reconstruction #436

Draft
wants to merge 26 commits into
base: development
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
ca09bc6
Definition of atof hits
N-Plx Jan 13, 2025
f21f8c1
Definition of bar hits
N-Plx Jan 13, 2025
64b5dd0
Building hit lists
N-Plx Jan 13, 2025
b81680b
First clustering, to be revisited
N-Plx Jan 13, 2025
49d70a7
ahdc track projection
N-Plx Jan 13, 2025
8b2f35b
Path length
N-Plx Jan 15, 2025
40a9109
Hits sorted by energy
N-Plx Jan 15, 2025
00fb57c
Some more clustering algo, resolutions need to be set
N-Plx Jan 15, 2025
9bfe8cf
Track projection bank def
N-Plx Jan 15, 2025
6852b64
Track projection to the middle of elements
N-Plx Jan 15, 2025
4b9ad51
Track projection surfaces redefinition
N-Plx Jan 15, 2025
4306a90
Merge branch 'development' into 430-atof-reconstruction
N-Plx Jan 16, 2025
ccd62bd
Some naming conventions
N-Plx Jan 16, 2025
32dd302
Handling parameters + method for testing
N-Plx Jan 17, 2025
584db56
Handling parameters + bank input
N-Plx Jan 17, 2025
5b652ea
Correcting conversion to MeV
N-Plx Jan 17, 2025
02c89e0
Refactoring BarHit definition, now inherits from AtofHit
N-Plx Jan 17, 2025
bd04a6e
ATOF hit bank
N-Plx Jan 17, 2025
1cdd484
ATOF bank writer
N-Plx Jan 17, 2025
8368618
viewed clustering logic
Jan 21, 2025
a803cc3
will work on this branch
Jan 22, 2025
d80672f
proximity checks for ClusterFinder::improved logic
Jan 23, 2025
2f5b398
Fixing conversions tdc/tot to time/energy and cleanup
N-Plx Jan 23, 2025
13e72f9
Fixing time/energy computation and some cleanup
N-Plx Jan 23, 2025
8343ce8
Fixing energy sorting and some cleanup
N-Plx Jan 23, 2025
229e68e
Merge branch '430-atof-reconstruction' of https://github.com/Jefferso…
N-Plx Jan 23, 2025
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
100 changes: 100 additions & 0 deletions etc/bankdefs/hipo4/alert.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,105 @@
[
{
"name": "AHDC::Projections",
"group": 23000,
"item": 31,
"info": "Track Projections to ATOF",
"entries": [
{
"name": "x_at_bar",
"type": "F",
"info": "x position at atof bar (middle surface) in mm"
}, {
"name": "y_at_bar",
"type": "F",
"info": "y position at atof bar (middle surface) in mm"
}, {
"name": "z_at_bar",
"type": "F",
"info": "z position at atof bar (middle surface) in mm"
},{
"name": "L_at_bar",
"type": "F",
"info": "path length at atof bar (inner surface) in mm"
},{
"name": "L_in_bar",
"type": "F",
"info": "path length inside atof bar in mm"
},{
"name": "x_at_wedge",
"type": "F",
"info": "x position at atof wedge (middle surface) in mm"
}, {
"name": "y_at_wedge",
"type": "F",
"info": "y position at atof wedge (middle surface) in mm"
}, {
"name": "z_at_wedge",
"type": "F",
"info": "z position at atof wedge (middle surface) in mm"
},{
"name": "L_at_wedge",
"type": "F",
"info": "path length at atof wedge (inner surface) in mm"
},{
"name": "L_in_wedge",
"type": "F",
"info": "path length inside atof wedge in mm"
}
]
},{
"name": "ATOF::hits",
"group": 22500,
"item": 21,
"info": "Hits in ATOF",
"entries": [
{
"name": "id",
"type": "S",
"info": "hit id"
}, {
"name": "sector",
"type": "I",
"info": "atof sector"
}, {
"name": "layer",
"type": "I",
"info": "atof layer"
},{
"name": "component",
"type": "I",
"info": "atof component"
},{
"name": "time",
"type": "F",
"info": "time in ns"
},{
"name": "x",
"type": "F",
"info": "x position in mm"
}, {
"name": "y",
"type": "F",
"info": "y position in mm"
}, {
"name": "z",
"type": "F",
"info": "z position in mm"
},{
"name": "energy",
"type": "F",
"info": "deposited energy in MeV"
},{
"name": "inlength",
"type": "F",
"info": "path length inside the detector (from entrance to hit) in mm"
},{
"name": "pathlength",
"type": "F",
"info": "path length to the hit in mm"
}
]
},{
"name": "AHDC::Hits",
"group": 23000,
"item": 23,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
package org.jlab.rec.atof.cluster;
import java.util.ArrayList;
import org.jlab.rec.atof.hit.AtofHit;
import org.jlab.rec.atof.hit.BarHit;

/**
*
* @authors npilleux, churaman
*/


public class AtofCluster {

ArrayList<BarHit> bar_hits;
ArrayList<AtofHit> wedge_hits;
double x,y,z,time,energy;
double path_length;

public ArrayList<BarHit> getBarHits() {
return bar_hits;
}

public void setBarHits(ArrayList<BarHit> bar_hits) {
this.bar_hits = bar_hits;
}

public ArrayList<AtofHit> getWedgeHits() {
return wedge_hits;
}

public void setWedgeHits(ArrayList<AtofHit> wedge_hits) {
this.wedge_hits = wedge_hits;
}

public double getX() {
return x;
}

public void setX(double x) {
this.x = x;
}

public double getY() {
return y;
}

public void setY(double y) {
this.y = y;
}

public double getZ() {
return z;
}

public void setZ(double z) {
this.z = z;
}

public double getTime() {
return time;
}

public void setTime(double time) {
this.time = time;
}

public double getEnergy() {
return energy;
}

public void setEnergy(double energy) {
this.energy = energy;
}

public double getPath_length() {
return path_length;
}

public void setPath_length(double path_length) {
this.path_length = path_length;
}

//Cluster coordinates and time are defined as the coordinates and time of the max energy hit
//Can be changed later

public final void computeClusterProperties() {
this.energy=0;
double max_energy = -1;
AtofHit max_energy_hit = new AtofHit();
BarHit max_energy_barhit = new BarHit();

for(int i_wedge = 0; i_wedge<this.wedge_hits.size(); i_wedge++)
{
AtofHit this_wedge_hit = this.wedge_hits.get(i_wedge);
double this_energy = this_wedge_hit.getEnergy();
this.energy+=this_energy;
if(this_energy>max_energy){max_energy_hit = this_wedge_hit; max_energy = this_energy;}
}

for(int i_bar = 0; i_bar<this.bar_hits.size(); i_bar++)
{
BarHit this_bar_hit = this.bar_hits.get(i_bar);
double this_energy = this_bar_hit.getEnergy();
this.energy+=this_energy;
if(this_energy>max_energy){max_energy_barhit = this_bar_hit; max_energy = this_energy;}
}

if(max_energy_hit.getEnergy() > max_energy_barhit.getEnergy())
{
this.time = max_energy_hit.getTime();
this.x = max_energy_hit.getX();
this.y = max_energy_hit.getY();
this.z = max_energy_hit.getZ();
this.path_length = max_energy_hit.getPath_length();
}
else
{
this.time = max_energy_barhit.getTime();
this.x = max_energy_barhit.getX();
this.y = max_energy_barhit.getY();
this.z = max_energy_barhit.getZ();
this.path_length = max_energy_barhit.getPath_length();
}

}

public double getPhi()
{
return Math.atan2(this.y, this.x);
}

public AtofCluster(ArrayList<BarHit> bar_hits, ArrayList<AtofHit> wedge_hits)
{
this.bar_hits = bar_hits;
this.wedge_hits = wedge_hits;
this.computeClusterProperties();
}

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
}

}
Loading
Loading