Skip to content
This repository has been archived by the owner on May 18, 2023. It is now read-only.

Commit

Permalink
Added Status table reading from ccdb
Browse files Browse the repository at this point in the history
  • Loading branch information
zieglerv committed Jun 8, 2018
1 parent d0feba2 commit b253ef8
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ public void set_TBHits(List<FittedHit> _TBHits) {
* @param event DataEvent
*/
public void fetch_DCHits(DataEvent event, Clas12NoiseAnalysis noiseAnalysis, NoiseReductionParameters parameters,
Clas12NoiseResult results, double[][][][] T0, double[][][][] T0ERR, IndexedTable tab, IndexedTable tab2, DCGeant4Factory DcDetector,
Clas12NoiseResult results, double[][][][] T0, double[][][][] T0ERR, IndexedTable tab, IndexedTable tab2,
IndexedTable tab3, DCGeant4Factory DcDetector,
double triggerPhase) {

if (event.hasBank("DC::tdc") == false) {
Expand Down Expand Up @@ -154,7 +155,7 @@ public void fetch_DCHits(DataEvent event, Clas12NoiseAnalysis noiseAnalysis, Noi
noiseAnalysis.findNoise(sector, superlayerNum, layerNum, wire, results);

for (int i = 0; i < size; i++) {
if (wire[i] != -1 && results.noise[i] == false && useMChit[i] != -1 && !(superlayerNum[i] == 0)) {
if (tab3.getIntValue("status", sector[i], layer[i] ,wire[i])==0 && wire[i] != -1 && results.noise[i] == false && useMChit[i] != -1 && !(superlayerNum[i] == 0)) {

double tStart = 0;
double timeCutMin = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ public boolean init() {
// "/calibration/dc/time_corrections/T0_correction",
"/calibration/dc/time_corrections/timingcuts",
"/calibration/dc/time_jitter",
"/calibration/dc/status_tables/MK_V1",
};

requireConstants(Arrays.asList(dcTables));
Expand Down Expand Up @@ -222,7 +223,9 @@ public boolean processDataEvent(DataEvent event) {
HitReader hitRead = new HitReader();
hitRead.fetch_DCHits(event, noiseAnalysis, parameters, results, Constants.getT0(), Constants.getT0Err(),
this.getConstantsManager().getConstants(newRun, "/calibration/dc/time_to_distance/time2dist"),
this.getConstantsManager().getConstants(newRun,"/calibration/dc/time_corrections/timingcuts"), dcDetector, triggerPhase);
this.getConstantsManager().getConstants(newRun,"/calibration/dc/time_corrections/timingcuts"),
this.getConstantsManager().getConstants(newRun,"/calibration/dc/status_tables/MK_V1"),
dcDetector, triggerPhase);

List<Hit> hits = new ArrayList<Hit>();
//I) get the hits
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ public boolean init() {
// "/calibration/dc/time_corrections/T0_correction",
"/calibration/dc/time_corrections/timingcuts",
"/calibration/dc/time_jitter",
"/calibration/dc/status_tables/MK_V1",
};

requireConstants(Arrays.asList(dcTables));
Expand Down Expand Up @@ -218,8 +219,10 @@ public boolean processDataEvent(DataEvent event) {
HitReader hitRead = new HitReader();
hitRead.fetch_DCHits(event, noiseAnalysis, parameters, results, Constants.getT0(), Constants.getT0Err(),
this.getConstantsManager().getConstants(newRun, "/calibration/dc/time_to_distance/time2dist"),
this.getConstantsManager().getConstants(newRun,"/calibration/dc/time_corrections/timingcuts"), dcDetector, triggerPhase);

this.getConstantsManager().getConstants(newRun,"/calibration/dc/time_corrections/timingcuts"),
this.getConstantsManager().getConstants(newRun,"/calibration/dc/status_tables/MK_V1"),
dcDetector, triggerPhase);

List<Hit> hits = new ArrayList<Hit>();
//I) get the hits
hits = hitRead.get_DCHits();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ public boolean init() {
// "/calibration/dc/time_corrections/T0_correction",
"/calibration/dc/time_corrections/timingcuts",
"/calibration/dc/time_jitter",
"/calibration/dc/status_tables/MK_V1",
};

requireConstants(Arrays.asList(dcTables));
Expand Down Expand Up @@ -219,8 +220,10 @@ public boolean processDataEvent(DataEvent event) {
HitReader hitRead = new HitReader();
hitRead.fetch_DCHits(event, noiseAnalysis, parameters, results, Constants.getT0(), Constants.getT0Err(),
this.getConstantsManager().getConstants(newRun, "/calibration/dc/time_to_distance/time2dist"),
this.getConstantsManager().getConstants(newRun,"/calibration/dc/time_corrections/timingcuts"), dcDetector, triggerPhase);

this.getConstantsManager().getConstants(newRun,"/calibration/dc/time_corrections/timingcuts"),
this.getConstantsManager().getConstants(newRun,"/calibration/dc/status_tables/MK_V1"),
dcDetector, triggerPhase);

List<Hit> hits = new ArrayList<Hit>();
//I) get the hits
hits = hitRead.get_DCHits();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ public boolean init() {
// "/calibration/dc/time_corrections/T0_correction",
"/calibration/dc/time_corrections/timingcuts",
"/calibration/dc/time_jitter",
};
"/calibration/dc/status_tables/MK_V1",
};

requireConstants(Arrays.asList(dcTables));
// Get the constants for the correct variation
Expand Down Expand Up @@ -226,10 +227,12 @@ public boolean processDataEvent(DataEvent event) {

HitReader hitRead = new HitReader();
//hitRead.fetch_DCHits(event, noiseAnalysis, parameters, results, T0, T0ERR, this.getConstantsManager().getConstants(newRun, "/calibration/dc/time_to_distance/t2d"), dcDetector);
hitRead.fetch_DCHits(event, noiseAnalysis, parameters, results, T0, T0ERR,
this.getConstantsManager().getConstants(newRun, "/calibration/dc/time_to_distance/time2dist"),
this.getConstantsManager().getConstants(newRun,"/calibration/dc/time_corrections/timingcuts"), dcDetector, 0.0);

hitRead.fetch_DCHits(event, noiseAnalysis, parameters, results, Constants.getT0(), Constants.getT0Err(),
this.getConstantsManager().getConstants(newRun, "/calibration/dc/time_to_distance/time2dist"),
this.getConstantsManager().getConstants(newRun,"/calibration/dc/time_corrections/timingcuts"),
this.getConstantsManager().getConstants(newRun,"/calibration/dc/status_tables/MK_V1"),
dcDetector, 0);

List<Hit> hits = new ArrayList<Hit>();
List<Hit> sighits = new ArrayList<Hit>();
//I) get the hits
Expand Down

0 comments on commit b253ef8

Please sign in to comment.