Compare commits

...

5 Commits

Author SHA1 Message Date
Ryan Tang b50101c8a9 update README.md for fresh ubuntu install 2024-04-10 14:03:13 -04:00
Ryan Tang c7d29ca9f8 fix againgit add -A! 2024-02-15 11:23:11 -05:00
Ryan Tang b030608c57 fix again 2024-02-15 11:22:11 -05:00
Ryan Tang 7ced3c4e49 fix readme picture 2024-02-15 11:21:14 -05:00
Ryan Tang 70bbaeabab modified for geant4-11, add README.md 2024-02-15 11:18:34 -05:00
9 changed files with 65 additions and 17 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.vscode

BIN
Clarion2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

View File

@ -1,12 +0,0 @@
#ifndef CloverAnalysis_h
#define CloverAnalysis_h 1
#include "g4root.hh"
//#include "g4csv.hh"
//#include "g4xml.hh"
//#include "G4GenericAnalysisManager.hh"
//using G4AnalysisManager = G4GenericAnalysisManager;
#endif

View File

@ -2,7 +2,7 @@
#include "CloverEventAction.hh" #include "CloverEventAction.hh"
#include "CloverCrystalSD.hh" #include "CloverCrystalSD.hh"
#include "CloverCrystalHit.hh" #include "CloverCrystalHit.hh"
#include "CloverAnalysis.hh" // #include "CloverAnalysis.hh"
#include "Detector_Parameters.hh" #include "Detector_Parameters.hh"

View File

@ -3,11 +3,11 @@
#define CloverEventAction_h 1 #define CloverEventAction_h 1
#include "G4UserEventAction.hh" #include "G4UserEventAction.hh"
#include "G4AnalysisManager.hh"
#include "globals.hh"
#include "CloverCrystalHit.hh" #include "CloverCrystalHit.hh"
#include "globals.hh"
#include <vector> #include <vector>
/// Event action class /// Event action class

View File

@ -1,6 +1,5 @@
#include "CloverRunAction.hh" #include "CloverRunAction.hh"
#include "CloverAnalysis.hh"
#include "CloverEventAction.hh" #include "CloverEventAction.hh"
#include "G4Run.hh" #include "G4Run.hh"

60
README.md Normal file
View File

@ -0,0 +1,60 @@
# About
This is a geant4 simulation for the Clarion2 gamma-detector array. It based on https://github.com/goluckyryan/HPGeClover.
![Clarion 2 Drawing](https://fsunuc.physics.fsu.edu/git/pderosa888/CLARION2_GEANT4/raw/branch/master/Clarion2.png)
# Build the code
Once downloaded the code, create a new folder for the build.
```sh
>mkdir Clarion2_build
>cd Clarion2_build
>cmake <path/to/CLARION2_GEANT4
>make
```
you should have the '''clover''' created.
## to run in interactive mode
```sh
>./clover
```
## to run in bash mode
```sh
>./clover <in_file>
```
# KNOWN BUGS
* Segfault at exit program
* Some of the Clovers seems to be not at the right orientation, especially at the upstream.
# To build GEANT4 11.2.0 in Ubuntu 22.04
## Visuailization
I pick the Qt + openGL as the visualiization, for that we need
```sh
>sudo apt install qt6-base-dev libqt6charts6-dev qt6-3d-dev
```
the openGL should come with Ubuntu 22.04
## Steps
```sh
>sudo apt install libexpat1-dev libxmu-dev linxkbcommon-dev
>cd Downloads
>wget https://gitlab.cern.ch/geant4/geant4/-/archive/v11.2.0/geant4-v11.2.0.tar.gz
>tar xzf geant4-v11.2.0.tar.gz
>mkdir geant4-v11.2.0_build
>cd geant4-v11.2.0_build
>cmake -DGEANT4_INSTALL_DATA=On -DCMAKE_INSTALL_PREFIX=/opt/geant4-v11.2.0 -DGEANT4_USE_OPENGL_X11=ON -DGEANT4_USE_QT=ON -DGEANT4_USE_QT_QT6=ON ../geant4-v11.2.0
>make -j10
>sudo make install
>echo 'source /opt/geant4-v11.2.0/bin/geant4.sh' >> ~/.bashrc
```

View File

Before

Width:  |  Height:  |  Size: 129 KiB

After

Width:  |  Height:  |  Size: 129 KiB

2
my.in
View File

@ -30,7 +30,7 @@
#/gun/energy 6.13 MeV #/gun/energy 6.13 MeV
#-------Override Opening angle #-------Override Opening angle
/Clover/generator/OpeningAngle 10 deg /Clover/generator/OpeningAngle 180 deg
#-------Override output root file #-------Override output root file
/analysis/setFileName 000SingleCrystal.root /analysis/setFileName 000SingleCrystal.root