A repository for calculating the target polarizations for the CLAS12 experiment RGC using the inclusive e(NH3/ND3/etc.) -> e' + X channel.
The polarizations are calculated in two stages.
First, each run from the sidisdvcs trains of the desired cooking version (8c.4.0 at the time of this README) is passed through ./ProcessInclusive.C.
This program creates a basic event-by-event TTree containing event kinematics
Second, the interactive Jupyter Notebook ./tools/tpol_tools_v3.ipynb is used to create target polarization plots. The notebook is fed a run range and target type
to produce Pt plots for. The plots are generated by reading the counts per ./tools/
To run the program, cd ./tools/ and open the runInclusive.sh file. Check the "EDIT HERE" section to make sure the location of the repository, log files, and TTrees is adequate.
Then, execute the shell script
bash runInclusive.sh [version] [flag(optional)]
As an example, at the time of this README, I would write
bash runInclusive.sh pass1 -o
The script will then look at every sidisdvcs train in the specified version. For each train file (ex : sidisdvcs_017245.hipo) the run number is extracted and fed
to the ./tools/readRCDB.py script. There, the run number is used to read off the target type, HWP status, NMR polarization, and beam energy. These pieces of information are passed to
ProcessInclusive.C to analyze the given train and produce the TTree. This program is currently compatible with slurm, meaning each train's analysis will be running in parallel
on the farm. As an aside, there are two optional flags for the shell script. "-o" overwrites the /volatile/ directory storing the TTrees, and "-a" appends any new runs not yet stored in the
/volatile/ directory. This is useful for minimizing the amount of jobs to be sent.