Wiki » History » Version 13

« Previous - Version 13/14 (diff) - Next » - Current version
Saskia Charity, 06/18/2020 10:04 AM

Instructions to check out and run the Bloch analysis

These instructions are for running the macro Interpolation.c which is Rachel's analysis macro used for Run 1.

Note: there are lots of macros etc here that are either under development or old. I just pushed in everything I had. Most of the macros are not relevant to the analysis. I'm working on tidying this all up but this is how it is for now.

All the code is there so that you can do any field analysis you like using these repositories. gm2fieldutil contains functions for accessing the data in the root trees in a convenient way. Examples of how to do this are in many of the macros. gm2fieldbloch has source code in gm2fieldbloch/src/gm2fieldBloch.C -- this contains many Bloch-specific functions. The other code in there (TrolleyRun.C, FixedProbeRun.C) is under development.

1. source the script attached at the bottom of the page ( from your home area on the <username>@g2field-server. The first time you run it, a working area will be created and the code will be checked out. On subsequent times it just sets up some environment variables but doesn't check things out again.

source 1 # 1 for run 1, 2 for run 2

Note: the current setup puts you on branch 'Run1Analysis'. Other branches are 'SaskiaAnalysis' - I'm developing on this branch so it's likely to change quite often. If you like you can create your own branch based off 'Run1Analysis' and develop your own code on there. I am leaving 'develop' as it is for legacy reasons, since that is the last place Rachel pushed code.

2. you should now have two repositories: gm2fieldutil and gm2fieldbloch.

First check which branch you are on (should be Run1Analysis) and pull to get the latest code:

git branch
git pull origin Run1Analysis

git branch
git pull origin Run1Analysis

Compile them both (only need do this the first time, unless you change any code in the src or include directories of the two repositories):


3. you need to add the following to your ~/.rootlogon.C (only do this once, if you don't have this file yet, you can just create it)

  TString libPATH   = Form("%s",std::getenv("GM2FIELDUTILHOME") );
  TString libNAME   = "";
  TString incl_cmd  = Form(".include %s/lib",libPATH.Data());
  TString incl_cmd2 = Form(".include %s/include",libPATH.Data());
  TString load_cmd  = Form(".L %s/lib/%s",libPATH.Data(),libNAME.Data());

  TString libPATH2   = Form("%s",std::getenv("GM2FIELDBLOCHHOME") );
  TString libNAME2   = "";
  TString incl_cmd3  = Form(".include %s/lib",libPATH2.Data());
  TString incl_cmd4 = Form(".include %s/include",libPATH2.Data());
  TString load_cmd2  = Form(".L %s/lib/%s",libPATH2.Data(),libNAME2.Data());

4. You should now be able to run the macro Interpolation.c. Run it in batch mode (option -b).

root -q -b Interpolation.c++(5054,5103,\"both\",true,true)

There are many choices for running configuration. Some are set at the top of the macro itself, and some that need to be changed often are passed in as arguments to the macro. The first two arguments are the run numbers of the first and last trolley of the trolley pair. These must be passed in as they do not have default values.

The others have defaults but you should think about what options you want to run with and pass the options in.

The third argument is a string and can be any of: both, forward, backward. This specifies which trolley run(s) to tie to.

The fourth option is a boolean and is for the blinding (true = apply blinding, false = do not apply blinding). By default it is TRUE.

The code knows which blinding constants to use for which run (1 and 2 have different constants). The final option is a boolean and is for whether to do azimuthal averaging or not (takes longer). By default it is TRUE. If you set it to false you'll just get the individual stations.