Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
2b0d47b
Definition of atof hits
N-Plx Jan 13, 2025
00cd6b1
Definition of bar hits
N-Plx Jan 13, 2025
3b6fbe9
Building hit lists
N-Plx Jan 13, 2025
652b019
First clustering, to be revisited
N-Plx Jan 13, 2025
2424a31
ahdc track projection
N-Plx Jan 13, 2025
b6b0d46
Path length
N-Plx Jan 15, 2025
c324db0
Hits sorted by energy
N-Plx Jan 15, 2025
54f9b05
Some more clustering algo, resolutions need to be set
N-Plx Jan 15, 2025
6698e51
Track projection bank def
N-Plx Jan 15, 2025
0b638f7
Track projection to the middle of elements
N-Plx Jan 15, 2025
ef4ac5f
Track projection surfaces redefinition
N-Plx Jan 15, 2025
0d1c541
Some naming conventions
N-Plx Jan 16, 2025
dc69e6c
Handling parameters + method for testing
N-Plx Jan 17, 2025
253ba11
Handling parameters + bank input
N-Plx Jan 17, 2025
26d54a2
Correcting conversion to MeV
N-Plx Jan 17, 2025
5b9af43
Refactoring BarHit definition, now inherits from AtofHit
N-Plx Jan 17, 2025
f5b79b0
ATOF hit bank
N-Plx Jan 17, 2025
27e449d
ATOF bank writer
N-Plx Jan 17, 2025
2443567
viewed clustering logic
Jan 21, 2025
0674b9f
will work on this branch
Jan 22, 2025
75c3ca1
Fixing conversions tdc/tot to time/energy and cleanup
N-Plx Jan 23, 2025
fc46784
Fixing time/energy computation and some cleanup
N-Plx Jan 23, 2025
fdcc168
Fixing energy sorting and some cleanup
N-Plx Jan 23, 2025
3548204
proximity checks for ClusterFinder::improved logic
Jan 23, 2025
6d0adc2
handling clustering parameters
N-Plx Feb 3, 2025
79840b5
cluster parameters definition
N-Plx Feb 3, 2025
c146932
fix hit order
N-Plx Feb 3, 2025
b433842
cluster bank definition
N-Plx Feb 3, 2025
a893d8c
charge sign fix and projection from MC Particle info
N-Plx Feb 3, 2025
f2463d5
draft atof engine to be completed
N-Plx Feb 3, 2025
2b93892
Adding gemc to ci
Feb 4, 2025
616951c
modified: .gitlab-ci.yml
Feb 4, 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
3 changes: 3 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ workflow:
default:
image: ubuntu:noble
retry: 2
tags:
- silicon

coatjava_build:
image: gcr.io/kaniko-project/executor:debug
Expand Down Expand Up @@ -38,3 +40,4 @@ shared_for_alert_tests:
project: hallb/alert/atof/shared_for_alert
strategy: depend


148 changes: 148 additions & 0 deletions etc/bankdefs/hipo4/alert.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,153 @@
[
{
"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": "ATOF::clusters",
"group": 22500,
"item": 22,
"info": "Clusters in ATOF",
"entries": [
{
"name": "id",
"type": "S",
"info": "hit id"
}, {
"name": "barsize",
"type": "I",
"info": "number of hits from the bars"
}, {
"name": "wedgesize",
"type": "I",
"info": "number of hits from the wedges"
},{
"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": "energy in MeV"
},{
"name": "pathlength",
"type": "F",
"info": "path length to the cluster in mm"
},{
"name": "inpathlength",
"type": "F",
"info": "path length inside the detector in mm"
}
]
},{
"name": "AHDC::Hits",
"group": 23000,
"item": 23,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
package org.jlab.rec.atof.cluster;

import java.util.ArrayList;
import org.jlab.rec.atof.hit.AtofHit;
import org.jlab.rec.atof.hit.BarHit;

/**
*
* @author npilleux
*/
public class AtofCluster {

ArrayList<BarHit> bar_hits;
ArrayList<AtofHit> wedge_hits;
double x,y,z,time,energy;
double path_length, inpath_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;
}

public double getInpath_length() {
return inpath_length;
}

public void setInpath_length(double inpath_length) {
this.inpath_length = inpath_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();
this.inpath_length = max_energy_hit.getInpath_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();
this.inpath_length = max_energy_barhit.getInpath_length();
}
}

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

public double getBeta()
{
return (this.path_length / this.time) / (2.9979 * Math.pow(10, 2));//to do: Change to non-hardcoded value for c
}

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