Hall-C Analyzer & Hall-C Replay Jefferson Lab
Hall-C Analyzer Overview Hall-C ROOT Analysis framework (HCANA) is written in C++ and is an extension of the Hall A analyzer podd Based on previous Fortran Analyzer ENGINE infrastructure Hall C ROOT Analyzer Wiki Maintained on GitHub Users fork off of develop branch Contributions are made in local/remote personal repository of HCANA Changes are pushed back onto the development branch which (may) get merged into the development branch Detailed "How-To" wiki: instructions how to Git started with HCANA and GitHub 2
Steps to Install HCANA 1. Download and install ROOT (> 5.32) 2. Setup ROOT environment source /path/to/rootbuild/bin/thisroot.(c)sh 3. Fork hcana repository (if you have not already done so) 4. Clone personal remote repository on local machine git clone https://github.com/username/hcana 5. cd into hcana directory and setup the environment source setup.(c)sh 6. Obtain the podd submodule which hcana points too git submodule init git submodule update 7. Create new branch and switch to it git checkout -b branch-name 8. Build HCANA scons -j4 "How-To" wiki ROOT Analyzer/Compiling Wiki ROOT Analyzer/Running Wiki 3
Hall-C Analyzer Overview Doxygen page documents HCANA source code 4
Work Flow of HCANA HCANA utilizes the Hall-A podd decoder to unpack raw EVIO data into THaEvData objects Each readout module (F250, 1190, ) has its own decoder class podd/hana_decode THcHitList utilizes the detector maps to associate the ROC, slot, & channel number with a specific detector THcHitList::DecodeToHitList(&THaEvData) THcDetectorMap builds an array (ftable) with one structure element per readout channel THcDetectorMap::Load(const char *fname) Each element holds the roc, slot, channel number and module type for a given channel In addition, the element holds the id number of the detector, the plane, the counter (or wire number), and the signal number (ADC/TDC, +/-) Raw EVIO Data THaEvData THcHitList Data 5
Work Flow of HCANA At initialization each detector class has its detector map populated with the list of readout channels belonging it ghcdetectormap->fillmap(fdetmap, idstring) In addition, a hit list is created to hold the raw hits for each respective detector THcHitList::InitHitList(fDetMap, rawhitclassname, maxhits) Detector classes then decode the THcHitList data into raw hit data associated with a specific detector s readout channel THcDetector::Decode(&THaEvData) Raw hit information is stored as TClonesArray objects which are accessible via THcAnalyzer adcpulseampraw, adcpulseamp, THaEvData THcHitList Raw Hit Data Raw Hit Data 6
Work Flow of HCANA Raw hit data is further processed into higher level hit data objects via fiducial ADC & TDC cuts THcDetector::CoarseProcess(&TClonesArray) goodadcped, goodadcpulseint, Hit data can then be further processed into higher level physics data THcDetector::FineProcess(&TClonesArray) Fiducial tracking cuts e.g. χ 2 /ndf, β, E/p Track matching, efficiencies, Raw, hit, & physics data is then processed by THcAnalyzer which makes the data available via ROOT histograms and TTrees Raw Hit Data Hit Data Physics Data 7
Hall-C Replay Framework designed to facilitate the reconstruction of events in the Hall-C spectrometers The Hall-C Replay Strucutre Wiki provides general information regarding the infrastructure The Hall-C replay code is maintained in the JeffersonLab/hallc_replay GitHub repository Interfaces with THcAnalyzer to process and obtain the data Raw, hit, & tracking data Physics data 8
Hall-C Replay Framework: DBASE Configuration Files RUN PARAM DBASE STD KINEM 9
Hall-C Replay Framework: PARAM Configuration Files RUN PARAM DBASE STD KINEM HMS SHMS PARAM GEN TRIG 10
Hall-C Replay Framework: MAPS Configuration Files RUN PARAM STD DBASE KINEM HMS SHMS GEN TRIG PARAM HMS SHMS CRATE MAPS 11
Hall-C Replay: DEF-files Configuration Files RUN PARAM STD KINEM HMS SHMS GEN TRIG DBASE PARAM HMS SHMS DETEC TRIG HMS SHMS CRATE DEF FILES MAPS THaOutput Analysis Output (DEF-files) Interfaces with THcAnalyzer to output user defined histograms and ROOT TTrees Variables are created in detector classes in the DefineVariables() method and can be written to the TTree output and histogrammed via DEF-files P.hodo.goodAdcPulseAmp Block variables write multiple variables to the TTree with a single call block P.gtr.* Histograms can be defined for specific variables with and without cuts (1, 2, & 3D supported) TH1F h1name 'Title; X-Title; Y-Title' var nbins xlow xhigh TH1F h1name 'Title; X-Title; Y-Title' var nbins xlow xhigh cut1&&cut2 cut3 DEF-files defining cuts create global cut objects for histograms and interactive analysis time_cut1 P.dc.1u1.time>0&&P.dc.1u1.time<250 12
Hall-C Replay Framework: Analysis Files Configuration Files Analysis Files RUN PARAM STD DBASE HMS SHMS DETEC DEF FILES HODO DC+CAL HMS KINEM HMS SHMS GEN TRIG PARAM TRIG HMS SHMS CRATE MAPS REPLAY SCRIPTS SHMS CER+DC STACK 13
Hall-C Replay Scripts: I/O 14
Hall-C Replay Scripts: PARAM 15
Hall-C Replay Scripts: MAPS 16
Hall-C Replay Scripts: Apparatus 17
Hall-C Replay Scripts: Detectors 18
Hall-C Replay Scripts: Golden Track 19
Hall-C Replay Scripts: Event Handler 20
Hall-C Replay Scripts: Crate Maps 21
Hall-C Replay Scripts: DEF-files 22
Hall-C Replay Scripts: Summary Files 23
Hall-C Replay Scripts: Report Files 24
Hall-C Replay: Results Configuration Files RUN PARAM STD KINEM HMS SHMS GEN TRIG DBASE PARAM HMS SHMS DETEC TRIG HMS SHMS CRATE DEF FILES MAPS Analysis Files HODO DC+CAL HMS REPLAY SCRIPTS SHMS CER+DC AERO Results ROOT TREE DEF-FILE HISTOS ONLINE GUI 25
Hall-C Replay: ROOT TTree 26
Hall-C Replay: DEF-Files Histograms 27
Hall-C Replay: Interactive Demonstration Goal: Acquire detector data from SHMS KPP run 484 from the hodoscope, drift chambers, heavy gas Cherenkov, trigger apparatus, and the golden track 1. Produce a TTree with all possible data from the three detector systems, trigger apparatus, and golden track 2. Produce 1D histograms of the for the hodoscope S1X+ raw, pedestal subtracted pulse amplitude, and pulse time variables 3. Produce a 1D histogram of the S1X+ pedestal subtracted pulse amplitude with a cut on the number of reconstructed tracks in the chambers = 1 4. Produce a 2D histogram of the raw TDC time spectrum per wire for the 1X1 plane 5. Produce a vector of histograms, indexed by the respective PMT number, for the HGC good pulse time versus the good pulse amplitude 6. Produce a scalar histogram for the HGC good pulse time versus the good pulse amplitude for all PMTs 7. Produce a 1D histogram of the good pulse integral for HGC PMT 3 8. Produce a 2D histogram of the good pulse integral versus PMT for the HGC with a cut that requires that the good pulse integral is > 0 28
Hall-C Replay: Exercises 1. Add the calorimeter & noble gas Cherenkov detectors to the analyzer script 2. Add the 2 detector block variables to the TTree 3. Produce a 1D histogram of the raw and good NGC multiplicities and occupancies for the 4 PMTs 4. Produce a 1D histogram of beta for the golden track with a cut on the golden track being OK 5. Produce a 2D histogram of the track X focal plane vs. Y focal plane quantities 6. Produce a 2D histogram of the normalized track energy versus δ 29
Backup Slides 30
Hall C Online GUI Contained within the Hall C online replay framework & GitHub repository Macros directory contains ROOT macros which analyze root trees produced by HCANA ROOT files produced via. Hall C replay Config directory contains files which call specific methods contained in ROOT macros to display specific histograms in the online GUI Useful "How-To" PDF discusses the details of the online GUI located in top level directory 31
Hall C Online GUI: Making Plots Great Again! 32
Hall C Online GUI: Making Plots Great Again! 33
Recent Updates to HCANA Implementation of Good ADC & TDC Variables vector <Double_t> Low-level fiducial event selection methods implemented to select best hits in each detector channel Currently present in all detector classes aside from the drift chambers Hodoscopes are only nontracking detectors with TDC s 34
Recent Updates to HCANA Good ADC variables are calculated in the detector class CoarseProcess method FADC error flag cut Removes events in which the FADC250 FPGA fails adcerrorflag is recorded for each detector for each event and is stored in the ROOT tree Pulse time cut Removes events which are not within the defined prompt-peak time window Pedestal Subtracted Pulse Amplitude FADC Raw Pulse Time 35
Recent Updates to HCANA Raw and pedestal subtracted ADC data are still constructed as TClonesArray objects Sparsified scalar data objects Only written to the ROOT tree if the fdebugadc has been set to true (1) Good ADC & TDC data are constructed as unsparsified vector objects 36
Modifications to THaOutput Vector data objects can be histogrammed via. the eye variable in DEF-files The eye variable can now have its index increased by an arbitrary integer amount 2D histogram of scalars produces single scalar histogram 2D histogram of vectors produces vector of histograms Adding prefix s to 2D histogram of vectors produces single scalar histogram TH1F h1 P.hgcer.goodAdcPulseAmp[0] TH1F h2 P.hgcer.goodAdcPulseAmp[1] TH1F h3 P.hgcer.goodAdcPulseAmp[2] TH1F h4 P.hgcer.goodAdcPulseAmp[3] TH2F h1 [I+1] P.hgcer.npe TH2F h2 [I+1] P.hgcer.goodAdcPed TH2F h3 [I+1] P.hgcer.goodAdcPulseInt TH2F h1 P.hgcer.adcX P.hgcer.adcY TH2F h2 P.hgcer.adcX P.hgcer.adcZ TH2F h3 P.hgcer.adcY P.hgcer.adcZ TH2F h1 P.hgcer.goodAdcX P.hgcer.goodAdcY TH2F h2 P.hgcer.goodAdcX P.hgcer.goodAdcZ TH2F h3 P.hgcer.goodAdcY P.hgcer.goodAdcZ sth2f h1 P.hgcer.goodAdcX P.hgcer.goodAdcY sth2f h2 P.hgcer.goodAdcX P.hgcer.goodAdcZ sth2f h3 P.hgcer.goodAdcY P.hgcer.goodAdcZ 37
Updates to Aerogel & Cherenkov Classes Track matching has been implemented in both aerogel and Cherenkov detector y classes FineProcess Tracks are projected from the focal plane to the fiducial area defined by the detector geometry Aerogel Diffusion Box Cherenkov Mirror Planes x z (xh, yh, xh, yh ) 3 4 1 2 (xc, yc, xc, yc ) 38
Updates to Aerogel & Cherenkov Classes If the tracks intersect the fiducial area then the tracks are considered to be matched if the track passes χ 2 /ndf, β, E/p cuts Configurable in PARAM file vector<int_t> numtracksmatched Cherenkov If the track is matched to a mirror AND the respective PMT has an ADC hit then the track is considered to have fired Aerogel If the track is matched to the diffusion box AND the NPE sum is above a defined threshold then the track is considered to have fired vector<int_t> numtracksfired 39
Recent Updates to HCANA Occupancies (raw and good ) vector <Int_t> Multiplicities (raw and good ) scalar 40
41