hall-c analyzer & hall-c replay - experimental hall c...hall-c analyzer overview • hall-c root...
TRANSCRIPT
-
Hall-C Analyzer & Hall-C Replay
Joint Hall A/C Data Analysis Workshop
Eric Pooser
Jefferson Lab
06/26/2017
-
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
2Eric Pooser06/26/2017 Joint Hall A/C Data Analysis Workshop
https://hallcweb.jlab.org/wiki/index.php/Analyzerhttps://github.com/JeffersonLab/hcanahttps://hallcweb.jlab.org/wiki/index.php/Analyzer/Git
-
Steps to Install HCANA1. Download and install ROOT (> 5.32)2. Setup ROOT environment
• source /path/to/rootbuild/bin/thisroot.(c)sh3. 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
06/26/20173Eric Pooser Joint Hall A/C Data Analysis Workshop
"How-To" wikiROOT Analyzer/Compiling WikiROOT Analyzer/Running Wiki
https://root.cern.ch/downloading-roothttps://github.com/JeffersonLab/hcanahttps://hallcweb.jlab.org/wiki/index.php/Analyzer/Githttps://hallcweb.jlab.org/wiki/index.php/Analyzer/Compilinghttps://hallcweb.jlab.org/wiki/index.php/Analyzer/Running
-
Hall-C Analyzer Overview• Doxygen page documents HCANA source code
4Eric Pooser06/26/2017 Joint Hall A/C Data Analysis Workshop
https://hallcweb.jlab.org/hcana/docs/
-
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, +/-)
06/26/20175Eric Pooser Joint Hall A/C Data Analysis Workshop
Raw EVIO Data
THaEvData
THcHitList Data
-
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, …
06/26/20176Eric Pooser Joint Hall A/C Data Analysis Workshop
THaEvData
Raw Hit Data
Raw Hit Data
THcHitList Data
-
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
06/26/20177Eric Pooser Joint Hall A/C Data Analysis Workshop
Raw Hit Data
Hit Data
Physics Data
-
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
8Eric Pooser
• Interfaces with THcAnalyzer to process and obtain the data• Raw, hit, & tracking data• Physics data
06/26/2017 Joint Hall A/C Data Analysis Workshop
https://hallcweb.jlab.org/wiki/index.php/Hall_C_basic_replay_structurehttps://hallcweb.jlab.org/wiki/index.php/Hall_C_basic_replay_structurehttps://hallcweb.jlab.org/wiki/index.php/Hall_C_basic_replay_structurehttps://github.com/JeffersonLab/hallc_replay
-
9Eric Pooser
Hall-C Replay Framework: DBASE
DBASEPARAM
RUN
STD
KINEM
Configuration Files
06/26/2017 Joint Hall A/C Data Analysis Workshop
-
10Eric Pooser
Hall-C Replay Framework: PARAM
DBASEPARAM
RUN
STD
KINEM
Configuration Files
06/26/2017 Joint Hall A/C Data Analysis Workshop
PARAMSHMS
HMS
GEN
TRIG
-
11Eric Pooser
Hall-C Replay Framework: MAPS
DBASEPARAM
RUN
STD
KINEM
Configuration Files
06/26/2017 Joint Hall A/C Data Analysis Workshop
PARAMSHMS
HMS
GEN
TRIG
MAPSSHMS
CRATE
HMS
-
12Eric Pooser
Hall-C Replay: DEF-files
PARAMSHMS
HMS
GEN
TRIG
DBASEPARAM
RUN
STD
KINEM
DEF FILES
SHMS
HMS
DETEC
TRIG
Configuration Files
MAPSSHMS
CRATE
HMS
06/26/2017 Joint Hall A/C Data Analysis Workshop
• 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
-
13Eric Pooser
Hall-C Replay Framework: Analysis Files
PARAMSHMS
HMS
GEN
TRIG
DBASEPARAM
RUN
STD
KINEM
DEF FILES
SHMS
HMS
DETEC
TRIG
Configuration Files
REPLAY SCRIPTS
Analysis Files
HMS
SHMSMAPSSHMS
CRATE
HMS
STACKCER+DC
DC+CALHODO
06/26/2017 Joint Hall A/C Data Analysis Workshop
-
Hall-C Replay Scripts: I/O
14Eric Pooser06/26/2017 Joint Hall A/C Data Analysis Workshop
-
Hall-C Replay Scripts: PARAM
15Eric Pooser06/26/2017 Joint Hall A/C Data Analysis Workshop
-
Hall-C Replay Scripts: MAPS
16Eric Pooser06/26/2017 Joint Hall A/C Data Analysis Workshop
-
Hall-C Replay Scripts: Apparatus
17Eric Pooser06/26/2017 Joint Hall A/C Data Analysis Workshop
-
Hall-C Replay Scripts: Detectors
18Eric Pooser06/26/2017 Joint Hall A/C Data Analysis Workshop
-
Hall-C Replay Scripts: Golden Track
19Eric Pooser06/26/2017 Joint Hall A/C Data Analysis Workshop
-
Hall-C Replay Scripts: Event Handler
20Eric Pooser06/26/2017 Joint Hall A/C Data Analysis Workshop
-
Hall-C Replay Scripts: Crate Maps
21Eric Pooser06/26/2017 Joint Hall A/C Data Analysis Workshop
-
Hall-C Replay Scripts: DEF-files
22Eric Pooser06/26/2017 Joint Hall A/C Data Analysis Workshop
-
Hall-C Replay Scripts: Summary Files
23Eric Pooser06/26/2017 Joint Hall A/C Data Analysis Workshop
-
Hall-C Replay Scripts: Report Files
24Eric Pooser06/26/2017 Joint Hall A/C Data Analysis Workshop
-
25Eric Pooser
PARAMSHMS
HMS
GEN
TRIG
DBASEPARAM
RUN
STD
KINEM
DEF FILES
SHMS
HMS
DETEC
TRIG
Hall-C Replay: Results
Configuration Files
REPLAY SCRIPTS
Analysis Files
HMS
SHMSMAPSSHMS
CRATE
HMS
AEROCER+DC
DC+CALHODO
ROOT TREE
DEF-FILE HISTOS
ONLINE GUI
Results
06/26/2017 Joint Hall A/C Data Analysis Workshop
-
Hall-C Replay: ROOT TTree
26Eric Pooser06/26/2017 Joint Hall A/C Data Analysis Workshop
-
Hall-C Replay: DEF-Files Histograms
27Eric Pooser06/26/2017 Joint Hall A/C Data Analysis Workshop
-
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 plane5. Produce a vector of histograms, indexed by the respective PMT number, for the
HGC good pulse time versus the good pulse amplitude6. Produce a scalar histogram for the HGC good pulse time versus the good pulse
amplitude for all PMTs7. Produce a 1D histogram of the good pulse integral for HGC PMT 38. 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
06/26/201728Eric Pooser Joint Hall A/C Data Analysis Workshop
-
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 TTree3. Produce a 1D histogram of the raw and good NGC
multiplicities and occupancies for the 4 PMTs4. 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 quantities6. Produce a 2D histogram of the normalized track
energy versus δ06/26/2017
29Eric Pooser Joint Hall A/C Data Analysis Workshop
-
Backup Slides
30Eric Pooser06/26/2017 Joint Hall A/C Data Analysis Workshop
-
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
31Eric Pooser06/26/2017 Joint Hall A/C Data Analysis Workshop
https://github.com/JeffersonLab/hallc_replay/tree/master/onlineGUIhttps://github.com/JeffersonLab/hallc_replay/blob/master/onlineGUI/guiHOWTO2007.pdf
-
Hall C Online GUI: Making Plots Great Again!
32Eric Pooser06/26/2017 Joint Hall A/C Data Analysis Workshop
-
Hall C Online GUI: Making Plots Great Again!
33Eric Pooser06/26/2017 Joint Hall A/C Data Analysis Workshop
-
Recent Updates to HCANA• Implementation of “Good”
ADC & TDC Variables• vector
• 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 non-tracking detectors with TDC’s
34Eric Pooser06/26/2017 Joint Hall A/C Data Analysis Workshop
-
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
35Eric Pooser
Pedestal Subtracted Pulse Amplitude
FADC Raw Pulse Time
06/26/2017 Joint Hall A/C Data Analysis Workshop
-
• “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
36Eric Pooser
Recent Updates to HCANA
06/26/2017 Joint Hall A/C Data Analysis Workshop
-
• 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
37Eric Pooser
Modifications to THaOutputTH1F 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.npeTH2F h2 [I+1] P.hgcer.goodAdcPed TH2F h3 [I+1] P.hgcer.goodAdcPulseInt
TH2F h1 P.hgcer.adcX P.hgcer.adcYTH2F h2 P.hgcer.adcX P.hgcer.adcZTH2F h3 P.hgcer.adcY P.hgcer.adcZ
TH2F h1 P.hgcer.goodAdcX P.hgcer.goodAdcYTH2F h2 P.hgcer.goodAdcX P.hgcer.goodAdcZTH2F h3 P.hgcer.goodAdcY P.hgcer.goodAdcZ
sTH2F h1 P.hgcer.goodAdcX P.hgcer.goodAdcYsTH2F h2 P.hgcer.goodAdcX P.hgcer.goodAdcZsTH2F h3 P.hgcer.goodAdcY P.hgcer.goodAdcZ
06/26/2017 Joint Hall A/C Data Analysis Workshop
-
Updates to Aerogel & Cherenkov Classes• Track matching has been
implemented in both aerogel and Cherenkov detector classes ➛ FineProcess
• Tracks are projected from the focal plane to the fiducial area defined by the detector geometry• Aerogel ➛ Diffusion Box• Cherenkov ➛ Mirror Planes
38Eric Pooser
x
y z
1 243
(xc, yc, xc’, yc’)(xh, yh, xh’, yh’)
06/26/2017 Joint Hall A/C Data Analysis Workshop
-
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 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 numTracksFired
39Eric Pooser06/26/2017 Joint Hall A/C Data Analysis Workshop
-
• Occupancies (raw and “good”) ➛ vector • Multiplicities (raw and “good”) ➛ scalar
40Eric Pooser
Recent Updates to HCANA
06/26/2017 Joint Hall A/C Data Analysis Workshop
-
06/26/201741Eric Pooser Joint Hall A/C Data Analysis Workshop