Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
8cd4726
Introduction of new active He class from JRMA
ppmartel Aug 25, 2020
bd733d0
First changes by Alicia, not working when sensitive
ppmartel Aug 25, 2020
2152541
Additional config for active helium target
ppmartel Aug 25, 2020
84a2a29
Commented out some unused variables
ppmartel Aug 25, 2020
2bcfe7e
Some changes to the sensitive part of the active target, matching som…
ppmartel Aug 25, 2020
ba1a76f
Remove warning about converting int to bool
ppmartel Nov 19, 2020
b583d13
Fixed sensitive detector issue for the WLS version
ppmartel Nov 19, 2020
38e92f0
Cleaned up some of the new active He3 code, changed branch naming to …
ppmartel Nov 20, 2020
95a0b3d
Fixed naming error in phase space variables
ppmartel Jan 28, 2021
41eb5d2
Capitalized m in Thetamin and Thetamax to match other variables
ppmartel Jan 28, 2021
24a76e1
Added phi selection in phase space generator
ppmartel Jan 28, 2021
13ee6d2
Attempts to fix scintillation properties for WLS
ppmartel Feb 8, 2021
23401be
Changed WLS surface
ppmartel Feb 8, 2021
a765ac4
Adding optical physics in, but is this needed or correct?
ppmartel Feb 8, 2021
6f3f612
Force the default physics list, which causes it to work now
ppmartel Feb 18, 2021
3c260e8
Made helium see through in visualization
ppmartel Feb 18, 2021
d7b8126
Changing to logical border surface, and changed to tube WLS for simpl…
ppmartel Feb 18, 2021
ef2d517
Changes to use the WLS fibers and visualize them
ppmartel Feb 18, 2021
bcbb1be
Added some temp readout to debug
ppmartel Feb 18, 2021
e3d328c
Added more debugging readout foundation to stepping action, plus a ca…
ppmartel Feb 22, 2021
a8ebc48
Lots of chanages unfortunately: separated WLS into different versions…
ppmartel Feb 22, 2021
8863bbd
Changes to data file to reflect code changes to WLS
ppmartel Feb 22, 2021
1ffa8a5
New macro for just building the active target, useful for visualizati…
ppmartel Feb 22, 2021
51605cb
Larger array to handle more detectors in active target
ppmartel Feb 22, 2021
de7c29e
Better visualization for active target
ppmartel Feb 22, 2021
6d4c902
Phase space generator for active target
ppmartel Feb 22, 2021
e6ee44d
Use QGSP_BERT for the moment, instead of QGSP_BERT_HP which is slower
ppmartel Feb 22, 2021
6147c0b
Fixed SiPM placement for plate design. Still could lead to overlaps, …
ppmartel Mar 18, 2021
fb01f8c
Coded in simplistic helix concept as rings
ppmartel Mar 18, 2021
6d0677c
Reduced spacing between helix rings, and added configuration for it
ppmartel Mar 19, 2021
d240285
Fix bug where the helium volume also reads out
ppmartel Mar 19, 2021
72a5b23
Fixed small bug in helix/ring placement
ppmartel Mar 22, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions data/ActiveHe3.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
## Active Target Parameters
## JRMA 30th June 2020
##
## Vessel dimensions in mm
## length main cell
## radius main cell
## wall thickness
## upstream extension length
## downstream extension length
## extension inner radius
## Be window thickness
AT-Dim: 420.0 51.0 1.5 150.0 50.0 10.0 0.5
##
## Wavelength shifting plates
## # segments in 2pi phi
## plate thickness
## radial clearance to main vessel side
## lateral clearance to main vessel ends
# Plate
#AT-WLS: 8 3.0 2.0 5.0
# Fiber
#AT-WLS: 40 6.0 0.0 5.0
# Helix
AT-WLS: 60 0.5 5.0 5.0
##
## Scintillation Yield (# photons/MeV)
AT-Scint: 65
##
## Run Mode 0=no, 1=yes
## Check overlaps
## Use WLS (1: plate barrel, 2: fiber barrel, 3: fiber helix)
## Run optical photon tracking
## Use TPB (instead of nitrogen for shifter)
## Section main cell along length
Run-Mode: 0 3 1 1 0
182 changes: 182 additions & 0 deletions include/A2ActiveHe3.hh
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
// He3 gas scintillator active target
// Original coding B.Strandberg 2013-2015
// Modified for A2Geant-Master
// J.R.M. Annand 18th June 2020
// J.R.M. Annand 29th June 2020 Add WLS plates option
//
#ifndef A2ActiveHe3_h
#define A2ActiveHe3_h 1

//includes
#include "A2Target.hh"
#include "G4LogicalVolume.hh"
#include "G4Material.hh"
#include "G4MaterialPropertiesTable.hh"
#include "G4OpticalSurface.hh"
#include "G4NistManager.hh"
#include "G4Region.hh"
#include "A2SD.hh"
#include "A2VisSD.hh"


