Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@ -148,11 +148,11 @@ private int getDCRBJitter(int sector, int layer, int wire, int order) {
if(dcrbjitters!=null && reverseTT!=null) {
long hash = IndexedTable.DEFAULT_GENERATOR.hashCode(sector, layer, wire, order);
if(!reverseTT.hasEntryByHash(hash))
LOGGER.log(Level.SEVERE, "Missing TT entry for slco = " + sector + " " + layer + " " + wire + " " + order);
LOGGER.log(Level.SEVERE, () -> "Missing TT entry for slco = " + sector + " " + layer + " " + wire + " " + order);
int crate = reverseTT.getIntValueByHash("crate", hash);
int slot = reverseTT.getIntValueByHash("slot", hash);
if(!dcrbjitters.hasEntry(crate, slot))
LOGGER.log(Level.SEVERE, "Missing DC::jitter entry for crate/slot = " + crate + "/" + slot);
LOGGER.log(Level.SEVERE, () -> "Missing DC::jitter entry for crate/slot = " + crate + "/" + slot);
jitter = dcrbjitters.getIntValue("jitter", crate, slot);
}
return jitter;
Expand Down Expand Up @@ -315,7 +315,7 @@ private void read_HBHits(TimeToDistanceEstimator tde) {
String pointName = bankNames.getInputIdsBank();
String recBankName = bankNames.getRecEventBank();

LOGGER.log(Level.FINEST,"Reading hb banks for "+ bankName + ", " + pointName + " " + recBankName);
LOGGER.log(Level.FINEST, () -> "Reading hb banks for "+ bankName + ", " + pointName + " " + recBankName);

_HBHits = new ArrayList<>();

Expand Down Expand Up @@ -439,7 +439,7 @@ private void read_HBHits(TimeToDistanceEstimator tde) {
//if(hit.betaFlag == 0)
if(passHit(hit.betaFlag)) {
this._HBHits.add(hit);
LOGGER.log(Level.FINEST, "Passing "+hit.printInfo()+" for "+ bankNames.getHitsBank());
LOGGER.log(Level.FINEST, () -> "Passing "+hit.printInfo()+" for "+ bankNames.getHitsBank());
}
}
}
Expand Down Expand Up @@ -512,7 +512,7 @@ private void read_NNHits() {
hit.NNTrkP = this.aimatch.get(clusterID)[0];
hit.NNTrkTheta = this.aimatch.get(clusterID)[1];
hit.NNTrkPhi = this.aimatch.get(clusterID)[2];
LOGGER.log(Level.FINEST, "NN"+hit.printInfo());
LOGGER.log(Level.FINEST, () -> "NN"+hit.printInfo());
this._DCHits.add(hit);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ public class ClusterFinder {
public ClusterFinder() {

}
private static final Logger LOGGER = Logger.getLogger(ClusterFinder.class.getName());

// cluster finding algorithm
// the loop is done over sector and superlayers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,9 +407,8 @@ public void set_CrossDirIntersSegWires() {
double val_it1 = this._seg1.get_fittedCluster().get_clusterLineFitIntercept();
double val_it2 = this._seg2.get_fittedCluster().get_clusterLineFitIntercept();

LOGGER.log(Level.FINEST, this._seg1.printInfo()+this._seg2.printInfo()+" insterWire: seg1 "+new Point3D(val_sl1, val_it1,999).toString()+
" seg2 "+new Point3D(val_sl2, val_it2,999).toString()
);
LOGGER.log(Level.FINEST, () -> this._seg1.printInfo()+this._seg2.printInfo()+" insterWire: seg1 "+new Point3D(val_sl1, val_it1,999).toString()+
" seg2 "+new Point3D(val_sl2, val_it2,999).toString());
for(int i =0; i<this.get_Segment1().size(); i++) {
this.calc_IntersectPlaneAtZ(this.get_Segment1().get(i).get_Z(), wy_over_wx, val_sl1, val_sl2, val_it1, val_it2, this.get_Segment1().get(i));
}
Expand All @@ -421,15 +420,14 @@ public void set_CrossDirIntersSegWires() {

private void calc_IntersectPlaneAtZ(double z, double wy_over_wx, double val_sl1, double val_sl2, double val_it1, double val_it2, FittedHit hit) {

LOGGER.log(Level.FINEST, " .....insterWire: seg1 "+new Point3D(val_sl1, val_it1,z).toString()+
" seg2 "+new Point3D(val_sl2, val_it2,z).toString()
);
LOGGER.log(Level.FINEST, () -> " .....insterWire: seg1 "+new Point3D(val_sl1, val_it1,z).toString()+
" seg2 "+new Point3D(val_sl2, val_it2,z).toString());
double x = 0.5 * (val_it1 + val_it2) + 0.5 * z * (val_sl1 + val_sl2);
double y = 0.5 * wy_over_wx * (val_it2 - val_it1) + 0.5 * wy_over_wx * z * (val_sl2 - val_sl1);

if(hit.getCrossDirIntersWire()!=null && hit.getCrossDirIntersWire().x()!=x)
LOGGER.log(Level.FINEST, "Already exists "+hit.getCrossDirIntersWire().toString()+" for "
+hit.printInfo() +"new "+new Point3D(x,y,z).toString());
LOGGER.log(Level.FINEST, () -> "Already exists "+hit.getCrossDirIntersWire().toString()+" for "
+hit.printInfo() +"new "+new Point3D(x,y,z).toString());

hit.setCrossDirIntersWire(new Point3D(x,y,z));
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.jlab.rec.dc.hit;

import eu.mihosoft.vrl.v3d.Vector3d;
import org.jlab.clas.clas.math.FastMath;
import org.jlab.clas.swimtools.Swimmer;
import org.jlab.detector.geant4.v2.DCGeant4Factory;
import org.jlab.geom.prim.Line3D;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import org.jlab.rec.dc.Constants;
import org.jlab.rec.dc.cluster.Cluster;
import org.jlab.rec.dc.cluster.ClusterCleanerUtilities;
import org.jlab.rec.dc.cluster.ClusterFinder;
import org.jlab.rec.dc.cluster.ClusterFitter;
import org.jlab.rec.dc.cluster.ClusterFitter.CoordSys;
import org.jlab.rec.dc.cluster.FittedCluster;
Expand All @@ -32,7 +31,6 @@ public class PatternRec {

private static final Logger LOGGER = Logger.getLogger(PatternRec.class.getName());

private final ClusterFinder clf = new ClusterFinder();
private final ClusterCleanerUtilities ct = new ClusterCleanerUtilities();
private final ClusterFitter cf = new ClusterFitter();
private final CrossMaker crf = new CrossMaker();
Expand Down Expand Up @@ -114,7 +112,7 @@ public CrossList RecomposeCrossList(List<Segment> clusters,
if(entry.getValue().size()==3)
crossList.add(entry.getValue());
for(Cross c : entry.getValue())
LOGGER.log(Level.FINEST, "AI"+c.printInfo()+c.get_Segment1().printInfo()+c.get_Segment2().printInfo());
LOGGER.log(Level.FINEST, () -> "AI"+c.printInfo()+c.get_Segment1().printInfo()+c.get_Segment2().printInfo());
}
return crossList;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

import java.util.ArrayList;
import java.util.List;
import java.util.logging.Logger;
import org.jlab.detector.geant4.v2.DCGeant4Factory;
import org.jlab.geom.prim.Plane3D;
import org.jlab.geom.prim.Point3D;
import org.jlab.geom.prim.Vector3D;
import org.jlab.clas.clas.math.FastMath;
import org.jlab.rec.dc.Constants;
import org.jlab.rec.dc.cluster.FittedCluster;
import org.jlab.rec.dc.hit.FittedHit;
Expand All @@ -23,8 +21,6 @@
public class Segment extends ArrayList<FittedHit> implements Comparable<Segment>,
Cloneable {

private static final Logger LOGGER = Logger.getLogger(Segment.class.getName());

private static final long serialVersionUID = -997960312423538455L;
private FittedCluster _fittedCluster;
public boolean isOnTrack = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import java.util.ArrayList;
import java.util.List;
import org.jlab.clas.clas.math.FastMath;
import org.jlab.detector.geant4.v2.DCGeant4Factory;
import org.jlab.io.base.DataBank;
import org.jlab.io.base.DataEvent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/*
* 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.dc.timetodistance;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.logging.Logger;
import org.jlab.detector.base.DetectorType;
import org.jlab.detector.base.GeometryFactory;
import org.jlab.geom.base.ConstantProvider;
Expand All @@ -23,8 +22,6 @@ public class TableLoader {
public TableLoader() {
}

public static final Logger LOGGER = Logger.getLogger(TableLoader.class.getName());

private static boolean T2DLOADED = false;

public static final int NBINST=2000;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package org.jlab.rec.dc.timetodistance;

import java.util.logging.Level;
import java.util.logging.Logger;
import org.jlab.rec.dc.Constants;
import static org.jlab.rec.dc.timetodistance.TableLoader.BfieldValues;
import static org.jlab.rec.dc.timetodistance.TableLoader.calc_Time;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -719,9 +719,9 @@ private Integer getKey(Track trk) {

public void removeOverlappingTracksOld(List<Track> trkcands) {
if(Constants.DEBUG) {
LOGGER.log(Level.FINEST, "Found "+trkcands.size()+" HB seeds ");
LOGGER.log(Level.FINEST, () -> "Found "+trkcands.size()+" HB seeds ");
for(int i = 0; i< trkcands.size(); i++) {
LOGGER.log(Level.FINEST, "cand "+i);
LOGGER.log(Level.FINEST, "cand {0}", i);
for(Cross c : trkcands.get(i)) {
LOGGER.log(Level.FINEST, c.printInfo());
}
Expand All @@ -747,9 +747,9 @@ public void removeOverlappingTracksOld(List<Track> trkcands) {
trkcands.add(entry.getValue());
});
if(Constants.DEBUG) {
LOGGER.log(Level.FINEST, "After Overlap Remvr "+trkcands.size()+" HB seeds ");
LOGGER.log(Level.FINEST, () -> "After Overlap Remvr "+trkcands.size()+" HB seeds ");
for(int i = 0; i< trkcands.size(); i++) {
LOGGER.log(Level.FINEST, "cand "+i);
LOGGER.log(Level.FINEST, "cand {0}", i);
for(Cross c : trkcands.get(i)) {
LOGGER.log(Level.FINEST, c.printInfo());
}
Expand All @@ -760,9 +760,9 @@ public void removeOverlappingTracksOld(List<Track> trkcands) {

public void removeOverlappingTracks(List<Track> trkcands) {
if(Constants.DEBUG) {
LOGGER.log(Level.FINEST, "Found "+trkcands.size()+" HB seeds ");
LOGGER.log(Level.FINEST, () -> "Found "+trkcands.size()+" HB seeds ");
for(int i = 0; i< trkcands.size(); i++) {
LOGGER.log(Level.FINEST, "cand "+i);
LOGGER.log(Level.FINEST, "cand {0}", i);
for(Cross c : trkcands.get(i)) {
LOGGER.log(Level.FINEST, c.printInfo());
}
Expand Down Expand Up @@ -969,7 +969,7 @@ private List<Track> findStraightTracks(CrossList crossList, DCGeant4Factory DcDe
startTime = System.currentTimeMillis();
}
Trajectory traj = trjFind.findTrajectory(aCrossList, DcDetector, dcSwim);
LOGGER.log(Level.FINEST, "Trajectory finding = " + (System.currentTimeMillis() - startTime));
LOGGER.log(Level.FINEST, () -> "Trajectory finding = " + (System.currentTimeMillis() - startTime));


if (traj == null) {
Expand All @@ -991,7 +991,7 @@ private List<Track> findStraightTracks(CrossList crossList, DCGeant4Factory DcDe
cand.get(0).get_Dir().y() / cand.get(0).get_Dir().z());
cand.set_StateVecAtReg1MiddlePlane(VecAtReg1MiddlePlane);

LOGGER.log(Level.FINEST, "Kalman fitter - 2 = " + (System.currentTimeMillis() - startTime));
LOGGER.log(Level.FINEST, () -> "Kalman fitter - 2 = " + (System.currentTimeMillis() - startTime));

KFitterStraight kFZRef = new KFitterStraight(true, 1, 1, dcSwim, Constants.getInstance().Z, Libr.JNP);
List<Surface> measSurfaces = getMeasSurfaces(cand, DcDetector);
Expand Down Expand Up @@ -1070,7 +1070,7 @@ private List<Track> findCurvedTracks(CrossList crossList, DCGeant4Factory DcDete
}
Trajectory traj = trjFind.findTrajectory(aCrossList, DcDetector, dcSwim);

LOGGER.log(Level.FINEST, "Trajectory finding = " + (System.currentTimeMillis() - startTime));
LOGGER.log(Level.FINEST, () -> "Trajectory finding = " + (System.currentTimeMillis() - startTime));


if (traj == null) {
Expand Down Expand Up @@ -1138,7 +1138,7 @@ private List<Track> findCurvedTracks(CrossList crossList, DCGeant4Factory DcDete
}
int q = this.calcInitTrkQ(traj.getA(), TORSCALE);

LOGGER.log(Level.FINEST, "calcInitTrkQ = " + (System.currentTimeMillis() - startTime));
LOGGER.log(Level.FINEST, () -> "calcInitTrkQ = " + (System.currentTimeMillis() - startTime));

if (p > 11) {
p = 11;
Expand All @@ -1161,7 +1161,7 @@ private List<Track> findCurvedTracks(CrossList crossList, DCGeant4Factory DcDete

final int crossIdxinList = cand.get(1).isPseudoCross ? 0 : 1;

LOGGER.log(Level.FINEST, "Kalman fitter - 2 = " + (System.currentTimeMillis() - startTime));
LOGGER.log(Level.FINEST, () -> "Kalman fitter - 2 = " + (System.currentTimeMillis() - startTime));

KFitter kFZRef = new KFitter(true, 10, 1, dcSwim, Constants.getInstance().Z, Libr.JNP);
List<Surface> measSurfaces = getMeasSurfaces(cand, DcDetector);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.jlab.rec.dc.trajectory;

import org.jlab.detector.base.DetectorType;
import org.jlab.geom.prim.Arc3D;
import org.jlab.geom.prim.Line3D;
import org.jlab.geom.prim.Plane3D;
import org.jlab.geom.prim.Point3D;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.jlab.rec.dc.trajectory;

import Jama.*;
import org.jlab.clas.clas.math.FastMath;
import org.jlab.rec.dc.Constants;
/**
* Describes a track pars in the DC.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import java.util.ArrayList;
import java.util.List;
import java.util.logging.Logger;
import org.jlab.clas.swimtools.Swim;
import org.jlab.detector.base.DetectorType;
import org.jlab.geom.prim.Point3D;
Expand All @@ -23,8 +22,6 @@ public class Trajectory extends ArrayList<Cross> {
public Trajectory() {
}

private static final Logger LOGGER = Logger.getLogger(Trajectory.class.getName());

private int id;
private int sector;
private double integratedBdL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import org.jlab.rec.dc.Constants;

import java.io.PrintWriter;
import java.util.logging.Logger;
import org.jlab.geom.detector.ec.ECLayer;
import org.jlab.geom.detector.ec.ECSuperlayer;
import org.jlab.geom.detector.fmt.FMTLayer;
Expand All @@ -33,8 +32,6 @@
*/
public class TrajectorySurfaces {

public static Logger LOGGER = Logger.getLogger(TrajectorySurfaces.class.getName());

private List<ArrayList<Surface>> detectorPlanes = new ArrayList<>();

public List<ArrayList<Surface>> getDetectorPlanes() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.jlab.rec.dc.trajectory;

import java.util.Random;
//import org.apache.commons.math3.util.FastMath;
import org.jlab.clas.clas.math.FastMath;
import org.jlab.clas.swimtools.Swim;
import org.jlab.geom.prim.Line3D;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import org.jlab.rec.dc.banks.Banks;
import org.jlab.clas.tracking.kalmanfilter.zReference.KFitter;
import org.jlab.clas.tracking.kalmanfilter.zReference.DAFilter;
import org.jlab.rec.ai.dcHBTrackState.HBTrackStateEstimator;

public class DCEngine extends ReconstructionEngine {

Expand Down Expand Up @@ -218,7 +217,7 @@ private void initBanks() {
this.getBanks().init(outBankPrefix);
if(inBankPrefix!=null && outBankPrefix!=null)
this.getBanks().init(inBankPrefix, outBankPrefix);
LOGGER.log(Level.INFO,"["+this.getName()+"] bank names set for " + this.getBanks().toString());
LOGGER.log(Level.INFO, () -> "["+this.getName()+"] bank names set for " + this.getBanks().toString());
}

public Banks getBanks() {
Expand All @@ -238,7 +237,7 @@ public int getRun(DataEvent event) {
return 0;
}
DataBank bank = event.getBank("RUN::config");
LOGGER.log(Level.FINEST,"["+this.getName()+"] EVENT "+bank.getInt("event", 0));
LOGGER.log(Level.FINEST, () -> "["+this.getName()+"] EVENT "+bank.getInt("event", 0));

int run = bank.getInt("run", 0);
return run;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ public boolean processDataEventUser(DataEvent event) {
CrossList crosslist = pr.RecomposeCrossList(segments, Constants.getInstance().dcDetector);
crosses = new ArrayList<>();

LOGGER.log(Level.FINEST, "num cands = "+crosslist.size());
LOGGER.log(Level.FINEST, () -> "num cands = "+crosslist.size());
for (List<Cross> clist : crosslist) {
crosses.addAll(clist);
for(Cross c : clist)
LOGGER.log(Level.FINEST, "Pass Cross"+c.printInfo());
LOGGER.log(Level.FINEST, () -> "Pass Cross"+c.printInfo());
}
if (crosses.isEmpty()) {
for(Segment seg : segments) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,11 @@ public boolean processDataEventUser(DataEvent event) {

trkcands.addAll(mistrkcands);

LOGGER.log(Level.FINEST, "Found after 5STg "+mistrkcands.size()+" HB seeds ");
LOGGER.log(Level.FINEST, () -> "Found after 5STg "+mistrkcands.size()+" HB seeds ");
for(int i = 0; i< trkcands.size(); i++) {
LOGGER.log(Level.FINEST, "cand "+i);
LOGGER.log(Level.FINEST, "cand {0}", i);
for(Cross c : trkcands.get(i)) {
LOGGER.log(Level.FINEST, c.printInfo());
LOGGER.log(Level.FINEST, () -> c.printInfo());
}
LOGGER.log(Level.FINEST, "------------------------------------------------------------------ ");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@ else if(Swimmer.getTorScale() > 0)
CrossList crosslist = pr.RecomposeCrossList(segments, Constants.getInstance().dcDetector);
crosses = new ArrayList<>();

LOGGER.log(Level.FINEST, "num cands = "+crosslist.size());
LOGGER.log(Level.FINEST, () -> "num cands = "+crosslist.size());
for (List<Cross> clist : crosslist) {
crosses.addAll(clist);
for(Cross c : clist)
LOGGER.log(Level.FINEST, "Pass Cross"+c.printInfo());
LOGGER.log(Level.FINEST, () -> "Pass Cross"+c.printInfo());
}
if (crosses.isEmpty()) {
for(Segment seg : segments) {
Expand Down
Loading
Loading