Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • jlab/hallc/exp/polhe3/hallc_replay
  • wmhenry/hallc_replay
  • Sawatzky/hallc_replay
  • jhchen/hallc_replay
  • markkjones/hallc_replay
  • mingyu/hallc_replay
  • mrnycz/hallc_replay
  • murchhanaroy/hallc_replay
  • melanierehfuss/hallc_replay
9 results
Show changes
Commits on Source (547)
Showing
with 251 additions and 53 deletions
---
Standard: Cpp11
BasedOnStyle: Chromium
AccessModifierOffset: -2
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
AlignEscapedNewlines: true
AlignTrailingComments: true
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
BinPackArguments: true
BinPackParameters: true
BreakConstructorInitializersBeforeComma: true
BreakStringLiterals: true
ColumnLimit: 100
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
Cpp11BracedListStyle: true
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
PointerBindsToType: true
SpaceAfterControlStatementKeyword: true
TabWidth: 8
UseTab: Never
...
# File extensions
*~
*.sw?
ROOTfiles
ROOTfiles/*
ROOTfiles.old/*
bck/*
#*
*#*
hcana
raw
cache
.root_history
HISTOGRAMS/*
REPORT_OUTPUT
REPORT_OUTPUT/*
log/*
full_hms.sh
full_shms.sh
onlineGUI/Config/kpp_*
*#*#*
*.d
*.so
*Auto*
run_*
CALIBRATION/shms_cal_calib/pcal.param*
CALIBRATION/hms_cal_calib/hcal.param*
CALIBRATION/shms_cal_calib/calibrated.deb
CALIBRATION/hms_cal_calib/calibrated.deb
CALIBRATION/hms_cal_calib/hcal_calib_cpp_ACLiC_dict_rdict.pcm
CALIBRATION/shms_cal_calib/pcal_calib_cpp_ACLiC_dict_rdict.pcm
CALIBRATION/*/data_files/*
CALIBRATION/*/root_files/*
CALIBRATION/shms_dc_calib/data_files/
onlineGUI/onlineGUI_v1.2.1/onlineDict_rdict.pcm
*.pcm
*.png
*.ps
*.eps
*.pdf
.nfs*
raw.copiedtotape
*.root
*.swp
*.sw*
# Analysis output
hel_scalers_*.json
# ROOT history file
.root_history
# Directories
RAID
REPORT_OUTPUT
HISTOGRAMS
*.png
*.ps
\ No newline at end of file
MON_OUTPUT
ROOTfiles
raw
raw.copiedtotape
cache
logs
scratch
output
output.*
.root_build_dir
# Symbolic links
hcana
[submodule "UTIL_OL"]
path = UTIL_OL
url = https://github.com/JeffersonLab/UTIL_OL
branch = master
#include <string>
void _rootlogon() {
// ensure we have format loaded. Should be able to move to C++20 fmt library
// some point in the future
R__LOAD_LIBRARY(libfmt);
// check if we requested a special build directory through the environment,
const char* build_dir_from_env = gSystem->Getenv("ROOT_BUILD_TMPDIR");
const std::string build_dir = build_dir_from_env ? build_dir_from_env : "$PWD/.root_build_dir";
// ensure the build directory exists to avoid crashes due to it missing
// note: in principle this allows us to execute arbitrary code, but seeing
// as this can only be manipulated through the shell environment in the
// first place this should not be a safety concern.
const std::string mkdir = "mkdir -p " + build_dir;
gSystem->Exec(mkdir.c_str());
// Communicate what build directory we are using
std::cout << "---> Setting ACLiC build directory to: " << build_dir << "\n\n";
// Make the ROOT build process use a flat build directory by setting
// second arg to kTRUE. This avoids an apparent race condition in ROOT
// associated with child directory creation in the default 'kFALSE' mode.
// The default mode will work correctly on the 2nd execution. OK for
// interactive use, but not great for the Farm environment.
gSystem->SetBuildDir(build_dir.c_str(), kTRUE);
// Ensure we have our environment setup
gROOT->ProcessLine(".include /usr/local/include/hcana");
gROOT->ProcessLine(".include SCRIPTS/include");
gROOT->ProcessLine(".include .");
// Some basic plotting setup
gROOT->SetStyle("Plain");
gStyle->SetPalette(1);
// Load extra ROOT libraries, TODO check if this is still
// needed in the newer ROOT versions we are using.
gSystem->Load("libTree");
gSystem->Load("libTreePlayer");
gSystem->Load("libHist");
}
# Hall C Calibration Codes
1. This is the directory containing subdirectories for Hall C calibration codes.
2. A few of the directories are obsolete.
3. Each subdirectory has a README or HOWTO which explains how to run the calibration code.
## Obsolete directories
1. hms_dc_calib : old HMS DC Tzero and time-to-distance maps calibration code
2. shms_dc_calib : old SHMS DC Tzero and time-to-distance maps calibration code
3. hodo_calib: old hodoscope calibration code used during the 6GeV running
## Directories
1. bcm_current_map : Contains scripts to create parameter files of the beam current as a function of event number to be used in the code for cutting data according to a beam current cut.
2. bpm_calib : Contains scripts for fitting HARP vs BPM scans and creating a parameter file.
3. dc_calib/scripts : Contains scripts for calibrating tzero parameters and time-to-dsitance maps for eithe the HMS or SHMS drift chambers.
4. hms_cal_calib : Contains scripts for calibrating the HMS calorimeter energy/ADC conversion for each block.
5. shms_cal_calib : Contains scripts for calibrating the SHMS calorimeter energy/ADC conversion for each block.
6. hms_hodo_calib : Contains scripts for calibrating the time offsets for the HMS hodoscope. Creates the time walk correction parameters, time difference between negative-postive PMTs in a paddle and the relative time offsets of the paddles.
7. shms_hodo_calib : Contains scripts for calibrating the time offsets for the SHMS hodoscope. Creates the time walk correction parameters, time difference between negative-postive PMTs in a paddle and the relative time offsets of the paddles.
8. shms_aero_calib : Contains a script to calibrate the NPE/ADC conversion parameters from SPE peaks for the SHMS aerogel.
9. shms_hgcer_calib : Contains scripts to calibrate hte NPE/ADC conversion parameters for SHMS Gas Cerenkovs.
10. set_peddefault : Contains script to determine the default pedestals for each SHMS and HMS detector.
......@@ -5,6 +5,9 @@
using namespace std;
const double kBig = 1.e38;
const int NBCM = 5;
ofstream outfile;
//_________________________________
......@@ -37,8 +40,18 @@ int ScalerCalib::Run()
return -1;
}
int pos = filename.find("scalers_");
runstr = (filename.substr(pos+8)).substr(0,4);
int pos;
pos = filename.find("scalers_");
if(pos == -1)
{
pos = filename.find("production_");
runstr = (filename.substr(pos+11)).substr(0,4);
}
else
{
runstr = (filename.substr(pos+8)).substr(0,4);
}
ofilename = "bcmcurrent_" + runstr + ".param";
outfile.open(ofilename.c_str());
......@@ -63,15 +76,15 @@ int ScalerCalib::Run()
PrintContainer(bcm4b);
outfile << "\n" << "\n";
outfile << "scal_read_bcm17_current = ";
PrintContainer(bcm17);
outfile << "scal_read_bcm4c_current = ";
PrintContainer(bcm4c);
}
outfile << "\n" << "\n";
outfile << "scal_read_event = ";
PrintContainer(evnum);
// outfile.close();
outfile.close();
return 0;
......@@ -91,6 +104,7 @@ int ScalerCalib::PrintContainer(ScalerContainer sc)
for(SCIterator i = sc.begin(); i != sc.end()-1; ++i)
{
if(*i<=1E6)outfile<<std::fixed<<std::setprecision(0);
outfile << *i << ", ";
}
......@@ -129,29 +143,31 @@ int ScalerCalib::FillContainer()
return -1;
}
if(! file->GetListOfKeys()->Contains("TSH") )
string tname = "TS" + fName;
if(! file->GetListOfKeys()->Contains(tname.c_str()) )
{
cout << "ERROR: Couldn't find the Scaler Tree" << endl;
return -1;
}
TTree* T = (TTree*)file->Get("TSH");
TTree* T = (TTree*)file->Get(tname.c_str());
double evnumber;
double bcm1_current;
double bcm2_current;
double bcm4a_current;
double bcm4b_current;
double bcm17_current;
double bcm4c_current;
string bname[5];
string sarray[5] = {".BCM1.scalerCurrent",
string bname[NBCM];
string sarray[NBCM] = {".BCM1.scalerCurrent",
".BCM2.scalerCurrent",
".BCM4A.scalerCurrent",
".BCM4B.scalerCurrent",
".BCM17.scalerCurrent"};
".BCM4C.scalerCurrent"};
for(int i=0; i<5; i++)
for(int i=0; i<NBCM; i++)
{
bname[i] = "";
bname[i] += fName;
......@@ -163,21 +179,23 @@ int ScalerCalib::FillContainer()
T->SetBranchAddress(bname[1].c_str(), &bcm2_current);
T->SetBranchAddress(bname[2].c_str(), &bcm4a_current);
T->SetBranchAddress(bname[3].c_str(), &bcm4b_current);
T->SetBranchAddress(bname[4].c_str(), &bcm17_current);
T->SetBranchAddress(bname[4].c_str(), &bcm4c_current);
Long64_t nentries = T->GetEntries();
for(Long64_t ientry=0; ientry<nentries; ientry++)
{
T->GetEntry(ientry);
if(evnumber < 0) continue;
if(evnumber < 0)
evnum.push_back(kBig);
else
evnum.push_back(evnumber);
evnum.push_back(evnumber);
bcm1.push_back(bcm1_current);
bcm2.push_back(bcm2_current);
bcm4a.push_back(bcm4a_current);
bcm4b.push_back(bcm4b_current);
bcm17.push_back(bcm17_current);
bcm4c.push_back(bcm4c_current);
}
......@@ -196,7 +214,7 @@ void ScalerCalib::ClearContainers()
bcm2.clear();
bcm4a.clear();
bcm4b.clear();
bcm17.clear();
bcm4c.clear();
}
......
......@@ -44,7 +44,7 @@ class ScalerCalib {
ScalerContainer bcm2;
ScalerContainer bcm4a;
ScalerContainer bcm4b;
ScalerContainer bcm17;
ScalerContainer bcm4c;
ClassDef(ScalerCalib,0)
......
R__LOAD_LIBRARY(ScalerCalib_C)
void run(string fin="fin.root")
void run(string fin="fin.root", string spec_name="H")
{
//H: HMS, P: SHMS
ScalerCalib scalib("H");
ScalerCalib scalib(spec_name);
scalib.SetInputFile(fin);
scalib.SetPrintFlag(1); //0: bcm1 and bcm2 only, 1: all
scalib.Run();
......
#!/bin/bash
list=$1
while read line
do
fname=/home/cdaq/hallc-online/hallc_replay/ROOTfiles/shms_replay_production_${line}_-1.root
root -b<<EOF
.x run.C("${fname}", "P")
EOF
[ ! -d "shms" ] && `mkdir shms`
mv bcmcurrent* ./shms/
done < ${list}
File added
File added
File added
File added
CALIBRATION/bpm_calib/Documentation/Hall_C_Raster_Algorithm.jpg

422 KiB

1771 0.194 -0.605 -1.548 0.328 345.528 154.612 -0.56 -0.62 0.67 -0.47 1.0 0.0 0.1
1770 0.838 -0.620 0.155 0.2969 345.528 154.612 -0.98 -0.61 -0.35 -0.43 -1.0 0.0 0.1
1769 0.683 -1.079 -0.677 -0.512 345.528 154.612 -0.99 -0.99 0.05 -1.00 0.0 -1.0 0.1
1768 0.956 -1.194 1.033 -1.220 345.528 154.612 -1.00 -0.98 -0.80 -1.32 -2.0 -2.0 0.1
1767 -0.620 -1.153 -2.499 -1.261 345.528 154.612 0.26 -1.0 1.46 -1.42 2.0 2.0 0.1
1766 -0.557 2.319 -2.482 2.077 345.528 154.612 0.15 1.10 1.47 0.97 2.0 2.0 0.1
1765 0.927 1.035 0.992 1.998 345.528 154.612 -1.01 1.17 -0.76 1.05 -2.0 2.0 0.1
1763 0.691 -0.645 -0.630 0.201 345.528 154.612 -1.00 -0.61 0.02 -0.47 0.0 0.0 0.1
1762 0.825 -1.063 0.221 -0.517 345.528 154.612 -1.00 -0.99 -0.40 -0.96 -1.0 -1.0 0.1
1771 0.194 -0.605 -1.548 0.328 345.528 154.612 -0.56 -0.62 0.67 -0.47 1.0 0.0 0.1
1770 0.838 -0.620 0.155 0.2969 345.528 154.612 -0.98 -0.61 -0.35 -0.43 -1.0 0.0 0.1
1769 0.683 -1.079 -0.677 -0.512 345.528 154.612 -0.99 -0.99 0.05 -1.00 0.0 -1.0 0.1
1768 0.956 -1.194 1.033 -1.220 345.528 154.612 -1.00 -0.98 -0.80 -1.32 -2.0 -2.0 0.1
1767 -0.620 -1.153 -2.499 -1.261 345.528 154.612 0.26 -1.0 1.46 -1.42 2.0 2.0 0.1
1766 -0.557 2.319 -2.482 2.077 345.528 154.612 0.15 1.10 1.47 0.97 2.0 2.0 0.1
1765 0.927 1.035 0.992 1.998 345.528 154.612 -1.01 1.17 -0.76 1.05 -2.0 2.0 0.1
1763 0.691 -0.645 -0.630 0.201 345.528 154.612 -1.00 -0.61 0.02 -0.47 0.0 0.0 0.1
1762 0.825 -1.063 0.221 -0.517 345.528 154.612 -1.00 -0.99 -0.40 -0.96 -1.0 -1.0 0.1
1764 0.659 1.08 -0.660 2.034 345.528 154.612 -0.99 1.17 -0.76 1.05 0.0 2.0 0.1
1771 0.194 -0.605 -1.548 0.328 345.528 154.612 -0.56 -0.62 0.67 -0.47 1.0 0.0 0.1
1770 0.838 -0.620 0.155 0.297 345.528 154.612 -0.98 -0.61 -0.35 -0.43 -1.0 0.0 0.1
1769 0.683 -1.079 -0.677 -0.512 345.528 154.612 -0.99 -0.99 0.05 -1.00 0.0 -1.0 0.1
1768 0.956 -1.194 1.033 -1.220 345.528 154.612 -1.00 -0.98 -0.80 -1.32 -2.0 -2.0 0.1
1767 -0.620 -1.153 -2.499 -1.261 345.528 154.612 0.26 -1.00 1.46 -1.42 2.0 2.0 0.1
1765 0.927 1.035 0.992 1.998 345.528 154.612 -1.01 1.17 -0.76 1.05 -2.0 2.0 0.1
1764 0.659 1.080 -0.660 2.034 345.528 154.612 -0.99 1.17 -0.76 1.05 0.0 2.0 0.1
1763 0.691 -0.645 -0.630 0.201 345.528 154.612 -1.00 -0.61 0.02 -0.47 0.0 0.0 0.1
1762 0.825 -1.063 0.221 -0.517 345.528 154.612 -1.00 -0.99 -0.40 -0.96 -1.0 -1.0 0.1
1771 0.194 -0.605 -1.548 0.328 345.528 154.612 -0.56 -0.62 0.67 -0.47 1.0 0.0 0.05
1770 0.838 -0.620 0.155 0.2969 345.528 154.612 -0.98 -0.61 -0.35 -0.43 -1.0 0.0 0.05
1769 0.683 -1.079 -0.677 -0.512 345.528 154.612 -0.99 -0.99 0.05 -1.00 0.0 -1.0 0.05
1768 0.956 -1.194 1.033 -1.220 345.528 154.612 -1.00 -0.98 -0.80 -1.32 -2.0 -2.0 0.05
1767 -0.620 -1.153 -2.499 -1.261 345.528 154.612 0.26 -1.0 1.46 -1.42 2.0 2.0 0.05
1765 0.927 1.035 0.992 1.998 345.528 154.612 -1.01 1.17 -0.76 1.05 -2.0 2.0 0.05
1764 0.659 1.08 -0.660 2.034 345.528 154.612 -0.99 1.17 -0.76 1.05 0.0 2.0 0.05
1763 0.691 -0.645 -0.630 0.201 345.528 154.612 -1.00 -0.61 0.02 -0.47 0.0 0.0 0.05
1762 0.825 -1.063 0.221 -0.517 345.528 154.612 -1.00 -0.99 -0.40 -0.96 -1.0 -1.0 0.05
1771 0.194 -0.605 -1.548 0.328 345.528 154.612 -0.56 -0.62 0.67 -0.47 1.0 0.0 0.1
1770 0.838 -0.620 0.155 0.297 345.528 154.612 -0.98 -0.61 -0.35 -0.43 -1.0 0.0 0.1
1769 0.683 -1.079 -0.677 -0.512 345.528 154.612 -0.99 -0.99 0.05 -1.00 0.0 -1.0 0.1
1768 0.956 -1.194 1.033 -1.220 345.528 154.612 -1.00 -0.98 -0.80 -1.32 -2.0 -2.0 0.1
1767 -0.620 -1.153 -2.499 -1.261 345.528 154.612 0.26 -1.00 1.46 -1.42 2.0 2.0 0.1
1765 0.927 1.035 0.992 1.998 345.528 154.612 -1.01 1.17 -0.76 1.05 -2.0 2.0 0.1
1764 0.659 1.080 -0.660 2.034 345.528 154.612 -0.99 1.17 -0.76 1.05 0.0 2.0 0.1
1763 0.691 -0.645 -0.630 0.201 345.528 154.612 -1.00 -0.61 0.02 -0.47 0.0 0.0 0.1
1762 0.825 -1.063 0.221 -0.517 345.528 154.612 -1.00 -0.99 -0.40 -0.96 -1.0 -1.0 0.1
3129 1.010 -0.420 0.400 -0.160 345.528 154.612 -1.00 -0.99 -0.40 -0.96 -1.0 -1.0 0.1