class A2ActiveHe3: public A2Target
{
public:

A2ActiveHe3();
~A2ActiveHe3();

virtual G4VPhysicalVolume* Construct(G4LogicalVolume *MotherLogical, G4double=0);

//functions used with macros
void SetMakeMylarSections(G4int makesections) {fMakeMylarSections = makesections;}
void SetOpticalSimulation(G4int optsim) {fOpticalSimulation = optsim; }
G4int GetOpticalSimulation() { return fOpticalSimulation; }

void SetScintillationYield(G4double scintyield);

//used for communication with stepping action
void SetMakeEpoxy(G4bool makeepoxy) {fMakeEpoxy = makeepoxy;}
G4bool GetMakeEpoxy() {return fMakeEpoxy;}

//functions that build parts of the detector
void MakeVessel();
void MakeWLSPlates();
void MakeWLSFibers();
void MakeWLSHelix();
void MakePCB();
void MakeTeflonLayer();
void MakeSiPMTs();
void MakeMylarSections(G4int nrofsections);
void DefineMaterials();
void SetOpticalPropertiesTPB();
void SetOpticalPropertiesHeN();
void SetIsOverlapVol(G4int isOv){ fIsOverlapVol = isOv; }
void ReadParameters(const char*);
void MakeSensitiveDetector();

//this places all sub-parts into fMyLogic
void PlaceParts();
G4LogicalVolume* GetHeInsideTeflonLogic(){ return fHeInsideTeflonLogic; }

private:

G4NistManager* fNistManager;
G4int fIsOverlapVol;

G4Region* fRegionAHe3;
A2SD* fAHe3SD;
A2VisSD* fAHe3VisSD;

//------------------------------------------------------------------------
//booleans controlling detector construction and simulation
//------------------------------------------------------------------------
G4int fMakeMylarSections;
G4int fOpticalSimulation;
G4bool fMakeEpoxy; //determine whether epoxy layer on top of pmt's is build or not
G4double fScintYield;
//
G4int fIsWLS;
G4int fIsTPB;

//------------------------------------------------------------------------
//volumes
//------------------------------------------------------------------------
//Logical and physical volumes that are part of every detector class
G4LogicalVolume* fMotherLogic; //Logical volume of the mother
G4LogicalVolume* fMyLogic; //Logical Volume for this detector
G4VPhysicalVolume* fMyPhysi; //Physical volume for this detector

//Logical volumes of this specific detector class
G4LogicalVolume* fVesselLogic; //mother for Aluminum vessel and Be windows
G4LogicalVolume* fHeLogic; //mother to WLS logic
G4LogicalVolume* fHeOutsideTeflonLogic; //mother to fPCMLogic
G4LogicalVolume* fWLSLogic; //WLS plate logic
G4LogicalVolume* fPCBLogic; //mother for Printed circuit board
G4LogicalVolume* fTeflonLogic; //mother for Teflan cylinder and ends, mylar
G4LogicalVolume* fHeInsideTeflonLogic; //mother for pmt's and epoxy layers

G4LogicalVolume* fTeflonCylLogic; //Teflan cylinder (need for optical properties)
G4LogicalVolume* fTeflonCylEndLogic; //Teflan cylinder end (need for optical properties)
G4LogicalVolume* fPMTLogic; //logic of single pmt cell (need for optical properties)
G4LogicalVolume* fEpoxyLogic; //logic of the epoxy layer (need for optical properties)
G4LogicalVolume* fMylarLogic; //logic of the Mylar window (need for optical properties)
G4LogicalVolume* fMylarSectionLogic; //logic for the mylar section window inside main cell

G4VPhysicalVolume **fPMTPhysic; //physical volumes to set LogicalBorderSurface
G4VPhysicalVolume **fEpoxyPhysic;

G4OpticalSurface* fSurface;
//------------------------------------------------------------------------
//geometric parameters
//------------------------------------------------------------------------

//geometric parameters for MakeVessel()
G4double fHeContainerR; //inner radius of the helium container
G4double fHeContainerZ; //length of the helium container
G4double fExtensionR; //inner radius of the extension tubes
G4double fExtensionZU; //length upstream extension tube
G4double fExtensionZD; //length downstream extension tube
G4double fContainerThickness; //thickness of the metal vessel
G4double fBeThickness; //thickness of the beryllium end windows

// geometric parameters for MakeWLS()
G4int fNwls; // phi segmentation
G4int fNpmt;
G4double fWLSthick; // WLS thickness
G4double fWLSwidth; // WLS width
G4double fRadClr; // radial clearance to vessel
G4double fLatClr; // lateral clearance to vessel
G4double fRwls1; // radial pos. plate/fiber centre

//geometric parameters for MakePCB()
G4double fPCBThickness; //thickness of the printed circuit board
G4double fPCBRadius; //inner radius of the printed circuit board
G4double fPCBZ; //length of th pcb

//geometric parameters for MakeTeflanLayer()
G4double fTeflonThicknessEnd; //thickness of teflan at end walls
G4double fTeflonThicknessCyl; //thickness of teflan covering the pcb cylinder
G4double fTeflonR; //inner radius of the teflan covering the pcb
G4double fTeflonZ;
G4double fMylarThickness;
/*These parameters are used to create a flattening inside the teflon cylinder
where the pmt's are attached. Without the flattening placing pmt's is a pain*/
G4double fFlatteningWidth;
G4double fFlatteningHeight;

//geometric parameters for MakeSiPMTs()
G4double fPMTx;
G4double fPMTy;
G4double fPMTz;
G4double fEpoxyz;
G4double fPmtR; //radius from cylinder center to pmt center
G4double fPMTEpoxyGap;
G4double fEpoxyR; //radius from cylinder center to epoxy center

G4int fNxplane; //nr of pmt's along x plane
G4int fNyplane; //nr of pmt's along y plane
G4int fNdiag1;
G4int fNdiag2;
G4int fNpmttotal; //total nr of pmts

G4double fOffsetx; //the center pos of first pmt from the teflon end wall x plane
G4double fOffsety; //the center pos of first pmt from the teflon end wall y plane
G4double fOffsetd1;
G4double fOffsetd2;

G4double fStepx; //step between pmt's in x plane
G4double fStepy; //step between pmt's in y plane
G4double fStepd1;
G4double fStepd2;

//geometric parameters for MakeMylarSections()
G4double fMylarSecZ; //thickness of the sectioning windows
G4double fMylarWinStep; //distance between windows
G4double fMylarWinOffset; //the center pos of first window from the teflon end wall
G4int fNMylarSecWins; //number of sectioning windows

} ;

