Cosmic Simulations: Difference between revisions
(3 intermediate revisions by 2 users not shown) | |||
Line 14: | Line 14: | ||
Livetime of a given Cosmic sample can be established with the following command: | Livetime of a given Cosmic sample can be established with the following command: | ||
mu2e -c Offline/Print/fcl/printCosmicLivetime.fcl /pnfs/mu2e/tape/phy-sim/ | mu2e -c Offline/Print/fcl/printCosmicLivetime.fcl -s /pnfs/mu2e/tape/phy-sim/mcs/mu2e/CosmicCRYExtractedCatTriggered/MDC2020ae_best_v1_3/art/cc/85/mcs.mu2e.CosmicCRYExtractedCatTriggered.MDC2020ae_best_v1_3.001205_00000321.art | ||
which will print out a list of quantities associated with the provided data-set. These include N Primaries, Area, LowE (lowest energy), HighE (highest energy), FluxConstant and Livetime. For the standard configuration, a single job corresponds to 0.062266 seconds of livetime. | which will print out a list of quantities associated with the provided data-set. These include N Primaries, Area, LowE (lowest energy), HighE (highest energy), FluxConstant and Livetime. For the standard configuration, a single job corresponds to 0.062266 seconds of livetime. | ||
Line 21: | Line 21: | ||
mu2eDatasetFileList dts.mu2e.CosmicCORSIKASignalAll.MDC2020ae.art > dts.mu2e.CosmicCORSIKASignalAll.MDC2020ae.txt | mu2eDatasetFileList dts.mu2e.CosmicCORSIKASignalAll.MDC2020ae.art > dts.mu2e.CosmicCORSIKASignalAll.MDC2020ae.txt | ||
mu2e -c Print/fcl/printCosmicLivetime.fcl -S dts.mu2e.CosmicCORSIKASignalAll.MDC2020ae.txt | grep 'Livetime:' | awk -F: '{print $NF}' > dts.mu2e.CosmicCORSIKASignalAll.MDC2020ae.livetime | mu2e -c Offline/Print/fcl/printCosmicLivetime.fcl -S dts.mu2e.CosmicCORSIKASignalAll.MDC2020ae.txt | grep 'Livetime:' | awk -F: '{print $NF}' > dts.mu2e.CosmicCORSIKASignalAll.MDC2020ae.livetime | ||
awk '{sum += $1} END {print "Total Livetime:", sum}' dts.mu2e.CosmicCORSIKASignalAll.MDC2020ae.livetime | awk '{sum += $1} END {print "Total Livetime:", sum, "sec"}' dts.mu2e.CosmicCORSIKASignalAll.MDC2020ae.livetime | ||
=== Resampling at S2 === | === Resampling at S2 === |
Latest revision as of 23:02, 19 July 2024
This page gives the details which are specific to simulating cosmic events.
The standard workflow for a given cosmic campaign contains two stages:
- Stage 1 (S1) - generates cosmics in Mu2e volume using given generator, outputs "sim" .art file
- Stage 2 (S2) - takes S1 as input and resamples a given number of times to create a final sample of "dts" .art files
When generating a given sample the user will probably want a given number of hours of "livetime." This will be the output of S2. The user must configure the jobs with the end result in mind.
This page details the quantities that must be considered. And is a reference for how to calculate the number of jobs needed for a given livetime.
Livetime
Livetime of a given Cosmic sample can be established with the following command:
mu2e -c Offline/Print/fcl/printCosmicLivetime.fcl -s /pnfs/mu2e/tape/phy-sim/mcs/mu2e/CosmicCRYExtractedCatTriggered/MDC2020ae_best_v1_3/art/cc/85/mcs.mu2e.CosmicCRYExtractedCatTriggered.MDC2020ae_best_v1_3.001205_00000321.art
which will print out a list of quantities associated with the provided data-set. These include N Primaries, Area, LowE (lowest energy), HighE (highest energy), FluxConstant and Livetime. For the standard configuration, a single job corresponds to 0.062266 seconds of livetime.
To do the same for the entire dataset:
mu2eDatasetFileList dts.mu2e.CosmicCORSIKASignalAll.MDC2020ae.art > dts.mu2e.CosmicCORSIKASignalAll.MDC2020ae.txt mu2e -c Offline/Print/fcl/printCosmicLivetime.fcl -S dts.mu2e.CosmicCORSIKASignalAll.MDC2020ae.txt | grep 'Livetime:' | awk -F: '{print $NF}' > dts.mu2e.CosmicCORSIKASignalAll.MDC2020ae.livetime awk '{sum += $1} END {print "Total Livetime:", sum, "sec"}' dts.mu2e.CosmicCORSIKASignalAll.MDC2020ae.livetime
Resampling at S2
The standard assumption is that S2 resamples S1 by a factor of 1000. This means to simulate a total of X hours we need X/1000 hours at S1.
Standard 10 hour Configuration
Our standard jobs take "10 hours" of livetime. We configure our 0.062 s jobs in the following way:
- 500 jobs at Stage 1, this corresponds to 500*0.0622 = 31 s
- Resampling factor of 1000 = 31*1000 s = 8.6 hours
Events per job
Assuming the same configuration, on average around 200 events pass S1 per job. To config the S1 job then you provide generate_fcl with the following events per job = 200 * 1000 (resampling) / 10 (reads per job) = 20000 events per job.
Simulating Run 1
Using the assumptions from the SU2020 study the total livetime of Run1 is 3.5e6s.
To establish good statistics we need to simulate 3x this, so 1.1e7s.
Assuming the livetime per job remains 0.062s and the resampling factor is 1000 then we need 1.1e4s at S1. 1.1e4/0.062 = 1.75e5 jobs needed assuming this configuration.