Skip to content

Commit

Permalink
Merge pull request #140 from DUNE/jsoto_pdhdworkflow
Browse files Browse the repository at this point in the history
Rearraging of the PDHD PDS simulation worflow and updating protodune radiological generators
  • Loading branch information
aolivier23 authored Nov 1, 2024
2 parents 197d84d + 58792d1 commit 3dc1b83
Show file tree
Hide file tree
Showing 17 changed files with 238 additions and 61 deletions.
3 changes: 1 addition & 2 deletions fcl/protodunehd/detsim/standard_detsim_protodunehd.fcl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ physics:
producers:
{
tpcrawdecoder: @local::wirecell_protodunehdmc
opdigi: @local::protodune_opdigi_refactor
opdigi: @local::protodunehd_opdigi
crt: @local::CRTSimRefac_standard
rns: { module_type: "RandomNumberSaver" }
}
Expand Down Expand Up @@ -65,4 +65,3 @@ outputs:
}

services.WireReadout.WireReadoutClass: "DuneApaWireReadout"
physics.producers.opdigi.InputModules: ["PDFastSim", "PDFastSimExternal"]
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,8 @@ physics:

#retain largeant name for compatibility
largeant: @local::protodune_larg4
IonAndScint: @local::protodunehd_ionandscint
IonAndScintExternal: @local::protodunehd_ionandscint_external
PDFastSim: @local::protodune_hd_pdfastsim_par
PDFastSimExternal: @local::protodune_hd_pdfastsim_pvs_external
IonAndScint: @local::protodunehd_ionandscint_correlated
PDFastSim: @local::protodune_hd_pdfastsim_ann_ar
rns: {module_type: "RandomNumberSaver"}
}

Expand All @@ -47,7 +45,7 @@ physics:

}

simulate: [ rns, largeant, IonAndScint, IonAndScintExternal, PDFastSim, PDFastSimExternal ]
simulate: [ rns, largeant, IonAndScint, PDFastSim ]

stream1: [ out1 ]

Expand All @@ -63,7 +61,7 @@ outputs:
fileName: "%ifb_g4.root"
dataTier: "simulated"
#outputCommands: [ "keep *" ]
outputCommands: [ "keep *", "drop sim::SimEnergyDeposits_largeant_*_G4"]
outputCommands: [ "keep *", "drop sim::SimEnergyDeposits_largeant_*_G4*"]
#fastCloning: false #will fail if the split level is not the same as for the gen stage, so turn it off
compressionLevel: 1 #zlib argument (0-9)
#basketSize: 8192 #[Byte] buffer size at 8k
Expand Down
5 changes: 5 additions & 0 deletions fcl/protodunehd/g4/compgraph_g4_protodunehd_stage2.fcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include "compgraph_g4_protodunehd.fcl"

process_name: G4Stage2

simulate: [ rns, IonAndScint, PDFastSim ]
72 changes: 72 additions & 0 deletions fcl/protodunehd/g4/photonlibrary_g4_protodunehd.fcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
#include "services_refactored_pdune.fcl"
#include "LArG4_dune.fcl"
#include "IonAndScint_dune.fcl"
#include "PDFastSim_dune.fcl"

process_name: G4

services:
{
TFileService: { fileName: "g4_protodunehd_hist.root" }
TimeTracker: {}
MemoryTracker: {} # default is one
RandomNumberGenerator: {} #ART native random number generator
message: @local::standard_info

@table::protodunehd_refactored_simulation_services
PhotonVisibilityService: @local::protodune_hd_v6_photonvisibilityservice

NuRandomService: @local::dune_prod_seedservice
}



source:
{
module_type: RootInput
maxEvents: 30000
fileNames: ["gen_protodunehd.root"]
}

