Skip to content

Commit 4f1ab56

Browse files
authored
feat: update ATOF z histogram fitting range (#463)
1 parent f1a56e1 commit 4f1ab56

6 files changed

Lines changed: 17 additions & 17 deletions

File tree

src/main/java/org/jlab/clas/timeline/analysis/alert/alert_atof_z.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class alert_atof_z {
3131
def name = 'atof_z_combined'
3232
def gr = new GraphErrors(name)
3333
gr.setTitle("ATOF z RMS")
34-
gr.setTitleY("ATOF z RMS (cm)")
34+
gr.setTitleY("ATOF z RMS (mm)")
3535
gr.setTitleX("run number")
3636
data.sort { it.key }.each { run, it ->
3737
out.mkdir('/' + it.run)

src/main/java/org/jlab/clas/timeline/analysis/alert/alert_atof_z_c4.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class alert_atof_z_c4 {
3636
def name = 'atof_z_c4_combined'
3737
def gr = new GraphErrors(name)
3838
gr.setTitle(String.format("ATOF z c4 %s", variable.replace('_', ' ')))
39-
gr.setTitleY(String.format("ATOF z c4 %s (cm)", variable.replace('_', ' ')))
39+
gr.setTitleY(String.format("ATOF z c4 %s (mm)", variable.replace('_', ' ')))
4040
gr.setTitleX("run number")
4141
data.sort { it.key }.each { run, it ->
4242
out.mkdir('/' + it.run)

src/main/java/org/jlab/clas/timeline/analysis/alert/alert_atof_z_c4_sl.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class alert_atof_z_c4_sl {
4848
def name = String.format('atof_z_c4_sl_s%02d_l%d', sector, layer)
4949
def gr = new GraphErrors(name)
5050
gr.setTitle(String.format("ATOF z c4 %s Sector %02d Layer %d", variable.replace('_', ' '), sector, layer))
51-
gr.setTitleY(String.format("ATOF z c4 %s (cm)", variable.replace('_', ' ')))
51+
gr.setTitleY(String.format("ATOF z c4 %s (mm)", variable.replace('_', ' ')))
5252
gr.setTitleX("run number")
5353
data.sort { it.key }.each { run, it ->
5454
out.mkdir('/' + it.run)

src/main/java/org/jlab/clas/timeline/analysis/alert/alert_atof_z_sl.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class alert_atof_z_sl {
4343
def name = String.format('atof_z_sl_s%02d_l%d', sector, layer)
4444
def gr = new GraphErrors(name)
4545
gr.setTitle(String.format("ATOF z RMS Sector %02d Layer %d", sector, layer))
46-
gr.setTitleY("ATOF z RMS (cm)")
46+
gr.setTitleY("ATOF z RMS (mm)")
4747
gr.setTitleX("run number")
4848
data.sort { it.key }.each { run, it ->
4949
out.mkdir('/' + it.run)

src/main/java/org/jlab/clas/timeline/fitter/ALERTFitter.groovy

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,10 @@ class ALERTFitter{
185185
static F1D atof_z_fitter(H1F h1){
186186
double maxz = h1.getBinContent(h1.getMaximumBin())
187187
double peak = h1.getAxis().getBinCenter(h1.getMaximumBin())
188-
int bin_low = h1.getAxis().getBin(peak - 10.0)
189-
int bin_high = h1.getAxis().getBin(peak + 10.0)
188+
int bin_low = h1.getAxis().getBin(peak - 100.0)
189+
int bin_high = h1.getAxis().getBin(peak + 100.0)
190190
double sigma = ALERTFitter.getRestrictedRMS(h1, bin_low, bin_high)
191-
if (sigma <= 0 || Double.isNaN(sigma)) sigma = 5.0
191+
if (sigma <= 0 || Double.isNaN(sigma)) sigma = 100.0
192192

193193
def f1 = new F1D("fit:" + h1.getName(), "[amp]*gaus(x,[mean],[sigma])", peak - 2*sigma, peak + 2*sigma)
194194
f1.setLineColor(33)
@@ -198,8 +198,8 @@ class ALERTFitter{
198198
f1.setParameter(1, peak)
199199
f1.setParameter(2, sigma)
200200
if (maxz > 0) f1.setParLimits(0, maxz * 0.5, maxz * 1.5)
201-
f1.setParLimits(1, peak - 5.0, peak + 5.0)
202-
f1.setParLimits(2, 0.01, 10.0)
201+
f1.setParLimits(1, peak - 50.0, peak + 50.0)
202+
f1.setParLimits(2, 0.01, 100.0)
203203

204204
PrintStream original = System.out
205205
System.setOut(new PrintStream(OutputStream.nullOutputStream()))

src/main/java/org/jlab/clas/timeline/histograms/ALERT.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,24 +70,24 @@ public ALERT(int reqrunNum, String reqOutputDir, float reqEb, boolean reqTimeBas
7070
ATOF_Time[component].setTitleY("Counts");
7171
ATOF_Time[component].setFillColor(4);
7272
}
73-
ATOF_z[0]= new H1F(String.format("ATOF_z_combined"), String.format("ATOF z"), 250,-30,20);
74-
ATOF_z[0].setTitleX("ATOF z (ns)");
73+
ATOF_z[0]= new H1F(String.format("ATOF_z_combined"), String.format("ATOF z"), 300,-300,300);
74+
ATOF_z[0].setTitleX("ATOF z (mm)");
7575
ATOF_z[0].setTitleY("Counts");
7676
ATOF_z[0].setFillColor(4);
77-
ATOF_z_c4[0]= new H1F(String.format("ATOF_z_combined_c4"), String.format("ATOF z with c4"), 250,-30,20);
78-
ATOF_z_c4[0].setTitleX("ATOF z (ns)");
77+
ATOF_z_c4[0]= new H1F(String.format("ATOF_z_combined_c4"), String.format("ATOF z with c4"), 300,-300,300);
78+
ATOF_z_c4[0].setTitleX("ATOF z (mm)");
7979
ATOF_z_c4[0].setTitleY("Counts");
8080
ATOF_z_c4[0].setFillColor(4);
8181
for(int sector=0;sector<15;sector++){
8282
for(int layer=0;layer<4;layer++){
8383
int gsector=sector*4+layer;
84-
ATOF_z_sl[gsector] = new H1F(String.format("ATOF_z_sector%02d_layer%02d", sector,layer), String.format("ATOF z sector%02d layer %2d", sector,layer), 250,-30,20);
85-
ATOF_z_sl[gsector].setTitleX("ATOF z (ns)");
84+
ATOF_z_sl[gsector] = new H1F(String.format("ATOF_z_sector%02d_layer%02d", sector,layer), String.format("ATOF z sector%02d layer %2d", sector,layer), 300,-300,300);
85+
ATOF_z_sl[gsector].setTitleX("ATOF z (mm)");
8686
ATOF_z_sl[gsector].setTitleY("Counts");
8787
ATOF_z_sl[gsector].setFillColor(4);
8888

89-
ATOF_z_c4_sl[gsector] = new H1F(String.format("ATOF_z_c4_sector%02d_layer%02d", sector,layer), String.format("ATOF z with C4 sector%02d layer %2d", sector,layer), 250,-30,20);
90-
ATOF_z_c4_sl[gsector].setTitleX("ATOF z (ns)");
89+
ATOF_z_c4_sl[gsector] = new H1F(String.format("ATOF_z_c4_sector%02d_layer%02d", sector,layer), String.format("ATOF z with C4 sector%02d layer %2d", sector,layer), 300,-300,300);
90+
ATOF_z_c4_sl[gsector].setTitleX("ATOF z (mm)");
9191
ATOF_z_c4_sl[gsector].setTitleY("Counts");
9292
ATOF_z_c4_sl[gsector].setFillColor(4);
9393

0 commit comments

Comments
 (0)