Overview
A short writeup of each file in the source code for Geertje Heuermann's Monte Carlo architecture is provided below. The files a grouped alphabetically, with some similar files being grouped together. The source files (along with includes, referenced by the source files) can be found below, along with a tarball that contains other miscellaneous files needed to operate Geertje's Monte Carlo simulations.
Source + includes only: https://www.dropbox.com/sh/qf788r3owrtq2ul/AABSAu7uTfeGFAVjvH4fOGR6a?dl=0 Tarball: https://www.dropbox.com/s/486w2doigkmdizg/HannahTestStand.tar.gz?dl=0
*** Updated April 11 2018, here is the code I have been working with. The PMT/scintillator folder only is here, while the entire directory I use for simulations is here
Source Code Descriptions
DetectorMaterial.icc: Defines material properties for many compounds and elements
eurAPDHit.cc: “An APD Hit is equivalent to a detected photo electron. This class allows to store all necessary informaton about APD Hits, including number of photoelectrons (PE), total energy deposition, and so on.” “Hit information is assigned in eurAPDSP (=sensitive detector), inherits from G4VHit.
eurAPDRHit.cc: APD Hit class which is compatible with ROOT. Consists of the same methods and variables but inherits from TObject, not G4VHit (so as to store the info in a TTree)
eurAPDSD.cc: Assigns information about the APD Hits.
eurBoloHit.cc: Equivalent class to eurAPDHit for Bolo eurBoloRHit.cc: Equivalent class to eurAPDRHit for Bolo eurBoloSD.cc: Equivalent class to eurAPDSD for Bolo
eurDetectorConstruction.cc: Detector geometry (see simulation for a visualization; currently has no poly, just scintillator + wrapping
eurDetectorMaterial.icc: See “DetectorMaterial.icc”
eurDetectorOpticalProperties.icc: Defines optical properties, quantum efficiencies, reflectivity, etc. for all the materials in the Detector (the PMT, the scintillator, the metals in the PMT, everything)
eurEventAction: Inherits from G4Event. Store some simulation-related parameters related to the event. Begin the event. Find the sensitive detectors, set up a new object for the user information for the event as a part of beginning the event. Set the ID of the event to a APD/PMT/Bolo collection of events, depending on its appropriate type. Reset the event information object. Make a new set of event information for the end of the event. Add a PMT/APD/Bolo hit vector to the event information, depending on the type of event. This hit vector stoes parameters like the photon count of the detector (PMT/APD/Bolo), and increments some parameters, among other things. Finalize this information, and then output (i.e. print) the relevant parameters stemming from the event. This includes all manner of photon information, how many photoelectrons were produced, how many neutrons/gammas were involved in this events, and energies related to the photons/gammas/neutrons in this event, including another mention of the gamma energy due to neturon capture as a result of the event (presumably the only way gammas will be generated for an incident beam of neutrons). Finally, save this event information, convert its parameters to a root event, and fill histograms with the relevant parameters (to be analyzed in root; i.e. seen in TBrowser).
eurGammaTrack: See eurPhotonTrack; stores equivalent definitions and properties for gammas
eurGenFileName: Generates file name using current time (short file)
eurHistoManager: Record simulation information into histograms, generate EURECA.root file and store parameters related to the simulation in it
eurNeutronTrack: See eurPhotonTrack; stores equivalent definitions and properties for neutrons
eurPhotonTrack: Stores information about photons like event ID, position, energy deposition, parentIDs, whether or not an APD has been triggered as a result of it, and various optical properties. Provides way to compare the time of two hits as a result of two different photons. Inherits from TObject.
eurPMTHit: Equivalent class to eurAPDHit for PMT eurPMTRHit: Equivalent class to eurAPDRHit for PMT eurPMTSD: Equivalent class to eurAPDSD for PMT
eurPrimaryGeneratorAction: Generate the neutrons (and the random seeds related to them) to be used in the simulation
eurPrimaryGeneratorActionMessenger: Assigns seeds to the generated neutrons in PrimaryGeneratorAction
eurROOTEvent: Assigns properties to the class “eurROOTEvent” (includes all of the graphs we see in the TBrowser breakdowns). Orders the events/tracks for particles (photons, neutrons, gammas) and hits (APD, PMT, Bolo) based on their time of occurence (calls “compare hits” to do so, defined in the sources for each particle and hit event). Sets the number of particle tracks and hits by using “NbOfxxx = xxx.size()”. Provides functions to initialize and to reset (i.e. set number of counts to zero, eliminate all particle tracks/hit events and the information contained therein) the root event's contents. Provides functions which add, set, and/or get photon, gamma, and neutron tracks to/from the root event. This includes adding or retrieving information from the vectors which store information about these tracks. Also provides functions to add, set, and/or get PMT/APD/Bolo hit information.
eurRunAction: Starts the histogram manager and begins the run, seeding the simulation with the current time
eurSession: Manages the generation of the log files
eurSessionManager: Additional information related to the generation of the log file
eurShieldingPhysicsList: Controls some parameters related to the G4 simulation itself. Consider this to be a part of the core G4 files required to run the simulation (search Shielding.icc for more)
eurStackingAction: See how the optical photons were generated and increment the counts for which process generated those optical photons
eurSteppingAction: Inherits from G4Step. Store info about the process of the particle, and which volume it belongs to. Store info about the current track, event, and process. Step the particle through its current process. Check to see if a photon was absorbed as a result of the process. Trigger sensitive detector if the photon was absorbed, and enter relevant information into the tracking/event infos, including the volume in which it happened, reflections that resulted if any, etc.). Chck for neutron interactions/collisions, including seeing if it entered/is in the scintillator. Enter flags about photon absorption and the position of the neutron into tracking information. Essentially, this file helps oversee the interaction of neutrons and photons with the geometry, and stores relevant info about the process, with an emphasis about storing info before and after it occurred (similar to eurTrackingAction).
eurSteppingMessenger: “Only allows primaries to go one step in the scintillator volume before being killed” (a real short file; related closely to eurSteppingAction, serves as the UI manager)
eurSteppingVerbose: Generate log/output file
eurTrackingAction: Inherits from G4Track. Set up initial information about the track, and assign its initial event information. Get its initial coordinates, time, energy, etc. so this initial information is filled. Assign initial information to the particle track if it is a neutron or gamma. Assign final track information. Get information about the final position, direction, energy, etc. about a particle and store it in this track information. Store this information into a neutron or gamma track depending on the particle type. If the particle is a neutron and it is captured, store information about the event and increment the relevant parameters (e.g. NbOfNeutronCaptures increases, GammaEnergyFromNCapture gets new entry, etc.). If the particle is a photon, assign initial and final information about the optical photon (inherits from G4OpticalPhoton), including standard information like position, energy, what processes it participated in, and what volume it started and ended in, as well as some optical information and the length of its track. Finally, store this information into a PhotonTrack, just like the neutron and gamma information was stored in NeutronTrack and GammaTrack. In summary, basically get the initial and final information about various particles, and store the info/increment the relevant parameters in response.
eurUserEventInformation: Stores information about events. Sorts tracks/hits events in chronological order (first half is very similar to eurROOTEvent). Assigns IDs to the current event/run. Provides functions to add neutron/gamma/photon tracks to the current list of tracks of that type. Provides functions to add PMT/APD/Bolo hits to the current collection of hits of that type. Provides a function to get the entire list of information about bolo/apd/pmt hits. Finally, for root analysis, converts all the information stored in this UserEventInformation into a TObject (this is why these parameters can be seen in the TBrowser). It also converts the G4Hits (stored as PMT/APD/Bolo hits) into ROOT hits, with parameters which can be analyzed in root (which is why they get their own folder in the TBrowser).
eurUserTrackInformation: Designates tracking of a given particle, including active/inactive parameter to indicate the status of the tracking (very short file)