Skip to content

Commit

Permalink
Merge branch 'develop' into jsoto_pdhdworkflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Jose Soto committed Oct 21, 2024
2 parents 208166c + ba27ced commit 583ff12
Show file tree
Hide file tree
Showing 5 changed files with 208 additions and 80 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ cmake_minimum_required (VERSION 3.20 FATAL_ERROR)

find_package(cetmodules REQUIRED)
project(dunesw LANGUAGES CXX)
set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 09.92.00d00)
set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 10.00.02d00)

include(CetCMakeEnv)
cet_cmake_env()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,29 +1,27 @@
#include "services_refactored_pdune.fcl"
#include "caldata_dune.fcl"
#include "wirecell_dune.fcl"
#include "hitfindermodules_dune.fcl"
#include "SpacePointSolver_dune.fcl"
#include "cluster_dune.fcl"
#include "trackfindermodules_dune.fcl"
#include "pandoramodules_dune.fcl"
#include "calorimetry_pdune.fcl"
#include "calibration_dune10kt.fcl"
#include "featurelabelingmodules.fcl"
#include "particleid.fcl"
#include "mctrutht0matching.fcl"
#include "t0reco.fcl"
#include "opticaldetectormodules_dune.fcl"
#include "Deconvolution.fcl"
#include "OpHitFinderDeco.fcl"
#include "showerfindermodules_dune.fcl"
#include "emshower3d.fcl"
#include "ProtoDUNETriggerFilter.fcl"
#include "OpSlicer.fcl"

#include "t0reco.fcl"
#include "pandoramodules_dune.fcl"
#include "wirecell_dune.fcl"
#include "particleid.fcl"

#include "CRT.fcl"
#include "T0RecoAnodePiercers.fcl"
#
#include "numberofhitsfilter.fcl"
#include "protodune_tools_dune.fcl"
#include "tools_dune.fcl"
#include "SpacePointSolver_dune.fcl"
#include "featurelabelingmodules.fcl"
#include "calorimetry_pdune.fcl"
#include "calibration_dune.fcl"
#include "hitfindermodules_dune.fcl"
#include "PDHDFEMBFilter.fcl"

#include "services_dune.fcl"
#include "spacecharge_dune.fcl"
#include "dune_calibanatree.fcl"

process_name: Reco

Expand All @@ -36,19 +34,31 @@ services:
RandomNumberGenerator: {} #ART native random number generator
message: @local::dune_message_services_prod
FileCatalogMetadata: @local::art_file_catalog_mc
@table::protodunehd_reco_services
#@table::protodunehd_reco_services
ChannelStatusService: @local::dunefd_channel_status
ExptGeoHelperInterface: @local::dune_geometry_helper
GeometryConfigurationWriter: {}
Geometry: @local::protodunehdv6_geo
DetectorClocksService: @local::protodunehd_detectorclocks
DetectorPropertiesService: @local::protodunehd_detproperties
LArPropertiesService: @local::dunefd_properties
LArFFT: @local::dunefd_larfft
DatabaseUtil: @local::dunefd_database
BackTrackerService: @local::pdsp_backtrackerservice
ParticleInventoryService: @local::dunefd_particleinventoryservice
PhotonBackTrackerService: @local::dunefd_photonbacktrackerservice_legacy
SpaceCharge: @local::pdhd_spacecharge


IFDH: {}


}


#BackTracker Module labels
services.BackTrackerService.BackTracker.G4ModuleLabel: "largeant"
services.BackTrackerService.BackTracker.SimChannelModuleLabel: "tpcrawdecoder:simpleSC"
#services.DetectorPropertiesService: @local::protodunesp_detproperties
#services.DetectorPropertiesService.GetHVDriftfromSamweb: false
#services.DetectorPropertiesService.GetReadOutWindowSizefromSamweb: false
#services.DetectorPropertiesService.UseRunDependentTemperature: false
services.RawDigitPrepService.ToolNames: @local::pdsim_dataprep_tools_wirecell

#source is now a root file

Expand All @@ -66,37 +76,38 @@ source:

