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

Updates of forward tracking since November of 2022 #107

Open
wants to merge 104 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
32f76ba
Refactor and move KF tracking package from dc to common-tools and upd…
tongtongcao Jan 9, 2023
c95ea47
small update for KFitter::calcFinalChisq()
tongtongcao Jan 17, 2023
a1f0dc4
adjust code format and add author for source files
tongtongcao Feb 3, 2023
0eeb540
further adjust code format
tongtongcao Feb 3, 2023
613ca23
futher code format adjustments
tongtongcao Feb 7, 2023
4fdf52c
first version of forward tracking with uRWell
tongtongcao Feb 13, 2023
6fc9d12
add pseudo segments for missed track candidates
tongtongcao Feb 14, 2023
f044691
add AI services for forward tracking with uRWell
tongtongcao Feb 15, 2023
c9c0af7
change uRWELL resolution setup
tongtongcao Feb 24, 2023
a83e4e3
reset uRWell resolution
tongtongcao Feb 27, 2023
e8c9b2e
fix issue for the FastMath package
tongtongcao Mar 1, 2023
d65561f
fix issue in the FastMath package
tongtongcao Mar 1, 2023
3cfc641
cache some sine and cosine calculations in DC reconstruction and forw…
tongtongcao Mar 6, 2023
0d3bec1
Merge branch 'issueFastMathPackage' into upgradeTrackingWithuRWELL
tongtongcao Mar 6, 2023
b7883c8
use math library to assign values for constant parameters
tongtongcao Mar 8, 2023
aa508e0
Merge branch 'issueFastMathPackage' into upgradeTrackingWithuRWELL
tongtongcao Mar 8, 2023
52c6d81
switch to new CCDB
tongtongcao Mar 8, 2023
b57b71c
re-design pattern recognition for FD tracking
tongtongcao Mar 27, 2023
17f0c63
reset covaraince matrix for initial state
tongtongcao Mar 30, 2023
e937fc6
tiny change
tongtongcao Mar 30, 2023
20ba059
tiny change
tongtongcao Mar 30, 2023
d39473d
change conditions for stopping forward tracking iteration
tongtongcao Apr 3, 2023
ab49f65
Merge branch 'upgradeTrackingWithuRWELL' into redesignPatternRecognition
tongtongcao Apr 3, 2023
9edbc8a
update overlap of tracks with uRWell crosses
tongtongcao Apr 5, 2023
886382e
Version 2 of DC-uRWell tracking
tongtongcao May 26, 2023
d96c634
fix conflicts when merging with branch development
tongtongcao May 26, 2023
582118a
fix issue that some information for states in trajectory is missed
tongtongcao Jul 19, 2023
6682a41
Merge branch 'development' into upgradeTrackingWithuRWELL
tongtongcao Jul 19, 2023
4692bd0
tiny change
tongtongcao Jul 19, 2023
b707d09
update pom file
tongtongcao Jul 19, 2023
0484aa5
change uRWell resolution setup in TB tracking
tongtongcao Aug 8, 2023
39dd887
fix an issue for writting KF fit doca
tongtongcao Aug 18, 2023
6d45e37
Merge branch 'development' into upgradeTrackingWithuRWELL
tongtongcao Aug 31, 2023
670e0d1
blow up initial covariance matrix starting from the second iteration
tongtongcao Sep 15, 2023
acb9924
Merge branch 'development' into upgradeTrackingWithuRWELL
tongtongcao Sep 18, 2023
9fea9d9
change limit for inverse calculation of covariance matrix
tongtongcao Oct 12, 2023
b9b7bfb
reset limit since CI test failed
tongtongcao Oct 12, 2023
a2c71d8
Merge branch 'development' into upgradeTrackingWithuRWELL
tongtongcao Oct 12, 2023
5053091
modify reconstruction/dc/pom.xml for version of tracking package
tongtongcao Oct 12, 2023
a0d8fb6
Issue for CI test was fixed. Reset limit to proper value.
tongtongcao Oct 12, 2023
55fd5dd
apply DAF into DC-only tracking
tongtongcao Oct 19, 2023
ee56b5e
redefine NDF and remove codes for fail tracking judge
tongtongcao Nov 7, 2023
723bced
update projected doca for double hits
tongtongcao Nov 29, 2023
352c964
fix conflict for definition of LR ambiguity between DC hits and measu…
tongtongcao Dec 1, 2023
0624c53
Merge branch 'upgradeTrackingWithuRWELL' into applyDAF
tongtongcao Dec 1, 2023
f64c764
apply DAF into DC-uRWell tracking
tongtongcao Dec 1, 2023
a45a392
update calcFinalChisq() in org.jlab.clas.tracking.kalmanfilter.zRefer…
tongtongcao Dec 1, 2023
c1e1363
fix merge conflicts
tongtongcao Dec 1, 2023
25f77c3
modify fitResidual in TB hit banks
tongtongcao Dec 5, 2023
c7b9f33
Merge branch 'upgradeTrackingWithuRWELL' into applyDAF
tongtongcao Dec 5, 2023
4651800
update trajectory projected doca
tongtongcao Dec 5, 2023
d7d264e
Merge branch 'development' into upgradeTrackingWithuRWELL
tongtongcao Dec 7, 2023
6f3043d
Merge branch 'upgradeTrackingWithuRWELL' of https://github.com/Jeffer…
tongtongcao Dec 7, 2023
93044b1
add KF package for straight tracking
tongtongcao Dec 8, 2023
b841721
Merge branch 'upgradeTrackingWithuRWELL' into applyDAF
tongtongcao Dec 8, 2023
f9e18b6
update filter_DAF function
tongtongcao Dec 19, 2023
a2419f4
fix issue to judge if zero field in DCTBEngine
tongtongcao Dec 19, 2023
46ffd46
Merge branch 'development' into upgradeTrackingWithuRWELL
tongtongcao Dec 19, 2023
52eff35
update pom file for DC reconstruction for version of clas-tracking
tongtongcao Dec 19, 2023
68a47a0
Merge branch 'upgradeTrackingWithuRWELL' into applyDAF
tongtongcao Dec 19, 2023
a83a064
Merge branch 'applyDAF' into studyHitLR
tongtongcao Dec 19, 2023
28c6e86
add DAF weight into TB hit banks
tongtongcao Dec 20, 2023
4c4fe70
fix a bug in function matchHits()
tongtongcao Jan 3, 2024
f80df3f
Merge branch 'upgradeTrackingWithuRWELL' into applyDAF
tongtongcao Jan 3, 2024
86bd280
Merge branch 'applyDAF' into studyHitLR
tongtongcao Jan 3, 2024
9daeb40
add ndfDAF for NDF weighted by DAF
tongtongcao Jan 31, 2024
ee87d04
Merge branch 'studyHitLR' into applyDAF
tongtongcao Jan 31, 2024
0a0df89
store final weight for DAF in DC-uRWell tracking
tongtongcao Jan 31, 2024
55e6f37
Merge branch 'development' into upgradeTrackingWithuRWELL
tongtongcao Feb 9, 2024
469bf95
update pom file in DC package for version of clas-tracking
tongtongcao Feb 9, 2024
43e5216
Merge branch 'upgradeTrackingWithuRWELL' into applyDAF
tongtongcao Feb 9, 2024
6006a41
fix merge conflicts and update uRWell reader with 2 regions of uRWells
tongtongcao Feb 23, 2024
f789f16
Merge branch 'upgradeTrackingWithuRWELL' into applyDAF
tongtongcao Feb 23, 2024
d4921c8
set configuration for option of DAF application
tongtongcao Mar 6, 2024
5a47f52
set configuration for option of DAF parameters
tongtongcao Mar 7, 2024
71b3492
Merge branch 'development' into upgradeTrackingWithuRWELL
tongtongcao Mar 7, 2024
a742314
update dc pom file for tracking package version
tongtongcao Mar 7, 2024
42a9f6d
Merge branch 'applyDAF' into upgradeTrackingWithuRWELL
tongtongcao Mar 7, 2024
d1a2c29
loose limit for Vtx0_y in DC reconstruction test
tongtongcao Mar 7, 2024
4c32fae
Merge branch 'development' into applyDAF
tongtongcao Mar 13, 2024
1bcc0e6
update DC reconstruction pom file for version of tracking
tongtongcao Mar 13, 2024
9c35c38
fix merge conflict
tongtongcao Mar 13, 2024
540aa85
update configuration setup for options of DAF implementation and DAF …
tongtongcao Mar 20, 2024
2d9b8bb
update for configuration of DAF annealing factor
tongtongcao Mar 25, 2024
d27a668
Merge branch 'development' into upgradeTrackingWithuRWELL
tongtongcao Mar 26, 2024
84f7422
update DC reconstruction pom file for version of tracking
tongtongcao Mar 26, 2024
07cbf20
set lower limit for DAF weight to avoid overflow
tongtongcao Mar 27, 2024
d4d0909
fine updates
tongtongcao Mar 28, 2024
6f35a35
tiny change
tongtongcao Mar 28, 2024
5239f52
Update TB hit status, whose first bit indicates that a hit is belong …
tongtongcao Mar 29, 2024
78b1557
update for NDF
tongtongcao Apr 1, 2024
b25c04a
apply DAF for uRWell measurements
tongtongcao Apr 4, 2024
55d68b0
add state inforamtion from tracking into banks for uRWell
tongtongcao Apr 5, 2024
b430b27
update org.jlab.service.dc.DCURWellHBPostClusterAI
tongtongcao Apr 5, 2024
3f28d40
Update org.jlab.service.dc.DCURWellHBPostClusterAI to take clusters o…
tongtongcao Apr 8, 2024
052e186
fix HB cluster bank issue in org.jlab.service.dc.DCURWellHBPostClusterAI
tongtongcao Apr 9, 2024
c4db38e
fix merge conflicts
tongtongcao Apr 12, 2024
f0c8cae
Merge branch 'upgradeTrackingWithuRWELL' into applyDAFAIURWell2
tongtongcao Apr 12, 2024
4a9dbcb
Merge branch 'development' into upgradeTrackingWithuRWELL
tongtongcao Apr 22, 2024
6b1823e
update status of uRWell cross
tongtongcao Apr 25, 2024
8d86beb
update uRWell reader for uRWell clusters
tongtongcao Apr 26, 2024
def71e6
Merge branch 'development' into upgradeTrackingWithuRWELL
tongtongcao May 2, 2024
dc687c7
Merge branch 'development' into upgradeTrackingWithuRWELL
tongtongcao Aug 21, 2024
5777a52
Merge branch 'development' into upgradeTrackingWithuRWELL
raffaelladevita Aug 22, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public abstract class AMeasVecs {

public void setMeasVecs(List<Surface> measSurfaces) {
measurements = new ArrayList<>();
if(measSurfaces.get(0).type != Type.LINEDOCA) // Measurements from DC has been sorted
if(measSurfaces.get(0).type != Type.LINEDOCA && measSurfaces.get(0).type != Type.PLANEWITHPOINT) // Measurements from URWell and DC has been sorted
Collections.sort(measSurfaces);
for(int i = 0; i < measSurfaces.size(); i++) {
MeasVec mvec = new MeasVec();
Expand All @@ -41,6 +41,11 @@ public void setMeasVecs(List<Surface> measSurfaces) {
mvec.superlayer = measSurfaces.get(i).getSuperLayer();
mvec.layer = measSurfaces.get(i).getLayer();
}
else if(measSurfaces.get(i).type == Type.PLANEWITHPOINT){
mvec.region = measSurfaces.get(i).region;
mvec.layer = measSurfaces.get(i).getLayer();
mvec.sector = measSurfaces.get(i).getSector();
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
public class DAFilter {

private static double dafChi2Cut = 8;
private static double dafChi2CutURWell = 100;

// For double hits
private double[] docas_double;
Expand All @@ -27,7 +28,13 @@ public class DAFilter {
// Effective doca
private double effectiveDoca;
private double effectiveVar;
private int indexReferenceWire = 0;
private int indexReferenceWire = 0;

// For uRWell
private double[] xyVars_uRWell;
private double weight_uRWell;
private double[] effectiveXYVars_uRWell;


public DAFilter(double[] docas, double[] vars, double[] weights, Line3D[] wireLines) {
this.docas_double = docas;
Expand All @@ -44,10 +51,19 @@ public DAFilter(double doca, double var, double weight) {
this.weight_single = weight;
}

public DAFilter(double[] xyVars, double weight) {
this.xyVars_uRWell = xyVars;
this.weight_uRWell = weight;
}

public static void setDafChi2Cut(double chi2Cut){
dafChi2Cut = chi2Cut;
}

public static void setDafChi2CutURWell(double chi2Cut){
dafChi2CutURWell = chi2Cut;
}

public void calc_effectiveDoca_doubleHits(){
if((wireLines_double[0] == wireLines_double[1]) || ((docas_double[0] == docas_double[1]) && !(docas_double[0] == 0 && docas_double[1] == 0))) {
effectiveVar = vars_double[0]/weights_double[0];
Expand Down Expand Up @@ -118,6 +134,12 @@ public void calc_effectiveDoca_singleHit(){
effectiveDoca = doca_single;
}

public void calc_effectiveMeasVars_uRWell(){
effectiveXYVars_uRWell = new double[]{10., 10.};
for(int i = 0; i < 2; i++)
effectiveXYVars_uRWell[i] = xyVars_uRWell[i]/weight_uRWell;
}

public double get_EffectiveDoca(){
return effectiveDoca;
}
Expand All @@ -126,6 +148,10 @@ public double get_EffectiveVar(){
return effectiveVar;
}

public double[] get_EffectiveXYVars_uRWell(){
return effectiveXYVars_uRWell;
}

public int get_IndexReferenceWire(){
return indexReferenceWire;
}
Expand Down Expand Up @@ -166,5 +192,19 @@ public double[] calc_updatedWeights_doubleHits(double[] residuals, double anneal
return updatedWeights;
}

public double calc_updatedWeight_uRWell(double[] residuals, double annealingFactor){
double factor = 1/(2 * Math.PI) / Math.sqrt( annealingFactor * xyVars_uRWell[0] * xyVars_uRWell[1]);

double Chi2 = residuals[0] * residuals[0]/xyVars_uRWell[0] + residuals[1] * residuals[1]/xyVars_uRWell[1];
double Phi = factor * Math.exp(-0.5 / annealingFactor * Chi2);
double Lambda = factor * Math.exp(-0.5 / annealingFactor * dafChi2CutURWell);
double sum = Phi + Lambda;
double updatedWeight = Phi/sum;

if(updatedWeight < 1.e-100) updatedWeight = 1.e-100;
return updatedWeight;

}

}

Loading