From c0c7c3fae7c6a940fe07f3a65b02c9ae20006032 Mon Sep 17 00:00:00 2001 From: BrieucF Date: Thu, 26 Oct 2023 11:41:35 +0200 Subject: [PATCH 1/2] Fix configuration after PR#53 in k4RecCalorimeter --- FCCSW_ecal/fcc_ee_upstream_with_clusters.py | 2 +- ...unClueAndTopoAndSlidingWindowAndCaloSim.py | 23 ++++--- FCCSW_ecal/runFullSim.py | 19 +++--- FCCSW_ecal/runSlidingWindowAndCaloSim.py | 19 +++--- .../runTopoAndSlidingWindowAndCaloSim.py | 21 ++++--- FCCSW_ecal/run_all_chain.sh | 62 +++++++++---------- FCCSW_ecal/run_thetamodulemerged.py | 10 +-- .../tau_runTopoAndSlidingWindowAndCaloSim.py | 6 +- 8 files changed, 84 insertions(+), 78 deletions(-) diff --git a/FCCSW_ecal/fcc_ee_upstream_with_clusters.py b/FCCSW_ecal/fcc_ee_upstream_with_clusters.py index 7394828..a8ceb93 100644 --- a/FCCSW_ecal/fcc_ee_upstream_with_clusters.py +++ b/FCCSW_ecal/fcc_ee_upstream_with_clusters.py @@ -142,7 +142,7 @@ from Configurables import CreateCaloCellPositionsFCCee createEcalBarrelPositionedCells = CreateCaloCellPositionsFCCee("ECalBarrelPositionedCells", OutputLevel = INFO) -createEcalBarrelPositionedCells.positionsECalBarrelTool = cellPositionEcalBarrelTool +createEcalBarrelPositionedCells.positionsTool = cellPositionEcalBarrelTool createEcalBarrelPositionedCells.hits.Path = EcalBarrelCellsName createEcalBarrelPositionedCells.positionedHits.Path = "ECalBarrelPositionedCells" diff --git a/FCCSW_ecal/runClueAndTopoAndSlidingWindowAndCaloSim.py b/FCCSW_ecal/runClueAndTopoAndSlidingWindowAndCaloSim.py index 5af9853..bd2b12a 100644 --- a/FCCSW_ecal/runClueAndTopoAndSlidingWindowAndCaloSim.py +++ b/FCCSW_ecal/runClueAndTopoAndSlidingWindowAndCaloSim.py @@ -1,6 +1,8 @@ import os import copy +print('\033[93m'"The CLUE steering file is currently broken and should be updated"'\033[0m') + from GaudiKernel.SystemOfUnits import MeV, GeV, tesla use_pythia = False @@ -89,8 +91,15 @@ #actions.energyCut = 0.2 * GeV #saveHistTool = SimG4SaveParticleHistory("saveHistory") +# Magnetic field +from Configurables import SimG4ConstantMagneticFieldTool +if magneticField == 1: + field = SimG4ConstantMagneticFieldTool("SimG4ConstantMagneticFieldTool", FieldComponentZ = -2 * tesla, FieldOn = True, IntegratorStepper = "ClassicalRK4") +else: + field = SimG4ConstantMagneticFieldTool("SimG4ConstantMagneticFieldTool", FieldOn = False) + from Configurables import SimG4Svc -geantservice = SimG4Svc("SimG4Svc", detector='SimG4DD4hepDetector', physicslist="SimG4FtfpBert", actions=actions) +geantservice = SimG4Svc("SimG4Svc", detector='SimG4DD4hepDetector', physicslist="SimG4FtfpBert", actions=actions, magneticField = field) # Fixed seed to have reproducible results, change it for each job if you split one production into several jobs # Mind that if you leave Gaudi handle random seed and some job start within the same second (very likely) you will have duplicates @@ -100,12 +109,6 @@ # Range cut geantservice.g4PreInitCommands += ["/run/setCut 0.1 mm"] -# Magnetic field -from Configurables import SimG4ConstantMagneticFieldTool -if magneticField == 1: - field = SimG4ConstantMagneticFieldTool("SimG4ConstantMagneticFieldTool", FieldComponentZ=-2*tesla, FieldOn=True,IntegratorStepper="ClassicalRK4") -else: - field = SimG4ConstantMagneticFieldTool("SimG4ConstantMagneticFieldTool",FieldOn=False) # Geant4 algorithm # Translates EDM to G4Event, passes the event to G4, writes out outputs via tools @@ -241,7 +244,7 @@ from Configurables import CreateCaloCellPositionsFCCee createEcalBarrelPositionedCells = CreateCaloCellPositionsFCCee("ECalBarrelPositionedCells", OutputLevel = INFO) -createEcalBarrelPositionedCells.positionsECalBarrelTool = cellPositionEcalBarrelTool +createEcalBarrelPositionedCells.positionsTool = cellPositionEcalBarrelTool createEcalBarrelPositionedCells.hits.Path = EcalBarrelCellsName createEcalBarrelPositionedCells.positionedHits.Path = "ECalBarrelPositionedCells" @@ -309,7 +312,7 @@ createClusters.clusterCells.Path = "CaloClusterCells" createEcalBarrelPositionedCaloClusterCells = CreateCaloCellPositionsFCCee("ECalBarrelPositionedCaloClusterCells", OutputLevel = INFO) -createEcalBarrelPositionedCaloClusterCells.positionsECalBarrelTool = cellPositionEcalBarrelTool +createEcalBarrelPositionedCaloClusterCells.positionsTool = cellPositionEcalBarrelTool createEcalBarrelPositionedCaloClusterCells.hits.Path = "CaloClusterCells" createEcalBarrelPositionedCaloClusterCells.positionedHits.Path = "PositionedCaloClusterCells" @@ -382,7 +385,7 @@ createTopoClusters.clusterCells.Path = "CaloTopoClusterCells" createEcalBarrelPositionedCaloTopoClusterCells = CreateCaloCellPositionsFCCee("ECalBarrelPositionedCaloTopoClusterCells", OutputLevel = INFO) -createEcalBarrelPositionedCaloTopoClusterCells.positionsECalBarrelTool = cellPositionEcalBarrelTool +createEcalBarrelPositionedCaloTopoClusterCells.positionsTool = cellPositionEcalBarrelTool createEcalBarrelPositionedCaloTopoClusterCells.hits.Path = "CaloTopoClusterCells" createEcalBarrelPositionedCaloTopoClusterCells.positionedHits.Path = "PositionedCaloTopoClusterCells" diff --git a/FCCSW_ecal/runFullSim.py b/FCCSW_ecal/runFullSim.py index 6e2c011..6c377cf 100644 --- a/FCCSW_ecal/runFullSim.py +++ b/FCCSW_ecal/runFullSim.py @@ -88,8 +88,15 @@ #actions.energyCut = 0.2 * GeV #saveHistTool = SimG4SaveParticleHistory("saveHistory") +# Magnetic field +from Configurables import SimG4ConstantMagneticFieldTool +if magneticField == 1: + field = SimG4ConstantMagneticFieldTool("SimG4ConstantMagneticFieldTool", FieldComponentZ = -2 * tesla, FieldOn = True, IntegratorStepper = "ClassicalRK4") +else: + field = SimG4ConstantMagneticFieldTool("SimG4ConstantMagneticFieldTool", FieldOn = False) + from Configurables import SimG4Svc -geantservice = SimG4Svc("SimG4Svc", detector='SimG4DD4hepDetector', physicslist="SimG4FtfpBert", actions=actions) +geantservice = SimG4Svc("SimG4Svc", detector = 'SimG4DD4hepDetector', physicslist = "SimG4FtfpBert", actions = actions, magneticField = field) # Fixed seed to have reproducible results, change it for each job if you split one production into several jobs # Mind that if you leave Gaudi handle random seed and some job start within the same second (very likely) you will have duplicates @@ -99,12 +106,6 @@ # Range cut geantservice.g4PreInitCommands += ["/run/setCut 0.1 mm"] -# Magnetic field -from Configurables import SimG4ConstantMagneticFieldTool -if magneticField == 1: - field = SimG4ConstantMagneticFieldTool("SimG4ConstantMagneticFieldTool", FieldComponentZ=-2*tesla, FieldOn=True,IntegratorStepper="ClassicalRK4") -else: - field = SimG4ConstantMagneticFieldTool("SimG4ConstantMagneticFieldTool",FieldOn=False) # Geant4 algorithm # Translates EDM to G4Event, passes the event to G4, writes out outputs via tools @@ -255,7 +256,7 @@ from Configurables import CreateCaloCellPositionsFCCee createEcalBarrelPositionedCells = CreateCaloCellPositionsFCCee("ECalBarrelPositionedCells", OutputLevel = INFO) -createEcalBarrelPositionedCells.positionsECalBarrelTool = cellPositionEcalBarrelTool +createEcalBarrelPositionedCells.positionsTool = cellPositionEcalBarrelTool createEcalBarrelPositionedCells.hits.Path = EcalBarrelCellsName createEcalBarrelPositionedCells.positionedHits.Path = "ECalBarrelPositionedCells" @@ -356,7 +357,7 @@ createClusters.clusterCells.Path = "CaloClusterCells" createEcalBarrelPositionedCaloClusterCells = CreateCaloCellPositionsFCCee("ECalBarrelPositionedCaloClusterCells", OutputLevel = INFO) -createEcalBarrelPositionedCaloClusterCells.positionsECalBarrelTool = cellPositionEcalBarrelTool +createEcalBarrelPositionedCaloClusterCells.positionsTool = cellPositionEcalBarrelTool createEcalBarrelPositionedCaloClusterCells.hits.Path = "CaloClusterCells" createEcalBarrelPositionedCaloClusterCells.positionedHits.Path = "PositionedCaloClusterCells" diff --git a/FCCSW_ecal/runSlidingWindowAndCaloSim.py b/FCCSW_ecal/runSlidingWindowAndCaloSim.py index fe84130..8d6feef 100644 --- a/FCCSW_ecal/runSlidingWindowAndCaloSim.py +++ b/FCCSW_ecal/runSlidingWindowAndCaloSim.py @@ -88,8 +88,15 @@ #actions.energyCut = 0.2 * GeV #saveHistTool = SimG4SaveParticleHistory("saveHistory") +# Magnetic field +from Configurables import SimG4ConstantMagneticFieldTool +if magneticField == 1: + field = SimG4ConstantMagneticFieldTool("SimG4ConstantMagneticFieldTool", FieldComponentZ = -2 * tesla, FieldOn = True, IntegratorStepper = "ClassicalRK4") +else: + field = SimG4ConstantMagneticFieldTool("SimG4ConstantMagneticFieldTool", FieldOn = False) + from Configurables import SimG4Svc -geantservice = SimG4Svc("SimG4Svc", detector='SimG4DD4hepDetector', physicslist="SimG4FtfpBert", actions=actions) +geantservice = SimG4Svc("SimG4Svc", detector='SimG4DD4hepDetector', physicslist="SimG4FtfpBert", actions=actions, magneticField = field) # Fixed seed to have reproducible results, change it for each job if you split one production into several jobs # Mind that if you leave Gaudi handle random seed and some job start within the same second (very likely) you will have duplicates @@ -99,12 +106,6 @@ # Range cut geantservice.g4PreInitCommands += ["/run/setCut 0.1 mm"] -# Magnetic field -from Configurables import SimG4ConstantMagneticFieldTool -if magneticField == 1: - field = SimG4ConstantMagneticFieldTool("SimG4ConstantMagneticFieldTool", FieldComponentZ=-2*tesla, FieldOn=True,IntegratorStepper="ClassicalRK4") -else: - field = SimG4ConstantMagneticFieldTool("SimG4ConstantMagneticFieldTool",FieldOn=False) # Geant4 algorithm # Translates EDM to G4Event, passes the event to G4, writes out outputs via tools @@ -240,7 +241,7 @@ from Configurables import CreateCaloCellPositionsFCCee createEcalBarrelPositionedCells = CreateCaloCellPositionsFCCee("ECalBarrelPositionedCells", OutputLevel = INFO) -createEcalBarrelPositionedCells.positionsECalBarrelTool = cellPositionEcalBarrelTool +createEcalBarrelPositionedCells.positionsTool = cellPositionEcalBarrelTool createEcalBarrelPositionedCells.hits.Path = EcalBarrelCellsName createEcalBarrelPositionedCells.positionedHits.Path = "ECalBarrelPositionedCells" @@ -307,7 +308,7 @@ createClusters.clusterCells.Path = "CaloClusterCells" createEcalBarrelPositionedCaloClusterCells = CreateCaloCellPositionsFCCee("ECalBarrelPositionedCaloClusterCells", OutputLevel = INFO) -createEcalBarrelPositionedCaloClusterCells.positionsECalBarrelTool = cellPositionEcalBarrelTool +createEcalBarrelPositionedCaloClusterCells.positionsTool = cellPositionEcalBarrelTool createEcalBarrelPositionedCaloClusterCells.hits.Path = "CaloClusterCells" createEcalBarrelPositionedCaloClusterCells.positionedHits.Path = "PositionedCaloClusterCells" diff --git a/FCCSW_ecal/runTopoAndSlidingWindowAndCaloSim.py b/FCCSW_ecal/runTopoAndSlidingWindowAndCaloSim.py index a4f3ba2..51df389 100644 --- a/FCCSW_ecal/runTopoAndSlidingWindowAndCaloSim.py +++ b/FCCSW_ecal/runTopoAndSlidingWindowAndCaloSim.py @@ -89,8 +89,15 @@ #actions.energyCut = 0.2 * GeV #saveHistTool = SimG4SaveParticleHistory("saveHistory") +# Magnetic field +from Configurables import SimG4ConstantMagneticFieldTool +if magneticField == 1: + field = SimG4ConstantMagneticFieldTool("SimG4ConstantMagneticFieldTool", FieldComponentZ = -2 * tesla, FieldOn = True, IntegratorStepper = "ClassicalRK4") +else: + field = SimG4ConstantMagneticFieldTool("SimG4ConstantMagneticFieldTool", FieldOn = False) + from Configurables import SimG4Svc -geantservice = SimG4Svc("SimG4Svc", detector='SimG4DD4hepDetector', physicslist="SimG4FtfpBert", actions=actions) +geantservice = SimG4Svc("SimG4Svc", detector='SimG4DD4hepDetector', physicslist="SimG4FtfpBert", actions=actions, magneticField = field) # Fixed seed to have reproducible results, change it for each job if you split one production into several jobs # Mind that if you leave Gaudi handle random seed and some job start within the same second (very likely) you will have duplicates @@ -100,12 +107,6 @@ # Range cut geantservice.g4PreInitCommands += ["/run/setCut 0.1 mm"] -# Magnetic field -from Configurables import SimG4ConstantMagneticFieldTool -if magneticField == 1: - field = SimG4ConstantMagneticFieldTool("SimG4ConstantMagneticFieldTool", FieldComponentZ=-2*tesla, FieldOn=True,IntegratorStepper="ClassicalRK4") -else: - field = SimG4ConstantMagneticFieldTool("SimG4ConstantMagneticFieldTool",FieldOn=False) # Geant4 algorithm # Translates EDM to G4Event, passes the event to G4, writes out outputs via tools @@ -252,7 +253,7 @@ from Configurables import CreateCaloCellPositionsFCCee createEcalBarrelPositionedCells = CreateCaloCellPositionsFCCee("ECalBarrelPositionedCells", OutputLevel = INFO) -createEcalBarrelPositionedCells.positionsECalBarrelTool = cellPositionEcalBarrelTool +createEcalBarrelPositionedCells.positionsTool = cellPositionEcalBarrelTool createEcalBarrelPositionedCells.hits.Path = EcalBarrelCellsName createEcalBarrelPositionedCells.positionedHits.Path = "ECalBarrelPositionedCells" @@ -337,7 +338,7 @@ createClusters.clusterCells.Path = "CaloClusterCells" createEcalBarrelPositionedCaloClusterCells = CreateCaloCellPositionsFCCee("ECalBarrelPositionedCaloClusterCells", OutputLevel = INFO) -createEcalBarrelPositionedCaloClusterCells.positionsECalBarrelTool = cellPositionEcalBarrelTool +createEcalBarrelPositionedCaloClusterCells.positionsTool = cellPositionEcalBarrelTool createEcalBarrelPositionedCaloClusterCells.hits.Path = "CaloClusterCells" createEcalBarrelPositionedCaloClusterCells.positionedHits.Path = "PositionedCaloClusterCells" @@ -408,7 +409,7 @@ createTopoClusters.clusterCells.Path = "CaloTopoClusterCells" createEcalBarrelPositionedCaloTopoClusterCells = CreateCaloCellPositionsFCCee("ECalBarrelPositionedCaloTopoClusterCells", OutputLevel = INFO) -createEcalBarrelPositionedCaloTopoClusterCells.positionsECalBarrelTool = cellPositionEcalBarrelTool +createEcalBarrelPositionedCaloTopoClusterCells.positionsTool = cellPositionEcalBarrelTool createEcalBarrelPositionedCaloTopoClusterCells.hits.Path = "CaloTopoClusterCells" createEcalBarrelPositionedCaloTopoClusterCells.positionedHits.Path = "PositionedCaloTopoClusterCells" diff --git a/FCCSW_ecal/run_all_chain.sh b/FCCSW_ecal/run_all_chain.sh index 1baee3d..17f7f55 100755 --- a/FCCSW_ecal/run_all_chain.sh +++ b/FCCSW_ecal/run_all_chain.sh @@ -7,40 +7,40 @@ runname="baseline_LAr_noNoise_1_bugfix/" python write_calibration_xml.py ../../FCCDetectors/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel.xml # Compute the X0 plot -cd ../geometry -fccrun material_scan.py -python material_plot.py -cd ../FCCSW_ecal/ +#cd ../geometry +#fccrun material_scan.py +#python material_plot.py +#cd ../FCCSW_ecal/ # Archive the files -mkdir -vp $runname/geometry -cp ../../FCCDetectors/Detector/DetFCCeeECalInclined/compact/*.xml $runname/geometry -cp ../geometry/*png $runname/geometry -cp ../geometry/*pdf $runname/geometry +#mkdir -vp $runname/geometry +#cp ../../FCCDetectors/Detector/DetFCCeeECalInclined/compact/*.xml $runname/geometry +#cp ../geometry/*png $runname/geometry +#cp ../geometry/*pdf $runname/geometry # Compute sampling fractions -python runParallel.py --outDir $runname/sampling --nEvt 1000 --energies 20000 --sampling +#python runParallel.py --outDir $runname/sampling --nEvt 1000 --energies 10000 --sampling -# Compute upstream corrections +## Compute upstream corrections python runParallel.py --outDir $runname/upstream --nEvt 1000 --energies 1000 5000 10000 15000 20000 30000 50000 75000 100000 --upstream --SF $runname/sampling/SF.json - -# Generate clusters for upstream studies -#python runParallel.py --outDir $runname/upstreamProd --nEvt 1000000 --upstreamProd --SF $runname/sampling/SF.json - -# Generate clusters for MVA training -# Only 300k events here. Move up to 3M if needed -python runParallel.py --outDir $runname/production --nEvt 300000 --production --SF $runname/sampling/SF.json --corrections $runname/upstream/corr_params_1d.json - -# Then train the MVA on CaloClusters and CaloTopoClusters -python training.py CaloClusters -i $runname/production/ --json $runname/upstream/corr_params_1d.json -o $runname/training_calo.json -python training.py CaloTopoClusters -i $runname/production/ --json $runname/upstream/corr_params_1d.json -o $runname/training_topo.json - -# Run clustering algs to compute resolutions -python runParallel.py --outDir $runname/clusters --nEvt 1000 --energies 500 1000 5000 10000 15000 20000 30000 50000 75000 100000 --clusters --SF $runname/sampling/SF.json --corrections $runname/upstream/corr_params_1d.json - -# Compute resolutions and responses -python compute_resolutions.py --inputDir $runname/clusters --outFile $runname/results.csv --clusters CaloClusters CorrectedCaloClusters CaloTopoClusters CorrectedCaloTopoClusters --MVAcalibCalo $runname/training_calo.json --MVAcalibTopo $runname/training_topo.json - -# And make plots -python plot_resolutions.py --outDir $runname --doFits plot $runname/results.csv --all -python plot_resolutions.py --outDir $runname --doFits compare clusters CaloClusters CorrectedCaloClusters CaloTopoClusters CorrectedCaloTopoClusters CalibratedCaloClusters CalibratedCaloTopoClusters $runname/results.csv --all +# +## Generate clusters for upstream studies +##python runParallel.py --outDir $runname/upstreamProd --nEvt 1000000 --upstreamProd --SF $runname/sampling/SF.json +# +## Generate clusters for MVA training +## Only 300k events here. Move up to 3M if needed +#python runParallel.py --outDir $runname/production --nEvt 300000 --production --SF $runname/sampling/SF.json --corrections $runname/upstream/corr_params_1d.json +# +## Then train the MVA on CaloClusters and CaloTopoClusters +#python training.py CaloClusters -i $runname/production/ --json $runname/upstream/corr_params_1d.json -o $runname/training_calo.json +#python training.py CaloTopoClusters -i $runname/production/ --json $runname/upstream/corr_params_1d.json -o $runname/training_topo.json +# +## Run clustering algs to compute resolutions +#python runParallel.py --outDir $runname/clusters --nEvt 1000 --energies 500 1000 5000 10000 15000 20000 30000 50000 75000 100000 --clusters --SF $runname/sampling/SF.json --corrections $runname/upstream/corr_params_1d.json +# +## Compute resolutions and responses +#python compute_resolutions.py --inputDir $runname/clusters --outFile $runname/results.csv --clusters CaloClusters CorrectedCaloClusters CaloTopoClusters CorrectedCaloTopoClusters --MVAcalibCalo $runname/training_calo.json --MVAcalibTopo $runname/training_topo.json +# +## And make plots +#python plot_resolutions.py --outDir $runname --doFits plot $runname/results.csv --all +#python plot_resolutions.py --outDir $runname --doFits compare clusters CaloClusters CorrectedCaloClusters CaloTopoClusters CorrectedCaloTopoClusters CalibratedCaloClusters CalibratedCaloTopoClusters $runname/results.csv --all diff --git a/FCCSW_ecal/run_thetamodulemerged.py b/FCCSW_ecal/run_thetamodulemerged.py index 914cb9d..8ad180e 100644 --- a/FCCSW_ecal/run_thetamodulemerged.py +++ b/FCCSW_ecal/run_thetamodulemerged.py @@ -296,7 +296,7 @@ "ECalBarrelPositionedCells", OutputLevel = INFO ) -createEcalBarrelPositionedCells.positionsECalBarrelTool = cellPositionEcalBarrelTool +createEcalBarrelPositionedCells.positionsTool = cellPositionEcalBarrelTool createEcalBarrelPositionedCells.hits.Path = EcalBarrelCellsName createEcalBarrelPositionedCells.positionedHits.Path = "ECalBarrelPositionedCells" @@ -309,7 +309,7 @@ "ECalBarrelPositionedCells2", OutputLevel = INFO ) -createEcalBarrelPositionedCells2.positionsECalBarrelTool = cellPositionEcalBarrelTool2 +createEcalBarrelPositionedCells2.positionsTool = cellPositionEcalBarrelTool2 createEcalBarrelPositionedCells2.hits.Path = EcalBarrelCellsName2 createEcalBarrelPositionedCells2.positionedHits.Path = "ECalBarrelPositionedCells2" @@ -402,7 +402,7 @@ "ECalBarrelPositionedCaloClusterCells", OutputLevel = INFO ) -createEcalBarrelPositionedCaloClusterCells.positionsECalBarrelTool = cellPositionEcalBarrelTool +createEcalBarrelPositionedCaloClusterCells.positionsTool = cellPositionEcalBarrelTool createEcalBarrelPositionedCaloClusterCells.hits.Path = "CaloClusterCells" createEcalBarrelPositionedCaloClusterCells.positionedHits.Path = "PositionedCaloClusterCells" @@ -484,8 +484,8 @@ "ECalBarrelPositionedCaloTopoClusterCells", OutputLevel = INFO ) -#createEcalBarrelPositionedCaloTopoClusterCells.positionsECalBarrelTool = cellPositionEcalBarrelTool2 -createEcalBarrelPositionedCaloTopoClusterCells.positionsECalBarrelTool = cellPositionEcalBarrelTool +#createEcalBarrelPositionedCaloTopoClusterCells.positionsTool = cellPositionEcalBarrelTool2 +createEcalBarrelPositionedCaloTopoClusterCells.positionsTool = cellPositionEcalBarrelTool createEcalBarrelPositionedCaloTopoClusterCells.hits.Path = "CaloTopoClusterCells" createEcalBarrelPositionedCaloTopoClusterCells.positionedHits.Path = "PositionedCaloTopoClusterCells" diff --git a/FCCSW_ecal/tau_runTopoAndSlidingWindowAndCaloSim.py b/FCCSW_ecal/tau_runTopoAndSlidingWindowAndCaloSim.py index 38c7894..340fdc5 100644 --- a/FCCSW_ecal/tau_runTopoAndSlidingWindowAndCaloSim.py +++ b/FCCSW_ecal/tau_runTopoAndSlidingWindowAndCaloSim.py @@ -249,7 +249,7 @@ from Configurables import CreateCaloCellPositionsFCCee createEcalBarrelPositionedCells = CreateCaloCellPositionsFCCee("ECalBarrelPositionedCells", OutputLevel = INFO) -createEcalBarrelPositionedCells.positionsECalBarrelTool = cellPositionEcalBarrelTool +createEcalBarrelPositionedCells.positionsTool = cellPositionEcalBarrelTool createEcalBarrelPositionedCells.hits.Path = EcalBarrelCellsName createEcalBarrelPositionedCells.positionedHits.Path = "ECalBarrelPositionedCells" @@ -317,7 +317,7 @@ createClusters.clusterCells.Path = "CaloClusterCells" createEcalBarrelPositionedCaloClusterCells = CreateCaloCellPositionsFCCee("ECalBarrelPositionedCaloClusterCells", OutputLevel = INFO) -createEcalBarrelPositionedCaloClusterCells.positionsECalBarrelTool = cellPositionEcalBarrelTool +createEcalBarrelPositionedCaloClusterCells.positionsTool = cellPositionEcalBarrelTool createEcalBarrelPositionedCaloClusterCells.hits.Path = "CaloClusterCells" createEcalBarrelPositionedCaloClusterCells.positionedHits.Path = "PositionedCaloClusterCells" @@ -389,7 +389,7 @@ createTopoClusters.clusterCells.Path = "CaloTopoClusterCells" createEcalBarrelPositionedCaloTopoClusterCells = CreateCaloCellPositionsFCCee("ECalBarrelPositionedCaloTopoClusterCells", OutputLevel = INFO) -createEcalBarrelPositionedCaloTopoClusterCells.positionsECalBarrelTool = cellPositionEcalBarrelTool +createEcalBarrelPositionedCaloTopoClusterCells.positionsTool = cellPositionEcalBarrelTool createEcalBarrelPositionedCaloTopoClusterCells.hits.Path = "CaloTopoClusterCells" createEcalBarrelPositionedCaloTopoClusterCells.positionedHits.Path = "PositionedCaloTopoClusterCells" From 930466c1e6cafc94e6ef9a929620864f08025717 Mon Sep 17 00:00:00 2001 From: BrieucF Date: Thu, 26 Oct 2023 11:44:08 +0200 Subject: [PATCH 2/2] Revert unintended changes in run_all_chain.sh --- FCCSW_ecal/run_all_chain.sh | 62 ++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/FCCSW_ecal/run_all_chain.sh b/FCCSW_ecal/run_all_chain.sh index 17f7f55..1baee3d 100755 --- a/FCCSW_ecal/run_all_chain.sh +++ b/FCCSW_ecal/run_all_chain.sh @@ -7,40 +7,40 @@ runname="baseline_LAr_noNoise_1_bugfix/" python write_calibration_xml.py ../../FCCDetectors/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel.xml # Compute the X0 plot -#cd ../geometry -#fccrun material_scan.py -#python material_plot.py -#cd ../FCCSW_ecal/ +cd ../geometry +fccrun material_scan.py +python material_plot.py +cd ../FCCSW_ecal/ # Archive the files -#mkdir -vp $runname/geometry -#cp ../../FCCDetectors/Detector/DetFCCeeECalInclined/compact/*.xml $runname/geometry -#cp ../geometry/*png $runname/geometry -#cp ../geometry/*pdf $runname/geometry +mkdir -vp $runname/geometry +cp ../../FCCDetectors/Detector/DetFCCeeECalInclined/compact/*.xml $runname/geometry +cp ../geometry/*png $runname/geometry +cp ../geometry/*pdf $runname/geometry # Compute sampling fractions -#python runParallel.py --outDir $runname/sampling --nEvt 1000 --energies 10000 --sampling +python runParallel.py --outDir $runname/sampling --nEvt 1000 --energies 20000 --sampling -## Compute upstream corrections +# Compute upstream corrections python runParallel.py --outDir $runname/upstream --nEvt 1000 --energies 1000 5000 10000 15000 20000 30000 50000 75000 100000 --upstream --SF $runname/sampling/SF.json -# -## Generate clusters for upstream studies -##python runParallel.py --outDir $runname/upstreamProd --nEvt 1000000 --upstreamProd --SF $runname/sampling/SF.json -# -## Generate clusters for MVA training -## Only 300k events here. Move up to 3M if needed -#python runParallel.py --outDir $runname/production --nEvt 300000 --production --SF $runname/sampling/SF.json --corrections $runname/upstream/corr_params_1d.json -# -## Then train the MVA on CaloClusters and CaloTopoClusters -#python training.py CaloClusters -i $runname/production/ --json $runname/upstream/corr_params_1d.json -o $runname/training_calo.json -#python training.py CaloTopoClusters -i $runname/production/ --json $runname/upstream/corr_params_1d.json -o $runname/training_topo.json -# -## Run clustering algs to compute resolutions -#python runParallel.py --outDir $runname/clusters --nEvt 1000 --energies 500 1000 5000 10000 15000 20000 30000 50000 75000 100000 --clusters --SF $runname/sampling/SF.json --corrections $runname/upstream/corr_params_1d.json -# -## Compute resolutions and responses -#python compute_resolutions.py --inputDir $runname/clusters --outFile $runname/results.csv --clusters CaloClusters CorrectedCaloClusters CaloTopoClusters CorrectedCaloTopoClusters --MVAcalibCalo $runname/training_calo.json --MVAcalibTopo $runname/training_topo.json -# -## And make plots -#python plot_resolutions.py --outDir $runname --doFits plot $runname/results.csv --all -#python plot_resolutions.py --outDir $runname --doFits compare clusters CaloClusters CorrectedCaloClusters CaloTopoClusters CorrectedCaloTopoClusters CalibratedCaloClusters CalibratedCaloTopoClusters $runname/results.csv --all + +# Generate clusters for upstream studies +#python runParallel.py --outDir $runname/upstreamProd --nEvt 1000000 --upstreamProd --SF $runname/sampling/SF.json + +# Generate clusters for MVA training +# Only 300k events here. Move up to 3M if needed +python runParallel.py --outDir $runname/production --nEvt 300000 --production --SF $runname/sampling/SF.json --corrections $runname/upstream/corr_params_1d.json + +# Then train the MVA on CaloClusters and CaloTopoClusters +python training.py CaloClusters -i $runname/production/ --json $runname/upstream/corr_params_1d.json -o $runname/training_calo.json +python training.py CaloTopoClusters -i $runname/production/ --json $runname/upstream/corr_params_1d.json -o $runname/training_topo.json + +# Run clustering algs to compute resolutions +python runParallel.py --outDir $runname/clusters --nEvt 1000 --energies 500 1000 5000 10000 15000 20000 30000 50000 75000 100000 --clusters --SF $runname/sampling/SF.json --corrections $runname/upstream/corr_params_1d.json + +# Compute resolutions and responses +python compute_resolutions.py --inputDir $runname/clusters --outFile $runname/results.csv --clusters CaloClusters CorrectedCaloClusters CaloTopoClusters CorrectedCaloTopoClusters --MVAcalibCalo $runname/training_calo.json --MVAcalibTopo $runname/training_topo.json + +# And make plots +python plot_resolutions.py --outDir $runname --doFits plot $runname/results.csv --all +python plot_resolutions.py --outDir $runname --doFits compare clusters CaloClusters CorrectedCaloClusters CaloTopoClusters CorrectedCaloTopoClusters CalibratedCaloClusters CalibratedCaloTopoClusters $runname/results.csv --all