physics: {
filters: {
trigfilter: @local::pdsp_trigfilter_all
nhitsfilter: @local::standard_numberofhitsfilter
nhitsfilter: @local::pdhd_nhitsfilter
}

producers: {
# TPC wire signals
#caldata: @local::producer_adcprep_notool
# WireCell
#wclsdatahd: @local::protodunehddata_wctsp
wclsdatahd: @local::protodunehd_nfsp
# Hit finder
gaushit: @local::protodunespmc_gaushitfinder
# space point solver
reco3d: @local::pdhd_data_spacepointsolver
reco3d: @local::pdhd_mc_spacepointsolver
# actual disambiguation
hitpdune: @local::pdune_disambigfromsp
# event feature labeling
emtrkmichelid: @local::protodune_emtrkmichelid
emtrkmichelid: @local::pdhd_mc_emtrkmichelid
# reconstruction using disambiguated hits
pandora: @local::protodunehd_pandora
pandoraWriter: @local::dune_pandorawriter
pandoraTrack: @local::dune_pandoraTrackCreation
pandoraShower: @local::dune_pandoraShowerCreation
pandoracalo: @local::pdhd_calomcnosce

## Standard/Old PDSP style Calorimetry
pandoracalo: @local::pdhd_calomcsce
pandoracalonosce: @local::pdhd_calomcnosce
pandorapid: @local::standard_chi2pid
# pandoracali: @local::protodunespmcnosce_calibrationdedx
# pandoracalipid: @local::standard_chi2pid
pandoraShowercalo: @local::pdhd_showercalomcnosce
pandoraShowercalo: @local::pdhd_showercalomcsce
pandoraShowercalonosce: @local::pdhd_showercalomcnosce

## Gnocchi Calorimetry

# CRT Reconstruction
crtreco: @local::TwoCRTMatching_producer
crttag: @local::SingleCRTMatching_producer

#photon detector reconstruction
opdec: @local::dune_deconvolution
ophitspe: @local::dune_ophit_finder_deco
Expand All @@ -106,26 +117,19 @@ physics: {
crtreco: @local::TwoCRTMatching_producer
crttag: @local::SingleCRTMatching_producer

#Anode piercing tracks t0 reconstruction
anodepiercerst0: @local::T0RecoAnodePiercers

##Producers for forcing pandora to create track or shower objects
##for each PFParticle
pandora2Track: @local::dune_pandoraTrackCreation
pandora2calo: @local::pdhd_showercalomcnosce
pandora2calonosce: @local::pdhd_showercalomcnosce
#pandora2pid: @local::standard_chi2pid
#pandora2cali: @local::protodunespmcnosce_calibrationdedx
#pandora2calipid: @local::standard_chi2pid
pandora2calo: @local::pdhd_allTrack_calomcsce
pandora2calonosce: @local::pdhd_allTrack_calomcnosce
pandora2Shower: @local::dune_pandoraShowerCreation
pandora2Showercalo: @local::pdune_sp_allshowercalomcnosce
pandora2Showercalonosce: @local::pdune_sp_allshowercalomcnosce

##Turn off SCE here, we'll have a dedicated fcl for it on
pandoraGnocchicalo: @local::pdhd_gnocchi_calomcnosce
pandora2Gnocchicalo: @local::pdhd_gnocchi_calomcnosce
pandoraGnocchicalonosce: @local::pdhd_gnocchi_calomcnosce
pandora2Gnocchicalonosce: @local::pdhd_gnocchi_calomcnosce
pandora2Showercalo: @local::pdhd_allShower_calomcsce
pandora2Showercalonosce: @local::pdhd_allShower_calomcnosce

pandoraGnocchicalo: @local::pdhd_gnocchi_calomc_nosce
pandora2Gnocchicalo: @local::pdhd_gnocchi_calomc_nosce
pandoraGnocchicalonosce: @local::pdhd_gnocchi_calomc_nosce
pandora2Gnocchicalonosce: @local::pdhd_gnocchi_calomc_nosce
}
#define the producer and filter modules for this path, order matters,
#filters reject all following items. see lines starting physics.producers below
Expand All @@ -152,25 +156,23 @@ reco: [ opdec,
emtrkmichelid,
crttag,
crtreco,
#anodepiercerst0,
pandora2Track,
pandora2calo,
pandora2calonosce,
pandora2Gnocchicalo,
pandora2Gnocchicalonosce,
#pandora2pid,
pandora2Shower,
pandora2Showercalo,
pandora2Showercalonosce
]
#define the output stream, there could be more than one if using filters
stream1: [ out1 ]
output: [ out1 ]
#trigger_paths is a keyword and contains the paths that modify the art::event,
#ie filters and producers
trigger_paths: [reco]
#end_paths is a keyword and contains the paths that do not modify the art::Event,
#ie analyzers and output streams. these all run simultaneously
end_paths: [stream1]
end_paths: [output]
}
#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]}
Expand All @@ -194,7 +196,6 @@ outputs:
}

