A Introduction to JLab Hall A BigBite Analyzer

Back to Home Page

Design Concept

Since the standard Hall A analyzer (analyzer for short) concerns mostly on the HRS, Bigbite detector still do not have a standard analyzer. Therefore, this project is aimed to build a gneral software library to do data replay for both electron and hardron package of Bigbite. Based on Root and Hall A analyzer, this software package consists a collection of Bigbite detector specified classes, which read out info from raw data, interpreting its physical meaning and save the result back to a root output file. The following are basic features of this package:

Structure

Class Organization

1. BigBite Spectrometer

THaBigBite is the base class for BigBite Spectrometer. It's a standard Hall A spectrometer with support of

One is free to build a derived class of THaBigBite to fit a specific configuration of Bigbite by mounting detectors in the constructor function. An example is THaBigBiteTpMwdc specially designed for hardron package.

2. Detectors

There are currently 3 groups of detectors for your choice:

2.1 Trigger Plane

class THaTriggerPlane is designed to interpret data from BigBite trigger plane. It consists of two subdetctor, E and dE plane, each of which is a instance of class THaScintPlane. In addition, THaScintPlane is specially designed to read out data from F1TDC.

2.2 MWDC

There are two sets of classes describing Multi Wire Drift Chamber of BigBite: class TreeSearch::MWDC (developed by Ole Hansen, etc.) and class THaMWDC (copied from AGen Lib).

TreeSearch::MWDC is equipped with newest tracking code, which is suggested.

In case THaMWDC is used, it's important to set #define USE_AGEN_MWDC 1 in THaBigBite.h.

2.3 Total Shower

Total Shower detector is described by THaBBTotalShower. It's copied from AGen Lib.

THaBBTotalShower Consists of two child detector: shower and a preshower, both of which are described by class THaBBShower. In addition, there are two auxiliary classes THaBBShowerBlock and THaBBShowerCluster ,which store and describe a shower event.

Notice:  Scintillator planes working with shower detector uses class THaScintillator in standard analyzer. They could be actived in scripts by include following lines in your replay scripts:

BB->AddDetector( new THaScintillator( "s", "scintillator" ) );
BB->AddDetector( new THaScintillator("sum","BigBite Total Sum") );
BB->AddDetector( new THaScintillator("psum","BigBite PS Sum") ); 

3. Optics

Optics concerns reconstructing target variables given track information at a detector side of a spectrometer. Basic ideas of optics follows convention of Hall A Tech Notes JLAB-TN-02-012.

In this library, optics code is separated into following modules, which could be mounted into a spectrometer.

THaOpticsAGen
THaOpticsAnalytical
THaOpticsNoFeild
THaOpticsHRS

class THaOptics is the base class for any optics module. It defined a series interface which talks to the spectrometer. Besides, a collection of service function/class is also supplied by this class. Detail instructions could be found here.

In addition, to make the whole code working, core algorithm, THaOptics:ApplyOptics, have to be implimented in its derived class. Currently there are three different algorithm for your choice:

Looking for more information?

Please go to code documentation.

Debug

It's suggested to include DebugDef.h in the head file of a class. By following steps in Debug predefinitions, a series of debug macros will be available.

The idea is that one can change a varibale called DEBUG_LEVEL to manage which macros would actually be actived. Gnerally, when DEBUG_LEVEL is lower, fewer debug feature will be enabled, and the code will be running at maximum speed; when DEBUG_LEVEL is higher, more detailed running information will be showed on screen. It's possible to control DEBUG_LEVEL of each class or change all at once by DEBUG_LEVEL_OVERRIDE.

These macros includes:

It's recommended, after the code is released for normal running, DEBUG_LEVEL is set to 1. In this case, only Warning message will be output onto screen. 

Usage

loading the lib

Before using the library in Hall A analyzer, libBigBite.so should be loaded. It's OK to use either for the following methods.

1.enter as command in analyzer

enter the following command in analyzer:

.L libBigBite.so
.include <full path of bigbitlib>

2.rootlogon.C

Please copy $BIGBITELIB/replay/rootlogon.C into your working directory, and run analyzer. This script will auto run every time start analyzer, load the lib and setup "include directories".

In the script

1. THaBigBite

Just like other spectrometer in analyzer, THaBigBite could be loaded by the following code:

THaBigBite* pB=new THaBigBite("BB","BigBite"); 
gHaApps->Add(pB);

2. Detectors

Then, various detector could be added into THaBigBite by code such as:

THaTriggerPlane* pTp=new THaTriggerPlane("tp","Trigger Plane",pB);
pB->AddDetector(pTp);

For more options in detector, please see section structure.

3. Optics

If one also want to calculate a track back to target, a optics class shall be mounted too:

pB->MountOptics(new THaOpticsAnalytical("optics","BigBite Optics Child Class",this)); 

For more options in optics, please see THaOptics.

4. Example

As a summary, a collection of Analyzer logon script, replay script and its definition header could be found in $BIGBITELIB/replay/. Or you can also refer to a complete noncompiled replay folder at Replay_NonCompiled.tar.gz (specified for adaqlx.jlab.org online replay).

Database

There is a collection of example database could be found in the folder of bigbitelib/DB/20070711/.

Database Description Document is usually in folder /DB/, if not in the form of comments inside data files.

Reminder: if you are testing Gen data with this package, remember to setup a DB dir with older date.



Author: Jin Huang         May 2008
MIT
JLAB