physics:
{

producers:
{

#retain largeant name for compatibility
largeant: @local::protodune_larg4
IonAndScint: @local::protodunehd_ionandscint_correlated
PDFastSim: @local::protodune_hd_pdfastsim_pvs
rns: {module_type: "RandomNumberSaver"}
}

analyzers:
{

}

simulate: [ rns, largeant, IonAndScint, PDFastSim ]

stream1: [ out1 ]

trigger_paths: [ simulate ]
end_paths: [ stream1 ]
}

outputs:
{
out1:
{
module_type: RootOutput
fileName: "%ifb_g4.root"
dataTier: "simulated"
#outputCommands: [ "keep *" ]
outputCommands: [ "keep *", "drop sim::SimEnergyDeposits_largeant_*_G4*"]
#fastCloning: false #will fail if the split level is not the same as for the gen stage, so turn it off
compressionLevel: 1 #zlib argument (0-9)
#basketSize: 8192 #[Byte] buffer size at 8k
#splitLevel: 0 #reduces number of buffers
#treeMaxVirtualSize: 1 #[Byte] limits number of buffers/branch to 1 (default is 10)
}
}
6 changes: 6 additions & 0 deletions fcl/protodunehd/g4/photonlibrary_g4_protodunehd_stage2.fcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include "photonlibrary_g4_protodunehd.fcl"

process_name: G4Stage2
physics.simulate: [ rns, IonAndScint, PDFastSim ]
services.TFileService.fileName: "g4_protodunehd_hist.root"
outputs.out1.fileName: "%ifb_g4_stage2.root"
5 changes: 2 additions & 3 deletions fcl/protodunehd/g4/standard_g4_protodunehd.fcl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ services:
message: @local::standard_info

@table::protodunehd_refactored_simulation_services
PhotonVisibilityService: @local::protodune_hd_v6_photonvisibilityservice

NuRandomService: @local::dune_prod_seedservice
}
Expand All @@ -38,7 +37,7 @@ physics:
largeant: @local::protodune_larg4
IonAndScint: @local::protodunehd_ionandscint
IonAndScintExternal: @local::protodunehd_ionandscint_external
PDFastSim: @local::protodune_hd_pdfastsim_pvs
PDFastSim: @local::protodune_hd_pdfastsim_par
PDFastSimExternal: @local::protodune_hd_pdfastsim_pvs_external
rns: {module_type: "RandomNumberSaver"}
}
Expand All @@ -64,7 +63,7 @@ outputs:
fileName: "%ifb_g4.root"
dataTier: "simulated"
#outputCommands: [ "keep *" ]
outputCommands: [ "keep *", "drop sim::SimEnergyDeposits_largeant_*_G4"]
outputCommands: [ "keep *", "drop sim::SimEnergyDeposits_largeant_*_G4*"]
#fastCloning: false #will fail if the split level is not the same as for the gen stage, so turn it off
compressionLevel: 1 #zlib argument (0-9)
#basketSize: 8192 #[Byte] buffer size at 8k
Expand Down
4 changes: 2 additions & 2 deletions fcl/protodunehd/g4/standard_g4_protodunehd_stage2.fcl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "standard_g4_protodunehd.fcl"

process_name: G4Stage2

physics.simulate: [ rns, IonAndScint, IonAndScintExternal, PDFastSim, PDFastSimExternal ]
services.TFileService.fileName: "g4_protodunehd_hist.root"
outputs.out1.fileName: "%ifb_g4_stage2.root"

14 changes: 7 additions & 7 deletions fcl/protodunehd/gen/prod_beam_cosmics_1GeV_protodunehd.fcl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "singles_dune.fcl"
#include "corsika_protodune.fcl"
#include "protodunebeam.fcl"
#include "dune_radiological_model.fcl"
#include "dune_radiological_model_decay0.fcl"

process_name: SinglesGen