physics.producers.gaushit.CalDataModuleLabel: "wclsdatahd:gauss"
#physics.producers.emtrkmichelid.WireLabel: "wclsdatahd:gauss"
physics.producers.pandora.HitFinderModuleLabel: "hitpdune"
physics.producers.pandora.GeantModuleLabel: "tpcrawdecoder:simpleSC"
physics.producers.pandoraWriter.GeantModuleLabel: "tpcrawdecoder:simpleSC"
Expand All @@ -206,28 +207,27 @@ physics.producers.pandorapid.CalorimetryModuleLabel: "pandoracalo"
physics.producers.pandorapid.TrackModuleLabel: "pandoraTrack"

##Optical detector configuration
physics.producers.ophit.InputModule: "opdigi"
physics.producers.opflash.InputModule: "ophitspe"
physics.producers.opslicer.OpHitModuleLabel: "ophitspe"
physics.producers.opdec.InputModule: "opdigi"
physics.producers.opdec.InstanceName: "daq"
physics.producers.ophitspe.InputModuledigi: "opdigi:daq" ##TODO check this
physics.producers.opflash.InputModule: "ophitspe"
physics.producers.opslicer.OpHitModuleLabel: "ophitspe"



# Use channel map service for data
#services.PdspChannelMapService: @local::pdspchannelmap
services.WireReadout.WireReadoutClass: "DuneApaWireReadout"
#Forcing Pandora to create either all tracks or all showers on each PFParticle object
physics.producers.pandora2Track.PFParticleLabel: "pandora"
physics.producers.pandora2Track.UseAllParticles: true
####The above line forces pandora to fit a track to all PFParticles
physics.producers.pandora2pid.CalorimetryModuleLabel: "pandora2calo"
physics.producers.pandora2pid.TrackModuleLabel: "pandora2Track"
physics.producers.pandora2Shower.PFParticleLabel: "pandora"
physics.producers.pandora2Shower.UseAllParticles: true

physics.producers.pandora2Showercalo.ShowerTag: "pandora2Shower"
physics.producers.pandora2Showercalonosce.ShowerTag: "pandora2Shower"
physics.producers.pandora2calo.TrackModuleLabel: "pandora2Track"
physics.producers.pandora2calonosce.TrackModuleLabel: "pandora2Track"

physics.producers.pandora2Gnocchicalo.TrackModuleLabel: "pandora2Track"
physics.producers.pandora2Gnocchicalo.AssocHitModuleLabel: "pandora2Track"
physics.producers.pandora2Gnocchicalonosce.TrackModuleLabel: "pandora2Track"
physics.producers.pandora2Gnocchicalonosce.AssocHitModuleLabel: "pandora2Track"
#physics.producers.pandora2Showercalo.ShowerTag: "pandora2Shower"
#physics.producers.pandora2Showercalonosce.ShowerTag: "pandora2Shower"
#physics.producers.pandora2calo.TrackModuleLabel: "pandora2Track"
#physics.producers.pandora2calonosce.TrackModuleLabel: "pandora2Track"
#
#physics.producers.pandora2Gnocchicalo.TrackModuleLabel: "pandora2Track"
#physics.producers.pandora2Gnocchicalo.AssocHitModuleLabel: "pandora2Track"
#physics.producers.pandora2Gnocchicalonosce.TrackModuleLabel: "pandora2Track"
#physics.producers.pandora2Gnocchicalonosce.AssocHitModuleLabel: "pandora2Track"
18 changes: 18 additions & 0 deletions fcl/protodunehd/reco/standard_reco_stage1_protodunehd_MC.fcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#include "standard_reco_protodunehd.fcl"

