jaroslav adam - indico · 2020-01-29 · basic geant4 principles calculates passage of ionizing...

23
Geant4 for EIC luminosity monitor Jaroslav Adam BNL BNL, January 29, 2020 EIC Software Tutorial Jaroslav Adam (BNL) Geant4 for EIC luminosity monitor EIC Software Tutorial, January 29, 2020 1 / 23

Upload: others

Post on 19-Jul-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Jaroslav Adam - Indico · 2020-01-29 · Basic Geant4 principles Calculates passage of ionizing radiation in matter Can simulate light collection of optical scintillation and Cerenkov

Geant4 for EIC luminosity monitorJaroslav Adam

BNL

BNL, January 29, 2020

EIC Software Tutorial

Jaroslav Adam (BNL) Geant4 for EIC luminosity monitor EIC Software Tutorial, January 29, 2020 1 / 23

Page 2: Jaroslav Adam - Indico · 2020-01-29 · Basic Geant4 principles Calculates passage of ionizing radiation in matter Can simulate light collection of optical scintillation and Cerenkov

Introduction

These slides give an overview of a standalone Geant4 project to simulate luminosity monitorfor the EIC

All the codes are in the following github repository:

https://github.com/adamjaro/lmon

References to individual parts will be given throughout the presentationThe only prerequisites to start working with a standalone Geant4 are basic knowledge of C++and CMakeThe EIC luminosity monitor here will serve as an illustration of Geant4 principles andfunctionalitiesIn the following two tutorials this standalone Geant4 for luminosity monitor will be used toshow how a standalone simulation can be integrated into existing detector full simulations

Jaroslav Adam (BNL) Geant4 for EIC luminosity monitor EIC Software Tutorial, January 29, 2020 2 / 23

Page 3: Jaroslav Adam - Indico · 2020-01-29 · Basic Geant4 principles Calculates passage of ionizing radiation in matter Can simulate light collection of optical scintillation and Cerenkov

Mechanism of luminosity measurement at the EICLuminosity is measured via elastic bremsstrahlung off electronsIndependent of proton (nucleus) internal structure, large crosssection ∼mbLuminosity monitor detects bremsstrahlung photons

6 8 10 12 14 16 18 (GeV)γE

0

1

2

3

4

5

6

7

(m

b/G

eV)

γE

/ d

σd

γEdσd

= 18 GeVeE

= 275 GeVpE

0 0.2 0.4 0.6 0.8 1 1.2 1.4

3−10×

(rad)γθ

2−10

1−10

1

10

210

a. u

.

γθdσd

= 18 GeVeE

Figure: Bremsstrahlung cross section as a function of photon energy Eγ andpolar angle θγ

Jaroslav Adam (BNL) Geant4 for EIC luminosity monitor EIC Software Tutorial, January 29, 2020 3 / 23

Page 4: Jaroslav Adam - Indico · 2020-01-29 · Basic Geant4 principles Calculates passage of ionizing radiation in matter Can simulate light collection of optical scintillation and Cerenkov

Detector concept for luminosity measurementFollowing example of similar detector at ZEUS, HERAHigh luminosity demands two separate methods to count the bremsstrahlung photons:

1. Photon conversion to e+e− pairs for precise DIS cross sections2. Direct, non converted photons for instantaneous collider performance

Figure: Layout of ZEUS luminosity detector

Pairs are detected in spectrometer SPEC, direct photons in photon calorimeter PCALNucl.Instrum.Meth. A744 (2014) 80-90, Nucl.Instrum.Meth. A565 (2006) 572-588

Jaroslav Adam (BNL) Geant4 for EIC luminosity monitor EIC Software Tutorial, January 29, 2020 4 / 23

Page 5: Jaroslav Adam - Indico · 2020-01-29 · Basic Geant4 principles Calculates passage of ionizing radiation in matter Can simulate light collection of optical scintillation and Cerenkov

Basic Geant4 principles

Calculates passage of ionizing radiation in matter

Can simulate light collection of optical scintillation and Cerenkov photons

Geant4 is implemented as a set of C++ classes, a project is built with CMake

Three main steps of user interaction1. Generation of primary events2. Definition of detector volumes and construction materials3. Evaluating energy losses, optical photons and writing the output

Geant4 runs in steps inside each volume along each particle trajectory

At every step it calculates energy deposition and possible creation of secondary particles

Geant4 can execute a user-defined function along every step

Such a function is handed all information about the step, the volume, and particles involved inthe step

Jaroslav Adam (BNL) Geant4 for EIC luminosity monitor EIC Software Tutorial, January 29, 2020 5 / 23