Expand Down Expand Up @@ -37,16 +37,16 @@ physics:
producers:
{
generator: @local::protodunehd_triggeredbeam
cosmicgenerator: @local::protodune_corsika_cmc
ar39: @local::protodunesp_39ar
ar42: @local::protodunesp_42ar
kr85: @local::protodunesp_85kr
rn222: @local::protodunesp_222rn
cosmicgenerator: @local::protodune_corsika_cmc
ar39: @local::dune10kt_39Ar_in_LAr
kr85: @local::dune10kt_85Kr_in_LAr
ar42: @local::dune10kt_42Ar_in_LAr
k42fromar42: @local::dune10kt_42Kfrom42Ar_in_LAr
}


#define the producer and filter modules for this path, order matters,
simulate: [ generator, cosmicgenerator, ar39, ar42, kr85, rn222 ]
simulate: [ generator, cosmicgenerator, ar39, ar42, kr85, k42fromar42 ]

#define the output stream, there could be more than one if using filters
stream1: [ out1 ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
#include "singles_dune.fcl"
#include "corsika_protodune.fcl"
#include "dune_radiological_model.fcl"
#include "dune_radiological_model_decay0.fcl"

process_name: SinglesGen

Expand Down Expand Up @@ -35,16 +35,16 @@ physics:

producers:
{
cosmicgenerator: @local::protodune_corsika_cmc
ar39: @local::protodunesp_39ar
ar42: @local::protodunesp_42ar
kr85: @local::protodunesp_85kr
rn222: @local::protodunesp_222rn
cosmicgenerator: @local::protodune_corsika_cmc
ar39: @local::dune10kt_39Ar_in_LAr
kr85: @local::dune10kt_85Kr_in_LAr
ar42: @local::dune10kt_42Ar_in_LAr
k42fromar42: @local::dune10kt_42Kfrom42Ar_in_LAr
}


#define the producer and filter modules for this path, order matters,
simulate: [cosmicgenerator, ar39, ar42, kr85, rn222 ]
simulate: [cosmicgenerator, ar39, ar42, kr85, k42fromar42 ]

#define the output stream, there could be more than one if using filters
stream1: [ out1 ]
Expand Down
88 changes: 88 additions & 0 deletions fcl/protodunehd/gen/prodsinglep_protodunehd.fcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
#include "services_refactored_pdune.fcl"
#
#include "singles_dune.fcl"
#include "corsika_protodune.fcl"
#include "protodunebeam.fcl"
#include "dune_radiological_model.fcl"

process_name: SinglesGen

services:
{
# Load the service that manages root files for histograms.
TFileService: { fileName: "prod_beam_p1GeV_cosmics_protodunehd_hist.root" }
TimeTracker: @local::dune_time_tracker
MemoryTracker: @local::dune_memory_tracker
RandomNumberGenerator: {} #ART native random number generator
FileCatalogMetadata: @local::art_file_catalog_mc
@table::protodunehd_refactored_simulation_services
}

#Start each new event with an empty event.
source:
{
module_type: EmptyEvent
timestampPlugin: { plugin_type: "GeneratedEventTimestamp" }
maxEvents: 10
firstRun: 1 # Run number to use for this file
firstEvent: 1 # number of first event in the file
}

# Define and configure some modules to do work on each event.
# First modules are defined; they are scheduled later.
# Modules are grouped by type.
physics:
{

producers:
{
generator: @local::microboone_singlep
}


#define the producer and filter modules for this path, order matters,
simulate: [ generator ]

#define the output stream, there could be more than one if using filters
stream1: [ out1 ]

#trigger_paths is a keyword and contains the paths that modify the art::event,
#ie filters and producers
trigger_paths: [simulate]

#end_paths is a keyword and contains the paths that do not modify the art::Event,
#ie analyzers and output streams. these all run simultaneously
end_paths: [stream1]
}

#block to define where the output goes. if you defined a filter in the physics
#block and put it in the trigger_paths then you need to put a SelectEvents: {SelectEvents: [XXX]}
#entry in the output stream you want those to go to, where XXX is the label of the filter module(s)
outputs:
{
out1:
{
module_type: RootOutput
fileName: "prod_beam_p1GeV_cosmics_protodunehd.root" #default file name, can override from command line with -o or --output
dataTier: "generated"
compressionLevel: 1
}
}

physics.producers.generator.PDG: [ 11 ]
physics.producers.generator.PosDist: 0
physics.producers.generator.P0: [ 0.05 ]
physics.producers.generator.SigmaP: [ 0.0 ]
physics.producers.generator.X0: [0.0]
physics.producers.generator.Y0: [0.0]
physics.producers.generator.Z0: [300.0]
physics.producers.generator.SigmaX: [ 600. ]
physics.producers.generator.SigmaY: [ 600. ]
physics.producers.generator.SigmaZ: [ 600. ]
physics.producers.generator.AngleDist: 0
physics.producers.generator.Theta0XZ: [ 0. ]
physics.producers.generator.Theta0YZ: [ 0. ]
physics.producers.generator.SigmaThetaXZ: [ 180. ]
physics.producers.generator.SigmaThetaYZ: [ 90. ]
source.maxEvents: 10

14 changes: 8 additions & 6 deletions fcl/protodunevd/gen/gen_protodunevd_beam_p1GeV.fcl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#include "corsika_protodune.fcl"
#include "protodunebeam.fcl"
#include "dune_radiological_model.fcl"
#include "dune_radiological_model_decay0.fcl"


process_name: SinglesGen

Expand Down Expand Up @@ -37,16 +39,16 @@ physics:
producers:
{
generator: @local::protodunedp_triggeredbeam
#cosmicgenerator: @local::protodune_corsika_cmc
#ar39: @local::protodunesp_39ar
#ar42: @local::protodunesp_42ar
#kr85: @local::protodunesp_85kr
#rn222: @local::protodunesp_222rn
#cosmicgenerator: @local::protodune_corsika_cmc
ar39: @local::dune10kt_39Ar_in_LAr
kr85: @local::dune10kt_85Kr_in_LAr
ar42: @local::dune10kt_42Ar_in_LAr
k42fromar42: @local::dune10kt_42Kfrom42Ar_in_LAr
}


#define the producer and filter modules for this path, order matters,
#simulate: [ generator, cosmicgenerator, ar39, ar42, kr85, rn222 ]
#simulate: [ generator, cosmicgenerator, ar39, ar42, kr85, k42fromar42 ]
simulate: [ generator ]

#define the output stream, there could be more than one if using filters
Expand Down
11 changes: 6 additions & 5 deletions fcl/protodunevd/gen/gen_protodunevd_cosmics_driftY.fcl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
##include "CORSIKAGendp.fcl"
#include "dune_radiological_model.fcl"
#include "services_protodunevd.fcl"
#include "dune_radiological_model_decay0.fcl"

process_name: SinglesGen

Expand Down Expand Up @@ -38,15 +39,15 @@ physics:
{
cosmicgenerator: @local::protodune_corsika_cmc
# cosmicgenerator: @local::standard_CORSIKAGendp_CMC
ar39: @local::protodunesp_39ar
ar42: @local::protodunesp_42ar
kr85: @local::protodunesp_85kr
rn222: @local::protodunesp_222rn
ar39: @local::dune10kt_39Ar_in_LAr
kr85: @local::dune10kt_85Kr_in_LAr
ar42: @local::dune10kt_42Ar_in_LAr
k42fromar42: @local::dune10kt_42Kfrom42Ar_in_LAr
}


#define the producer and filter modules for this path, order matters,
#simulate: [ cosmicgenerator, ar39, ar42, kr85, rn222 ]
#simulate: [ cosmicgenerator, ar39, ar42, kr85, k42fromar42 ]
simulate: [ cosmicgenerator]

#define the output stream, there could be more than one if using filters
Expand Down
Loading

0 comments on commit 3dc1b83

Please sign in to comment.