Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
38d397b
Changed rcnp gitmodule address
Jun 10, 2016
65c6133
Merge remote branch 'origin/RCNPUnified' into RCNPUnified
Jun 14, 2016
1cd275a
Temporarily changing the submodule path for work at RCNP
Jun 14, 2016
6bd64d8
Merge branch 'RCNPUnified' of nsclgw1.nscl.msu.edu:~/ceclub/sullivan/…
Jun 14, 2016
4762c75
Timestamps bath was absolute, and added <functional> to TCaeser.h
Jun 15, 2016
3951062
Merge branch 'RCNPUnified' of nsclgw1.nscl.msu.edu:~/ceclub/sullivan/…
Jun 17, 2016
6b11058
Changed gitmodules url for submodule to GitHub ssh
Jun 17, 2016
0a09903
Added functionality for ANL firmware v1.8 (June 2015). July 2015 addi…
Jun 17, 2016
149948e
Major: Added void* fDataPtr to TRawEvent. This allows for TRawEvent t…
Jun 18, 2016
916ae8e
Merge branch 'bug_GrandRaiden' into RCNPUnified
Jun 18, 2016
085d425
Now RCNPEvent is carried through to the rootfile in TGrandRaidenHit.
Jun 19, 2016
0af3713
Improved makefile to check the hist.def file and also added RCNP=1 to…
Jun 21, 2016
dfc670a
Added MPIEventLoop submodule for parallel analysis. Also added fake t…
Jun 24, 2016
533f076
Fixed error in makefile, and added onlin.bld check to TRawEventSource…
Jun 25, 2016
9d24d7d
Implemented new CFDv18. Untested
Jun 25, 2016
e8ee7bb
Fixed compile time issues with name mixups between LEDv18 and CFDv18.
Jun 25, 2016
500723d
CFDv1.8 seems to be working, but need more rigourous checks, mainly w…
Jun 25, 2016
7e89403
Updated DigitizerHits histogram. New firmware looks pretty good. Need…
Jun 25, 2016
944720e
Now export the discriminator time to TCagraHit. Need to export previo…
Jun 26, 2016
d4183c6
Started to implement pole zero and asymptotic baseline corrections. N…
Jun 26, 2016
bffd05f
Removed fake timestamp routine as we now have the myriad clock in GR
Jun 26, 2016
f09d651
Added fast-forward flag and functionality, which will fast-forward to…
Jun 26, 2016
6f4e64a
Added TGlobRawFile which looks in a directory for new files and attac…
Jun 26, 2016
a01cb3e
Updated GRUTinizer options to utilize TGlobRawFile.
Jun 26, 2016
81d3286
Fully added TGlobRawFile, and removed stalled source functionality as…
Jun 29, 2016
8b19a40
Many updates:
Jun 30, 2016
15122b2
Fully implemented PoleZero and Asymptotic Baseline corrections. I bel…
Jul 1, 2016
9fd9726
Added cal files. PoleZero & Asymptotic baseline corrections are now w…
Jul 1, 2016
aa27e39
Changed MPIEventLoop submodule remote address to point to CAGRAGR org…
Jul 11, 2016
9a87ef2
Added RCNP histos file
Jul 11, 2016
dadb0c9
Added Getters for Pre/Post rise sum to TCagraHit, and added new histo…
Jul 11, 2016
69ea6e6
Fixed bug with the saving of TChannel calibration information into th…
Jul 13, 2016
c982e40
Error fix in last commit.
Jul 13, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "GRAnalyzer"]
path = GRAnalyzer
url = https://github.com/CAGRA-GrandRaiden/GRAnalyzer
url = git@github.com:CAGRA-GrandRaiden/GRAnalyzer.git
[submodule "MPIEventLoop"]
path = MPIEventLoop
url = git@github.com:CAGRA-GrandRaiden/MPIEventLoop.git
7 changes: 2 additions & 5 deletions .grutrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@ Unix.*.Root.MacroPath: .:$(GRUTSYS)/util:$(ROOTSYS)/macros
#Unix.*.Root.DynamicPath: .:~/rootlibs:$(ROOTSYS)/lib:$/home/tiguser/packages/SharcAnalysis

