From 08bbf25cb846320f67ba9c10d3cd109e1841cafa Mon Sep 17 00:00:00 2001 From: Xythere <xytherex@gmail.com> Date: Fri, 13 Dec 2024 16:13:19 +0100 Subject: [PATCH] Monster Project --- Projects/Monster/.ls_return | 1 + Projects/Monster/.tmp/Monster.detector | 14 ++++++ Projects/Monster/.tmp/neutron.source | 24 +++++++++ Projects/Monster/Analysis.cxx | 68 ++++++++++++++++++++++++++ Projects/Monster/Analysis.h | 42 ++++++++++++++++ Projects/Monster/CMakeLists.txt | 5 ++ Projects/Monster/Monster.detector | 16 ++++++ Projects/Monster/PhysicsListOption.txt | 15 ++++++ Projects/Monster/test.mac | 1 + 9 files changed, 186 insertions(+) create mode 100644 Projects/Monster/.ls_return create mode 100644 Projects/Monster/.tmp/Monster.detector create mode 100644 Projects/Monster/.tmp/neutron.source create mode 100644 Projects/Monster/Analysis.cxx create mode 100644 Projects/Monster/Analysis.h create mode 100644 Projects/Monster/CMakeLists.txt create mode 100644 Projects/Monster/Monster.detector create mode 100644 Projects/Monster/PhysicsListOption.txt create mode 100644 Projects/Monster/test.mac diff --git a/Projects/Monster/.ls_return b/Projects/Monster/.ls_return new file mode 100644 index 000000000..70f079081 --- /dev/null +++ b/Projects/Monster/.ls_return @@ -0,0 +1 @@ +/vol0/nptool/Outputs/Simulation/SimulatedTree.root diff --git a/Projects/Monster/.tmp/Monster.detector b/Projects/Monster/.tmp/Monster.detector new file mode 100644 index 000000000..ddaed7b03 --- /dev/null +++ b/Projects/Monster/.tmp/Monster.detector @@ -0,0 +1,14 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Alias Theta + Action= Copy + Value= 30 43 56 69 82 95 108 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Alias Phi + Action= Copy + Value= 30 50 70 90 110 130 150 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Monster + R= 1668.5 mm + THETA= @Theta deg + PHI= @Phi deg + diff --git a/Projects/Monster/.tmp/neutron.source b/Projects/Monster/.tmp/neutron.source new file mode 100644 index 000000000..acdfdad6f --- /dev/null +++ b/Projects/Monster/.tmp/neutron.source @@ -0,0 +1,24 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%% An Isotropic Source to be used as EventGenerator %%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Energy are given in MeV , Position in mm % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Isotropic + EnergyLow= 1 MeV + EnergyHigh= 1 MeV + %EnergyDistribution= flat + %EnergyDistribution= Watt + %EnergyDistribution= 0.38*sqrt(x)*exp(-x/0.847212) + %EnergyDistribution= 1.5*TMath::SinH(sqrt(1.3*x))*exp(-0.89*x) + %EnergyDistribution= FromHisto + %EnergyDistributionHist= hEx.root hEx + HalfOpenAngleMin= 0 + HalfOpenAngleMax= 180 + x0= 0 + y0= 0 + z0= 0 mm + Multiplicity= 1 + Particle= neutron +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Supported particle type: proton, neutron, deuton, triton, He3 , alpha + diff --git a/Projects/Monster/Analysis.cxx b/Projects/Monster/Analysis.cxx new file mode 100644 index 000000000..081a8cbfd --- /dev/null +++ b/Projects/Monster/Analysis.cxx @@ -0,0 +1,68 @@ +/***************************************************************************** + * Copyright (C) 2009-2016 this file is part of the NPTool Project * + * * + * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * + * For the list of contributors see $NPTOOL/Licence/Contributors * + *****************************************************************************/ + +/***************************************************************************** + * Original Author: XAUTHORX contact address: XMAILX * + * * + * Creation Date : XMONTHX XYEARX * + * Last update : * + *---------------------------------------------------------------------------* + * Decription: * + * This class describe Monster analysis project * + * * + *---------------------------------------------------------------------------* + * Comment: * + * * + *****************************************************************************/ + +#include<iostream> +using namespace std; +#include"Analysis.h" +#include"NPAnalysisFactory.h" +#include"NPDetectorManager.h" +//////////////////////////////////////////////////////////////////////////////// +Analysis::Analysis(){ +} +//////////////////////////////////////////////////////////////////////////////// +Analysis::~Analysis(){ +} + +//////////////////////////////////////////////////////////////////////////////// +void Analysis::Init(){ + Monster= (TMonsterPhysicsPhysics*) m_DetectorManager->GetDetector("Monster"); +} + +//////////////////////////////////////////////////////////////////////////////// +void Analysis::TreatEvent(){ +} + +//////////////////////////////////////////////////////////////////////////////// +void Analysis::End(){ +} + + +//////////////////////////////////////////////////////////////////////////////// +// Construct Method to be pass to the DetectorFactory // +//////////////////////////////////////////////////////////////////////////////// +NPL::VAnalysis* Analysis::Construct(){ + return (NPL::VAnalysis*) new Analysis(); +} + +//////////////////////////////////////////////////////////////////////////////// +// Registering the construct method to the factory // +//////////////////////////////////////////////////////////////////////////////// +extern "C"{ +class proxy{ + public: + proxy(){ + NPL::AnalysisFactory::getInstance()->SetConstructor(Analysis::Construct); + } +}; + +proxy p; +} + diff --git a/Projects/Monster/Analysis.h b/Projects/Monster/Analysis.h new file mode 100644 index 000000000..2275088c7 --- /dev/null +++ b/Projects/Monster/Analysis.h @@ -0,0 +1,42 @@ +#ifndef Analysis_h +#define Analysis_h +/***************************************************************************** + * Copyright (C) 2009-2016 this file is part of the NPTool Project * + * * + * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * + * For the list of contributors see $NPTOOL/Licence/Contributors * + *****************************************************************************/ + +/***************************************************************************** + * Original Author: XAUTHORX contact address: XMAILX * + * * + * Creation Date : XMONTHX XYEARX * + * Last update : * + *---------------------------------------------------------------------------* + * Decription: * + * This class describe Monster analysis project * + * * + *---------------------------------------------------------------------------* + * Comment: * + * * + *****************************************************************************/ + +#include"NPVAnalysis.h" +#include"TMonsterPhysics.h" +class Analysis: public NPL::VAnalysis{ + public: + Analysis(); + ~Analysis(); + + public: + void Init(); + void TreatEvent(); + void End(); + + static NPL::VAnalysis* Construct(); + + private: + TMonsterPhysics* Monster; + +}; +#endif diff --git a/Projects/Monster/CMakeLists.txt b/Projects/Monster/CMakeLists.txt new file mode 100644 index 000000000..22c74affd --- /dev/null +++ b/Projects/Monster/CMakeLists.txt @@ -0,0 +1,5 @@ +cmake_minimum_required (VERSION 2.8) +# Setting the policy to match Cmake version +cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}) +# include the default NPAnalysis cmake file +include("../../NPLib/ressources/CMake/NPAnalysis.cmake") diff --git a/Projects/Monster/Monster.detector b/Projects/Monster/Monster.detector new file mode 100644 index 000000000..a9e577e0f --- /dev/null +++ b/Projects/Monster/Monster.detector @@ -0,0 +1,16 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Alias Theta + Action= Copy + Value= 30 43 56 69 82 95 108 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Alias Phi + Action= Copy + Value= 30 50 70 90 110 130 150 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Monster + R= 1668.5 mm + THETA= @Theta deg + PHI= @Phi deg + Shape= Cylindrical + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + diff --git a/Projects/Monster/PhysicsListOption.txt b/Projects/Monster/PhysicsListOption.txt new file mode 100644 index 000000000..ec1a9581f --- /dev/null +++ b/Projects/Monster/PhysicsListOption.txt @@ -0,0 +1,15 @@ +EmPhysicsList Option4 +DefaultCutOff 1 +DriftElectronPhysics 0 +IonBinaryCascadePhysics 0 +NPIonInelasticPhysics 0 +EmExtraPhysics 0 +HadronElasticPhysics 0 +StoppingPhysics 0 +OpticalPhysics 0 +HadronPhysicsINCLXX 0 +HadronPhysicsQGSP_BIC_HP 0 +HadronPhysicsQGSP_BERT_HP 0 +Decay 0 +Menate_R 0 +NeutronHP 1 diff --git a/Projects/Monster/test.mac b/Projects/Monster/test.mac new file mode 100644 index 000000000..325d88eef --- /dev/null +++ b/Projects/Monster/test.mac @@ -0,0 +1 @@ +/run/beamOn 1000000 -- GitLab