Page 6: Jaroslav Adam - Indico · 2020-01-29 · Basic Geant4 principles Calculates passage of ionizing radiation in matter Can simulate light collection of optical scintillation and Cerenkov

Resources for Geant4

Here is the list biased by my experience:

1. Book For Application Developers, BookForApplicationDevelopers.pdfComprehensive review of principles and functionalitiesNo need to read everything before doing something; first few pages of each chapter giveenough information to begin with

2. Class reference manual, https://geant4.kek.jp/Reference/10.05.p01/classes.htmlGood to see class methods all in one place

3. Example codes in Geant4 source directory

4. Topical papers on special subjects, like light collection: J.Phys.Conf.Ser. 798 (2017) no.1,012218 or Nucl.Instrum.Meth. A898 (2018) 30-39

5. Main page with references is here: http://geant4.web.cern.ch/

Jaroslav Adam (BNL) Geant4 for EIC luminosity monitor EIC Software Tutorial, January 29, 2020 6 / 23

Page 7: Jaroslav Adam - Indico · 2020-01-29 · Basic Geant4 principles Calculates passage of ionizing radiation in matter Can simulate light collection of optical scintillation and Cerenkov

Generating events, single particle

The generator class is derivedfromG4VUserPrimaryGeneratorAction

It creates its G4ParticleGun

Functions of the particle gun allowto set vertex position, direction andenergy

Units of cm and GeV are providedby Geant4

Function GeneratePrimaries iscalled automatically by Geant4 atthe beginning of each event

https://github.com/adamjaro/lmon/blob/master/src/GeneratorAction.cxxJaroslav Adam (BNL) Geant4 for EIC luminosity monitor EIC Software Tutorial, January 29, 2020 7 / 23

Page 8: Jaroslav Adam - Indico · 2020-01-29 · Basic Geant4 principles Calculates passage of ionizing radiation in matter Can simulate light collection of optical scintillation and Cerenkov

Generating events, uniform distribution

Works like single particlegenerator from previous page

Defines energy range over whichthe particles will be generated

Energy for each event is obtainedusing CLHEP::HepRandom

The HepRandom::flat() functionprovides values of uniformdistribution

https://github.com/adamjaro/lmon/blob/master/src/UniformGen.cxxJaroslav Adam (BNL) Geant4 for EIC luminosity monitor EIC Software Tutorial, January 29, 2020 8 / 23

Page 9: Jaroslav Adam - Indico · 2020-01-29 · Basic Geant4 principles Calculates passage of ionizing radiation in matter Can simulate light collection of optical scintillation and Cerenkov

Generating physics events by reading a generator output

Standard C++ functions are used to read aparticular output of event generator, in TXformat in this case

Values of vx, vy and vz and px, py and pzare interpreted as cm and GeV

They give vertex position and momentum ofbremsstrahlung photon

The event itself is again generated withG4ParticleGun

https://github.com/adamjaro/lmon/blob/master/src/TxReader.cxxJaroslav Adam (BNL) Geant4 for EIC luminosity monitor EIC Software Tutorial, January 29, 2020 9 / 23

Page 10: Jaroslav Adam - Indico · 2020-01-29 · Basic Geant4 principles Calculates passage of ionizing radiation in matter Can simulate light collection of optical scintillation and Cerenkov

Creating a volumeThe first step is a shape, G4Tubs in this caseShape with material makes logical volumeLogical volume placed with G4PVPlacementmakes physical volumeThe world of a given project is a compositionof physical volumes

Figure: Outcome of the code on the left, half-pipe tiltedalong vertical axis y

https://github.com/adamjaro/lmon/blob/master/src/ExitWindowV2.cxxJaroslav Adam (BNL) Geant4 for EIC luminosity monitor EIC Software Tutorial, January 29, 2020 10 / 23

Page 11: Jaroslav Adam - Indico · 2020-01-29 · Basic Geant4 principles Calculates passage of ionizing radiation in matter Can simulate light collection of optical scintillation and Cerenkov

Making a sensitive detector

The particular detector has to be derivedfrom G4VSensitiveDetector

Geant4 then runs its ProcessHits functionwhen making steps inside its sensitivevolume

All information about the step andassociated particles comes from G4Step

Information about the volume is provided byG4TouchableHistory

https://github.com/adamjaro/lmon/blob/master/include/ExitWindowV2.hJaroslav Adam (BNL) Geant4 for EIC luminosity monitor EIC Software Tutorial, January 29, 2020 11 / 23

Page 12: Jaroslav Adam - Indico · 2020-01-29 · Basic Geant4 principles Calculates passage of ionizing radiation in matter Can simulate light collection of optical scintillation and Cerenkov

