Project

General

Profile

Single Particle Overlays

The steriles group are the only customers right now but this outlines how to create single-particle g4 simulation files and then mix those in with existing MC.
The mixing with existing MC makes this trickier than the standard overlays, most notably in getting the filename right.

Single-particle secondaries

Create single-particle g4 simulation (secondary) files that you want to subsequently mix in (currently ideal conditions - far more work needed if we want run-matched and consequently to match run/subruns in the mixing step too. Not to mention the bookkeeping!)

Here we'll use the example of creating nueCC single-particle secondaries in the ND:

ND Genie Fluxswap nueCC single-particle (ideal conditions):

make_sim_fcl -bn 1 -gm 100 -lr 1000001 -ns 1 -n 2500 -det nd -gen genie -hp fhc -fs swap -ts ideal -sm -go -spt nuecc -sp nuecc_secondaries -fts -i 0

Genierw is on by default. The number of events assumes ~2k in an ND overlay file and we simulate a few extra (for cushion) since we have occupied spill filter turned on to avoid making empty spills and we need enough singles for overlaying 1 single g4 secondary file with existing ND MC rock+det overlays.

In this particular case, we are using a custom EventGeneratorList "CCinclMEC+NueEl" which is provided by a special version of genie_xsec:

setup genie_xsec v2_12_0 -q CCPlusMecPlusNueEl

You're ready to submit now (assuming your fcl dataset has been populated), example:

-c mcgen 

# Official production job? 
-f production.inc  
-f everywhere.inc 
######################################## 
# General options that you need to set # 
######################################## 

#Type the name of your job here
--jobname <job_name>

#Type the definition that contains the fcl you want to process
--defname <dataset_definition_name>

#This is where you place which tag you want to generate in
--tag <novasoft_release> # R17-03-09-prod3genie.d 

#Number of jobs you'd like to submit
--njobs <num_jobs>

#This sets up the special genie_xsec to pick up the EventGeneratorList we need for this sample
--source setup_product:genie_xsec:v2_12_0:-q:CCPlusMecPlusNueEl 

#################################### 
# Default options you might change # 
#################################### 

# By default, run MC generation off-site 
--dynamic_lifetime 45000 # about 12 hours.  generation is SLOW
--files_per_job 1 

# Normally produce artdaq but... 
#--outTier=out1:artdaq 

# ...switch to g4 for making rock MC and other overlay pieces 
--outTier=out1:g4 
#--test_submission

OK so now you've got g4 nueCC secondaries. Metadata fields important here are:

simulated.singlepflavorset nuecc
simulated.singlepused true
simulated.mixingtype singles
simulated.volume detector
nova.special ideal-gain100-nuecc_secondaries

Make your g4 dataset and make a cached list of the files in this dataset to be used by the next step.

  samweb take-snapshot <dataset_name>
  novaproduction/overlays/cache.sh <dataset_name> #creates a <dataset_name>.files list

Commit <dataset_name>.files to novaproduction/overlays/
And, update the input fhicl for the next step, specifically for nueCC update the line that states the simulated.singlesDataset

ND rock+det+singles Overlays

With the g4 dataset in-hand and the ND MC rock+det overlay dataset in-hand one just needs to submit:

#Standard production
-f production.inc
-f everywhere.inc

#Need to edit these
--tag <release_name> #R17-03-09-prod3genie.d
--jobname <job_name>
--defname <input ND MC rock+det overlay primaries> #prod_artdaq_R17-03-09-prod3genie.c_nd_genie_nonswap_fhc_nova_v08_period1_v1, for example! Evenly distributed from all periods desirable.
-c special/neardet_prod_artdaq_nuecc_singles_overlay.fcl #Lives in novaproduction/fcl/special, there's an equivalent nutaucc version

--outTier=out1:artdaq       #We are spitting out artdaq files here!
--mix singles_overlay.sh    #This guy grabs the input g4 secondary
--specialName nuecc-overlay #Alas, we need this to make sure our filename is uniquely different to regular ND MC
--test_submission           #Test first!

Reconstruction of Single Particle Overlay samples

For reconstruction step, one can follow the standard full_chain reconstruction submission for ND MC but use the specially configured nu{e,tau}cc-overlay fhicls via:

-c special/prod_full_chain_numi_ndgdml_nuecc-overlay_job.fcl # for nutau, replace nuecc with nutaucc.
--specialName nuecc-overlay

The difference here is that the fhicl sets nova.special to nuecc-overlay and configures CAFMaker to turn ON the IsSinglesOverlay fhicl option.