commit e9168bed2ae61d1a7c3f1d2e5dedca0aead6640d Author: Gordon McCann Date: Tue Jul 13 16:36:41 2021 -0400 First commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..699d1e2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,22 @@ +###directories to ignore### +./rootfiles/ +./pics/ +./images/ +./hotfixes/ + +###file types to ignore### +*.swp +*.o +*.cxx +*.root +*.bin +*.pcm +*.jpg +*.png +*.sublime-project +*.sublime-workspace +event_log.txt +.DS_Store + +###include this### +!.gitignore diff --git a/README.md b/README.md new file mode 100644 index 0000000..47d1c4c --- /dev/null +++ b/README.md @@ -0,0 +1,87 @@ +# SPS-SABRE Data Analysis Package +Version 3 +This is a software package designed to help experimenters analyze data from SPS-SABRE at FSU. +It can convert CoMPASS data to ROOT, sort the data in time, build events, perform preliminary analysis and provide basic plots. Programs are built using make, and a make file is included. Simply using the command make will build all programs. + +WHEN TESTING, RUN WITH WIDE WINDOWS + +## GWMEVB vs. GWMEVB_CL +There are two programs provided. They are `GWMEVB` and `GWMEVB_CL`. The first is a full GUI version of the event builder. The GUI supports all conversion methods and the plotting tool. + +### Building Events +The event building operation is the bulk of the analysis process. As files are being converted to ROOT from the raw CoMPASS binary, events are built using information given by the user. + +#### Types of Event Building +1. Convert: simply sends data from CoMPASS format to ROOT format and time orders the data. +2. Slow Events: This perfoms the event building of slow events and then analyzes the slow data. Note that in this option, if there are unresolved multiplicities in data, the analyzer assumes the earliest datum is relevant one. +3. Fast Events: This performs the event building of fast events, assuming that slow event data has already been created and EXISTS in the proper directory. The fast event data is then analyzed. +4. Analyze Slow Events: This performs analysis of slow event data, without performing any fast sorting. +5. Analyze Fast Events: This performs analysis of fast event data. + +#### Slow Sorting +The first stage is slow sorting the shifted data by timestamp and orgainizing detector hits into +large data events. Events are structures which contain all detector hits that occur within a given coincidence window with physical detector variables. This event data is then written to an output file. The goal of the slow sorting is to be as general as possible; slow sorting should change very little on a data set to data set basis, as this coincidence window is limited mostly be the time difference between an anode hit and the maximum delay line time if the correct shifts are applied to SABRE and the scintillator. + +#### Fast Sorting +This is basically a secondary tier of event building, that is more user specific. It breaks down +data within the coincidence window into single focal plane events with asscoiated SABRE data. The +principle is that the scintillator provides very sharp timing resolution by which we can further +refine the built event. Currently, `FastSort` is desinged to take two windows: a coincidence window +for SABRE and the scintillator, and a coincidence window for the ion chamber and the scintillator. +For the ion chamber, the back anode was chosen to be the representative (it really doesn't matter +which part of the ion chamber is chosen). SABRE data is additionally filtered to contain only paired +hits (hits that have both a ring and a wedge). Fast sorting is where the user will have to make the +most changes to the actual event building. Any new detector or additional changes will require more +coincidence definitions and sorting depth. + +#### Analyzing +Finally, the sorted event data is then converted into meaningful physical data, and saved to a +final analyzed file. This is where the digitizer parameters (charge/energy, time, etc.) are converted +into the actual paramters of interest such as focal plane position, SABRE energy, etc. In this way, +each raw data file gives four output files from the analysis: a shifted file, a slow sorted file, +a fast sorted file, and an analyzed file. The rationale behind the repetative writting is that +it helps the user isolate at which stage data issues occur at; this is especially useful for the +shifting and sorting stages, where the values for the shifts and coincidence window have to be +estimated by the user before running. + +All of the user input is handled through an input file in the program directory named +`input.txt`. This file is preformated; all the user needs to do is update the names and +values. Everything from input and output directories, to shifts and coincidence windows should +be specified in this file. Note that directorires should be explicit fullpaths. + +See the Plotter section for advice on which histograms are useful for choosing the correct shifts +and window sizes for the data set. + +### Merging +The program is capable of merging several root files together using either `hadd` or the ROOT TChain class. Currently, only the TChain version is implemented in the API, however if you want the other method, it does exist in the RunCollector class. + +### Plotting +The plotting is intended to be the final leg of the analysis pipeline. The goal of this program +is to take a collection of analyzed files and produce a file containing relevant histograms, +graphs, and other such data measures. As it is currently built, this program has no ability to +save any data of its own, it merely makes data measures. It is a quick and dirty analysis, and is not intended to be increased beyond merely checking some TCutGs and making some histograms. Cuts can be applied using a cut list. The cut list should contain a name for the cut, the name of the file containing the TCutG ROOT object (named CUTG), and then names for the x and y variables. The x and y variables must be initialized in the variable map. By default x1, x2, xavg, scintLeft, anodeBack, and cathode are all initialized. Any other variables will have to be added by the user by modifiying the CutHandler::InitVariableMap() function. + +#### Determining Shifts and Windows +The plotting already provides most of the histograms one would need to determine the shifts and windows +for a data set. These, in general, come from plots of the relative time of various components of the +detector. The goal of the scintillator and si shifts are to make them occur in coincidence with the +anode (pick one of the focal plane anodes, they occur at essentially the same time). Included automatically are plots of the back anode relative to the scintillator (anodeB.Time-scintL.Time, gives scint offset), the is relative to the scint (SABRE fronts and backs... pick higher res one to make offsets and shifts), and maximum delay times relative to scint for both lines. + +The method is the following: + +Using the anode relative to the scint, one can determine the scint offset (center the peak on 0). Then, +by looking at the SABRE relative to scint plots one can determine the shift for si and the fast window +size (again center the peak on 0, the width of the peak becomes the fast window). Finally, if everything goes according to plan, now the maximum size of the slow coincidence window will be the relative time of the maximum delay line signal. Look at the plot of this and determine where you want to cut off. Run it again and check the results. You should look for, in general, reduced background and noise along with correct centering of the timing peaks. + +### Scaler Support +Currently the pipeline supports declaring individual digitizer channels as scalers. These channels will be used a pure counting measures. To make a channel a scaler, put the CoMPASS formated name of the channel and board (check the given etc/ScalerFile.txt for an example) in a text file along with a parameter name for the scaler to be saved as. These files are then processed outside of the event building loop, which can greatly increase the computational speed. Future versions will include scaler rates as well. + +## System Requirements +Only tested with `ROOT` 6.14, mileage may vary +Uses C++11 standards +Only compatible with MacOSX and Linux + +## Compliling and Running +To compile use the command `make` +To clean run `make clean` and then run `make` +For a complete rebuild use `make clean_header` as well as `make clean`. diff --git a/bin/.gitignore b/bin/.gitignore new file mode 100644 index 0000000..c133898 --- /dev/null +++ b/bin/.gitignore @@ -0,0 +1,4 @@ +###use this to keep the directory but not any of the contents### +* +!archivist +!.gitignore diff --git a/bin/archivist b/bin/archivist new file mode 100755 index 0000000..e4d3787 --- /dev/null +++ b/bin/archivist @@ -0,0 +1,15 @@ +#!/bin/bash + +RUNNO=$1 +BINARYDIR=/nvme/27Al_Feb2021/DAQ/run_$RUNNO/UNFILTERED/ +ARCHIVE=/nvme/WorkingData/raw_binary/run_$RUNNO.tar.gz + +echo "Running archivist for binary data in $BINARYDIR to archive $ARCHIVE..." + +cd $BINARYDIR + +tar -cvzf $ARCHIVE ./*.bin + +cd - + +echo "Complete." diff --git a/etc/ChannelMap_Feb2021_SABRE.txt b/etc/ChannelMap_Feb2021_SABRE.txt new file mode 100644 index 0000000..d34a8cb --- /dev/null +++ b/etc/ChannelMap_Feb2021_SABRE.txt @@ -0,0 +1,146 @@ +Format: global_channel detectorID_number detectorType_identifier detectorPart_identifier +NOTE: the focal plane ionchamber is given the UNIQUE detector id of 11. All other detector id ranges should be 0 to nDetectors-1. +0 4 SABREWEDGE 0 +1 4 SABREWEDGE 1 +2 4 SABREWEDGE 2 +3 4 SABREWEDGE 3 +4 4 SABREWEDGE 4 +5 4 SABREWEDGE 5 +6 4 SABREWEDGE 6 +7 4 SABREWEDGE 7 +8 -1 UNUSED 0 +9 -1 UNUSED 0 +10 -1 UNUSED 0 +11 -1 UNUSED 0 +12 -1 UNUSED 0 +13 -1 UNUSED 0 +14 -1 UNUSED 0 +15 -1 UNUSED 0 +16 2 SABREWEDGE 0 +17 2 SABREWEDGE 1 +18 2 SABREWEDGE 2 +19 2 SABREWEDGE 3 +20 2 SABREWEDGE 4 +21 2 SABREWEDGE 5 +22 2 SABREWEDGE 6 +23 2 SABREWEDGE 7 +24 3 SABREWEDGE 0 +25 3 SABREWEDGE 1 +26 3 SABREWEDGE 2 +27 3 SABREWEDGE 3 +28 3 SABREWEDGE 4 +29 3 SABREWEDGE 5 +30 3 SABREWEDGE 6 +31 3 SABREWEDGE 7 +32 1 SABREWEDGE 0 +33 1 SABREWEDGE 1 +34 1 SABREWEDGE 2 +35 1 SABREWEDGE 3 +36 1 SABREWEDGE 4 +37 1 SABREWEDGE 5 +38 1 SABREWEDGE 6 +39 1 SABREWEDGE 7 +40 0 SABREWEDGE 0 +41 0 SABREWEDGE 1 +42 0 SABREWEDGE 2 +43 0 SABREWEDGE 3 +44 0 SABREWEDGE 4 +45 0 SABREWEDGE 5 +46 0 SABREWEDGE 6 +47 0 SABREWEDGE 7 +48 4 SABRERING 0 +49 4 SABRERING 1 +50 4 SABRERING 2 +51 4 SABRERING 3 +52 4 SABRERING 4 +53 4 SABRERING 5 +54 4 SABRERING 6 +55 4 SABRERING 7 +56 4 SABRERING 8 +57 4 SABRERING 9 +58 4 SABRERING 10 +59 4 SABRERING 11 +60 4 SABRERING 12 +61 4 SABRERING 13 +62 4 SABRERING 14 +63 4 SABRERING 15 +64 3 SABRERING 0 +65 3 SABRERING 1 +66 3 SABRERING 2 +67 3 SABRERING 3 +68 3 SABRERING 4 +69 3 SABRERING 5 +70 3 SABRERING 6 +71 3 SABRERING 7 +72 3 SABRERING 8 +73 3 SABRERING 9 +74 3 SABRERING 10 +75 3 SABRERING 11 +76 3 SABRERING 12 +77 3 SABRERING 13 +78 3 SABRERING 14 +79 3 SABRERING 15 +80 2 SABRERING 0 +81 2 SABRERING 1 +82 2 SABRERING 2 +83 2 SABRERING 3 +84 2 SABRERING 4 +85 2 SABRERING 5 +86 2 SABRERING 6 +87 2 SABRERING 7 +88 2 SABRERING 8 +89 2 SABRERING 9 +90 2 SABRERING 10 +91 2 SABRERING 11 +92 2 SABRERING 12 +93 2 SABRERING 13 +94 2 SABRERING 14 +95 2 SABRERING 15 +96 1 SABRERING 0 +97 1 SABRERING 1 +98 1 SABRERING 2 +99 1 SABRERING 3 +100 1 SABRERING 4 +101 1 SABRERING 5 +102 1 SABRERING 6 +103 1 SABRERING 7 +104 1 SABRERING 8 +105 1 SABRERING 9 +106 1 SABRERING 10 +107 1 SABRERING 11 +108 1 SABRERING 12 +109 1 SABRERING 13 +110 1 SABRERING 14 +111 1 SABRERING 15 +112 0 SABRERING 0 +113 0 SABRERING 1 +114 0 SABRERING 2 +115 0 SABRERING 3 +116 0 SABRERING 4 +117 0 SABRERING 5 +118 0 SABRERING 6 +119 0 SABRERING 7 +120 0 SABRERING 8 +121 0 SABRERING 9 +122 0 SABRERING 10 +123 0 SABRERING 11 +124 0 SABRERING 12 +125 0 SABRERING 13 +126 0 SABRERING 14 +127 0 SABRERING 15 +128 11 FOCALPLANE SCINTRIGHT +129 11 FOCALPLANE SCINTLEFT +130 -1 UNUSED 0 +131 -1 UNUSED 0 +132 -1 UNUSED 0 +133 -1 UNUSED 0 +134 -1 UNUSED 0 +135 11 FOCALPLANE CATHODE +136 11 FOCALPLANE DELAYFL +137 11 FOCALPLANE DELAYFR +138 11 FOCALPLANE DELAYBL +139 11 FOCALPLANE DELAYBR +140 -1 UNUSED 0 +141 11 FOCALPLANE ANODEFRONT +142 -1 UNUSED 0 +143 11 FOCALPLANE ANODEBACK diff --git a/etc/ChannelMap_March2020_newFormat_092020.txt b/etc/ChannelMap_March2020_newFormat_092020.txt new file mode 100644 index 0000000..d34a8cb --- /dev/null +++ b/etc/ChannelMap_March2020_newFormat_092020.txt @@ -0,0 +1,146 @@ +Format: global_channel detectorID_number detectorType_identifier detectorPart_identifier +NOTE: the focal plane ionchamber is given the UNIQUE detector id of 11. All other detector id ranges should be 0 to nDetectors-1. +0 4 SABREWEDGE 0 +1 4 SABREWEDGE 1 +2 4 SABREWEDGE 2 +3 4 SABREWEDGE 3 +4 4 SABREWEDGE 4 +5 4 SABREWEDGE 5 +6 4 SABREWEDGE 6 +7 4 SABREWEDGE 7 +8 -1 UNUSED 0 +9 -1 UNUSED 0 +10 -1 UNUSED 0 +11 -1 UNUSED 0 +12 -1 UNUSED 0 +13 -1 UNUSED 0 +14 -1 UNUSED 0 +15 -1 UNUSED 0 +16 2 SABREWEDGE 0 +17 2 SABREWEDGE 1 +18 2 SABREWEDGE 2 +19 2 SABREWEDGE 3 +20 2 SABREWEDGE 4 +21 2 SABREWEDGE 5 +22 2 SABREWEDGE 6 +23 2 SABREWEDGE 7 +24 3 SABREWEDGE 0 +25 3 SABREWEDGE 1 +26 3 SABREWEDGE 2 +27 3 SABREWEDGE 3 +28 3 SABREWEDGE 4 +29 3 SABREWEDGE 5 +30 3 SABREWEDGE 6 +31 3 SABREWEDGE 7 +32 1 SABREWEDGE 0 +33 1 SABREWEDGE 1 +34 1 SABREWEDGE 2 +35 1 SABREWEDGE 3 +36 1 SABREWEDGE 4 +37 1 SABREWEDGE 5 +38 1 SABREWEDGE 6 +39 1 SABREWEDGE 7 +40 0 SABREWEDGE 0 +41 0 SABREWEDGE 1 +42 0 SABREWEDGE 2 +43 0 SABREWEDGE 3 +44 0 SABREWEDGE 4 +45 0 SABREWEDGE 5 +46 0 SABREWEDGE 6 +47 0 SABREWEDGE 7 +48 4 SABRERING 0 +49 4 SABRERING 1 +50 4 SABRERING 2 +51 4 SABRERING 3 +52 4 SABRERING 4 +53 4 SABRERING 5 +54 4 SABRERING 6 +55 4 SABRERING 7 +56 4 SABRERING 8 +57 4 SABRERING 9 +58 4 SABRERING 10 +59 4 SABRERING 11 +60 4 SABRERING 12 +61 4 SABRERING 13 +62 4 SABRERING 14 +63 4 SABRERING 15 +64 3 SABRERING 0 +65 3 SABRERING 1 +66 3 SABRERING 2 +67 3 SABRERING 3 +68 3 SABRERING 4 +69 3 SABRERING 5 +70 3 SABRERING 6 +71 3 SABRERING 7 +72 3 SABRERING 8 +73 3 SABRERING 9 +74 3 SABRERING 10 +75 3 SABRERING 11 +76 3 SABRERING 12 +77 3 SABRERING 13 +78 3 SABRERING 14 +79 3 SABRERING 15 +80 2 SABRERING 0 +81 2 SABRERING 1 +82 2 SABRERING 2 +83 2 SABRERING 3 +84 2 SABRERING 4 +85 2 SABRERING 5 +86 2 SABRERING 6 +87 2 SABRERING 7 +88 2 SABRERING 8 +89 2 SABRERING 9 +90 2 SABRERING 10 +91 2 SABRERING 11 +92 2 SABRERING 12 +93 2 SABRERING 13 +94 2 SABRERING 14 +95 2 SABRERING 15 +96 1 SABRERING 0 +97 1 SABRERING 1 +98 1 SABRERING 2 +99 1 SABRERING 3 +100 1 SABRERING 4 +101 1 SABRERING 5 +102 1 SABRERING 6 +103 1 SABRERING 7 +104 1 SABRERING 8 +105 1 SABRERING 9 +106 1 SABRERING 10 +107 1 SABRERING 11 +108 1 SABRERING 12 +109 1 SABRERING 13 +110 1 SABRERING 14 +111 1 SABRERING 15 +112 0 SABRERING 0 +113 0 SABRERING 1 +114 0 SABRERING 2 +115 0 SABRERING 3 +116 0 SABRERING 4 +117 0 SABRERING 5 +118 0 SABRERING 6 +119 0 SABRERING 7 +120 0 SABRERING 8 +121 0 SABRERING 9 +122 0 SABRERING 10 +123 0 SABRERING 11 +124 0 SABRERING 12 +125 0 SABRERING 13 +126 0 SABRERING 14 +127 0 SABRERING 15 +128 11 FOCALPLANE SCINTRIGHT +129 11 FOCALPLANE SCINTLEFT +130 -1 UNUSED 0 +131 -1 UNUSED 0 +132 -1 UNUSED 0 +133 -1 UNUSED 0 +134 -1 UNUSED 0 +135 11 FOCALPLANE CATHODE +136 11 FOCALPLANE DELAYFL +137 11 FOCALPLANE DELAYFR +138 11 FOCALPLANE DELAYBL +139 11 FOCALPLANE DELAYBR +140 -1 UNUSED 0 +141 11 FOCALPLANE ANODEFRONT +142 -1 UNUSED 0 +143 11 FOCALPLANE ANODEBACK diff --git a/etc/ChannelMap_Nov2020_50Tidp.txt b/etc/ChannelMap_Nov2020_50Tidp.txt new file mode 100644 index 0000000..ea1677a --- /dev/null +++ b/etc/ChannelMap_Nov2020_50Tidp.txt @@ -0,0 +1,18 @@ +Format: global_channel detectorID_number detectorType_identifier detectorPart_identifier +NOTE: the focal plane ionchamber is given the UNIQUE detector id of 11. All other detector id ranges should be 0 to nDetectors-1. +0 11 FOCALPLANE SCINTRIGHT +1 11 FOCALPLANE SCINTLEFT +2 -1 UNUSED 0 +3 11 FOCALPLANE MONITOR +4 -1 UNUSED 0 +5 11 FOCALPLANE BEAMINT +6 -1 UNUSED 0 +7 11 FOCALPLANE CATHODE +8 11 FOCALPLANE DELAYFL +9 11 FOCALPLANE DELAYFR +10 11 FOCALPLANE DELAYBL +11 11 FOCALPLANE DELAYBR +12 -1 UNUSED 0 +13 11 FOCALPLANE ANODEFRONT +14 -1 UNUSED 0 +15 11 FOCALPLANE ANODEBACK \ No newline at end of file diff --git a/etc/CutList_Feb2021_10B3hea.txt b/etc/CutList_Feb2021_10B3hea.txt new file mode 100644 index 0000000..fde1431 --- /dev/null +++ b/etc/CutList_Feb2021_10B3hea.txt @@ -0,0 +1,4 @@ +E_dE_CutFile: /data1/gwm17/10B3He/Feb2021/cuts/edeCut_Rachel.root +dE_position_CutFile: /data1/gwm17/10B3He/Feb2021/cuts/alphaCut_03012021.root +E_positon_CutFile: /data1/gwm17/10B3He/Feb2021/cuts/alphaCut_03012021.root +x1_x2_CutFile: /data1/gwm17/10B3He/Feb2021/cuts/xxCut_Rachel.root diff --git a/etc/CutList_March2020.txt b/etc/CutList_March2020.txt new file mode 100644 index 0000000..badebf2 --- /dev/null +++ b/etc/CutList_March2020.txt @@ -0,0 +1,4 @@ +E_dE_CutFile: /Volumes/LaCie/9BMarch2020/cuts/alphaCut_dbr_sl.root +dE_position_CutFile: /Volumes/LaCie/9BMarch2020/cuts/delayEXavgCut.root +E_positon_CutFile: /Volumes/LaCie/9BMarch2020/cuts/scintXavgCut.root +x1_x2_CutFile: /Volumes/LaCie/9BMarch2020/cuts/x1x2Cut.root \ No newline at end of file diff --git a/etc/CutList_Nov2020_50Tidp.txt b/etc/CutList_Nov2020_50Tidp.txt new file mode 100644 index 0000000..392401a --- /dev/null +++ b/etc/CutList_Nov2020_50Tidp.txt @@ -0,0 +1,4 @@ +E_dE_CutFile: /media/gordon/b6414c35-ec1f-4fc1-83bc-a6b68ca4325a/gwm17/50Tidp/cuts/EdECut_run16.root +dE_position_CutFile: /media/gordon/b6414c35-ec1f-4fc1-83bc-a6b68ca4325a/gwm17/50Tidp/cuts/EdECut_run16.root +E_positon_CutFile: /media/gordon/b6414c35-ec1f-4fc1-83bc-a6b68ca4325a/gwm17/50Tidp/cuts/EdECut_run16.root +x1_x2_CutFile: /media/gordon/b6414c35-ec1f-4fc1-83bc-a6b68ca4325a/gwm17/50Tidp/cuts/x1x2Cut_run16.root diff --git a/etc/Plotter.C b/etc/Plotter.C new file mode 100644 index 0000000..130ddd1 --- /dev/null +++ b/etc/Plotter.C @@ -0,0 +1,93 @@ +#include +#include +#include +#include +#include +#include +#include "include/DataStructs.h" +R__LOAD_LIBRARY(lib/libSPSDict.dylib) + +void Plotter() { + TFile* input = TFile::Open("/Volumes/LaCie/9BMarch2020/combined/main_data_carbonCal.root","READ"); + TTree* intree = (TTree*) input->Get("SPSTree"); + + TFile *cutfile = TFile::Open("/Volumes/LaCie/9BMarch2020/maindata_12C_extraTheta.root","READ"); + TCutG *cut = (TCutG*) cutfile->Get("CUTG"); + cut->SetName("extraTheta"); + cut->SetLineColor(kRed); + cut->SetVarX("xavg"); + cut->SetVarY("theta"); + + ProcessedEvent *event_address = new ProcessedEvent(); + intree->SetBranchAddress("event", &event_address); + + TFile *outfile = TFile::Open("/Volumes/LaCie/9BMarch2020/9b_histograms/carbonCal_thetaGating.root","RECREATE"); + TH2F *xtheta = new TH2F("xtheta","xtheta",600,-300,300,300,0,1.75); + TH2F *xde = new TH2F("xde","xde",600,-300,300,512,0,4096); + TH2F *xde_thetaCut = new TH2F("xde_thetaCut","xde_thetaCut",600,-300,300,512,0,4096); + xde_thetaCut->SetLineColor(kRed); + xde_thetaCut->SetMarkerColor(kRed); + TH2F *xde_antithetaCut = new TH2F("xde_antithetaCut","xde_antithetaCut",600,-300,300,512,0,4096); + xde_antithetaCut->SetLineColor(kBlack); + xde_antithetaCut->SetMarkerColor(kBlue); + TH1F *anodeRelTime = new TH1F("anodeRelTime","anodeRelTime",1000,-1000,1000); + TH1F *anodeRelTime_thetaCut = new TH1F("anodeRelTime_thetaCut","anodeRelTime_thetacut",1000,-1000,1000); + anodeRelTime_thetaCut->SetLineColor(kRed); + TH1F *anodeRelTime_antithetaCut = new TH1F("anodeRelTime_antithetaCut","anodeRelTime_antithetacut",1000,-1000,1000); + anodeRelTime_antithetaCut->SetLineColor(kBlack); + + std::cout<<"Total number of Entries: "<GetEntries()<GetEntries(); i++) { + std::cout<<"\rNumber of events processed: "<GetEntry(i); + double anodeRT = event_address->anodeBackTime - event_address->scintLeftTime; + + if(anodeRT != 0) { + xtheta->Fill(event_address->xavg, event_address->theta); + xde->Fill(event_address->xavg, event_address->delayBackRightE); + anodeRelTime->Fill(anodeRT); + if(cut->IsInside(event_address->xavg, event_address->theta)) { + xde_thetaCut->Fill(event_address->xavg, event_address->delayBackRightE); + anodeRelTime_thetaCut->Fill(anodeRT); + } else { + xde_antithetaCut->Fill(event_address->xavg, event_address->delayBackRightE); + anodeRelTime_antithetaCut->Fill(anodeRT); + } + } + } + + TCanvas *c1 = new TCanvas(); + c1->Divide(2,2); + c1->cd(1); + xde->Draw("colz"); + c1->cd(2); + xde_antithetaCut->Draw(); + xde_thetaCut->Draw("same"); + c1->BuildLegend(); + c1->cd(3); + anodeRelTime->Draw(); + anodeRelTime_antithetaCut->Draw("same"); + anodeRelTime_thetaCut->Draw("same"); + c1->BuildLegend(); + c1->cd(4); + xtheta->Draw(); + cut->Draw("same"); + + input->Close(); + cutfile->Close(); + + outfile->cd(); + xtheta->Write(); + xde->Write(); + xde_thetaCut->Write(); + xde_antithetaCut->Write(); + anodeRelTime->Write(); + anodeRelTime_thetaCut->Write(); + anodeRelTime_antithetaCut->Write(); + c1->Write(); + + c1->Close(); + outfile->Close(); + + +} diff --git a/etc/SabreSingles.C b/etc/SabreSingles.C new file mode 100644 index 0000000..8a4fc8c --- /dev/null +++ b/etc/SabreSingles.C @@ -0,0 +1,133 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include "include/DataStructs.h" +#include "include/CompassHit.h" +#include "include/GainMatcher.h" +#include "include/SabreMap.h" + +R__LOAD_LIBRARY(lib/libGainMatcher.dylib) +R__LOAD_LIBRARY(lib/libSPSDict.dylib) +R__LOAD_LIBRARY(lib/libSabreMap.dylib) + + +void MyFill(THashTable *table, std::string name, int bins, double min, double max, double value) { + TH1F *histo = (TH1F*) table->FindObject(name.c_str()); + if(histo == NULL) { + TH1F* h = new TH1F(name.c_str(), name.c_str(), bins, min, max); + h->Fill(value); + table->Add(h); + } else { + histo->Fill(value); + } +} + +void MyFill(THashTable *table, std::string name, int binsx, double minx, double maxx, double valuex + , int binsy, double miny, double maxy, double valuey) { + TH2F *histo = (TH2F*) table->FindObject(name.c_str()); + if(histo == NULL) { + TH2F* h = new TH2F(name.c_str(), name.c_str(), binsx, minx, maxx, binsy, miny, maxy); + h->Fill(valuex, valuey); + table->Add(h); + } else { + histo->Fill(valuex, valuey); + } +} + +void SabreSingles_raw() { + + GainMatcher gains; + gains.SetFile("etc/March2020_gainmatch_2.0V_5486Am241.txt"); + + std::unordered_map smap; + + FillSabreMap("etc/ChannelMap_March2020_flipping.dat", smap); + + TFile *input = TFile::Open("/Volumes/LaCie/9BMarch2020/raw_root_singles/compass_run_37.root", "READ"); + TTree *intree = (TTree*) input->Get("Data"); + + ULong64_t ts; + UShort_t e, c, b, es; + UInt_t f; + intree->SetBranchAddress("Timestamp", &ts); + intree->SetBranchAddress("Channel", &c); + intree->SetBranchAddress("Board", &b); + intree->SetBranchAddress("Energy", &e); + intree->SetBranchAddress("EnergyShort", &es); + intree->SetBranchAddress("Flags", &f); + intree->SetMaxVirtualSize(4000000000); + + TFile *output = TFile::Open("/Volumes/LaCie/9BMarch2020/analyzed_singles/singles_run37.root","RECREATE"); + THashTable *hash = new THashTable(); + + int gchan; + DPPChannel hit; + cout<<"Total Number of Entries: "<GetEntries()<GetEntries(); i++) { + intree->GetEntry(i); + std::cout<<"\rNumber of entries processed: "<20) { + MyFill(hash, Form("detector%i_ring%i_energy",schan.detID,hit.Channel), 280, 0, 28, hit.Energy*gains.GetScaler(gchan)); + } + } + + input->Close(); + hash->Write(); + output->Close(); +} + +void SabreSingles_analyzed() { + + std::unordered_map smap; + FillSabreMap("etc/ChannelMap_March2020_flipping.dat", smap); + + TFile *input = TFile::Open("/Volumes/LaCie/9BMarch2020/combined/downscaled_singles.root", "READ"); + TTree *intree = (TTree*) input->Get("SPSTree"); + + ProcessedEvent *event_address = new ProcessedEvent(); + intree->SetBranchAddress("event", &event_address); + intree->SetMaxVirtualSize(4000000000); + + TFile *output = TFile::Open("/Volumes/LaCie/9BMarch2020/analyzed_singles/downscale_histograms.root", "RECREATE"); + THashTable *hash = new THashTable(); + + std::cout<<"Total entries: "<GetEntries()<GetEntries(); i++) { + std::cout<<"\rNumber of entries processed: "<GetEntry(i); + + for(int j=0; j<5; j++) { + for(unsigned int k=0; k<(event_address->sabreArray[j].rings.size()); k++) { + MyFill(hash, Form("detector%i_ring%i_energy",j,event_address->sabreArray[j].rings[k].Ch), 280,0,28, event_address->sabreArray[j].rings[k].Long); + } + } + } + + input->Close(); + hash->Write(); + output->Close(); + delete event_address; +} + +void SabreSingles() { + //SabreSingles_raw(); + SabreSingles_analyzed(); +} + diff --git a/etc/ScalerFile.txt b/etc/ScalerFile.txt new file mode 100644 index 0000000..67d2a7c --- /dev/null +++ b/etc/ScalerFile.txt @@ -0,0 +1,3 @@ +Format: scaler_param_name assoc_binary_file_name_without_runID +NOTE: As of this version, scalers are pure counting parameters (the total events will be counted and saved as a TParameter with the data) +Data_CH5@V1730_89 beamint \ No newline at end of file diff --git a/etc/ScalerFile_Feb2021_SABRE.txt b/etc/ScalerFile_Feb2021_SABRE.txt new file mode 100644 index 0000000..89eeee6 --- /dev/null +++ b/etc/ScalerFile_Feb2021_SABRE.txt @@ -0,0 +1,5 @@ +Format: scaler_param_name assoc_binary_file_name_without_runID +NOTE: As of this version, scalers are pure counting parameters (the total events will be counted and saved as a TParameter with the data) +CH0@V1730_89_Data t1 +CH1@V1730_89_Data t2 + diff --git a/etc/ShiftMap_April2020_newFormat_10102020.txt b/etc/ShiftMap_April2020_newFormat_10102020.txt new file mode 100644 index 0000000..8ad83e7 --- /dev/null +++ b/etc/ShiftMap_April2020_newFormat_10102020.txt @@ -0,0 +1,12 @@ +Format: board channel/keyword shift +NOTE: Do not delete these lines! If no shift is specified for a channel, no shift is applied. Use keyword 'all' to apply a uniform shift to all channels in a single board. Shifts are in ps. +0 all 110000 +1 all 70000 +2 all 70000 +3 all -115000 +4 all 185000 +5 all 195000 +6 all 225000 +7 all 235000 +8 0 650000 +8 1 650000 \ No newline at end of file diff --git a/etc/ShiftMap_Feb2021_SABRE.txt b/etc/ShiftMap_Feb2021_SABRE.txt new file mode 100644 index 0000000..f097c1f --- /dev/null +++ b/etc/ShiftMap_Feb2021_SABRE.txt @@ -0,0 +1,12 @@ +Format: board channel/keyword shift +NOTE: Do not delete these lines! If no shift is specified for a channel, no shift is applied. Use keyword 'all' to apply a uniform shift to all channels in a single board. Shifts are in ps. +0 all 260000 +1 all 220000 +2 all 220000 +3 all 335000 +4 all 385000 +5 all 395000 +6 all 425000 +7 all 435000 +8 0 900000 +8 1 900000 diff --git a/etc/ShiftMap_Nov2020_50Tidp.txt b/etc/ShiftMap_Nov2020_50Tidp.txt new file mode 100644 index 0000000..4852fe1 --- /dev/null +++ b/etc/ShiftMap_Nov2020_50Tidp.txt @@ -0,0 +1,4 @@ +Format: board channel/keyword shift +NOTE: Do not delete these lines! If no shift is specified for a channel, no shift is applied. Use keyword 'all' to apply a uniform shift to all channels in a single board. Shifts are in ps. +0 0 685000 +0 1 685000 \ No newline at end of file diff --git a/etc/default_input.txt b/etc/default_input.txt new file mode 100644 index 0000000..871f7de --- /dev/null +++ b/etc/default_input.txt @@ -0,0 +1,15 @@ +Ztarget: 6 Atarget: 12 Zproj: 2 Aproj: 3 Zeject: 2 Aeject: 4 +BeamE(MeV): 24 Angle(deg): 20 Bfield(G): 9500 +Board_shift_file: ./etc/ShiftMap_April2020.txt +Scint_offset(ps): 0.65e6 +coincidence_window(ps): 1.5e6 +si_fast_coincidence_window(ps): 0.125e6 +ion_chamber_fast_coincidence_window(ps): 0.25e6 +DataDir: /Users/gordonmccann/Desktop/GWM_EventBuilder/example/raw_root/ +MinRun: -99 MaxRun: 99 +TimeshiftedDir: /Users/gordonmccann/Desktop/GWM_EventBuilder/example/shifted/ +SortedDir: /Users/gordonmccann/Desktop/GWM_EventBuilder/example//sorted/ +FastDir: /Users/gordonmccann/Desktop/GWM_EventBuilder/example/fast/ +AnalyzedDir: /Users/gordonmccann/Desktop/GWM_EventBuilder/example/analyzed/ +SABREChannelMapFile: ./etc/ChannelMap_March2020.dat +GainMatchingFile: ./etc/March2020_gainmatch_2.0V_5486Am241.txt diff --git a/etc/logo.txt b/etc/logo.txt new file mode 100644 index 0000000..706d0b8 --- /dev/null +++ b/etc/logo.txt @@ -0,0 +1,11 @@ + _ + | | + | | + ___ _ __ ___ ___ ____ _| |__ _ _______ + / __|| ' \/ __|/ __| / __ ` | _ \| '__/ __ \ + \__ \| |\ \__ \\__ \| | | | | | | | | |__| | + __) | |/ /__) |__) | |__| | |_| | | | ___/ + |___/| .__/|___/____/ \____,_|____/|_| \____| + | | + | | + |_| diff --git a/etc/mass.txt b/etc/mass.txt new file mode 100644 index 0000000..da4e88f --- /dev/null +++ b/etc/mass.txt @@ -0,0 +1,2501 @@ + N Z A EL ATOMIC MASS + (micro-u) + 1 0 1 n 1 008664.91582 + 0 1 1 H 1 007825.03224 + 1 1 2 H 2 014101.77811 + 2 1 3 H 3 016049.28199 + 1 2 3 He 3 016029.32265 + 3 1 4 H 4 026431.868 + 2 2 4 He 4 002603.25413 + 1 3 4 Li 4 027185.562 + 4 1 5 H 5 035311.493 + 3 2 5 He 5 012057.224 + 2 3 5 Li 5 012537.800 + 5 1 6 H 6 044955.437 + 4 2 6 He 6 018885.891 + 3 3 6 Li 6 015122.88742 + 2 4 6 Be 6 019726.409 + 5 2 7 He 7 027990.654 + 4 3 7 Li 7 016003.43666 + 3 4 7 Be 7 016928.717 + 2 5 7 B 7 029712.000 + 6 2 8 He 8 033934.390 + 5 3 8 Li 8 022486.246 + 4 4 8 Be 8 005305.102 + 3 5 8 B 8 024607.316 + 2 6 8 C 8 037643.042 + 7 2 9 He 9 043946.419 + 6 3 9 Li 9 026790.191 + 5 4 9 Be 9 012183.066 + 4 5 9 B 9 013329.649 + 3 6 9 C 9 031037.207 + 8 2 10 He 10 052815.308 + 7 3 10 Li 10 035483.453 + 6 4 10 Be 10 013534.695 + 5 5 10 B 10 012936.862 + 4 6 10 C 10 016853.218 + 3 7 10 N 10 041653.543 + 8 3 11 Li 11 043723.581 + 7 4 11 Be 11 021661.081 + 6 5 11 B 11 009305.166 + 5 6 11 C 11 011432.597 + 4 7 11 N 11 026090.945 + 9 3 12 Li 12 052613.941 + 8 4 12 Be 12 026922.083 + 7 5 12 B 12 014352.638 + 6 6 12 C 12 000000.0 + 5 7 12 N 12 018613.182 + 4 8 12 O 12 034261.747 + 10 3 13 Li 13 061171.503 + 9 4 13 Be 13 036134.507 + 8 5 13 B 13 017779.981 + 7 6 13 C 13 003354.83521 + 6 7 13 N 13 005738.609 + 5 8 13 O 13 024815.437 + 10 4 14 Be 14 042892.920 + 9 5 14 B 14 025404.012 + 8 6 14 C 14 003241.98843 + 7 7 14 N 14 003074.00446 + 6 8 14 O 14 008596.706 + 5 9 14 F 14 034315.199 + 11 4 15 Be 15 053490.215 + 10 5 15 B 15 031087.953 + 9 6 15 C 15 010599.256 + 8 7 15 N 15 000108.89894 + 7 8 15 O 15 003065.618 + 6 9 15 F 15 017785.139 + 5 10 15 Ne 15 043172.980 + 12 4 16 Be 16 061672.036 + 11 5 16 B 16 039841.920 + 10 6 16 C 16 014701.256 + 9 7 16 N 16 006101.925 + 8 8 16 O 15 994914.61960 + 7 9 16 F 16 011465.723 + 6 10 16 Ne 16 025750.864 + 12 5 17 B 17 046931.399 + 11 6 17 C 17 022578.672 + 10 7 17 N 17 008448.877 + 9 8 17 O 16 999131.75664 + 8 9 17 F 17 002095.238 + 7 10 17 Ne 17 017713.959 + 6 11 17 Na 17 037760.000 + 13 5 18 B 18 055601.682 + 12 6 18 C 18 026751.932 + 11 7 18 N 18 014077.565 + 10 8 18 O 17 999159.61284 + 9 9 18 F 18 000937.325 + 8 10 18 Ne 18 005708.693 + 7 11 18 Na 18 026879.386 + 14 5 19 B 19 064166.000 + 13 6 19 C 19 034797.596 + 12 7 19 N 19 017022.419 + 11 8 19 O 19 003577.970 + 10 9 19 F 18 998403.16288 + 9 10 19 Ne 19 001880.903 + 8 11 19 Na 19 013880.272 + 7 12 19 Mg 19 034169.182 + 14 6 20 C 20 040261.732 + 13 7 20 N 20 023367.295 + 12 8 20 O 20 004075.358 + 11 9 20 F 19 999981.252 + 10 10 20 Ne 19 992440.17619 + 9 11 20 Na 20 007354.426 + 8 12 20 Mg 20 018763.075 + 14 7 21 N 21 027087.573 + 13 8 21 O 21 008654.950 + 12 9 21 F 20 999948.894 + 11 10 21 Ne 20 993846.685 + 10 11 21 Na 20 997654.702 + 9 12 21 Mg 21 011705.764 + 16 6 22 C 22 057553.990 + 15 7 22 N 22 034100.918 + 14 8 22 O 22 009965.746 + 13 9 22 F 22 002998.809 + 12 10 22 Ne 21 991385.109 + 11 11 22 Na 21 994437.418 + 10 12 22 Mg 21 999570.654 + 16 7 23 N 23 039421.000 + 15 8 23 O 23 015696.686 + 14 9 23 F 23 003526.874 + 13 10 23 Ne 22 994466.900 + 12 11 23 Na 22 989769.28199 + 11 12 23 Mg 22 994123.941 + 10 13 23 Al 23 007244.351 + 16 8 24 O 24 019861.000 + 15 9 24 F 24 008099.370 + 14 10 24 Ne 23 993610.645 + 13 11 24 Na 23 990963.011 + 12 12 24 Mg 23 985041.697 + 11 13 24 Al 23 999947.541 + 10 14 24 Si 24 011535.441 + 17 8 25 O 25 029338.919 + 16 9 25 F 25 012167.727 + 15 10 25 Ne 24 997814.799 + 14 11 25 Na 24 989953.973 + 13 12 25 Mg 24 985836.964 + 12 13 25 Al 24 990428.306 + 11 14 25 Si 25 004108.801 + 18 8 26 O 26 037210.155 + 17 9 26 F 26 020020.392 + 16 10 26 Ne 26 000516.496 + 15 11 26 Na 25 992634.649 + 14 12 26 Mg 25 982592.971 + 13 13 26 Al 25 986891.863 + 12 14 26 Si 25 992333.804 + 18 9 27 F 27 027322.000 + 17 10 27 Ne 27 007569.462 + 16 11 27 Na 26 994076.408 + 15 12 27 Mg 26 984340.628 + 14 13 27 Al 26 981538.408 + 13 14 27 Si 26 986704.688 + 12 15 27 P 26 999224.409 + 19 9 28 F 28 036223.095 + 18 10 28 Ne 28 012130.767 + 17 11 28 Na 27 998939.000 + 16 12 28 Mg 27 983876.606 + 15 13 28 Al 27 981910.087 + 14 14 28 Si 27 976926.53499 + 13 15 28 P 27 992326.585 + 12 16 28 S 28 004372.766 + 20 9 29 F 29 043103.000 + 19 10 29 Ne 29 019753.000 + 18 11 29 Na 29 002877.092 + 17 12 29 Mg 28 988617.393 + 16 13 29 Al 28 980453.164 + 15 14 29 Si 28 976494.66525 + 14 15 29 P 28 981800.368 + 13 16 29 S 28 996611.448 + 12 17 29 Cl 29 014130.178 + 20 10 30 Ne 30 024992.235 + 19 11 30 Na 30 009097.932 + 18 12 30 Mg 29 990462.826 + 17 13 30 Al 29 982968.388 + 16 14 30 Si 29 973770.136 + 15 15 30 P 29 978313.489 + 14 16 30 S 29 984906.769 + 12 18 30 Ar 30 022470.511 + 21 10 31 Ne 31 033474.816 + 20 11 31 Na 31 013146.656 + 19 12 31 Mg 30 996648.232 + 18 13 31 Al 30 983949.756 + 17 14 31 Si 30 975363.194 + 16 15 31 P 30 973761.99863 + 15 16 31 S 30 979557.007 + 14 17 31 Cl 30 992448.098 + 21 11 32 Na 32 020011.026 + 20 12 32 Mg 31 999110.139 + 19 13 32 Al 31 988084.339 + 18 14 32 Si 31 974151.539 + 17 15 32 P 31 973907.643 + 16 16 32 S 31 972071.17443 + 15 17 32 Cl 31 985684.637 + 14 18 32 Ar 31 997637.826 + 22 11 33 Na 33 025529.000 + 21 12 33 Mg 33 005327.245 + 20 13 33 Al 32 990877.687 + 19 14 33 Si 32 977976.964 + 18 15 33 P 32 971725.694 + 17 16 33 S 32 971458.90985 + 16 17 33 Cl 32 977451.989 + 15 18 33 Ar 32 989925.547 + 23 11 34 Na 34 034010.000 + 22 12 34 Mg 34 008935.481 + 21 13 34 Al 33 996779.057 + 20 14 34 Si 33 978575.437 + 19 15 34 P 33 973645.887 + 18 16 34 S 33 967867.012 + 17 17 34 Cl 33 973762.491 + 16 18 34 Ar 33 980270.093 + 23 12 35 Mg 35 016790.000 + 22 13 35 Al 34 999759.817 + 21 14 35 Si 34 984550.134 + 20 15 35 P 34 973314.053 + 19 16 35 S 34 969032.322 + 18 17 35 Cl 34 968852.694 + 17 18 35 Ar 34 975257.721 + 16 19 35 K 34 988005.407 + 24 12 36 Mg 36 021879.000 + 23 13 36 Al 36 006388.000 + 22 14 36 Si 35 986649.271 + 21 15 36 P 35 978259.619 + 20 16 36 S 35 967080.699 + 19 17 36 Cl 35 968306.822 + 18 18 36 Ar 35 967545.105 + 17 19 36 K 35 981302.010 + 16 20 36 Ca 35 993074.406 + 25 12 37 Mg 37 030286.265 + 24 13 37 Al 37 010531.000 + 23 14 37 Si 36 992945.191 + 22 15 37 P 36 979606.956 + 21 16 37 S 36 971125.507 + 20 17 37 Cl 36 965902.584 + 19 18 37 Ar 36 966776.314 + 18 19 37 K 36 973375.889 + 17 20 37 Ca 36 985897.852 + 25 13 38 Al 38 017402.000 + 24 14 38 Si 37 995523.000 + 23 15 38 P 37 984303.105 + 22 16 38 S 37 971163.310 + 21 17 38 Cl 37 968010.418 + 20 18 38 Ar 37 962732.104 + 19 19 38 K 37 969081.116 + 18 20 38 Ca 37 976319.226 + 25 14 39 Si 39 002491.000 + 24 15 39 P 38 986285.865 + 23 16 39 S 38 975133.852 + 22 17 39 Cl 38 968008.162 + 21 18 39 Ar 38 964313.039 + 20 19 39 K 38 963706.48661 + 19 20 39 Ca 38 970710.813 + 18 21 39 Sc 38 984784.970 + 26 14 40 Si 40 005829.000 + 25 15 40 P 39 991288.865 + 24 16 40 S 39 975482.562 + 23 17 40 Cl 39 970415.469 + 22 18 40 Ar 39 962383.12378 + 21 19 40 K 39 963998.166 + 20 20 40 Ca 39 962590.865 + 19 21 40 Sc 39 977967.292 + 18 22 40 Ti 39 990498.721 + 27 14 41 Si 41 013011.000 + 26 15 41 P 40 994654.000 + 25 16 41 S 40 979593.451 + 24 17 41 Cl 40 970684.525 + 23 18 41 Ar 40 964500.571 + 22 19 41 K 40 961825.25796 + 21 20 41 Ca 40 962277.921 + 20 21 41 Sc 40 969251.104 + 19 22 41 Ti 40 983148.000 + 27 15 42 P 42 001084.000 + 26 16 42 S 41 981065.100 + 25 17 42 Cl 41 973342.000 + 24 18 42 Ar 41 963045.736 + 23 19 42 K 41 962402.306 + 22 20 42 Ca 41 958617.828 + 21 21 42 Sc 41 965516.522 + 20 22 42 Ti 41 973049.022 + 28 15 43 P 43 005024.000 + 27 16 43 S 42 986907.635 + 26 17 43 Cl 42 974063.700 + 25 18 43 Ar 42 965636.055 + 24 19 43 K 42 960734.703 + 23 20 43 Ca 42 958766.430 + 22 21 43 Sc 42 961150.472 + 21 22 43 Ti 42 968522.521 + 20 23 43 V 42 980766.000 + 28 16 44 S 43 990118.848 + 27 17 44 Cl 43 978116.312 + 26 18 44 Ar 43 964923.816 + 25 19 44 K 43 961586.986 + 24 20 44 Ca 43 955481.543 + 23 21 44 Sc 43 959402.867 + 22 22 44 Ti 43 959689.951 + 21 23 44 V 43 974110.000 + 29 16 45 S 44 995717.000 + 28 17 45 Cl 44 980394.353 + 27 18 45 Ar 44 968039.733 + 26 19 45 K 44 960691.493 + 25 20 45 Ca 44 956186.326 + 24 21 45 Sc 44 955907.503 + 23 22 45 Ti 44 958121.211 + 22 23 45 V 44 965768.951 + 21 24 45 Cr 44 979050.000 + 29 17 46 Cl 45 985121.323 + 28 18 46 Ar 45 968037.446 + 27 19 46 K 45 961981.586 + 26 20 46 Ca 45 953687.988 + 25 21 46 Sc 45 955167.485 + 24 22 46 Ti 45 952626.856 + 23 23 46 V 45 960197.971 + 22 24 46 Cr 45 968360.970 + 29 18 47 Ar 46 972768.114 + 28 19 47 K 46 961661.614 + 27 20 47 Ca 46 954541.394 + 26 21 47 Sc 46 952402.704 + 25 22 47 Ti 46 951757.752 + 24 23 47 V 46 954904.038 + 23 24 47 Cr 46 962895.544 + 22 25 47 Mn 46 975774.000 + 30 18 48 Ar 47 976080.000 + 29 19 48 K 47 965341.186 + 28 20 48 Ca 47 952522.904 + 27 21 48 Sc 47 952223.157 + 26 22 48 Ti 47 947940.932 + 25 23 48 V 47 952251.229 + 24 24 48 Cr 47 954028.667 + 23 25 48 Mn 47 968549.085 + 30 19 49 K 48 968210.755 + 29 20 49 Ca 48 955662.875 + 28 21 49 Sc 48 950014.423 + 27 22 49 Ti 48 947864.627 + 26 23 49 V 48 948510.746 + 25 24 49 Cr 48 951332.955 + 24 25 49 Mn 48 959612.585 + 23 26 49 Fe 48 973429.000 + 31 19 50 K 49 972380.017 + 30 20 50 Ca 49 957499.217 + 29 21 50 Sc 49 952176.415 + 28 22 50 Ti 49 944785.839 + 27 23 50 V 49 947155.845 + 26 24 50 Cr 49 946041.443 + 25 25 50 Mn 49 954237.391 + 24 26 50 Fe 49 962988.000 + 32 19 51 K 50 975827.867 + 31 20 51 Ca 50 960995.665 + 30 21 51 Sc 50 953592.095 + 29 22 51 Ti 50 946609.600 + 28 23 51 V 50 943956.867 + 27 24 51 Cr 50 944764.652 + 26 25 51 Mn 50 948208.065 + 25 26 51 Fe 50 956840.779 + 24 27 51 Co 50 970647.000 + 33 19 52 K 51 981602.000 + 32 20 52 Ca 51 963213.648 + 31 21 52 Sc 51 956582.351 + 30 22 52 Ti 51 946891.960 + 29 23 52 V 51 944772.839 + 28 24 52 Cr 51 940504.992 + 27 25 52 Mn 51 945563.488 + 26 26 52 Fe 51 948115.217 + 25 27 52 Co 51 963112.000 + 34 19 53 K 52 986800.000 + 33 20 53 Ca 52 968451.000 + 32 21 53 Sc 52 958231.821 + 31 22 53 Ti 52 949724.785 + 30 23 53 V 52 944335.593 + 29 24 53 Cr 52 940646.961 + 28 25 53 Mn 52 941287.742 + 27 26 53 Fe 52 945305.574 + 26 27 53 Co 52 954203.217 + 25 28 53 Ni 52 968190.000 + 34 20 54 Ca 53 972989.000 + 33 21 54 Sc 53 963616.620 + 32 22 54 Ti 53 951022.786 + 31 23 54 V 53 946437.472 + 30 24 54 Cr 53 938878.012 + 29 25 54 Mn 53 940356.429 + 28 26 54 Fe 53 939608.306 + 27 27 54 Co 53 948459.192 + 26 28 54 Ni 53 957833.000 + 34 21 55 Sc 54 967622.601 + 33 22 55 Ti 54 955267.465 + 32 23 55 V 54 947241.114 + 31 24 55 Cr 54 940837.289 + 30 25 55 Mn 54 938043.172 + 29 26 55 Fe 54 938291.283 + 28 27 55 Co 54 941996.531 + 27 28 55 Ni 54 951329.961 + 26 29 55 Cu 54 966038.000 + 35 21 56 Sc 55 973320.000 + 34 22 56 Ti 55 957788.190 + 33 23 56 V 55 950450.694 + 32 24 56 Cr 55 940649.107 + 31 25 56 Mn 55 938902.947 + 30 26 56 Fe 55 934935.617 + 29 27 56 Co 55 939838.150 + 28 28 56 Ni 55 942127.872 + 27 29 56 Cu 55 958515.000 + 36 21 57 Sc 56 977460.000 + 35 22 57 Ti 56 963590.068 + 34 23 57 V 56 952320.197 + 33 24 57 Cr 56 943612.409 + 32 25 57 Mn 56 938285.968 + 31 26 57 Fe 56 935392.134 + 30 27 57 Co 56 936289.913 + 29 28 57 Ni 56 939791.525 + 28 29 57 Cu 56 949211.819 + 35 23 58 V 57 956626.932 + 34 24 58 Cr 57 944184.502 + 33 25 58 Mn 57 940066.646 + 32 26 58 Fe 57 933273.738 + 31 27 58 Co 57 935751.429 + 30 28 58 Ni 57 935341.780 + 29 29 58 Cu 57 944532.413 + 28 30 58 Zn 57 954590.428 + 36 23 59 V 58 959385.659 + 35 24 59 Cr 58 948377.810 + 34 25 59 Mn 58 940391.113 + 33 26 59 Fe 58 934873.649 + 32 27 59 Co 58 933193.656 + 31 28 59 Ni 58 934345.571 + 30 29 59 Cu 58 939496.844 + 29 30 59 Zn 58 949312.017 + 37 23 60 V 59 964313.290 + 36 24 60 Cr 59 949898.146 + 35 25 60 Mn 59 943136.576 + 34 26 60 Fe 59 934070.411 + 33 27 60 Co 59 933815.667 + 32 28 60 Ni 59 930785.256 + 31 29 60 Cu 59 937363.916 + 30 30 60 Zn 59 941841.450 + 38 23 61 V 60 967250.000 + 37 24 61 Cr 60 954400.963 + 36 25 61 Mn 60 944452.544 + 35 26 61 Fe 60 936746.244 + 34 27 61 Co 60 932476.145 + 33 28 61 Ni 60 931054.945 + 32 29 61 Cu 60 933457.371 + 31 30 61 Zn 60 939506.960 + 30 31 61 Ga 60 949398.859 + 38 24 62 Cr 61 956097.451 + 37 25 62 Mn 61 947907.386 + 36 26 62 Fe 61 936791.812 + 35 27 62 Co 61 934058.317 + 34 28 62 Ni 61 928344.871 + 33 29 62 Cu 61 932594.921 + 32 30 62 Zn 61 934333.477 + 31 31 62 Ga 61 944189.757 + 39 24 63 Cr 62 961344.384 + 38 25 63 Mn 62 949664.675 + 37 26 63 Fe 62 940272.700 + 36 27 63 Co 62 933599.744 + 35 28 63 Ni 62 929669.139 + 34 29 63 Cu 62 929597.236 + 33 30 63 Zn 62 933211.167 + 32 31 63 Ga 62 939294.195 + 31 32 63 Ge 62 949628.000 + 40 24 64 Cr 63 964058.000 + 39 25 64 Mn 63 953849.370 + 38 26 64 Fe 63 940987.763 + 37 27 64 Co 63 935810.291 + 36 28 64 Ni 63 927966.341 + 35 29 64 Cu 63 929763.857 + 34 30 64 Zn 63 929141.772 + 33 31 64 Ga 63 936840.365 + 32 32 64 Ge 63 941689.913 + 40 25 65 Mn 64 956019.750 + 39 26 65 Fe 64 945015.324 + 38 27 65 Co 64 936462.073 + 37 28 65 Ni 64 930084.697 + 36 29 65 Cu 64 927789.487 + 35 30 65 Zn 64 929240.532 + 34 31 65 Ga 64 932734.395 + 33 32 65 Ge 64 939368.137 + 32 33 65 As 64 949611.000 + 41 25 66 Mn 65 960546.834 + 40 26 66 Fe 65 946249.960 + 39 27 66 Co 65 939442.945 + 38 28 66 Ni 65 929139.334 + 37 29 66 Cu 65 928868.814 + 36 30 66 Zn 65 926033.704 + 35 31 66 Ga 65 931589.832 + 34 32 66 Ge 65 933862.126 + 33 33 66 As 65 944148.779 + 41 26 67 Fe 66 951035.482 + 40 27 67 Co 66 940609.628 + 39 28 67 Ni 66 931569.414 + 38 29 67 Cu 66 927729.526 + 37 30 67 Zn 66 927127.482 + 36 31 67 Ga 66 928202.384 + 35 32 67 Ge 66 932733.620 + 34 33 67 As 66 939251.111 + 33 34 67 Se 66 949994.000 + 42 26 68 Fe 67 953314.875 + 41 27 68 Co 67 944250.135 + 40 28 68 Ni 67 931868.789 + 39 29 68 Cu 67 929610.889 + 38 30 68 Zn 67 924844.291 + 37 31 68 Ga 67 927980.221 + 36 32 68 Ge 67 928095.308 + 35 33 68 As 67 936774.130 + 34 34 68 Se 67 941825.239 + 42 27 69 Co 68 946023.102 + 41 28 69 Ni 68 935610.268 + 40 29 69 Cu 68 929429.268 + 39 30 69 Zn 68 926550.418 + 38 31 69 Ga 68 925573.531 + 37 32 69 Ge 68 927964.471 + 36 33 69 As 68 932246.294 + 35 34 69 Se 68 939414.847 + 34 35 69 Br 68 950338.413 + 42 28 70 Ni 69 936431.303 + 41 29 70 Cu 69 932392.079 + 40 30 70 Zn 69 925319.181 + 39 31 70 Ga 69 926021.917 + 38 32 70 Ge 69 924248.706 + 37 33 70 As 69 930926.151 + 36 34 70 Se 69 933515.523 + 35 35 70 Br 69 944792.323 + 44 27 71 Co 70 952366.923 + 43 28 71 Ni 70 940518.964 + 42 29 71 Cu 70 932676.832 + 41 30 71 Zn 70 927719.580 + 40 31 71 Ga 70 924702.536 + 39 32 71 Ge 70 924952.284 + 38 33 71 As 70 927113.758 + 37 34 71 Se 70 932209.432 + 36 35 71 Br 70 939342.156 + 35 36 71 Kr 70 950265.696 + 44 28 72 Ni 71 941785.926 + 43 29 72 Cu 71 935820.307 + 42 30 72 Zn 71 926842.807 + 41 31 72 Ga 71 926367.434 + 40 32 72 Ge 71 922075.826 + 39 33 72 As 71 926752.295 + 38 34 72 Se 71 927140.507 + 37 35 72 Br 71 936594.607 + 36 36 72 Kr 71 942092.407 + 45 28 73 Ni 72 946206.683 + 44 29 73 Cu 72 936674.378 + 43 30 73 Zn 72 929582.582 + 42 31 73 Ga 72 925174.682 + 41 32 73 Ge 72 923458.956 + 40 33 73 As 72 923829.089 + 39 34 73 Se 72 926754.883 + 38 35 73 Br 72 931671.621 + 37 36 73 Kr 72 939289.195 + 45 29 74 Cu 73 939874.862 + 44 30 74 Zn 73 929407.262 + 43 31 74 Ga 73 926945.726 + 42 32 74 Ge 73 921177.762 + 41 33 74 As 73 923928.598 + 40 34 74 Se 73 922475.935 + 39 35 74 Br 73 929910.281 + 38 36 74 Kr 73 933084.017 + 37 37 74 Rb 73 944265.868 + 46 29 75 Cu 74 941522.606 + 45 30 75 Zn 74 932840.246 + 44 31 75 Ga 74 926500.246 + 43 32 75 Ge 74 922858.371 + 42 33 75 As 74 921594.562 + 41 34 75 Se 74 922522.871 + 40 35 75 Br 74 925810.570 + 39 36 75 Kr 74 930945.746 + 38 37 75 Rb 74 938573.201 + 37 38 75 Sr 74 949952.770 + 47 29 76 Cu 75 945275.025 + 46 30 76 Zn 75 933114.957 + 45 31 76 Ga 75 928827.625 + 44 32 76 Ge 75 921402.726 + 43 33 76 As 75 922392.010 + 42 34 76 Se 75 919213.704 + 41 35 76 Br 75 924541.577 + 40 36 76 Kr 75 925910.726 + 39 37 76 Rb 75 935073.032 + 38 38 76 Sr 75 941762.761 + 47 30 77 Zn 76 936887.199 + 46 31 77 Ga 76 929154.300 + 45 32 77 Ge 76 923549.844 + 44 33 77 As 76 920647.564 + 43 34 77 Se 76 919914.150 + 42 35 77 Br 76 921379.194 + 41 36 77 Kr 76 924670.000 + 40 37 77 Rb 76 930401.600 + 39 38 77 Sr 76 937945.455 + 49 29 78 Cu 77 952230.000 + 48 30 78 Zn 77 938289.205 + 47 31 78 Ga 77 931608.845 + 46 32 78 Ge 77 922852.912 + 45 33 78 As 77 921827.795 + 44 34 78 Se 77 917309.243 + 43 35 78 Br 77 921145.859 + 42 36 78 Kr 77 920366.341 + 41 37 78 Rb 77 928141.868 + 40 38 78 Sr 77 932179.980 + 49 30 79 Zn 78 942638.068 + 48 31 79 Ga 78 932852.301 + 47 32 79 Ge 78 925360.129 + 46 33 79 As 78 920948.445 + 45 34 79 Se 78 918499.251 + 44 35 79 Br 78 918337.601 + 43 36 79 Kr 78 920082.945 + 42 37 79 Rb 78 923989.864 + 41 38 79 Sr 78 929707.664 + 40 39 79 Y 78 937930.000 + 50 30 80 Zn 79 944552.930 + 49 31 80 Ga 79 936420.774 + 48 32 80 Ge 79 925350.774 + 47 33 80 As 79 922474.548 + 46 34 80 Se 79 916521.785 + 45 35 80 Br 79 918529.810 + 44 36 80 Kr 79 916378.048 + 43 37 80 Rb 79 922516.444 + 42 38 80 Sr 79 924517.540 + 41 39 80 Y 79 934354.755 + 51 30 81 Zn 80 950402.619 + 50 31 81 Ga 80 938133.842 + 49 32 81 Ge 80 928832.942 + 48 33 81 As 80 922132.290 + 47 34 81 Se 80 917993.044 + 46 35 81 Br 80 916288.206 + 45 36 81 Kr 80 916589.714 + 44 37 81 Rb 80 918993.927 + 43 38 81 Sr 80 923211.394 + 42 39 81 Y 80 929454.283 + 41 40 81 Zr 80 938314.000 + 52 30 82 Zn 81 954574.099 + 51 31 82 Ga 81 943176.533 + 50 32 82 Ge 81 929774.033 + 49 33 82 As 81 924738.733 + 48 34 82 Se 81 916699.537 + 47 35 82 Br 81 916801.760 + 46 36 82 Kr 81 913481.15520 + 45 37 82 Rb 81 918209.024 + 44 38 82 Sr 81 918399.847 + 43 39 82 Y 81 926930.188 + 42 40 82 Zr 81 931689.000 + 52 31 83 Ga 82 947120.301 + 51 32 83 Ge 82 934539.101 + 50 33 83 As 82 925206.901 + 49 34 83 Se 82 919118.609 + 48 35 83 Br 82 915175.289 + 47 36 83 Kr 82 914126.518 + 46 37 83 Rb 82 915114.182 + 45 38 83 Sr 82 917554.374 + 44 39 83 Y 82 922484.025 + 43 40 83 Zr 82 929240.925 + 42 41 83 Nb 82 938211.000 + 52 32 84 Ge 83 937575.091 + 51 33 84 As 83 929303.291 + 50 34 84 Se 83 918466.762 + 49 35 84 Br 83 916496.419 + 48 36 84 Kr 83 911497.72863 + 47 37 84 Rb 83 914375.225 + 46 38 84 Sr 83 913419.120 + 45 39 84 Y 83 920671.061 + 44 40 84 Zr 83 923325.662 + 43 41 84 Nb 83 934279.000 + 53 32 85 Ge 84 942969.659 + 52 33 85 As 84 932163.659 + 51 34 85 Se 84 922260.759 + 50 35 85 Br 84 915645.759 + 49 36 85 Kr 84 912527.262 + 48 37 85 Rb 84 911789.73760 + 47 38 85 Sr 84 912932.043 + 46 39 85 Y 84 916433.039 + 45 40 85 Zr 84 921443.198 + 44 41 85 Nb 84 928845.837 + 43 42 85 Mo 84 938260.737 + 54 32 86 Ge 85 946967.000 + 53 33 86 As 85 936701.533 + 52 34 86 Se 85 924311.733 + 51 35 86 Br 85 918805.433 + 50 36 86 Kr 85 910610.62627 + 49 37 86 Rb 85 911167.443 + 48 38 86 Sr 85 909260.72631 + 47 39 86 Y 85 914886.098 + 46 40 86 Zr 85 916296.815 + 45 41 86 Nb 85 925781.535 + 44 42 86 Mo 85 931174.817 + 54 33 87 As 86 940291.718 + 53 34 87 Se 86 928688.618 + 52 35 87 Br 86 920674.018 + 51 36 87 Kr 86 913354.759 + 50 37 87 Rb 86 909180.531 + 49 38 87 Sr 86 908877.49615 + 48 39 87 Y 86 910876.102 + 47 40 87 Zr 86 914817.339 + 46 41 87 Nb 86 920692.472 + 45 42 87 Mo 86 928196.201 + 44 43 87 Tc 86 938067.187 + 54 34 88 Se 87 931417.491 + 53 35 88 Br 87 924083.291 + 52 36 88 Kr 87 914447.881 + 51 37 88 Rb 87 911315.591 + 50 38 88 Sr 87 905612.25561 + 49 39 88 Y 87 909501.276 + 48 40 88 Zr 87 910220.709 + 47 41 88 Nb 87 918224.287 + 46 42 88 Mo 87 921967.781 + 45 43 88 Tc 87 933782.381 + 55 34 89 Se 88 936669.059 + 54 35 89 Br 88 926704.559 + 53 36 89 Kr 88 917835.450 + 52 37 89 Rb 88 912278.137 + 51 38 89 Sr 88 907450.808 + 50 39 89 Y 88 905841.205 + 49 40 89 Zr 88 908882.332 + 48 41 89 Nb 88 913445.272 + 47 42 89 Mo 88 919468.150 + 46 43 89 Tc 88 927648.650 + 56 34 90 Se 89 940096.000 + 55 35 90 Br 89 931292.850 + 54 36 90 Kr 89 919527.930 + 53 37 90 Rb 89 914798.803 + 52 38 90 Sr 89 907730.885 + 51 39 90 Y 89 907144.800 + 50 40 90 Zr 89 904698.758 + 49 41 90 Nb 89 911259.204 + 48 42 90 Mo 89 913931.272 + 47 43 90 Tc 89 924073.921 + 46 44 90 Ru 89 930344.379 + 57 34 91 Se 90 945700.000 + 56 35 91 Br 90 934398.618 + 55 36 91 Kr 90 923806.310 + 54 37 91 Rb 90 916537.265 + 53 38 91 Sr 90 910195.958 + 52 39 91 Y 90 907298.066 + 51 40 91 Zr 90 905640.223 + 50 41 91 Nb 90 906990.274 + 49 42 91 Mo 90 911745.195 + 48 43 91 Tc 90 918424.975 + 47 44 91 Ru 90 926741.532 + 57 35 92 Br 91 939631.597 + 56 36 92 Kr 91 926173.094 + 55 37 92 Rb 91 919728.481 + 54 38 92 Sr 91 911038.224 + 53 39 92 Y 91 908945.745 + 52 40 92 Zr 91 905035.322 + 51 41 92 Nb 91 907188.568 + 50 42 92 Mo 91 906807.155 + 49 43 92 Tc 91 915269.779 + 48 44 92 Ru 91 920234.375 + 47 45 92 Rh 91 932367.694 + 58 35 93 Br 92 943220.000 + 57 36 93 Kr 92 931147.174 + 56 37 93 Rb 92 922039.325 + 55 38 93 Sr 92 914024.311 + 54 39 93 Y 92 909578.422 + 53 40 93 Zr 92 906470.646 + 52 41 93 Nb 92 906373.161 + 51 42 93 Mo 92 906808.773 + 50 43 93 Tc 92 910245.149 + 49 44 93 Ru 92 917104.444 + 48 45 93 Rh 92 925912.781 + 58 36 94 Kr 93 934140.454 + 57 37 94 Rb 93 926394.818 + 56 38 94 Sr 93 915355.643 + 55 39 94 Y 93 911592.063 + 54 40 94 Zr 93 906312.524 + 53 41 94 Nb 93 907278.992 + 52 42 94 Mo 93 905083.592 + 51 43 94 Tc 93 909652.325 + 50 44 94 Ru 93 911342.863 + 49 45 94 Rh 93 921730.453 + 48 46 94 Pd 93 929036.292 + 59 36 95 Kr 94 939710.923 + 58 37 95 Rb 94 929262.568 + 57 38 95 Sr 94 919355.840 + 56 39 95 Y 94 912818.711 + 55 40 95 Zr 94 908040.267 + 54 41 95 Nb 94 906831.115 + 53 42 95 Mo 94 905837.442 + 52 43 95 Tc 94 907652.287 + 51 44 95 Ru 94 910404.420 + 50 45 95 Rh 94 915897.895 + 49 46 95 Pd 94 924888.512 + 60 36 96 Kr 95 943016.618 + 59 37 96 Rb 95 934133.393 + 58 38 96 Sr 95 921712.692 + 57 39 96 Y 95 915902.953 + 56 40 96 Zr 95 908277.621 + 55 41 96 Nb 95 908101.591 + 54 42 96 Mo 95 904674.774 + 53 43 96 Tc 95 907866.681 + 52 44 96 Ru 95 907588.914 + 51 45 96 Rh 95 914451.710 + 50 46 96 Pd 95 918213.744 + 49 47 96 Ag 95 930743.906 + 61 36 97 Kr 96 949088.784 + 60 37 97 Rb 96 937177.118 + 59 38 97 Sr 96 926374.776 + 58 39 97 Y 96 918280.286 + 57 40 97 Zr 96 910957.386 + 56 41 97 Nb 96 908098.414 + 55 42 97 Mo 96 906016.903 + 54 43 97 Tc 96 906360.723 + 53 44 97 Ru 96 907545.779 + 52 45 97 Rh 96 911327.876 + 51 46 97 Pd 96 916471.987 + 50 47 97 Ag 96 923965.326 + 61 37 98 Rb 97 941632.317 + 60 38 98 Sr 97 928691.860 + 59 39 98 Y 97 922388.360 + 58 40 98 Zr 97 912735.124 + 57 41 98 Nb 97 910332.650 + 56 42 98 Mo 97 905403.608 + 55 43 98 Tc 97 907211.205 + 54 44 98 Ru 97 905286.713 + 53 45 98 Rh 97 910707.740 + 52 46 98 Pd 97 912698.337 + 51 47 98 Ag 97 921559.972 + 50 48 98 Cd 97 927389.317 + 62 37 99 Rb 98 945119.192 + 61 38 99 Sr 98 932880.511 + 60 39 99 Y 98 924154.288 + 59 40 99 Zr 98 916670.835 + 58 41 99 Nb 98 911609.371 + 57 42 99 Mo 98 907707.298 + 56 43 99 Tc 98 906249.678 + 55 44 99 Ru 98 905930.278 + 54 45 99 Rh 98 908124.690 + 53 46 99 Pd 98 911773.290 + 52 47 99 Ag 98 917645.768 + 51 48 99 Cd 98 924925.847 + 63 37 100 Rb 99 950351.731 + 62 38 100 Sr 99 935779.615 + 61 39 100 Y 99 927721.063 + 60 40 100 Zr 99 918005.444 + 59 41 100 Nb 99 914333.963 + 58 42 100 Mo 99 907467.976 + 57 43 100 Tc 99 907652.711 + 56 44 100 Ru 99 904210.452 + 55 45 100 Rh 99 908114.141 + 54 46 100 Pd 99 908520.315 + 53 47 100 Ag 99 916115.445 + 52 48 100 Cd 99 920348.820 + 51 49 100 In 99 930957.180 + 50 50 100 Sn 99 938504.196 + 63 38 101 Sr 100 940606.266 + 62 39 101 Y 100 930154.138 + 61 40 101 Zr 100 921453.110 + 60 41 101 Nb 100 915306.496 + 59 42 101 Mo 100 910337.641 + 58 43 101 Tc 100 907305.260 + 57 44 101 Ru 100 905573.075 + 56 45 101 Rh 100 906158.905 + 55 46 101 Pd 100 908284.828 + 54 47 101 Ag 100 912683.953 + 53 48 101 Cd 100 918586.211 + 51 50 101 Sn 100 935259.244 + 64 38 102 Sr 101 944004.680 + 63 39 102 Y 101 934327.889 + 62 40 102 Zr 101 923147.431 + 61 41 102 Nb 101 918083.697 + 60 42 102 Mo 101 910288.138 + 59 43 102 Tc 101 909207.275 + 58 44 102 Ru 101 904340.300 + 57 45 102 Rh 101 906834.270 + 56 46 102 Pd 101 905632.058 + 55 47 102 Ag 101 911704.540 + 54 48 102 Cd 101 914481.799 + 53 49 102 In 101 924105.916 + 52 50 102 Sn 101 930289.530 + 64 39 103 Y 102 937243.208 + 63 40 103 Zr 102 927197.240 + 62 41 103 Nb 102 919453.403 + 61 42 103 Mo 102 913085.140 + 60 43 103 Tc 102 909174.008 + 59 44 103 Ru 102 906314.833 + 58 45 103 Rh 102 905494.068 + 57 46 103 Pd 102 906110.840 + 56 47 103 Ag 102 908960.560 + 55 48 103 Cd 102 913416.923 + 54 49 103 In 102 919878.613 + 53 50 103 Sn 102 928101.962 + 64 40 104 Zr 103 929442.315 + 63 41 104 Nb 103 922899.115 + 62 42 104 Mo 103 913740.756 + 61 43 104 Tc 103 911428.905 + 60 44 104 Ru 103 905425.360 + 59 45 104 Rh 103 906645.295 + 58 46 104 Pd 103 904030.401 + 57 47 104 Ag 103 908623.725 + 56 48 104 Cd 103 909856.230 + 55 49 104 In 103 918214.540 + 54 50 104 Sn 103 923105.197 + 53 51 104 Sb 103 936474.502 + 66 39 105 Y 104 944959.000 + 65 40 105 Zr 104 934014.890 + 64 41 105 Nb 104 924942.564 + 63 42 105 Mo 104 916975.159 + 62 43 105 Tc 104 911657.952 + 61 44 105 Ru 104 907745.525 + 60 45 105 Rh 104 905687.806 + 59 46 105 Pd 104 905079.487 + 58 47 105 Ag 104 906525.607 + 57 48 105 Cd 104 909463.895 + 56 49 105 In 104 914502.324 + 55 50 105 Sn 104 921268.423 + 54 51 105 Sb 104 931276.549 + 53 52 105 Te 104 943304.508 + 66 40 106 Zr 105 937144.000 + 65 41 106 Nb 105 928927.768 + 64 42 106 Mo 105 918266.218 + 63 43 106 Tc 105 914356.697 + 62 44 106 Ru 105 907328.203 + 61 45 106 Rh 105 907285.901 + 60 46 106 Pd 105 903480.293 + 59 47 106 Ag 105 906663.507 + 58 48 106 Cd 105 906459.797 + 57 49 106 In 105 913463.603 + 56 50 106 Sn 105 916957.396 + 55 51 106 Sb 105 928637.982 + 54 52 106 Te 105 937498.526 + 67 40 107 Zr 106 941621.000 + 66 41 107 Nb 106 931589.672 + 65 42 107 Mo 106 922112.692 + 64 43 107 Tc 106 915458.485 + 63 44 107 Ru 106 909969.885 + 62 45 107 Rh 106 906747.974 + 61 46 107 Pd 106 905128.064 + 60 47 107 Ag 106 905091.531 + 59 48 107 Cd 106 906612.108 + 58 49 107 In 106 910290.071 + 57 50 107 Sn 106 915713.651 + 56 51 107 Sb 106 924150.624 + 55 52 107 Te 106 935008.356 + 67 41 108 Nb 107 936074.988 + 66 42 108 Mo 107 924040.367 + 65 43 108 Tc 107 918493.541 + 64 44 108 Ru 107 910185.841 + 63 45 108 Rh 107 908714.688 + 62 46 108 Pd 107 903891.805 + 61 47 108 Ag 107 905950.266 + 60 48 108 Cd 107 904183.587 + 59 49 108 In 107 909693.655 + 58 50 108 Sn 107 911894.292 + 57 51 108 Sb 107 922226.734 + 56 52 108 Te 107 929380.471 + 55 53 108 I 107 943478.321 + 68 41 109 Nb 108 939141.000 + 67 42 109 Mo 108 928431.106 + 66 43 109 Tc 108 920254.156 + 65 44 109 Ru 108 913323.756 + 64 45 109 Rh 108 908749.326 + 63 46 109 Pd 108 905950.574 + 62 47 109 Ag 108 904755.773 + 61 48 109 Cd 108 904986.698 + 60 49 109 In 108 907149.685 + 59 50 109 Sn 108 911292.843 + 58 51 109 Sb 108 918141.204 + 57 52 109 Te 108 927304.534 + 56 53 109 I 108 938086.025 + 55 54 109 Xe 108 950434.948 + 69 41 110 Nb 109 943843.000 + 68 42 110 Mo 109 930710.680 + 67 43 110 Tc 109 923741.312 + 66 44 110 Ru 109 914038.548 + 65 45 110 Rh 109 911079.742 + 64 46 110 Pd 109 905172.868 + 63 47 110 Ag 109 906110.719 + 62 48 110 Cd 109 903007.460 + 61 49 110 In 109 907170.665 + 60 50 110 Sn 109 907844.835 + 59 51 110 Sb 109 916854.286 + 58 52 110 Te 109 922458.104 + 57 53 110 I 109 935089.033 + 56 54 110 Xe 109 944258.765 + 69 42 111 Mo 110 935652.016 + 68 43 111 Tc 110 925899.016 + 67 44 111 Ru 110 917567.616 + 66 45 111 Rh 110 911642.531 + 65 46 111 Pd 110 907690.347 + 64 47 111 Ag 110 905296.816 + 63 48 111 Cd 110 904183.766 + 62 49 111 In 110 905107.233 + 61 50 111 Sn 110 907741.126 + 60 51 111 Sb 110 913218.189 + 59 52 111 Te 110 921000.589 + 58 53 111 I 110 930269.239 + 57 54 111 Xe 110 941603.989 + 69 43 112 Tc 111 929941.644 + 68 44 112 Ru 111 918806.972 + 67 45 112 Rh 111 914404.705 + 66 46 112 Pd 111 907329.986 + 65 47 112 Ag 111 907048.550 + 64 48 112 Cd 111 902763.883 + 63 49 112 In 111 905538.704 + 62 50 112 Sn 111 904824.877 + 61 51 112 Sb 111 912399.903 + 60 52 112 Te 111 916727.850 + 59 53 112 I 111 928004.550 + 58 54 112 Xe 111 935559.071 + 57 55 112 Cs 111 950305.341 + 70 43 113 Tc 112 932569.033 + 69 44 113 Ru 112 922846.396 + 68 45 113 Rh 112 915439.567 + 67 46 113 Pd 112 910261.267 + 66 47 113 Ag 112 906572.858 + 65 48 113 Cd 112 904408.097 + 64 49 113 In 112 904060.448 + 63 50 113 Sn 112 905175.845 + 62 51 113 Sb 112 909374.652 + 61 52 113 Te 112 915891.000 + 60 53 113 I 112 923650.064 + 59 54 113 Xe 112 933221.666 + 58 55 113 Cs 112 944428.488 + 71 43 114 Tc 113 937090.000 + 70 44 114 Ru 113 924613.780 + 69 45 114 Rh 113 918721.296 + 68 46 114 Pd 113 910368.780 + 67 47 114 Ag 113 908823.031 + 66 48 114 Cd 113 903364.990 + 65 49 114 In 113 904916.402 + 64 50 114 Sn 113 902780.132 + 63 51 114 Sb 113 909289.191 + 62 52 114 Te 113 912089.000 + 60 54 114 Xe 113 927980.331 + 59 55 114 Cs 113 941296.175 + 58 56 114 Ba 113 950718.495 + 72 43 115 Tc 114 939538.000 + 71 44 115 Ru 114 928942.393 + 70 45 115 Rh 114 920310.993 + 69 46 115 Pd 114 913658.718 + 68 47 115 Ag 114 908767.363 + 67 48 115 Cd 114 905437.417 + 66 49 115 In 114 903878.773 + 65 50 115 Sn 114 903344.697 + 64 51 115 Sb 114 906598.000 + 63 52 115 Te 114 911902.000 + 62 53 115 I 114 918048.000 + 61 54 115 Xe 114 926293.945 + 72 44 116 Ru 115 931219.193 + 71 45 116 Rh 115 924061.645 + 70 46 116 Pd 115 914297.210 + 69 47 116 Ag 115 911386.812 + 68 48 116 Cd 115 904763.230 + 67 49 116 In 115 905259.992 + 66 50 116 Sn 115 901742.824 + 65 51 116 Sb 115 906792.583 + 64 52 116 Te 115 908460.000 + 63 53 116 I 115 916808.658 + 62 54 116 Xe 115 921581.112 + 73 44 117 Ru 116 936135.000 + 72 45 117 Rh 116 926035.623 + 71 46 117 Pd 116 917954.944 + 70 47 117 Ag 116 911773.974 + 69 48 117 Cd 116 907226.038 + 68 49 117 In 116 904515.712 + 67 50 117 Sn 116 902954.017 + 66 51 117 Sb 116 904841.535 + 65 52 117 Te 116 908646.313 + 64 53 117 I 116 913648.314 + 63 54 117 Xe 116 920358.760 + 62 55 117 Cs 116 928616.726 + 61 56 117 Ba 116 938316.561 + 73 45 118 Rh 117 930340.443 + 72 46 118 Pd 117 919066.847 + 71 47 118 Ag 117 914595.487 + 70 48 118 Cd 117 906921.955 + 69 49 118 In 117 906356.659 + 68 50 118 Sn 117 901606.609 + 67 51 118 Sb 117 905532.174 + 66 52 118 Te 117 905853.839 + 65 53 118 I 117 913074.000 + 64 54 118 Xe 117 916178.680 + 63 55 118 Cs 117 926559.519 + 74 45 119 Rh 118 932556.952 + 73 46 119 Pd 118 923340.459 + 72 47 119 Ag 118 915570.293 + 71 48 119 Cd 118 909846.903 + 70 49 119 In 118 905850.944 + 69 50 119 Sn 118 903311.216 + 68 51 119 Sb 118 903945.512 + 67 52 119 Te 118 906407.148 + 66 53 119 I 118 910074.000 + 65 54 119 Xe 118 915410.713 + 64 55 119 Cs 118 922377.330 + 63 56 119 Ba 118 930659.686 + 74 46 120 Pd 119 924551.258 + 73 47 120 Ag 119 918784.767 + 72 48 120 Cd 119 909868.067 + 71 49 120 In 119 907966.805 + 70 50 120 Sn 119 902201.873 + 69 51 120 Sb 119 905079.624 + 68 52 120 Te 119 904059.514 + 67 53 120 I 119 910087.465 + 66 54 120 Xe 119 911784.270 + 65 55 120 Cs 119 920677.279 + 64 56 120 Ba 119 926045.000 + 76 45 121 Rh 120 939613.000 + 75 46 121 Pd 120 928950.343 + 74 47 121 Ag 120 920125.282 + 73 48 121 Cd 120 912963.663 + 72 49 121 In 120 907851.286 + 71 50 121 Sn 120 904242.792 + 70 51 121 Sb 120 903810.093 + 69 52 121 Te 120 904942.488 + 68 53 121 I 120 907405.255 + 67 54 121 Xe 120 911453.014 + 66 55 121 Cs 120 917227.238 + 65 56 121 Ba 120 924052.289 + 76 46 122 Pd 121 930631.694 + 75 47 122 Ag 121 923664.448 + 74 48 122 Cd 121 913459.052 + 73 49 122 In 121 910280.966 + 72 50 122 Sn 121 903444.001 + 71 51 122 Sb 121 905168.074 + 70 52 122 Te 121 903043.434 + 69 53 122 I 121 907588.820 + 68 54 122 Xe 121 908367.658 + 67 55 122 Cs 121 916108.145 + 66 56 122 Ba 121 919904.000 + 77 46 123 Pd 122 935126.000 + 76 47 123 Ag 122 925337.062 + 75 48 123 Cd 122 916892.453 + 74 49 123 In 122 910433.826 + 73 50 123 Sn 122 905725.446 + 72 51 123 Sb 122 904214.016 + 71 52 123 Te 122 904269.747 + 70 53 123 I 122 905588.520 + 69 54 123 Xe 122 908481.750 + 68 55 123 Cs 122 912996.062 + 67 56 123 Ba 122 918781.062 + 77 47 124 Ag 123 928931.229 + 76 48 124 Cd 123 917657.363 + 75 49 124 In 123 913182.263 + 74 50 124 Sn 123 905276.692 + 73 51 124 Sb 123 905935.789 + 72 52 124 Te 123 902817.064 + 71 53 124 I 123 906209.021 + 70 54 124 Xe 123 905891.588 + 69 55 124 Cs 123 912257.798 + 68 56 124 Ba 123 915093.629 + 67 57 124 La 123 924574.275 + 78 47 125 Ag 124 930735.000 + 77 48 125 Cd 124 921257.577 + 76 49 125 In 124 913604.591 + 75 50 125 Sn 124 907786.442 + 74 51 125 Sb 124 905252.987 + 73 52 125 Te 124 904429.900 + 72 53 125 I 124 904629.333 + 71 54 125 Xe 124 906394.050 + 70 55 125 Cs 124 909727.867 + 69 56 125 Ba 124 914471.843 + 68 57 125 La 124 920815.932 + 78 48 126 Cd 125 922429.127 + 77 49 126 In 125 916507.344 + 76 50 126 Sn 125 907658.836 + 75 51 126 Sb 125 907253.036 + 74 52 126 Te 125 903310.866 + 73 53 126 I 125 905623.313 + 72 54 126 Xe 125 904296.794 + 71 55 126 Cs 125 909445.655 + 70 56 126 Ba 125 911250.204 + 69 57 126 La 125 919512.667 + 68 58 126 Ce 125 923971.000 + 79 48 127 Cd 126 926196.624 + 78 49 127 In 126 917448.546 + 77 50 127 Sn 126 910390.401 + 76 51 127 Sb 126 906924.277 + 75 52 127 Te 126 905225.714 + 74 53 127 I 126 904471.838 + 73 54 127 Xe 126 905182.899 + 72 55 127 Cs 126 907417.381 + 71 56 127 Ba 126 911091.275 + 70 57 127 La 126 916375.084 + 69 58 127 Ce 126 922727.000 + 80 48 128 Cd 127 927812.857 + 79 49 128 In 127 920401.053 + 78 50 128 Sn 127 910507.197 + 77 51 128 Sb 127 909145.645 + 76 52 128 Te 127 904461.311 + 75 53 128 I 127 905808.600 + 74 54 128 Xe 127 903530.996 + 73 55 128 Cs 127 907748.648 + 72 56 128 Ba 127 908342.408 + 71 57 128 La 127 915592.123 + 70 58 128 Ce 127 918911.000 + 69 59 128 Pr 127 928791.000 + 81 48 129 Cd 128 932304.399 + 80 49 129 In 128 921805.486 + 79 50 129 Sn 128 913482.102 + 78 51 129 Sb 128 909146.696 + 77 52 129 Te 128 906596.492 + 76 53 129 I 128 904983.687 + 75 54 129 Xe 128 904780.85892 + 74 55 129 Cs 128 906065.690 + 73 56 129 Ba 128 908680.896 + 72 57 129 La 128 912694.475 + 71 58 129 Ce 128 918102.000 + 70 59 129 Pr 128 925095.000 + 82 48 130 Cd 129 934387.566 + 81 49 130 In 129 924977.288 + 80 50 130 Sn 129 913974.533 + 79 51 130 Sb 129 911662.688 + 78 52 130 Te 129 906222.747 + 77 53 130 I 129 906670.211 + 76 54 130 Xe 129 903509.349 + 75 55 130 Cs 129 906709.283 + 74 56 130 Ba 129 906320.874 + 73 57 130 La 129 912369.413 + 72 58 130 Ce 129 914736.000 + 71 59 130 Pr 129 923590.000 + 70 60 130 Nd 129 928506.000 + 83 48 131 Cd 130 940720.000 + 82 49 131 In 130 926972.122 + 81 50 131 Sn 130 917053.066 + 80 51 131 Sb 130 911989.341 + 79 52 131 Te 130 908522.211 + 78 53 131 I 130 906126.384 + 77 54 131 Xe 130 905084.136 + 76 55 131 Cs 130 905464.999 + 75 56 131 Ba 130 906941.181 + 74 57 131 La 130 910070.000 + 73 58 131 Ce 130 914429.465 + 72 59 131 Pr 130 920234.960 + 71 60 131 Nd 130 927248.020 + 83 49 132 In 131 932998.449 + 82 50 132 Sn 131 917823.902 + 81 51 132 Sb 131 914508.015 + 80 52 132 Te 131 908546.716 + 79 53 132 I 131 907993.514 + 78 54 132 Xe 131 904155.08697 + 77 55 132 Cs 131 906437.743 + 76 56 132 Ba 131 905061.098 + 75 57 132 La 131 910118.959 + 74 58 132 Ce 131 911463.846 + 73 59 132 Pr 131 919240.000 + 72 60 132 Nd 131 923321.237 + 83 50 133 Sn 132 923913.756 + 82 51 133 Sb 132 915272.130 + 81 52 133 Te 132 910963.332 + 80 53 133 I 132 907827.361 + 79 54 133 Xe 132 905910.750 + 78 55 133 Cs 132 905451.961 + 77 56 133 Ba 132 906007.325 + 76 57 133 La 132 908218.000 + 75 58 133 Ce 132 911520.402 + 74 59 133 Pr 132 916330.561 + 73 60 133 Nd 132 922348.000 + 72 61 133 Pm 132 929782.000 + 84 50 134 Sn 133 928680.433 + 83 51 134 Sb 133 920535.675 + 82 52 134 Te 133 911396.379 + 81 53 134 I 133 909775.663 + 80 54 134 Xe 133 905393.033 + 79 55 134 Cs 133 906718.503 + 78 56 134 Ba 133 904508.399 + 77 57 134 La 133 908514.011 + 76 58 134 Ce 133 908928.142 + 75 59 134 Pr 133 915696.729 + 74 60 134 Nd 133 918790.210 + 73 61 134 Pm 133 928353.000 + 85 50 135 Sn 134 934908.605 + 84 51 135 Sb 134 925184.357 + 83 52 135 Te 134 916554.718 + 82 53 135 I 134 910059.382 + 81 54 135 Xe 134 907231.661 + 80 55 135 Cs 134 905977.234 + 79 56 135 Ba 134 905688.606 + 78 57 135 La 134 906984.568 + 77 58 135 Ce 134 909160.799 + 76 59 135 Pr 134 913111.774 + 75 60 135 Nd 134 918181.320 + 74 61 135 Pm 134 924796.000 + 73 62 135 Sm 134 932520.000 + 85 51 136 Sb 135 930749.011 + 84 52 136 Te 135 920101.182 + 83 53 136 I 135 914604.695 + 82 54 136 Xe 135 907214.476 + 81 55 136 Cs 135 907311.590 + 80 56 136 Ba 135 904575.959 + 79 57 136 La 135 907634.962 + 78 58 136 Ce 135 907129.438 + 77 59 136 Pr 135 912677.532 + 76 60 136 Nd 135 914976.064 + 75 61 136 Pm 135 923595.949 + 74 62 136 Sm 135 928275.555 + 86 51 137 Sb 136 935522.522 + 85 52 137 Te 136 925599.357 + 84 53 137 I 136 918028.180 + 83 54 137 Xe 136 911557.773 + 82 55 137 Cs 136 907089.464 + 81 56 137 Ba 136 905827.375 + 80 57 137 La 136 906450.618 + 79 58 137 Ce 136 907762.596 + 78 59 137 Pr 136 910679.304 + 77 60 137 Nd 136 914562.448 + 76 61 137 Pm 136 920479.522 + 75 62 137 Sm 136 926970.517 + 74 63 137 Eu 136 935430.722 + 87 51 138 Sb 137 941792.000 + 86 52 138 Te 137 929472.454 + 85 53 138 I 137 922726.394 + 84 54 138 Xe 137 914146.271 + 83 55 138 Cs 137 911017.207 + 82 56 138 Ba 137 905247.229 + 81 57 138 La 137 907117.834 + 80 58 138 Ce 137 905988.743 + 79 59 138 Pr 137 910752.059 + 78 60 138 Nd 137 911949.717 + 77 61 138 Pm 137 919548.077 + 76 62 138 Sm 137 923243.990 + 75 63 138 Eu 137 933709.000 + 87 52 139 Te 138 935367.193 + 86 53 139 I 138 926493.403 + 85 54 139 Xe 138 918792.203 + 84 55 139 Cs 138 913363.992 + 83 56 139 Ba 138 908841.334 + 82 57 139 La 138 906358.804 + 81 58 139 Ce 138 906657.625 + 80 59 139 Pr 138 908943.270 + 79 60 139 Nd 138 911954.407 + 78 61 139 Pm 138 916799.806 + 77 62 139 Sm 138 922296.634 + 76 63 139 Eu 138 929792.310 + 88 52 140 Te 139 939262.917 + 87 53 140 I 139 931715.917 + 86 54 140 Xe 139 921645.817 + 85 55 140 Cs 139 917283.305 + 84 56 140 Ba 139 910606.666 + 83 57 140 La 139 909483.184 + 82 58 140 Ce 139 905446.424 + 81 59 140 Pr 139 909083.592 + 80 60 140 Nd 139 909544.332 + 79 61 140 Pm 139 916034.122 + 78 62 140 Sm 139 918994.717 + 77 63 140 Eu 139 928087.637 + 76 64 140 Gd 139 933674.000 + 75 65 140 Tb 139 945805.049 + 88 53 141 I 140 935666.084 + 87 54 141 Xe 140 926787.184 + 86 55 141 Cs 140 920045.086 + 85 56 141 Ba 140 914403.500 + 84 57 141 La 140 910969.222 + 83 58 141 Ce 140 908283.987 + 82 59 141 Pr 140 907658.403 + 81 60 141 Nd 140 909615.488 + 80 61 141 Pm 140 913555.084 + 79 62 141 Sm 140 918481.591 + 78 63 141 Eu 140 924931.745 + 77 64 141 Gd 140 932126.000 + 76 65 141 Tb 140 941448.000 + 89 53 142 I 141 941202.000 + 88 54 142 Xe 141 929973.098 + 87 55 142 Cs 141 924299.512 + 86 56 142 Ba 141 916432.888 + 85 57 142 La 141 914090.454 + 84 58 142 Ce 141 909249.884 + 83 59 142 Pr 141 910050.440 + 82 60 142 Nd 141 907728.895 + 81 61 142 Pm 141 912890.428 + 80 62 142 Sm 141 915204.532 + 79 63 142 Eu 141 923441.836 + 78 64 142 Gd 141 928116.000 + 77 65 142 Tb 141 939280.859 + 89 54 143 Xe 142 935369.553 + 88 55 143 Cs 142 927347.348 + 87 56 143 Ba 142 920625.150 + 86 57 143 La 142 916079.422 + 85 58 143 Ce 142 912391.630 + 84 59 143 Pr 142 910822.564 + 83 60 143 Nd 142 909819.887 + 82 61 143 Pm 142 910938.073 + 81 62 143 Sm 142 914634.821 + 80 63 143 Eu 142 920298.681 + 79 64 143 Gd 142 926750.682 + 78 65 143 Tb 142 935137.335 + 77 66 143 Dy 142 943994.335 + 90 54 144 Xe 143 938945.079 + 89 55 144 Cs 143 932075.404 + 88 56 144 Ba 143 922954.821 + 87 57 144 La 143 919645.589 + 86 58 144 Ce 143 913652.830 + 85 59 144 Pr 143 913310.750 + 84 60 144 Nd 143 910092.865 + 83 61 144 Pm 143 912596.224 + 82 62 144 Sm 143 912006.373 + 81 63 144 Eu 143 918819.517 + 80 64 144 Gd 143 922963.000 + 79 65 144 Tb 143 933045.000 + 78 66 144 Dy 143 939269.514 + 77 67 144 Ho 143 952109.714 + 91 54 145 Xe 144 944719.634 + 90 55 145 Cs 144 935528.930 + 89 56 145 Ba 144 927518.400 + 88 57 145 La 144 921808.066 + 87 58 145 Ce 144 917265.144 + 86 59 145 Pr 144 914518.033 + 85 60 145 Nd 144 912579.199 + 84 61 145 Pm 144 912755.773 + 83 62 145 Sm 144 913417.244 + 82 63 145 Eu 144 916272.668 + 81 64 145 Gd 144 921710.370 + 80 65 145 Tb 144 928729.105 + 79 66 145 Dy 144 937473.994 + 78 67 145 Ho 144 947267.394 + 92 54 146 Xe 145 948518.248 + 91 55 146 Cs 145 940621.870 + 90 56 146 Ba 145 930276.431 + 89 57 146 La 145 925871.468 + 88 58 146 Ce 145 918802.065 + 87 59 146 Pr 145 917679.549 + 86 60 146 Nd 145 913122.503 + 85 61 146 Pm 145 914702.286 + 84 62 146 Sm 145 913046.881 + 83 63 146 Eu 145 917210.909 + 82 64 146 Gd 145 918318.548 + 81 65 146 Tb 145 927252.768 + 80 66 146 Dy 145 932844.529 + 79 67 146 Ho 145 944993.506 + 78 68 146 Er 145 952418.359 + 92 55 147 Cs 146 944261.515 + 91 56 147 Ba 146 935303.900 + 90 57 147 La 146 928417.800 + 89 58 147 Ce 146 922689.903 + 88 59 147 Pr 146 919007.458 + 87 60 147 Nd 146 916106.010 + 86 61 147 Pm 146 915144.638 + 85 62 147 Sm 146 914904.064 + 84 63 147 Eu 146 916752.276 + 83 64 147 Gd 146 919100.987 + 82 65 147 Tb 146 924054.620 + 81 66 147 Dy 146 931082.715 + 80 67 147 Ho 146 940142.295 + 79 68 147 Er 146 949964.458 + 78 69 147 Tm 146 961379.890 + 93 55 148 Cs 147 949639.029 + 92 56 148 Ba 147 938170.578 + 91 57 148 La 147 932679.400 + 90 58 148 Ce 147 924424.196 + 89 59 148 Pr 147 922130.015 + 88 60 148 Nd 147 916899.093 + 87 61 148 Pm 147 917481.255 + 86 62 148 Sm 147 914829.012 + 85 63 148 Eu 147 918089.294 + 84 64 148 Gd 147 918121.503 + 83 65 148 Tb 147 924275.323 + 82 66 148 Dy 147 927149.772 + 81 67 148 Ho 147 937743.928 + 80 68 148 Er 147 944735.029 + 79 69 148 Tm 147 958384.029 + 93 56 149 Ba 148 942973.000 + 92 57 149 La 148 935351.260 + 91 58 149 Ce 148 928426.900 + 90 59 149 Pr 148 923736.100 + 89 60 149 Nd 148 920154.648 + 88 61 149 Pm 148 918341.658 + 87 62 149 Sm 148 917191.375 + 86 63 149 Eu 148 917937.086 + 85 64 149 Gd 148 919347.831 + 84 65 149 Tb 148 923253.753 + 83 66 149 Dy 148 927325.448 + 82 67 149 Ho 148 933819.672 + 81 68 149 Er 148 942306.000 + 93 57 150 La 149 939742.000 + 92 58 150 Ce 149 930384.035 + 91 59 150 Pr 149 926676.415 + 90 60 150 Nd 149 920901.525 + 89 61 150 Pm 149 920990.217 + 88 62 150 Sm 149 917282.195 + 87 63 150 Eu 149 919707.229 + 86 64 150 Gd 149 918664.066 + 85 65 150 Tb 149 923664.864 + 84 66 150 Dy 149 925593.080 + 83 67 150 Ho 149 933498.358 + 82 68 150 Er 149 937915.528 + 94 57 151 La 150 942769.000 + 93 58 151 Ce 150 934272.200 + 92 59 151 Pr 150 928309.114 + 91 60 151 Nd 150 923839.565 + 90 61 151 Pm 150 921216.817 + 89 62 151 Sm 150 919939.066 + 88 63 151 Eu 150 919856.860 + 87 64 151 Gd 150 920355.109 + 86 65 151 Tb 150 923109.001 + 85 66 151 Dy 150 926191.253 + 84 67 151 Ho 150 931698.177 + 83 68 151 Er 150 937448.567 + 82 69 151 Tm 150 945493.201 + 81 70 151 Yb 150 955402.458 + 93 59 152 Pr 151 931552.900 + 92 60 152 Nd 151 924691.509 + 91 61 152 Pm 151 923505.481 + 90 62 152 Sm 151 919739.040 + 89 63 152 Eu 151 921751.235 + 88 64 152 Gd 151 919798.822 + 87 65 152 Tb 151 924082.263 + 86 66 152 Dy 151 924725.363 + 85 67 152 Ho 151 931717.465 + 84 68 152 Er 151 935050.169 + 83 69 152 Tm 151 944476.000 + 82 70 152 Yb 151 950326.700 + 94 59 153 Pr 152 933903.532 + 93 60 153 Nd 152 927717.949 + 92 61 153 Pm 152 924156.436 + 91 62 153 Sm 152 922103.969 + 90 63 153 Eu 152 921237.043 + 89 64 153 Gd 152 921757.359 + 88 65 153 Tb 152 923441.978 + 87 66 153 Dy 152 925771.992 + 86 67 153 Ho 152 930206.632 + 85 68 153 Er 152 935084.279 + 84 69 153 Tm 152 942057.244 + 82 71 153 Lu 152 958805.054 + 95 59 154 Pr 153 937621.738 + 94 60 154 Nd 153 929333.977 + 93 61 154 Pm 153 926449.364 + 92 62 154 Sm 153 922216.164 + 91 63 154 Eu 153 922985.955 + 90 64 154 Gd 153 920873.398 + 89 65 154 Tb 153 924684.106 + 88 66 154 Dy 153 924429.028 + 87 67 154 Ho 153 930606.841 + 86 68 154 Er 153 932790.743 + 85 69 154 Tm 153 941570.067 + 84 70 154 Yb 153 946395.701 + 96 59 155 Pr 154 940509.259 + 95 60 155 Nd 154 933135.668 + 94 61 155 Pm 154 928137.024 + 93 62 155 Sm 154 924647.051 + 92 63 155 Eu 154 922900.102 + 91 64 155 Gd 154 922629.796 + 90 65 155 Tb 154 923509.921 + 89 66 155 Dy 154 925758.459 + 88 67 155 Ho 154 929103.634 + 87 68 155 Er 154 933215.684 + 86 69 155 Tm 154 939209.578 + 85 70 155 Yb 154 945783.217 + 84 71 155 Lu 154 954326.011 + 96 60 156 Nd 155 935078.868 + 95 61 156 Pm 155 931117.490 + 94 62 156 Sm 155 925538.511 + 93 63 156 Eu 155 924763.285 + 92 64 156 Gd 155 922130.562 + 91 65 156 Tb 155 924754.430 + 90 66 156 Dy 155 924284.038 + 89 67 156 Ho 155 929705.436 + 88 68 156 Er 155 931065.890 + 87 69 156 Tm 155 938985.597 + 86 70 156 Yb 155 942816.893 + 85 71 156 Lu 155 953086.606 + 84 72 156 Hf 155 959401.889 + 97 60 157 Nd 156 939386.037 + 96 61 157 Pm 156 933121.370 + 95 62 157 Sm 156 928418.673 + 94 63 157 Eu 156 925432.791 + 93 64 157 Gd 156 923967.870 + 92 65 157 Tb 156 924032.328 + 91 66 157 Dy 156 925469.667 + 90 67 157 Ho 156 928251.999 + 89 68 157 Er 156 931922.655 + 88 69 157 Tm 156 936973.000 + 87 70 157 Yb 156 942649.230 + 86 71 157 Lu 156 950144.045 + 84 73 157 Ta 156 968230.251 + 97 61 158 Pm 157 936565.121 + 96 62 158 Sm 157 929950.979 + 95 63 158 Eu 157 927798.581 + 94 64 158 Gd 157 924111.646 + 93 65 158 Tb 157 925420.166 + 92 66 158 Dy 157 924414.597 + 91 67 158 Ho 157 928944.692 + 90 68 158 Er 157 929893.474 + 89 69 158 Tm 157 936979.525 + 88 70 158 Yb 157 939870.534 + 87 71 158 Lu 157 949315.626 + 86 72 158 Hf 157 954801.222 + 98 61 159 Pm 158 939286.479 + 97 62 159 Sm 158 933217.202 + 96 63 159 Eu 158 929099.612 + 95 64 159 Gd 158 926396.267 + 94 65 159 Tb 158 925353.933 + 93 66 159 Dy 158 925746.023 + 92 67 159 Ho 158 927718.768 + 91 68 159 Er 158 930690.875 + 90 69 159 Tm 158 934975.000 + 89 70 159 Yb 158 940054.787 + 88 71 159 Lu 158 946635.615 + 87 72 159 Hf 158 953995.838 + 86 73 159 Ta 158 963028.052 + 98 62 160 Sm 159 935335.286 + 97 63 160 Eu 159 931850.916 + 96 64 160 Gd 159 927061.537 + 95 65 160 Tb 159 927174.778 + 94 66 160 Dy 159 925203.244 + 93 67 160 Ho 159 928735.204 + 92 68 160 Er 159 929077.130 + 91 69 160 Tm 159 935263.106 + 90 70 160 Yb 159 937559.763 + 89 71 160 Lu 159 946033.000 + 88 72 160 Hf 159 950682.513 + 87 73 160 Ta 159 961541.679 + 86 74 160 W 159 968516.753 + 99 62 161 Sm 160 939160.143 + 98 63 161 Eu 160 933664.066 + 97 64 161 Gd 160 929676.602 + 96 65 161 Tb 160 927577.001 + 95 66 161 Dy 160 926939.088 + 94 67 161 Ho 160 927860.759 + 93 68 161 Er 160 930003.191 + 92 69 161 Tm 160 933549.000 + 91 70 161 Yb 160 937906.846 + 90 71 161 Lu 160 943572.000 + 89 72 161 Hf 160 950279.151 + 88 73 161 Ta 160 958369.031 + 86 75 161 Re 160 977627.121 + 99 63 162 Eu 161 936979.303 + 98 64 162 Gd 161 930992.146 + 97 65 162 Tb 161 929493.955 + 96 66 162 Dy 161 926804.168 + 95 67 162 Ho 161 929101.485 + 94 68 162 Er 161 928786.960 + 93 69 162 Tm 161 934000.872 + 92 70 162 Yb 161 935773.771 + 91 71 162 Lu 161 943282.776 + 90 72 162 Hf 161 947214.896 + 89 73 162 Ta 161 957294.202 + 88 74 162 W 161 963500.347 + 100 63 163 Eu 162 939360.977 + 99 64 163 Gd 162 934176.832 + 98 65 163 Tb 162 930653.261 + 97 66 163 Dy 162 928736.879 + 96 67 163 Ho 162 928739.921 + 95 68 163 Er 162 930039.567 + 94 69 163 Tm 162 932657.941 + 93 70 163 Yb 162 936339.800 + 92 71 163 Lu 162 941179.000 + 91 72 163 Hf 162 947113.258 + 90 73 163 Ta 162 954337.195 + 89 74 163 W 162 962524.511 + 88 75 163 Re 162 972085.441 + 99 65 164 Tb 163 933356.559 + 98 66 164 Dy 163 929180.472 + 97 67 164 Ho 163 930239.483 + 96 68 164 Er 163 929207.392 + 95 69 164 Tm 163 933543.281 + 94 70 164 Yb 163 934495.103 + 93 71 164 Lu 163 941339.000 + 92 72 164 Hf 163 944370.544 + 91 73 164 Ta 163 953534.000 + 90 74 164 W 163 958952.222 + 89 75 164 Re 163 970507.124 + 88 76 164 Os 163 978075.966 + 99 66 165 Dy 164 931709.054 + 98 67 165 Ho 164 930328.047 + 97 68 165 Er 164 930733.198 + 96 69 165 Tm 164 932442.269 + 95 70 165 Yb 164 935270.241 + 94 71 165 Lu 164 939406.758 + 93 72 165 Hf 164 944567.000 + 92 73 165 Ta 164 950780.303 + 91 74 165 W 164 958280.974 + 90 75 165 Re 164 967085.375 + 101 65 166 Tb 165 937858.119 + 100 66 166 Dy 165 932812.461 + 99 67 166 Ho 165 932290.139 + 98 68 166 Er 165 930299.023 + 97 69 166 Tm 165 933560.092 + 96 70 166 Yb 165 933874.249 + 95 71 166 Lu 165 939859.000 + 94 72 166 Hf 165 942180.000 + 93 73 166 Ta 165 950512.000 + 92 74 166 W 165 955031.346 + 91 75 166 Re 165 965760.940 + 90 76 166 Os 165 972698.141 + 101 66 167 Dy 166 935661.823 + 100 67 167 Ho 166 933138.994 + 99 68 167 Er 166 932054.119 + 98 69 167 Tm 166 932856.635 + 97 70 167 Yb 166 934953.337 + 96 71 167 Lu 166 938270.000 + 95 72 167 Hf 166 942600.000 + 94 73 167 Ta 166 948093.000 + 93 74 167 W 166 954805.873 + 91 76 167 Os 166 971548.938 + 90 77 167 Ir 166 981671.981 + 102 66 168 Dy 167 937133.716 + 101 67 168 Ho 167 935521.676 + 100 68 168 Er 167 932376.192 + 99 69 168 Tm 167 934177.868 + 98 70 168 Yb 167 933889.106 + 97 71 168 Lu 167 938735.139 + 96 72 168 Hf 167 940568.000 + 95 73 168 Ta 167 948047.000 + 94 74 168 W 167 951805.262 + 93 75 168 Re 167 961572.608 + 92 76 168 Os 167 967798.812 + 91 77 168 Ir 167 979960.981 + 90 78 168 Pt 167 988183.004 + 103 66 169 Dy 168 940313.971 + 102 67 169 Ho 168 936878.630 + 101 68 169 Er 168 934596.353 + 100 69 169 Tm 168 934218.350 + 99 70 169 Yb 168 935182.016 + 98 71 169 Lu 168 937643.653 + 97 72 169 Hf 168 941259.000 + 96 73 169 Ta 168 946011.000 + 95 74 169 W 168 951778.677 + 94 75 169 Re 168 958765.991 + 93 76 169 Os 168 967017.833 + 92 77 169 Ir 168 976281.287 + 103 67 170 Ho 169 939625.289 + 102 68 170 Er 169 935470.673 + 101 69 170 Tm 169 935806.507 + 100 70 170 Yb 169 934767.245 + 99 71 170 Lu 169 938479.234 + 98 72 170 Hf 169 939609.000 + 97 73 170 Ta 169 946175.000 + 96 74 170 W 169 949231.200 + 95 75 170 Re 169 958224.966 + 94 76 170 Os 169 963578.673 + 92 78 170 Pt 169 982502.095 + 104 67 171 Ho 170 941471.490 + 103 68 171 Er 170 938036.148 + 102 69 171 Tm 170 936435.126 + 101 70 171 Yb 170 936331.517 + 100 71 171 Lu 170 937918.660 + 99 72 171 Hf 170 940492.000 + 98 73 171 Ta 170 944476.000 + 97 74 171 W 170 949451.000 + 96 75 171 Re 170 955716.000 + 95 76 171 Os 170 963175.348 + 94 77 171 Ir 170 971645.522 + 93 78 171 Pt 170 981245.502 + 92 79 171 Au 170 991881.542 + 104 68 172 Er 171 939362.344 + 103 69 172 Tm 171 938406.067 + 102 70 172 Yb 171 936386.658 + 101 71 172 Lu 171 939091.417 + 100 72 172 Hf 171 939449.716 + 99 73 172 Ta 171 944895.000 + 98 74 172 W 171 947292.000 + 97 75 172 Re 171 955408.079 + 96 76 172 Os 171 960017.088 + 95 77 172 Ir 171 970607.036 + 94 78 172 Pt 171 977340.788 + 93 79 172 Au 171 989996.708 + 92 80 172 Hg 171 998863.391 + 104 69 173 Tm 172 939606.632 + 103 70 173 Yb 172 938216.215 + 102 71 173 Lu 172 938935.822 + 101 72 173 Hf 172 940513.000 + 100 73 173 Ta 172 943750.000 + 99 74 173 W 172 947689.000 + 98 75 173 Re 172 953243.000 + 97 76 173 Os 172 959808.375 + 96 77 173 Ir 172 967505.496 + 95 78 173 Pt 172 976443.315 + 94 79 173 Au 172 986223.808 + 105 69 174 Tm 173 942174.064 + 104 70 174 Yb 173 938867.548 + 103 71 174 Lu 173 940342.938 + 102 72 174 Hf 173 940048.480 + 101 73 174 Ta 173 944454.000 + 100 74 174 W 173 946079.000 + 99 75 174 Re 173 953115.000 + 98 76 174 Os 173 957063.152 + 97 77 174 Ir 173 966866.676 + 96 78 174 Pt 173 972819.832 + 94 80 174 Hg 173 992870.583 + 106 69 175 Tm 174 943842.313 + 105 70 175 Yb 174 941281.910 + 104 71 175 Lu 174 940777.308 + 103 72 175 Hf 174 941511.527 + 102 73 175 Ta 174 943737.000 + 101 74 175 W 174 946717.000 + 100 75 175 Re 174 951381.000 + 99 76 175 Os 174 956945.105 + 98 77 175 Ir 174 964149.521 + 97 78 175 Pt 174 972395.457 + 96 79 175 Au 174 981316.085 + 95 80 175 Hg 174 991441.086 + 107 69 176 Tm 175 946997.711 + 106 70 176 Yb 175 942574.708 + 105 71 176 Lu 175 942691.809 + 104 72 176 Hf 175 941409.905 + 103 73 176 Ta 175 944857.000 + 102 74 176 W 175 945634.000 + 101 75 176 Re 175 951623.000 + 100 76 176 Os 175 954806.000 + 99 77 176 Ir 175 963630.119 + 98 78 176 Pt 175 968938.214 + 97 79 176 Au 175 980116.927 + 96 80 176 Hg 175 987348.335 + 95 81 176 Tl 176 000624.367 + 107 70 177 Yb 176 945263.848 + 106 71 177 Lu 176 943763.668 + 105 72 177 Hf 176 943230.320 + 104 73 177 Ta 176 944482.073 + 103 74 177 W 176 946643.000 + 102 75 177 Re 176 950328.000 + 101 76 177 Os 176 954957.882 + 100 77 177 Ir 176 961301.500 + 99 78 177 Pt 176 968469.529 + 98 79 177 Au 176 976870.379 + 97 80 177 Hg 176 986277.376 + 96 81 177 Tl 176 996413.797 + 108 70 178 Yb 177 946649.710 + 107 71 178 Lu 177 945960.162 + 106 72 178 Hf 177 943708.456 + 104 74 178 W 177 945885.925 + 103 75 178 Re 177 950989.000 + 102 76 178 Os 177 953253.300 + 101 77 178 Ir 177 961082.000 + 100 78 178 Pt 177 965649.248 + 99 79 178 Au 177 976055.945 + 98 80 178 Hg 177 982484.158 + 96 82 178 Pb 178 003837.163 + 108 71 179 Lu 178 947333.082 + 107 72 179 Hf 178 945825.838 + 106 73 179 Ta 178 945939.187 + 105 74 179 W 178 947079.501 + 104 75 179 Re 178 949989.715 + 103 76 179 Os 178 953816.669 + 102 77 179 Ir 178 959117.596 + 101 78 179 Pt 178 965358.719 + 100 79 179 Au 178 973173.668 + 99 80 179 Hg 178 981826.899 + 98 81 179 Tl 178 991123.405 + 97 82 179 Pb 179 002201.452 + 109 71 180 Lu 179 949890.876 + 108 72 180 Hf 179 946559.669 + 107 73 180 Ta 179 947468.392 + 106 74 180 W 179 946713.435 + 105 75 180 Re 179 950791.568 + 104 76 180 Os 179 952379.930 + 103 77 180 Ir 179 959229.446 + 102 78 180 Pt 179 963031.563 + 101 79 180 Au 179 972489.883 + 100 80 180 Hg 179 978260.249 + 99 81 180 Tl 179 989923.019 + 98 82 180 Pb 179 997915.842 + 110 71 181 Lu 180 951908.000 + 109 72 181 Hf 180 949110.965 + 108 73 181 Ta 180 947999.331 + 107 74 181 W 180 948218.863 + 106 75 181 Re 180 950061.523 + 105 76 181 Os 180 953247.188 + 104 77 181 Ir 180 957634.694 + 103 78 181 Pt 180 963089.927 + 102 79 181 Au 180 970079.103 + 101 80 181 Hg 180 977819.357 + 100 81 181 Tl 180 986259.992 + 99 82 181 Pb 180 996653.386 + 110 72 182 Hf 181 950563.816 + 109 73 182 Ta 181 950155.413 + 108 74 182 W 181 948205.721 + 107 75 182 Re 181 951211.645 + 106 76 182 Os 181 952110.153 + 105 77 182 Ir 181 958076.296 + 104 78 182 Pt 181 961171.571 + 103 79 182 Au 181 969617.874 + 102 80 182 Hg 181 974689.132 + 101 81 182 Tl 181 985691.880 + 100 82 182 Pb 181 992672.940 + 112 71 183 Lu 182 957363.000 + 111 72 183 Hf 182 953534.004 + 110 73 183 Ta 182 951376.180 + 109 74 183 W 182 950224.500 + 108 75 183 Re 182 950821.390 + 107 76 183 Os 182 953124.719 + 106 77 183 Ir 182 956839.968 + 105 78 183 Pt 182 961596.653 + 104 79 183 Au 182 967588.108 + 103 80 183 Hg 182 974444.629 + 102 81 183 Tl 182 982192.846 + 101 82 183 Pb 182 991867.668 + 112 72 184 Hf 183 955448.587 + 111 73 184 Ta 183 954010.038 + 110 74 184 W 183 950933.260 + 109 75 184 Re 183 952528.267 + 108 76 184 Os 183 952492.949 + 107 77 184 Ir 183 957476.000 + 106 78 184 Pt 183 959920.039 + 105 79 184 Au 183 967451.524 + 104 80 184 Hg 183 971713.221 + 103 81 184 Tl 183 981875.093 + 102 82 184 Pb 183 988135.702 + 101 83 184 Bi 184 001141.250 + 113 72 185 Hf 184 958862.000 + 112 73 185 Ta 184 955561.396 + 111 74 185 W 184 953421.286 + 110 75 185 Re 184 952958.337 + 109 76 185 Os 184 954045.995 + 108 77 185 Ir 184 956698.000 + 107 78 185 Pt 184 960613.659 + 106 79 185 Au 184 965798.874 + 105 80 185 Hg 184 971890.676 + 104 81 185 Tl 184 978789.191 + 103 82 185 Pb 184 987609.989 + 114 72 186 Hf 185 960897.000 + 113 73 186 Ta 185 958553.111 + 112 74 186 W 185 954365.215 + 111 75 186 Re 185 954989.419 + 110 76 186 Os 185 953837.660 + 109 77 186 Ir 185 957946.754 + 108 78 186 Pt 185 959350.846 + 107 79 186 Au 185 965952.703 + 106 80 186 Hg 185 969362.017 + 105 81 186 Tl 185 978650.841 + 104 82 186 Pb 185 984238.196 + 103 83 186 Bi 185 996622.402 + 102 84 186 Po 186 004402.577 + 114 73 187 Ta 186 960391.000 + 113 74 187 W 186 957161.323 + 112 75 187 Re 186 955752.288 + 111 76 187 Os 186 955749.640 + 110 77 187 Ir 186 957542.000 + 109 78 187 Pt 186 960616.976 + 108 79 187 Au 186 964543.155 + 107 80 187 Hg 186 969814.158 + 106 81 187 Tl 186 975904.743 + 105 82 187 Pb 186 983910.836 + 104 83 187 Bi 186 993147.276 + 103 84 187 Po 187 003036.624 + 115 73 188 Ta 187 963916.000 + 114 74 188 W 187 958488.395 + 113 75 188 Re 187 958113.728 + 112 76 188 Os 187 955837.361 + 111 77 188 Ir 187 958835.046 + 110 78 188 Pt 187 959397.560 + 109 79 188 Au 187 965247.969 + 108 80 188 Hg 187 967576.910 + 107 81 188 Tl 187 976020.886 + 106 82 188 Pb 187 980874.592 + 105 83 188 Bi 187 992276.184 + 104 84 188 Po 187 999415.655 + 115 74 189 W 188 961763.000 + 114 75 189 Re 188 959227.817 + 113 76 189 Os 188 958146.005 + 112 77 189 Ir 188 958722.669 + 111 78 189 Pt 188 960848.542 + 110 79 189 Au 188 963948.286 + 109 80 189 Hg 188 968194.748 + 108 81 189 Tl 188 973573.527 + 107 82 189 Pb 188 980843.639 + 106 83 189 Bi 188 989195.141 + 105 84 189 Po 188 998473.415 + 116 74 190 W 189 963089.066 + 115 75 190 Re 189 961743.360 + 114 76 190 Os 189 958445.496 + 113 77 190 Ir 189 960543.445 + 112 78 190 Pt 189 959949.876 + 111 79 190 Au 189 964751.750 + 110 80 190 Hg 189 966322.169 + 109 81 190 Tl 189 973835.551 + 108 82 190 Pb 189 978081.828 + 107 83 190 Bi 189 988620.883 + 106 84 190 Po 189 995100.519 + 117 74 191 W 190 966531.000 + 116 75 191 Re 190 963123.437 + 115 76 191 Os 190 960928.159 + 114 77 191 Ir 190 960591.527 + 113 78 191 Pt 190 961676.363 + 112 79 191 Au 190 963716.455 + 111 80 191 Hg 190 967158.247 + 110 81 191 Tl 190 971784.096 + 109 82 191 Pb 190 978281.000 + 108 83 191 Bi 190 985786.975 + 107 84 191 Po 190 994558.488 + 106 85 191 At 191 004148.086 + 117 75 192 Re 191 966088.000 + 116 76 192 Os 191 961478.881 + 115 77 192 Ir 191 962602.485 + 114 78 192 Pt 191 961042.736 + 113 79 192 Au 191 964817.684 + 112 80 192 Hg 191 965634.182 + 111 81 192 Tl 191 972225.000 + 110 82 192 Pb 191 975785.115 + 109 83 192 Bi 191 985470.078 + 108 84 192 Po 191 991335.788 + 107 85 192 At 192 003141.034 + 118 75 193 Re 192 967545.000 + 117 76 193 Os 192 964149.753 + 116 77 193 Ir 192 962923.824 + 115 78 193 Pt 192 962984.616 + 114 79 193 Au 192 964138.447 + 113 80 193 Hg 192 966653.377 + 112 81 193 Tl 192 970501.997 + 111 82 193 Pb 192 976173.234 + 110 83 193 Bi 192 982947.223 + 109 84 193 Po 192 991062.403 + 108 85 193 At 192 999927.728 + 107 86 193 Rn 193 009707.964 + 118 76 194 Os 193 965179.477 + 117 77 194 Ir 193 965075.773 + 116 78 194 Pt 193 962683.527 + 115 79 194 Au 193 965419.062 + 114 80 194 Hg 193 965449.111 + 113 81 194 Tl 193 971081.411 + 112 82 194 Pb 193 974011.706 + 111 83 194 Bi 193 982792.362 + 110 84 194 Po 193 988186.015 + 109 85 194 At 193 999226.872 + 108 86 194 Rn 194 006144.424 + 119 76 195 Os 194 968318.000 + 118 77 195 Ir 194 965976.967 + 117 78 195 Pt 194 964794.353 + 116 79 195 Au 194 965037.851 + 115 80 195 Hg 194 966705.751 + 114 81 195 Tl 194 969774.096 + 113 82 195 Pb 194 974548.743 + 112 83 195 Bi 194 980648.762 + 111 84 195 Po 194 988130.617 + 110 85 195 At 194 996274.485 + 109 86 195 Rn 195 005421.699 + 120 76 196 Os 195 969643.277 + 119 77 196 Ir 195 968399.696 + 118 78 196 Pt 195 964954.675 + 117 79 196 Au 195 966571.221 + 116 80 196 Hg 195 965833.444 + 115 81 196 Tl 195 970481.192 + 114 82 196 Pb 195 972787.466 + 113 83 196 Bi 195 980666.509 + 112 84 196 Po 195 985536.094 + 111 85 196 At 195 995797.421 + 110 86 196 Rn 196 002115.945 + 120 77 197 Ir 196 969657.233 + 119 78 197 Pt 196 967343.053 + 118 79 197 Au 196 966570.114 + 117 80 197 Hg 196 967213.713 + 116 81 197 Tl 196 969573.986 + 115 82 197 Pb 196 973434.717 + 114 83 197 Bi 196 978864.929 + 113 84 197 Po 196 985659.607 + 112 85 197 At 196 993177.357 + 111 86 197 Rn 197 001621.430 + 110 87 197 Fr 197 011008.090 + 120 78 198 Pt 197 967896.734 + 119 79 198 Au 197 968243.724 + 118 80 198 Hg 197 966769.179 + 117 81 198 Tl 197 970446.673 + 116 82 198 Pb 197 972015.397 + 115 83 198 Bi 197 979206.000 + 114 84 198 Po 197 983388.672 + 113 85 198 At 197 992791.673 + 112 86 198 Rn 197 998679.156 + 111 87 198 Fr 198 010278.138 + 122 77 199 Ir 198 973807.115 + 121 78 199 Pt 198 970597.038 + 120 79 199 Au 198 968766.582 + 119 80 199 Hg 198 968280.989 + 118 81 199 Tl 198 969877.000 + 117 82 199 Pb 198 972912.542 + 116 83 199 Bi 198 977672.893 + 115 84 199 Po 198 983673.021 + 114 85 199 At 198 990527.719 + 113 86 199 Rn 198 998390.273 + 112 87 199 Fr 199 007269.389 + 122 78 200 Pt 199 971444.625 + 121 79 200 Au 199 970756.556 + 120 80 200 Hg 199 968326.934 + 119 81 200 Tl 199 970963.602 + 118 82 200 Pb 199 971818.332 + 117 83 200 Bi 199 978131.093 + 116 84 200 Po 199 981812.270 + 115 85 200 At 199 990351.100 + 114 86 200 Rn 199 995700.707 + 113 87 200 Fr 200 006583.507 + 123 78 201 Pt 200 974513.293 + 122 79 201 Au 200 971657.665 + 121 80 201 Hg 200 970303.038 + 120 81 201 Tl 200 970820.168 + 119 82 201 Pb 200 972870.425 + 118 83 201 Bi 200 977008.512 + 117 84 201 Po 200 982263.777 + 116 85 201 At 200 988417.061 + 115 86 201 Rn 200 995628.179 + 114 87 201 Fr 201 003852.496 + 113 88 201 Ra 201 012814.683 + 124 78 202 Pt 201 975639.000 + 123 79 202 Au 201 973856.000 + 122 80 202 Hg 201 970643.585 + 121 81 202 Tl 201 972109.089 + 120 82 202 Pb 201 972151.604 + 119 83 202 Bi 201 977733.100 + 118 84 202 Po 201 980738.881 + 117 85 202 At 201 988630.380 + 116 86 202 Rn 201 993263.902 + 115 87 202 Fr 202 003323.946 + 114 88 202 Ra 202 009742.264 + 124 79 203 Au 202 975154.498 + 123 80 203 Hg 202 972872.326 + 122 81 203 Tl 202 972344.022 + 121 82 203 Pb 202 973390.535 + 120 83 203 Bi 202 976892.145 + 119 84 203 Po 202 981415.995 + 118 85 203 At 202 986942.957 + 117 86 203 Rn 202 993393.732 + 116 87 203 Fr 203 000940.872 + 115 88 203 Ra 203 009298.745 + 124 80 204 Hg 203 973494.037 + 123 81 204 Tl 203 973863.337 + 122 82 204 Pb 203 973043.420 + 121 83 204 Bi 203 977835.717 + 120 84 204 Po 203 980309.863 + 119 85 204 At 203 987251.197 + 118 86 204 Rn 203 991443.644 + 117 87 204 Fr 204 000651.974 + 116 88 204 Ra 204 006502.228 + 125 80 205 Hg 204 976073.125 + 124 81 205 Tl 204 974427.237 + 123 82 205 Pb 204 974481.597 + 122 83 205 Bi 204 977386.323 + 121 84 205 Po 204 981190.004 + 120 85 205 At 204 986074.041 + 119 86 205 Rn 204 991723.204 + 118 87 205 Fr 204 998593.858 + 117 88 205 Ra 205 006268.415 + 116 89 205 Ac 205 015144.158 + 126 80 206 Hg 205 977513.756 + 125 81 206 Tl 205 976110.026 + 124 82 206 Pb 205 974465.124 + 123 83 206 Bi 205 978498.757 + 122 84 206 Po 205 980473.654 + 121 85 206 At 205 986656.148 + 120 86 206 Rn 205 990195.358 + 119 87 206 Fr 205 998666.211 + 118 88 206 Ra 206 003827.763 + 117 89 206 Ac 206 014470.787 + 127 80 207 Hg 206 982300.000 + 126 81 207 Tl 206 977418.586 + 125 82 207 Pb 206 975896.735 + 124 83 207 Bi 206 978470.471 + 123 84 207 Po 206 981593.252 + 122 85 207 At 206 985799.783 + 121 86 207 Rn 206 990730.200 + 120 87 207 Fr 206 996946.474 + 119 88 207 Ra 207 003805.161 + 118 89 207 Ac 207 011965.973 + 128 80 208 Hg 207 985759.000 + 127 81 208 Tl 207 982017.992 + 126 82 208 Pb 207 976651.918 + 125 83 208 Bi 207 979741.981 + 124 84 208 Po 207 981245.616 + 123 85 208 At 207 986613.042 + 122 86 208 Rn 207 989634.295 + 121 87 208 Fr 207 997138.018 + 120 88 208 Ra 208 001854.929 + 119 89 208 Ac 208 011544.073 + 118 90 208 Th 208 017910.722 + 128 81 209 Tl 208 985351.750 + 127 82 209 Pb 208 981089.898 + 126 83 209 Bi 208 980398.519 + 125 84 209 Po 208 982430.276 + 124 85 209 At 208 986169.944 + 123 86 209 Rn 208 990401.388 + 122 87 209 Fr 208 995953.197 + 121 88 209 Ra 209 001994.879 + 120 89 209 Ac 209 009494.220 + 129 81 210 Tl 209 990072.970 + 128 82 210 Pb 209 984188.301 + 127 83 210 Bi 209 984120.156 + 126 84 210 Po 209 982873.601 + 125 85 210 At 209 987147.338 + 124 86 210 Rn 209 989688.854 + 123 87 210 Fr 209 996421.657 + 122 88 210 Ra 210 000475.356 + 121 89 210 Ac 210 009436.130 + 120 90 210 Th 210 015093.437 + 130 81 211 Tl 210 993475.000 + 129 82 211 Pb 210 988735.356 + 128 83 211 Bi 210 987268.698 + 127 84 211 Po 210 986653.085 + 126 85 211 At 210 987496.147 + 125 86 211 Rn 210 990600.686 + 124 87 211 Fr 210 995555.259 + 123 88 211 Ra 211 000893.213 + 122 89 211 Ac 211 007731.894 + 121 90 211 Th 211 014933.183 + 130 82 212 Pb 211 991895.975 + 129 83 212 Bi 211 991285.016 + 128 84 212 Po 211 988867.896 + 127 85 212 At 211 990737.223 + 126 86 212 Rn 211 990703.528 + 125 87 212 Fr 211 996225.453 + 124 88 212 Ra 211 999786.399 + 123 89 212 Ac 212 007812.501 + 122 90 212 Th 212 013001.487 + 121 91 212 Pa 212 023181.425 + 132 81 213 Tl 213 001915.000 + 131 82 213 Pb 212 996560.867 + 130 83 213 Bi 212 994383.608 + 129 84 213 Po 212 992857.083 + 128 85 213 At 212 992936.514 + 127 86 213 Rn 212 993885.064 + 126 87 213 Fr 212 996185.861 + 125 88 213 Ra 213 000370.970 + 124 89 213 Ac 213 006607.333 + 123 90 213 Th 213 013011.447 + 122 91 213 Pa 213 021108.697 + 132 82 214 Pb 213 999803.788 + 131 83 214 Bi 213 998710.938 + 130 84 214 Po 213 995201.208 + 129 85 214 At 213 996371.601 + 128 86 214 Rn 213 995362.566 + 127 87 214 Fr 213 998970.785 + 126 88 214 Ra 214 000099.554 + 125 89 214 Ac 214 006917.762 + 124 90 214 Th 214 011481.431 + 123 91 214 Pa 214 020918.561 + 133 82 215 Pb 215 004661.590 + 132 83 215 Bi 215 001749.149 + 131 84 215 Po 214 999418.454 + 130 85 215 At 214 998651.890 + 129 86 215 Rn 214 998745.498 + 128 87 215 Fr 215 000341.456 + 127 88 215 Ra 215 002720.080 + 126 89 215 Ac 215 006474.132 + 125 90 215 Th 215 011724.805 + 124 91 215 Pa 215 019177.728 + 123 92 215 U 215 026756.035 + 133 83 216 Bi 216 006305.989 + 132 84 216 Po 216 001913.506 + 131 85 216 At 216 002422.631 + 130 86 216 Rn 216 000271.464 + 129 87 216 Fr 216 003189.445 + 128 88 216 Ra 216 003533.117 + 127 89 216 Ac 216 008743.367 + 126 90 216 Th 216 011055.714 + 125 91 216 Pa 216 019108.242 + 124 92 216 U 216 024762.747 + 134 83 217 Bi 217 009372.000 + 133 84 217 Po 217 006316.216 + 132 85 217 At 217 004717.835 + 131 86 217 Rn 217 003927.562 + 130 87 217 Fr 217 004631.902 + 129 88 217 Ra 217 006322.806 + 128 89 217 Ac 217 009343.777 + 127 90 217 Th 217 013103.444 + 126 91 217 Pa 217 018323.692 + 135 83 218 Bi 218 014188.000 + 134 84 218 Po 218 008971.502 + 133 85 218 At 218 008693.735 + 132 86 218 Rn 218 005601.052 + 131 87 218 Fr 218 007578.274 + 130 88 218 Ra 218 007140.325 + 129 89 218 Ac 218 011641.093 + 128 90 218 Th 218 013276.242 + 127 91 218 Pa 218 020057.853 + 126 92 218 U 218 023504.829 + 135 84 219 Po 219 013614.000 + 134 85 219 At 219 011160.647 + 133 86 219 Rn 219 009478.753 + 132 87 219 Fr 219 009251.553 + 131 88 219 Ra 219 010085.176 + 130 89 219 Ac 219 012420.348 + 129 90 219 Th 219 015535.677 + 128 91 219 Pa 219 019903.650 + 127 92 219 U 219 024999.161 + 126 93 219 Np 219 031623.021 + 136 84 220 Po 220 016386.000 + 135 85 220 At 220 015433.000 + 134 86 220 Rn 220 011392.534 + 133 87 220 Fr 220 012326.778 + 132 88 220 Ra 220 011025.562 + 131 89 220 Ac 220 014754.450 + 130 90 220 Th 220 015747.926 + 137 84 221 Po 221 021228.000 + 136 85 221 At 221 018017.000 + 135 86 221 Rn 221 015535.709 + 134 87 221 Fr 221 014253.757 + 133 88 221 Ra 221 013917.224 + 132 89 221 Ac 221 015591.199 + 131 90 221 Th 221 018186.236 + 130 91 221 Pa 221 021874.846 + 129 92 221 U 221 026323.299 + 138 84 222 Po 222 024140.000 + 137 85 222 At 222 022494.000 + 136 86 222 Rn 222 017576.286 + 135 87 222 Fr 222 017582.620 + 134 88 222 Ra 222 015373.355 + 133 89 222 Ac 222 017843.887 + 132 90 222 Th 222 018468.300 + 130 92 222 U 222 026057.953 + 138 85 223 At 223 025151.000 + 137 86 223 Rn 223 021889.285 + 136 87 223 Fr 223 019734.313 + 135 88 223 Ra 223 018500.719 + 134 89 223 Ac 223 019136.872 + 133 90 223 Th 223 020811.546 + 132 91 223 Pa 223 023962.232 + 131 92 223 U 223 027737.168 + 139 85 224 At 224 029749.000 + 138 86 224 Rn 224 024095.804 + 137 87 224 Fr 224 023348.100 + 136 88 224 Ra 224 020210.453 + 135 89 224 Ac 224 021722.239 + 134 90 224 Th 224 021464.157 + 133 91 224 Pa 224 025617.210 + 132 92 224 U 224 027613.974 + 139 86 225 Rn 225 028485.574 + 138 87 225 Fr 225 025572.478 + 137 88 225 Ra 225 023610.574 + 136 89 225 Ac 225 023228.647 + 135 90 225 Th 225 023950.907 + 134 91 225 Pa 225 026130.844 + 133 92 225 U 225 029393.555 + 132 93 225 Np 225 033910.797 + 140 86 226 Rn 226 030861.382 + 139 87 226 Fr 226 029544.515 + 138 88 226 Ra 226 025408.455 + 137 89 226 Ac 226 026097.069 + 136 90 226 Th 226 024903.686 + 135 91 226 Pa 226 027947.872 + 134 92 226 U 226 029338.749 + 141 86 227 Rn 227 035304.396 + 140 87 227 Fr 227 031865.417 + 139 88 227 Ra 227 029176.474 + 138 89 227 Ac 227 027750.666 + 137 90 227 Th 227 027702.618 + 136 91 227 Pa 227 028804.477 + 135 92 227 U 227 031181.587 + 134 93 227 Np 227 034956.832 + 142 86 228 Rn 228 037835.418 + 141 87 228 Fr 228 035839.437 + 140 88 228 Ra 228 031068.657 + 139 89 228 Ac 228 031019.767 + 138 90 228 Th 228 028739.835 + 137 91 228 Pa 228 031050.748 + 136 92 228 U 228 031371.351 + 135 93 228 Np 228 036066.462 + 134 94 228 Pu 228 038741.387 + 143 86 229 Rn 229 042257.276 + 142 87 229 Fr 229 038291.455 + 141 88 229 Ra 229 034956.707 + 140 89 229 Ac 229 032947.000 + 139 90 229 Th 229 031761.431 + 138 91 229 Pa 229 032095.652 + 137 92 229 U 229 033505.909 + 136 93 229 Np 229 036263.974 + 135 94 229 Pu 229 040145.819 + 134 95 229 Am 229 045249.909 + 143 87 230 Fr 230 042390.791 + 142 88 230 Ra 230 037054.780 + 141 89 230 Ac 230 036327.000 + 140 90 230 Th 230 033132.358 + 139 91 230 Pa 230 034539.789 + 138 92 230 U 230 033940.102 + 137 93 230 Np 230 037827.716 + 136 94 230 Pu 230 039650.703 + 144 87 231 Fr 231 045175.357 + 143 88 231 Ra 231 041027.086 + 142 89 231 Ac 231 038393.000 + 141 90 231 Th 231 036302.853 + 140 91 231 Pa 231 035882.575 + 139 92 231 U 231 036292.252 + 138 93 231 Np 231 038244.490 + 137 94 231 Pu 231 041126.410 + 145 87 232 Fr 232 049461.224 + 144 88 232 Ra 232 043475.270 + 143 89 232 Ac 232 042034.000 + 142 90 232 Th 232 038053.689 + 141 91 232 Pa 232 038590.300 + 140 92 232 U 232 037154.860 + 138 94 232 Pu 232 041184.526 + 146 87 233 Fr 233 052517.838 + 145 88 233 Ra 233 047594.573 + 144 89 233 Ac 233 044346.000 + 143 90 233 Th 233 041580.208 + 142 91 233 Pa 233 040246.605 + 141 92 233 U 233 039634.367 + 140 93 233 Np 233 040739.489 + 139 94 233 Pu 233 042997.345 + 137 96 233 Cm 233 050772.206 + 146 88 234 Ra 234 050382.104 + 145 89 234 Ac 234 048139.000 + 144 90 234 Th 234 043599.860 + 143 91 234 Pa 234 043305.615 + 142 92 234 U 234 040950.370 + 141 93 234 Np 234 042893.320 + 140 94 234 Pu 234 043317.478 + 138 96 234 Cm 234 050160.959 + 146 89 235 Ac 235 050840.000 + 145 90 235 Th 235 047255.000 + 144 91 235 Pa 235 045399.000 + 143 92 235 U 235 043928.190 + 142 93 235 Np 235 044061.591 + 141 94 235 Pu 235 045284.682 + 140 95 235 Am 235 047907.371 + 147 89 236 Ac 236 054988.000 + 146 90 236 Th 236 049657.000 + 145 91 236 Pa 236 048668.000 + 144 92 236 U 236 045566.201 + 143 93 236 Np 236 046568.392 + 142 94 236 Pu 236 046056.756 + 140 96 236 Cm 236 051374.506 + 147 90 237 Th 237 053629.000 + 146 91 237 Pa 237 051023.000 + 145 92 237 U 237 048728.380 + 144 93 237 Np 237 048171.710 + 143 94 237 Pu 237 048407.957 + 141 96 237 Cm 237 052868.923 + 139 98 237 Cf 237 062199.993 + 147 91 238 Pa 238 054637.000 + 146 92 238 U 238 050786.996 + 145 93 238 Np 238 050944.671 + 144 94 238 Pu 238 049558.250 + 143 95 238 Am 238 051982.607 + 142 96 238 Cm 238 053081.595 + 147 92 239 U 239 054292.048 + 146 93 239 Np 239 052937.599 + 145 94 239 Pu 239 052161.669 + 144 95 239 Am 239 053022.803 + 143 96 239 Cm 239 054908.593 + 148 92 240 U 240 056592.425 + 147 93 240 Np 240 056163.830 + 146 94 240 Pu 240 053811.812 + 145 95 240 Am 240 055298.444 + 144 96 240 Cm 240 055528.329 + 142 98 240 Cf 240 062255.842 + 148 93 241 Np 241 058250.697 + 147 94 241 Pu 241 056849.722 + 146 95 241 Am 241 056827.413 + 145 96 241 Cm 241 057651.288 + 149 93 242 Np 242 061639.615 + 148 94 242 Pu 242 058741.045 + 147 95 242 Am 242 059547.428 + 146 96 242 Cm 242 058834.263 + 144 98 242 Cf 242 063754.533 + 149 94 243 Pu 243 062002.119 + 148 95 243 Am 243 061379.940 + 147 96 243 Cm 243 061387.403 + 146 97 243 Bk 243 063005.980 + 150 94 244 Pu 244 064204.415 + 149 95 244 Am 244 064282.964 + 148 96 244 Cm 244 062750.694 + 147 97 244 Bk 244 065179.039 + 146 98 244 Cf 244 065999.543 + 151 94 245 Pu 245 067824.568 + 150 95 245 Am 245 066452.890 + 149 96 245 Cm 245 065491.113 + 148 97 245 Bk 245 066359.885 + 147 98 245 Cf 245 068046.825 + 152 94 246 Pu 246 070204.209 + 150 96 246 Cm 246 067222.082 + 149 97 246 Bk 246 068671.367 + 148 98 246 Cf 246 068803.762 + 146 100 246 Fm 246 075350.815 + 151 96 247 Cm 247 070352.726 + 150 97 247 Bk 247 070305.940 + 149 98 247 Cf 247 070965.462 + 148 99 247 Es 247 073621.932 + 152 96 248 Cm 248 072349.101 + 150 98 248 Cf 248 072182.978 + 148 100 248 Fm 248 077185.528 + 153 96 249 Cm 249 075954.006 + 152 97 249 Bk 249 074983.182 + 151 98 249 Cf 249 074850.491 + 149 100 249 Fm 249 078926.098 + 154 96 250 Cm 250 078357.556 + 153 97 250 Bk 250 078315.027 + 152 98 250 Cf 250 076404.561 + 150 100 250 Fm 250 079519.828 + 155 96 251 Cm 251 082285.036 + 154 97 251 Bk 251 080760.603 + 153 98 251 Cf 251 079587.219 + 152 99 251 Es 251 079992.224 + 151 100 251 Fm 251 081539.889 + 150 101 251 Md 251 084774.291 + 154 98 252 Cf 252 081626.523 + 153 99 252 Es 252 082979.189 + 152 100 252 Fm 252 082464.972 + 150 102 252 No 252 088966.141 + 155 98 253 Cf 253 085133.738 + 154 99 253 Es 253 084821.305 + 153 100 253 Fm 253 085181.160 + 151 102 253 No 253 090562.831 + 156 98 254 Cf 254 087323.590 + 155 99 254 Es 254 088020.527 + 154 100 254 Fm 254 086852.726 + 152 102 254 No 254 090954.259 + 156 99 255 Es 255 090273.553 + 155 100 255 Fm 255 089962.633 + 154 101 255 Md 255 091082.787 + 153 102 255 No 255 093191.404 + 152 103 255 Lr 255 096562.404 + 156 100 256 Fm 256 091773.878 + 154 102 256 No 256 094280.866 + 153 103 256 Lr 256 098494.029 + 152 104 256 Rf 256 101151.535 + 157 100 257 Fm 257 095105.317 + 156 101 257 Md 257 095537.977 + 155 102 257 No 257 096884.419 + 153 104 257 Rf 257 102916.848 + 157 101 258 Md 258 098429.825 + 154 104 258 Rf 258 103426.362 + 157 102 259 No 259 100997.503 + 154 105 259 Db 259 109491.865 + 154 106 260 Sg 260 114383.508 + 157 104 261 Rf 261 108769.990 + 155 106 261 Sg 261 115948.188 + 156 106 262 Sg 262 116335.446 + 156 108 264 Hs 264 128356.405 + 157 108 265 Hs 265 129791.799 + 158 108 266 Hs 266 130045.252 + 159 110 269 Ds 269 144751.021 + 160 110 270 Ds 270 144583.090 + diff --git a/etc/new_CutList_Feb202110B3hea.txt b/etc/new_CutList_Feb202110B3hea.txt new file mode 100644 index 0000000..d476893 --- /dev/null +++ b/etc/new_CutList_Feb202110B3hea.txt @@ -0,0 +1,3 @@ +Name File VarX VarY +edeAlphas /data1/gwm17/10B3He/Feb2021/cuts/alphaCut_03012021.root scintLeft cathode +x1x2 /data1/gwm17/10B3He/Feb2021/cuts/xxCut_03012021.root x1 x2 \ No newline at end of file diff --git a/etc/orig_ChannelMap_Feb2021_SABRE.txt b/etc/orig_ChannelMap_Feb2021_SABRE.txt new file mode 100644 index 0000000..d34a8cb --- /dev/null +++ b/etc/orig_ChannelMap_Feb2021_SABRE.txt @@ -0,0 +1,146 @@ +Format: global_channel detectorID_number detectorType_identifier detectorPart_identifier +NOTE: the focal plane ionchamber is given the UNIQUE detector id of 11. All other detector id ranges should be 0 to nDetectors-1. +0 4 SABREWEDGE 0 +1 4 SABREWEDGE 1 +2 4 SABREWEDGE 2 +3 4 SABREWEDGE 3 +4 4 SABREWEDGE 4 +5 4 SABREWEDGE 5 +6 4 SABREWEDGE 6 +7 4 SABREWEDGE 7 +8 -1 UNUSED 0 +9 -1 UNUSED 0 +10 -1 UNUSED 0 +11 -1 UNUSED 0 +12 -1 UNUSED 0 +13 -1 UNUSED 0 +14 -1 UNUSED 0 +15 -1 UNUSED 0 +16 2 SABREWEDGE 0 +17 2 SABREWEDGE 1 +18 2 SABREWEDGE 2 +19 2 SABREWEDGE 3 +20 2 SABREWEDGE 4 +21 2 SABREWEDGE 5 +22 2 SABREWEDGE 6 +23 2 SABREWEDGE 7 +24 3 SABREWEDGE 0 +25 3 SABREWEDGE 1 +26 3 SABREWEDGE 2 +27 3 SABREWEDGE 3 +28 3 SABREWEDGE 4 +29 3 SABREWEDGE 5 +30 3 SABREWEDGE 6 +31 3 SABREWEDGE 7 +32 1 SABREWEDGE 0 +33 1 SABREWEDGE 1 +34 1 SABREWEDGE 2 +35 1 SABREWEDGE 3 +36 1 SABREWEDGE 4 +37 1 SABREWEDGE 5 +38 1 SABREWEDGE 6 +39 1 SABREWEDGE 7 +40 0 SABREWEDGE 0 +41 0 SABREWEDGE 1 +42 0 SABREWEDGE 2 +43 0 SABREWEDGE 3 +44 0 SABREWEDGE 4 +45 0 SABREWEDGE 5 +46 0 SABREWEDGE 6 +47 0 SABREWEDGE 7 +48 4 SABRERING 0 +49 4 SABRERING 1 +50 4 SABRERING 2 +51 4 SABRERING 3 +52 4 SABRERING 4 +53 4 SABRERING 5 +54 4 SABRERING 6 +55 4 SABRERING 7 +56 4 SABRERING 8 +57 4 SABRERING 9 +58 4 SABRERING 10 +59 4 SABRERING 11 +60 4 SABRERING 12 +61 4 SABRERING 13 +62 4 SABRERING 14 +63 4 SABRERING 15 +64 3 SABRERING 0 +65 3 SABRERING 1 +66 3 SABRERING 2 +67 3 SABRERING 3 +68 3 SABRERING 4 +69 3 SABRERING 5 +70 3 SABRERING 6 +71 3 SABRERING 7 +72 3 SABRERING 8 +73 3 SABRERING 9 +74 3 SABRERING 10 +75 3 SABRERING 11 +76 3 SABRERING 12 +77 3 SABRERING 13 +78 3 SABRERING 14 +79 3 SABRERING 15 +80 2 SABRERING 0 +81 2 SABRERING 1 +82 2 SABRERING 2 +83 2 SABRERING 3 +84 2 SABRERING 4 +85 2 SABRERING 5 +86 2 SABRERING 6 +87 2 SABRERING 7 +88 2 SABRERING 8 +89 2 SABRERING 9 +90 2 SABRERING 10 +91 2 SABRERING 11 +92 2 SABRERING 12 +93 2 SABRERING 13 +94 2 SABRERING 14 +95 2 SABRERING 15 +96 1 SABRERING 0 +97 1 SABRERING 1 +98 1 SABRERING 2 +99 1 SABRERING 3 +100 1 SABRERING 4 +101 1 SABRERING 5 +102 1 SABRERING 6 +103 1 SABRERING 7 +104 1 SABRERING 8 +105 1 SABRERING 9 +106 1 SABRERING 10 +107 1 SABRERING 11 +108 1 SABRERING 12 +109 1 SABRERING 13 +110 1 SABRERING 14 +111 1 SABRERING 15 +112 0 SABRERING 0 +113 0 SABRERING 1 +114 0 SABRERING 2 +115 0 SABRERING 3 +116 0 SABRERING 4 +117 0 SABRERING 5 +118 0 SABRERING 6 +119 0 SABRERING 7 +120 0 SABRERING 8 +121 0 SABRERING 9 +122 0 SABRERING 10 +123 0 SABRERING 11 +124 0 SABRERING 12 +125 0 SABRERING 13 +126 0 SABRERING 14 +127 0 SABRERING 15 +128 11 FOCALPLANE SCINTRIGHT +129 11 FOCALPLANE SCINTLEFT +130 -1 UNUSED 0 +131 -1 UNUSED 0 +132 -1 UNUSED 0 +133 -1 UNUSED 0 +134 -1 UNUSED 0 +135 11 FOCALPLANE CATHODE +136 11 FOCALPLANE DELAYFL +137 11 FOCALPLANE DELAYFR +138 11 FOCALPLANE DELAYBL +139 11 FOCALPLANE DELAYBR +140 -1 UNUSED 0 +141 11 FOCALPLANE ANODEFRONT +142 -1 UNUSED 0 +143 11 FOCALPLANE ANODEBACK diff --git a/etc/orig_ScalerFile_Feb2021_SABRE.txt b/etc/orig_ScalerFile_Feb2021_SABRE.txt new file mode 100644 index 0000000..f08f5b7 --- /dev/null +++ b/etc/orig_ScalerFile_Feb2021_SABRE.txt @@ -0,0 +1,3 @@ +Format: scaler_param_name assoc_binary_file_name_without_runID +NOTE: As of this version, scalers are pure counting parameters (the total events will be counted and saved as a TParameter with the data) +CH5@V1730_89_Data beamint diff --git a/etc/orig_ShiftMap_Feb2021_SABRE.txt b/etc/orig_ShiftMap_Feb2021_SABRE.txt new file mode 100644 index 0000000..117918c --- /dev/null +++ b/etc/orig_ShiftMap_Feb2021_SABRE.txt @@ -0,0 +1,12 @@ +Format: board channel/keyword shift +NOTE: Do not delete these lines! If no shift is specified for a channel, no shift is applied. Use keyword 'all' to apply a uniform shift to all channels in a single board. Shifts are in ps. +0 all 110000 +1 all 70000 +2 all 70000 +3 all 135000 +4 all 185000 +5 all 195000 +6 all 225000 +7 all 235000 +8 0 650000 +8 1 650000 diff --git a/example/.gitignore b/example/.gitignore new file mode 100644 index 0000000..bf58d4e --- /dev/null +++ b/example/.gitignore @@ -0,0 +1,2 @@ +###Keep this dir### +!.gitignore diff --git a/example/EventBuilderGuide.pdf b/example/EventBuilderGuide.pdf new file mode 100644 index 0000000..4231741 Binary files /dev/null and b/example/EventBuilderGuide.pdf differ diff --git a/example/analyzed/.gitignore b/example/analyzed/.gitignore new file mode 100644 index 0000000..bf58d4e --- /dev/null +++ b/example/analyzed/.gitignore @@ -0,0 +1,2 @@ +###Keep this dir### +!.gitignore diff --git a/example/cuts/.gitignore b/example/cuts/.gitignore new file mode 100644 index 0000000..bf58d4e --- /dev/null +++ b/example/cuts/.gitignore @@ -0,0 +1,2 @@ +###Keep this dir### +!.gitignore diff --git a/example/fast/.gitignore b/example/fast/.gitignore new file mode 100644 index 0000000..bf58d4e --- /dev/null +++ b/example/fast/.gitignore @@ -0,0 +1,2 @@ +###Keep this dir### +!.gitignore diff --git a/example/histograms/.gitignore b/example/histograms/.gitignore new file mode 100644 index 0000000..bf58d4e --- /dev/null +++ b/example/histograms/.gitignore @@ -0,0 +1,2 @@ +###Keep this dir### +!.gitignore diff --git a/example/raw_binary/.gitignore b/example/raw_binary/.gitignore new file mode 100644 index 0000000..bf58d4e --- /dev/null +++ b/example/raw_binary/.gitignore @@ -0,0 +1,2 @@ +###Keep this dir### +!.gitignore diff --git a/example/raw_binary/run_75.tar.gz b/example/raw_binary/run_75.tar.gz new file mode 100644 index 0000000..4df59f4 Binary files /dev/null and b/example/raw_binary/run_75.tar.gz differ diff --git a/example/raw_root/.gitignore b/example/raw_root/.gitignore new file mode 100644 index 0000000..bf58d4e --- /dev/null +++ b/example/raw_root/.gitignore @@ -0,0 +1,2 @@ +###Keep this dir### +!.gitignore diff --git a/example/sorted/.gitignore b/example/sorted/.gitignore new file mode 100644 index 0000000..bf58d4e --- /dev/null +++ b/example/sorted/.gitignore @@ -0,0 +1,2 @@ +###Keep this dir### +!.gitignore diff --git a/example/temp_binary/.gitignore b/example/temp_binary/.gitignore new file mode 100644 index 0000000..bf58d4e --- /dev/null +++ b/example/temp_binary/.gitignore @@ -0,0 +1,2 @@ +###Keep this dir### +!.gitignore diff --git a/include/.gitignore b/include/.gitignore new file mode 100644 index 0000000..57f1fb1 --- /dev/null +++ b/include/.gitignore @@ -0,0 +1,5 @@ +###ignore pch### +*.gch + +###include this### +!.gitignore diff --git a/include/ChannelMap.h b/include/ChannelMap.h new file mode 100644 index 0000000..ca8be59 --- /dev/null +++ b/include/ChannelMap.h @@ -0,0 +1,57 @@ +/* + ChannelMap.h + Class which acts as the go between for global compass channels (board#*16 + channel) and + physical detector information. Used in the event builder to assign compass data to real values + in a simple way. Takes in a definition file and parses it into an unordered_map container. + + Written by G.W. McCann Oct. 2020 +*/ +#ifndef CHANNELMAP_H +#define CHANNELMAP_H + +struct Channel { + int detectorType; //What kind of detector we're looking at + int detectorID; //Which specific detector we're looking at + int detectorPart; //Which specific part we're looking at +}; + +//Detector part/type identifiers for use in the code +enum DetAttribute { + FOCALPLANE, + SCINTLEFT, + SCINTRIGHT, + ANODEFRONT, + ANODEBACK, + DELAYFR, + DELAYFL, + DELAYBR, + DELAYBL, + CATHODE, + MONITOR, + SABRERING = 88, //These are offset to avoid interference at the variable mapping phase + SABREWEDGE = 99 //Just don't add any new attributes with values greater than 88 +}; + + +class ChannelMap { + +public: + typedef std::unordered_map Containter; + typedef std::unordered_map::iterator Iterator; + + ChannelMap(); + ChannelMap(const std::string& filename); + ~ChannelMap(); + bool FillMap(const std::string& filename); + inline const Containter* GetCMap() { return &cmap; }; + inline Iterator FindChannel(int key) { return cmap.find(key); }; + inline Iterator End() { return cmap.end(); }; + inline bool IsValid() { return is_valid; }; + +private: + Containter cmap; + bool is_valid; +}; + + +#endif diff --git a/include/CompassFile.h b/include/CompassFile.h new file mode 100644 index 0000000..5b00007 --- /dev/null +++ b/include/CompassFile.h @@ -0,0 +1,66 @@ +/* + CompassFile.h + Wrapper class around a shared pointer to an ifstream. Here the shared pointer is used + to overcome limitations of the ifstream class, namely that it is written such that ifstream + cannot be modified by move semantics. Contains all information needed to parse a single binary + CompassFile. Currently has a class wide defined buffer size; may want to make this user input + in the future. + + Written by G.W. McCann Oct. 2020 +*/ +#ifndef COMPASSFILE_H +#define COMPASSFILE_H + +#include "CompassHit.h" +#include "ShiftMap.h" +#include + +class CompassFile { +public: + CompassFile(); + CompassFile(const std::string& filename); + CompassFile(const std::string& filename, int bsize); + ~CompassFile(); + void Open(const std::string& filename); + void Close(); + inline bool IsOpen() { return m_file->is_open(); }; + bool GetNextHit(); + inline CompassHit GetCurrentHit() const { return m_currentHit; }; + inline std::string GetName() { return m_filename; }; + inline bool CheckHitHasBeenUsed() { return hitUsedFlag; }; //query to find out if we've used the current hit + inline void SetHitHasBeenUsed() { hitUsedFlag = true; }; //flip the flag to indicate the current hit has been used + inline bool IsEOF() { return eofFlag; }; //see if we've read all available data + inline bool* GetUsedFlagPtr() { return &hitUsedFlag; }; + inline void AttachShiftMap(ShiftMap* map) { m_smap = map; }; + inline unsigned int GetSize() { return m_size; }; + inline unsigned int GetNumberOfHits() { return m_nHits; }; + + +private: + int GetHitSize(); + void ParseNextHit(); + void GetNextBuffer(); + + using Buffer = std::vector; + + using FilePointer = std::shared_ptr; //to make this class copy/movable + + std::string m_filename; + Buffer hitBuffer; + char* bufferIter; + char* bufferEnd; + ShiftMap* m_smap; //NOT owned by CompassFile. DO NOT delete + bool hitUsedFlag; + int bufsize = 200000; //size of the buffer in hits + int hitsize = 24; //size of a CompassHit in bytes (without alignment padding) + int m_buffersize; + CompassHit m_currentHit; + FilePointer m_file; + bool eofFlag; + unsigned int m_size; //size of the file in bytes + unsigned int m_nHits; //number of hits in the file (m_size/24) + +}; + + +#endif diff --git a/include/CompassHit.h b/include/CompassHit.h new file mode 100644 index 0000000..45eda7f --- /dev/null +++ b/include/CompassHit.h @@ -0,0 +1,14 @@ +#ifndef COMPASS_HIT_H +#define COMPASS_HIT_H + +struct CompassHit { + UShort_t board = 400; + UShort_t channel = 400; + ULong64_t timestamp = 0; + UShort_t lgate = 0; + UShort_t sgate = 0; + UInt_t flags = 0; + UInt_t Ns = 0; +}; + +#endif diff --git a/include/CompassRun.h b/include/CompassRun.h new file mode 100644 index 0000000..7684972 --- /dev/null +++ b/include/CompassRun.h @@ -0,0 +1,69 @@ +/* + CompassRun.h + Class designed as abstraction of a collection of binary files that represent the total data in a single + Compass data run. It handles the user input (shift maps, file collection etc.) and creates a list of + CompassFiles from which to draw data. It then draws data from these files, organizes them in time, + and writes to a ROOT file for further processing. + + Written by G.W. McCann Oct. 2020 +*/ +#ifndef COMPASSRUN_H +#define COMPASSRUN_H + +#include "CompassFile.h" +#include "DataStructs.h" +#include "RunCollector.h" +#include "ShiftMap.h" +#include +#include +#include + +class CompassRun { +public: + CompassRun(); + CompassRun(const std::string& dir); + ~CompassRun(); + inline void SetDirectory(const std::string& dir) { directory = dir; }; + inline void SetScalerInput(const std::string& filename) { m_scalerinput = filename; }; + inline void SetRunNumber(int n) { runNum = n; }; + inline void SetShiftMap(const std::string& filename) { m_smap.SetFile(filename); }; + void Convert2RawRoot(const std::string& name); + void Convert2SortedRoot(const std::string& name, const std::string& mapfile, double window); + void Convert2FastSortedRoot(const std::string& name, const std::string& mapfile, double window, double fsi_window, double fic_window); + void Convert2SlowAnalyzedRoot(const std::string& name, const std::string& mapfile, double window, + int zt, int at, int zp, int ap, int ze, int ae, double bke, double b, double theta); + void Convert2FastAnalyzedRoot(const std::string& name, const std::string& mapfile, double window, double fsi_window, double fic_window, + int zt, int at, int zp, int ap, int ze, int ae, double bke, double b, double theta); + + inline void AttachProgressBar(TGProgressBar* pb) { m_pb = pb; }; + +private: + bool GetBinaryFiles(); + bool GetHitsFromFiles(); + void SetScalers(); + void ReadScalerData(const std::string& filename); + void SetProgressBar(); + + std::string directory, m_scalerinput; + std::vector m_datafiles; + unsigned int startIndex; //this is the file we start looking at; increases as we finish files. + ShiftMap m_smap; + std::unordered_map> m_scaler_map; //maps scaler files to the TParameter to be saved + + //Potential branch variables + CompassHit hit; + CoincEvent event; + ProcessedEvent pevent; + + //what run is this + int runNum; + unsigned int m_totalHits; + + //Scaler switch + bool m_scaler_flag; + + //GUI progress bar, if attached + TGProgressBar* m_pb; +}; + +#endif diff --git a/include/CutHandler.h b/include/CutHandler.h new file mode 100644 index 0000000..430b783 --- /dev/null +++ b/include/CutHandler.h @@ -0,0 +1,27 @@ +#ifndef CUTHANDLER_H +#define CUTHANDLER_H + +#include "DataStructs.h" + +class CutHandler { +public: + CutHandler(); + CutHandler(const std::string& filename); + ~CutHandler(); + void SetCuts(const std::string& filename); + bool IsValid() { return validFlag; }; + bool IsInside(ProcessedEvent* eaddress); + std::vector GetCuts() { return cut_array; }; + +private: + void InitVariableMap(); + + std::vector cut_array; + std::vector file_array; + std::unordered_map varmap; + bool validFlag; + ProcessedEvent m_event; + +}; + +#endif \ No newline at end of file diff --git a/include/DataStructs.h b/include/DataStructs.h new file mode 100644 index 0000000..de97aef --- /dev/null +++ b/include/DataStructs.h @@ -0,0 +1,69 @@ +/*DataStructs.h + *Data structures for analysis. To be implemented as a dictionary for ROOT in LinkDef + *Based on: FocalPlane_SABRE.h + *Gordon M. Oct. 2019 + */ +#ifndef DATA_STRUCTS_H +#define DATA_STRUCTS_H + +using namespace std; + +struct DPPChannel { + Double_t Timestamp; + Int_t Channel, Board, Energy, EnergyShort; + Int_t Flags; +}; + +struct DetectorHit { + Double_t Long=-1, Short=-1, Time=-1; + Int_t Ch=-1; +}; + +struct SabreDetector { + vector rings; + vector wedges; +}; + +struct FPDetector { + vector delayFL, delayFR, delayBL, delayBR; + vector anodeF, anodeB, scintL, scintR, cathode; + vector monitor; +}; + +struct CoincEvent { + FPDetector focalPlane; + SabreDetector sabreArray[5]; //index = ChannelMap Id# -1 +}; + +struct ProcessedEvent { + Double_t fp1_tdiff = -1e6, fp2_tdiff = -1e6, fp1_tsum = -1, fp2_tsum = -1, + fp1_tcheck = -1, fp2_tcheck = -1; + Double_t fp1_y=-1, fp2_y=-1; + Double_t anodeFront = -1, anodeBack = -1, scintRight = -1, scintLeft = -1; + Double_t scintRightShort = -1, scintLeftShort = -1; + Double_t cathode = -1; + Double_t xavg = -1e6, x1 = -1e6, x2 = -1e6; + Double_t theta = -1e6; + Double_t sabreRingE[5] = {-1,-1,-1,-1,-1}, sabreWedgeE[5] = {-1,-1,-1,-1,-1}; + Double_t sabreRingChannel[5] = {-1,-1,-1,-1,-1}, sabreWedgeChannel[5] = {-1,-1,-1,-1,-1}; + Double_t sabreRingTime[5] = {-1,-1,-1,-1,-1}, sabreWedgeTime[5] = {-1,-1,-1,-1,-1}; + + Double_t delayFrontRightE = -1, delayFrontLeftE = -1; + Double_t delayBackRightE = -1, delayBackLeftE = -1; + Double_t delayFrontRightShort = -1, delayFrontLeftShort = -1; + Double_t delayBackRightShort = -1, delayBackLeftShort = -1; + Double_t anodeFrontTime = -1, anodeBackTime = -1; + Double_t scintRightTime = -1, scintLeftTime = -1; + Double_t delayFrontMaxTime = -1, delayBackMaxTime = -1; + Double_t delayFrontLeftTime = -1, delayFrontRightTime = -1; + Double_t delayBackLeftTime = -1, delayBackRightTime = -1; + Double_t cathodeTime = -1; + + Double_t monitorE = -1, monitorShort = -1; + Double_t monitorTime = -1; + + + SabreDetector sabreArray[5]; //index = ChannelMap Id# -1 +}; + +#endif diff --git a/include/EVBMainFrame.h b/include/EVBMainFrame.h new file mode 100644 index 0000000..f600c1d --- /dev/null +++ b/include/EVBMainFrame.h @@ -0,0 +1,102 @@ +#ifndef EVBMAINFRAME_H +#define EVBMAINFRAME_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "GWMEventBuilder.h" + + +class EVBMainFrame : public TGMainFrame { +public: + EVBMainFrame(const TGWindow* p, UInt_t w, UInt_t h); + virtual ~EVBMainFrame(); + void CloseWindow(); + void HandleMenuSelection(int id); + void DoOpenWorkdir(); + void DoOpenCMapfile(); + void DoOpenSMapfile(); + void DoOpenScalerfile(); + void DoOpenCutfile(); + void DoRun(); + void HandleTypeSelection(int box, int entry); + bool SetParameters(); + void DisplayWorkdir(const char* dir); + void DisplayCMap(const char* file); + void DisplaySMap(const char* file); + void DisplayScaler(const char* file); + void DisplayCut(const char* file); + void SaveConfig(const char* file); + void LoadConfig(const char* file); + void UpdateWorkdir(); + void UpdateCMap(); + void UpdateSMap(); + void UpdateScaler(); + void UpdateCut(); + void RunPlot(); + void RunMerge(const char* dir, const char* file); + void DisableAllInput(); + void EnableAllInput(); + + + enum WidgetId { + WORKDIR, + CMAP, + SMAP, + SCALER, + CUT, + PLOTF, + BFIELD, + BKE, + THETA, + ZT, + AT, + ZP, + AP, + ZE, + AE, + SLOWWIND, + FASTWIND_IC, + FASTWIND_SABRE, + TYPEBOX, + RMIN, + RMAX, + M_LOAD_CONFIG, + M_SAVE_CONFIG, + M_EXIT + }; + + ClassDef(EVBMainFrame, 0); + +private: + TGTextButton *fRunButton, *fOpenWorkButton, *fOpenCMapButton, *fOpenSMapButton, *fOpenScalerButton, *fOpenCutButton; + TGTextEntry *fWorkField; + TGTextEntry *fCMapField, * fSMapField; + TGTextEntry *fScalerField, *fCutField; + TGComboBox *fTypeBox; + + TGNumberEntryField *fZTField, *fATField, *fZPField, *fAPField, *fZEField, *fAEField; + TGNumberEntryField *fBField, *fBKEField, *fThetaField; + TGNumberEntryField *fSlowWindowField, *fFastICField, *fFastSABREField; + TGNumberEntryField *fRMinField, *fRMaxField; + + TGHProgressBar* fProgressBar; + + TGPopupMenu *fFileMenu; + + GWMEventBuilder fBuilder; + + int counter; + UInt_t MAIN_W, MAIN_H; + + +}; +#endif diff --git a/include/EventBuilder.h b/include/EventBuilder.h new file mode 100644 index 0000000..4c41c9b --- /dev/null +++ b/include/EventBuilder.h @@ -0,0 +1,28 @@ +#ifndef EVENTBUILDER_H +#define EVENTBUILDER_H + +//STD Library +#include +#include +#include +#include +#include +#include +#include + + +//ROOT +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#endif diff --git a/include/FP_kinematics.h b/include/FP_kinematics.h new file mode 100644 index 0000000..c4f76d7 --- /dev/null +++ b/include/FP_kinematics.h @@ -0,0 +1,42 @@ +/* + + Functions for the calculation of the kinematic shift of the FP + for the SESPS @ FSU. + +>>> Delta_Z(int...) returns the shift of the FP in the z-direction in + cm. A negative (<0) delta-z is defined as a shift towards the + magnet. + + Arguments: Delta_Z(int ZT, int AT, int ZP, int AP, int ZE, int AE, + double EP, double angle, double B), + where Z,A are atomic number and mass number for each particle, + EP is the KE of the projectile (i.e. beam energy in MeV), + angle is the spectrograph angle (in degrees), + B is the field in Gauss. + + +>>> Wire_Dist() returns the distance (in cm) between the wires for + the calculation of relative weights between FP1 and FP2. + + //format: T(P,E)R + // i.e., T = target, + // P = projectile, + // E = ejectile, + // R = residual; + //expects angle in degs, B in G, masses and KE in MeV + + KGH -- Jul19 + +*/ + +#ifndef FP_KINEMATICS +#define FP_KINEMATICS + +//requires (Z,A) for T, P, and E, as well as energy of P, +// spectrograph angle of interest, and field value +double Delta_Z(int ZT, int AT, int ZP, int AP, int ZE, int AE, + double EP, double angle, double B); + +double Wire_Dist(); + +#endif diff --git a/include/FastSort.h b/include/FastSort.h new file mode 100644 index 0000000..6c44be8 --- /dev/null +++ b/include/FastSort.h @@ -0,0 +1,33 @@ +/* + *Goal is to provide a fast coinc window for rejecting si. + *And a way to orgainize focal plane data within slow cw. + * + */ +#ifndef FASTSORT_H +#define FASTSORT_H + +#include "DataStructs.h" +#include + +class FastSort { + + public: + FastSort(float si_windowSize, float ion_windowSize); + ~FastSort(); + std::vector GetFastEvents(CoincEvent& event); + + private: + void ResetSABRE(); + void ResetFocalPlane(); + void ProcessSABRE(unsigned int scint_index); + void ProcessFocalPlane(unsigned int scint_index, unsigned int ionch_index); + + float si_coincWindow, ion_coincWindow; + CoincEvent *event_address, slowEvent; + CoincEvent fastEvent, blank; + SabreDetector sblank; + FPDetector fpblank; + +}; + +#endif diff --git a/include/FileViewFrame.h b/include/FileViewFrame.h new file mode 100644 index 0000000..237c533 --- /dev/null +++ b/include/FileViewFrame.h @@ -0,0 +1,46 @@ +/* + + FileViewFrame.h + Wrapper class on a TGTransientFrame (temporary frame assoc. with a main frame) + Designed to graphically display directories and files for selection. Takes in a type + to specify the signal pathing. + + Written by G.W. McCann Sep. 2020 + +*/ + +#ifndef FILEVIEWFRAME_H +#define FILEVIEWFRAME_H + +#include "EVBMainFrame.h" +#include +#include +#include +#include +#include + +class FileViewFrame { + + RQ_OBJECT("FileViewFrame"); //ROOT wrapping into the gui environment +public: + FileViewFrame(const TGWindow* p, const TGFrame* main, UInt_t w, UInt_t h, EVBMainFrame *parent, int type); + virtual ~FileViewFrame(); + void CloseWindow(); + void DoOk(); + void DoCancel(); + void DoDoubleClick(TGLVEntry* entry, int id); + void DisplayDir(const TString& name); + void SendText(const char* text); // *SIGNAL* + ClassDef(FileViewFrame, 0); //ROOT requirement + +private: + TGTransientFrame *fMain; + TGTextButton *fOkButton, *fCancelButton; + TGTextEntry *fNameField; + TGFileContainer *fContents; + TGListView *fViewer; + std::string suffix; + bool dirFlag; +}; + +#endif \ No newline at end of file diff --git a/include/FlagHandler.h b/include/FlagHandler.h new file mode 100644 index 0000000..bbce132 --- /dev/null +++ b/include/FlagHandler.h @@ -0,0 +1,59 @@ +#ifndef FLAGHANDLER_H +#define FLAGHANDLER_H + +#include + +struct FlagCount { + long total_counts=0; + long dead_time=0; + long time_roll=0; + long time_reset=0; + long fake_event=0; + long mem_full=0; + long trig_lost=0; + long n_trig_lost=0; + long sat_in_gate=0; + long trig_1024=0; + long sat_input=0; + long n_trig_count=0; + long event_not_matched=0; + long fine_time=0; + long pile_up=0; + long pll_lock_loss=0; + long over_temp=0; + long adc_shutdown=0; +}; + +class FlagHandler { +public: + FlagHandler(); + FlagHandler(const std::string& filename); + ~FlagHandler(); + void CheckFlag(int board, int channel, int flag); + + const int DEAD_TIME = 0x00000001; + const int TIME_ROLLOVER = 0x00000002; + const int TIME_RESET = 0x00000004; + const int FAKE_EVENT = 0x00000008; + const int MEM_FULL = 0x00000010; + const int TRIG_LOST = 0x00000020; + const int N_TRIG_LOST = 0x00000040; + const int SATURATING_IN_GATE = 0x00000080; + const int TRIG_1024_COUNTED = 0x00000100; + const int SATURATING_INPUT = 0x00000400; + const int N_TRIG_COUNTED = 0x00000800; + const int EVENT_NOT_MATCHED = 0x00001000; + const int FINE_TIME = 0x00004000; + const int PILE_UP = 0x00008000; + const int PLL_LOCK_LOSS = 0x00080000; + const int OVER_TEMP = 0x00100000; + const int ADC_SHUTDOWN = 0x00200000; + +private: + std::ofstream log; + std::map event_count_map; + + void WriteLog(); +}; + +#endif diff --git a/include/GWMEventBuilder.h b/include/GWMEventBuilder.h new file mode 100644 index 0000000..f4f5b8c --- /dev/null +++ b/include/GWMEventBuilder.h @@ -0,0 +1,102 @@ +/* + GWMEventBuilder.h + Class which represents the API of the event building environment. Wraps together the core concepts + of the event builder, from conversion to plotting. Even intended to be able to archive data. + Currently under development. + + Written by G.W. McCann Oct. 2020 +*/ +#ifndef GWMEVENTBUILDER_H +#define GWMEVENTBUILDER_H + +#include "RunCollector.h" +#include + +class GWMEventBuilder { +public: + GWMEventBuilder(); + ~GWMEventBuilder(); + + bool ReadConfigFile(const std::string& filename); + void WriteConfigFile(const std::string& filename); + + void PlotHistograms(); + void MergeROOTFiles(); + void Convert2SortedRoot(); + void Convert2FastSortedRoot(); + void Convert2RawRoot(); + void Convert2SlowAnalyzedRoot(); + void Convert2FastAnalyzedRoot(); + + inline void SetAnalysisType(int type) { m_analysisType = type;}; + inline int GetAnalysisType() { return m_analysisType; }; + + inline void SetRunRange(int rmin, int rmax) { m_rmin = rmin; m_rmax = rmax; }; + inline void SetWorkDirectory(const std::string& fullpath) { m_workspace = fullpath; }; + inline void SetChannelMap(const std::string& name) { m_mapfile = name; }; + inline void SetBoardShiftFile(const std::string& name) { m_shiftfile = name; }; + inline void SetSlowCoincidenceWindow(double window) { m_SlowWindow = window; }; + inline void SetFastWindowIonChamber(double window) { m_FastWindowIonCh = window; }; + inline void SetFastWindowSABRE(double window) { m_FastWindowSABRE = window; }; + inline void SetCutList(const std::string& name) { m_cutList = name; }; + inline void SetScalerFile(const std::string& fullpath) { m_scalerfile = fullpath; }; + bool SetKinematicParameters(int zt, int at, int zp, int ap, int ze, int ae, double b, double theta, double bke); + + inline int GetRunMin() {return m_rmin;}; + inline int GetRunMax() {return m_rmax;}; + inline std::string GetWorkDirectory() {return m_workspace;}; + inline int GetTargetZ() {return m_ZT;}; + inline int GetTargetA() {return m_AT;}; + inline int GetProjectileZ() {return m_ZP;}; + inline int GetProjectileA() {return m_AP;}; + inline int GetEjectileZ() {return m_ZE;}; + inline int GetEjectileA() {return m_AE;}; + inline int GetResidualZ() {return m_ZR;}; + inline int GetResidualA() {return m_AR;}; + inline double GetBField() {return m_B;}; + inline double GetBeamKE() {return m_BKE;}; + inline double GetTheta() {return m_Theta;}; + inline double GetSlowCoincidenceWindow() { return m_SlowWindow; }; + inline double GetFastWindowIonChamber() { return m_FastWindowIonCh; }; + inline double GetFastWindowSABRE() { return m_FastWindowSABRE; }; + inline std::string GetChannelMap() { return m_mapfile; }; + inline std::string GetBoardShiftFile() { return m_shiftfile; }; + inline std::string GetCutList() { return m_cutList; }; + inline std::string GetScalerFile() { return m_scalerfile; }; + + inline void AttachProgressBar(TGProgressBar* pb) { m_pb = pb; }; + + enum BuildType { + CONVERT, + CONVERT_S, + CONVERT_SA, + CONVERT_F, + CONVERT_FA, + MERGE, + PLOT + }; + +private: + + int m_rmin, m_rmax; + int m_ZT, m_AT, m_ZP, m_AP, m_ZE, m_AE, m_ZR, m_AR; + double m_B, m_Theta, m_BKE; + + std::string m_workspace; + std::string m_mapfile, m_shiftfile; + std::string m_cutList; + std::string m_scalerfile; + + double m_SlowWindow; + double m_FastWindowIonCh; + double m_FastWindowSABRE; + + int m_analysisType; + + RunCollector grabber; + + TGProgressBar* m_pb; + +}; + +#endif diff --git a/include/LinkDef_Gui.h b/include/LinkDef_Gui.h new file mode 100644 index 0000000..6cdfc99 --- /dev/null +++ b/include/LinkDef_Gui.h @@ -0,0 +1,7 @@ +#ifdef __CLING__ + + +#pragma link C++ class EVBMainFrame+; +#pragma link C++ class FileViewFrame+; + +#endif \ No newline at end of file diff --git a/include/LinkDef_sps.h b/include/LinkDef_sps.h new file mode 100644 index 0000000..b32a7a8 --- /dev/null +++ b/include/LinkDef_sps.h @@ -0,0 +1,11 @@ +#ifdef __CLING__ + +#pragma link C++ struct DPPChannel+; +#pragma link C++ struct DetectorHit+; +#pragma link C++ class std::vector+; +#pragma link C++ struct SabreDetector+; +#pragma link C++ struct FPDetector+; +#pragma link C++ struct CoincEvent+; +#pragma link C++ struct ProcessedEvent+; + +#endif diff --git a/include/MassLookup.h b/include/MassLookup.h new file mode 100644 index 0000000..1e431ea --- /dev/null +++ b/include/MassLookup.h @@ -0,0 +1,34 @@ +/* + +MassLookup.h +Generates a map for isotopic masses using AMDC data; subtracts away +electron mass from the atomic mass by default. Creates a static global instance +of this map (MASS) for use throughout code it is included into. + +Written by G.W. McCann Aug. 2020 + +*/ +#ifndef MASS_LOOKUP_H +#define MASS_LOOKUP_H + +class MassLookup { + + public: + MassLookup(); + ~MassLookup(); + double FindMass(int Z, int A); + std::string FindSymbol(int Z, int A); + + private: + std::unordered_map massTable; + std::unordered_map elementTable; + + //constants + static constexpr double u_to_mev = 931.4940954; + static constexpr double electron_mass = 0.000548579909; + +}; + +//static instance for use throught program +static MassLookup MASS; +#endif diff --git a/include/OrderChecker.h b/include/OrderChecker.h new file mode 100644 index 0000000..9f4b360 --- /dev/null +++ b/include/OrderChecker.h @@ -0,0 +1,18 @@ +/* + OrderChecker.h + Very simple class designed to test whether or not a root file is time ordered. + Meant to be used with newly converted from binary data. Only for development. + + Written by G.W. McCann Oct. 2020 +*/ +#ifndef ORDERCHECKER_H +#define ORDERCHECKER_H + +class OrderChecker { +public: + OrderChecker(); + ~OrderChecker(); + bool IsOrdered(const std::string& filename); +}; + +#endif diff --git a/include/RunCollector.h b/include/RunCollector.h new file mode 100644 index 0000000..fa9a63c --- /dev/null +++ b/include/RunCollector.h @@ -0,0 +1,50 @@ +/*RunCollector.h + *Class that searches through a directory looking for files of a specified format. + *Stores all filenames in a vector which can be accessed by other functions/classes for + *further use. Can also use Merge() to combine all files using hadd into a single file. + *Merge() is NOT RECOMMENDED in the analyzer program. + * + *Created Jan2020 by GWM + */ + +#ifndef RUNCOLLECTOR_H +#define RUNCOLLECTOR_H + +#include +#include +#include +#include +#include +#include + +using namespace std; + +class RunCollector { + public: + RunCollector(); + RunCollector(const string& dirname, const string& prefix, const string& suffix); + RunCollector(const string& dirname, const string& prefix, const string& suffix, int min, int max); + ~RunCollector(); + void SetSearchParams(const string& dirname, const string& prefix, const string& suffix, int min, int max); + int Merge_hadd(const string& outname); + int Merge_TChain(const string& outname); + int GrabAllFiles(); + int GrabFilesInRange(); + std::string GrabFile(int runNum); + inline std::string GetSearchDir() {return dir.Data();}; + inline std::string GetSearchPrefix() {return run.Data();}; + inline std::string GetSearchSuffix() {return end.Data();}; + inline int GetRunMin() {return MinRun;}; + inline int GetRunMax() {return MaxRun;}; + vector filelist; + + private: + bool initFlag; + TString dir; + TString run; + TString end; + Int_t MaxRun, MinRun; //user run limits + const Int_t LITERALMAX = 1000; //class run limit +}; + +#endif diff --git a/include/SFPAnalyzer.h b/include/SFPAnalyzer.h new file mode 100644 index 0000000..fee950f --- /dev/null +++ b/include/SFPAnalyzer.h @@ -0,0 +1,46 @@ +/*SFPAnalyzer.h + *Class designed to analyze coincidence events. Currently only implemented for focal plane + *data. Additional changes for SABRE would include this file and the sructure ProcessedEvent + *in DataStructs.h. Based on code written by S. Balak, K. Macon, and E. Good. + * + *Gordon M. Oct. 2019 + * + *Refurbished and updated Jan 2020 by GWM. Now uses both focal plane and SABRE data + */ +#ifndef SFPANALYZER_H +#define SFPANALYZER_H + +#include "DataStructs.h" +#include "FP_kinematics.h" + +using namespace std; + +class SFPAnalyzer { + + public: + SFPAnalyzer(int zt, int at, int zp, int ap, int ze, int ae, double ep, double angle, + double b); + ~SFPAnalyzer(); + ProcessedEvent GetProcessedEvent(CoincEvent& event); + inline void ClearHashTable() { rootObj->Clear(); }; + inline THashTable* GetHashTable() { return rootObj; }; + + private: + void Reset(); //Sets ouput structure back to "zero" + void GetWeights(); //weights for xavg + void AnalyzeEvent(CoincEvent& event); + + /*Fill wrappers for use with THashTable*/ + void MyFill(const string& name, int binsx, double minx, double maxx, double valuex, + int binsy, double miny, double maxy, double valuey); + void MyFill(const string& name, int binsx, double minx, double maxx, double valuex); + + CoincEvent *event_address; //Input branch address + ProcessedEvent pevent, blank; //output branch and reset + + Double_t w1, w2, zfp; + + THashTable *rootObj; //root storage +}; + +#endif diff --git a/include/SFPPlotter.h b/include/SFPPlotter.h new file mode 100644 index 0000000..8a24b89 --- /dev/null +++ b/include/SFPPlotter.h @@ -0,0 +1,53 @@ +/*SFPPlotter.h + *Class for generating histogram files for SPS-SABRE data + *Intended use case is generating a TChain of multiple analyzed files and making + *histograms of the larger data set. + * + *Created Jan 2020 by GWM + */ + +#ifndef SFPCLEANER_H +#define SFPCLEANER_H + +#include "DataStructs.h" +#include "CutHandler.h" +#include + +using namespace std; + +class SFPPlotter { + public: + SFPPlotter(); + SFPPlotter(bool tf); + ~SFPPlotter(); + inline void AttachProgressBar(TGProgressBar* pb) { m_pb = pb; }; + void ApplyCutlist(const string& listname); + void Run(vector files, const string& output); + + private: + void SetProgressBar(long total); + void Chain(vector files); //Form TChain + void MakeUncutHistograms(ProcessedEvent ev); + void MakeCutHistograms(ProcessedEvent ev); + + /*Histogram fill wrapper functions*/ + void MyFill(const string& name, int binsx, double minx, double maxx, double valuex, + int binsy, double miny, double maxy, double valuey); + void MyFill(const string& name, int binsx, double minx, double maxx, double valuex); + + ProcessedEvent *event_address; + + /*ROOT Storage*/ + THashTable *rootObj; + + /*Cuts*/ + CutHandler cutter; + bool cutFlag; + + TChain *chain; + + TGProgressBar* m_pb; //GUI progress + +}; + +#endif diff --git a/include/ShiftMap.h b/include/ShiftMap.h new file mode 100644 index 0000000..64eea5e --- /dev/null +++ b/include/ShiftMap.h @@ -0,0 +1,35 @@ +/* + ShiftMap.h + New class to act a go-between for timestamp shifts to channels. Takes in a + formated file containing data for shifts and then stores them in an unordered_map. + Key is a global compass channel (board#*16 + channel). Shifts in ps. + + Note: Timestamps are now shifted in binary conversion. This means that shifts *MUST* + be stored as Long64_t types. No decimals! + + Written by G.W. McCann Oct. 2020 +*/ +#ifndef SHIFTMAP_H +#define SHIFTMAP_H + +class ShiftMap { +public: + ShiftMap(); + ShiftMap(const std::string& filename); + ~ShiftMap(); + void SetFile(const std::string& filename); + inline bool IsSet() { return is_set; }; + inline std::string GetFilename() { return m_filename; }; + Long64_t GetShift(int gchan); + +private: + void ParseFile(); + + std::string m_filename; + bool is_set; + + std::unordered_map m_map; + +}; + +#endif diff --git a/include/SlowSort.h b/include/SlowSort.h new file mode 100644 index 0000000..7655b61 --- /dev/null +++ b/include/SlowSort.h @@ -0,0 +1,57 @@ +/*SlowSort.h + *Class designed to first time-order raw data, and then based on a given coincidence window + *sort the raw data into coincidence structures. Utilizes dictionary elements DPPChannel and + *CoincEvent. Based on work by S. Balak, K. Macon, and E. Good from LSU. + * + *Gordon M. Oct. 2019 + * + *Refurbished and updated Jan 2020 GWM + */ +#ifndef SLOW_SORT_H +#define SLOW_SORT_H + +#include "CompassHit.h" +#include "DataStructs.h" +#include "ChannelMap.h" +#include + +using namespace std; + +class SlowSort { + + public: + SlowSort(); + SlowSort(double windowSize, const string& mapfile); + ~SlowSort(); + inline void SetWindowSize(double window) { coincWindow = window; }; + inline bool SetMapFile(const std::string& mapfile) { return cmap.FillMap(mapfile); }; + bool AddHitToEvent(CompassHit& mhit); + CoincEvent GetEvent(); + inline TH2F* GetEventStats() { return event_stats; }; + void FlushHitsToEvent(); //For use with *last* hit list + inline bool IsEventReady() { return eventFlag; }; + + private: + void InitVariableMaps(); + void Reset(); + void StartEvent(); + void ProcessEvent(); + + double coincWindow; + vector hitList; + bool eventFlag; + DPPChannel hit; + CoincEvent event; + CoincEvent blank; + + double startTime, previousHitTime; + unordered_map*> fpVMap; + unordered_map*> sabreVMap; + + TH2F* event_stats; + + ChannelMap cmap; + +}; + +#endif diff --git a/include/Stopwatch.h b/include/Stopwatch.h new file mode 100644 index 0000000..af217c1 --- /dev/null +++ b/include/Stopwatch.h @@ -0,0 +1,30 @@ +/* + Stopwatch.h + Simple class designed to provide timing info on parts of the process. + Only for use in development. + + Written by G.W. McCann Oct. 2020 +*/ +#ifndef STOPWATCH_H +#define STOPWATCH_H + +#include + +class Stopwatch { + +public: + Stopwatch(); + ~Stopwatch(); + void Start(); + void Stop(); + double GetElapsedSeconds(); + double GetElapsedMilliseconds(); + +private: + using Time = std::chrono::high_resolution_clock::time_point; + using Clock = std::chrono::high_resolution_clock; + + Time start_time, stop_time; +}; + +#endif \ No newline at end of file diff --git a/input.txt b/input.txt new file mode 100644 index 0000000..b5f7a71 --- /dev/null +++ b/input.txt @@ -0,0 +1,27 @@ +-------Data Location---------- +WorkspaceDirectory: /data1/gwm17/10B3He/Feb2021/ +------------------------------- +------Experimental Inputs------ +ChannelMapFile: /home/gwm17/GWM_EventBuilder/etc/orig_ChannelMap_Feb2021_SABRE.txt +ScalerFile: /home/gwm17/GWM_EventBuilder/etc/orig_ScalerFile_Feb2021_SABRE.txt +CutListFile: /home/gwm17/GWM_EventBuilder/etc/new_CutList_Feb202110B3hea.txt +ZT: 5 +AT: 10 +ZP: 2 +AP: 3 +ZE: 2 +AE: 4 +BField(G): 8925 +BeamKE(MeV): 24 +Theta(deg): 15 +------------------------------- +-------Timing Information------ +BoardOffsetFile: /home/gwm17/GWM_EventBuilder/etc/orig_ShiftMap_Feb2021_SABRE.txt +SlowCoincidenceWindow(ps): 1.5e+06 +FastCoincidenceWindow_IonCh(ps): 250000 +FastCoincidenceWindow_SABRE(ps): 150000 +------------------------------- +--------Run Information-------- +MinRun: 99 +MaxRun: 99 +------------------------------- diff --git a/lib/.gitignore b/lib/.gitignore new file mode 100644 index 0000000..647adb9 --- /dev/null +++ b/lib/.gitignore @@ -0,0 +1,7 @@ +###ignore these files#### +*.dylib +*.so +*.pcm + +###keep this one### +!.gitignore diff --git a/makefile b/makefile new file mode 100644 index 0000000..a40e267 --- /dev/null +++ b/makefile @@ -0,0 +1,96 @@ +OS_NAME := $(shell uname -s) +CC=g++ +ROOTCFLAGS= `root-config --cflags` +ROOTGLIBS=`root-config --glibs` + +ROOTDICT_INCL=./ +CFLAGS= -std=c++11 -fPIC -g -Wall $(ROOTCFLAGS) +INCLDIR=./include +SRCDIR=./src +BINDIR=./bin +LIBDIR=./lib +CPPFLAGS= -I$(INCLDIR) +LDFLAGS=$(ROOTGLIBS) + +EVBSRCDIR=$(SRCDIR)/evb +GUISRCDIR=$(SRCDIR)/gui + +OBJDIR=./objs + +EVBSRC=$(wildcard $(EVBSRCDIR)/*.cpp) +GUISRC=$(wildcard $(GUISRCDIR)/*.cpp) +EVBOBJS=$(EVBSRC:$(EVBSRCDIR)/%.cpp=$(OBJDIR)/%.o) +GUIOBJS=$(GUISRC:$(GUISRCDIR)/%.cpp=$(OBJDIR)/%.o) + +DICT_PAGES= $(INCLDIR)/DataStructs.h $(INCLDIR)/LinkDef_sps.h +DICT=$(SRCDIR)/sps_dict.cxx +DICTOBJ=$(OBJDIR)/sps_dict.o +DICTLIB=$(LIBDIR)/libSPSDict + +GDICT_PAGES=$(INCLDIR)/EVBMainFrame.h $(INCLDIR)/FileViewFrame.h $(INCLDIR)/LinkDef_Gui.h +GDICT=$(SRCDIR)/gui_dict.cxx +GDICTOBJ=$(OBJDIR)/gui_dict.o + +#entry points +EVBGUIMSRC=$(SRCDIR)/gui_main.cpp +EVBGUIMAIN=$(OBJDIR)/gui_main.o + +EVBMSRC=$(SRCDIR)/main.cpp +EVBMAIN=$(OBJDIR)/main.o + +PCH_FILE=$(INCLDIR)/EventBuilder.h +PCH=$(INCLDIR)/EventBuilder.h.gch + +EVBEXE=$(BINDIR)/GWMEVB +EVBCLEXE=$(BINDIR)/GWMEVB_CL + +EXES = $(EVBEXE) $(EVBCLEXE) +OBJS = $(EVBOBJS) $(GUIOBJS) $(DICTOBJ) $(GDICTOBJ) $(EVBGUIMAIN) $(EVBMAIN) + + +.PHONY: all clean clean_header + +all: $(PCH) $(EVBEXE) $(EVBCLEXE) + +$(PCH): $(PCH_FILE) + $(CC) $(CFLAGS) -x c++-header $^ + +$(EVBEXE): $(DICTOBJ) $(GDICTOBJ) $(EVBOBJS) $(GUIOBJS) $(EVBGUIMAIN) + $(CC) $^ -o $@ $(LDFLAGS) + +$(EVBCLEXE): $(DICTOBJ) $(EVBOBJS) $(EVBMAIN) + $(CC) $^ -o $@ $(LDFLAGS) + +$(DICTOBJ): $(DICT) + $(CC) $(CFLAGS) -I $(ROOTDICT_INCL) -o $@ -c $^ +ifeq ($(OS_NAME), Darwin) + $(CC) $(CFLAGS) $(LDFLAGS) $@ -dynamiclib -o $(DICTLIB).dylib + cp $(SRCDIR)/*.pcm $(LIBDIR) +else +ifeq ($(OS_NAME), Linux) + $(CC) $(CFLAGS) $(LDFLAGS) $@ -shared -o $(DICTLIB).so + cp $(SRCDIR)/*.pcm $(LIBDIR) +endif +endif + mv $(SRCDIR)/*.pcm ./$(BINDIR)/ + +$(GDICTOBJ): $(GDICT) + $(CC) $(CFLAGS) -I $(ROOTDICT_INCL) -o $@ -c $^ + mv $(SRCDIR)/*.pcm $(BINDIR)/ + +$(DICT): $(DICT_PAGES) + rootcint -f $@ $^ + +$(GDICT): $(GDICT_PAGES) + rootcint -f $@ $^ + +clean: + $(RM) $(OBJS) $(EXES) $(DICT) $(GDICT) $(DICTLIB) ./$(LIBDIR)/*.pcm ./$(BINDIR)/*.pcm + +clean_header: + $(RM) $(PCH) + +VPATH= $(SRCDIR):$(EVBSRCDIR):$(GUISRCDIR) + +$(OBJDIR)/%.o: %.cpp + $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $^ diff --git a/objs/.gitignore b/objs/.gitignore new file mode 100644 index 0000000..1ce6034 --- /dev/null +++ b/objs/.gitignore @@ -0,0 +1,3 @@ +### dont include any files, but include this dir ### +* +!.gitignore diff --git a/src/.gitignore b/src/.gitignore new file mode 100644 index 0000000..677d3e5 --- /dev/null +++ b/src/.gitignore @@ -0,0 +1,3 @@ +###ignore the root dictionary generated file### +*.cxx +!.gitignore diff --git a/src/evb/ChannelMap.cpp b/src/evb/ChannelMap.cpp new file mode 100644 index 0000000..620edc7 --- /dev/null +++ b/src/evb/ChannelMap.cpp @@ -0,0 +1,72 @@ +/* + ChannelMap.cpp + Class which acts as the go between for global compass channels (board#*16 + channel) and + physical detector information. Used in the event builder to assign compass data to real values + in a simple way. Takes in a definition file and parses it into an unordered_map container. + + Written by G.W. McCann Oct. 2020 +*/ +#include "EventBuilder.h" +#include "ChannelMap.h" + +ChannelMap::ChannelMap() : + is_valid(false) +{ +} + +ChannelMap::ChannelMap(const std::string& name) : + is_valid(false) +{ + FillMap(name); +} + +ChannelMap::~ChannelMap() {} + +bool ChannelMap::FillMap(const std::string& name) { + std::ifstream input(name); + if(!input.is_open()) { + is_valid = false; + return is_valid; + } + std::string junk, type, partname; + int gchan, id; + + std::getline(input, junk); + std::getline(input, junk); + Channel this_chan; + while(input>>gchan) { + //Set default values + this_chan.detectorType = -1; + this_chan.detectorID = -1; + this_chan.detectorPart = -1; + input>>id>>type>>partname; + if(type == "SABRERING") { + this_chan.detectorType = SABRERING; + this_chan.detectorID = id; + this_chan.detectorPart = std::stoi(partname); + } else if(type == "SABREWEDGE") { + this_chan.detectorType = SABREWEDGE; + this_chan.detectorID = id; + this_chan.detectorPart = std::stoi(partname); + } else if (type == "FOCALPLANE") { + this_chan.detectorType = FOCALPLANE; + this_chan.detectorID = id; + if(partname == "SCINTRIGHT") this_chan.detectorPart = SCINTRIGHT; + else if(partname == "SCINTLEFT") this_chan.detectorPart = SCINTLEFT; + else if(partname == "DELAYFR") this_chan.detectorPart = DELAYFR; + else if(partname == "DELAYFL") this_chan.detectorPart = DELAYFL; + else if(partname == "DELAYBR") this_chan.detectorPart = DELAYBR; + else if(partname == "DELAYBL") this_chan.detectorPart = DELAYBL; + else if(partname == "CATHODE") this_chan.detectorPart = CATHODE; + else if(partname == "ANODEFRONT") this_chan.detectorPart = ANODEFRONT; + else if(partname == "ANODEBACK") this_chan.detectorPart = ANODEBACK; + else if(partname == "MONITOR") this_chan.detectorPart = MONITOR; + } + + cmap[gchan] = this_chan; + } + + input.close(); + is_valid = true; + return is_valid; +} diff --git a/src/evb/CompassFile.cpp b/src/evb/CompassFile.cpp new file mode 100644 index 0000000..2d0b55f --- /dev/null +++ b/src/evb/CompassFile.cpp @@ -0,0 +1,151 @@ +/* + CompassFile.cpp + Wrapper class around a shared pointer to an ifstream. Here the shared pointer is used + to overcome limitations of the ifstream class, namely that it is written such that ifstream + cannot be modified by move semantics. Contains all information needed to parse a single binary + CompassFile. Currently has a class wide defined buffer size; may want to make this user input + in the future. + + Written by G.W. McCann Oct. 2020 +*/ +#include "EventBuilder.h" +#include "CompassFile.h" + +CompassFile::CompassFile() : + m_filename(""), bufferIter(nullptr), bufferEnd(nullptr), m_smap(nullptr), hitUsedFlag(true), m_file(std::make_shared()), eofFlag(false) +{ + m_buffersize = bufsize*hitsize; + hitBuffer.resize(m_buffersize); +} + +CompassFile::CompassFile(const std::string& filename) : + m_filename(""), bufferIter(nullptr), bufferEnd(nullptr), m_smap(nullptr), hitUsedFlag(true), m_file(std::make_shared()), eofFlag(false) +{ + m_buffersize = bufsize*hitsize; + hitBuffer.resize(m_buffersize); + Open(filename); +} + +CompassFile::CompassFile(const std::string& filename, int bsize) : + m_filename(""), bufferIter(nullptr), bufferEnd(nullptr), m_smap(nullptr), hitUsedFlag(true), + bufsize(bsize), m_file(std::make_shared()), eofFlag(false) +{ + m_buffersize = bufsize*hitsize; + hitBuffer.resize(m_buffersize); + Open(filename); +} + +CompassFile::~CompassFile() { + Close(); +} + +void CompassFile::Open(const std::string& filename) { + eofFlag = false; + hitUsedFlag = true; + m_filename = filename; + m_file->open(m_filename, std::ios::binary | std::ios::in); + + m_file->seekg(0, std::ios_base::end); + m_size = m_file->tellg(); + m_nHits = m_size/24; + if(m_size == 0) { + eofFlag = true; + } else { + m_file->seekg(0, std::ios_base::beg); + } +} + +void CompassFile::Close() { + if(IsOpen()) { + m_file->close(); + } +} + +int CompassFile::GetHitSize() { + if(!IsOpen()) { + std::cerr<<"Unable to get hit size due to file not being open!"<read(firstHit, 24); + + firstHit += 16; + int nsamples = *((uint32_t*) firstHit); + + m_file->seekg(0, std::ios_base::beg); + + delete firstHit; + + return 24 + nsamples*16; + +} + +/* + GetNextHit() is the function which... gets the next hit + Has to check if the buffer needs refilled/filled for the first time + Upon pulling a hit, sets the UsedFlag to false, letting the next level know + that the hit should be free game. + + If the file cannot be opened, signals as though file is EOF +*/ +bool CompassFile::GetNextHit() { + if(!IsOpen()) return true; + + if((bufferIter == nullptr || bufferIter == bufferEnd) && !IsEOF()) { + GetNextBuffer(); + } + + if(!IsEOF()) { + ParseNextHit(); + hitUsedFlag = false; + } + + return eofFlag; +} + +/* + GetNextBuffer() ... self-explanatory name + Note tht this is where the EOF flag is set. The EOF is only singaled + after the LAST buffer is completely read (i.e literally no more data). ifstream sets its eof + bit upon pulling the last buffer, but this class waits until that entire + last buffer is read to singal EOF (the true end of file). +*/ +void CompassFile::GetNextBuffer() { + + if(m_file->eof()) { + eofFlag = true; + return; + } + + m_file->read(hitBuffer.data(), hitBuffer.size()); + + bufferIter = hitBuffer.data(); + bufferEnd = bufferIter + m_file->gcount(); //one past the last datum + +} + +void CompassFile::ParseNextHit() { + + m_currentHit.board = *((UShort_t*)bufferIter); + bufferIter += 2; + m_currentHit.channel = *((UShort_t*)bufferIter); + bufferIter += 2; + m_currentHit.timestamp = *((ULong64_t*)bufferIter); + bufferIter += 8; + m_currentHit.lgate = *((UShort_t*)bufferIter); + bufferIter += 2; + m_currentHit.sgate = *((UShort_t*)bufferIter); + bufferIter += 2; + m_currentHit.flags = *((UInt_t*)bufferIter); + bufferIter += 4; + m_currentHit.Ns = *((UInt_t*)bufferIter); + bufferIter += 4; + + if(m_smap != nullptr) { //memory safety + int gchan = m_currentHit.channel + m_currentHit.board*16; + m_currentHit.timestamp += m_smap->GetShift(gchan); + } + +} diff --git a/src/evb/CompassRun.cpp b/src/evb/CompassRun.cpp new file mode 100644 index 0000000..65e2c4c --- /dev/null +++ b/src/evb/CompassRun.cpp @@ -0,0 +1,518 @@ +/* + CompassRun.cpp + Class designed as abstraction of a collection of binary files that represent the total data in a single + Compass data run. It handles the user input (shift maps, file collection etc.) and creates a list of + CompassFiles from which to draw data. It then draws data from these files, organizes them in time, + and writes to a ROOT file for further processing. + + Written by G.W. McCann Oct. 2020 + + Updated to also handle scaler data. -- GWM Oct. 2020 +*/ +#include "EventBuilder.h" +#include "CompassRun.h" +#include "RunCollector.h" +#include "SlowSort.h" +#include "FastSort.h" +#include "SFPAnalyzer.h" +#include "FlagHandler.h" + +CompassRun::CompassRun() : + directory(""), m_scalerinput(""), runNum(0), m_scaler_flag(false), m_pb(nullptr) +{ + +} + +CompassRun::CompassRun(const std::string& dir) : + directory(dir), m_scalerinput(""), runNum(0), m_scaler_flag(false), m_pb(nullptr) +{ + +} + +CompassRun::~CompassRun() {} + + +/*Load em into a map*/ +void CompassRun::SetScalers() { + std::ifstream input(m_scalerinput); + if(!input.is_open()) return; + + m_scaler_flag = true; + std::string junk, filename, varname; + Long64_t init = 0; + std::getline(input, junk); + std::getline(input, junk); + m_scaler_map.clear(); + while(input>>filename) { + input>>varname; + filename = directory+filename+"_run_"+to_string(runNum)+".bin"; + m_scaler_map[filename] = TParameter(varname.c_str(), init); + } + input.close(); +} + +bool CompassRun::GetBinaryFiles() { + std::string prefix = ""; + std::string suffix = ".bin"; //binaries + RunCollector grabber(directory, prefix, suffix); + grabber.GrabAllFiles(); + + m_datafiles.clear(); //so that the CompassRun can be reused + m_datafiles.reserve(grabber.filelist.size()); + bool scalerd; + m_totalHits = 0; //reset total run size + + for(auto& entry : grabber.filelist) { + //Handle scaler files, if they exist + if(m_scaler_flag) { + scalerd = false; + for(auto& scaler_pair : m_scaler_map) { + if(std::string(entry.Data()) == scaler_pair.first) { + ReadScalerData(entry.Data()); + scalerd = true; + break; + } + } + if(scalerd) continue; + } + + m_datafiles.emplace_back(entry.Data()); + m_datafiles[m_datafiles.size()-1].AttachShiftMap(&m_smap); + //Any time we have a file that fails to be found, we terminate the whole process + if(!m_datafiles[m_datafiles.size() - 1].IsOpen()) { + return false; + } + m_totalHits += m_datafiles[m_datafiles.size()-1].GetNumberOfHits(); + } + + return true; +} + +/* + Pure counting of scalers. Potential upgrade path to something like + average count rate etc. +*/ +void CompassRun::ReadScalerData(const std::string& filename) { + if(!m_scaler_flag) return; + + Long64_t count; + count = 0; + CompassFile file(filename); + auto& this_param = m_scaler_map[file.GetName()]; + while(true) { + file.GetNextHit(); + if(file.IsEOF()) break; + count++; + } + this_param.SetVal(count); +} + +/* + GetHitsFromFiles() is the function which actually retrieves and sorts the data from the individual + files. There are several tricks which allow this to happen. First is that, after sorting, it is impossible + to determine which file the data originally came from (short of parsing the name of the file against board/channel). + However, we need to let the file know that we want it to pull the next hit. To do this, a pointer to the UsedFlag of the file + is retrieved along with the data. This flag is flipped so that on the next hit cycle a new hit is pulled. Second is the use + of a rolling start index. Once a file has gone EOF, we no longer need it. If this is the first file in the list, we can just skip + that index all together. In this way, the loop can go from N times to N-1 times. +*/ +bool CompassRun::GetHitsFromFiles() { + + std::pair earliestHit = make_pair(CompassHit(), nullptr); + for(unsigned int i=startIndex; iBranch("Board", &hit.board); + outtree->Branch("Channel", &hit.channel); + outtree->Branch("Energy", &hit.lgate); + outtree->Branch("EnergyShort", &hit.sgate); + outtree->Branch("Timestamp", &hit.timestamp); + outtree->Branch("Flags", &hit.flags); + + if(!m_smap.IsSet()) { + std::cerr<<"Bad shift map at CompassRun::Convert()."<Increment(count); + gSystem->ProcessEvents(); + count=0; + } else { + count = 0; + flush_count++; + std::cout<<"\rPercent of run built: "<Fill(); + } + + output->cd(); + outtree->Write(outtree->GetName(), TObject::kOverwrite); + for(auto& entry : m_scaler_map) { + entry.second.Write(); + } + output->Close(); +} + +void CompassRun::Convert2SortedRoot(const std::string& name, const std::string& mapfile, double window) { + TFile* output = TFile::Open(name.c_str(), "RECREATE"); + TTree* outtree = new TTree("SortTree", "SortTree"); + + outtree->Branch("event", &event); + + if(!m_smap.IsSet()) { + std::cerr<<"Bad shift map at CompassRun::Convert()."<Increment(count); + gSystem->ProcessEvents(); + count=0; + } else { + count = 0; + flush_count++; + std::cout<<"\rPercent of run built: "<Fill(); + if(killFlag) break; + } + } + + output->cd(); + outtree->Write(outtree->GetName(), TObject::kOverwrite); + for(auto& entry : m_scaler_map) { + entry.second.Write(); + } + coincidizer.GetEventStats()->Write(); + output->Close(); +} + +void CompassRun::Convert2FastSortedRoot(const std::string& name, const std::string& mapfile, double window, double fsi_window, double fic_window) { + TFile* output = TFile::Open(name.c_str(), "RECREATE"); + TTree* outtree = new TTree("SortTree", "SortTree"); + + outtree->Branch("event", &event); + + if(!m_smap.IsSet()) { + std::cerr<<"Bad shift map at CompassRun::Convert()."< fast_events; + SlowSort coincidizer(window, mapfile); + FastSort speedyCoincidizer(fsi_window, fic_window); + + FlagHandler flagger; + + bool killFlag = false; + unsigned int count = 0, flush = m_totalHits*0.01, flush_count = 0; + if(flush == 0) flush = 1; + while(true) { + count++; + if(count == flush) { + if(m_pb) { + m_pb->Increment(count); + gSystem->ProcessEvents(); + count=0; + } else { + count = 0; + flush_count++; + std::cout<<"\rPercent of run built: "<Fill(); + } + if(killFlag) break; + } + } + + output->cd(); + outtree->Write(outtree->GetName(), TObject::kOverwrite); + for(auto& entry : m_scaler_map) { + entry.second.Write(); + } + coincidizer.GetEventStats()->Write(); + output->Close(); +} + + +void CompassRun::Convert2SlowAnalyzedRoot(const std::string& name, const std::string& mapfile, double window, + int zt, int at, int zp, int ap, int ze, int ae, double bke, double b, double theta) { + + TFile* output = TFile::Open(name.c_str(), "RECREATE"); + TTree* outtree = new TTree("SPSTree", "SPSTree"); + + outtree->Branch("event", &pevent); + + if(!m_smap.IsSet()) { + std::cerr<<"Bad shift map at CompassRun::Convert()."<> parvec; + parvec.reserve(9); + parvec.emplace_back("ZT", zt); + parvec.emplace_back("AT", at); + parvec.emplace_back("ZP", zp); + parvec.emplace_back("AP", ap); + parvec.emplace_back("ZE", ze); + parvec.emplace_back("AE", ae); + parvec.emplace_back("Bfield", b); + parvec.emplace_back("BeamKE", bke); + parvec.emplace_back("Theta", theta); + + bool killFlag = false; + unsigned int count = 0, flush = m_totalHits*0.01, flush_count = 0; + if(flush == 0) flush = 1; + while(true) { + count++; + if(count == flush) { + if(m_pb) { + m_pb->Increment(count); + gSystem->ProcessEvents(); + count=0; + } else { + count = 0; + flush_count++; + std::cout<<"\rPercent of run built: "<Fill(); + if(killFlag) break; + } + } + + output->cd(); + outtree->Write(outtree->GetName(), TObject::kOverwrite); + for(auto& entry : m_scaler_map) { + entry.second.Write(); + } + for(auto& entry : parvec) { + entry.Write(); + } + coincidizer.GetEventStats()->Write(); + analyzer.GetHashTable()->Write(); + analyzer.ClearHashTable(); + output->Close(); +} + +void CompassRun::Convert2FastAnalyzedRoot(const std::string& name, const std::string& mapfile, double window, double fsi_window, double fic_window, + int zt, int at, int zp, int ap, int ze, int ae, double bke, double b, double theta) { + + TFile* output = TFile::Open(name.c_str(), "RECREATE"); + TTree* outtree = new TTree("SPSTree", "SPSTree"); + + outtree->Branch("event", &pevent); + + if(!m_smap.IsSet()) { + std::cerr<<"Bad shift map at CompassRun::Convert()."< fast_events; + SlowSort coincidizer(window, mapfile); + FastSort speedyCoincidizer(fsi_window, fic_window); + SFPAnalyzer analyzer(zt, at, zp, ap, ze, ae, bke, theta, b); + + vector> parvec; + parvec.reserve(9); + parvec.emplace_back("ZT", zt); + parvec.emplace_back("AT", at); + parvec.emplace_back("ZP", zp); + parvec.emplace_back("AP", ap); + parvec.emplace_back("ZE", ze); + parvec.emplace_back("AE", ae); + parvec.emplace_back("Bfield", b); + parvec.emplace_back("BeamKE", bke); + parvec.emplace_back("Theta", theta); + + FlagHandler flagger; + + bool killFlag = false; + unsigned int count = 0, flush = m_totalHits*0.01, flush_count = 0; + if(flush == 0) flush = 1; + while(true) { + count++; + if(count == flush) { + if(m_pb) { + m_pb->Increment(count); + gSystem->ProcessEvents(); + count=0; + } else { + count = 0; + flush_count++; + std::cout<<"\rPercent of run built: "<Fill(); + } + if(killFlag) break; + } + } + + output->cd(); + outtree->Write(outtree->GetName(), TObject::kOverwrite); + for(auto& entry : m_scaler_map) { + entry.second.Write(); + } + for(auto& entry : parvec) { + entry.Write(); + } + coincidizer.GetEventStats()->Write(); + analyzer.GetHashTable()->Write(); + analyzer.ClearHashTable(); + output->Close(); +} + +void CompassRun::SetProgressBar() { + m_pb->SetMax(m_totalHits); + m_pb->SetMin(0); + m_pb->SetPosition(0); + gSystem->ProcessEvents(); +} diff --git a/src/evb/CutHandler.cpp b/src/evb/CutHandler.cpp new file mode 100644 index 0000000..2353463 --- /dev/null +++ b/src/evb/CutHandler.cpp @@ -0,0 +1,90 @@ +#include "EventBuilder.h" +#include "CutHandler.h" + +CutHandler::CutHandler() : + validFlag(false) + { + InitVariableMap(); + } + +CutHandler::CutHandler(const std::string& filename) : + validFlag(false) +{ + SetCuts(filename); + InitVariableMap(); +} + +CutHandler::~CutHandler() { + for(unsigned int i=0; iIsOpen()) file_array[i]->Close(); + } +} + +void CutHandler::SetCuts(const std::string& filename) { + std::ifstream cutlist(filename); + + if(!cutlist.is_open()) { + validFlag = false; + } + + std::string junk, name, fname, varx, vary; + cutlist>>junk>>junk>>junk>>junk; + + cut_array.clear(); + file_array.clear(); + + while(cutlist>>name) { + cutlist>>fname>>varx>>vary; + TFile* file = TFile::Open(fname.c_str(), "READ"); + TCutG* cut = (TCutG*) file->Get("CUTG"); + if(cut) { + cut->SetVarX(varx.c_str()); + cut->SetVarY(vary.c_str()); + cut->SetName(name.c_str()); + cut_array.push_back(cut); + file_array.push_back(file); + } else { + validFlag = false; + std::cerr<<"CutHandler has encountered a bad cut at file: "<GetVarX(); + y = cut->GetVarY(); + auto xentry = varmap.find(x); + auto yentry = varmap.find(y); + if(xentry == varmap.end() || yentry == varmap.end()) { + std::cerr<<"Unmapped variable called in CutHandler::IsInside()! Var names: "<first<<" , "<first<IsInside(*(xentry->second), *(yentry->second))) { + return false; + } + } + + return true; +} diff --git a/src/evb/FP_kinematics.cpp b/src/evb/FP_kinematics.cpp new file mode 100644 index 0000000..9a558c9 --- /dev/null +++ b/src/evb/FP_kinematics.cpp @@ -0,0 +1,103 @@ +/* + + Functions for the calculation of the kinematic shift of the FP + for the SESPS @ FSU. + + +>>> Delta_Z(int...) returns the shift of the FP in the z-direction in + cm. A negative (<0) delta-z is defined as a shift towards the + magnet. + + Arguments: Delta_Z(int ZT, int AT, int ZP, int AP, int ZE, int AE, + double EP, double angle, double B), + where Z,A are atomic number and mass number for each particle, + EP is the KE of the projectile (i.e. beam energy in MeV), + angle is the spectrograph angle (in degrees), + B is the field in Gauss. + +>>> Wire_Dist() returns the distance (in cm) between the wires for + the calculation of relative weights between FP1 and FP2. + + //format: T(P,E)R + // i.e., T = target, + // P = projectile, + // E = ejectile, + // R = residual; + //expects angle in degs, B in G, masses and KE in MeV + + KGH -- Jul19 + + Small modifications for use with the MassLookup class GWM -- Jan 2021 + +*/ + +#include "EventBuilder.h" +#include +#include "MassLookup.h" +#include "FP_kinematics.h" + +//requires (Z,A) for T, P, and E, as well as energy of P, +// spectrograph angle of interest, and field value +double Delta_Z(int ZT, int AT, int ZP, int AP, int ZE, int AE, + double EP, double angle, double B) { + + /* CONSTANTS */ + const double UTOMEV = 931.4940954; //MeV per u; + const double MEVTOJ = 1.60218E-13; //J per MeV + const double RESTMASS_ELECTRON = 0.000548579909; //amu + const double UNIT_CHARGE = 1.602E-19; //Coulombs + const double C = 2.9979E8; //m/s + + /* SESPS-SPECIFIC */ + const double DISP = 1.96; //dispersion (x/rho) + const double MAG = 0.39; //magnification in x + const double DEGTORAD = M_PI/180.; + + int ZR = ZT + ZP - ZE, AR = AT + AP - AE; + double EE=0; //ejectile energy + + double MT=0, MP=0, ME=0, MR=0; //masses (MeV) + + B /= 10000; //convert to tesla + angle *= DEGTORAD; + + MT = MASS.FindMass(ZT, AT) - ZT*RESTMASS_ELECTRON*UTOMEV; + MP = MASS.FindMass(ZP, AP) - ZP*RESTMASS_ELECTRON*UTOMEV; + ME = MASS.FindMass(ZE, AE) - ZE*RESTMASS_ELECTRON*UTOMEV; + MR = MASS.FindMass(ZR, AR) - ZR*RESTMASS_ELECTRON*UTOMEV; + + if (MT*MP*ME*MR == 0) { + std::cerr << "***WARNING: error loading one or more masses; returning 0\n"; + return 0; + } + + double Q = MT + MP - ME - MR; //Q-value + + //kinematics a la Iliadis p.590 + double term1 = sqrt(MP*ME*EP)/(ME + MR)*cos(angle); + double term2 = (EP*(MR - MP) + MR*Q)/(ME + MR); + + EE = term1 + sqrt(term1*term1 + term2); + EE *= EE; + + //momentum + double PE = sqrt(EE*(EE+2*ME)); + + //calculate rho from B a la B*rho = (proj. momentum)/(proj. charge) + double rho = (PE*MEVTOJ)/(ZE*UNIT_CHARGE*C*B)*100; //in cm + + double K; + + K = sqrt(MP*ME*EP/EE); + K *= sin(angle); + + double denom = ME + MR - sqrt(MP*ME*EP/EE)*cos(angle); + + K /= denom; + std::cout<<"Delta Z= "<<-1*rho*DISP*MAG*K< ionch_index) { //Back anode required to move on` + + float anodeRelTime = fabs(slowEvent.focalPlane.anodeB[ionch_index].Time - slowEvent.focalPlane.scintL[scint_index].Time); + if(anodeRelTime > ion_coincWindow) return; //Window check + + fastEvent.focalPlane.anodeB.push_back(slowEvent.focalPlane.anodeB[ionch_index]); + fastEvent.focalPlane.scintL.push_back(slowEvent.focalPlane.scintL[scint_index]); + if(slowEvent.focalPlane.delayFL.size() > ionch_index) { + fastEvent.focalPlane.delayFL.push_back(slowEvent.focalPlane.delayFL[ionch_index]); + } + if(slowEvent.focalPlane.delayFR.size() > ionch_index) { + fastEvent.focalPlane.delayFR.push_back(slowEvent.focalPlane.delayFR[ionch_index]); + } + if(slowEvent.focalPlane.delayBR.size() > ionch_index) { + fastEvent.focalPlane.delayBR.push_back(slowEvent.focalPlane.delayBR[ionch_index]); + } + if(slowEvent.focalPlane.delayBL.size() > ionch_index) { + fastEvent.focalPlane.delayBL.push_back(slowEvent.focalPlane.delayBL[ionch_index]); + } + if(slowEvent.focalPlane.scintR.size() > ionch_index) { + fastEvent.focalPlane.scintR.push_back(slowEvent.focalPlane.scintR[ionch_index]); + } + if(slowEvent.focalPlane.anodeF.size() > ionch_index) { + fastEvent.focalPlane.anodeF.push_back(slowEvent.focalPlane.anodeF[ionch_index]); + } + if(slowEvent.focalPlane.cathode.size() > ionch_index) { + fastEvent.focalPlane.cathode.push_back(slowEvent.focalPlane.cathode[ionch_index]); + } + } +} + +/*Assign a set of SABRE data that falls within the coincidence window*/ +void FastSort::ProcessSABRE(unsigned int scint_index) { + for(int i=0; i<5; i++) { //loop over SABRE silicons + std::vector rings; + std::vector wedges; + + if(slowEvent.sabreArray[i].rings.size() == 0 || slowEvent.sabreArray[i].wedges.size() == 0) continue; //save some time on empties + + /*Dump sabre data that doesnt fall within the fast coincidence window with the scint*/ + for(unsigned int j=0; j FastSort::GetFastEvents(CoincEvent& event) { + slowEvent = event; + std::vector fast_events; + + unsigned int sizeArray[7]; + sizeArray[0] = slowEvent.focalPlane.delayFL.size(); + sizeArray[1] = slowEvent.focalPlane.delayFR.size(); + sizeArray[2] = slowEvent.focalPlane.delayBL.size(); + sizeArray[3] = slowEvent.focalPlane.delayBR.size(); + sizeArray[4] = slowEvent.focalPlane.anodeF.size(); + sizeArray[5] = slowEvent.focalPlane.anodeB.size(); + sizeArray[6] = slowEvent.focalPlane.cathode.size(); + unsigned int maxSize = *max_element(sizeArray, sizeArray+7); + //loop over scints + for(unsigned int i=0; i +#include "GWMEventBuilder.h" +#include "RunCollector.h" +#include "CompassRun.h" +#include "SlowSort.h" +#include "FastSort.h" +#include "SFPAnalyzer.h" +#include "SFPPlotter.h" + +GWMEventBuilder::GWMEventBuilder() : + m_rmin(0), m_rmax(0), m_ZT(0), m_AT(0), m_ZP(0), m_AP(0), m_ZE(0), m_AE(0), m_ZR(0), m_AR(0), + m_B(0), m_Theta(0), m_BKE(0), m_workspace("none"), m_mapfile("none"), m_shiftfile("none"), + m_cutList("none"), m_SlowWindow(0), m_FastWindowIonCh(0), m_FastWindowSABRE(0), m_pb(nullptr) +{ +} + +GWMEventBuilder::~GWMEventBuilder() +{ +} + +bool GWMEventBuilder::ReadConfigFile(const std::string& fullpath) { + std::cout<<"Reading in configuration from file: "<>junk>>m_workspace; + input>>junk; + std::getline(input, junk); + std::getline(input, junk); + input>>junk>>m_mapfile; + input>>junk>>m_scalerfile; + input>>junk>>m_cutList; + input>>junk>>m_ZT>>junk>>m_AT; + input>>junk>>m_ZP>>junk>>m_AP; + input>>junk>>m_ZE>>junk>>m_AE; + input>>junk>>m_B; + input>>junk>>m_BKE; + input>>junk>>m_Theta; + input>>junk; + std::getline(input, junk); + std::getline(input, junk); + input>>junk>>m_shiftfile; + input>>junk>>m_SlowWindow; + input>>junk>>m_FastWindowIonCh; + input>>junk>>m_FastWindowSABRE; + input>>junk; + std::getline(input, junk); + std::getline(input, junk); + input>>junk>>m_rmin; + input>>junk>>m_rmax; + + input.close(); + + std::cout<<"Completed."<>junk) { + massfile>>Z>>A>>element>>atomicMassBig>>atomicMassSmall; + isotopicMass = (atomicMassBig + atomicMassSmall*1e-6 - Z*electron_mass)*u_to_mev; + std::string key = "("+std::to_string(Z)+","+A+")"; + massTable[key] = isotopicMass; + elementTable[Z] = element; + } + } else { + std::cerr<<"Unable to open mass.txt at MassLookup! Prepare for errors."<second; +} + +//returns element symbol +std::string MassLookup::FindSymbol(int Z, int A) { + auto data = elementTable.find(Z); + if(data == elementTable.end()) { + std::cerr<<"Invaild nucleus at MassLookup! Returning empty symbol"<second; + return fullsymbol; +} diff --git a/src/evb/OrderChecker.cpp b/src/evb/OrderChecker.cpp new file mode 100644 index 0000000..f8b22e0 --- /dev/null +++ b/src/evb/OrderChecker.cpp @@ -0,0 +1,37 @@ +/* + OrderChecker.cpp + Very simple class designed to test whether or not a root file is time ordered. + Meant to be used with newly converted from binary data. Only for development. + + Written by G.W. McCann Oct. 2020 +*/ +#include "EventBuilder.h" +#include "OrderChecker.h" + +OrderChecker::OrderChecker() { + +} + +OrderChecker::~OrderChecker() { + +} + +bool OrderChecker::IsOrdered(const std::string& filename) { + TFile* file = TFile::Open(filename.c_str(), "READ"); + TTree* tree = (TTree*) file->Get("Data"); + + ULong64_t ts; + tree->SetBranchAddress("Timestamp", &ts); + ULong64_t prevStamp = 0; + + for(Long64_t i=0; iGetEntries(); i++) { + tree->GetEntry(); + if(prevStamp >= ts) { + std::cerr<<"Bad order at entry "<GetEntries()<Close(); + return true; +} diff --git a/src/evb/RunCollector.cpp b/src/evb/RunCollector.cpp new file mode 100644 index 0000000..0074170 --- /dev/null +++ b/src/evb/RunCollector.cpp @@ -0,0 +1,196 @@ +#include "EventBuilder.h" +#include "RunCollector.h" + +using namespace std; + +RunCollector::RunCollector(): + initFlag(false), dir(""), run(""), end(""), MaxRun(0), MinRun(0) +{ +} + +RunCollector::RunCollector(const string& dirname, const string& prefix, const string& suffix) { + dir = dirname.c_str(); + run = prefix.c_str(); + end = suffix.c_str(); + + MinRun = 0; MaxRun = LITERALMAX; + initFlag = true; +} + +RunCollector::RunCollector(const string& dirname, const string& prefix, const string& suffix, int min, int max) { + dir = dirname.c_str(); + run = prefix.c_str(); + end = suffix.c_str(); + + MinRun = min; MaxRun = max; + initFlag = true; +} + +RunCollector::~RunCollector() {} + +void RunCollector::SetSearchParams(const string& dirname, const string& prefix, const string& suffix, int min, int max) { + dir = dirname.c_str(); + run = prefix.c_str(); + end = suffix.c_str(); + MinRun = min; MaxRun = max; + initFlag = true; +} + +int RunCollector::GrabAllFiles() { + if(!initFlag) {return 0;} + TSystemDirectory sysdir(dir.Data(), dir.Data()); + TList *flist = sysdir.GetListOfFiles(); + filelist.clear(); + int counter = 0; + if(flist) { //Make sure list is real. If not, means no directory + TSystemFile *file; + TString fname, temp; + TIter next_element(flist); //List iterator + while((file = (TSystemFile*)next_element())) { + temp = file->GetName(); + if(!file->IsDirectory() && temp.BeginsWith(run.Data()) && temp.EndsWith(end.Data())) { + counter++; + fname = dir+temp; + filelist.push_back(fname); + } + } + if(counter>0) { + delete flist; + return 1; + } else { + cerr<<"Unable to find files with matching run name in directory; check input.txt"<GetName(); + if(!file->IsDirectory() && temp.BeginsWith(run.Data()) && temp.EndsWith(runno.c_str())) { + fname = dir+temp; + break; + } + } + + return fname.Data(); +} + +/*Grabs all files within a specified run range*/ +int RunCollector::GrabFilesInRange() { + if(!initFlag) {return 0;} + TSystemDirectory sysdir(dir.Data(), dir.Data()); + TList *flist = sysdir.GetListOfFiles(); + filelist.clear(); + int counter = 0; + if(flist) { + TSystemFile *file; + TString fname, temp; + string runno; + for(int i=MinRun; i<=MaxRun; i++) {//loop over range + TIter next_element(flist);//list iterator + runno = "_"+to_string(i) + end.Data(); //suffix is now _#.endData + while((file = (TSystemFile*)next_element())) {//look through directory until file found + temp = file->GetName(); + if(!file->IsDirectory()&&temp.BeginsWith(run.Data())&&temp.EndsWith(runno.c_str())){ + counter++; + fname = dir+temp; + filelist.push_back(fname); + break; //if we find the file, break out of iterator loop + } + } + } + if(counter>0) { + delete flist; + return 1; + } else { + cerr<<"Unable to find files with matching run name in directory; check input.txt"<Add(filelist[i].Data()); + } + cout<<"Merging runs into single file..."<Merge(output,0,"fast"); + cout<<"Finished merging"<Add(filelist[i]); + } + cout<<"Merging runs "<Merge(output,0,"fast"); + cout<<"Finished merging"<IsOpen()) output->Close(); + return 0; +} diff --git a/src/evb/SFPAnalyzer.cpp b/src/evb/SFPAnalyzer.cpp new file mode 100644 index 0000000..973f822 --- /dev/null +++ b/src/evb/SFPAnalyzer.cpp @@ -0,0 +1,183 @@ +/*SFPAnalyzer.cpp + *Class designed to analyze coincidence events. Currently only implemented for focal plane + *data. Additional changes for SABRE would include this file and the sructure ProcessedEvent + *in DataStructs.h. Based on code written by S. Balak, K. Macon, and E. Good. + * + *Gordon M. Oct. 2019 + * + *Refurbished and updated Jan 2020 by GWM. Now uses both focal plane and SABRE data + */ +#include "EventBuilder.h" +#include "SFPAnalyzer.h" + +using namespace std; + +/*Constructor takes in kinematic parameters for generating focal plane weights*/ +SFPAnalyzer::SFPAnalyzer(int zt, int at, int zp, int ap, int ze, int ae, double ep, + double angle, double b) { + zfp = Delta_Z(zt, at, zp, ap, ze, ae, ep, angle, b); + event_address = new CoincEvent(); + rootObj = new THashTable(); + GetWeights(); +} + +SFPAnalyzer::~SFPAnalyzer() { + rootObj->Clear(); + delete rootObj; + delete event_address; +} + +void SFPAnalyzer::Reset() { + pevent = blank; //set output back to blank +} + +/*Use functions from FP_kinematics to calculate weights for xavg + *While this seems kind of funny, it is mathematically equivalent to making a line + *from the two focal plane points and finding the intersection with + *the kinematic focal plane + */ +void SFPAnalyzer::GetWeights() { + w1 = (Wire_Dist()/2.0-zfp)/Wire_Dist(); + w2 = 1.0-w1; + cout<<"w1: "<FindObject(name.c_str()); + if(histo != NULL) { + histo->Fill(valuex, valuey); + } else { + TH2F *h = new TH2F(name.c_str(), name.c_str(), binsx, minx, maxx, binsy, miny, maxy); + h->Fill(valuex, valuey); + rootObj->Add(h); + } +} + +/*1D histogram fill wrapper for use with THashTable (faster)*/ +void SFPAnalyzer::MyFill(const string& name, int binsx, double minx, double maxx, double valuex) { + TH1F *histo = (TH1F*) rootObj->FindObject(name.c_str()); + if(histo != NULL) { + histo->Fill(valuex); + } else { + TH1F *h = new TH1F(name.c_str(), name.c_str(), binsx, minx, maxx); + h->Fill(valuex); + rootObj->Add(h); + } +} + +void SFPAnalyzer::AnalyzeEvent(CoincEvent& event) { + Reset(); + if(!event.focalPlane.anodeF.empty()) { + pevent.anodeFront = event.focalPlane.anodeF[0].Long; + pevent.anodeFrontTime = event.focalPlane.anodeF[0].Time; + } + if(!event.focalPlane.anodeB.empty()) { + pevent.anodeBack = event.focalPlane.anodeB[0].Long; + pevent.anodeBackTime = event.focalPlane.anodeB[0].Time; + } + if(!event.focalPlane.scintL.empty()) { + pevent.scintLeft = event.focalPlane.scintL[0].Long; + pevent.scintLeftShort = event.focalPlane.scintL[0].Short; + pevent.scintLeftTime = event.focalPlane.scintL[0].Time; + } + if(!event.focalPlane.scintR.empty()) { + pevent.scintRight = event.focalPlane.scintR[0].Long; + pevent.scintRightShort = event.focalPlane.scintR[0].Short; + pevent.scintRightTime = event.focalPlane.scintR[0].Time; + } + if(!event.focalPlane.cathode.empty()) { + pevent.cathode = event.focalPlane.cathode[0].Long; + pevent.cathodeTime = event.focalPlane.cathode[0].Time; + } + if(!event.focalPlane.monitor.empty()) { + pevent.monitorE = event.focalPlane.monitor[0].Long; + pevent.monitorShort = event.focalPlane.monitor[0].Short; + pevent.monitorTime = event.focalPlane.monitor[0].Time; + } + + /*Delay lines and all that*/ + if(!event.focalPlane.delayFR.empty()) { + pevent.delayFrontRightE = event.focalPlane.delayFR[0].Long; + pevent.delayFrontRightTime = event.focalPlane.delayFR[0].Time; + pevent.delayFrontRightShort = event.focalPlane.delayFR[0].Short; + } + if(!event.focalPlane.delayFL.empty()) { + pevent.delayFrontLeftE = event.focalPlane.delayFL[0].Long; + pevent.delayFrontLeftTime = event.focalPlane.delayFL[0].Time; + pevent.delayFrontLeftShort = event.focalPlane.delayFL[0].Short; + } + if(!event.focalPlane.delayBR.empty()) { + pevent.delayBackRightE = event.focalPlane.delayBR[0].Long; + pevent.delayBackRightTime = event.focalPlane.delayBR[0].Time; + pevent.delayBackRightShort = event.focalPlane.delayBR[0].Short; + } + if(!event.focalPlane.delayBL.empty()) { + pevent.delayBackLeftE = event.focalPlane.delayBL[0].Long; + pevent.delayBackLeftTime = event.focalPlane.delayBL[0].Time; + pevent.delayBackLeftShort = event.focalPlane.delayBL[0].Short; + } + if(!event.focalPlane.delayFL.empty() && !event.focalPlane.delayFR.empty()) { + pevent.fp1_tdiff = (event.focalPlane.delayFL[0].Time-event.focalPlane.delayFR[0].Time)*0.5; + pevent.fp1_tsum = (event.focalPlane.delayFL[0].Time+event.focalPlane.delayFR[0].Time); + pevent.fp1_tcheck = (pevent.fp1_tsum)/2.0-pevent.anodeFrontTime; + pevent.delayFrontMaxTime = max(event.focalPlane.delayFL[0].Time, event.focalPlane.delayFR[0].Time); + pevent.x1 = pevent.fp1_tdiff*1.0/1.98; //position from time, based on total delay + //pevent.x1 = 0.52*pevent.fp1_tdiff - 0.128; //position from time, based on delay chips + MyFill("x1",1200,-300,300,pevent.x1); + MyFill("x1 vs anodeBack",600,-300,300,pevent.x1,512,0,4096,pevent.anodeBack); + } + if(!event.focalPlane.delayBL.empty() && !event.focalPlane.delayBR.empty()) { + pevent.fp2_tdiff = (event.focalPlane.delayBL[0].Time-event.focalPlane.delayBR[0].Time)*0.5; + pevent.fp2_tsum = (event.focalPlane.delayBL[0].Time+event.focalPlane.delayBR[0].Time); + pevent.fp2_tcheck = (pevent.fp2_tsum)/2.0-pevent.anodeBackTime; + pevent.delayBackMaxTime = max(event.focalPlane.delayBL[0].Time, event.focalPlane.delayBR[0].Time); + pevent.x2 = pevent.fp2_tdiff*1.0/2.10; //position from time, based on total delay + //pevent.x2 = 0.48*pevent.fp2_tdiff - 2.365; //position from time, based on delay chips + MyFill("x2",1200,-300,300,pevent.x2); + MyFill("x2 vs anodeBack",600,-300,300,pevent.x2,512,0,4096,pevent.anodeBack); + } + /*SABRE data*/ + for(int j=0; j<5; j++) { + if(!event.sabreArray[j].rings.empty()) { + pevent.sabreRingE[j] = event.sabreArray[j].rings[0].Long; + pevent.sabreRingChannel[j] = event.sabreArray[j].rings[0].Ch; + pevent.sabreRingTime[j] = event.sabreArray[j].rings[0].Time; + } + if(!event.sabreArray[j].wedges.empty()) { + pevent.sabreWedgeE[j] = event.sabreArray[j].wedges[0].Long; + pevent.sabreWedgeChannel[j] = event.sabreArray[j].wedges[0].Ch; + pevent.sabreWedgeTime[j] = event.sabreArray[j].wedges[0].Time; + } + /*Aaaand passes on all of the rest. 4/24/20 GWM*/ + pevent.sabreArray[j] = event.sabreArray[j]; + } + + /*Make some histograms and xavg*/ + MyFill("anodeBack vs scintLeft",512,0,4096,pevent.scintLeft,512,0,4096,pevent.anodeBack); + if(pevent.x1 != -1e6 && pevent.x2 != -1e6) { + pevent.xavg = pevent.x1*w1+pevent.x2*w2; + MyFill("xavg",1200,-300,300,pevent.xavg); + if((pevent.x2-pevent.x1) > 0) { + pevent.theta = atan((pevent.x2-pevent.x1)/36.0); + } else if((pevent.x2-pevent.x1) < 0) { + pevent.theta = TMath::Pi() + atan((pevent.x2-pevent.x1)/36.0); + } else { + pevent.theta = TMath::Pi()/2.0; + } + MyFill("xavg vs theta",600,-300,300,pevent.xavg,314,0,3.14,pevent.theta); + MyFill("x1 vs x2",600,-300,300,pevent.x1,600,-300,300,pevent.x2); + } + if(pevent.anodeFrontTime != -1 && pevent.scintRightTime != -1) { + pevent.fp1_y = pevent.anodeFrontTime-pevent.scintRightTime; + } + if(pevent.anodeBackTime != -1 && pevent.scintRightTime != -1) { + pevent.fp2_y = pevent.anodeBackTime-pevent.scintRightTime; + } +} + +ProcessedEvent SFPAnalyzer::GetProcessedEvent(CoincEvent& event) { + AnalyzeEvent(event); + return pevent; +} diff --git a/src/evb/SFPPlotter.cpp b/src/evb/SFPPlotter.cpp new file mode 100644 index 0000000..f422e7e --- /dev/null +++ b/src/evb/SFPPlotter.cpp @@ -0,0 +1,297 @@ +/*SFPPlotter.h + *Class for generating histogram files for SPS-SABRE data + *Intended use case is generating a TChain of multiple analyzed files and making + *histograms of the larger data set. + * + *Created Jan 2020 by GWM + */ + +#include "EventBuilder.h" +#include "SFPPlotter.h" +#include + +/*Generates storage and initializes pointers*/ +SFPPlotter::SFPPlotter() { + rootObj = new THashTable(); + rootObj->SetOwner(false);//THashTable doesnt own members; avoid double delete + event_address = new ProcessedEvent(); + chain = new TChain("SPSTree"); + cutFlag = false; + m_pb = NULL; +} + +SFPPlotter::~SFPPlotter() { + delete event_address; +} + +/*2D histogram fill wrapper*/ +void SFPPlotter::MyFill(const string& name, int binsx, double minx, double maxx, double valuex, + int binsy, double miny, double maxy, double valuey) { + TH2F *histo = (TH2F*) rootObj->FindObject(name.c_str()); + if(histo != NULL) { + histo->Fill(valuex, valuey); + } else { + TH2F *h = new TH2F(name.c_str(), name.c_str(), binsx, minx, maxx, binsy, miny, maxy); + h->Fill(valuex, valuey); + rootObj->Add(h); + } +} + +/*1D histogram fill wrapper*/ +void SFPPlotter::MyFill(const string& name, int binsx, double minx, double maxx, double valuex) { + TH1F *histo = (TH1F*) rootObj->FindObject(name.c_str()); + if(histo != NULL) { + histo->Fill(valuex); + } else { + TH1F *h = new TH1F(name.c_str(), name.c_str(), binsx, minx, maxx); + h->Fill(valuex); + rootObj->Add(h); + } +} + +void SFPPlotter::ApplyCutlist(const string& listname) { + cutter.SetCuts(listname); + cutFlag = true; +} + +/*Makes histograms where only rejection is unset data*/ +void SFPPlotter::MakeUncutHistograms(ProcessedEvent ev) { + MyFill("x1NoCuts_bothplanes",600,-300,300,ev.x2); + MyFill("x2NoCuts_bothplanes",600,-300,300,ev.x2); + MyFill("xavgNoCuts_bothplanes",600,-300,300,ev.xavg); + MyFill("xavgNoCuts_theta_bothplanes",600,-300,300,ev.xavg,100,0,TMath::Pi()/2.,ev.theta); + + MyFill("x1_delayBackRightE_NoCuts",600,-300,300,ev.x1,512,0,4096,ev.delayBackRightE); + MyFill("x2_delayBackRightE_NoCuts",600,-300,300,ev.x2,512,0,4096,ev.delayBackRightE); + MyFill("xavg_delayBackRightE_NoCuts",600,-300,300,ev.xavg,512,0,4096,ev.delayBackRightE); + MyFill("x1_x2_NoCuts",600,-300,300,ev.x1,600,-300,300,ev.x2); + + Double_t delayBackAvgE = (ev.delayBackRightE+ev.delayBackLeftE)/2.0; + MyFill("x1_delayBackAvgE_NoCuts",600,-300,300,ev.x1,512,0,4096,delayBackAvgE); + MyFill("x2_delayBackAvgE_NoCuts",600,-300,300,ev.x2,512,0,4096,delayBackAvgE); + MyFill("xavg_delayBackAvgE_NoCuts",600,-300,300,ev.xavg,512,0,4096,delayBackAvgE); + Double_t delayFrontAvgE = (ev.delayFrontRightE+ev.delayFrontLeftE)/2.0; + MyFill("x1_delayFrontAvgE_NoCuts",600,-300,300,ev.x1,512,0,4096,delayFrontAvgE); + MyFill("x2_delayFrontAvgE_NoCuts",600,-300,300,ev.x2,512,0,4096,delayFrontAvgE); + MyFill("xavg_delayFrontAvgE_NoCuts",600,-300,300,ev.xavg,512,0,4096,delayFrontAvgE); + + MyFill("scintLeft_anodeBack_NoCuts",512,0,4096,ev.scintLeft,512,0,4096,ev.anodeBack); + MyFill("scintLeft_anodeFront_NoCuts",512,0,4096,ev.scintLeft,512,0,4096,ev.anodeFront); + MyFill("scintLeft_cathode_NoCuts",512,0,4096,ev.scintLeft,512,0,4096,ev.cathode); + + MyFill("x1_scintLeft_NoCuts",600,-300,300,ev.x1,512,0,4096,ev.scintLeft); + MyFill("x2_scintLeft_NoCuts",600,-300,300,ev.x2,512,0,4096,ev.scintLeft); + MyFill("xavg_scintLeft_NoCuts",600,-300,300,ev.xavg,512,0,4096,ev.scintLeft); + + MyFill("x1_anodeBack_NoCuts",600,-300,300,ev.x1,512,0,4096,ev.anodeBack); + MyFill("x2_anodeBack_NoCuts",600,-300,300,ev.x2,512,0,4096,ev.anodeBack); + MyFill("xavg_anodeBack_NoCuts",600,-300,300,ev.xavg,512,0,4096,ev.anodeBack); + + MyFill("x1_anodeFront_NoCuts",600,-300,300,ev.x1,512,0,4096,ev.anodeFront); + MyFill("x2_anodeFront_NoCuts",600,-300,300,ev.x2,512,0,4096,ev.anodeFront); + MyFill("xavg_anodeFront_NoCuts",600,-300,300,ev.xavg,512,0,4096,ev.anodeFront); + + MyFill("x1_cathode_NoCuts",600,-300,300,ev.x1,512,0,4096,ev.cathode); + MyFill("x2_cathode_NoCuts",600,-300,300,ev.x2,512,0,4096,ev.cathode); + MyFill("xavg_cathode_NoCuts",600,-300,300,ev.xavg,512,0,4096,ev.cathode); + + /****Timing relative to back anode****/ + if(ev.anodeBackTime != -1 && ev.scintLeftTime != -1) { + Double_t anodeRelFT = ev.anodeFrontTime - ev.anodeBackTime; + Double_t delayRelFT = ev.delayFrontMaxTime - ev.anodeBackTime; + Double_t delayRelBT = ev.delayBackMaxTime - ev.anodeBackTime; + Double_t anodeRelBT = ev.anodeBackTime - ev.scintLeftTime; + Double_t delayRelFT_toScint = ev.delayFrontMaxTime - ev.scintLeftTime; + Double_t delayRelBT_toScint = ev.delayBackMaxTime - ev.scintLeftTime; + MyFill("anodeRelFrontTime_NoCuts",1000,-3000,3500, anodeRelFT); + MyFill("delayRelFrontTime_NoCuts",1000,-3000,-3500,delayRelFT); + MyFill("delayRelBackTime_NoCuts",1000,-3000,-3500,delayRelBT); + for(int i=0; i<5; i++) { + if(ev.sabreRingE[i] != -1) { + Double_t sabreRelRT = ev.sabreRingTime[i] - ev.anodeBackTime; + Double_t sabreRelWT = ev.sabreWedgeTime[i] - ev.anodeBackTime; + Double_t sabreRelRT_toScint = ev.sabreRingTime[i] - ev.scintLeftTime; + Double_t sabreRelWT_toScint = ev.sabreWedgeTime[i] - ev.scintLeftTime; + MyFill("xavg_sabrefcoinc_NoCuts",600,-300,300, ev.xavg); + MyFill("sabreRelRingTime_NoCuts",1000,-3000,3500, sabreRelRT); + MyFill("sabreRelWedgeTime_NoCuts",1000,-3000,3500, sabreRelWT); + MyFill("sabreRelRingTime_toScint",1000,-3000,3500,sabreRelRT_toScint); + MyFill("sabreRelWedgeTime_toScint",1000,-3000,3500,sabreRelWT_toScint); + MyFill("sabreRelRTScint_sabreRelRTAnode",500,-3000,3500,sabreRelRT_toScint,500,-3000,3500,sabreRelRT); + MyFill("sabreRelRTScint_sabreRingChannel",500,-3000,3500,sabreRelRT_toScint,144,0,144,ev.sabreRingChannel[i]); + MyFill("sabreRelRTAnode_sabreRingChannel",500,-3000,3500,sabreRelRT,144,0,144,ev.sabreRingChannel[i]); + MyFill("sabreRelWTScint_sabreWedgeChannel",500,-3000,3500,sabreRelWT_toScint,144,0,144,ev.sabreWedgeChannel[i]); + MyFill("sabreRelRT_sabreRelWT",500,-3000,3500,sabreRelRT,500,-3000,3500,sabreRelWT); + MyFill("sabreRelRT_sabreRelWT_scint",500,-3000,3500,sabreRelRT_toScint,500,-3000,3500,sabreRelWT_toScint); + MyFill("sabreRelRTScint_anodeRelT",500,-3000,3500,sabreRelRT_toScint,500,-3000,3500,anodeRelBT); + } + } + MyFill("anodeBackRelTime_toScint",1000,-3000,3500,anodeRelBT); + MyFill("delayRelBackTime_toScint",1000,-3000,3500,delayRelBT_toScint); + MyFill("delayRelFrontTime_toScint",1000,-3000,3500,delayRelFT_toScint); + } else { + MyFill("noscinttime_counter_NoCuts",2,0,1,1); + } + + int count = 0; + for(int i=0; i<5; i++) { + if(ev.sabreRingE[i] != -1) { //Again, at this point front&back are required + MyFill("sabreRingE_NoCuts",2000,0,20,ev.sabreRingE[i]); + MyFill("sabreRingChannel_sabreRingE_NoCuts",144,0,144,ev.sabreRingChannel[i],200,0,20,ev.sabreRingE[i]); + MyFill("sabreWedgeE_NoCuts",2000,0,20,ev.sabreWedgeE[i]); + MyFill("sabreWedgeChannel_sabreWedgeE_NoCuts",144,0,144,ev.sabreWedgeChannel[i],200,0,20,ev.sabreWedgeE[i]); + } else { + count++; + } + } + if(count == 80) { + MyFill("xavg_bothplanes_sabreanticoinc_NoCuts",600,-300,300,ev.xavg); + } + if(ev.x1 != -1e6 && ev.x2 == -1e6) { + MyFill("x1NoCuts_only1plane",600,-300,300,ev.x1); + } else if(ev.x2 != -1e6 && ev.x1 == -1e6) { + MyFill("x2NoCuts_only1plane",600,-300,300,ev.x2); + } else if(ev.x1 == -1e6 && ev.x2 == -1e6) { + MyFill("nopos_counter",2,0,1,1); + } +} + +/*Makes histograms with cuts & gates implemented*/ +void SFPPlotter::MakeCutHistograms(ProcessedEvent ev) { + if(!cutter.IsValid()) return; + if(cutter.IsInside(&ev)) { + MyFill("x1_bothplanes_Cut",600,-300,300,ev.x1); + MyFill("x2_bothplanes_Cut",600,-300,300,ev.x2); + MyFill("xavg_bothplanes_Cut",600,-300,300,ev.xavg); + MyFill("x1_x2_Cut",600,-300,300,ev.x1, 600,-300,300,ev.x2); + MyFill("xavg_theta_Cut_bothplanes",600,-300,300,ev.xavg,100,0,TMath::Pi()/2.,ev.theta); + + MyFill("x1_delayBackRightE_Cut",600,-300,300,ev.x1,512,0,4096,ev.delayBackRightE); + MyFill("x2_delayBackRightE_Cut",600,-300,300,ev.x2,512,0,4096,ev.delayBackRightE); + MyFill("xavg_delayBackRightE_Cut",600,-300,300,ev.xavg,512,0,4096,ev.delayBackRightE); + + Double_t delayBackAvgE = (ev.delayBackRightE+ev.delayBackLeftE)/2.0; + MyFill("x1_delayBackAvgE_Cut",600,-300,300,ev.x1,512,0,4096,delayBackAvgE); + MyFill("x2_delayBackAvgE_Cut",600,-300,300,ev.x2,512,0,4096,delayBackAvgE); + MyFill("xavg_delayBackAvgE_Cut",600,-300,300,ev.xavg,512,0,4096,delayBackAvgE); + Double_t delayFrontAvgE = (ev.delayFrontRightE+ev.delayFrontLeftE)/2.0; + MyFill("x1_delayFrontAvgE_Cut",600,-300,300,ev.x1,512,0,4096,delayFrontAvgE); + MyFill("x2_delayFrontAvgE_Cut",600,-300,300,ev.x2,512,0,4096,delayFrontAvgE); + MyFill("xavg_delayFrontAvgE_Cut",600,-300,300,ev.xavg,512,0,4096,delayFrontAvgE); + + MyFill("scintLeft_anodeBack_Cut",512,0,4096,ev.scintLeft,512,0,4096,ev.anodeBack); + MyFill("scintLeft_anodeFront_Cut",512,0,4096,ev.scintLeft,512,0,4096,ev.anodeFront); + MyFill("scintLeft_cathode_Cut",512,0,4096,ev.scintLeft,512,0,4096,ev.cathode); + + MyFill("x1_scintLeft_Cut",600,-300,300,ev.x1,512,0,4096,ev.scintLeft); + MyFill("x2_scintLeft_Cut",600,-300,300,ev.x2,512,0,4096,ev.scintLeft); + MyFill("xavg_scintLeft_Cut",600,-300,300,ev.xavg,512,0,4096,ev.scintLeft); + + MyFill("x1_anodeBack_Cut",600,-300,300,ev.x1,512,0,4096,ev.anodeBack); + MyFill("x2_anodeBack_Cut",600,-300,300,ev.x2,512,0,4096,ev.anodeBack); + MyFill("xavg_anodeBack_Cut",600,-300,300,ev.xavg,512,0,4096,ev.anodeBack); + + MyFill("x1_anodeFront_Cut",600,-300,300,ev.x1,512,0,4096,ev.anodeFront); + MyFill("x2_anodeFront_Cut",600,-300,300,ev.x2,512,0,4096,ev.anodeFront); + MyFill("xavg_anodeFront_Cut",600,-300,300,ev.xavg,512,0,4096,ev.anodeFront); + + MyFill("x1_cathode_Cut",600,-300,300,ev.x1,512,0,4096,ev.cathode); + MyFill("x2_cathode_Cut",600,-300,300,ev.x2,512,0,4096,ev.cathode); + MyFill("xavg_cathode_Cut",600,-300,300,ev.xavg,512,0,4096,ev.cathode); + + /****Timing relative to back anode****/ + if(ev.anodeBackTime != -1 && ev.scintLeftTime != -1) { + Double_t anodeRelFT = ev.anodeFrontTime - ev.anodeBackTime; + Double_t anodeRelBT = ev.anodeBackTime - ev.anodeBackTime; + Double_t anodeRelFT_toScint = ev.anodeFrontTime-ev.scintLeftTime; + MyFill("anodeRelBackTime_Cut",1000,-3000,3500, anodeRelBT); + MyFill("anodeRelFrontTime_Cut",1000,-3000,3500, anodeRelFT); + MyFill("anodeRelTime_toScint_Cut",1000,-3000,3500,anodeRelFT_toScint); + for(int i=0; i<5; i++) { + if(ev.sabreRingE[i] != -1) { + Double_t sabreRelRT = ev.sabreRingTime[i] - ev.anodeBackTime; + Double_t sabreRelWT = ev.sabreWedgeTime[i] - ev.anodeBackTime; + MyFill("sabreRelRingTime_Cut",1000,-3000,3500, sabreRelRT); + MyFill("sabreRelWedgeTime_Cut",1000,-3000,3500, sabreRelWT); + } + } + } else { + MyFill("noscinttime_counter_Cut",2,0,1,1); + } + + int count = 0; + for(int i=0; i<5; i++) { + if(ev.sabreRingE[i] != -1) { + MyFill("sabreRingE_Cut",2000,0,20,ev.sabreRingE[i]); + MyFill("xavg_Cut_sabrefcoinc",600,-300,300,ev.xavg); + MyFill("xavg_sabreRingE_Cut",600,-300,300,ev.xavg,200,0,20,ev.sabreRingE[i]); + MyFill("sabreWedgeE_Cut",2000,0,20,ev.sabreWedgeE[i]); + MyFill("xavg_sabreWedgeE_Cut",600,-300,300,ev.xavg,200,0,20,ev.sabreWedgeE[i]); + } else { + count++; + } + } + if(count == 80) { + MyFill("xavg_bothplanes_sabreanticoinc_Cut",600,-300,300,ev.xavg); + } + } +} + +/*Runs a list of files given from a RunMusher/Collector class*/ +void SFPPlotter::Run(vector files, const string& output) { + Chain(files); + chain->SetBranchAddress("event", &event_address); + TFile *outfile = new TFile(output.c_str(), "RECREATE"); + + long blentries = chain->GetEntries(); + if(m_pb) SetProgressBar(blentries); + cout<<"Total number of events: "<GetEntries(); i++) { + count++; + if(count == flush) { + if(m_pb) { + m_pb->Increment(count); + gSystem->ProcessEvents(); + count = 0; + } else { + nflushes++; + count=0; + std::cout<<"\rPercent of data processed: "<GetEntry(i); + MakeUncutHistograms(*event_address); + if(cutFlag) MakeCutHistograms(*event_address); + } + cout<cd(); + rootObj->Write(); + if(cutFlag && cutter.IsValid()) { + auto clist = cutter.GetCuts(); + for(unsigned int i=0; iWrite(); + } + } + delete rootObj; + outfile->Close(); + delete outfile; +} + +/*Link all files*/ +void SFPPlotter::Chain(vector files) { + for(unsigned int i=0; iAdd(files[i]); + } +} + + +void SFPPlotter::SetProgressBar(long total) { + m_pb->SetMax(total); + m_pb->SetMin(0); + m_pb->SetPosition(0); + gSystem->ProcessEvents(); +} diff --git a/src/evb/ShiftMap.cpp b/src/evb/ShiftMap.cpp new file mode 100644 index 0000000..4a412e8 --- /dev/null +++ b/src/evb/ShiftMap.cpp @@ -0,0 +1,69 @@ +/* + ShiftMap.h + New class to act a go-between for timestamp shifts to channels. Takes in a + formated file containing data for shifts and then stores them in an unordered_map. + Key is a global compass channel (board#*16 + channel). Shifts in ps. + + Note: Timestamps are now shifted in binary conversion. This means that shifts *MUST* + be stored as Long64_t types. No decimals! + + Written by G.W. McCann Oct. 2020 +*/ +#include "EventBuilder.h" +#include "ShiftMap.h" + +ShiftMap::ShiftMap() : + m_filename(""), is_set(false) +{ +} + +ShiftMap::ShiftMap(const std::string& filename) : + m_filename(filename), is_set(false) +{ + ParseFile(); +} + +ShiftMap::~ShiftMap() {} + +void ShiftMap::SetFile(const std::string& filename) { + m_filename = filename; + ParseFile(); +} + +Long64_t ShiftMap::GetShift(int gchan) { + if(!is_set) return 0.0; + + auto iter = m_map.find(gchan); + if(iter == m_map.end()) { + return 0.0; + } else return iter->second; +} + +void ShiftMap::ParseFile() { + std::ifstream input(m_filename); + if(!input.is_open()) return; + + int board, channel, gchan; + Long64_t shift; + std::string junk, temp; + + std::getline(input, junk); + std::getline(input, junk); + + while(input>>board) { + input>>temp; + input>>shift; + if(temp == "all") { //keyword to set all channels in this board to same shift + for(int i=0; i<16; i++) { + gchan = board*16 + i; + m_map[gchan] = shift; + } + } else { + channel = stoi(temp); + gchan = channel + board*16; + m_map[gchan] = shift; + } + } + + is_set = true; +} diff --git a/src/evb/SlowSort.cpp b/src/evb/SlowSort.cpp new file mode 100644 index 0000000..8daefa7 --- /dev/null +++ b/src/evb/SlowSort.cpp @@ -0,0 +1,166 @@ +/*SlowSort.cpp + *Class designed to first time-order raw data, and then based on a given coincidence window + *sort the raw data into coincidence structures. Utilizes dictionary elements DPPChannel and + *CoincEvent. Based on work by S. Balak, K. Macon, and E. Good from LSU. + * + *Gordon M. Oct. 2019 + * + *Refurbished and updated Jan 2020 GWM + */ +#include "EventBuilder.h" +#include "SlowSort.h" + +/*Sort the Sabre Data in order of descending energy*/ +bool SabreSort(DetectorHit i, DetectorHit j) { + return (i.Long>j.Long); +} + +/*Constructor takes input of coincidence window size, and fills sabre channel map*/ +SlowSort::SlowSort() : + coincWindow(-1.0), eventFlag(false), event(), cmap() +{ + event_stats = new TH2F("coinc_event_stats","coinc_events_stats;global channel;number of coincident hits;counts",144,0,144,20,0,20); +} + +SlowSort::SlowSort(double windowSize, const string& mapfile) : + coincWindow(windowSize), eventFlag(false), event(), cmap(mapfile) +{ + event_stats = new TH2F("coinc_event_stats","coinc_events_stats;global channel;number of coincident hits;counts",144,0,144,20,0,20); + InitVariableMaps(); +} + +SlowSort::~SlowSort() { +} + +/**EXPERIMENT MODS go here**/ +void SlowSort::InitVariableMaps() { + + /*For SABRE: Each SABRE det has ring&wedge, so add the detID to the + SABRERING/WEDGE attribute to differentiate*/ + for(int i=0; i<5; i++) { + sabreVMap[SABRERING + i] = &event.sabreArray[i].rings; + sabreVMap[SABREWEDGE + i] = &event.sabreArray[i].wedges; + } + + /*For focal plane: Only one focal plane, so each variable is uniquely + identified by its attribute + */ + fpVMap[SCINTLEFT] = &event.focalPlane.scintL; + fpVMap[SCINTRIGHT] = &event.focalPlane.scintR; + fpVMap[CATHODE] = &event.focalPlane.cathode; + fpVMap[DELAYFR] = &event.focalPlane.delayFR; + fpVMap[DELAYFL] = &event.focalPlane.delayFL; + fpVMap[DELAYBL] = &event.focalPlane.delayBL; + fpVMap[DELAYBR] = &event.focalPlane.delayBR; + fpVMap[ANODEFRONT] = &event.focalPlane.anodeF; + fpVMap[ANODEBACK] = &event.focalPlane.anodeB; + fpVMap[MONITOR] = &event.focalPlane.monitor; + +} + +/*Reset output structure to blank*/ +void SlowSort::Reset() { + event = blank; +} + +bool SlowSort::AddHitToEvent(CompassHit& mhit) { + DPPChannel curHit; + curHit.Timestamp = mhit.timestamp; + curHit.Energy = mhit.lgate; + curHit.EnergyShort = mhit.sgate; + curHit.Channel = mhit.channel; + curHit.Board = mhit.board; + curHit.Flags = mhit.flags; + + if(hitList.empty()) { + startTime = curHit.Timestamp; + hitList.push_back(curHit); + } else if (curHit.Timestamp < previousHitTime) { + return false; + } else if ((curHit.Timestamp - startTime) < coincWindow) { + hitList.push_back(curHit); + } else { + ProcessEvent(); + hitList.clear(); + startTime = curHit.Timestamp; + hitList.push_back(curHit); + eventFlag = true; + } + + return true; +} + +void SlowSort::FlushHitsToEvent() { + if(hitList.empty()) { + eventFlag = false; + return; + } + + ProcessEvent(); + hitList.clear(); + eventFlag = true; +} + +CoincEvent SlowSort::GetEvent() { + eventFlag = false; + return event; +} + +/*Function called when a start of a coincidence event is detected*/ +void SlowSort::StartEvent() { + if(hitList.size() != 0) { + cerr<<"Attempting to initalize hitList when not cleared!! Check processing order."<Fill(gchan, size); + dhit.Time = curHit.Timestamp/1.0e3; + dhit.Ch = gchan; + dhit.Long = curHit.Energy; + dhit.Short = curHit.EnergyShort; + auto channel_info = cmap.FindChannel(gchan); + if(channel_info == cmap.End()) { + continue; + } + if(channel_info->second.detectorType == SABRERING || channel_info->second.detectorType == SABREWEDGE) { + + auto variable = sabreVMap.find(channel_info->second.detectorType + channel_info->second.detectorID); + if(variable != sabreVMap.end()) { + variable->second->push_back(dhit); + } + + } else if(channel_info->second.detectorType == FOCALPLANE) { + + auto variable = fpVMap.find(channel_info->second.detectorPart); + if(variable != fpVMap.end()) { + variable->second->push_back(dhit); + } + + } else { + std::cout<second.detectorType<>(stop_time-start_time).count(); +} + +double Stopwatch::GetElapsedMilliseconds() { + return std::chrono::duration_cast>(stop_time-start_time).count()*1000.0; +} \ No newline at end of file diff --git a/src/gui/EVBMainFrame.cpp b/src/gui/EVBMainFrame.cpp new file mode 100644 index 0000000..3da6d35 --- /dev/null +++ b/src/gui/EVBMainFrame.cpp @@ -0,0 +1,468 @@ +#include "EventBuilder.h" +#include "EVBMainFrame.h" +#include "FileViewFrame.h" +#include +#include +#include +#include + +EVBMainFrame::EVBMainFrame(const TGWindow* p, UInt_t w, UInt_t h) : + TGMainFrame(p, w, h, kVerticalFrame) +{ + SetCleanup(kDeepCleanup); + MAIN_W = w; MAIN_H = h; + + //Organization hints + TGLayoutHints *fchints = new TGLayoutHints(kLHintsExpandX|kLHintsExpandY,5,5,5,5); + TGLayoutHints *fhints = new TGLayoutHints(kLHintsExpandX|kLHintsCenterY,5,5,5,5); + TGLayoutHints *lhints = new TGLayoutHints(kLHintsCenterY|kLHintsLeft,5,5,5,5); + TGLayoutHints *bhints = new TGLayoutHints(kLHintsLeft|kLHintsCenterY,5,5,5,5); + TGLayoutHints *fpbhints = new TGLayoutHints(kLHintsExpandX|kLHintsBottom,5,5,5,5); + TGLayoutHints *mhints = new TGLayoutHints(kLHintsTop|kLHintsLeft,0,4,0,0); + + //Make the containers and link up all signals/slots + + TGVerticalFrame *InputFrame = new TGVerticalFrame(this, w, h*0.9); + + TGVerticalFrame *NameFrame = new TGVerticalFrame(InputFrame, w, h*0.4); + + TGHorizontalFrame *WorkFrame = new TGHorizontalFrame(NameFrame, w, h*0.1); + TGLabel* workLabel = new TGLabel(WorkFrame, "Workspace Directory:"); + fWorkField = new TGTextEntry(WorkFrame, new TGTextBuffer(120), WORKDIR); + fWorkField->Resize(w*0.25, fWorkField->GetDefaultHeight()); + fWorkField->Connect("ReturnPressed()","EVBMainFrame",this,"UpdateWorkdir()"); + fOpenWorkButton = new TGTextButton(WorkFrame, "Open"); + fOpenWorkButton->Connect("Clicked()","EVBMainFrame",this,"DoOpenWorkdir()"); + WorkFrame->AddFrame(workLabel, lhints); + WorkFrame->AddFrame(fWorkField, fhints); + WorkFrame->AddFrame(fOpenWorkButton, bhints); + + TGHorizontalFrame *CMapFrame = new TGHorizontalFrame(NameFrame, w, h*0.1); + TGLabel* cmaplabel = new TGLabel(CMapFrame, "Channel Map File:"); + fCMapField = new TGTextEntry(CMapFrame, new TGTextBuffer(120), CMAP); + fCMapField->Resize(w*0.25, fCMapField->GetDefaultHeight()); + fCMapField->Connect("ReturnPressed()","EVBMainFrame",this,"UpdateCMap()"); + fOpenCMapButton = new TGTextButton(CMapFrame, "Open"); + fOpenCMapButton->Connect("Clicked()","EVBMainFrame",this,"DoOpenCMapfile()"); + CMapFrame->AddFrame(cmaplabel, lhints); + CMapFrame->AddFrame(fCMapField, fhints); + CMapFrame->AddFrame(fOpenCMapButton, bhints); + + TGHorizontalFrame *SMapFrame = new TGHorizontalFrame(NameFrame, w, h*0.1); + TGLabel* smaplabel = new TGLabel(SMapFrame, "Board Shift File:"); + fSMapField = new TGTextEntry(SMapFrame, new TGTextBuffer(120), SMAP); + fSMapField->Resize(w*0.25, fSMapField->GetDefaultHeight()); + fSMapField->Connect("ReturnPressed()","EVBMainFrame",this,"UpdateSMap()"); + fOpenSMapButton = new TGTextButton(SMapFrame, "Open"); + fOpenSMapButton->Connect("Clicked()","EVBMainFrame",this,"DoOpenSMapfile()"); + SMapFrame->AddFrame(smaplabel, lhints); + SMapFrame->AddFrame(fSMapField, fhints); + SMapFrame->AddFrame(fOpenSMapButton, bhints); + + TGHorizontalFrame *ScalerFrame = new TGHorizontalFrame(NameFrame, w, h*0.1); + TGLabel* sclabel = new TGLabel(ScalerFrame, "Scaler File: "); + fScalerField = new TGTextEntry(ScalerFrame, new TGTextBuffer(120), SCALER); + fScalerField->Connect("ReturnPressed()","EVBMainFrame",this,"UpdateScaler()"); + fOpenScalerButton = new TGTextButton(ScalerFrame, "Open"); + fOpenScalerButton->Connect("Clicked()","EVBMainFrame", this, "DoOpenScalerfile()"); + ScalerFrame->AddFrame(sclabel, lhints); + ScalerFrame->AddFrame(fScalerField, fhints); + ScalerFrame->AddFrame(fOpenScalerButton, bhints); + + TGHorizontalFrame *CutFrame = new TGHorizontalFrame(NameFrame, w, h*0.1); + TGLabel* clabel = new TGLabel(CutFrame, "Cut List: "); + fCutField = new TGTextEntry(CutFrame, new TGTextBuffer(120), CUT); + fCutField->Connect("ReturnPressed()","EVBMainFrame",this,"UpdateCut()"); + fOpenCutButton = new TGTextButton(CutFrame, "Open"); + fOpenCutButton->Connect("Clicked()","EVBMainFrame",this,"DoOpenCutfile()"); + CutFrame->AddFrame(clabel, lhints); + CutFrame->AddFrame(fCutField, fhints); + CutFrame->AddFrame(fOpenCutButton, bhints); + + NameFrame->AddFrame(WorkFrame, fhints); + NameFrame->AddFrame(CMapFrame, fhints); + NameFrame->AddFrame(SMapFrame, fhints); + NameFrame->AddFrame(ScalerFrame, fhints); + NameFrame->AddFrame(CutFrame, fhints); + + + TGHorizontalFrame *ParamFrame = new TGHorizontalFrame(InputFrame, w, h*0.1); + TGLabel *bkelabel = new TGLabel(ParamFrame, "Beam KE (MeV):"); + fBKEField = new TGNumberEntryField(ParamFrame, BKE, 0, TGNumberEntry::kNESRealFour, TGNumberEntry::kNEANonNegative); + TGLabel *bfieldlabel = new TGLabel(ParamFrame, "B-Field (G):"); + fBField = new TGNumberEntryField(ParamFrame, BFIELD, 0, TGNumberEntry::kNESRealFour, TGNumberEntry::kNEANonNegative); + TGLabel *thetalabel = new TGLabel(ParamFrame, "Angle (deg):"); + fThetaField = new TGNumberEntryField(ParamFrame, THETA, 0, TGNumberEntry::kNESRealFour, TGNumberEntry::kNEANonNegative); + TGLabel *ztlabel = new TGLabel(ParamFrame, "ZT:"); + fZTField = new TGNumberEntryField(ParamFrame, ZT, 0, TGNumberEntry::kNESInteger, TGNumberEntry::kNEANonNegative); + TGLabel *atlabel = new TGLabel(ParamFrame, "AT:"); + fATField = new TGNumberEntryField(ParamFrame, AT, 0, TGNumberEntry::kNESInteger, TGNumberEntry::kNEANonNegative); + TGLabel *zplabel = new TGLabel(ParamFrame, "ZP:"); + fZPField = new TGNumberEntryField(ParamFrame, ZP, 0, TGNumberEntry::kNESInteger, TGNumberEntry::kNEANonNegative); + TGLabel *aplabel = new TGLabel(ParamFrame, "AP:"); + fAPField = new TGNumberEntryField(ParamFrame, AP, 0, TGNumberEntry::kNESInteger, TGNumberEntry::kNEANonNegative); + TGLabel *zelabel = new TGLabel(ParamFrame, "ZE:"); + fZEField = new TGNumberEntryField(ParamFrame, ZE, 0, TGNumberEntry::kNESInteger, TGNumberEntry::kNEANonNegative); + TGLabel *aelabel = new TGLabel(ParamFrame, "AE:"); + fAEField = new TGNumberEntryField(ParamFrame, AE, 0, TGNumberEntry::kNESInteger, TGNumberEntry::kNEANonNegative); + ParamFrame->AddFrame(bkelabel, lhints); + ParamFrame->AddFrame(fBKEField, fhints); + ParamFrame->AddFrame(bfieldlabel, lhints); + ParamFrame->AddFrame(fBField, fhints); + ParamFrame->AddFrame(thetalabel, lhints); + ParamFrame->AddFrame(fThetaField, fhints); + ParamFrame->AddFrame(ztlabel, lhints); + ParamFrame->AddFrame(fZTField, fhints); + ParamFrame->AddFrame(atlabel, lhints); + ParamFrame->AddFrame(fATField, fhints); + ParamFrame->AddFrame(zplabel, lhints); + ParamFrame->AddFrame(fZPField, fhints); + ParamFrame->AddFrame(aplabel, lhints); + ParamFrame->AddFrame(fAPField, fhints); + ParamFrame->AddFrame(zelabel, lhints); + ParamFrame->AddFrame(fZEField, fhints); + ParamFrame->AddFrame(aelabel, lhints); + ParamFrame->AddFrame(fAEField, fhints); + + TGHorizontalFrame *WindowFrame = new TGHorizontalFrame(InputFrame, w, h*0.1); + TGLabel *slowlabel = new TGLabel(WindowFrame, "Slow Coincidence Window (ps):"); + fSlowWindowField = new TGNumberEntryField(WindowFrame, SLOWWIND, 0, TGNumberEntry::kNESReal, TGNumberEntry::kNEANonNegative); + TGLabel *fasticlabel = new TGLabel(WindowFrame, "Fast Coincidence Window IC (ps):"); + fFastICField = new TGNumberEntryField(WindowFrame, FASTWIND_IC, 0, TGNumberEntry::kNESReal, TGNumberEntry::kNEANonNegative); + TGLabel *fastsabrelabel = new TGLabel(WindowFrame, "Fast Coincidence Window SABRE (ps):"); + fFastSABREField = new TGNumberEntryField(WindowFrame, FASTWIND_SABRE, 0, TGNumberEntry::kNESReal, TGNumberEntry::kNEANonNegative); + WindowFrame->AddFrame(slowlabel, lhints); + WindowFrame->AddFrame(fSlowWindowField, fhints); + WindowFrame->AddFrame(fasticlabel, lhints); + WindowFrame->AddFrame(fFastICField, fhints); + WindowFrame->AddFrame(fastsabrelabel, lhints); + WindowFrame->AddFrame(fFastSABREField, fhints); + + TGHorizontalFrame *RunFrame = new TGHorizontalFrame(InputFrame, w, h*0.1); + TGLabel *typelabel = new TGLabel(RunFrame, "Operation Type:"); + fTypeBox = new TGComboBox(RunFrame, TYPEBOX); + //Needs modification for new conversion based sorting GWM -- Dec 2020 + fTypeBox->AddEntry("Convert Slow", GWMEventBuilder::CONVERT_S); + fTypeBox->AddEntry("Convert Fast", GWMEventBuilder::CONVERT_F); + fTypeBox->AddEntry("Convert SlowA", GWMEventBuilder::CONVERT_SA); + fTypeBox->AddEntry("Convert FastA", GWMEventBuilder::CONVERT_FA); + fTypeBox->AddEntry("Convert", GWMEventBuilder::CONVERT); + fTypeBox->AddEntry("Merge ROOT", GWMEventBuilder::MERGE); + fTypeBox->AddEntry("Plot", GWMEventBuilder::PLOT); + fTypeBox->Resize(200,20); + fTypeBox->Connect("Selected(Int_t, Int_t)","EVBMainFrame",this,"HandleTypeSelection(Int_t,Int_t)"); + TGLabel *rminlabel = new TGLabel(RunFrame, "Min Run:"); + fRMinField = new TGNumberEntryField(RunFrame, RMIN, 0, TGNumberEntry::kNESInteger, TGNumberEntry::kNEANonNegative); + TGLabel *rmaxlabel = new TGLabel(RunFrame, "Max Run:"); + fRMaxField = new TGNumberEntryField(RunFrame, RMAX, 0, TGNumberEntry::kNESInteger, TGNumberEntry::kNEANonNegative); + fRunButton = new TGTextButton(RunFrame, "Run!"); + fRunButton->SetState(kButtonDisabled); + fRunButton->Connect("Clicked()","EVBMainFrame",this,"DoRun()"); + RunFrame->AddFrame(typelabel, lhints); + RunFrame->AddFrame(fTypeBox, fhints); + RunFrame->AddFrame(rminlabel, lhints); + RunFrame->AddFrame(fRMinField, fhints); + RunFrame->AddFrame(rmaxlabel, lhints); + RunFrame->AddFrame(fRMaxField, fhints); + RunFrame->AddFrame(fRunButton, bhints); + + InputFrame->AddFrame(NameFrame, fhints); + InputFrame->AddFrame(ParamFrame, fhints); + InputFrame->AddFrame(WindowFrame, fhints); + InputFrame->AddFrame(RunFrame, fhints); + + TGVerticalFrame *PBFrame = new TGVerticalFrame(this, w, h*0.1); + TGLabel *pbLabel = new TGLabel(PBFrame, "Build Progress"); + fProgressBar = new TGHProgressBar(PBFrame, TGProgressBar::kFancy, w); + fProgressBar->ShowPosition(); + fProgressBar->SetBarColor("lightblue"); + fBuilder.AttachProgressBar(fProgressBar); + PBFrame->AddFrame(pbLabel, lhints); + PBFrame->AddFrame(fProgressBar, fhints); + + TGMenuBar* menuBar = new TGMenuBar(this, w, h*0.1); + fFileMenu = new TGPopupMenu(gClient->GetRoot()); + fFileMenu->AddEntry("Load...", M_LOAD_CONFIG); + fFileMenu->AddEntry("Save...", M_SAVE_CONFIG); + fFileMenu->AddEntry("Exit", M_EXIT); + fFileMenu->Connect("Activated(Int_t)","EVBMainFrame", this, "HandleMenuSelection(Int_t)"); + menuBar->AddPopup("File", fFileMenu, mhints); + + AddFrame(menuBar, new TGLayoutHints(kLHintsTop|kLHintsLeft,0,0,0,0)); + AddFrame(InputFrame, fchints); + AddFrame(PBFrame, fpbhints); + + SetWindowName("GWM Event Builder"); + MapSubwindows(); + Resize(); + MapWindow(); + +} + +EVBMainFrame::~EVBMainFrame() { + Cleanup(); + delete this; +} + +void EVBMainFrame::CloseWindow() { + gApplication->Terminate(); +} + +void EVBMainFrame::HandleMenuSelection(int id) { + if(id == M_SAVE_CONFIG) new FileViewFrame(gClient->GetRoot(), this, MAIN_W*0.5, MAIN_H*0.25, this, M_SAVE_CONFIG); + else if(id == M_LOAD_CONFIG) new FileViewFrame(gClient->GetRoot(), this, MAIN_W*0.5, MAIN_H*0.25, this, M_LOAD_CONFIG); + else if(id == M_EXIT) CloseWindow(); +} + +void EVBMainFrame::DoOpenWorkdir() { + new FileViewFrame(gClient->GetRoot(), this, MAIN_W*0.5, MAIN_H*0.25, this, WORKDIR); +} + +void EVBMainFrame::DoOpenCMapfile() { + new FileViewFrame(gClient->GetRoot(), this, MAIN_W*0.5, MAIN_H*0.25, this, CMAP); +} + +void EVBMainFrame::DoOpenSMapfile() { + new FileViewFrame(gClient->GetRoot(), this, MAIN_W*0.5, MAIN_H*0.25, this, SMAP); +} + +void EVBMainFrame::DoOpenScalerfile() { + new FileViewFrame(gClient->GetRoot(), this, MAIN_W*0.5, MAIN_H*0.25, this, SCALER); +} + +void EVBMainFrame::DoOpenCutfile() { + new FileViewFrame(gClient->GetRoot(), this, MAIN_W*0.5, MAIN_H*0.25, this, CUT); +} + +void EVBMainFrame::DoRun() { + + DisableAllInput(); + + SetParameters(); + + int type = fTypeBox->GetSelected(); + fBuilder.SetAnalysisType(type); + + switch(type) { + case GWMEventBuilder::PLOT : + { + RunPlot(); + break; + } + case GWMEventBuilder::CONVERT : + { + fBuilder.Convert2RawRoot(); + break; + } + case GWMEventBuilder::MERGE : + { + fBuilder.MergeROOTFiles(); + break; + } + case GWMEventBuilder::CONVERT_S : + { + fBuilder.Convert2SortedRoot(); + break; + } + case GWMEventBuilder::CONVERT_F : + { + fBuilder.Convert2FastSortedRoot(); + break; + } + case GWMEventBuilder::CONVERT_SA : + { + fBuilder.Convert2SlowAnalyzedRoot(); + break; + } + case GWMEventBuilder::CONVERT_FA : + { + fBuilder.Convert2FastAnalyzedRoot(); + break; + } + } + + EnableAllInput(); +} + +void EVBMainFrame::HandleTypeSelection(int box, int entry) { + fRunButton->SetState(kButtonUp); +} + +bool EVBMainFrame::SetParameters() { + fBuilder.SetRunRange(fRMinField->GetIntNumber(), fRMaxField->GetIntNumber()); + fBuilder.SetSlowCoincidenceWindow(fSlowWindowField->GetNumber()); + fBuilder.SetFastWindowIonChamber(fFastICField->GetNumber()); + fBuilder.SetFastWindowSABRE(fFastSABREField->GetNumber()); + UpdateWorkdir(); + UpdateSMap(); + UpdateCMap(); + UpdateScaler(); + UpdateCut(); + bool test = fBuilder.SetKinematicParameters(fZTField->GetIntNumber(), fATField->GetIntNumber(), + fZPField->GetIntNumber(), fAPField->GetIntNumber(), + fZEField->GetIntNumber(), fAEField->GetIntNumber(), + fBField->GetNumber(), fThetaField->GetNumber(), + fBKEField->GetNumber()); + return test; +} + +void EVBMainFrame::DisplayWorkdir(const char* dir) { + fWorkField->SetText(dir); + fBuilder.SetWorkDirectory(dir); +} + +void EVBMainFrame::DisplayCMap(const char* file) { + fCMapField->SetText(file); + fBuilder.SetChannelMap(file); +} + +void EVBMainFrame::DisplaySMap(const char* file) { + fSMapField->SetText(file); + fBuilder.SetBoardShiftFile(file); +} + +void EVBMainFrame::DisplayScaler(const char* file) { + fScalerField->SetText(file); + fBuilder.SetScalerFile(file); +} + +void EVBMainFrame::DisplayCut(const char* file) { + fCutField->SetText(file); + fBuilder.SetCutList(file); +} + +void EVBMainFrame::SaveConfig(const char* file) { + std::string filename = file; + fBuilder.WriteConfigFile(filename); +} + +void EVBMainFrame::LoadConfig(const char* file) { + std::string filename = file; + fBuilder.ReadConfigFile(filename); + + fWorkField->SetText(fBuilder.GetWorkDirectory().c_str()); + fCMapField->SetText(fBuilder.GetChannelMap().c_str()); + fSMapField->SetText(fBuilder.GetBoardShiftFile().c_str()); + fCutField->SetText(fBuilder.GetCutList().c_str()); + fScalerField->SetText(fBuilder.GetScalerFile().c_str()); + + fZTField->SetIntNumber(fBuilder.GetTargetZ()); + fATField->SetIntNumber(fBuilder.GetTargetA()); + fZPField->SetIntNumber(fBuilder.GetProjectileZ()); + fAPField->SetIntNumber(fBuilder.GetProjectileA()); + fZEField->SetIntNumber(fBuilder.GetEjectileZ()); + fAEField->SetIntNumber(fBuilder.GetEjectileA()); + fBKEField->SetNumber(fBuilder.GetBeamKE()); + fBField->SetNumber(fBuilder.GetBField()); + fThetaField->SetNumber(fBuilder.GetTheta()); + + fSlowWindowField->SetNumber(fBuilder.GetSlowCoincidenceWindow()); + fFastSABREField->SetNumber(fBuilder.GetFastWindowSABRE()); + fFastICField->SetNumber(fBuilder.GetFastWindowIonChamber()); + + fRMaxField->SetIntNumber(fBuilder.GetRunMax()); + fRMinField->SetIntNumber(fBuilder.GetRunMin()); + +} + +void EVBMainFrame::UpdateWorkdir() { + const char* dir = fWorkField->GetText(); + fBuilder.SetWorkDirectory(dir); +} + +void EVBMainFrame::UpdateSMap() { + const char* file = fSMapField->GetText(); + fBuilder.SetBoardShiftFile(file); +} + +void EVBMainFrame::UpdateCMap() { + const char* file = fCMapField->GetText(); + fBuilder.SetChannelMap(file); +} + +void EVBMainFrame::UpdateScaler() { + const char* file = fScalerField->GetText(); + fBuilder.SetScalerFile(file); +} + +void EVBMainFrame::UpdateCut() { + const char* file = fCutField->GetText(); + fBuilder.SetCutList(file); +} + +void EVBMainFrame::RunPlot() { + fBuilder.PlotHistograms(); +} + +void EVBMainFrame::RunMerge(const char* file, const char* dir) {} + +void EVBMainFrame::DisableAllInput() { + fRunButton->SetState(kButtonDisabled); + fOpenWorkButton->SetState(kButtonDisabled); + fOpenCMapButton->SetState(kButtonDisabled); + fOpenSMapButton->SetState(kButtonDisabled); + fOpenScalerButton->SetState(kButtonDisabled); + fOpenCutButton->SetState(kButtonDisabled); + + fWorkField->SetState(false); + fCMapField->SetState(false); + fSMapField->SetState(false); + fScalerField->SetState(false); + fCutField->SetState(false); + + fTypeBox->SetEnabled(false); + + fZTField->SetState(false); + fATField->SetState(false); + fZPField->SetState(false); + fAPField->SetState(false); + fZEField->SetState(false); + fAEField->SetState(false); + + fBField->SetState(false); + fBKEField->SetState(false); + fThetaField->SetState(false); + + fRMaxField->SetState(false); + fRMinField->SetState(false); + + fSlowWindowField->SetState(false); + fFastICField->SetState(false); + fFastSABREField->SetState(false); +} + +void EVBMainFrame::EnableAllInput() { + fRunButton->SetState(kButtonUp); + fOpenWorkButton->SetState(kButtonUp); + fOpenCMapButton->SetState(kButtonUp); + fOpenSMapButton->SetState(kButtonUp); + fOpenScalerButton->SetState(kButtonUp); + fOpenCutButton->SetState(kButtonUp); + + fWorkField->SetState(true); + fCMapField->SetState(true); + fSMapField->SetState(true); + fScalerField->SetState(true); + fCutField->SetState(true); + + fTypeBox->SetEnabled(true); + + fZTField->SetState(true); + fATField->SetState(true); + fZPField->SetState(true); + fAPField->SetState(true); + fZEField->SetState(true); + fAEField->SetState(true); + + fBField->SetState(true); + fBKEField->SetState(true); + fThetaField->SetState(true); + + fRMaxField->SetState(true); + fRMinField->SetState(true); + + fSlowWindowField->SetState(true); + fFastICField->SetState(true); + fFastSABREField->SetState(true); + +} diff --git a/src/gui/FileViewFrame.cpp b/src/gui/FileViewFrame.cpp new file mode 100644 index 0000000..24d1a2a --- /dev/null +++ b/src/gui/FileViewFrame.cpp @@ -0,0 +1,166 @@ +/* + + FileViewFrame.cpp + Wrapper class on a TGTransientFrame (temporary frame assoc. with a main frame) + Designed to graphically display directories and files for selection. Takes in a type + to specify the signal pathing. + + Written by G.W. McCann Sep. 2020 + +*/ + +#include "EventBuilder.h" +#include "FileViewFrame.h" +#include +#include +#include + +FileViewFrame::FileViewFrame(const TGWindow* p, const TGFrame* main, UInt_t w, UInt_t h, EVBMainFrame *parent, int type) { + fMain = new TGTransientFrame(p,main,w,h); + fMain->SetCleanup(kDeepCleanup); //delete all child frames + fMain->DontCallClose(); //Close button on window disabled + + dirFlag = false; + bool rootFlag = false; + suffix = ".txt"; + if(type == EVBMainFrame::WORKDIR) { + dirFlag = true; + suffix = ".NOTHING"; + } else if(type == EVBMainFrame::PLOTF) { + rootFlag = true; + suffix = ".root"; + } + + /*Layout orgainization hints*/ + TGLayoutHints *fhints = new TGLayoutHints(kLHintsCenterX|kLHintsCenterY,5,5,5,5); + TGLayoutHints *thints = new TGLayoutHints(kLHintsExpandX|kLHintsCenterY,5,5,5,5); + TGLayoutHints *fchints = new TGLayoutHints(kLHintsExpandX|kLHintsExpandY,5,5,5,5); + TGLayoutHints *lhints = new TGLayoutHints(kLHintsLeft|kLHintsTop,5,5,5,5); + TGLayoutHints *fbhints = new TGLayoutHints(kLHintsCenterX|kLHintsBottom,5,5,5,5); + + /*Create object for displaying*/ + fViewer = new TGListView(fMain, w, h*0.5); + Pixel_t white; + gClient->GetColorByName("white", white); + fContents = new TGFileContainer(fViewer, kSunkenFrame, white); + fContents->Connect("DoubleClicked(TGFrame*,Int_t)","FileViewFrame",this,"DoDoubleClick(TGLVEntry*,Int_t)"); + + /*Add in text options*/ + TGVerticalFrame *NameFrame = new TGVerticalFrame(fMain, w, h*0.25); + TGLabel *nameLabel; + if(dirFlag) nameLabel = new TGLabel(NameFrame, "Dir:"); + else nameLabel = new TGLabel(NameFrame, "File:"); + TGTextBuffer* fNameBuffer; + fNameField = new TGTextEntry(NameFrame, fNameBuffer = new TGTextBuffer(50)); + fNameField->Resize(w*0.5, fNameField->GetDefaultHeight()); + NameFrame->AddFrame(nameLabel, lhints); + NameFrame->AddFrame(fNameField, thints); + + /*Buttons for ok and cancel*/ + TGHorizontalFrame *ButtonFrame = new TGHorizontalFrame(fMain, w, h*0.25); + fOkButton = new TGTextButton(ButtonFrame, "Ok"); + fOkButton->Connect("Clicked()","FileViewFrame",this,"DoOk()"); + fCancelButton = new TGTextButton(ButtonFrame, "Cancel"); + fCancelButton->Connect("Clicked()","FileViewFrame",this,"DoCancel()"); + ButtonFrame->AddFrame(fOkButton, fhints); + ButtonFrame->AddFrame(fCancelButton, fhints); + + fMain->AddFrame(fViewer, fchints); + fMain->AddFrame(NameFrame, thints); + fMain->AddFrame(ButtonFrame, fbhints); + + /*Send signal to appropriate location*/ + if(type == EVBMainFrame::WORKDIR) Connect("SendText(const char*)","EVBMainFrame",parent,"DisplayWorkdir(const char*)"); + else if(type == EVBMainFrame::CMAP) Connect("SendText(const char*)","EVBMainFrame",parent,"DisplayCMap(const char*)"); + else if(type == EVBMainFrame::SMAP) Connect("SendText(const char*)","EVBMainFrame",parent,"DisplaySMap(const char*)"); + else if(type == EVBMainFrame::SCALER) Connect("SendText(const char*)","EVBMainFrame",parent,"DisplayScaler(const char*)"); + else if(type == EVBMainFrame::CUT) Connect("SendText(const char*)","EVBMainFrame",parent,"DisplayCut(const char*)"); + else if(type == EVBMainFrame::M_LOAD_CONFIG) Connect("SendText(const char*)","EVBMainFrame",parent,"LoadConfig(const char*)"); + else if(type == EVBMainFrame::M_SAVE_CONFIG) Connect("SendText(const char*)","EVBMainFrame",parent,"SaveConfig(const char*)"); + else if(type == EVBMainFrame::PLOTF) Connect("SendText(const char*)","EVBMainFrame",parent,"RunPlot(const char*)"); + + fMain->SetWindowName("Select File"); + fMain->MapSubwindows(); + fMain->Resize(); + fMain->CenterOnParent(); + fMain->MapWindow(); + + fContents->SetDefaultHeaders(); + if(dirFlag) fContents->SetFilter("*.NOTHING"); //relevant extension + else if(rootFlag) fContents->SetFilter("*.root"); + else fContents->SetFilter("*.txt"); + fContents->DisplayDirectory(); + fContents->AddFile(".."); //go back a dir + fContents->Resize(); + fContents->StopRefreshTimer(); + + fMain->Resize(); +} + +FileViewFrame::~FileViewFrame() { + fMain->Cleanup(); //delete children + fMain->DeleteWindow(); +} + +void FileViewFrame::CloseWindow() { + delete this; +} + +void FileViewFrame::DoOk() { + /*Prevent user from doing something dumb*/ + fOkButton->SetState(kButtonDisabled); + fCancelButton->SetState(kButtonDisabled); + + TString filename = fNameField->GetText(); + TString fullpath = TString(fContents->GetDirectory()) + "/" + filename; + if(fullpath == "") { //check validity + std::cerr<<"Need to give a name!"<SetState(kButtonUp); + fCancelButton->SetState(kButtonUp); + return; + } + + SendText(fullpath.Data()); //signal sent + //Destroy this frame after a brief pause (to make sure memory isnt freed too quickly) + TTimer::SingleShot(150,"FileViewFrame",this,"CloseWindow()"); +} + +void FileViewFrame::DoCancel() { + /*Prevent user from doing something dumb*/ + fOkButton->SetState(kButtonDisabled); + fCancelButton->SetState(kButtonDisabled); + + //Destroy this frame after a brief pause (to make sure memory isnt freed too quickly) + TTimer::SingleShot(150,"FileViewFrame",this,"CloseWindow()"); +} + +//Handle directory selection +void FileViewFrame::DisplayDir(const TString& name) { + fContents->SetDefaultHeaders(); + fContents->ChangeDirectory(name); + fContents->DisplayDirectory(); + fContents->AddFile(".."); + fMain->Resize(); +} + +//Handle double click +void FileViewFrame::DoDoubleClick(TGLVEntry *entry, int id) { + if( id != kButton1) return; + TString dirname(fContents->GetDirectory()); + TString entryname(entry->GetTitle()); + + if(entryname.EndsWith(suffix.c_str())) { //check if its a file + TString name = entryname; + fNameField->SetText(name.Data()); + } else { + DisplayDir(entryname); + if(dirFlag) { + fNameField->SetText((dirname+"/"+entryname).Data()); + } + } +} + +/*SIGNAL*/ +void FileViewFrame::SendText(const char* text) { + Emit("SendText(const char*)", text); +} diff --git a/src/gui_main.cpp b/src/gui_main.cpp new file mode 100644 index 0000000..be2cb82 --- /dev/null +++ b/src/gui_main.cpp @@ -0,0 +1,12 @@ +#include "EventBuilder.h" +#include +#include "EVBMainFrame.h" + +int main(int argc, char** argv) { + TApplication app("app", &argc, argv); + UInt_t h = 400; + UInt_t w = 400; + EVBMainFrame* myEVB = new EVBMainFrame(gClient->GetRoot(), w, h); + app.Run(); + return 0; +} \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..a98e11b --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,61 @@ +#include "EventBuilder.h" +#include "GWMEventBuilder.h" +#include "Stopwatch.h" + +int main(int argc, char** argv) { + if(argc != 3) { + std::cerr<<"Incorrect number of command line arguments!"<