#make sure only one WCTK is here -- not sure this part is necessary
#or if only one can be in the produce list
physics.producers.wclsdatahd: @erase
physics.producers.wclsdatahdfilter: @local::protodunehd_nf

physics.reco: [
wclsdatahdfilter #new to output raw digits from Wirecell
]

#don't need a timestamp here -- only intermittent
outputs.out1.fileName: "%ifb_reco_stage1.root"
outputs.out1.outputCommands: [ "keep *", "drop *_*_*_Reco"]
process_name: pdhdrecostage1

physics.producers.wclsdatahdfilter.wcls_main.loglevels: @erase
physics.producers.wclsdatahdfilter.wcls_main.logsinks: @erase
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
#include "dune_calibanatree.fcl"
#include "standard_reco_protodunehd.fcl"

#### NOTE -- analyzer modules are instantiated in the included fcl

#make sure only one WCTK is here -- not sure this part is necessary
#or if only one can be in the produce list
#physics.filters.fembfilter.LogLevel: 1
physics.producers.wclsdatahd: @local::protodunehd_sp #Signal processing
physics.produce: [
wclsdatahd,
gaushit,
nhitsfilter,
reco3d,
hitpdune,
pandora, pandoraWriter, pandoraTrack, pandoraShower, pandoracalo, pandoracalonosce,
pandoraShowercalo, pandoraShowercalonosce,
pandoraGnocchiCalo,
pandoraGnocchiCalonosce,
emtrkmichelid,
opdec,
ophitspe,
opflash,
opslicer,
crtreco, crttag,
pandora2Track,
pandora2calo,
pandora2calonosce,
pandora2Gnocchicalo,
pandora2Gnocchicalonosce,
pandora2Shower,
pandora2Showercalo,
pandora2Showercalonosce
]

### FOR TESTING
#physics.ana: []
#physics.end_paths: [output]

services.TFileService: {fileName: "%ifb_%tc_hists.root" }

physics.analyzers: {


### For first pass of keepup production, keep SCE corrections Off.
### We won't understand the corrections yet, so don't bias the calo/calibration
michelremoving: {
module_type: "michelremoving"
TrackModuleLabel: "pandoraTrack"
CalorimetryModuleLabel: "pandoracalonosce"
HitsModuleLabel: "hitpdune"
SaveTrackInfo: true
MaxZ: 410.
}

michelremovinggnocchi: {
module_type: "michelremoving"
TrackModuleLabel: "pandoraTrack"
CalorimetryModuleLabel: "pandoraGnocchiCalonosce" ##This will have
HitsModuleLabel: "hitpdune"
SaveTrackInfo: true
MaxZ: 410.
}

calibana: @local::pdhd_calibana_mc
calibanagnocchi: @local::pdhd_calibana_mc
}

##Just doing gnocchi now
physics.ana: [michelremoving, michelremovinggnocchi, calibanagnocchi]
physics.end_paths: [output, ana]


#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: "%ifb_stage2_calibration.root"
dataTier: "full-reconstructed"
compressionLevel: 1 #zlib argument (0-9)
fastCloning: true
#basketSize: 8192 #[Byte] buffer size at 8k
#splitLevel: 0 #reduces number of buffers
#treeMaxVirtualSize: 1 #[Byte] limits number of buffers/branch to 1 (default is 10)
}
}

physics.analyzers.calibanagnocchi.RawDigitproducers: [
"wclsdatahdfilter:raw"
]

outputs.out1.fileName: "%ifb_reco_stage2_%tc.root"

#have to make this intake a root file now
source:
{
module_type: RootInput
maxEvents: 30000
fileNames: ["reco_stage2_protodunehd.root"]
}

outputs.out1.outputCommands: [ "keep *", "drop raw::RawDigit*_*_*_*", "drop recob::Wire*_*_wiener_*"]
process_name: pdhdrecostage2
physics.filters.nhitsfilter.Verbose: true
physics.producers.opdec.InstanceName: ""
physics.producers.ophitspe.InputModuledigi: "opdigi"
Loading

0 comments on commit 583ff12

Please sign in to comment.