From b2fcbf957d4ea44f395ca686e25e4a5fd6ee1bdc Mon Sep 17 00:00:00 2001 From: "ryan@pauli" Date: Thu, 30 May 2024 16:06:10 -0400 Subject: [PATCH] add README.md, a little clean up --- .vscode/c_cpp_properties.json | 17 ++++ .vscode/settings.json | 10 ++ DecayFinder.C | 4 +- README.md | 98 +++++++++++++++++++ armory/{ => obsolete}/EventBuilder_evt.cpp | 0 .../{ => obsolete}/EventBuilder_seperated.cpp | 0 peachCake.C | 2 +- peachCake.h | 2 +- script.C | 30 +++--- 9 files changed, 145 insertions(+), 18 deletions(-) create mode 100644 .vscode/c_cpp_properties.json create mode 100644 .vscode/settings.json create mode 100644 README.md rename armory/{ => obsolete}/EventBuilder_evt.cpp (100%) rename armory/{ => obsolete}/EventBuilder_seperated.cpp (100%) diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..5df63f3 --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,17 @@ +{ + "configurations": [ + { + "name": "Linux", + "includePath": [ + "${workspaceFolder}/**", + "/opt/root/**" + ], + "defines": [], + "compilerPath": "/usr/bin/gcc", + "cStandard": "c17", + "cppStandard": "gnu++14", + "intelliSenseMode": "linux-gcc-x64" + } + ], + "version": 4 +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..bbda661 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,10 @@ +{ + "files.associations": { + "DecayFinder.C": "cpp", + "script.C": "cpp", + "peachCake.C": "cpp", + "PIDCutCreator.C": "cpp", + "plotPID.C": "cpp", + "PIDCutChecker.C": "cpp" + } +} \ No newline at end of file diff --git a/DecayFinder.C b/DecayFinder.C index 203dba2..5b9a7b2 100644 --- a/DecayFinder.C +++ b/DecayFinder.C @@ -41,7 +41,7 @@ int numCut = 0; int numMatch = 0; -vector> isotopes = { +std::vector> isotopes = { {19, 7}, {20, 7}, {21, 7}, {22, 8}, {23, 8}, {24, 8}, {24, 9}, {25, 9}, {26, 9}, {27, 9}, {29, 9}, @@ -53,7 +53,7 @@ vector> isotopes = { {43, 15}, {44, 15} }; -string isoSym(int Z){ +std::string isoSym(int Z){ switch (Z) { case 3 : return "Li"; break; case 4 : return "Be"; break; diff --git a/README.md b/README.md new file mode 100644 index 0000000..3a25b23 --- /dev/null +++ b/README.md @@ -0,0 +1,98 @@ +# Introduction + +This is analysis code package for FRIB iFDS (FRIB Decay Staion initiative) experiment e21061. + +My personal analysis logbook can be found in [Here](https://fsu-my.sharepoint.com/:p:/g/personal/rtang_fsu_edu/EdnWBI0J1g9FovvbKVvvgHoBoHy1rokedIF7f-Sr9XA6aA). The experimental setup can also be found there. + +The elog can be found in [Here](https://fsunuc.physics.fsu.edu/elog/2022_05_e21062_FRIB/) + +Other information of the experiment can be found [Here](https://fsunuc.physics.fsu.edu/wiki/index.php/FRIB_FDSi_e21062) + +# Programs + +### convertPixie.sh + +convert NSCL-evt (raw data) to pixie-evt, ripe off the NSCL header. + +### convertRoot.sh + +convert pixie-evt to root with event building and mapping.h applied. + +### mapping.h + +Thsi define the mapping + +### peachCake.C/h + +Analysis class from TSelector. It do the primary analysis and apply corrections. It has option to output a new root file (with prefix "zzz_") with tree branches: + +- eventID | eventID +- runID | runID +- AoQ | A/Q value of PID +- Z | Z value of PID +- crossTime | cross scint. T2 analog time +- crossEnergy | croos scint. T2 analog energy +- flag | event identification flag, +1 = has Beta, +2 = has Ions, +4 = has Beam +- vetoFlag | veto, +1 = has Front trigger, +2 = has Rear trigger, +4 = has cross scint T2/B2 +- xIons | x-pos of Ions +- yIons | y-pos of Ions +- xBeta | x-pos of beta +- yBeta | y-pos of beta +- dyIonsTime | dinode Ions time +- dyBetaTime | dinode Beta time +- veto_f | front veto detector energy +- veto_r | rear veto detector energy + +### DecayFinder.C/h + +The DecayFinder.C/h analysis the zzz_XXX files to obtain the decay curve for various isotopes. + +### PIDCutCreator.C and PIDCutChecker.C + +Create/Check the PID cut. + +### scipt.C + +root macro to run analysis flow at once. + +# Analysis Flow + +1. The NSCL-evt file to pixie-evt file (nscl2pixie) +2. Use the EventBuilder to build event and apply the mapping.h +3. Use peachCake.C/h to analysis and output a new root file. +4. Use DecayFinder.C/h to obtain the decay histogram. + + +# inside the Armory + +### DataBlock.h +This defines a class **DataBlock** to store data from pixie digitizer + +### nsclEvtReader.h + +This defines a class **NSCLEvtReader** to read NSCL evt file. + +### nscl2pixie + +This is a program to convert NSCL-evt file to evt file. Basically ripe out all NSCL header. + +The bash script **converPixie.sh** use this program to batch convert NSCL-evt to evt file. + +### evtReader.h + +This defines a class **evtReader** to read pixie evt file. + +### EventBuilder + +This is a program to convert pixie-evt to root file with event building. This program will apply the mapping.h. The output tree has branches + +1. evtID | event ID, unsigned int +2. multi | event multiplicity, int +3. detID | detector ID defined in mapping.h, int +4. e | energy, double +5. e_t | timestamp, ULong64_t +6. cfd | fine time from cfd, int +7. qdc | 8-section of intergrated trace, int[8] +8. multiClover | multiplicity of Clover +9. multiBeam | multiplicity of beam-line detector +10. runID | runID, e.g. run-0330-17 = 330*100 + 17 = 33017 diff --git a/armory/EventBuilder_evt.cpp b/armory/obsolete/EventBuilder_evt.cpp similarity index 100% rename from armory/EventBuilder_evt.cpp rename to armory/obsolete/EventBuilder_evt.cpp diff --git a/armory/EventBuilder_seperated.cpp b/armory/obsolete/EventBuilder_seperated.cpp similarity index 100% rename from armory/EventBuilder_seperated.cpp rename to armory/obsolete/EventBuilder_seperated.cpp diff --git a/peachCake.C b/peachCake.C index 6a2ef5b..8f801be 100644 --- a/peachCake.C +++ b/peachCake.C @@ -52,7 +52,7 @@ TH1F * hvetoFlag; //TObjArray * cutList; //int numCut = 0; -vector> eCorr; +std::vector> eCorr; double TOFCorrection(double x){ ///========= for run 250 diff --git a/peachCake.h b/peachCake.h index 7136a30..e0d0b1e 100644 --- a/peachCake.h +++ b/peachCake.h @@ -83,7 +83,7 @@ public : ClassDef(peachCake,0); TString pidCorrFileName; - vector> pidCorr; + std::vector> pidCorr; //=========== varibales in new tree bool saveNewTree; diff --git a/script.C b/script.C index 39faf99..7ab70bc 100644 --- a/script.C +++ b/script.C @@ -2,7 +2,9 @@ ///evtReader * evt = new evtReader("run-0238-00.evt", true); -#include "peachCake.C+" +#inlcude "TString.h" + +#include "peachCake.C+" // the + sign is make sure the peachCake is compiled. void script() { @@ -18,19 +20,19 @@ void script() { // new beam chain->Add("root_data/run-024[6-8]*.root"); - chain->Add("root_data/run-0250*.root"); - chain->Add("root_data/run-025[1-4].root"); - chain->Add("root_data/run-025[6-9].root"); - chain->Add("root_data/run-026[1-4]*.root"); - chain->Add("root_data/run-0269*.root"); - chain->Add("root_data/run-027[0-1]*.root"); - chain->Add("root_data/run-028[3-4]*.root"); - chain->Add("root_data/run-028[6-8]*.root"); - chain->Add("root_data/run-0292*.root"); - chain->Add("root_data/run-029[4-6]*.root"); - chain->Add("root_data/run-029[8-9]*.root"); - chain->Add("root_data/run-031*.root"); - chain->Add("root_data/run-032*.root"); + // chain->Add("root_data/run-0250*.root"); + // chain->Add("root_data/run-025[1-4].root"); + // chain->Add("root_data/run-025[6-9].root"); + // chain->Add("root_data/run-026[1-4]*.root"); + // chain->Add("root_data/run-0269*.root"); + // chain->Add("root_data/run-027[0-1]*.root"); + // chain->Add("root_data/run-028[3-4]*.root"); + // chain->Add("root_data/run-028[6-8]*.root"); + // chain->Add("root_data/run-0292*.root"); + // chain->Add("root_data/run-029[4-6]*.root"); + // chain->Add("root_data/run-029[8-9]*.root"); + // chain->Add("root_data/run-031*.root"); + // chain->Add("root_data/run-032*.root"); //chain->Add("root_data/run-0246-00.root");