![]() |
pueoBuilder
|
simulatePueo.#pueo_simulations Slack channel :)#idontgetit Slack channel where you can ask questions anonymously.$PUEO_UTIL_INSTALL_DIR is, see Step 1: install location).simulatePueo and reSimulatePueo, andconfig/ containing some configuration files, for instance pueo.confsimulatePueo expects by typing ./simulatePueo -h, but the really important ones for now are | Flags | Purpose |
|---|---|
-i | The name of the file containing the simulation settings. By default, the directory ${PUEO_UTIL_INSTALL_DIR}/bin/config/ will be searched first, and then, upon failure, some other places. |
-r | The "run number" of the simulation, which will determine the names of the output files. This also sets the seeds for the random number generators, so (everything else being equal) simulations with the same run number should give the same results every time. |
-o | The output directory, where the simulation results will be written to. If the directory does not exist, it will be created. |
-i is strictly necessary, since -r and -o have default values. Still, it is still highly recommended to set the other two.pueo.conf so are not really necessary. Nonetheless, they can be pretty handy: | Flags | Purpose |
|---|---|
-n | The number of events to be simulated. |
-e | The \(\log_{10}\) of the neutrino energy to be simulated. |
-t | The path to the file containing the trigger settings. Again, the program will first search in ${PUEO_UTIL_INSTALL_DIR}/bin/config/. |
As an example, let's run a simulation of 1k neutrinos at 100 EeV ( \(10^{20}\) electron volts):
This might take a little while to run, so be patient.
Don't worry if the vast majority of neutrinos don't trigger, that's normal.
${PUEO_UTIL_INSTALL_DIR}/bin/config/triggerSettings.txt). But, be aware that these may or may not (most likely not!) be the correct values, so you should only do this if the actual trigger perfomance is not important for what you are doing.simulatePueo! In the directory you specified with the output flag, you will find a new "run directory" (e.g. ${HOME}/pueo_temporary/run420/, if you followed the above example).$r means the run number): | File Name | Content |
|---|---|
SimulatedPueoEventFile$r.root | Waveforms (same format used by the real PUEO payload) |
SimulatedPueoTruthFile$r.root | Same as above, plus the truth |
SimulatedPueoHeadFile$r.root | Header (same format used by the real PUEO payload) |
SimulatedPueoGpsFile$r.root | Navigation data (same format used by the real PUEO payload) |
IceFinal_$r_allTree.root | Simulation results, split into passTree and allTree (format specified by the nicemc::Event class) |
gitversion.txt | PueoSim version (git commit hash) used by the simulation |
IceFinal file parallels the "real data format" files(SimulatedPueo*File.root).| Repository | Dependency | Purpose |
|---|---|---|
| pueo-data | Stores information about the PUEO payload (eg. antenna positions, amplifier responses). | |
| pueoEvent | pueo-data | A framework for interfacing with the SimulatedPueo*File.root data. |
| RootFftwWrapper | Fast Fourier transform | |
| AntarcticaRoot | RootFftwWrapper | Handles geographic information about Antarctica (eg. ice thickness). |
| NiceMC | AntarcticaRoot | Simulates the processes that produce the radio signals (eg. neutrino interactions, Askaryan emissions, and signal propagation). |
| PueoSim | NiceMC & pueoEvent | Simulates the detector itself and its subsystems (eg. antennas, amplifiers and the triggers). |
simulatePueo.pueoBuilder/components/PueoSim/test/simulatePueo.cc.The first couple of lines reads in the configuration files for the simulations:
nicemc::CommandLineOptions tells the nicemc::Settings object to read the config file: -e 20 -n 1000 in the example above).pueoSim::TriggerSettings object reads the settings for the trigger (which are stored in triggerSettings.txt, separate from pueo.conf): getSettings() method, the nicemc::Settings object knows when someone has accessed these settings and will no longer allow any changes to them. PUEO_LF) nicemc::SimulationRunner, which manages the bulk of the simulation. nicemc::SimulationRunner manages the simulation at the highest level, making sure that the correct methods from other classes are called in the right order.&settings),detectorVector), andfullSimulation() and it will take care of the rest.rerunSimulation() can be used to resimulate events from an output file of a previous simulation. More on that later...Internally, most of the simulation is handled by two classes.
nicemc::EventGenerator is responsible for generating a neutrino event; that is, it sets the initial conditions (eg. neutrino direction, flavor and interaction position).nicemc::EventSimulator then simulates the radio signal using the initial conditions. This simulation is completely deterministic (except for the thermal noise), meaning that for the same initial conditions, it should always produce the same result.The simulation of a neutrino event is split into distinct steps, each of which handled by a method either in EventGenerator or EventSimulator:
EventGenerator:EventSimulator:r. Thus, rerunning a simulation with the same r should always give the same results.PueoSim/test/reSimulatePueo.cc, which gets compiled and installed to the same directory as simulatePueo.reSimulatePueo only needs the -i flag, which in this case points towards the output file we want to resimulate instead of the config file.reSimulatePueo.cc against simulatePueo.cc, you will notice that they are mostly the same except for a few key differences, discussed below.nicemc::Settings object reads the simulation settings from the IceFinal file itself,pueo.conf).config/triggerSettings.txt), whose path is specified in simulation settings.rerunSimulation() instead of fullSimulation(). rerunSimulation() takes 3 parameters: | parameter name | Purpose |
|---|---|
inputFile | Name of the IceFinal file we want to resimulate |
onlyTriggered | If true, events are read from the passTree of the IceFinal file, which contains only triggered ("passed") events. If false, events are read from allTree, which contains all events. |
level | Defaults to 0. This specifies which steps from the simulation chain should be resimulated, and which should be read from the IceFinal file. |
level allows you to read in more simulation results so that they don't need to be regenerated.level are: | step | Purpose |
|---|---|
0 | Only read in the event properties that are randomly generated (eg. event time, neutrino direction, interaction position). All else are resimulated, including the deterministic neutrino properties calculated using the random ones. |
1 | Also read in the neutrino properties that follow deterministically from the randomly generated ones. |
2 | Also read raytracing results |
4 | Also read the generated radio signals |
5 | Also read signal propagation to the detector (including the antenna response to the radio signal), leaving only the detector simulation to be resimulated. |
onlyTriggered to be true, since some of the required properties are only saved in the passTree.