Difference between revisions of "BCAL TDC Timing"

From GlueXWiki
Jump to: navigation, search
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
=BCAL TDC Timing Comissioning=
 
  
 
Described below are a set of tools for beginning to look at the TDC timing in the BCAL. It is assumed the user has checked out and successfully built a version of sim-recon on the JLab farm. As of this writing, the tool is mainly set for looking at time-walk corrections of the individual BCAL channels, but can be extended to perform the remaining calibrations.
 
Described below are a set of tools for beginning to look at the TDC timing in the BCAL. It is assumed the user has checked out and successfully built a version of sim-recon on the JLab farm. As of this writing, the tool is mainly set for looking at time-walk corrections of the individual BCAL channels, but can be extended to perform the remaining calibrations.
  
== Getting the Branch ==
+
== Running the code ==
  
 
We will assume that HALLD_HOME points to the sim-recon folder checked out from GitHub. The first thing to do is to get the latest version of the GitHub repository and switch to the BCAL_TDC branch
 
We will assume that HALLD_HOME points to the sim-recon folder checked out from GitHub. The first thing to do is to get the latest version of the GitHub repository and switch to the BCAL_TDC branch
Line 23: Line 22:
  
 
<syntaxhighlight>
 
<syntaxhighlight>
cd  $HALLD_HOME/src/plugins/Calibrations/
+
cd  $HALLD_HOME/src/plugins/Calibrations/BCAL_TDC_Timing/
 
scons install
 
scons install
 
</syntaxhighlight>
 
</syntaxhighlight>
Line 36: Line 35:
  
 
<syntaxhighlight>
 
<syntaxhighlight>
root -l -b -q $HALLD_HOME/src/plugins/Calibrations/BCAL_TDC_Timing/FitScripts/
+
root -l -b -q $HALLD_HOME/src/plugins/Calibrations/BCAL_TDC_Timing/FitScripts/ExtractTimeWalk.C
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
This will produce another ROOT file that contains the results of the fits. The results are also output in a format that is suitable for insertion into the CCDB database. Browse through the output root files and see if the results seem reasonable.
 
This will produce another ROOT file that contains the results of the fits. The results are also output in a format that is suitable for insertion into the CCDB database. Browse through the output root files and see if the results seem reasonable.

Latest revision as of 14:21, 4 August 2015

Described below are a set of tools for beginning to look at the TDC timing in the BCAL. It is assumed the user has checked out and successfully built a version of sim-recon on the JLab farm. As of this writing, the tool is mainly set for looking at time-walk corrections of the individual BCAL channels, but can be extended to perform the remaining calibrations.

Running the code

We will assume that HALLD_HOME points to the sim-recon folder checked out from GitHub. The first thing to do is to get the latest version of the GitHub repository and switch to the BCAL_TDC branch

cd $HALLD_HOME
git pull
git checkout BCAL_TDC

This will grab the altered DBCALUnifiedHit factory and the BCAL_TDC_Timing plugin, located in the $HALLD_HOME/src/plugins/Calibrations/ directory. Since we have altered the libraries we need to rebuild from the src directory.

cd $HALLD_HOME/src/
scons install -j4

This will rebuild (mostly re-link) using 4 cores. Now navigate to the plugin directory and build the plugin.

cd  $HALLD_HOME/src/plugins/Calibrations/BCAL_TDC_Timing/
scons install

Now you are ready to run the plugin.

hd_root -PPLUGINS=BCAL_TDC_Timing -PNTHREADS=4 <some data file>

the output hd_root.root file can now be processed using the ROOT script found in $HALLD_HOME/src/plugins/Calibrations/BCAL_TDC_Timing/FitScripts/. Run the ExtractTimeWalk.C script in the same directory as the hd_root.root file.

root -l -b -q $HALLD_HOME/src/plugins/Calibrations/BCAL_TDC_Timing/FitScripts/ExtractTimeWalk.C

This will produce another ROOT file that contains the results of the fits. The results are also output in a format that is suitable for insertion into the CCDB database. Browse through the output root files and see if the results seem reasonable.