From 8666f266b060c9d657c69731c2d3a24c46f82bc9 Mon Sep 17 00:00:00 2001 From: martinunland Date: Mon, 17 Jun 2024 10:45:31 +0200 Subject: [PATCH 1/2] first push --- .gitignore | 6 ++++-- 240617_analysis/okamoto_yield.ipynb | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 240617_analysis/okamoto_yield.ipynb diff --git a/.gitignore b/.gitignore index 5ce0fe96b1..83041035ea 100644 --- a/.gitignore +++ b/.gitignore @@ -33,9 +33,11 @@ build/ -build2/ build*/ doxygen_documentation/html doxygen_documentation/latex .vscode/ -CMakeLists.txt \ No newline at end of file +CMakeLists.txt + +240617_analysis/* +!240617_analysis/okamoto_yield.ipynb \ No newline at end of file diff --git a/240617_analysis/okamoto_yield.ipynb b/240617_analysis/okamoto_yield.ipynb new file mode 100644 index 0000000000..363fcab7ed --- /dev/null +++ b/240617_analysis/okamoto_yield.ipynb @@ -0,0 +1,6 @@ +{ + "cells": [], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 5 +} From 6a5aee94d53bc02da5852dfaf66e8ebb04e453af Mon Sep 17 00:00:00 2001 From: martinunland Date: Mon, 17 Jun 2024 11:22:45 +0200 Subject: [PATCH 2/2] setting up yield setup classes --- 240617_analysis/okamoto_yield.ipynb | 53 ++++++++++++++++++- .../include/OMSimOpticalModule.hh | 1 + radioactive_decays/include/OMSimYieldSetup.hh | 24 +++++++++ .../src/OMSimRadDecaysDetector.cc | 9 +++- radioactive_decays/src/OMSimYieldSetup.cc | 12 +++++ 5 files changed, 96 insertions(+), 3 deletions(-) create mode 100644 radioactive_decays/include/OMSimYieldSetup.hh create mode 100644 radioactive_decays/src/OMSimYieldSetup.cc diff --git a/240617_analysis/okamoto_yield.ipynb b/240617_analysis/okamoto_yield.ipynb index 363fcab7ed..4d8d2ed417 100644 --- a/240617_analysis/okamoto_yield.ipynb +++ b/240617_analysis/okamoto_yield.ipynb @@ -1,6 +1,55 @@ { - "cells": [], - "metadata": {}, + "cells": [ + { + "cell_type": "code", + "execution_count": 2, + "id": "c8b1e8c1", + "metadata": {}, + "outputs": [], + "source": [ + "import numpy as np\n", + "import matplotlib.pyplot as plt\n", + "from scipy.optimize import curve_fit\n", + "from uncertainties import ufloat\n", + "%matplotlib notebook" + ] + }, + { + "cell_type": "markdown", + "id": "5242ffa6", + "metadata": {}, + "source": [ + "# Okamoto glass electron yield" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e7441a0d", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.6" + } + }, "nbformat": 4, "nbformat_minor": 5 } diff --git a/common/geometry_construction/include/OMSimOpticalModule.hh b/common/geometry_construction/include/OMSimOpticalModule.hh index a80a76bb6d..71fb4ffc44 100644 --- a/common/geometry_construction/include/OMSimOpticalModule.hh +++ b/common/geometry_construction/include/OMSimOpticalModule.hh @@ -10,6 +10,7 @@ */ #ifndef OpticalModule_h #define OpticalModule_h 1 + #include "abcDetectorComponent.hh" #include "OMSimHitManager.hh" #include "OMSimPMTConstruction.hh" diff --git a/radioactive_decays/include/OMSimYieldSetup.hh b/radioactive_decays/include/OMSimYieldSetup.hh new file mode 100644 index 0000000000..8c02f35cbf --- /dev/null +++ b/radioactive_decays/include/OMSimYieldSetup.hh @@ -0,0 +1,24 @@ +#ifndef Cs137Source_h +#define Cs137Source_h 1 + +#include "abcDetectorComponent.hh" + +class Cs137Source : abcDetectorComponent +{ +public: + Cs137Source(InputDataManager *pData); + ~Cs137Source()=default; + void construction(); + +}; + +class OkamotoLargeSample : abcDetectorComponent +{ +public: + OkamotoLargeSample(InputDataManager *pData); + ~OkamotoLargeSample()=default; + void construction(); + +}; + +#endif \ No newline at end of file diff --git a/radioactive_decays/src/OMSimRadDecaysDetector.cc b/radioactive_decays/src/OMSimRadDecaysDetector.cc index ce1e840a51..9a37bf29d9 100644 --- a/radioactive_decays/src/OMSimRadDecaysDetector.cc +++ b/radioactive_decays/src/OMSimRadDecaysDetector.cc @@ -37,7 +37,14 @@ void OMSimRadDecaysDetector::constructDetector() case 0: { - log_critical("No custom detector implemented!"); + log_info("Constructing Okamoto Cs-137 Source setup for electron yield"); + OMSimPMTConstruction *lPMTManager = new OMSimPMTConstruction(mData); + lPMTManager->selectPMT("argPMT"); + lPMTManager->construction(); + lPMTManager->placeIt(G4ThreeVector(0, 0, 0), G4RotationMatrix(), mWorldLogical, "_0"); + lHitManager.setNumberOfPMTs(1, 0); + lPMTManager->configureSensitiveVolume(this, "/PMT/0"); + break; } case 1: diff --git a/radioactive_decays/src/OMSimYieldSetup.cc b/radioactive_decays/src/OMSimYieldSetup.cc new file mode 100644 index 0000000000..c67f7e9651 --- /dev/null +++ b/radioactive_decays/src/OMSimYieldSetup.cc @@ -0,0 +1,12 @@ + +#include "OMSimYieldSetup.hh" + +Cs137Source::Cs137Source(InputDataManager *pData) +{ + mData = pData; +} + +OkamotoLargeSample::OkamotoLargeSample(InputDataManager *pData) +{ + mData = pData; +} \ No newline at end of file