Putting pieces together in project executable and by Geant4 Actions

Figure: Project executable run.cxx settingDetectorConstruction, physics and ActionInitialization

The simulation is started by running theexecutable of the projectThe executable runs construction of allvolumesThen loads the list of physics processes,including optional optical physicsAnd finally sets the user-defined actions

Figure: Action initialization to set the event generatorand functions to be run at the beginning of each eventand at the beginning of the run

https://github.com/adamjaro/lmon/blob/master/run.cxxhttps://github.com/adamjaro/lmon/blob/master/src/ActionInitialization.cxx

Jaroslav Adam (BNL) Geant4 for EIC luminosity monitor EIC Software Tutorial, January 29, 2020 12 / 23

Page 13: Jaroslav Adam - Indico · 2020-01-29 · Basic Geant4 principles Calculates passage of ionizing radiation in matter Can simulate light collection of optical scintillation and Cerenkov

Constructing a simple frameworkEvery detector, or part of the detector, in the luminosity framework inherits from Detector andfrom G4VSensitiveDetectorBoth base classes automatically run functions to manage output creation and Geant4 steppingIt is easy to replace a simple model with more sophisticated detector

Figure: Base class for the detectorFigure: Registering every sensitive detector withGeant4 to make the mechanism with ProcessHitsfunction working

https://github.com/adamjaro/lmon/blob/master/include/Detector.hhttps://github.com/adamjaro/lmon/blob/master/src/DetectorConstruction.cxx

Jaroslav Adam (BNL) Geant4 for EIC luminosity monitor EIC Software Tutorial, January 29, 2020 13 / 23

Page 14: Jaroslav Adam - Indico · 2020-01-29 · Basic Geant4 principles Calculates passage of ionizing radiation in matter Can simulate light collection of optical scintillation and Cerenkov

Writing output to ROOT tree

Every detector is handed a pointer to the output ROOT TTreeThe detector can define its branches pointing to single numerical variables (example on theleft)Or the branch could be and ROOT class, like histogram or TClonesArrayOr the detector can add itself as a branch (example on the right)

Figure: ROOT variables in optical photon detectorOpDet to be written as a single branches in ROOTTTree

Figure: A detector which adds itself as a branch to theROOT TTree; the fAddr is pointer to the detectorobject itself

https://github.com/adamjaro/lmon/blob/master/include/OpDet.hhttps://github.com/adamjaro/lmon/blob/master/src/ExitWinZEUS.cxx

Jaroslav Adam (BNL) Geant4 for EIC luminosity monitor EIC Software Tutorial, January 29, 2020 14 / 23

Page 15: Jaroslav Adam - Indico · 2020-01-29 · Basic Geant4 principles Calculates passage of ionizing radiation in matter Can simulate light collection of optical scintillation and Cerenkov

Running the simulation with a steering macro

The project executable takes a steeringmacro as a command line parameter

With the help of G4GenericMessenger , it ispossible to configure the individualcomponents

Input from physics generator and outputROOT file also come from the messenger

The messenger provides methods to createnew commands

https://github.com/adamjaro/lmon/blob/master/run_eic.macJaroslav Adam (BNL) Geant4 for EIC luminosity monitor EIC Software Tutorial, January 29, 2020 15 / 23

Page 16: Jaroslav Adam - Indico · 2020-01-29 · Basic Geant4 principles Calculates passage of ionizing radiation in matter Can simulate light collection of optical scintillation and Cerenkov

Use case of luminosity monitor

photon detectorand spectrometer detectors

dipole magnet

collimatorexit window

1.5 m2.5 m

12 m

Full Geant4 model of all essential part of luminosity monitorPreliminary desing according to example from ZEUSProvides simulation chain from physics event generator to number of detected photoelectrons

Jaroslav Adam (BNL) Geant4 for EIC luminosity monitor EIC Software Tutorial, January 29, 2020 16 / 23

Page 17: Jaroslav Adam - Indico · 2020-01-29 · Basic Geant4 principles Calculates passage of ionizing radiation in matter Can simulate light collection of optical scintillation and Cerenkov

Photon exit window

Half-cylinder of 1 mm thick aluminum

Conversion layer for the photons

Also provides shielding against low energybackground

Although it will be a passive material,Geant4 can consider it as a detector toevaluate its performance as a conversionlayer

It was used as an example of sensitivedetector in the previous section

https://github.com/adamjaro/lmon/blob/master/src/ExitWindowV2.cxxhttps://github.com/adamjaro/lmon/blob/master/include/ExitWindowV2.h

Jaroslav Adam (BNL) Geant4 for EIC luminosity monitor EIC Software Tutorial, January 29, 2020 17 / 23

