Skip to content

Commit dfff2f5

Browse files
committed
refactor: HTCC
1 parent e8729ec commit dfff2f5

3 files changed

Lines changed: 17 additions & 15 deletions

File tree

qa-detectors/cuts/cuts.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
ltcc ltcc_elec_nphe_sec 11 14 counts sec3
22
ltcc ltcc_elec_nphe_sec 11 14 counts sec5
33

4-
htcc htcc_nphe_sec_npheMean 12.5 NB counts
5-
htcc htcc_nphe_sec_normFactor 0.9 1.1 unitless
6-
htcc htcc_vtimediff_sector_mean -1 1 ns
7-
htcc htcc_vtimediff_sector_sigma NB 1 ns
8-
94
ftof ftof_edep_p1a_midangles 8.75 10.75 MeV
105
ftof ftof_edep_p1b_midangles 10.5 12.5 MeV
116
ftof ftof_edep_p2 8.75 10.75 MeV

src/main/java/org/jlab/clas/timeline/analysis/htcc/htcc_nphe_sector.groovy

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package org.jlab.clas.timeline.analysis
22
import java.util.concurrent.ConcurrentHashMap
33
import org.jlab.groot.data.TDirectory
44
import org.jlab.groot.data.GraphErrors
5+
import org.jlab.clas.timeline.util.QA
56

67
class htcc_nphe_sector {
78
def data = new ConcurrentHashMap()
@@ -31,7 +32,7 @@ class htcc_nphe_sector {
3132
TDirectory out = new TDirectory()
3233
out.mkdir('/timelines')
3334

34-
data.each { sec, runs ->
35+
def graphList = data.collect { sec, runs ->
3536
GraphErrors graph
3637

3738
if (plotType == 'npheMean') {
@@ -57,11 +58,15 @@ class htcc_nphe_sector {
5758
graph.addPoint(it.run, it.correctionFactor, 0, 0)
5859
}
5960
}
60-
61-
out.cd('/timelines')
62-
out.addDataSet(graph)
61+
graph
6362
}
64-
out.writeFile("htcc_nphe_sec_${plotType}.hipo")
63+
64+
out.cd('/timelines')
65+
if(plotType == 'npheMean')
66+
QA.cutGraphs(*graphList, lb: 12.5, out: out)
67+
else if(plotType == 'normFactor')
68+
QA.cutGraphs(*graphList, lb: 0.9, ub: 1.1, out: out)
69+
out.writeFile("htcc_nphe_sec_${plotType}_QA.hipo")
6570
}
6671
}
6772

src/main/java/org/jlab/clas/timeline/analysis/htcc/htcc_vtimediff_sector.groovy

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import java.util.concurrent.ConcurrentHashMap
44
import org.jlab.groot.data.TDirectory
55
import org.jlab.groot.data.GraphErrors
66
import org.jlab.clas.timeline.fitter.HTCCFitter
7+
import org.jlab.clas.timeline.util.QA
78

89
class htcc_vtimediff_sector {
910

@@ -32,7 +33,7 @@ class htcc_vtimediff_sector {
3233
TDirectory out = new TDirectory()
3334
out.mkdir('/timelines')
3435

35-
data.sort{it.key}.each{ttl, runs->
36+
def grtlList = data.sort{it.key}.collect{ttl, runs->
3637

3738
def grtl = new GraphErrors(ttl)
3839
grtl.setTitle("HTCC vtime - STT, electrons")
@@ -47,11 +48,12 @@ class htcc_vtimediff_sector {
4748

4849
grtl.addPoint(it.run, it[name], 0, 0)
4950
}
50-
51-
out.cd('/timelines')
52-
out.addDataSet(grtl)
51+
grtl
5352
}
54-
out.writeFile("htcc_vtimediff_sector_${name}.hipo")
53+
54+
out.cd('/timelines')
55+
QA.cutGraphsMeanSigma(name, *grtlList, mean_lb: -1, mean_ub: 1, sigma_ub: 1, out: out)
56+
out.writeFile("htcc_vtimediff_sector_${name}_QA.hipo")
5557
}
5658
}
5759

0 commit comments

Comments
 (0)