Skip to content

Commit 5d69a4e

Browse files
committed
private some methods and reduce locks
1 parent aa87d7b commit 5d69a4e

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

‎reconstruction/dc/src/main/java/org/jlab/rec/dc/timetodistance/TableLoader.java‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ private static int getAlphaBin(double Alpha) {
228228
return bin;
229229
}
230230

231-
private static synchronized void FillAlpha() {
231+
private static void FillAlpha() {
232232
for(int icosalpha =0; icosalpha<maxBinIdxAlpha+1; icosalpha++) {
233233

234234
double cos30minusalphaM = Math.cos(Math.toRadians(30.)) + (double)
@@ -252,7 +252,7 @@ private static synchronized void FillAlpha() {
252252

253253
public static boolean useP = true;
254254

255-
public static synchronized void getConstants(IndexedTable t2dPressure, IndexedTable t2dPressRef, IndexedTable pressure){
255+
private static void getConstants(IndexedTable t2dPressure, IndexedTable t2dPressRef, IndexedTable pressure){
256256
double p_ref = t2dPressRef.getDoubleValue("pressure", 0,0,0);
257257
double p = pressure.getDoubleValue("value", 0,0,3);
258258
double dp = p - p_ref;
@@ -302,7 +302,8 @@ public static synchronized void getConstants(IndexedTable t2dPressure, IndexedTa
302302
}
303303
}
304304
}
305-
public static synchronized void FillTable() {
305+
306+
private static void FillTable() {
306307
double stepSize = 0.00010;
307308
for(int s = 0; s<6; s++ ){ // loop over sectors
308309
for(int r = 0; r<6; r++ ){ //loop over slys
@@ -365,6 +366,7 @@ public static synchronized void FillTable() {
365366

366367
TableLoader.fillMissingTableBins();
367368
}
369+
368370
public static synchronized void Fill(IndexedTable t2dPressure, IndexedTable t2dPressRef, IndexedTable pressure) {
369371

370372
//CCDBTables 0 = "/calibration/dc/signal_generation/doca_resolution";
@@ -413,7 +415,7 @@ private static void fillMissingTableBins() {
413415
* @param superlayer superlayer
414416
* @return returns time (ns) when given inputs of distance x (cm), local angle alpha (degrees) and magnitude of bfield (Tesla).
415417
*/
416-
public static synchronized double calc_Time(double x, double alpha, double bfield, int sector, int superlayer) {
418+
public static double calc_Time(double x, double alpha, double bfield, int sector, int superlayer) {
417419
int s = sector - 1;
418420
int r = superlayer - 1;
419421
double dmax = 2.*Constants.getInstance().wpdist[r];
@@ -430,7 +432,7 @@ public static synchronized double calc_Time(double x, double alpha, double bfiel
430432

431433
}
432434

433-
public static synchronized double getDeltaTimeBeta(double x, double beta, double distbeta, double v_0) {
435+
public static double getDeltaTimeBeta(double x, double beta, double distbeta, double v_0) {
434436

435437
double value = (0.5*Math.pow(beta*beta*distbeta,3)*x/(Math.pow(beta*beta*distbeta,3)+x*x*x))/v_0;
436438

0 commit comments

Comments
 (0)