#endif

11 changes: 11 additions & 0 deletions include/A2CBOutput.hh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const G4int MAXSIZE_TAPS= 512;
const G4int MAXSIZE_PID= 24;
const G4int MAXSIZE_MWPC = 400;
const G4int MAXSIZE_PIZZA = 24;
const G4int MAXSIZE_HE3 = 200;

class A2CBOutput
{
Expand Down Expand Up @@ -81,6 +82,16 @@ protected:
Float_t *ftofy; //y hit position
Float_t *ftofz; //z hit position

//NEW
//Active He3 Hits
Int_t fnhe3; //total number of active He3 hits
Int_t fihe3[MAXSIZE_HE3]; //hit index
Float_t fehe3[MAXSIZE_HE3]; //hit energy deposits
Float_t fthe3[MAXSIZE_HE3]; //hit time
//Float_t fhe3x[MAXSIZE_HE3]; //x position
//Float_t fhe3y[MAXSIZE_HE3]; //y position
//Float_t fhe3z[MAXSIZE_HE3]; //z position

Int_t fnpiz; //Number of hits in Pizza detector
Int_t fipiz[MAXSIZE_PIZZA]; //hit sector indexes
Float_t fepiz[MAXSIZE_PIZZA]; //hit sector energy deposits
Expand Down
14 changes: 9 additions & 5 deletions include/A2PrimaryGeneratorAction.hh
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,12 @@ public:
private:
void PhaseSpaceGenerator(G4Event* anEvent);
void OverlapGenerator(G4Event* anEvent);
G4float fTmin; //Min phase spce kinetic energy
G4float fTmin; //Min phase space kinetic energy
G4float fTmax; //Max phase space kinetic energy
G4float fThetamin; //Min phase spce angle
G4float fThetamax; //Max phase space angle
G4float fThetaMin; //Min phase space angle
G4float fThetaMax; //Max phase space angle
G4float fPhiMin; //Min phase space phi angle
G4float fPhiMax; //Max phase space phi angle
G4float fBeamEnergy; //beam energy
G4float fBeamXSigma; //beam X width
G4float fBeamYSigma; //beam X width
Expand All @@ -99,8 +101,10 @@ private:
public:
void SetTmin(G4float min){fTmin=min;}
void SetTmax(G4float max){fTmax=max;}
void SetThetamin(G4float min){fThetamin=min;}
void SetThetamax(G4float max){fThetamax=max;}
void SetThetaMin(G4float min){fThetaMin=min;}
void SetThetaMax(G4float max){fThetaMax=max;}
void SetPhiMin(G4float min){fPhiMin=min;}
void SetPhiMax(G4float max){fPhiMax=max;}
void SetBeamEnergy(G4float energy){fBeamEnergy=energy;}
void SetBeamXSigma(G4float sigma){fBeamXSigma=sigma;}
void SetBeamYSigma(G4float sigma){fBeamYSigma=sigma;}
Expand Down
6 changes: 4 additions & 2 deletions include/A2PrimaryGeneratorMessenger.hh
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ class A2PrimaryGeneratorMessenger: public G4UImessenger
G4UIcmdWithAnInteger* SetSeedCmd;
G4UIcmdWithADoubleAndUnit* SetTminCmd;
G4UIcmdWithADoubleAndUnit* SetTmaxCmd;
G4UIcmdWithADoubleAndUnit* SetThetaminCmd;
G4UIcmdWithADoubleAndUnit* SetThetamaxCmd;
G4UIcmdWithADoubleAndUnit* SetThetaMinCmd;
G4UIcmdWithADoubleAndUnit* SetThetaMaxCmd;
G4UIcmdWithADoubleAndUnit* SetPhiMinCmd;
G4UIcmdWithADoubleAndUnit* SetPhiMaxCmd;
G4UIcmdWithADoubleAndUnit* SetBeamEnergyCmd;
G4UIcmdWithADoubleAndUnit* SetBeamXSigmaCmd;
G4UIcmdWithADoubleAndUnit* SetBeamYSigmaCmd;
Expand Down
1 change: 1 addition & 0 deletions include/A2Target.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public:

//virtual function to build the target needs to be implemented in derived class
virtual G4VPhysicalVolume* Construct(G4LogicalVolume *MotherLogic, G4double Z0 = 0)=0;//Build the target
//virtual G4VPhysicalVolume* Construct(G4LogicalVolume *MotherLogic, G4double Z0 = 0);//Build the target

G4VPhysicalVolume* GetPhysi(){return fMyPhysi;}
G4LogicalVolume* GetLogic(){return fMyLogic;}
Expand Down
70 changes: 70 additions & 0 deletions macros/AHeT_Setup.mac
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
##Use the crystal ball?
/A2/det/useCB 0
#if the 3rd number in the next line is negative use old geometry,
# if positive use new Prakhov geometry
#the first two numbers give the upper and lower air gap between hemispheres
#/A2/det/setHemiGap 0.4 0.4 -1 cm
# CB crystal geometry implementation: trap=G4Trap, extr=G4ExtrudedSolid
# G4ExtrudedSolid is default for Geant4 >= 10.4
#/A2/det/setCBCrystGeo extr

##Use TAPS?
/A2/det/useTAPS 0
#/A2/det/setTAPSFile data/taps07.dat
#/A2/det/setTAPSZ 146.35 cm
#/A2/det/setTAPSZ 188 cm
#/A2/det/setTAPSN 384
#/A2/det/setTAPSPbWO4Rings 2
#/A2/det/setTAPSFile data/taps.dat
#/A2/det/setTAPSZ 175 cm
#/A2/det/setTAPSN 510

##Use the PID
/A2/det/usePID 0
#/A2/det/setPIDZ 0. cm
#/A2/det/setPIDRotation 10 deg

##Use MWPC
#set to 1 to not create the anode wires, 2 to create the anode wires
#add 0 to disable the readout (e.g., 10, 20)
/A2/det/useMWPC 0

##Use Cherenkov?
/A2/det/useCherenkov 0

##Use TOF
/A2/det/useTOF 0
/A2/det/setTOFFile data/TOF.par

##Use Pizza detector
/A2/det/usePizza 0
#/A2/det/setPizzaZ 162 cm

##Set the target
###Cryo targets : Cryo (larger cell), Cryo2 (narrower cell), CryoHe3 (He3/He4 target)
###Materials: G4_lH2, A2_lD2, A2_lHe3, A2_lHe4
#/A2/det/useTarget Cryo
#/A2/det/useTarget Cryo2
#/A2/det/useTarget CryoHe3
/A2/det/useTarget ActiveHe3
#/A2/det/targetMaterial G4_lH2
/A2/det/targetMaterial A2_lHe3
#/A2/det/setTargetLength 10 cm
#/A2/det/setTargetZ 0. cm
####Solid targets
#/A2/det/useTarget Solid
#/A2/det/useTarget Solid_Generic
#/A2/det/useTarget Solid_Oct_18
#/A2/det/targetMaterial G4_Pb
#/A2/det/targetMaterial G4_GRAPHITE
#/A2/det/targetMaterial G4_Li
#/A2/det/targetMaterial G4_Ca
#####Polarised target
#/A2/det/useTarget Polarized
#/A2/det/targetMaterial A2_HeButanol
#/A2/det/targetMaterial A2_HeDButanol
#/A2/det/targetMagneticCoils Solenoidal
#/A2/det/targetMagneticCoils Saddle
#/A2/det/setTargetMagneticFieldMap data/wouter_field_map.dat.xz
#/A2/det/setTargetMagneticFieldMap data/field_map_jul_13_pos.dat.xz

Loading