diff --git a/duneopdet/PhotonPropagation/CMakeLists.txt b/duneopdet/PhotonPropagation/CMakeLists.txt index 20c69e33..5267b73f 100644 --- a/duneopdet/PhotonPropagation/CMakeLists.txt +++ b/duneopdet/PhotonPropagation/CMakeLists.txt @@ -1,5 +1,10 @@ -art_make( - SERVICE_LIBRARIES larsim::PhotonPropagation +# use modern cetmodules build commands + +# PhotonLibraryPropagationS2_module.cc depends on LegacyLArG4 and cannot be built with geant 4.11 + +cet_build_plugin(PhotonVisibilityServiceS2 art::service + LIBRARIES PUBLIC + larsim::PhotonPropagation larsim::Simulation nug4::ParticleNavigation lardataobj::Simulation lardata::headers @@ -24,42 +29,17 @@ art_make( CLHEP::CLHEP cetlib::cetlib cetlib_except::cetlib_except ROOT::EG - MODULE_LIBRARIES - larsim::LegacyLArG4 - lardataobj::Simulation - lardata::headers - larsim::PhotonPropagation_PhotonVisibilityService_service - duneopdet::PhotonPropagation_PhotonVisibilityServiceS2_service - larsim::Simulation - nug4::ParticleNavigation - larcorealg::Geometry - larcore::Geometry_Geometry_service - art::Framework_Core - art::Framework_Principal - art::Framework_Services_Registry - art_root_io::tfile_support - ROOT::Core - ROOT::Tree - art_root_io::TFileService_service - art::Framework_Services_Optional_RandomNumberGenerator_service - nurandom::RandomUtils_NuRandomService_service - art::Persistency_Common - art::Persistency_Provenance - art::Utilities - canvas::canvas - messagefacility::MF_MessageLogger - fhiclcpp::fhiclcpp - cetlib::cetlib cetlib_except::cetlib_except - CLHEP::CLHEP - ) +) + install_headers() install_fhicl() install_source() -if(DEFINED ENV{TENSORFLOW_DIR}) - add_subdirectory(NeedsTensorflow) -endif() +# NeedsTensorflow depends on LegacyLArG4 and cannot be built with geant 4.11 +##if(DEFINED ENV{TENSORFLOW_DIR}) +## add_subdirectory(NeedsTensorflow) +##endif() add_subdirectory(LibraryBuildTools) add_subdirectory(ScintTimeTools) add_subdirectory(OpticalPathTools) diff --git a/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/SubmitCommand.sh b/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/SubmitCommand.sh deleted file mode 100755 index 6027825a..00000000 --- a/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/SubmitCommand.sh +++ /dev/null @@ -1,309 +0,0 @@ -############################################################################ -############################################################################ -############################################################################ -############################################################################ -############################################################################ -## SumbitCommand.sh is used for submitting DUNE Photon Library Generation ## -## using the FNAL Grid ## -## Author: Alex Himmel (ahimmel@fnal.gov) ## -## Updated by Jason Stock (jason.stock@mines.sdsmt.edu) 2017-09-11 ## -## Script to be run with dunetpc (not split dune code) ## -############################################################################ -############################################################################ -############################################################################ -############################################################################ -############################################################################ -############################################################################ - -#!/bin/bash - -tarfile= -checkVar=0 -testVar=0 -offsiteVar=0 -memory=2500MB -expectedlifetime=8h -makeupJobs=0 -scriptIn=OpticalLibraryBuild_Grid_dune.sh -outdir=/pnfs/dune/scratch/users/${USER}/OpticalLibraries/OpticalLib_dune10kt_v2_1x2x6 -fclIn=dune10kt_v2_1x2x6_buildopticallibrary_grid.fcl -USER=${USER} #Set the user to the default USER from the environment unless over ridder -HELPFILE=SubmitCommand.hlp - -##This block handles flags given to the program. -# Allowed flags are: -# -t | --tar : Pass a tarfile of a larsoft installation to be setup on the cluster. -# User full path to file. -# -u | --user : Over ride the user directory to write to on dCache *NOT RECOMENDED -# | --test : run the test fcl file and a single job with short run time instead of building a new library -# -c | --check : Preform a dry run, returning the jobsub command, but not actually running any grid jobs. -# -l | --lifetime : The amount of time a job should be expected to run on the cluster. -# -s | --script : The script to run on the grid for each job (By default OpticalLibraryBuild_Grid_dune.sh) -# -f | --fcl : The fcl file template to be given to $script. This will be used to build the individual fcl files for each grid job. -# -o | --outdir : The output directory for the results from the simulation. The default is the scratch space of the user who submitted the jobs. -# -m | --memory : the amount of memory to request from each node on the cluster. *NOT RECOMENDED -# Allowed units are MB and GB -printf '////////////////////////////////////////////////////////////////////\n' -printf '//////// DUNE PhotonLibrary Build System /////////////////////\n' -while :; do - case $1 in - --debugSubmitCommand) - printf "\nSetting script debugger. This is not normal run mode.\n" - set -x - set -v - trap read debug - ;; - --help|-h) - if [ -f $HELPFILE ]; then - cat $HELPFILE - else - printf "Help File not found.\n" >&2 - exit 1 - fi - exit 0 - ;; - --script|-s) - if [ "$2" ]; then - scriptIn=$2 - printf "\nscriptIn set by user.\nscriptIn=$scriptIn\n" - shift - else - printf 'ERROR: "--script" requires an input parameter to give the script to be executed on the grid nodes.\n' >&2 - fi - ;; - --script=?*) - scriptIn=${1#*=} - printf "\nscriptIn set by user.\nscriptIn=$scriptIn\n" - ;; - --fcl|-f) - if [ "$2" ]; then - fclIn=$2 - printf "\nInput fcl file set by user.\nfclIn=$fclIn\n" - shift - else - printf 'ERROR: "--fcl" requires and input with the full path of the fcl file to be passed as the template for each grid job.\n' >&2 - fi - ;; - --fcl=?*) - fclIn=${1#*=} - printf "\nInput fcl file set by user.\nfclIn=$fclIn\n" - ;; - --outdir|-o) - if [ "$2" ]; then - outdir=$2 - outdir=$(sed 's/\/ *$//' <<<$outdir) - printf "\noutput directory set by user.\noutput directory will be $outdir\n" - shift - else - printf 'ERROR: "--outdir" requires an input with the full path of the directory where library generation results should be written.\n' >&2 - fi - ;; - --outdir=?*) - outdir=${1#*=} - outdir=$(sed 's/\/ *$//' <<<$outdir) - printf "\noutput directory set by user.\noutput directory will be $outdir\n" - ;; - --memory|-m) - if [ "$2" ]; then - memory=$2 - printf "\nCluster memory requirement set by user.\nmemory request will be $memory\n" - shift - else - printf 'ERROR: "--memory" requires an input value to pass on to the cluster.\n' >&2 - exit 10 - fi - ;; - --memory=?*) - memory=${1#*=} - printf "\nCluster memory requirement set by user.\nmemory request will be $memory\n" - ;; - --makeup|-n) - if [ "$2" ]; then - makeupJobs=$2 - printf "\nNumber Of Jobs required for Makeup Jobs set. Your OpticalLibraryBuild_Grid_dune.sh.\n If your OpticalLibraryBuild_Grid_dune.sh does not contain the correct makeup list, this step will not behave as expecte.\n" - shift - else - printf 'ERROR: "--makeup" requires the number of makeup jobs to process.\n' - exit 10 - fi - ;; - --makeup=?*) - makeupJobs=${1#*=} - printf "\nNumber Of Jobs required for Makeup Jobs set. Your OpticalLibraryBuild_Grid_dune.sh.\n If your OpticalLibraryBuild_Grid_dune.sh does not contain the correct makeup list, this step will not behave as expecte.\n" - ;; - --tar|-t) - if [ "$2" ]; then - tarfile=$2 - printf "\nInput tar file specified.\nLArSoft/dunetpc will be setup from $tarfile\n" - shift - else - printf 'ERROR: "--tar" requires a path to a tar file of a larsoft installation.\n' >&2 - exit 10 - fi - ;; - --tar=?*) - tarfile=${1#*=} - printf "\nInput tar file specified.\nLArSoft/dunetpc will be setup from $tarfile\n" - ;; - --check|-c) - checkVar=1 - printf "\nSetting check mode ON.\n" - ;; - --test) - testVar=1 - printf "\nSetting test mode ON.\n" - ;; - --offsite) - offsiteVar=1 - printf "\nAllow jobs to go offsite (e.g. the OSG).\n" - ;; - --lifetime|-l) - if [ "$2" ]; then - expectedlifetime=$2 - printf "\nCluster upper limit on runtime set by user\nThe requested runtime will be $expectedlifetime\n" - shift - else - printf 'ERROR: "--lifetime" requires a parameter telling the cluster what the upper bound of each jobs runtime should be.\n' >&2 - fi - ;; - --lifetime=?*) - expectedlifetime=${1#*=} - printf "\nCluster upper limit on runtime set by user\nThe requested runtime will be $expectedlifetime\n" - ;; - --user|-u) - if [ "$2" ]; then - USER=$2 - printf "\nUSER for outputs over-ridden by user. CAUTION: This will likely not work. Only do this if you know exaclty why you are doing so.\nUser is set to $USER\n" - shift - else - printf 'ERROR: "--user" requires a username to use for the dCache directory.\n' >&2 - exit 10 - fi - ;; - --user=?*) - USER=${1#*=} - printf "\nUSER for outputs over-ridden by user. CAUTION: This will likely not work. Only do this if you know exaclty why you are doing so.\nUser is set to $USER\n" - ;; - --) - shift - break - ;; - -?*) - printf 'ERROR: Uknown option\n' - exit 10 - ;; - *) - break - esac - shift -done - - - -if [ ! -d $outdir/root ]; then - mkdir -p $outdir/root - mkdir -p $outdir/fcl - mkdir -p $outdir/log -fi - -printf "\nfclIn=$fclIn\n" -printf "basename fclIn=$(basename $fclIn)\n" - -fcl="$outdir/$(basename $fclIn)" - -printf "fcl set.\nfcl=$fcl\n" - -printf "\nscriptIn=$scriptIn\n" -printf "basename scriptIn=$(basename $scriptIn)\n" - -script="$outdir/`basename $scriptIn`" - -printf "script set.\nscript=$script\n" - -if [ -e $fcl ]; then - printf "\n$fcl already exists. Removing old file and replacing with new.\n" - rm -f $fcl -fi -printf "\nPreparing fcl for transfer to the grid.\ncp $fclIn $fcl\n" -if [ -e $fclIn ]; then - cp $fclIn $fcl -else - printf "\nExiting with error. Source file for fcl not found. \nPlease make sure the fcl \n$fclIn \nexists.\n" - exit 10 -fi - -if [ -e $script ]; then - printf "\n$script already exists. Removing old file and replacing with new.\n" - rm -f $script -fi -printf "\nPreparing script for transfer to the grid.\ncp $scriptIn $script\n" -if [ -e $scriptIn ]; then - cp $scriptIn $script -else - printf "\nExiting with error. Source file for Script not found. \nPlease make sure the script \n$scriptIn \nexists.\n" - exit 10 -fi - -environmentVars="-e IFDH_CP_MAXRETRIES=5" -usage="DEDICATED,OPPORTUNISTIC,OFFSITE" -if [ $offsiteVar -ne 0 ]; then - usage="DEDICATED,OPPORTUNISTIC,OFFSITE" -fi -clientargs="--resource-provides=usage_model=$usage -l '+SingularityImage=\"/cvmfs/singularity.opensciencegrid.org/fermilab/fnal-wn-sl7:latest\"' --group=dune -f $fcl --role=Analysis --memory=$memory --append_condor_requirements='(TARGET.HAS_Singularity==true&&TARGET.HAS_CVMFS_dune_opensciencegrid_org==true&&TARGET.HAS_CVMFS_larsoft_opensciencegrid_org==true&&TARGET.CVMFS_dune_opensciencegrid_org_REVISION>=1105&&TARGET.HAS_CVMFS_fifeuser1_opensciencegrid_org==true&&TARGET.HAS_CVMFS_fifeuser2_opensciencegrid_org==true&&TARGET.HAS_CVMFS_fifeuser3_opensciencegrid_org==true&&TARGET.HAS_CVMFS_fifeuser4_opensciencegrid_org==true)'" -if [ x$tarfile != x ]; then - printf "\nUsing tarball. Not setting LArSoft environment variables\n" - larsoft= - clientargs="${clientargs} --tar_file_name=dropbox://${tarfile} --use-cvmfs-dropbox" -else - larsoft="${environmentVars} -e mrb_top=$MRB_TOP -e mrb_project=dunetpc -e mrb_version=$MRB_PROJECT_VERSION -e mrb_quals=$MRB_QUALS " -fi - -toolsargs="-q -g --opportunistic -l '+SingularityImage=\"/cvmfs/singularity.opensciencegrid.org/fermilab/fnal-wn-sl7:latest\"' " -fileargs="-d ROOT $outdir/root -d FCL $outdir/fcl -d LOG $outdir/log " - -#Test job vs real job -if [ $testVar -ne 0 ]; then #TEST VAR IS SET. Run the test job - printf "\n!!TEST JOB SET!!\nOnly a single job is being sent to the grid. This is for testing and debugging purposes, and will not build a complete library.\n" - #Test job 1 - jobsub_client - njobs=300000 #This is picked to select 10 voxels for 100x100x300 bins with 10 photons each. - nphotons=10 - clientargs="$clientargs --expected-lifetime=$expectedlifetime " - thisjob="-Q -N 1 file://$script $njobs $nphotons $(basename $fcl)" -else - printf "Building Library\n" - #Real job - jobsub_client - njobs=6000 - nphotons=50000 - clientargs="$clientargs --expected-lifetime=$expectedlifetime " - # thisjob="-N $njobs file://$script $njobs $nphotons" - if [ 0 -ne $makeupJobs ]; then - echo "thisjob=\"-N $makeupJobs file://$script $njobs $nphotons $(basename $fcl) true\"" - thisjob="-N $makeupJobs file://$script $njobs $nphotons $(basename $fcl) true" - else - thisjob="-N $njobs file://$script $njobs $nphotons $(basename $fcl)" - fi -fi - -if [ x$tarfile != x ]; then - printf "\n\njobsub_submit $environmentVars $clientargs $fileargs $thisjob \n\n\n" - if [ $checkVar -ne 0 ]; then - printf "CHECK Mode is set. The jobsub command will be printed, but will not be executed. Please check the command and run again without check mode. If you are trying to submit test jobs instead, the correct flag is -s or --test.\n" - else - jobsub_submit $environmentVars $clientargs $fileargs $thisjob - fi - ret=$? - printf "\nExiting with status $ret\n" - exit $ret -else - printf "jobsub_submit $environmentVars $larsoft $clientargs $fileargs $thisjob\n" - if [ $checkVar -ne 0 ]; then - printf "\n\nCHECK Mode is set. The jobsub command will be printed, but will not be executed. Please check the command and run again without check mode. If you are trying to submit test jobs instead, the correct flag is -s or --test.\n\n\n" - else - jobsub_submit $environmentVars $larsoft $clientargs $fileargs $thisjob - fi - ret=$? - printf "\nExiting with status $ret\n" - exit $ret -fi - - diff --git a/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/dune10kt_v1_1x2x6_buildopticallibrary_grid.fcl b/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/dune10kt_v1_1x2x6_buildopticallibrary_grid.fcl deleted file mode 100644 index cbbf5e89..00000000 --- a/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/dune10kt_v1_1x2x6_buildopticallibrary_grid.fcl +++ /dev/null @@ -1,117 +0,0 @@ -#include "services_dune.fcl" -#include "backtrackerservice.fcl" -#include "particleinventoryservice.fcl" -#include "singles.fcl" -#include "largeantmodules.fcl" -#include "detsimmodules.fcl" -#include "opticaldetectormodules_dune.fcl" -#include "opticaldetectorservices_dune.fcl" -#include "photolibbuild_services_dune.fcl" -#include "photpropservices_dune.fcl" -#include "lightsource.fcl" - - -process_name: LibraryBuild - - - - - -services: -{ - # Load the service that manages root files for histograms. - TFileService: { fileName: "PhotonLibraryFile_dune10kt_v1_1x2x6.root" } - TimeTracker: {} - RandomNumberGenerator: {} #ART native random number generator - message: @local::standard_info - @table::dunefd_photolibbuild_services - BackTrackerService: @local::dune35t_backtrackerservice # defined in backtrackerservice.fcl - ParticleInventoryService: @local::dune35t_particleinventoryservice # defined in backtrackerservice.fcl -} - - -services.Geometry.GDML: "dune10kt_v1_1x2x6.gdml" -services.Geometry.SortingParameters.DetectorVersion: "dune10kt_v1" -services.AuxDetGeometry.GDML: @local::services.Geometry.GDML - -services.OpDetResponseInterface.LongAxis: z - -#Start each new event with an empty event. -source: -{ - module_type: EmptyEvent - maxEvents: 2 # Number of events to create - 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::standard_lightsource - largeant: @local::standard_largeant - } - - analyzers: - { - pmtresponse: @local::dunefd_simphotoncounter # defined in opticaldetectormodules.fcl - } - - #define the producer and filter modules for this path, order matters, - #filters reject all following items. see lines starting physics.producers below - simulate: [ generator, largeant ] - analyzeIt: [ pmtresponse ] - #define the output stream, there could be more than one if using filters - stream1: [ ] - - #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: [analyzeIt, 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: "notused.root" #default file name, can override from command line with -o or --output - } -} - - - - -##### Parameter changes for the generator (lightsource) ##### - -# do not allow lightsource to write output into root file -physics.producers.generator.FillTree: false - -##### Parameter changes for the pmt respnse analyzer (simphotoncounter) ##### - -physics.analyzers.pmtresponse.MakeAllPhotonsTree: false -physics.analyzers.pmtresponse.MakeDetectedPhotonsTree: false -physics.analyzers.pmtresponse.MakeOpDetsTree: false -physics.analyzers.pmtresponse.MakeOpDetEventsTree: false - - -# To disable wireplane absorption, uncomment this line -#services.LArG4Parameters.OpticalParamModels: ["TransparentPlaneAction"] - - - -# Number of voxels -services.PhotonVisibilityService.NX: 100 -services.PhotonVisibilityService.NY: 100 -services.PhotonVisibilityService.NZ: 300 diff --git a/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/dune10kt_v1_1x2x6_buildopticallibrary_test.fcl b/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/dune10kt_v1_1x2x6_buildopticallibrary_test.fcl deleted file mode 100644 index cbab1a48..00000000 --- a/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/dune10kt_v1_1x2x6_buildopticallibrary_test.fcl +++ /dev/null @@ -1,139 +0,0 @@ -#include "services_dune.fcl" -#include "backtrackerservice.fcl" -#include "particleinventoryservice.fcl" -#include "singles.fcl" -#include "largeantmodules.fcl" -#include "detsimmodules.fcl" -#include "opticaldetectormodules_dune.fcl" -#include "opticaldetectorservices_dune.fcl" -#include "photolibbuild_services_dune.fcl" -#include "photpropservices_dune.fcl" -#include "lightsource.fcl" - - -process_name: LibraryBuild - - - - - -services: -{ - # Load the service that manages root files for histograms. - TFileService: { fileName: "PhotonLibraryFile_12apa_test.root" } - TimeTracker: {} - RandomNumberGenerator: {} #ART native random number generator - message: @local::standard_info - @table::dunefd_photolibbuild_services - BackTrackerService: @local::dune35t_backtrackerservice # defined in backtrackerservice.fcl - ParticleInventoryService: @local::dune35t_particleinventoryservice # defined in backtrackerservice.fcl -} - - -services.Geometry.GDML: "dune10kt_v1_1x2x6.gdml" -services.Geometry.SortingParameters.DetectorVersion: "dune10kt_v1" -services.AuxDetGeometry.GDML: @local::services.Geometry.GDML - -services.OpDetResponseInterface.LongAxis: z - -#Start each new event with an empty event. -source: -{ - module_type: EmptyEvent - maxEvents: 125 # Number of events to create - 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::standard_lightsource - largeant: @local::standard_largeant - } - - analyzers: - { - pmtresponse: @local::dunefd_simphotoncounter # defined in opticaldetectormodules.fcl - } - - #define the producer and filter modules for this path, order matters, - #filters reject all following items. see lines starting physics.producers below - simulate: [ generator, largeant ] - analyzeIt: [ pmtresponse ] - #define the output stream, there could be more than one if using filters - stream1: [ ] - - #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: [analyzeIt, 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: "notused.root" #default file name, can override from command line with -o or --output - } -} - - - - -##### Parameter changes for the generator (lightsource) ##### - -# do not allow lightsource to write output into root file -physics.producers.generator.FillTree: false - -##### Parameter changes for the pmt respnse analyzer (simphotoncounter) ##### - -physics.analyzers.pmtresponse.MakeAllPhotonsTree: false -physics.analyzers.pmtresponse.MakeDetectedPhotonsTree: false -physics.analyzers.pmtresponse.MakeOpDetsTree: false -physics.analyzers.pmtresponse.MakeOpDetEventsTree: false - - -# To disable wireplane absorption, uncomment this line -#services.LArG4Parameters.OpticalParamModels: ["TransparentPlaneAction"] - - - -#services.PhotonVisibilityService.NX: 30 -#services.PhotonVisibilityService.NY: 30 -#services.PhotonVisibilityService.NZ: 30 -#physics.producers.generator.FirstVoxel: 1000 -#physics.producers.generator.LastVoxel: 1020 -#physics.producers.generator.N: 500 - -#physics.analyzers.pmtresponse.Verbosity: 3 - -physics.producers.generator.N: 10000 - - -# Number of voxels -services.PhotonVisibilityService.NX: 5 -services.PhotonVisibilityService.NY: 5 -services.PhotonVisibilityService.NZ: 5 - -services.PhotonVisibilityService.UseCryoBoundary: true - -# IF UseCryoBoundary is set to false, so use the following parameters in cm -#services.PhotonVisibilityService.XMin: -3. -#services.PhotonVisibilityService.XMax: -1. -#services.PhotonVisibilityService.YMin: 5. -#services.PhotonVisibilityService.YMax: 15. -#services.PhotonVisibilityService.ZMin: 0. -#services.PhotonVisibilityService.ZMax: 520. diff --git a/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/dune10kt_v2_1x2x6_buildopticallibrary_grid.fcl b/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/dune10kt_v2_1x2x6_buildopticallibrary_grid.fcl deleted file mode 100644 index 09aaa8fe..00000000 --- a/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/dune10kt_v2_1x2x6_buildopticallibrary_grid.fcl +++ /dev/null @@ -1,121 +0,0 @@ -#include "services_dune.fcl" -#include "backtrackerservice.fcl" -#include "particleinventoryservice.fcl" -#include "singles.fcl" -#include "largeantmodules.fcl" -#include "detsimmodules.fcl" -#include "opticaldetectormodules_dune.fcl" -#include "opticaldetectorservices_dune.fcl" -#include "photolibbuild_services_dune.fcl" -#include "photpropservices_dune.fcl" -#include "lightsource.fcl" - - -process_name: LibraryBuild - - - - - -services: -{ - # Load the service that manages root files for histograms. - TFileService: { fileName: "PhotonLibraryFile_dune10kt_v2_1x2x6.root" } - TimeTracker: {} - RandomNumberGenerator: {} #ART native random number generator - message: @local::standard_info - @table::dunefd_photolibbuild_services - BackTrackerService: @local::dune35t_backtrackerservice # defined in backtrackerservice.fcl - ParticleInventoryService: @local::dune35t_particleinventoryservice # defined in backtrackerservice.fcl -} - - -services.Geometry.GDML: "dune10kt_v2_1x2x6.gdml" -services.Geometry.SortingParameters.DetectorVersion: "dune10kt_v2" -services.AuxDetGeometry.GDML: @local::services.Geometry.GDML - -services.OpDetResponseInterface.LongAxis: z - -#Start each new event with an empty event. -source: -{ - module_type: EmptyEvent - maxEvents: 2 # Number of events to create - 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::standard_lightsource - largeant: @local::standard_largeant - } - - analyzers: - { - pmtresponse: @local::dunefd_simphotoncounter # defined in opticaldetectormodules.fcl - } - - #define the producer and filter modules for this path, order matters, - #filters reject all following items. see lines starting physics.producers below - simulate: [ generator, largeant ] - analyzeIt: [ pmtresponse ] - #define the output stream, there could be more than one if using filters - stream1: [ ] - - #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: [analyzeIt, 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: "notused.root" #default file name, can override from command line with -o or --output - } -} - - - - -##### Parameter changes for the generator (lightsource) ##### - -# do not allow lightsource to write output into root file -physics.producers.generator.FillTree: false - -##### Parameter changes for the pmt respnse analyzer (simphotoncounter) ##### - -physics.analyzers.pmtresponse.MakeAllPhotonsTree: false -physics.analyzers.pmtresponse.MakeDetectedPhotonsTree: false -physics.analyzers.pmtresponse.MakeOpDetsTree: false -physics.analyzers.pmtresponse.MakeOpDetEventsTree: false - - -# To disable wireplane absorption, uncomment this line -#services.LArG4Parameters.OpticalParamModels: ["TransparentPlaneAction"] - -#services.OpDetResponseInterface.QuantumEfficiency: 0.00294 # 0.0042 * 70% for mesh transmission -services.OpDetResponseInterface.LambdaShort: 4.3 # cm -services.OpDetResponseInterface.LambdaLong: 225.0 # cm -services.OpDetResponseInterface.FracShort: 0.29 -services.OpDetResponseInterface.FracLong: 0.71 - -# Number of voxels -services.PhotonVisibilityService.NX: 100 -services.PhotonVisibilityService.NY: 100 -services.PhotonVisibilityService.NZ: 300 diff --git a/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/dune10kt_v2_1x2x6_buildopticallibrary_test.fcl b/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/dune10kt_v2_1x2x6_buildopticallibrary_test.fcl deleted file mode 100644 index f616d1aa..00000000 --- a/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/dune10kt_v2_1x2x6_buildopticallibrary_test.fcl +++ /dev/null @@ -1,144 +0,0 @@ -#include "services_dune.fcl" -#include "backtrackerservice.fcl" -#include "particleinventoryservice.fcl" -#include "singles.fcl" -#include "largeantmodules.fcl" -#include "detsimmodules.fcl" -#include "opticaldetectormodules_dune.fcl" -#include "opticaldetectorservices_dune.fcl" -#include "photolibbuild_services_dune.fcl" -#include "photpropservices_dune.fcl" -#include "lightsource.fcl" - - -process_name: LibraryBuild - - - - - -services: -{ - # Load the service that manages root files for histograms. - TFileService: { fileName: "PhotonLibraryFile_12apa_test.root" } - TimeTracker: {} - RandomNumberGenerator: {} #ART native random number generator - message: @local::standard_info - @table::dunefd_photolibbuild_services - BackTrackerService: @local::dunefd_backtrackerservice # defined in backtrackerservice.fcl - ParticleInventoryService: @local::dunefd_particleinventoryservice # defined in backtrackerservice.fcl -} - - -services.Geometry.GDML: "dune10kt_v2_1x2x6.gdml" -services.Geometry.SortingParameters.DetectorVersion: "dune10kt_v2" -services.AuxDetGeometry.GDML: @local::services.Geometry.GDML - -services.OpDetResponseInterface.LongAxis: z - -#Start each new event with an empty event. -source: -{ - module_type: EmptyEvent - maxEvents: 125 # Number of events to create - 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::standard_lightsource - largeant: @local::standard_largeant - } - - analyzers: - { - pmtresponse: @local::dunefd_simphotoncounter # defined in opticaldetectormodules.fcl - } - - #define the producer and filter modules for this path, order matters, - #filters reject all following items. see lines starting physics.producers below - simulate: [ generator, largeant ] - analyzeIt: [ pmtresponse ] - #define the output stream, there could be more than one if using filters - stream1: [ ] - - #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: [analyzeIt, 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: "notused.root" #default file name, can override from command line with -o or --output - } -} - - - - -##### Parameter changes for the generator (lightsource) ##### - -# do not allow lightsource to write output into root file -physics.producers.generator.FillTree: false - -##### Parameter changes for the pmt respnse analyzer (simphotoncounter) ##### - -physics.analyzers.pmtresponse.MakeAllPhotonsTree: false -physics.analyzers.pmtresponse.MakeDetectedPhotonsTree: false -physics.analyzers.pmtresponse.MakeOpDetsTree: false -physics.analyzers.pmtresponse.MakeOpDetEventsTree: false - - -# To disable wireplane absorption, uncomment this line -#services.LArG4Parameters.OpticalParamModels: ["TransparentPlaneAction"] - -#services.OpDetResponseInterface.QuantumEfficiency: 0.00294 # 0.0042 * 70% for mesh transmission -services.OpDetResponseInterface.LambdaShort: 4.3 # cm -services.OpDetResponseInterface.LambdaLong: 225.0 # cm -services.OpDetResponseInterface.FracShort: 0.29 -services.OpDetResponseInterface.FracLong: 0.71 - - -#services.PhotonVisibilityService.NX: 30 -#services.PhotonVisibilityService.NY: 30 -#services.PhotonVisibilityService.NZ: 30 -#physics.producers.generator.FirstVoxel: 1000 -#physics.producers.generator.LastVoxel: 1020 -#physics.producers.generator.N: 500 - -#physics.analyzers.pmtresponse.Verbosity: 3 - -physics.producers.generator.N: 10000 - - -# Number of voxels -services.PhotonVisibilityService.NX: 5 -services.PhotonVisibilityService.NY: 5 -services.PhotonVisibilityService.NZ: 5 - -services.PhotonVisibilityService.UseCryoBoundary: true - -# IF UseCryoBoundary is set to false, so use the following parameters in cm -#services.PhotonVisibilityService.XMin: -3. -#services.PhotonVisibilityService.XMax: -1. -#services.PhotonVisibilityService.YMin: 5. -#services.PhotonVisibilityService.YMax: 15. -#services.PhotonVisibilityService.ZMin: 0. -#services.PhotonVisibilityService.ZMax: 520. diff --git a/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/dune10kt_workspace_buildopticallibrary_grid.fcl b/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/dune10kt_workspace_buildopticallibrary_grid.fcl deleted file mode 100644 index 8a8fb7ed..00000000 --- a/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/dune10kt_workspace_buildopticallibrary_grid.fcl +++ /dev/null @@ -1,117 +0,0 @@ -#include "services_dune.fcl" -#include "backtrackerservice.fcl" -#include "particleinventoryservice.fcl" -#include "singles.fcl" -#include "largeantmodules.fcl" -#include "detsimmodules.fcl" -#include "opticaldetectormodules_dune.fcl" -#include "opticaldetectorservices_dune.fcl" -#include "photolibbuild_services_dune.fcl" -#include "photpropservices_dune.fcl" -#include "lightsource.fcl" - - -process_name: LibraryBuild - - - - - -services: -{ - # Load the service that manages root files for histograms. - TFileService: { fileName: "PhotonLibraryFile_dune10kt_v1_workspace.root" } - TimeTracker: {} - RandomNumberGenerator: {} #ART native random number generator - @table::dunefd_photolibbuild_services - message: @local::standard_info - BackTrackerService: @local::dunefd_backtrackerservice # defined in backtrackerservice.fcl - ParticleInventoryService: @local::dunefd_particleinventoryservice # defined in backtrackerservice.fcl -} - - -services.Geometry.GDML: "dune10kt_v1_workspace.gdml" -services.Geometry.SortingParameters.DetectorVersion: "dune10kt_v1_workspace" -services.AuxDetGeometry.GDML: @local::services.Geometry.GDML - -services.OpDetResponseInterface.LongAxis: z - -#Start each new event with an empty event. -source: -{ - module_type: EmptyEvent - maxEvents: 2 # Number of events to create - 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::standard_lightsource - largeant: @local::standard_largeant - } - - analyzers: - { - pmtresponse: @local::dune35t_simphotoncounter # defined in opticaldetectormodules.fcl - } - - #define the producer and filter modules for this path, order matters, - #filters reject all following items. see lines starting physics.producers below - simulate: [ generator, largeant ] - analyzeIt: [ pmtresponse ] - #define the output stream, there could be more than one if using filters - stream1: [ ] - - #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: [analyzeIt, 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: "notused.root" #default file name, can override from command line with -o or --output - } -} - - - - -##### Parameter changes for the generator (lightsource) ##### - -# do not allow lightsource to write output into root file -physics.producers.generator.FillTree: false - -##### Parameter changes for the pmt respnse analyzer (simphotoncounter) ##### - -physics.analyzers.pmtresponse.MakeAllPhotonsTree: false -physics.analyzers.pmtresponse.MakeDetectedPhotonsTree: false -physics.analyzers.pmtresponse.MakeOpDetsTree: false -physics.analyzers.pmtresponse.MakeOpDetEventsTree: false - - -# To disable wireplane absorption, uncomment this line -#services.LArG4Parameters.OpticalParamModels: ["TransparentPlaneAction"] - - - -# Number of voxels -services.PhotonVisibilityService.NX: 100 -services.PhotonVisibilityService.NY: 100 -services.PhotonVisibilityService.NZ: 100 diff --git a/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/dune10kt_workspace_buildopticallibrary_test.fcl b/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/dune10kt_workspace_buildopticallibrary_test.fcl deleted file mode 100644 index 68d91e44..00000000 --- a/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/dune10kt_workspace_buildopticallibrary_test.fcl +++ /dev/null @@ -1,139 +0,0 @@ -#include "services_dune.fcl" -#include "backtrackerservice.fcl" -#include "particleinventoryservice.fcl" -#include "singles.fcl" -#include "largeantmodules.fcl" -#include "detsimmodules.fcl" -#include "opticaldetectormodules_dune.fcl" -#include "opticaldetectorservices_dune.fcl" -#include "photolibbuild_services_dune.fcl" -#include "photpropservices_dune.fcl" -#include "lightsource.fcl" - - -process_name: LibraryBuild - - - - - -services: -{ - # Load the service that manages root files for histograms. - TFileService: { fileName: "PhotonLibraryFile_dune10kt_v1_workspace_test.root" } - TimeTracker: {} - RandomNumberGenerator: {} #ART native random number generator - @table::dunefd_photolibbuild_services - message: @local::standard_info - BackTrackerService: @local::dunefd_backtrackerservice # defined in backtrackerservice.fcl - ParticleInventoryService: @local::dunefd_particleinventoryservice # defined in backtrackerservice.fcl -} - - -services.Geometry.GDML: "dune10kt_v1_workspace.gdml" -services.Geometry.SortingParameters.DetectorVersion: "dune10kt_v1_workspace" -services.AuxDetGeometry.GDML: @local::services.Geometry.GDML - -services.OpDetResponseInterface.LongAxis: z - -#Start each new event with an empty event. -source: -{ - module_type: EmptyEvent - maxEvents: 125 # Number of events to create - 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::standard_lightsource - largeant: @local::standard_largeant - } - - analyzers: - { - pmtresponse: @local::dune35t_simphotoncounter # defined in opticaldetectormodules.fcl - } - - #define the producer and filter modules for this path, order matters, - #filters reject all following items. see lines starting physics.producers below - simulate: [ generator, largeant ] - analyzeIt: [ pmtresponse ] - #define the output stream, there could be more than one if using filters - stream1: [ ] - - #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: [analyzeIt, 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: "notused.root" #default file name, can override from command line with -o or --output - } -} - - - - -##### Parameter changes for the generator (lightsource) ##### - -# do not allow lightsource to write output into root file -physics.producers.generator.FillTree: false - -##### Parameter changes for the pmt respnse analyzer (simphotoncounter) ##### - -physics.analyzers.pmtresponse.MakeAllPhotonsTree: false -physics.analyzers.pmtresponse.MakeDetectedPhotonsTree: false -physics.analyzers.pmtresponse.MakeOpDetsTree: false -physics.analyzers.pmtresponse.MakeOpDetEventsTree: false - - -# To disable wireplane absorption, uncomment this line -#services.LArG4Parameters.OpticalParamModels: ["TransparentPlaneAction"] - - - -#services.PhotonVisibilityService.NX: 30 -#services.PhotonVisibilityService.NY: 30 -#services.PhotonVisibilityService.NZ: 30 -#physics.producers.generator.FirstVoxel: 1000 -#physics.producers.generator.LastVoxel: 1020 -#physics.producers.generator.N: 500 - -#physics.analyzers.pmtresponse.Verbosity: 3 - -physics.producers.generator.N: 10000 - - -# Number of voxels -services.PhotonVisibilityService.NX: 5 -services.PhotonVisibilityService.NY: 5 -services.PhotonVisibilityService.NZ: 5 - -services.PhotonVisibilityService.UseCryoBoundary: false - -# IF UseCryoBoundary is set to false, so use the following parameters in cm -#services.PhotonVisibilityService.XMin: -3. -#services.PhotonVisibilityService.XMax: -1. -#services.PhotonVisibilityService.YMin: 5. -#services.PhotonVisibilityService.YMax: 15. -#services.PhotonVisibilityService.ZMin: 0. -#services.PhotonVisibilityService.ZMax: 520. diff --git a/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/dune35t_buildopticallibrary_grid.fcl b/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/dune35t_buildopticallibrary_grid.fcl deleted file mode 100644 index f64f9592..00000000 --- a/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/dune35t_buildopticallibrary_grid.fcl +++ /dev/null @@ -1,115 +0,0 @@ -#include "services_dune.fcl" -#include "backtrackerservice.fcl" -#include "particleinventoryservice.fcl" -#include "singles.fcl" -#include "largeantmodules.fcl" -#include "detsimmodules.fcl" -#include "opticaldetectormodules_dune.fcl" -#include "opticaldetectorservices_dune.fcl" -#include "photolibbuild_services_dune.fcl" -#include "photpropservices_dune.fcl" -#include "lightsource.fcl" - - -process_name: LibraryBuild - - - - - -services: -{ - # Load the service that manages root files for histograms. - TFileService: { fileName: "PhotonLibraryFile_dune35ton.root" } - TimeTracker: {} - RandomNumberGenerator: {} #ART native random number generator - @table::dune35t_photolibbuild_services - message: @local::standard_info - BackTrackerService: @local::dunefd_backtrackerservice # defined in backtrackerservice.fcl - ParticleInventoryService: @local::dunefd_particleinventoryservice # defined in backtrackerservice.fcl -} - - -services.Geometry.GDML: "dune35t4apa_v5.gdml" -services.Geometry.SortingParameters.DetectorVersion: "dune35t4apa_v5" -services.AuxDetGeometry.GDML: @local::services.Geometry.GDML - -#Start each new event with an empty event. -source: -{ - module_type: EmptyEvent - maxEvents: 2 # Number of events to create - 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::standard_lightsource - largeant: @local::standard_largeant - } - - analyzers: - { - pmtresponse: @local::dune35t_simphotoncounter # defined in opticaldetectormodules.fcl - } - - #define the producer and filter modules for this path, order matters, - #filters reject all following items. see lines starting physics.producers below - simulate: [ generator, largeant ] - analyzeIt: [ pmtresponse ] - #define the output stream, there could be more than one if using filters - stream1: [ ] - - #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: [analyzeIt, 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: "opticallibrary_dune35t.root" #default file name, can override from command line with -o or --output - } -} - - - - -##### Parameter changes for the generator (lightsource) ##### - -# do not allow lightsource to write output into root file -physics.producers.generator.FillTree: false - -##### Parameter changes for the pmt respnse analyzer (simphotoncounter) ##### - -physics.analyzers.pmtresponse.MakeAllPhotonsTree: false -physics.analyzers.pmtresponse.MakeDetectedPhotonsTree: false -physics.analyzers.pmtresponse.MakeOpDetsTree: false -physics.analyzers.pmtresponse.MakeOpDetEventsTree: false - - -# To disable wireplane absorption, uncomment this line -#services.LArG4Parameters.OpticalParamModels: ["TransparentPlaneAction"] - - - -# Number of voxels -services.PhotonVisibilityService.NX: 100 -services.PhotonVisibilityService.NY: 100 -services.PhotonVisibilityService.NZ: 100 diff --git a/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/dune35t_buildopticallibrary_grid_test.fcl b/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/dune35t_buildopticallibrary_grid_test.fcl deleted file mode 100644 index 5cdcc3c4..00000000 --- a/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/dune35t_buildopticallibrary_grid_test.fcl +++ /dev/null @@ -1,115 +0,0 @@ -#include "services_dune.fcl" -#include "backtrackerservice.fcl" -#include "particleinventoryservice.fcl" -#include "singles.fcl" -#include "largeantmodules.fcl" -#include "detsimmodules.fcl" -#include "opticaldetectormodules_dune.fcl" -#include "opticaldetectorservices_dune.fcl" -#include "photolibbuild_services_dune.fcl" -#include "photpropservices_dune.fcl" -#include "lightsource.fcl" - - -process_name: LibraryBuild - - - - - -services: -{ - # Load the service that manages root files for histograms. - TFileService: { fileName: "PhotonLibraryFile_dune35ton_v5_gridtest.root" } - TimeTracker: {} - RandomNumberGenerator: {} #ART native random number generator - @table::dune35t_photolibbuild_services - message: @local::standard_info - BackTrackerService: @local::dunefd_backtrackerservice # defined in backtrackerservice.fcl - ParticleInventoryService: @local::dunefd_particleinventoryservice # defined in backtrackerservice.fcl -} - - -services.Geometry.GDML: "dune35t4apa_v5.gdml" -services.Geometry.SortingParameters.DetectorVersion: "dune35t4apa_v5" -services.AuxDetGeometry.GDML: @local::services.Geometry.GDML - -#Start each new event with an empty event. -source: -{ - module_type: EmptyEvent - maxEvents: 2 # Number of events to create - 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::standard_lightsource - largeant: @local::standard_largeant - } - - analyzers: - { - pmtresponse: @local::dune35t_simphotoncounter # defined in opticaldetectormodules.fcl - } - - #define the producer and filter modules for this path, order matters, - #filters reject all following items. see lines starting physics.producers below - simulate: [ generator, largeant ] - analyzeIt: [ pmtresponse ] - #define the output stream, there could be more than one if using filters - stream1: [ ] - - #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: [analyzeIt, 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: "opticallibrary_dune35t.root" #default file name, can override from command line with -o or --output - } -} - - - - -##### Parameter changes for the generator (lightsource) ##### - -# do not allow lightsource to write output into root file -physics.producers.generator.FillTree: false - -##### Parameter changes for the pmt respnse analyzer (simphotoncounter) ##### - -physics.analyzers.pmtresponse.MakeAllPhotonsTree: false -physics.analyzers.pmtresponse.MakeDetectedPhotonsTree: false -physics.analyzers.pmtresponse.MakeOpDetsTree: false -physics.analyzers.pmtresponse.MakeOpDetEventsTree: false - - -# To disable wireplane absorption, uncomment this line -#services.LArG4Parameters.OpticalParamModels: ["TransparentPlaneAction"] - - - -# Number of voxels -services.PhotonVisibilityService.NX: 8 -services.PhotonVisibilityService.NY: 30 -services.PhotonVisibilityService.NZ: 30 diff --git a/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/dune35t_buildopticallibrary_test.fcl b/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/dune35t_buildopticallibrary_test.fcl deleted file mode 100644 index 99ada96e..00000000 --- a/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/dune35t_buildopticallibrary_test.fcl +++ /dev/null @@ -1,137 +0,0 @@ -#include "services_dune.fcl" -#include "backtrackerservice.fcl" -#include "particleinventoryservice.fcl" -#include "singles.fcl" -#include "largeantmodules.fcl" -#include "detsimmodules.fcl" -#include "opticaldetectormodules_dune.fcl" -#include "opticaldetectorservices_dune.fcl" -#include "photolibbuild_services_dune.fcl" -#include "photpropservices_dune.fcl" -#include "lightsource.fcl" - - -process_name: LibraryBuild - - - - - -services: -{ - # Load the service that manages root files for histograms. - TFileService: { fileName: "PhotonLibraryFile_dune35ton_v5_test.root" } - TimeTracker: {} - RandomNumberGenerator: {} #ART native random number generator - @table::dune35t_photolibbuild_services - message: @local::standard_info - BackTrackerService: @local::dunefd_backtrackerservice # defined in backtrackerservice.fcl - ParticleInventoryService: @local::dunefd_particleinventoryservice # defined in backtrackerservice.fcl -} - - -services.Geometry.GDML: "dune35t4apa_v5.gdml" -services.Geometry.SortingParameters.DetectorVersion: "dune35t4apa_v5" -services.AuxDetGeometry.GDML: @local::services.Geometry.GDML - -#Start each new event with an empty event. -source: -{ - module_type: EmptyEvent - maxEvents: 100 # Number of events to create - 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::standard_lightsource - largeant: @local::standard_largeant - } - - analyzers: - { - pmtresponse: @local::dune35t_simphotoncounter # defined in opticaldetectormodules.fcl - } - - #define the producer and filter modules for this path, order matters, - #filters reject all following items. see lines starting physics.producers below - simulate: [ generator, largeant ] - analyzeIt: [ pmtresponse ] - #define the output stream, there could be more than one if using filters - stream1: [ ] - - #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: [analyzeIt, 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: "opticallibrary_dune35t.root" #default file name, can override from command line with -o or --output - } -} - - - - -##### Parameter changes for the generator (lightsource) ##### - -# do not allow lightsource to write output into root file -physics.producers.generator.FillTree: false - -##### Parameter changes for the pmt respnse analyzer (simphotoncounter) ##### - -physics.analyzers.pmtresponse.MakeAllPhotonsTree: false -physics.analyzers.pmtresponse.MakeDetectedPhotonsTree: false -physics.analyzers.pmtresponse.MakeOpDetsTree: false -physics.analyzers.pmtresponse.MakeOpDetEventsTree: false - - -# To disable wireplane absorption, uncomment this line -#services.LArG4Parameters.OpticalParamModels: ["TransparentPlaneAction"] - - - -#services.PhotonVisibilityService.NX: 30 -#services.PhotonVisibilityService.NY: 30 -#services.PhotonVisibilityService.NZ: 30 -#physics.producers.generator.FirstVoxel: 1000 -#physics.producers.generator.LastVoxel: 1020 -#physics.producers.generator.N: 500 - -#physics.analyzers.pmtresponse.Verbosity: 3 - -physics.producers.generator.N: 10000 - - -# Number of voxels -services.PhotonVisibilityService.NX: 1 -services.PhotonVisibilityService.NY: 20 -services.PhotonVisibilityService.NZ: 5 - -services.PhotonVisibilityService.UseCryoBoundary: false - -# IF UseCryoBoundary is set to false, so use the following parameters in cm -services.PhotonVisibilityService.XMin: -8. -services.PhotonVisibilityService.XMax: -6. -services.PhotonVisibilityService.YMin: -100. -services.PhotonVisibilityService.YMax: 0 -services.PhotonVisibilityService.ZMin: 60. -services.PhotonVisibilityService.ZMax: 90. diff --git a/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/dune4APA_buildopticallibrary_grid.fcl b/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/dune4APA_buildopticallibrary_grid.fcl deleted file mode 100644 index c40b076f..00000000 --- a/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/dune4APA_buildopticallibrary_grid.fcl +++ /dev/null @@ -1,118 +0,0 @@ -#include "services_dune.fcl" -#include "backtrackerservice.fcl" -#include "particleinventoryservice.fcl" -#include "singles.fcl" -#include "largeantmodules.fcl" -#include "detsimmodules.fcl" -#include "opticaldetectormodules_dune.fcl" -#include "opticaldetectorservices_dune.fcl" -#include "photolibbuild_services_dune.fcl" -#include "photpropservices_dune.fcl" -#include "lightsource.fcl" - - -process_name: LibraryBuild - - - - - -services: -{ - # Load the service that manages root files for histograms. - TFileService: { fileName: "PhotonLibraryFile.root" } - TimeTracker: {} - RandomNumberGenerator: {} #ART native random number generator - @table::dune35t_photolibbuild_services - message: @local::standard_info - BackTrackerService: @local::dunefd_backtrackerservice # defined in backtrackerservice.fcl - ParticleInventoryService: @local::dunefd_particleinventoryservice # defined in backtrackerservice.fcl - -} - - -services.Geometry.GDML: "dune4apa36deg.gdml" -services.Geometry.SortingParameters.DetectorVersion: "dune4apa36deg" -services.AuxDetGeometry.GDML: @local::services.Geometry.GDML - -services.OpDetResponseInterface.LongAxis: z - -#Start each new event with an empty event. -source: -{ - module_type: EmptyEvent - maxEvents: 2 # Number of events to create - 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::standard_lightsource - largeant: @local::standard_largeant - } - - analyzers: - { - pmtresponse: @local::dune35t_simphotoncounter # defined in opticaldetectormodules.fcl - } - - #define the producer and filter modules for this path, order matters, - #filters reject all following items. see lines starting physics.producers below - simulate: [ generator, largeant ] - analyzeIt: [ pmtresponse ] - #define the output stream, there could be more than one if using filters - stream1: [ ] - - #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: [analyzeIt, 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: "opticallibrary_dune4apa.root" #default file name, can override from command line with -o or --output - } -} - - - - -##### Parameter changes for the generator (lightsource) ##### - -# do not allow lightsource to write output into root file -physics.producers.generator.FillTree: false - -##### Parameter changes for the pmt respnse analyzer (simphotoncounter) ##### - -physics.analyzers.pmtresponse.MakeAllPhotonsTree: false -physics.analyzers.pmtresponse.MakeDetectedPhotonsTree: false -physics.analyzers.pmtresponse.MakeOpDetsTree: false -physics.analyzers.pmtresponse.MakeOpDetEventsTree: false - - -# To disable wireplane absorption, uncomment this line -#services.LArG4Parameters.OpticalParamModels: ["TransparentPlaneAction"] - - - -# Number of voxels -services.PhotonVisibilityService.NX: 100 -services.PhotonVisibilityService.NY: 100 -services.PhotonVisibilityService.NZ: 100 diff --git a/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/dune4APA_buildopticallibrary_test.fcl b/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/dune4APA_buildopticallibrary_test.fcl deleted file mode 100644 index c0e33f30..00000000 --- a/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/dune4APA_buildopticallibrary_test.fcl +++ /dev/null @@ -1,139 +0,0 @@ -#include "services_dune.fcl" -#include "backtrackerservice.fcl" -#include "particleinventoryservice.fcl" -#include "singles.fcl" -#include "largeantmodules.fcl" -#include "detsimmodules.fcl" -#include "opticaldetectormodules_dune.fcl" -#include "opticaldetectorservices_dune.fcl" -#include "photolibbuild_services_dune.fcl" -#include "photpropservices_dune.fcl" -#include "lightsource.fcl" - - -process_name: LibraryBuild - - - - - -services: -{ - # Load the service that manages root files for histograms. - TFileService: { fileName: "PhotonLibraryFile_dune4APA.root" } - TimeTracker: {} - RandomNumberGenerator: {} #ART native random number generator - @table::dune35t_photolibbuild_services - message: @local::standard_info - BackTrackerService: @local::dunefd_backtrackerservice # defined in backtrackerservice.fcl - ParticleInventoryService: @local::dunefd_particleinventoryservice # defined in backtrackerservice.fcl -} - - -services.Geometry.GDML: "dune4apa36deg.gdml" -services.Geometry.SortingParameters.DetectorVersion: "dune4apa36deg" -services.AuxDetGeometry.GDML: @services.Geometry.GDML - -services.OpDetResponseInterface.LongAxis: z - -#Start each new event with an empty event. -source: -{ - module_type: EmptyEvent - maxEvents: 60 # Number of events to create - 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::standard_lightsource - largeant: @local::standard_largeant - } - - analyzers: - { - pmtresponse: @local::dune35t_simphotoncounter # defined in opticaldetectormodules.fcl - } - - #define the producer and filter modules for this path, order matters, - #filters reject all following items. see lines starting physics.producers below - simulate: [ generator, largeant ] - analyzeIt: [ pmtresponse ] - #define the output stream, there could be more than one if using filters - stream1: [ ] - - #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: [analyzeIt, 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: "opticallibrary_dune35t.root" #default file name, can override from command line with -o or --output - } -} - - - - -##### Parameter changes for the generator (lightsource) ##### - -# do not allow lightsource to write output into root file -physics.producers.generator.FillTree: false - -##### Parameter changes for the pmt respnse analyzer (simphotoncounter) ##### - -physics.analyzers.pmtresponse.MakeAllPhotonsTree: false -physics.analyzers.pmtresponse.MakeDetectedPhotonsTree: false -physics.analyzers.pmtresponse.MakeOpDetsTree: false -physics.analyzers.pmtresponse.MakeOpDetEventsTree: false - - -# To disable wireplane absorption, uncomment this line -#services.LArG4Parameters.OpticalParamModels: ["TransparentPlaneAction"] - - - -#services.PhotonVisibilityService.NX: 30 -#services.PhotonVisibilityService.NY: 30 -#services.PhotonVisibilityService.NZ: 30 -#physics.producers.generator.FirstVoxel: 1000 -#physics.producers.generator.LastVoxel: 1020 -#physics.producers.generator.N: 500 - -#physics.analyzers.pmtresponse.Verbosity: 3 - -physics.producers.generator.N: 10000 - - -# Number of voxels -services.PhotonVisibilityService.NX: 1 -services.PhotonVisibilityService.NY: 3 -services.PhotonVisibilityService.NZ: 20 - -services.PhotonVisibilityService.UseCryoBoundary: false - -# IF UseCryoBoundary is set to false, so use the following parameters in cm -services.PhotonVisibilityService.XMin: -3. -services.PhotonVisibilityService.XMax: -1. -services.PhotonVisibilityService.YMin: 5. -services.PhotonVisibilityService.YMax: 15. -services.PhotonVisibilityService.ZMin: 0. -services.PhotonVisibilityService.ZMax: 520. diff --git a/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/mySimPhotonCounter.fcl b/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/mySimPhotonCounter.fcl deleted file mode 100644 index 30a78d2c..00000000 --- a/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/mySimPhotonCounter.fcl +++ /dev/null @@ -1,17 +0,0 @@ - -BEGIN_PROLOG - -mysimphotoncounter: -{ - module_type: "mySimPhotonCounter" - Verbosity: 1 - InputModule: "largeant" - MakeAllPhotonsTree: true - MakeDetectedPhotonsTree: true - MakeOpDetsTree: true - MakeOpDetEventsTree: true -} - - - -END_PROLOG diff --git a/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/mySimPhotonCounter_module.cc b/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/mySimPhotonCounter_module.cc deleted file mode 100644 index 3e488803..00000000 --- a/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/mySimPhotonCounter_module.cc +++ /dev/null @@ -1,755 +0,0 @@ -// \file mySimPhotonCounter.h -// \author Ben Jones, MIT 2010 -// -// Module to determine how many phots have been detected at each OpDet -// -// This analyzer takes the SimPhotonsCollection generated by LArG4's sensitive detectors -// and fills up to four trees in the histograms file. The four trees are: -// -// OpDetEvents - count how many phots hit the OpDet face / were detected across all OpDet's per event -// OpDets - count how many phots hit the OpDet face / were detected in each OpDet individually for each event -// AllPhotons - wavelength information for each phot hitting the OpDet face -// DetectedPhotons - wavelength information for each phot detected -// -// The user may supply a quantum efficiency and sensitive wavelength range for the OpDet's. -// with a QE < 1 and a finite wavelength range, a "detected" phot is one which is -// in the relevant wavelength range and passes the random sampling condition imposed by -// the quantum efficiency of the OpDet -// -// PARAMETERS REQUIRED: -// int32 Verbosity - whether to write to screen a well as to file. levels 0 to 3 specify different levels of detail to display -// string InputModule - the module which produced the SimPhotonsCollection -// bool MakeAllPhotonsTree - whether to build and store each tree (performance can be enhanced by switching off those not required) -// bool MakeDetectedPhotonsTree -// bool MakeOpDetsTree -// bool MakeOpDetEventsTree -// double QantumEfficiency - Quantum efficiency of OpDet -// double WavelengthCutLow - Sensitive wavelength range of OpDet -// double WavelengthCutHigh - -// FMWK includes -#include "art/Framework/Core/EDAnalyzer.h" -#include "art/Framework/Core/ModuleMacros.h" -#include "art/Framework/Principal/Event.h" -#include "fhiclcpp/ParameterSet.h" -#include "art/Framework/Principal/Handle.h" -#include "art/Framework/Services/Registry/ServiceHandle.h" -#include "art_root_io/TFileService.h" -#include "messagefacility/MessageLogger/MessageLogger.h" - -// LArSoft includes -#include "larana/OpticalDetector/OpDetResponseInterface.h" -#include "larcore/Geometry/Geometry.h" -#include "larcorealg/Geometry/CryostatGeo.h" -#include "larcorealg/Geometry/OpDetGeo.h" -#include "lardataobj/MCBase/MCTrack.h" -#include "lardataobj/Simulation/SimChannel.h" -#include "lardataobj/Simulation/SimPhotons.h" -#include "lardataobj/Simulation/sim.h" -#include "larsim/MCCheater/ParticleInventoryService.h" -#include "larsim/PhotonPropagation/PhotonVisibilityService.h" -#include "larsim/Simulation/LArG4Parameters.h" - -#include "nug4/ParticleNavigation/ParticleList.h" -#include "nusimdata/SimulationBase/MCParticle.h" - -// ROOT includes -#include "RtypesCore.h" -#include "TH1D.h" -#include "TTree.h" -#include "TLorentzVector.h" -#include "TVector3.h" - -// C++ language includes -#include -#include -#include - -namespace opdet { - - class mySimPhotonCounter : public art::EDAnalyzer{ - public: - - mySimPhotonCounter(const fhicl::ParameterSet&); - - void analyze(art::Event const&); - - void beginJob(); - void endJob(); - - private: - - /// Threshold used to resolve between visible and ultraviolet light. - static constexpr double kVisibleThreshold = 200.0; // nm - - /// Value used when a typical visible light wavelength is needed. - static constexpr double kVisibleWavelength = 450.0; // nm - - /// Value used when a typical ultraviolet light wavelength is needed. - static constexpr double kVUVWavelength = 128.0; // nm - static constexpr double kLibGenThres = 0.0; - // Trees to output - - TTree * fThePhotonTreeAll; - TTree * fThePhotonTreeDetected; - TTree * fTheOpDetTree; - TTree * fTheEventTree; - - - // Parameters to read in - - std::vector fInputModule; // Input tag for OpDet collection - - int fVerbosity; // Level of output to write to std::out - - bool fMakeDetectedPhotonsTree; // - bool fMakeAllPhotonsTree; // - bool fMakeOpDetsTree; // Switches to turn on or off each output - bool fMakeOpDetEventsTree; // - - // float fQE; // Quantum efficiency of tube - - // float fWavelengthCutLow; // Sensitive wavelength range - // float fWavelengthCutHigh; // - - TVector3 initialPhotonPosition; - TVector3 finalPhotonPosition; - - - // Data to store in trees - - Float_t fWavelength; - Float_t fTime; - // Int_t fCount; - Int_t fCountOpDetAll; - Int_t fCountOpDetDetected; - Int_t fCountOpDetReflDetected; - Float_t fT0_vis; - - Int_t fCountEventAll; - Int_t fCountEventDetected; - // Int_t fCountEventDetectedwithRefl; - - Int_t fEventID; - Int_t fOpChannel; - - //for the analysis tree of the light (gamez) - bool fMakeLightAnalysisTree; - std::vector > > fSignals_vuv; - std::vector > > fSignals_vis; - - TTree * fLightAnalysisTree = nullptr; - int fRun, fTrackID, fpdg, fmotherTrackID; - double fEnergy, fdEdx; - std::vector fPosition0; - std::vector > fstepPositions; - std::vector fstepTimes; - std::vector > fSignalsvuv; - std::vector > fSignalsvis; - std::string fProcess; - - cheat::ParticleInventoryService const* pi_serv = nullptr; - phot::PhotonVisibilityService const* fPVS = nullptr; - - bool const fUseLitePhotons; - - void storeVisibility( - int channel, int nDirectPhotons, int nReflectedPhotons, - double reflectedT0 = 0.0 - ) const; - - - /// Returns if we label as "visibile" a photon with specified wavelength [nm]. - bool isVisible(double wavelength) const - { return fWavelength < kLibGenThres; } - - - }; -} - -namespace opdet { - - - mySimPhotonCounter::mySimPhotonCounter(fhicl::ParameterSet const& pset) - : EDAnalyzer(pset) - , fPVS(art::ServiceHandle().get()) - , fUseLitePhotons(art::ServiceHandle()->UseLitePhotons()) - { - fVerbosity= pset.get("Verbosity"); - try - { - fInputModule = pset.get>("InputModule",{"largeant"}); - } - catch(...) - { - fInputModule.push_back(pset.get("InputModule","largeant")); - } - fMakeAllPhotonsTree= pset.get("MakeAllPhotonsTree"); - fMakeDetectedPhotonsTree= pset.get("MakeDetectedPhotonsTree"); - fMakeOpDetsTree= pset.get("MakeOpDetsTree"); - fMakeOpDetEventsTree= pset.get("MakeOpDetEventsTree"); - fMakeLightAnalysisTree= pset.get("MakeLightAnalysisTree", false); - //fQE= pset.get("QuantumEfficiency"); - //fWavelengthCutLow= pset.get("WavelengthCutLow"); - //fWavelengthCutHigh= pset.get("WavelengthCutHigh"); - - - if (fPVS->IsBuildJob() && fPVS->StoreReflected() && fPVS->StoreReflT0() && fUseLitePhotons) { - throw art::Exception(art::errors::Configuration) - << "Building a library with reflected light time is not supported when using SimPhotonsLite.\n"; - } - - } - - - void mySimPhotonCounter::beginJob() - { - // Get file service to store trees - art::ServiceHandle tfs; - art::ServiceHandle geo; - - std::cout<<"Optical Channels positions: "<Cryostat(0).NOpDet()<Cryostat(0).NOpDet()); ch++) { - double OpDetCenter[3]; - geo->OpDetGeoFromOpDet(ch).GetCenter(OpDetCenter); - std::cout<CryostatBoundaries(CryoBounds); - std::cout<<"Cryo Boundaries"<()); - } - catch (art::Exception const& e) { - if (e.categoryCode() != art::errors::ServiceNotFound) throw; - mf::LogError("mySimPhotonCounter") - << "ParticleInventoryService service is not configured!" - " Please add it in the job configuration." - " In the meanwhile, some checks to particles will be skipped." - ; - } - - // Create and assign branch addresses to required tree - if(fMakeAllPhotonsTree) - { - fThePhotonTreeAll = tfs->make("AllPhotons","AllPhotons"); - fThePhotonTreeAll->Branch("EventID", &fEventID, "EventID/I"); - fThePhotonTreeAll->Branch("Wavelength", &fWavelength, "Wavelength/F"); - fThePhotonTreeAll->Branch("OpChannel", &fOpChannel, "OpChannel/I"); - fThePhotonTreeAll->Branch("Time", &fTime, "Time/F"); - } - - if(fMakeDetectedPhotonsTree) - { - fThePhotonTreeDetected = tfs->make("DetectedPhotons","DetectedPhotons"); - fThePhotonTreeDetected->Branch("EventID", &fEventID, "EventID/I"); - fThePhotonTreeDetected->Branch("Wavelength", &fWavelength, "Wavelength/F"); - fThePhotonTreeDetected->Branch("OpChannel", &fOpChannel, "OpChannel/I"); - fThePhotonTreeDetected->Branch("Time", &fTime, "Time/F"); - } - - if(fMakeOpDetsTree) - { - fTheOpDetTree = tfs->make("OpDets","OpDets"); - fTheOpDetTree->Branch("EventID", &fEventID, "EventID/I"); - fTheOpDetTree->Branch("OpChannel", &fOpChannel, "OpChannel/I"); - fTheOpDetTree->Branch("CountAll", &fCountOpDetAll, "CountAll/I"); - fTheOpDetTree->Branch("CountDetected", &fCountOpDetDetected, "CountDetected/I"); - if(fPVS->StoreReflected()) - fTheOpDetTree->Branch("CountReflDetected", &fCountOpDetReflDetected, "CountReflDetected/I"); - fTheOpDetTree->Branch("Time", &fTime, "Time/F"); - } - - if(fMakeOpDetEventsTree) - { - fTheEventTree = tfs->make("OpDetEvents","OpDetEvents"); - fTheEventTree->Branch("EventID", &fEventID, "EventID/I"); - fTheEventTree->Branch("CountAll", &fCountEventAll, "CountAll/I"); - fTheEventTree->Branch("CountDetected",&fCountEventDetected,"CountDetected/I"); - if(fPVS->StoreReflected()) - fTheOpDetTree->Branch("CountReflDetected", &fCountOpDetReflDetected, "CountReflDetected/I"); - - } - - //generating the tree for the light analysis: - if(fMakeLightAnalysisTree) - { - fLightAnalysisTree = tfs->make("LightAnalysis","LightAnalysis"); - fLightAnalysisTree->Branch("RunNumber",&fRun); - fLightAnalysisTree->Branch("EventID",&fEventID); - fLightAnalysisTree->Branch("TrackID",&fTrackID); - fLightAnalysisTree->Branch("PdgCode",&fpdg); - fLightAnalysisTree->Branch("MotherTrackID",&fmotherTrackID); - fLightAnalysisTree->Branch("Energy",&fEnergy); - fLightAnalysisTree->Branch("dEdx",&fdEdx); - fLightAnalysisTree->Branch("StepPositions",&fstepPositions); - fLightAnalysisTree->Branch("StepTimes",&fstepTimes); - fLightAnalysisTree->Branch("SignalsVUV",&fSignalsvuv); - fLightAnalysisTree->Branch("SignalsVisible",&fSignalsvis); - fLightAnalysisTree->Branch("Process",&fProcess); - } - - } - - - void mySimPhotonCounter::endJob() - { - if(fPVS->IsBuildJob()) - { - art::ServiceHandle()->StoreLibrary(); - } - } - - void mySimPhotonCounter::analyze(art::Event const& evt) - { - - // Lookup event ID from event - art::EventNumber_t event = evt.id().event(); - fEventID=Int_t(event); - - // Service for determining opdet responses - art::ServiceHandle odresponse; - - // get the geometry to be able to figure out signal types and chan -> plane mappings - art::ServiceHandle geo; - - // GEANT4 info on the particles (only used if making light analysis tree) - std::vector const* mcpartVec = nullptr; - - //-------------------------initializing light tree vectors------------------------ - std::vector totalEnergy_track; - fstepPositions.clear(); - fstepTimes.clear(); - if (fMakeLightAnalysisTree) { -// mcpartVec = evt.getPointerByLabel>("largeant"); - mcpartVec = evt.getHandle>("largeant").product(); - - size_t maxNtracks = 1000U; // mcpartVec->size(); --- { to be fixed soon! ] - fSignals_vuv.clear(); - fSignals_vuv.resize(maxNtracks); - fSignals_vis.clear(); - fSignals_vis.resize(maxNtracks); - for(size_t itrack=0; itrack!=maxNtracks; itrack++) { - fSignals_vuv[itrack].resize(geo->NOpChannels()); - fSignals_vis[itrack].resize(geo->NOpChannels()); - } - totalEnergy_track.resize(maxNtracks, 0.); - //-------------------------stimation of dedx per trackID---------------------- - //get the list of particles from this event - const sim::ParticleList* plist = pi_serv? &(pi_serv->ParticleList()): nullptr; - - // loop over all sim::SimChannels in the event and make sure there are no - // sim::IDEs with trackID values that are not in the sim::ParticleList - std::vector sccol; - //evt.getView(fG4ModuleLabel, sccol); - for(auto const& mod : fInputModule){ - evt.getView(mod, sccol); - double totalCharge=0.0; - double totalEnergy=0.0; - //loop over the sim channels collection - for(size_t sc = 0; sc < sccol.size(); ++sc){ - double numIDEs=0.0; - double scCharge=0.0; - double scEnergy=0.0; - const auto & tdcidemap = sccol[sc]->TDCIDEMap(); - //loop over all of the tdc IDE map objects - for(auto mapitr = tdcidemap.begin(); mapitr != tdcidemap.end(); mapitr++){ - const std::vector idevec = (*mapitr).second; - numIDEs += idevec.size(); - //go over all of the IDEs in a given simchannel - for(size_t iv = 0; iv < idevec.size(); ++iv){ - if (plist) { - if(plist->find( idevec[iv].trackID ) == plist->end() - && idevec[iv].trackID != sim::NoParticleId) - { - mf::LogWarning("LArG4Ana") << idevec[iv].trackID << " is not in particle list"; - } - } - if(idevec[iv].trackID < 0) continue; - totalCharge +=idevec[iv].numElectrons; - scCharge += idevec[iv].numElectrons; - totalEnergy +=idevec[iv].energy; - scEnergy += idevec[iv].energy; - - totalEnergy_track[idevec[iv].trackID] += idevec[iv].energy/3.; - } - } - } - } - }//End of if(fMakeLightAnalysisTree) - - - if(!fUseLitePhotons) - { - - //Reset counters - fCountEventAll=0; - fCountEventDetected=0; - - //Get *ALL* SimPhotonsCollection from Event - auto photon_handles =evt.getMany>(); - if (photon_handles.size() == 0) - throw art::Exception(art::errors::ProductNotFound)<<"sim SimPhotons retrieved and you requested them."; - - for(auto const& mod : fInputModule){ - // sim::SimPhotonsCollection TheHitCollection = sim::SimListUtils::GetSimPhotonsCollection(evt,mod); - //switching off to add reading in of labelled collections: Andrzej, 02/26/19 - - for (auto const& ph_handle: photon_handles) { - // Do some checking before we proceed - if (!ph_handle.isValid()) continue; - if (ph_handle.provenance()->moduleLabel() != mod) continue; //not the most efficient way of doing this, but preserves the logic of the module. Andrzej - - bool Reflected = (ph_handle.provenance()->productInstanceName() == "Reflected"); - - if((*ph_handle).size()>0) - { - if(fMakeLightAnalysisTree) { - //resetting the signalt to save in the analysis tree per event - const int maxNtracks = 1000; - for(size_t itrack=0; itrack!=maxNtracks; itrack++) { - for(size_t pmt_i=0; pmt_i!=geo->NOpChannels(); pmt_i++) { - fSignals_vuv[itrack][pmt_i].clear(); - fSignals_vis[itrack][pmt_i].clear(); - } - } - } - } - - - // if(fVerbosity > 0) std::cout<<"Found OpDet hit collection of size "<< TheHitCollection.size()< 0) std::cout<<"Found OpDet hit collection of size "<< (*ph_handle).size()<0) - { - // for(sim::SimPhotonsCollection::const_iterator itOpDet=TheHitCollection.begin(); itOpDet!=TheHitCollection.end(); itOpDet++) - for(auto const& itOpDet: (*ph_handle) ) - { - //Reset Counters - fCountOpDetAll=0; - fCountOpDetDetected=0; - fCountOpDetReflDetected=0; - //Reset t0 for visible light - fT0_vis = 999.; - - //Get data from HitCollection entry - fOpChannel=itOpDet.OpChannel(); - const sim::SimPhotons& TheHit=itOpDet; - - //std::cout<<"OpDet " << fOpChannel << " has size " << TheHit.size()<wavelength(Phot.Energy); - - //Get arrival time from phot - fTime= Phot.Time; - - // special case for LibraryBuildJob: no working "Reflected" handle and all photons stored in single object - must sort using wavelength instead - if(fPVS->IsBuildJob() && !Reflected) { - // all photons contained in object with Reflected = false flag - // Increment per OpDet counters and fill per phot trees - fCountOpDetAll++; - if(fMakeAllPhotonsTree){ - if (!isVisible(fWavelength) || fPVS->StoreReflected()) { - fThePhotonTreeAll->Fill(); - } - } - - if(odresponse->detected(fOpChannel, Phot)) - { - if(fMakeDetectedPhotonsTree) fThePhotonTreeDetected->Fill(); - //only store direct direct light - if(!isVisible(fWavelength)) - fCountOpDetDetected++; - // reflected and shifted light is in visible range - else if(fPVS->StoreReflected()) { - fCountOpDetReflDetected++; - // find the first visible arrival time - if(fPVS->StoreReflT0() && fTime < fT0_vis) - fT0_vis = fTime; - } - if(fVerbosity > 3) - std::cout<<"OpDetResponseInterface PerPhoton : Event "< 3) - std::cout<<"OpDetResponseInterface PerPhoton : Event "<StoreReflected() flag - // Increment per OpDet counters and fill per phot trees - fCountOpDetAll++; - if(fMakeAllPhotonsTree){ - if (!Reflected || (fPVS->StoreReflected() && Reflected)) { - fThePhotonTreeAll->Fill(); - } - } - - if(odresponse->detected(fOpChannel, Phot)) - { - if(fMakeDetectedPhotonsTree) fThePhotonTreeDetected->Fill(); - //only store direct direct light - if(!Reflected) - fCountOpDetDetected++; - // reflected and shifted light is in visible range - else if(fPVS->StoreReflected() && Reflected ) { - fCountOpDetReflDetected++; - // find the first visible arrival time - if(fPVS->StoreReflT0() && fTime < fT0_vis) - fT0_vis = fTime; - } - if(fVerbosity > 3) - std::cout<<"OpDetResponseInterface PerPhoton : Event "< 3) - std::cout<<"OpDetResponseInterface PerPhoton : Event "<IsBuildJob() && !Reflected) // for library build job, both componenents stored in first object with Reflected = false - { - storeVisibility(fOpChannel, fCountOpDetDetected, fCountOpDetReflDetected, fT0_vis); - } - - // Incremenent per event and fill Per OpDet trees - if(fMakeOpDetsTree) fTheOpDetTree->Fill(); - fCountEventAll+=fCountOpDetAll; - fCountEventDetected+=fCountOpDetDetected; - - // Give per OpDet output - if(fVerbosity >2) std::cout<<"OpDetResponseInterface PerOpDet : Event "<Fill(); - - // Give per event output - if(fVerbosity >1) std::cout<<"OpDetResponseInterface PerEvent : Event "<Fill(); - } - if(fMakeLightAnalysisTree) { - assert(mcpartVec); - assert(fLightAnalysisTree); - - std::cout<<"Filling the analysis tree"< this_xyz; - - //loop over the particles - for(simb::MCParticle const& pPart: *mcpartVec){ - - if(pPart.Process() == "primary") - fEnergy = pPart.E(); - - //resetting the vectors - fstepPositions.clear(); - fstepTimes.clear(); - fSignalsvuv.clear(); - fSignalsvis.clear(); - fdEdx = -1.; - //filling the tree fields - fTrackID = pPart.TrackId(); - fpdg = pPart.PdgCode(); - fmotherTrackID = pPart.Mother(); - fdEdx = totalEnergy_track[fTrackID]; - fSignalsvuv = fSignals_vuv[fTrackID]; - fSignalsvis = fSignals_vis[fTrackID]; - fProcess = pPart.Process(); - //filling the center positions of each step - for(size_t i_s=1; i_s < pPart.NumberTrajectoryPoints(); i_s++){ - this_xyz.clear(); - this_xyz.resize(3); - this_xyz[0] = pPart.Position(i_s).X(); - this_xyz[1] = pPart.Position(i_s).Y(); - this_xyz[2] = pPart.Position(i_s).Z(); - fstepPositions.push_back(this_xyz); - fstepTimes.push_back(pPart.Position(i_s).T()); - } - //filling the tree per track - fLightAnalysisTree->Fill(); - } - } // if fMakeLightAnalysisTree - } - } - } - if (fUseLitePhotons) - { - - //Get *ALL* SimPhotonsCollection from Event - auto photon_handles =evt.getMany>(); - if (photon_handles.size() == 0) - throw art::Exception(art::errors::ProductNotFound)<<"sim SimPhotons retrieved and you requested them."; - - //Get SimPhotonsLite from Event - for(auto const& mod : fInputModule){ - //art::Handle< std::vector > photonHandle; - //evt.getByLabel(mod, photonHandle); - - // Loop over direct/reflected photons - for (auto const& ph_handle: photon_handles) { - // Do some checking before we proceed - if (!ph_handle.isValid()) continue; - if (ph_handle.provenance()->moduleLabel() != mod) continue; //not the most efficient way of doing this, but preserves the logic of the module. Andrzej - - bool Reflected = (ph_handle.provenance()->productInstanceName() == "Reflected"); - - //Reset counters - fCountEventAll=0; - fCountEventDetected=0; - - if(fVerbosity > 0) std::cout<<"Found OpDet hit collection of size "<< (*ph_handle).size()<0) - { - - for ( auto const& photon : (*ph_handle) ) - { - //Get data from HitCollection entry - fOpChannel=photon.OpChannel; - std::map PhotonsMap = photon.DetectedPhotons; - - //Reset Counters - fCountOpDetAll=0; - fCountOpDetDetected=0; - fCountOpDetReflDetected=0; - - for(auto it = PhotonsMap.begin(); it!= PhotonsMap.end(); it++) - { - // Calculate wavelength in nm - if (Reflected) { - fWavelength = kVisibleThreshold; - } - else { - fWavelength= kVUVWavelength; // original - } - - //Get arrival time from phot - fTime= it->first; - //std::cout<<"Arrival time: " << fTime<second ; i++) - { - // Increment per OpDet counters and fill per phot trees - fCountOpDetAll++; - if(fMakeAllPhotonsTree) fThePhotonTreeAll->Fill(); - - if(odresponse->detectedLite(fOpChannel)) - { - if(fMakeDetectedPhotonsTree) fThePhotonTreeDetected->Fill(); - // direct light - if (!Reflected){ - fCountOpDetDetected++; - } - else if (Reflected) { - fCountOpDetReflDetected++; - } - if(fVerbosity > 3) - std::cout<<"OpDetResponseInterface PerPhoton : Event "< 3) - { - std::cout<<"OpDetResponseInterface PerPhoton : Event "<Fill(); - fCountEventAll+=fCountOpDetAll; - fCountEventDetected+=fCountOpDetDetected; - - if (fPVS->IsBuildJob()) - storeVisibility(fOpChannel, fCountOpDetDetected, fCountOpDetReflDetected, fT0_vis); - - - // Give per OpDet output - if(fVerbosity >2) std::cout<<"OpDetResponseInterface PerOpDet : Event "<Fill(); - - // Give per event output - if(fVerbosity >1) std::cout<<"OpDetResponseInterface PerEvent : Event "<Fill(); - } - } - } - } - } // mySimPhotonCounter::analyze() - - - // --------------------------------------------------------------------------- - void mySimPhotonCounter::storeVisibility( - int channel, int nDirectPhotons, int nReflectedPhotons, - double reflectedT0 /* = 0.0 */ - ) const - { - phot::PhotonVisibilityService& pvs - = *(art::ServiceHandle()); - - // ask PhotonVisibilityService which voxel was being served, - // and how many photons where there generated (yikes!!); - // this value was put there by LightSource (yikes!!) - int VoxID; - double NProd; - fPVS->RetrieveLightProd(VoxID, NProd); - - pvs.SetLibraryEntry(VoxID, channel, double(nDirectPhotons)/NProd); - - //store reflected light - if(fPVS->StoreReflected()) { - pvs.SetLibraryEntry(VoxID, channel, double(nReflectedPhotons)/NProd, true); - - //store reflected first arrival time - if (fPVS->StoreReflT0()) - pvs.SetLibraryReflT0Entry(VoxID, channel, reflectedT0); - - } // if reflected - - } // mySimPhotonCounter::storeVisibility() - - // --------------------------------------------------------------------------- - -} -namespace opdet{ - - DEFINE_ART_MODULE(mySimPhotonCounter) - -}//end namespace opdet diff --git a/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/protoDune_buildopticallibrary_grid.fcl b/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/protoDune_buildopticallibrary_grid.fcl deleted file mode 100644 index de28cb46..00000000 --- a/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/protoDune_buildopticallibrary_grid.fcl +++ /dev/null @@ -1,123 +0,0 @@ -#include "services_dune.fcl" -#include "backtrackerservice.fcl" -#include "particleinventoryservice.fcl" -#include "singles.fcl" -#include "largeantmodules.fcl" -#include "detsimmodules.fcl" -#include "opticaldetectormodules_dune.fcl" -#include "opticaldetectorservices_dune.fcl" -#include "photolibbuild_services_dune.fcl" -#include "photpropservices_dune.fcl" -#include "lightsource.fcl" - - -process_name: LibraryBuild - - - - - -services: -{ - # Load the service that manages root files for histograms. - TFileService: { fileName: "PhotonLibraryFile_protoDune.root" } - TimeTracker: {} - RandomNumberGenerator: {} #ART native random number generator - message: @local::standard_info - @table::dunefd_photolibbuild_services - BackTrackerService: @local::dunefd_backtrackerservice # defined in backtrackerservice.fcl - ParticleInventoryService: @local::dunefd_particleinventoryservice # defined in backtrackerservice.fcl -} - - -services.Geometry.GDML: "protodune_v4.gdml" -services.Geometry.SortingParameters.DetectorVersion: "dune10kt_v1" -services.AuxDetGeometry.GDML: @local::services.Geometry.GDML - -services.OpDetResponseInterface.LongAxis: z - -#Start each new event with an empty event. -source: -{ - module_type: EmptyEvent - maxEvents: 2 # Number of events to create - 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::standard_lightsource - largeant: @local::standard_largeant - } - - analyzers: - { - pmtresponse: @local::dunefd_simphotoncounter # defined in opticaldetectormodules.fcl - } - - #define the producer and filter modules for this path, order matters, - #filters reject all following items. see lines starting physics.producers below - simulate: [ generator, largeant ] - analyzeIt: [ pmtresponse ] - #define the output stream, there could be more than one if using filters - stream1: [ ] - - #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: [analyzeIt, 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: "notused.root" #default file name, can override from command line with -o or --output - } -} - - - - -##### Parameter changes for the generator (lightsource) ##### - -# do not allow lightsource to write output into root file -physics.producers.generator.FillTree: false - -##### Parameter changes for the pmt respnse analyzer (simphotoncounter) ##### - -physics.analyzers.pmtresponse.MakeAllPhotonsTree: false -physics.analyzers.pmtresponse.MakeDetectedPhotonsTree: false -physics.analyzers.pmtresponse.MakeOpDetsTree: false -physics.analyzers.pmtresponse.MakeOpDetEventsTree: false - - -# To disable wireplane absorption, uncomment this line -#services.LArG4Parameters.OpticalParamModels: ["TransparentPlaneAction"] - - - -# Number of voxels -services.PhotonVisibilityService.NX: 100 -services.PhotonVisibilityService.NY: 100 -services.PhotonVisibilityService.NZ: 100 - -# New IU Radiator Parameters from arXiv:1710.11233 -services.OpDetResponseInterface.LambdaShort: 4.3 # cm -services.OpDetResponseInterface.LambdaLong: 225.0 # cm -services.OpDetResponseInterface.FracShort: 0.29 -services.OpDetResponseInterface.FracLong: 0.71 diff --git a/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/protoDune_buildopticallibrary_test.fcl b/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/protoDune_buildopticallibrary_test.fcl deleted file mode 100644 index a2b4cc17..00000000 --- a/duneopdet/PhotonPropagation/LibraryBuildTools/legacyLArG4/protoDune_buildopticallibrary_test.fcl +++ /dev/null @@ -1,137 +0,0 @@ -#include "services_dune.fcl" -#include "backtrackerservice.fcl" -#include "particleinventoryservice.fcl" -#include "singles.fcl" -#include "largeantmodules.fcl" -#include "detsimmodules.fcl" -#include "opticaldetectormodules_dune.fcl" -#include "opticaldetectorservices_dune.fcl" -#include "photolibbuild_services_dune.fcl" -#include "photpropservices_dune.fcl" -#include "lightsource.fcl" - - -process_name: LibraryBuild - - - - - -services: -{ - # Load the service that manages root files for histograms. - TFileService: { fileName: "PhotonLibraryFile_protoDune_test.root" } - TimeTracker: {} - RandomNumberGenerator: {} #ART native random number generator - message: @local::standard_info - @table::dunefd_photolibbuild_services - BackTrackerService: @local::dunefd_backtrackerservice # defined in backtrackerservice.fcl - ParticleInventoryService: @local::dunefd_particleinventoryservice # defined in backtrackerservice.fcl -} - - -services.Geometry.GDML: "protodune_v3.gdml" -services.Geometry.SortingParameters.DetectorVersion: "dune10kt_v1" -services.AuxDetGeometry.GDML: @local::services.Geometry.GDML - -services.OpDetResponseInterface.LongAxis: z - -#Start each new event with an empty event. -source: -{ - module_type: EmptyEvent - maxEvents: 125 # Number of events to create - 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::standard_lightsource - largeant: @local::standard_largeant - } - - analyzers: - { - pmtresponse: @local::dunefd_simphotoncounter # defined in opticaldetectormodules.fcl - } - - #define the producer and filter modules for this path, order matters, - #filters reject all following items. see lines starting physics.producers below - simulate: [ generator, largeant ] - analyzeIt: [ pmtresponse ] - #define the output stream, there could be more than one if using filters - stream1: [ ] - - #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: [analyzeIt, 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: "notused.root" #default file name, can override from command line with -o or --output - } -} - - - - -##### Parameter changes for the generator (lightsource) ##### - -# do not allow lightsource to write output into root file -physics.producers.generator.FillTree: false - -##### Parameter changes for the pmt respnse analyzer (simphotoncounter) ##### - -physics.analyzers.pmtresponse.MakeAllPhotonsTree: false -physics.analyzers.pmtresponse.MakeDetectedPhotonsTree: false -physics.analyzers.pmtresponse.MakeOpDetsTree: false -physics.analyzers.pmtresponse.MakeOpDetEventsTree: false - - -# To disable wireplane absorption, uncomment this line -#services.LArG4Parameters.OpticalParamModels: ["TransparentPlaneAction"] - - - -#services.PhotonVisibilityService.NX: 30 -#services.PhotonVisibilityService.NY: 30 -#services.PhotonVisibilityService.NZ: 30 -#physics.producers.generator.N: 500 - -#physics.analyzers.pmtresponse.Verbosity: 3 - -physics.producers.generator.N: 10000 - - -# Number of voxels -services.PhotonVisibilityService.NX: 100 -services.PhotonVisibilityService.NY: 100 -services.PhotonVisibilityService.NZ: 100 - -physics.producers.generator.FirstVoxel: 1 -physics.producers.generator.LastVoxel: 2 - - -# New IU Radiator Parameters from arXiv:1710.11233 -services.OpDetResponseInterface.LambdaShort: 4.3 # cm -services.OpDetResponseInterface.LambdaLong: 225.0 # cm -services.OpDetResponseInterface.FracShort: 0.29 -services.OpDetResponseInterface.FracLong: 0.71 diff --git a/duneopdet/PhotonPropagation/LibraryBuildTools/libanalysis_fulllib.fcl b/duneopdet/PhotonPropagation/LibraryBuildTools/libanalysis_fulllib.fcl deleted file mode 100644 index 11b96445..00000000 --- a/duneopdet/PhotonPropagation/LibraryBuildTools/libanalysis_fulllib.fcl +++ /dev/null @@ -1,50 +0,0 @@ -#include "services_dune.fcl" -#include "singles.fcl" -#include "largeantmodules.fcl" -#include "detsimmodules.fcl" -#include "opticaldetectormodules.fcl" -#include "photpropservices_dune.fcl" -#include "photpropmodules_dune.fcl" -#include "lightsource.fcl" - - -process_name: LibraryTest - -services: -{ - # Load the service that manages root files for histograms. - TFileService: { fileName: "libanalysis_dune10kt_v1_1x2x6_20170412_hists.root" } - TimeTracker: {} - message: @local::standard_info - @table::dunefd_simulation_services # defined in services.fcl - PhotonVisibilityService: @local::dune10kt_1x2x6_photonvisibilityservice -} - -physics: -{ - - producers: - { - } - - analyzers: - { - libana: @local::dunefd_photonlibraryanalyzer - } - - analyzeIt: [ libana ] - - #trigger_paths is a keyword and contains the paths that modify the art::event, - #ie filters and producers - trigger_paths: [] - - #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: [analyzeIt] -} - -services.Geometry.GDML: "dune10kt_v2_1x2x6.gdml" -services.Geometry.SortingParameters.DetectorVersion: "dune10kt_v2" -services.AuxDetGeometry.GDML: @local::services.Geometry.GDML - -services.PhotonVisibilityService.LibraryFile: "lib_dune10kt_v1_1x2x6_20170412.root" diff --git a/duneopdet/PhotonPropagation/LibraryBuildTools/libanalysis_interactive_test.fcl b/duneopdet/PhotonPropagation/LibraryBuildTools/libanalysis_interactive_test.fcl deleted file mode 100644 index 7dc3198d..00000000 --- a/duneopdet/PhotonPropagation/LibraryBuildTools/libanalysis_interactive_test.fcl +++ /dev/null @@ -1,77 +0,0 @@ -#include "services_dune.fcl" -#include "singles.fcl" -#include "largeantmodules.fcl" -#include "detsimmodules.fcl" -#include "opticaldetectormodules.fcl" -#include "photpropservices_dune.fcl" -#include "photpropmodules_dune.fcl" -#include "lightsource.fcl" - - -process_name: LibraryTest - - - - - -services: -{ - # Load the service that manages root files for histograms. - TFileService: { fileName: "libanalysis_test_hists.root" } - TimeTracker: {} - message: @local::standard_info - PhotonVisibilityService: @local::protodune_photonvisibilityservice - @table::dunefd_simulation_services # defined in services.fcl -} - -physics: -{ - - producers: - { - } - - analyzers: - { - libana: @local::dunefd_photonlibraryanalyzer - } - - analyzeIt: [ libana ] - - #trigger_paths is a keyword and contains the paths that modify the art::event, - #ie filters and producers - trigger_paths: [] - - #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: [analyzeIt] -} - - -services.Geometry.GDML: "protoDune_v1.gdml" -services.Geometry.SortingParameters.DetectorVersion: "dune10kt_v1" -services.AuxDetGeometry.GDML: @local::services.Geometry.GDML - - -# Begin optical specific parts: - -# -# Examine your own library file - need to customize the visibility service -# - -services.PhotonVisibilityService.LibraryFile: "PhotonLibraryFile_protoDune_test.root" - -# Number of voxels -services.PhotonVisibilityService.NX: 5 -services.PhotonVisibilityService.NY: 5 -services.PhotonVisibilityService.NZ: 5 - -services.PhotonVisibilityService.UseCryoBoundary: false - -# IF UseCryoBoundary is set to false, so use the following parameters in cm -#services.PhotonVisibilityService.XMin: -8. -#services.PhotonVisibilityService.XMax: -6. -#services.PhotonVisibilityService.YMin: -100. -#services.PhotonVisibilityService.YMax: 0 -#services.PhotonVisibilityService.ZMin: 60. -#services.PhotonVisibilityService.ZMax: 90. diff --git a/duneopdet/PhotonPropagation/LibraryBuildTools/libanalysis_protodune_full.fcl b/duneopdet/PhotonPropagation/LibraryBuildTools/libanalysis_protodune_full.fcl deleted file mode 100644 index a442ff46..00000000 --- a/duneopdet/PhotonPropagation/LibraryBuildTools/libanalysis_protodune_full.fcl +++ /dev/null @@ -1,53 +0,0 @@ -#include "services_dune.fcl" -#include "singles.fcl" -#include "largeantmodules.fcl" -#include "detsimmodules.fcl" -#include "opticaldetectormodules.fcl" -#include "photpropservices_dune.fcl" -#include "photpropmodules_dune.fcl" -#include "lightsource.fcl" - - -process_name: LibraryTest - -services: -{ - # Load the service that manages root files for histograms. - TFileService: { fileName: "libanalysis_protodune_%tc_hists.root" } - TimeTracker: {} - message: @local::standard_info - @table::protodune_simulation_services # defined in services.fcl - PhotonVisibilityService: @local::protodune_photonvisibilityservice -} - -physics: -{ - - producers: - { - } - - analyzers: - { - libana: @local::dunefd_photonlibraryanalyzer - } - - analyzeIt: [ libana ] - - #trigger_paths is a keyword and contains the paths that modify the art::event, - #ie filters and producers - trigger_paths: [] - - #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: [analyzeIt] -} - -services.Geometry.GDML: "protodune_v3.gdml" -services.Geometry.SortingParameters.DetectorVersion: "dune10kt_v1" -services.AuxDetGeometry.GDML: @local::services.Geometry.GDML - -#services.Geometry.GDML: "protodune_v2.gdml" -#services.Geometry.SortingParameters.DetectorVersion: "dune10kt_v1" - -services.PhotonVisibilityService.LibraryFile: "lib_protodune_0ppmn2.root" diff --git a/duneopdet/PhotonPropagation/LibraryBuildTools/protodunehd_buildopticallibrary_grid.fcl b/duneopdet/PhotonPropagation/LibraryBuildTools/protodunehd_buildopticallibrary_grid.fcl deleted file mode 100644 index cb4149b7..00000000 --- a/duneopdet/PhotonPropagation/LibraryBuildTools/protodunehd_buildopticallibrary_grid.fcl +++ /dev/null @@ -1,180 +0,0 @@ -# New fhicl file for library generation. It was based on the -# photonlibrary_builder_icarus.fcl by Gianluca Petrillo -# -# This configuration is base for the full simulation of voxels of the -# photon visibility lookup table ("photon library") for ProtoDUNE-HD. -# - -#include "services_dune.fcl" -#include "backtrackerservice.fcl" -#include "particleinventoryservice.fcl" -#include "singles.fcl" -#include "largeantmodules.fcl" -#include "detsimmodules.fcl" -#include "opticaldetectormodules_dune.fcl" -#include "opticaldetectorservices_dune.fcl" -#include "photolibbuild_services_dune.fcl" -#include "photpropservices_dune.fcl" -#include "lightsource.fcl" - -# services -#include "services_refactored_pdune.fcl" - -# modules -#include "opticaldetectormodules.fcl" -#include "opticaldetectorservices.fcl" -#include "LArG4_dune.fcl" - - -process_name: LibraryBuild - - -services: -{ - @table::protodune_larg4_services - - @table::dunefd_photolibbuild_services - # events are generated anew each time: default per-event policy is ineffective - #NuRandomService: @local::random_NuRandomService - RandomNumberGenerator: {} #ART native random number generator - - OpDetResponse: @local::standard_opdetresponse - - SpaceChargeService: @erase -AuxDetGeometry: @local::protodunehdv1_auxdet_geo - Geometry: @local::protodunehdv1_geo - -} - - -#Use the following lines if you need to change the geometry by hand (e.g. test geometry) -#services.Geometry.GDML: "dunevdcb1_v2_refactored.gdml" - -#services.OpDetResponseInterface.LongAxis: z - -services.TFileService.fileName: "Photonlibrary_protodunehd.root" - -services.Geometry.DisableWiresInG4: false # we need to account for wire shadow - -services.LArG4Parameters: { # customization - - @table::services.LArG4Parameters - - # enable this custom LArG4 physics list - # with optical physics instead of fast scintillation - UseCustomPhysics: true - EnabledPhysics: [ - "Em", - "Optical", # <== this is the important one! - "SynchrotronAndGN", - "Ion", - "Hadron", - "Decay", - "HadronElastic", - "Stopping", - "NeutronTrackingCut" - ] - - # store only the count of photons per channel, not the single photons - UseLitePhotons: true - - # avoid unnecessary steps - DisableWireplanes: true - FillSimEnergyDeposits: false - NoElectronPropagation: false - -} # services.LArG4Parameters - - -services.PhotonVisibilityService: { - LibraryBuildJob: true - DoNotLoadLibrary: true - - UseCryoBoundary: true - - NX: 100 # 100 voxels along X direction - NY: 100 # 100 voxels along Y direction - NZ: 100 # 100 voxels along Z direction - -} # services.PhotonVisibilityService - -# for photon library generation we do not include prescale -services.LArPropertiesService.ScintPreScale: 1.0 - - -################################################################################ -### workflow configuration -################################################################################ - -#Start each new event with an empty event. -source: -{ - module_type: EmptyEvent - maxEvents: 2 # Number of events to create - 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::standard_lightsource - largeant: @local::standard_largeant - } - - analyzers: - { - pmtresponse: @local::dunefd_simphotoncounter # defined in opticaldetectormodules.fcl - } - - #define the producer and filter modules for this path, order matters, - #filters reject all following items. see lines starting physics.producers below - simulate: [ generator, largeant ] - analyzeIt: [ pmtresponse ] - #define the output stream, there could be more than one if using filters stream1: [ ] - stream1: [ ] - - #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: [analyzeIt, 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: "notused.root" #default file name, can override from command line with -o or --output - } -} - - -##### Parameter changes for the generator (lightsource) ##### - -# do not allow lightsource to write output into root file -physics.producers.generator.FillTree: false - -##### Parameter changes for the pmt response analyzer (simphotoncounter) ##### - -physics.analyzers.pmtresponse.MakeAllPhotonsTree: false -physics.analyzers.pmtresponse.MakeDetectedPhotonsTree: false -physics.analyzers.pmtresponse.MakeOpDetsTree: false -physics.analyzers.pmtresponse.MakeOpDetEventsTree: false - -#How many photons to generate per voxel -physics.producers.generator.N: 100000 - -# To disable wireplane absorption, uncomment this line -#services.LArG4Parameters.OpticalParamModels: ["TransparentPlaneAction"] diff --git a/duneopdet/PhotonPropagation/LibraryBuildTools/protodunehd_buildopticallibrary_test.fcl b/duneopdet/PhotonPropagation/LibraryBuildTools/protodunehd_buildopticallibrary_test.fcl deleted file mode 100644 index bf15f4b2..00000000 --- a/duneopdet/PhotonPropagation/LibraryBuildTools/protodunehd_buildopticallibrary_test.fcl +++ /dev/null @@ -1,149 +0,0 @@ -# New fhicl file for library generation. It was based on the -# photonlibrary_builder_icarus.fcl by Gianluca Petrillo -# -# This configuration is base for the simulation of a few voxels of the -# photon visibility lookup table ("photon library") for ProtoDUNE-HD. -# - -#include "services_dune.fcl" -#include "backtrackerservice.fcl" -#include "particleinventoryservice.fcl" -#include "singles.fcl" -#include "largeantmodules.fcl" -#include "detsimmodules.fcl" -#include "opticaldetectormodules_dune.fcl" -#include "opticaldetectorservices_dune.fcl" -#include "photolibbuild_services_dune.fcl" -#include "photpropservices_dune.fcl" -#include "lightsource.fcl" - -# services -#include "services_refactored_pdune.fcl" - -# modules -#include "opticaldetectormodules.fcl" -#include "opticaldetectorservices.fcl" -#include "LArG4_dune.fcl" - - -process_name: LibraryBuild - - -################################################################################ -### service configuration -################################################################################ - -services: { - - @table::protodune_larg4_services - - @table::dunefd_photolibbuild_services - # events are generated anew each time: default per-event policy is ineffective - #NuRandomService: @local::random_NuRandomService - RandomNumberGenerator: {} #ART native random number generator - - OpDetResponse: @local::standard_opdetresponse - - SpaceChargeService: @erase -AuxDetGeometry: @local::protodunehdv1_auxdet_geo - Geometry: @local::protodunehdv1_geo - -} # services - -#Use the following lines if you need to change the geometry by hand (e.g. test geometry) -services.Geometry.GDML: "protodunehd_v6_refactored.gdml" - -services.TFileService.fileName: "Photonlibrary_protodunehd.root" - -services.Geometry.DisableWiresInG4: false # we need to account for wire shadow - -services.LArG4Parameters: { # customization - - @table::services.LArG4Parameters - - # enable this custom LArG4 physics list - # with optical physics instead of fast scintillation - UseCustomPhysics: true - EnabledPhysics: [ - "Em", - "Optical", # <== this is the important one! - "SynchrotronAndGN", - "Ion", - "Hadron", - "Decay", - "HadronElastic", - "Stopping", - "NeutronTrackingCut" - ] - - # store only the count of photons per channel, not the single photons - UseLitePhotons: true - - # avoid unnecessary steps - DisableWireplanes: true - FillSimEnergyDeposits: false - NoElectronPropagation: false - -} # services.LArG4Parameters - - -services.PhotonVisibilityService: { - LibraryBuildJob: true - DoNotLoadLibrary: true - - UseCryoBoundary: true - - NX: 5 # 5 voxels along X direction - NY: 5 # 5 voxels along Y direction - NZ: 5 # 5 voxels along Z direction - -} # services.PhotonVisibilityService - -# for photon library generation we do not include prescale -services.LArPropertiesService.ScintPreScale: 1.0 - - -################################################################################ -### workflow configuration -################################################################################ - -source: -{ - module_type: EmptyEvent - maxEvents: 125 # Number of events to create - firstRun: 1 # Run number to use for this file - firstEvent: 1 # number of first event in the file -} -physics: { - - producers: - { - generator: @local::standard_lightsource - largeant: @local::standard_largeant - } - - analyzers: { - pmtresponse: { - module_type: SimPhotonCounter - GeneratorModule: "generator" - Verbosity: 0 # quiet! - MakeAllPhotonsTree: false - MakeDetectedPhotonsTree: false - MakeOpDetsTree: false - MakeOpDetEventsTree: false - MakeLightAnalysisTree: false - } - } # analyzers - - simulate: [ generator, largeant ] - analyzeIt: [ pmtresponse ] - -} # physics - - -# -# Optical specific module configuration: -# - -# we do not save, nor create, MCParticle objects -physics.producers.largeant.MakeMCParticles: false diff --git a/duneopdet/PhotonPropagation/Tutorial/dune1x2x6_optical_tutorial_libanalysis.fcl b/duneopdet/PhotonPropagation/Tutorial/dune1x2x6_optical_tutorial_libanalysis.fcl deleted file mode 100644 index dd441996..00000000 --- a/duneopdet/PhotonPropagation/Tutorial/dune1x2x6_optical_tutorial_libanalysis.fcl +++ /dev/null @@ -1,76 +0,0 @@ -#include "services_dune.fcl" -#include "singles.fcl" -#include "largeantmodules.fcl" -#include "detsimmodules.fcl" -#include "opticaldetectormodules.fcl" -#include "photpropservices_dune.fcl" -#include "photpropmodules_dune.fcl" -#include "lightsource.fcl" - - - -process_name: LibraryAnalysis - - -services: -{ - # Load the service that manages root files for histograms. - TFileService: { fileName: "PhotonLibraryFile_dune1x2x6texample_hists.root" } - message: @local::standard_info - @table::dunefd_simulation_services -} - -# DUNE FD 1x2x6 workspace geometry -services.AuxDetGeometry: @local::dune10kt_1x2x6_auxdet_geo -services.Geometry: @local::dune10kt_1x2x6_geo -services.PhotonVisibilityService: @local::dune10kt_1x2x6_photonvisibilityservice - - -physics: -{ - - producers: - { - } - - analyzers: - { - libana: @local::dunefd_photonlibraryanalyzer - } - - analyzeIt: [ libana ] - - #trigger_paths is a keyword and contains the paths that modify the art::event, - #ie filters and producers - trigger_paths: [] - - #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: [analyzeIt] -} - - - -# Begin optical specific parts: - -# -# Examine your own library file - need to customize the visibility service -# - -#services.PhotonVisibilityService.LibraryFile: "PhotonLibraryFile_dune35ton.root" - -# Number of voxels -#services.PhotonVisibilityService.NX: 30 -#services.PhotonVisibilityService.NY: 30 -#services.PhotonVisibilityService.NZ: 30 - -#services.PhotonVisibilityService.UseCryoBoundary: true - -# IF UseCryoBoundary is set to false, so use the following parameters. -#services.PhotonVisibilityService.XMin: -2. -#services.PhotonVisibilityService.XMax: 2. -#services.PhotonVisibilityService.YMin: -1. -#services.PhotonVisibilityService.YMax: 1. -#services.PhotonVisibilityService.ZMin: 10. -#services.PhotonVisibilityService.ZMax: 12. - diff --git a/duneopdet/PhotonPropagation/Tutorial/protoDUNE/protodune_optical_tutorial_libanalysis.fcl b/duneopdet/PhotonPropagation/Tutorial/protoDUNE/protodune_optical_tutorial_libanalysis.fcl deleted file mode 100644 index 11a856b6..00000000 --- a/duneopdet/PhotonPropagation/Tutorial/protoDUNE/protodune_optical_tutorial_libanalysis.fcl +++ /dev/null @@ -1,72 +0,0 @@ -#include "services_dune.fcl" -#include "singles.fcl" -#include "largeantmodules.fcl" -#include "detsimmodules.fcl" -#include "opticaldetectormodules.fcl" -#include "photpropservices_dune.fcl" -#include "photpropmodules_dune.fcl" -#include "lightsource.fcl" - - - -process_name: LibraryAnalysis - - -services: -{ - # Load the service that manages root files for histograms. - TFileService: { fileName: "PhotonLibraryFile_protodunetexample_hists.root" } - message: @local::standard_info - @table::protodune_simulation_services -} - - -physics: -{ - - producers: - { - } - - analyzers: - { - libana: @local::dunefd_photonlibraryanalyzer - } - - analyzeIt: [ libana ] - - #trigger_paths is a keyword and contains the paths that modify the art::event, - #ie filters and producers - trigger_paths: [] - - #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: [analyzeIt] -} - -physics.analyzers.libana.each_detector: true - - -# Begin optical specific parts: - -# -# Examine your own library file - need to customize the visibility service -# - -#services.PhotonVisibilityService.LibraryFile: "PhotonLibraryFile_dune35ton.root" - -# Number of voxels -#services.PhotonVisibilityService.NX: 30 -#services.PhotonVisibilityService.NY: 30 -#services.PhotonVisibilityService.NZ: 30 - -#services.PhotonVisibilityService.UseCryoBoundary: true - -# IF UseCryoBoundary is set to false, so use the following parameters. -#services.PhotonVisibilityService.XMin: -2. -#services.PhotonVisibilityService.XMax: 2. -#services.PhotonVisibilityService.YMin: -1. -#services.PhotonVisibilityService.YMax: 1. -#services.PhotonVisibilityService.ZMin: 10. -#services.PhotonVisibilityService.ZMax: 12. -