Page 18: Jaroslav Adam - Indico · 2020-01-29 · Basic Geant4 principles Calculates passage of ionizing radiation in matter Can simulate light collection of optical scintillation and Cerenkov

Collimator

Figure: Bremsstrahlung photon passing through thecollimator

Block of stainless steel to shield thebackgroundThe volume with opening inside is createdwith G4SubtractionSolidOuter shape and inner opening are createdas G4Box

https://github.com/adamjaro/lmon/blob/master/src/Collimator.cxxhttps://github.com/adamjaro/lmon/blob/master/include/Collimator.h

Jaroslav Adam (BNL) Geant4 for EIC luminosity monitor EIC Software Tutorial, January 29, 2020 18 / 23

Page 19: Jaroslav Adam - Indico · 2020-01-29 · Basic Geant4 principles Calculates passage of ionizing radiation in matter Can simulate light collection of optical scintillation and Cerenkov

Spectrometer dipole magnet

Figure: Electron and positron are deflectedin the magnet

The magnet in Geant4 is a volume with magnetic fieldThe shape for the magnet is G4BoxThe magnetic field is G4UniformMagFieldThe field is associated with the volume byG4LogicalVolume::SetFieldManager

https://github.com/adamjaro/lmon/blob/master/src/Magnet.cxxhttps://github.com/adamjaro/lmon/blob/master/include/Magnet.h

Jaroslav Adam (BNL) Geant4 for EIC luminosity monitor EIC Software Tutorial, January 29, 2020 19 / 23

Page 20: Jaroslav Adam - Indico · 2020-01-29 · Basic Geant4 principles Calculates passage of ionizing radiation in matter Can simulate light collection of optical scintillation and Cerenkov

Photon detector

Implemented as a composite calorimeterCompCalConsists of 7×7 PbWO4 cellsEach cell consists of 3×3 cm casing madeof carbon fiber, 2 mm thick, holding thePbWO4 crystal insideLength of each cell is 35 cm, same forcasing and crystalPlot shows response to a 1 GeV photonThe cell inherits from both Detector andG4VSensitiveDetectorThe calorimeter itself inherits only fromDetector

https://github.com/adamjaro/lmon/blob/master/src/CompCal.cxxhttps://github.com/adamjaro/lmon/blob/master/include/CompCal.h

Jaroslav Adam (BNL) Geant4 for EIC luminosity monitor EIC Software Tutorial, January 29, 2020 20 / 23

Page 21: Jaroslav Adam - Indico · 2020-01-29 · Basic Geant4 principles Calculates passage of ionizing radiation in matter Can simulate light collection of optical scintillation and Cerenkov

Spectrometer detectors

Pair of calorimeters for converted e+e− pairs

Located in front of the photon detector

Electrons and positrons are deflected bydipole magnet

The plot shows event with e+ and e− at3 GeV

https://github.com/adamjaro/lmon/blob/master/src/CompCal.cxxhttps://github.com/adamjaro/lmon/blob/master/include/CompCal.h

Jaroslav Adam (BNL) Geant4 for EIC luminosity monitor EIC Software Tutorial, January 29, 2020 21 / 23

Page 22: Jaroslav Adam - Indico · 2020-01-29 · Basic Geant4 principles Calculates passage of ionizing radiation in matter Can simulate light collection of optical scintillation and Cerenkov

Simulating scintillation and Cerenkov optical photons

Figure: One calorimeter cell with 2 MeVdeposition on the far side (facing the IP)and optical photon detector (magenta) onthe opposite side. Optical photons areshown as green lines.

Optical and scintillation properties for the Cell aredefined in OpTable, Geant4 needs empiricparametrizationsOptical photons are detected in optical detectorOpDet , placed at the end of the cellThe ProcessHits function of optical detector can getthe origin of the photon

https://github.com/adamjaro/lmon/blob/master/src/Cell.cxxhttps://github.com/adamjaro/lmon/blob/master/src/OpTable.cxxhttps://github.com/adamjaro/lmon/blob/master/src/OpDet.cxx

Jaroslav Adam (BNL) Geant4 for EIC luminosity monitor EIC Software Tutorial, January 29, 2020 22 / 23

Page 23: Jaroslav Adam - Indico · 2020-01-29 · Basic Geant4 principles Calculates passage of ionizing radiation in matter Can simulate light collection of optical scintillation and Cerenkov

SummaryWith Geant4 it is straightforward to begin with simple things up to integrating into big projects

Jaroslav Adam (BNL) Geant4 for EIC luminosity monitor EIC Software Tutorial, January 29, 2020 23 / 23