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

Commit

Permalink
Merge pull request #859 from JeffersonLab/iss642-fttrkDev
Browse files Browse the repository at this point in the history
Iss642 fttrk dev
  • Loading branch information
raffaelladevita authored Jun 10, 2022
2 parents 4104769 + b31f124 commit 4c1b647
Show file tree
Hide file tree
Showing 34 changed files with 6,137 additions and 789 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,13 @@ public class DetectorLayer {
public static final byte TARGET_CENTER=1;
public static final byte TARGET_DOWNSTREAM=2;
public static final byte TARGET_UPSTREAM=3;

public static final byte FTTRK_MODULE1=1;
public static final byte FTTRK_MODULE2=2;
public static final byte FTTRK_LAYER1=1;
public static final byte FTTRK_LAYER2=2;
public static final byte FTTRK_LAYER3=3;
public static final byte FTTRK_LAYER4=4;

}

Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public enum DetectorType {
detectorId = id;
detectorName = name;
}

/**
* Returns the name of the detector.
* @return the name of the detector
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public void initAll(){

String[] names = new String[]{
"MAGFIELDS",
"FTCAL", "FTHODO", "FTEB",
"FTCAL", "FTHODO", "FTTRK", "FTEB",
"DCCR","DCHB","FTOFHB","EC","RASTER",
"CVTFP","CTOF","CND","BAND",
"HTCC","LTCC","EBHB",
Expand All @@ -91,6 +91,7 @@ public void initAll(){
"org.jlab.clas.swimtools.MagFieldsEngine",
"org.jlab.rec.ft.cal.FTCALEngine",
"org.jlab.rec.ft.hodo.FTHODOEngine",
"org.jlab.rec.ft.trk.FTTRKEngine",
"org.jlab.rec.ft.FTEBEngine",
"org.jlab.service.dc.DCHBClustering",
"org.jlab.service.dc.DCHBPostClusterConv",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,9 @@ public void fillHipoEventFTTRK(Event hipoEvent, EvioDataEvent evioEvent){
hipoADC.putByte("order", i,(byte) 0);
hipoADC.putInt("ADC", i, evioBank.getInt("ADC", i));
double tdc = 0;
hipoADC.putFloat("time", i, (float) (tdc/25.0));
// hipoADC.putFloat("time", i, (float) (tdc/25.0));
double time = (float) evioBank.getFloat("time",i);
hipoADC.putFloat("time", i, (float) evioBank.getFloat("time",i));
}
hipoEvent.write(hipoADC);
}
Expand Down
50 changes: 50 additions & 0 deletions etc/bankdefs/hipo/FT.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,56 @@
{"name":"energy", "id":10, "type":"float", "info":"Cluster total energy" }
]
},
{
"bank": "FTTRK::hits",
"group": 21321,
"info": "Reconstructed Hits in FT hodoscope",
"items": [
{"name":"sector", "id":2, "type":"int8", "info":"sector number"},
{"name":"layer", "id":3, "type":"int8", "info":"layer number"},
{"name":"component", "id":4, "type":"int16", "info":"component number"},
{"name":"x", "id":5, "type":"float", "info":"Hit X position (cm)" },
{"name":"y", "id":6, "type":"float", "info":"Hit Y position (cm)" },
{"name":"z", "id":7, "type":"float", "info":"Hit Z position (cm)" },
{"name":"energy", "id":8, "type":"float", "info":"Hit Energy" },
{"name":"time", "id":9, "type":"float", "info":"Hit Time" },
{"name":"hitID", "id":10, "type":"int16", "info":"Hit Pointer to ADC bank"},
{"name":"clusterID", "id":11, "type":"int16", "info":"Hit Pointer to Cluster Bank"}
]
},
{
"bank": "FTTRK::clusters",
"group": 21322,
"info": "Reconstructed clusters in FT tracker",
"items": [
{"name":"size", "id":1, "type":"int16", "info":"Cluster size"},
{"name":"id", "id":2, "type":"int16", "info":"Cluster ID"},
{"name":"sector", "id":3, "type":"int8", "info":"Cluster sector"},
{"name":"layer", "id":4, "type":"int8", "info":"Cluster layer"},
{"name":"energy", "id":5, "type":"float", "info":"Cluster total energy"},
{"name":"maxEnergy", "id":6, "type":"float", "info":"Seed energy "},
{"name":"seed", "id":7, "type":"int16", "info":"Seed strip"},
{"name":"centroid", "id":8, "type":"float", "info":"Centroid strip number"}
]
},
{
"bank": "FTTRK::crosses",
"group": 21323,
"info": "Reconstructed crosses in FT tracker",
"items": [
{"name":"size", "id":1, "type":"int16", "info":"Size of cross bank"},
{"name":"id", "id":2, "type":"int16", "info":"Cross ID"},
{"name":"sector", "id":3, "type":"int8", "info":"Cross sector"},
{"name":"detector", "id":4, "type":"int8", "info":"Cross detector"},
{"name":"x", "id":5, "type":"float", "info":"Cross X position (cm)"},
{"name":"y", "id":6, "type":"float", "info":"Cross Y position (cm)"},
{"name":"z", "id":7, "type":"float", "info":"Cross Z position (cm)"},
{"name":"energy", "id":8, "type":"float", "info":"Energy associated to the Cross"},
{"name":"time", "id":9, "type":"float", "info":"Time associated to the Cross"},
{"name":"Cluster1ID", "id":10, "type":"int16", "info":"ID of the bottom layer cluster in the Cross"},
{"name":"Cluster2ID", "id":11, "type":"int16", "info":"ID of the top layer cluster in the Cross"}
]
},
{
"bank": "FT::particles",
"group": 20924,
Expand Down
64 changes: 60 additions & 4 deletions etc/bankdefs/hipo4/ft.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[
{
[
{
"name": "FTCAL::hits",
"group": 21000,
"item" : 21,
Expand All @@ -15,7 +15,7 @@
{"name":"hitID", "type":"S", "info":"Hit Pointer to ADC bank"},
{"name":"clusterID", "type":"S", "info":"Hit Pointer to Cluster Bank"}
]
},
},
{
"name": "FTCAL::clusters",
"group": 21000,
Expand Down Expand Up @@ -90,8 +90,64 @@
{"name":"time", "type":"F", "info":"track Time" },
{"name":"calID", "type":"S", "info":"pointer to cluster bank"},
{"name":"hodoID", "type":"S", "info":"pointer to signal bank"},
{"name":"trkID", "type":"S", "info":"pointer to cross banks"}
{"name":"trk0ID", "type":"S", "info":"pointer to first cross bank"},
{"name":"trk1ID", "type":"S", "info":"pointer to second cross bank"}

]
},
{
"name": "FTTRK::hits",
"group": 21300,
"item": 21,
"info": "Reconstructed Hits in FT tracker",
"entries": [
{"name":"sector", "type":"B", "info":"sector number"},
{"name":"layer", "type":"B", "info":"layer number"},
{"name":"component", "type":"S", "info":"component number"},
{"name":"x", "type":"F", "info":"Hit X position (cm)" },
{"name":"y", "type":"F", "info":"Hit Y position (cm)" },
{"name":"z", "type":"F", "info":"Hit Z position (cm)" },
{"name":"energy", "type":"F", "info":"Hit Energy" },
{"name":"time", "type":"F", "info":"Hit Time" },
{"name":"hitID", "type":"S", "info":"Hit Pointer to ADC bank"},
{"name":"clusterID", "type":"S", "info":"Hit Pointer to Cluster Bank"}
]
},
{
"name": "FTTRK::clusters",
"group": 21300,
"item": 22,
"info": "Reconstructed clusters in FT tracker",
"entries": [
{"name":"size", "type":"S", "info":"Cluster size"},
{"name":"id", "type":"S", "info":"Cluster ID"},
{"name":"sector", "type":"B", "info":"Cluster sector"},
{"name":"layer", "type":"B", "info":"Cluster layer"},
{"name":"energy", "type":"F", "info":"Cluster total energy" },
{"name":"maxEnergy", "type":"F", "info":"Seed energy"},
{"name":"seed", "type":"S", "info":"Seed strip"},
{"name":"centroid", "type":"F", "info":"Centroid strip number"}
]
},
{
"name": "FTTRK::crosses",
"group": 21300,
"item": 23,
"info": "Reconstructed crosses in FT tracker",
"entries": [
{"name":"size", "type":"S", "info":"Size of cross bank"},
{"name":"id", "type":"S", "info":"Cross ID"},
{"name":"sector", "type":"B", "info":"Cross sector"},
{"name":"detector", "type":"B", "info":"Cross detector"},
{"name":"x", "type":"F", "info":"Cross X position (cm)"},
{"name":"y", "type":"F", "info":"Cross Y position (cm)"},
{"name":"z", "type":"F", "info":"Cross Z position (cm)"},
{"name":"energy", "type":"F", "info":"Cross Energy" },
{"name":"time", "type":"F", "info":"Cross Time" },
{"name":"Cluster1ID", "type":"S", "info":"ID of the upstream layer cluster in the Cross"},
{"name":"Cluster2ID", "type":"S", "info":"ID of the downstream layer cluster in the Cross"}
]
}


]
2 changes: 1 addition & 1 deletion etc/bankdefs/util/bankSplit.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def create(dirname, banklist):
dets = band + rich + rtpc

# additions for the calibration schema:
calib = ["BAND::adc","BAND::laser","BAND::tdc","BAND::hits","BAND::rawhits","CND::adc","CND::hits","CND::tdc","CTOF::adc","CTOF::hits","CTOF::tdc","CVTRec::Tracks","ECAL::adc","ECAL::calib","ECAL::clusters","ECAL::peaks","ECAL::tdc","FMT::Hits","FMT::Clusters","FMT::Tracks","FMT::Trajectory","FT::particles","FTCAL::adc","FTCAL::clusters","FTCAL::hits","FTHODO::adc","FTHODO::clusters","FTHODO::hits","FTOF::adc","FTOF::hits","FTOF::tdc","HTCC::adc","HTCC::rec","LTCC::adc","LTCC::clusters","RF::adc","RF::tdc","RICH::tdc","RICH::hits","RICH::hadCher","RICH::hadrons","RICH::photons","RICH::ringCher","RTPC::adc","RTPC::hits","RTPC::tracks","RUN::rf","RUN::trigger","TimeBasedTrkg::TBCrosses","TimeBasedTrkg::TBHits","TimeBasedTrkg::TBSegments","TimeBasedTrkg::TBSegmentTrajectory","TimeBasedTrkg::TBTracks","TimeBasedTrkg::Trajectory"]
calib = ["BAND::adc","BAND::laser","BAND::tdc","BAND::hits","BAND::rawhits","CND::adc","CND::hits","CND::tdc","CTOF::adc","CTOF::hits","CTOF::tdc","CVTRec::Tracks","ECAL::adc","ECAL::calib","ECAL::clusters","ECAL::peaks","ECAL::tdc","FMT::Hits","FMT::Clusters","FMT::Tracks","FMT::Trajectory","FT::particles","FTCAL::adc","FTCAL::clusters","FTCAL::hits","FTHODO::adc","FTHODO::clusters","FTHODO::hits","FTTRK::adc","FTTRK::clusters","FTTRK::hits","FTTRK::crosses","FTOF::adc","FTOF::hits","FTOF::tdc","HTCC::adc","HTCC::rec","LTCC::adc","LTCC::clusters","RF::adc","RF::tdc","RICH::tdc","RICH::hits","RICH::hadCher","RICH::hadrons","RICH::photons","RICH::ringCher","RTPC::adc","RTPC::hits","RTPC::tracks","RUN::rf","RUN::trigger","TimeBasedTrkg::TBCrosses","TimeBasedTrkg::TBHits","TimeBasedTrkg::TBSegments","TimeBasedTrkg::TBSegmentTrajectory","TimeBasedTrkg::TBTracks","TimeBasedTrkg::Trajectory"]

# additions for the monitoring schema:
mon = ["BMT::adc","BMTRec::Clusters","BMTRec::Crosses","BMTRec::Hits","BMTRec::LayerEffs","BST::adc","BSTRec::Clusters","BSTRec::Crosses","BSTRec::Hits","BSTRec::LayerEffs","CND::clusters","CVTRec::Trajectory","ECAL::hits","FMT::adc","HEL::adc","HitBasedTrkg::HBTracks","RAW::vtp"]
Expand Down
2 changes: 2 additions & 0 deletions etc/services/data-ai.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ services:
name: FTCAL
- class: org.jlab.rec.ft.hodo.FTHODOEngine
name: FTHODO
- class: org.jlab.rec.ft.trk.FTTRKEngine
name: FTTRK
- class: org.jlab.rec.ft.FTEBEngine
name: FTEB
# DC clustering: nominal algoritm, filled the cluster bank for ai and conventional tracking
Expand Down
2 changes: 2 additions & 0 deletions etc/services/data-aicv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ services:
name: FTCAL
- class: org.jlab.rec.ft.hodo.FTHODOEngine
name: FTHODO
- class: org.jlab.rec.ft.trk.FTTRKEngine
name: FTTRK
- class: org.jlab.rec.ft.FTEBEngine
name: FTEB
# DC clustering: nominal algoritm, filled the cluster bank for ai and conventional tracking
Expand Down
2 changes: 2 additions & 0 deletions etc/services/data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ services:
name: FTCAL
- class: org.jlab.rec.ft.hodo.FTHODOEngine
name: FTHODO
- class: org.jlab.rec.ft.trk.FTTRKEngine
name: FTTRK
- class: org.jlab.rec.ft.FTEBEngine
name: FTEB
# DC clustering: nominal algoritm, filled the cluster bank for ai and conventional tracking
Expand Down
2 changes: 2 additions & 0 deletions etc/services/kpp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ services:
name: FTCAL
- class: org.jlab.rec.ft.hodo.FTHODOEngine
name: FTHODO
- class: org.jlab.rec.ft.trk.FTTRKEngine
name: FTTRK
- class: org.jlab.rec.ft.FTEBEngine
name: FTEB
# DC clustering: nominal algoritm, filled the cluster bank for ai and conventional tracking
Expand Down
4 changes: 3 additions & 1 deletion etc/services/mc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ services:
name: FTCAL
- class: org.jlab.rec.ft.hodo.FTHODOEngine
name: FTHODO
- class: org.jlab.rec.ft.trk.FTTRKEngine
name: FTTRK
- class: org.jlab.rec.ft.FTEBEngine
name: FTEB
# DC clustering: nominal algoritm, filled the cluster bank for ai and conventional tracking
Expand Down Expand Up @@ -75,6 +77,6 @@ configuration:
magfieldTorusMap: Symm_torus_r2501_phi16_z251_24Apr2018.dat
RTPC:
rtpcSimulation: "true"

mime-types:
- binary/data-hipo
29 changes: 20 additions & 9 deletions reconstruction/ft/src/main/java/org/jlab/rec/ft/FTConstants.java
Original file line number Diff line number Diff line change
@@ -1,22 +1,33 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package org.jlab.rec.ft;

/**
*
* @author devita
* @author filippi
*/
public class FTConstants {

public static final int HODO_MIN_CLUSTER_SIZE = 2; // minimum size of hodo clusters for match to calorimeter

public static final double CAL_HODO_DISTANCE_MATCHING = 3.0; // matching distance in cm
public static final double CAL_HODO_TIME_MATCHING = 8; // matching time in ns
public static final double CAL_HODO_DISTANCE_MATCHING = 3.0; // matching distance in cm
public static final double CAL_HODO_TIME_MATCHING = 8; // matching time in ns (it was 8)

public static final double CAL_TRK_DISTANCE_MATCHING = 3.; // matching distance in cm (it was 1.5)
public static final double CAL_TRK_TIME_MATCHING = 200; // matching time in ns TOBECORRECTED (it was 30 - 300 - 100 - 150)

public static final double TRK_STRIP_MIN_TIME = 50; // minimum time value associated to one strip
public static final double TRK_STRIP_MAX_TIME = 350; // minimum time value associated to one strip

public static final double CAL_TRK_DISTANCE_MATCHING = 1.5; // matching distance in cm
public static final double CAL_TRK_TIME_MATCHING = 30; // matching time in ns TOBECORRECTED
public static final double TRK_MIN_CROSS_NUMBER = 1; // minimum number of crosses to find a line in the tracker
public static final double TRK1_TRK2_RADTOL = 0.05; // max tolerance for TRK0/TRK1 distance (3D) (was 1.-0.5)
public static final double TRK1_TRK2_PHITOL = 0.07; // max tolerance for TRK0/TRK1 phi angular deviation (was 1.-0.7)
public static final double TRK1_TRK2_THETATOL = 0.07; // max tolerance for TRK0/TRK1 theta angulare deviation (was 1.-0.7)

public static final double TRK_ADC_MINIMUM = 18.; // check min threshold for FTTTRK ADCs (18)
public static final double TRK_ADC_MAXIMUM = 2000.; // check max threshold for FTTTRK ADCs (18) was 1000 170122
public static final int TRK_MAX_STRIPS_FOR_TRUNCATED_MEAN = 20; // threshold for maxnumber of strips included in the truncated mean algo.
public static final int TRK_MIN_CLUSTER_SIZE_CENTROID = 3; // minimum size of the cluster to provide a reliable location by its centroid
public static final double TRK_MIN_CLUS_ENERGY = 20.; // minimum cluster energy to accept a signal cluster (20)
public static final int TRK_MIN_CLUS_SIZE = 0; // minimum cluster size to form crosses (0: no limit on cluster size) // 2 is very strict
public static final int TRK_MAXNUMBEROFHITS = 100; // maximum number of accepted hits in the tracker banks
}
Loading

0 comments on commit 4c1b647

Please sign in to comment.