#default MakeHistos library
#GRUT.HistLib: $(GRUTSYS)/libraries/libMakeHistos.so
GRUT.HistLib: $(GRUTSYS)/libraries/libFastScintHists.so
#GRUT.HistLib: $(GRUTSYS)/libraries/libPolarHists.so
#GRUT.HistLib: $(GRUTSYS)/libraries/libMakeSegaJanusHistos.so
GRUT.HistLib: $(GRUTSYS)/libraries/libRCNPsav.so
GRUT.GuiSetup: $(GRUTSYS)/gui_params.hist

#files to load at log in:
Rint.Logon: $(GRUTSYS)/.grut_logon
Rint.Logon: $(GRUTSYS)/logon.C
Rint.History $(GRUTSYS)/.grut_history
Rint.HistSize: 1000000

Expand Down
1 change: 1 addition & 0 deletions MPIEventLoop
Submodule MPIEventLoop added at 27f2e4
144 changes: 143 additions & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,148 @@ A generic unpacker and analysis package for gamma-ray spectroscopy.

The doxygen documentation can be found [here](https://pcbend.github.io/GRUTinizer).

Tutorial for July RCNP Test Experiment 2016:
--
The most important thing to know is that in order to use GRUTinizer, you must *first* run the ```grutsh``` command in your shell session. (e.g. after you have logged in to cagragr@miho-1 or aino-1, you type ```grutsh```. This will source a number of need scripts and directories to correctly setup your environment to compile and run GRUTinizer.

generic comments.
Next, copy the ```~/ana/template/``` directory to your own analysis space. Compile it with

``` make -j15 ```

Note, you do not need to ```make clean``` unless except in rare instances. Make should handle the dependencies for you.



Key program options (flags) for running GRUTinizer:

Options:

arg Input file(s)

**-H [ --histos ] attempt to run events through MakeHisto lib.**

**-m [ --sort-multiple ] If passed multiple raw data files, treat them as one file.**

**-s [ --sort ] Attempt to loop through root files.**

**--build-window arg Build window, timestamp units**

**-g [ --start-gui ] Start the GUI**

**-o [ --output ] arg Root output file**

**-S [ --gr-singles ] Ignore GR timestamps and take singles.**

**--hist-output arg Output file for histograms**

**-q [ --quit ] Run in batch mode**

**-h -? [ --help ] Show this help message**


Online CAGRA example:
--
``` ./bin/grutinizer -Hmg config/rcnpchannels.cal libraries/libRCNPhistos.so cagra_data/data1/run_1018.gtd01_000_010* -o /dev/null ```
* Above, -H specifies that a histogram library will be used. For each built event, the function MakeHistograms in ```./histos/RCNPhistos.cxx ``` will be called. Any new *.cxx files put in ./histos will be automatically compiled into a corresponding library and put in ./libraries.

* Above -m indicates that multiple raw files will be sorted simultaneously and attempted to event correlated. This flag should almost always be present when multiple raw files to be sorted.

* -g launches the graphical user interface. Some helper functions and key commands are described in the Interactive Analysis section below.

* -o /dev/null indicates that the output root tree will not be created, and only histograms will be made for online monitoring

Online Grand Raiden example:
--
``` ./bin/grutinizer -Hg config/rcnpchannels.cal libraries/libRCNPhistos.so online.bld -o /dev/null ```
* All options here are similar to those found above, but now we are using a special online.bld file to indicate that GRUTinizer should utilize the online functionality of the GRAnalyzer to retrieve GR event data. Note that online mode only works when you are running GRUTinizer from *aino-1*, since this is the computer on which the Grand Raiden DAQ is run.


Offline CAGRA example:
--
``` ./bin/grutinizer -Hmq config/rcnpchannels.cal libraries/libRCNPhistos.so cagra_data/data1/run_1018.gtd01_000_010* -o run1018.root ```

* The only difference here is that a -o specifies the name of the rootfile that will contain the built root tree from the raw data (ie, we are not skipping this step as in the previous example). This can be nice for calibrations as this root tree can be read in just like any other raw file and analyzed, without needing to resort all the data.

* -q specifies that we want to close GRUTinizer when analysis and sorting is done. Note that in this mode, the GUI is not opened.


Offline Grand Raiden example:
--
``` ./bin/grutinizer -SHg config/rcnpchannels.cal libraries/libRCNPhistos.so ~/data/run1016.bld ```

* In this case, we are running the graphical interface in offline mode, while sorting data from a file that was produced at some point in the past. Since we did not specify an output filename, the file should detect the run number and name it appropriately (note that this doesnt yet work CAGRA, I think).

* -S here is a special flag to indicate GR singles mode. This is necessarry if for some reason, the MYRIAD timestamp module is not functioning, but looking at the raw singles data is still desired. This flag can be used in offline or online mode.


Coincident CAGRA + GR example:

``` ./bin/grutinizer -Hmg config/rcnpchannels.cal libraries/libRCNPhistos.so online.bld cagra_data/data1/run_1018.gtd01_000_010* -o /dev/null ```

* Here we attach online to both GR and to raw CAGRA data

* In this setting -m is critical as it indicates that the different raw sources should be built together.




**INTERACTIVE ANALYSIS**
--


In addition to the many libraries in TGRUTAnalysis to make analysis easier, GRUTinizer also takes control of some of the behind the scene functions of ROOT to make analysis a bit easier.

To take advantage of these features all one has to do is start GRUTinizer! They are implemented when examining and natural root classes, whether the where draw from a tree, made fresh or load from a file.

* **GlobalFunctions** <br>

* **GCanvas** <br> The most notable difference, is the replacement of the TCanvas with GCanvas. This replacement is done naturally - no changes from either existing ROOT scripts or GRUTinizer scripts are needed to take advantage of the GCanvas default behavior.

## Universal Commands

| Key | Action |
|:-----|:------|
| **F2** | Show/Hide Editor Tab |

## TH1 Commands
| Key | Action |
|:------|:------|
| | All normal root commands/interactions.|
| **m** | Toggle on/off marker mode; when on, the histogram will remember and display the last four clicks as marks on the histogram.|
| **p** | If the 1d hist was made using the global ProjectionX/ProjectionY; gating the original 2D matrix this histogram came from is possible by placing markers around the gate and pressing p. The gates spectra is immediately drawn. |
| **B** | Cycle through types of automatic background subtraction used when projecting with **p**. Current types include: No subtraction, Fraction of the total, subtract gate from the 3rd marker (gate size set to the distance between marker 1 and 2). |
| **b** | Set the background, how it is set depends on **B**.|
| **n** | Remove all markers / functions drawn on the histogram (not gates!).|
| **e** | Expand the x-axis range between the last two markers.|
| **E** | Bring up dialogue box used to set desired x-axis range.|
| **o** | Unzoom the entire histogram.|
| **Arrow Left/Right** | When zoomed in, mover the display region to the left/right by one half of the region currently displayed.|
| **Arrow Up/Down** | Quickly display the next histogram stored in memory, especially useful when gating to go back and forth between gates and the total projection. (currently only available in GH1D) |
| **f** | Ryan D's TPeak Fit (proper skewd gaus for gamma-rays with automatic bg) with minimum output. |
| **g** | Gaus fit with linear background, displays results of the fit **RESULTS STILL NEED TO BE VERIFIED** |
| **i** | Raw integral of counts between the two markers |
| **s** | Show peak values. |
| **S** | Remove peak values. |
| **l** | Toggle y-axis linear. |


## GH2I Commands
| Key | Action |
|:------|:------|
| | All normal root commands/interactions.|
| middle-click | Select the current pad, current pad is outlined by a red border. |
| **e** | Expand the x-axis range between the two markers.|
| **g** | Create a TCuG on the canvas, name scheme is _cut# where # is tracked from the start of the program.|
| **o** | Unzoom the entire histogram, x and y.|
| **x** | Make and display a total projection of the x-axis.|
| **X** | Make and display a one bin projection of the x-axis, arrow up/down will cycle through all bins.|
| **y** | Make and display a total projection of the y-axis.|
| **Y** | Make and display a one bin projection of the y-axis, arrow up/down will cycle through all bins.|


## TGraph/TGraphErrors Commands
| Key | Action |:
|:------|:------|
| | All normal root commands/interactions.|
| **p** | Print the graph to the terminal.

3 changes: 3 additions & 0 deletions config/rcnp_constants.val
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ShapingTime {
Value: 350.0
}
Loading