From bfe1097a7f03be8d4dce7d520603a4acb6961024 Mon Sep 17 00:00:00 2001 From: Leonhard Reichenbach Date: Wed, 18 Oct 2023 17:06:13 +0200 Subject: [PATCH] pre-commit run -a --- .github/PULL_REQUEST_TEMPLATE | 2 +- .github/workflows/test.yml | 2 +- CLDConfig/CLDReconstruction.py | 18 +++ CLDConfig/CLDReconstruction.xml | 46 +++++--- .../PandoraSettingsPhotonTraining.xml | 19 ++++ .../PandoraLikelihoodData9EBin.xml | 18 +++ ...LikelihoodData9EBin_400nsCalTimeWindow.xml | 18 +++ .../PandoraSettingsDefault.xml | 19 ++++ ...doraSettingsDefault_400nsCalTimeWindow.xml | 19 ++++ CLDConfig/cld_steer.py | 107 ++++++++++-------- doc/ReleaseNotes_CLICPerformance.md | 1 - .../PandoraSettingsPhotonTraining.xml | 19 ++++ .../PandoraLikelihoodData9EBin.xml | 18 +++ ...LikelihoodData9EBin_400nsCalTimeWindow.xml | 18 +++ .../PandoraSettingsDefault.xml | 19 ++++ ...doraSettingsDefault_400nsCalTimeWindow.xml | 19 ++++ fcceeConfig/fccReconstruction.xml | 46 +++++--- fcceeConfig/fcc_steer.py | 107 ++++++++++-------- test/test_CLDConfig.py | 18 +++ 19 files changed, 412 insertions(+), 121 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE b/.github/PULL_REQUEST_TEMPLATE index bd3f7f2..6e908e3 100644 --- a/.github/PULL_REQUEST_TEMPLATE +++ b/.github/PULL_REQUEST_TEMPLATE @@ -5,4 +5,4 @@ BEGINRELEASENOTES exactly as it appears between the two bold lines - ... -ENDRELEASENOTES \ No newline at end of file +ENDRELEASENOTES diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 49de5b1..12e9b24 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,4 +32,4 @@ jobs: docker exec CLDConfig_CI /bin/bash -c 'source ${{ matrix.SETUP }}; cd CLDConfig; pytest; - ' \ No newline at end of file + ' diff --git a/CLDConfig/CLDReconstruction.py b/CLDConfig/CLDReconstruction.py index 78548e1..cd2bf38 100644 --- a/CLDConfig/CLDReconstruction.py +++ b/CLDConfig/CLDReconstruction.py @@ -1,3 +1,21 @@ +# +# Copyright (c) 2014-2023 Key4hep-Project. +# +# This file is part of Key4hep. +# See https://key4hep.github.io/key4hep-doc/ for further info. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# import os from Gaudi.Configuration import * diff --git a/CLDConfig/CLDReconstruction.xml b/CLDConfig/CLDReconstruction.xml index 88885ef..42abab1 100644 --- a/CLDConfig/CLDReconstruction.xml +++ b/CLDConfig/CLDReconstruction.xml @@ -1,4 +1,22 @@ + @@ -48,8 +66,8 @@ - - + + @@ -76,8 +94,8 @@ - - + + @@ -94,7 +112,7 @@ - + WARNING @@ -237,7 +255,7 @@ 0.007 - 0.09 + 0.09 InnerTrackerBarrelCollection @@ -372,7 +390,7 @@ true - + [VXDBarrel] @Collections : VXDTrackerHits @Parameters : MaxCellAngle : 0.01; MaxCellAngleRZ : 0.01; Chi2Cut : 100; MinClustersOnTrack : 4; MaxDistance : 0.03; SlopeZRange: 10.0; HighPTCut: 10.0; @@ -407,7 +425,7 @@ 0.05 - + @@ -600,7 +618,7 @@ 0.05 1e+06 - + 1 @@ -674,7 +692,7 @@ -1 true - + 10 10 @@ -752,10 +770,10 @@ - + false - + 0 @@ -771,7 +789,7 @@ 0 0 - + -100 @@ -1353,7 +1371,7 @@ 1 - + diff --git a/CLDConfig/CalibrationPandoraSettings/PandoraSettingsPhotonTraining.xml b/CLDConfig/CalibrationPandoraSettings/PandoraSettingsPhotonTraining.xml index e3be01e..9c80a7a 100644 --- a/CLDConfig/CalibrationPandoraSettings/PandoraSettingsPhotonTraining.xml +++ b/CLDConfig/CalibrationPandoraSettings/PandoraSettingsPhotonTraining.xml @@ -1,3 +1,22 @@ + + diff --git a/CLDConfig/PandoraSettingsCLD/PandoraLikelihoodData9EBin.xml b/CLDConfig/PandoraSettingsCLD/PandoraLikelihoodData9EBin.xml index 1d4db3a..242fc72 100644 --- a/CLDConfig/PandoraSettingsCLD/PandoraLikelihoodData9EBin.xml +++ b/CLDConfig/PandoraSettingsCLD/PandoraLikelihoodData9EBin.xml @@ -1,3 +1,21 @@ + 9 0 0.2 0.5 1 1.5 2.5 5 10 20 21762 16062 17104 12348 17530 23410 18647 11352 6553 diff --git a/CLDConfig/PandoraSettingsCLD/PandoraLikelihoodData9EBin_400nsCalTimeWindow.xml b/CLDConfig/PandoraSettingsCLD/PandoraLikelihoodData9EBin_400nsCalTimeWindow.xml index 02338bc..cba1bc6 100644 --- a/CLDConfig/PandoraSettingsCLD/PandoraLikelihoodData9EBin_400nsCalTimeWindow.xml +++ b/CLDConfig/PandoraSettingsCLD/PandoraLikelihoodData9EBin_400nsCalTimeWindow.xml @@ -1,3 +1,21 @@ + 9 0 0.2 0.5 1 1.5 2.5 5 10 20 47204 35615 37981 27845 38505 51356 40648 24197 12964 diff --git a/CLDConfig/PandoraSettingsCLD/PandoraSettingsDefault.xml b/CLDConfig/PandoraSettingsCLD/PandoraSettingsDefault.xml index 4a98dc3..a2afaf6 100644 --- a/CLDConfig/PandoraSettingsCLD/PandoraSettingsDefault.xml +++ b/CLDConfig/PandoraSettingsCLD/PandoraSettingsDefault.xml @@ -1,3 +1,22 @@ + + diff --git a/CLDConfig/PandoraSettingsCLD/PandoraSettingsDefault_400nsCalTimeWindow.xml b/CLDConfig/PandoraSettingsCLD/PandoraSettingsDefault_400nsCalTimeWindow.xml index a6ab5bc..a132ca4 100644 --- a/CLDConfig/PandoraSettingsCLD/PandoraSettingsDefault_400nsCalTimeWindow.xml +++ b/CLDConfig/PandoraSettingsCLD/PandoraSettingsDefault_400nsCalTimeWindow.xml @@ -1,3 +1,22 @@ + + diff --git a/CLDConfig/cld_steer.py b/CLDConfig/cld_steer.py index a23afcf..e62b3b1 100644 --- a/CLDConfig/cld_steer.py +++ b/CLDConfig/cld_steer.py @@ -1,3 +1,21 @@ +# +# Copyright (c) 2014-2023 Key4hep-Project. +# +# This file is part of Key4hep. +# See https://key4hep.github.io/key4hep-doc/ for further info. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# import os from DDSim.DD4hepSimulation import DD4hepSimulation @@ -42,37 +60,37 @@ ################################################################################ ## Action holding sensitive detector actions ## The default tracker and calorimeter actions can be set with -## +## ## >>> SIM = DD4hepSimulation() ## >>> SIM.action.tracker = "Geant4TrackerAction" ## >>> SIM.action.calo = "Geant4CalorimeterAction" -## +## ## for specific subdetectors specific sensitive detectors can be set based on pattern matching -## +## ## >>> SIM = DD4hepSimulation() ## >>> SIM.action.mapActions['tpc'] = "TPCSDAction" -## +## ## and additional parameters for the sensitive detectors can be set when the map is given a tuple -## +## ## >>> SIM = DD4hepSimulation() ## >>> SIM.action.mapActions['ecal'] =( "CaloPreShowerSDAction", {"FirstLayerNumber": 1} ) -## -## +## +## ################################################################################ -## set the default tracker action -SIM.action.tracker = "Geant4TrackerWeightedAction" +## set the default tracker action +SIM.action.tracker = "Geant4TrackerWeightedAction" -## set the default calorimeter action +## set the default calorimeter action SIM.action.calo = "Geant4ScintillatorCalorimeterAction" ## create a map of patterns and actions to be applied to sensitive detectors -## example: SIM.action.mapActions['tpc'] = "TPCSDAction" +## example: SIM.action.mapActions['tpc'] = "TPCSDAction" SIM.action.mapActions = {} ################################################################################ -## Configuration for the magnetic field (stepper) +## Configuration for the magnetic field (stepper) ################################################################################ SIM.field.delta_chord = 0.25*mm SIM.field.delta_intersection = 0.001*mm @@ -87,33 +105,33 @@ ################################################################################ ## Configuration for sensitive detector filters -## +## ## Set the default filter for tracker or caliromter ## >>> SIM.filter.tracker = "edep1kev" ## >>> SIM.filter.calo = "" -## +## ## Assign a filter to a sensitive detector via pattern matching ## >>> SIM.filter.mapDetFilter['FTD'] = "edep1kev" -## +## ## Or more than one filter: ## >>> SIM.filter.mapDetFilter['FTD'] = ["edep1kev", "geantino"] -## +## ## Don't use the default filter or anything else: ## >>> SIM.filter.mapDetFilter['TPC'] = None ## or "" or [] -## +## ## Create a custom filter. The dictionary is used to instantiate the filter later on ## >>> SIM.filter.filters['edep3kev'] = dict(name="EnergyDepositMinimumCut/3keV", parameter={"Cut": 3.0*keV} ) -## -## +## +## ################################################################################ -## default filter for calorimeter sensitive detectors; this is applied if no other filter is used for a calorimeter +## default filter for calorimeter sensitive detectors; this is applied if no other filter is used for a calorimeter SIM.filter.calo = "edep0" -## list of filter objects: map between name and parameter dictionary +## list of filter objects: map between name and parameter dictionary SIM.filter.filters = {'edep0': {'parameter': {'Cut': 0.0}, 'name': 'EnergyDepositMinimumCut/Cut0'}, 'geantino': {'parameter': {}, 'name': 'GeantinoRejectFilter/GeantinoRejector'}, 'edep1kev': {'parameter': {'Cut': 0.001}, 'name': 'EnergyDepositMinimumCut'}} -## a map between patterns and filter objects, using patterns to attach filters to sensitive detector +## a map between patterns and filter objects, using patterns to attach filters to sensitive detector SIM.filter.mapDetFilter = {} ## default filter for tracking sensitive detectors; this is applied if no other filter is used for a tracker @@ -121,31 +139,31 @@ ################################################################################ -## Configuration for the DDG4 ParticleGun +## Configuration for the DDG4 ParticleGun ################################################################################ -## direction of the particle gun, 3 vector +## direction of the particle gun, 3 vector SIM.gun.direction = (0, 0, 1) ## choose the distribution of the random direction for theta -## +## ## Options for random distributions: -## +## ## 'uniform' is the default distribution, flat in theta ## 'cos(theta)' is flat in cos(theta) ## 'eta', or 'pseudorapidity' is flat in pseudorapity ## 'ffbar' is distributed according to 1+cos^2(theta) -## +## ## Setting a distribution will set isotrop = True -## +## SIM.gun.distribution = None SIM.gun.energy = 10000.0 ## isotropic distribution for the particle gun -## +## ## use the options phiMin, phiMax, thetaMin, and thetaMax to limit the range of randomly distributed directions ## if one of these options is not None the random distribution will be set to True and cannot be turned off! -## +## SIM.gun.isotrop = False SIM.gun.multiplicity = 1 SIM.gun.particle = "mu-" @@ -154,14 +172,14 @@ ## Minimal azimuthal angle for random distribution SIM.gun.phiMin = None -## position of the particle gun, 3 vector +## position of the particle gun, 3 vector SIM.gun.position = (0.0, 0.0, 0.0) SIM.gun.thetaMax = None SIM.gun.thetaMin = None ################################################################################ -## Configuration for the output levels of DDG4 components +## Configuration for the output levels of DDG4 components ################################################################################ ## Output level for input sources @@ -178,24 +196,24 @@ ################################################################################ -## Configuration for the Particle Handler/ MCTruth treatment +## Configuration for the Particle Handler/ MCTruth treatment ################################################################################ -## Keep all created particles +## Keep all created particles SIM.part.keepAllParticles = False ## Minimal distance between particle vertex and endpoint of parent after ## which the vertexIsNotEndpointOfParent flag is set -## +## SIM.part.minDistToParentVertex = 2.2e-14 ## MinimalKineticEnergy to store particles created in the tracking region SIM.part.minimalKineticEnergy = 1.0*MeV -## Printout at End of Tracking +## Printout at End of Tracking SIM.part.printEndTracking = False -## Printout at Start of Tracking +## Printout at Start of Tracking SIM.part.printStartTracking = False ## List of processes to save, on command line give as whitespace separated string in quotation marks @@ -203,30 +221,30 @@ ################################################################################ -## Configuration for the PhysicsList +## Configuration for the PhysicsList ################################################################################ SIM.physics.decays = False SIM.physics.list = "FTFP_BERT" ## location of particle.tbl file containing extra particles and their lifetime information -## +## SIM.physics.pdgfile = os.path.join( os.environ.get("DD4hepINSTALL"), "examples/DDG4/examples/particle.tbl" ) ## The global geant4 rangecut for secondary production -## +## ## Default is 0.7 mm as is the case in geant4 10 -## +## ## To disable this plugin and be absolutely sure to use the Geant4 default range cut use "None" -## +## ## Set printlevel to DEBUG to see a printout of all range cuts, ## but this only works if range cut is not "None" -## +## SIM.physics.rangecut = 0.7*mm SIM.physics.rejectPDGs = {1,2,3,4,5,6,21,23,24,25} ################################################################################ -## Properties for the random number generator +## Properties for the random number generator ################################################################################ ## If True, calculate random seed for each event based on eventID and runID @@ -237,4 +255,3 @@ SIM.random.replace_gRandom = True SIM.random.seed = None SIM.random.type = None - diff --git a/doc/ReleaseNotes_CLICPerformance.md b/doc/ReleaseNotes_CLICPerformance.md index 0642515..eccbc5b 100644 --- a/doc/ReleaseNotes_CLICPerformance.md +++ b/doc/ReleaseNotes_CLICPerformance.md @@ -435,4 +435,3 @@ * General: At present the package contains only processors for the Tracking systems. Further dedicated folders for Calorimetry performance etc. should be added in future. The configuration folder contains steering files for the reconstruction in Marlin, and a test script (testClicBuild.sh) which allows a fast check of new relseases/geometries etc. * ClicEfficiencyCalculator: Processor to calculate the tracking efficiency. Only the input hit collections are considered, allowing the efficiency to be restricted to the given subdetectors. * TrackChecker: Processor to evaluate the pull and residual distributions of the track fitting. - diff --git a/fcceeConfig/CalibrationPandoraSettings/PandoraSettingsPhotonTraining.xml b/fcceeConfig/CalibrationPandoraSettings/PandoraSettingsPhotonTraining.xml index e3be01e..9c80a7a 100644 --- a/fcceeConfig/CalibrationPandoraSettings/PandoraSettingsPhotonTraining.xml +++ b/fcceeConfig/CalibrationPandoraSettings/PandoraSettingsPhotonTraining.xml @@ -1,3 +1,22 @@ + + diff --git a/fcceeConfig/PandoraSettingsFCCee/PandoraLikelihoodData9EBin.xml b/fcceeConfig/PandoraSettingsFCCee/PandoraLikelihoodData9EBin.xml index 1d4db3a..242fc72 100644 --- a/fcceeConfig/PandoraSettingsFCCee/PandoraLikelihoodData9EBin.xml +++ b/fcceeConfig/PandoraSettingsFCCee/PandoraLikelihoodData9EBin.xml @@ -1,3 +1,21 @@ + 9 0 0.2 0.5 1 1.5 2.5 5 10 20 21762 16062 17104 12348 17530 23410 18647 11352 6553 diff --git a/fcceeConfig/PandoraSettingsFCCee/PandoraLikelihoodData9EBin_400nsCalTimeWindow.xml b/fcceeConfig/PandoraSettingsFCCee/PandoraLikelihoodData9EBin_400nsCalTimeWindow.xml index 02338bc..cba1bc6 100644 --- a/fcceeConfig/PandoraSettingsFCCee/PandoraLikelihoodData9EBin_400nsCalTimeWindow.xml +++ b/fcceeConfig/PandoraSettingsFCCee/PandoraLikelihoodData9EBin_400nsCalTimeWindow.xml @@ -1,3 +1,21 @@ + 9 0 0.2 0.5 1 1.5 2.5 5 10 20 47204 35615 37981 27845 38505 51356 40648 24197 12964 diff --git a/fcceeConfig/PandoraSettingsFCCee/PandoraSettingsDefault.xml b/fcceeConfig/PandoraSettingsFCCee/PandoraSettingsDefault.xml index 88937b1..debe28f 100644 --- a/fcceeConfig/PandoraSettingsFCCee/PandoraSettingsDefault.xml +++ b/fcceeConfig/PandoraSettingsFCCee/PandoraSettingsDefault.xml @@ -1,3 +1,22 @@ + + diff --git a/fcceeConfig/PandoraSettingsFCCee/PandoraSettingsDefault_400nsCalTimeWindow.xml b/fcceeConfig/PandoraSettingsFCCee/PandoraSettingsDefault_400nsCalTimeWindow.xml index 8d5673f..37e1c93 100644 --- a/fcceeConfig/PandoraSettingsFCCee/PandoraSettingsDefault_400nsCalTimeWindow.xml +++ b/fcceeConfig/PandoraSettingsFCCee/PandoraSettingsDefault_400nsCalTimeWindow.xml @@ -1,3 +1,22 @@ + + diff --git a/fcceeConfig/fccReconstruction.xml b/fcceeConfig/fccReconstruction.xml index 88885ef..42abab1 100644 --- a/fcceeConfig/fccReconstruction.xml +++ b/fcceeConfig/fccReconstruction.xml @@ -1,4 +1,22 @@ + @@ -48,8 +66,8 @@ - - + + @@ -76,8 +94,8 @@ - - + + @@ -94,7 +112,7 @@ - + WARNING @@ -237,7 +255,7 @@ 0.007 - 0.09 + 0.09 InnerTrackerBarrelCollection @@ -372,7 +390,7 @@ true - + [VXDBarrel] @Collections : VXDTrackerHits @Parameters : MaxCellAngle : 0.01; MaxCellAngleRZ : 0.01; Chi2Cut : 100; MinClustersOnTrack : 4; MaxDistance : 0.03; SlopeZRange: 10.0; HighPTCut: 10.0; @@ -407,7 +425,7 @@ 0.05 - + @@ -600,7 +618,7 @@ 0.05 1e+06 - + 1 @@ -674,7 +692,7 @@ -1 true - + 10 10 @@ -752,10 +770,10 @@ - + false - + 0 @@ -771,7 +789,7 @@ 0 0 - + -100 @@ -1353,7 +1371,7 @@ 1 - + diff --git a/fcceeConfig/fcc_steer.py b/fcceeConfig/fcc_steer.py index a23afcf..e62b3b1 100644 --- a/fcceeConfig/fcc_steer.py +++ b/fcceeConfig/fcc_steer.py @@ -1,3 +1,21 @@ +# +# Copyright (c) 2014-2023 Key4hep-Project. +# +# This file is part of Key4hep. +# See https://key4hep.github.io/key4hep-doc/ for further info. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# import os from DDSim.DD4hepSimulation import DD4hepSimulation @@ -42,37 +60,37 @@ ################################################################################ ## Action holding sensitive detector actions ## The default tracker and calorimeter actions can be set with -## +## ## >>> SIM = DD4hepSimulation() ## >>> SIM.action.tracker = "Geant4TrackerAction" ## >>> SIM.action.calo = "Geant4CalorimeterAction" -## +## ## for specific subdetectors specific sensitive detectors can be set based on pattern matching -## +## ## >>> SIM = DD4hepSimulation() ## >>> SIM.action.mapActions['tpc'] = "TPCSDAction" -## +## ## and additional parameters for the sensitive detectors can be set when the map is given a tuple -## +## ## >>> SIM = DD4hepSimulation() ## >>> SIM.action.mapActions['ecal'] =( "CaloPreShowerSDAction", {"FirstLayerNumber": 1} ) -## -## +## +## ################################################################################ -## set the default tracker action -SIM.action.tracker = "Geant4TrackerWeightedAction" +## set the default tracker action +SIM.action.tracker = "Geant4TrackerWeightedAction" -## set the default calorimeter action +## set the default calorimeter action SIM.action.calo = "Geant4ScintillatorCalorimeterAction" ## create a map of patterns and actions to be applied to sensitive detectors -## example: SIM.action.mapActions['tpc'] = "TPCSDAction" +## example: SIM.action.mapActions['tpc'] = "TPCSDAction" SIM.action.mapActions = {} ################################################################################ -## Configuration for the magnetic field (stepper) +## Configuration for the magnetic field (stepper) ################################################################################ SIM.field.delta_chord = 0.25*mm SIM.field.delta_intersection = 0.001*mm @@ -87,33 +105,33 @@ ################################################################################ ## Configuration for sensitive detector filters -## +## ## Set the default filter for tracker or caliromter ## >>> SIM.filter.tracker = "edep1kev" ## >>> SIM.filter.calo = "" -## +## ## Assign a filter to a sensitive detector via pattern matching ## >>> SIM.filter.mapDetFilter['FTD'] = "edep1kev" -## +## ## Or more than one filter: ## >>> SIM.filter.mapDetFilter['FTD'] = ["edep1kev", "geantino"] -## +## ## Don't use the default filter or anything else: ## >>> SIM.filter.mapDetFilter['TPC'] = None ## or "" or [] -## +## ## Create a custom filter. The dictionary is used to instantiate the filter later on ## >>> SIM.filter.filters['edep3kev'] = dict(name="EnergyDepositMinimumCut/3keV", parameter={"Cut": 3.0*keV} ) -## -## +## +## ################################################################################ -## default filter for calorimeter sensitive detectors; this is applied if no other filter is used for a calorimeter +## default filter for calorimeter sensitive detectors; this is applied if no other filter is used for a calorimeter SIM.filter.calo = "edep0" -## list of filter objects: map between name and parameter dictionary +## list of filter objects: map between name and parameter dictionary SIM.filter.filters = {'edep0': {'parameter': {'Cut': 0.0}, 'name': 'EnergyDepositMinimumCut/Cut0'}, 'geantino': {'parameter': {}, 'name': 'GeantinoRejectFilter/GeantinoRejector'}, 'edep1kev': {'parameter': {'Cut': 0.001}, 'name': 'EnergyDepositMinimumCut'}} -## a map between patterns and filter objects, using patterns to attach filters to sensitive detector +## a map between patterns and filter objects, using patterns to attach filters to sensitive detector SIM.filter.mapDetFilter = {} ## default filter for tracking sensitive detectors; this is applied if no other filter is used for a tracker @@ -121,31 +139,31 @@ ################################################################################ -## Configuration for the DDG4 ParticleGun +## Configuration for the DDG4 ParticleGun ################################################################################ -## direction of the particle gun, 3 vector +## direction of the particle gun, 3 vector SIM.gun.direction = (0, 0, 1) ## choose the distribution of the random direction for theta -## +## ## Options for random distributions: -## +## ## 'uniform' is the default distribution, flat in theta ## 'cos(theta)' is flat in cos(theta) ## 'eta', or 'pseudorapidity' is flat in pseudorapity ## 'ffbar' is distributed according to 1+cos^2(theta) -## +## ## Setting a distribution will set isotrop = True -## +## SIM.gun.distribution = None SIM.gun.energy = 10000.0 ## isotropic distribution for the particle gun -## +## ## use the options phiMin, phiMax, thetaMin, and thetaMax to limit the range of randomly distributed directions ## if one of these options is not None the random distribution will be set to True and cannot be turned off! -## +## SIM.gun.isotrop = False SIM.gun.multiplicity = 1 SIM.gun.particle = "mu-" @@ -154,14 +172,14 @@ ## Minimal azimuthal angle for random distribution SIM.gun.phiMin = None -## position of the particle gun, 3 vector +## position of the particle gun, 3 vector SIM.gun.position = (0.0, 0.0, 0.0) SIM.gun.thetaMax = None SIM.gun.thetaMin = None ################################################################################ -## Configuration for the output levels of DDG4 components +## Configuration for the output levels of DDG4 components ################################################################################ ## Output level for input sources @@ -178,24 +196,24 @@ ################################################################################ -## Configuration for the Particle Handler/ MCTruth treatment +## Configuration for the Particle Handler/ MCTruth treatment ################################################################################ -## Keep all created particles +## Keep all created particles SIM.part.keepAllParticles = False ## Minimal distance between particle vertex and endpoint of parent after ## which the vertexIsNotEndpointOfParent flag is set -## +## SIM.part.minDistToParentVertex = 2.2e-14 ## MinimalKineticEnergy to store particles created in the tracking region SIM.part.minimalKineticEnergy = 1.0*MeV -## Printout at End of Tracking +## Printout at End of Tracking SIM.part.printEndTracking = False -## Printout at Start of Tracking +## Printout at Start of Tracking SIM.part.printStartTracking = False ## List of processes to save, on command line give as whitespace separated string in quotation marks @@ -203,30 +221,30 @@ ################################################################################ -## Configuration for the PhysicsList +## Configuration for the PhysicsList ################################################################################ SIM.physics.decays = False SIM.physics.list = "FTFP_BERT" ## location of particle.tbl file containing extra particles and their lifetime information -## +## SIM.physics.pdgfile = os.path.join( os.environ.get("DD4hepINSTALL"), "examples/DDG4/examples/particle.tbl" ) ## The global geant4 rangecut for secondary production -## +## ## Default is 0.7 mm as is the case in geant4 10 -## +## ## To disable this plugin and be absolutely sure to use the Geant4 default range cut use "None" -## +## ## Set printlevel to DEBUG to see a printout of all range cuts, ## but this only works if range cut is not "None" -## +## SIM.physics.rangecut = 0.7*mm SIM.physics.rejectPDGs = {1,2,3,4,5,6,21,23,24,25} ################################################################################ -## Properties for the random number generator +## Properties for the random number generator ################################################################################ ## If True, calculate random seed for each event based on eventID and runID @@ -237,4 +255,3 @@ SIM.random.replace_gRandom = True SIM.random.seed = None SIM.random.type = None - diff --git a/test/test_CLDConfig.py b/test/test_CLDConfig.py index fec53be..2c404ae 100644 --- a/test/test_CLDConfig.py +++ b/test/test_CLDConfig.py @@ -1,3 +1,21 @@ +# +# Copyright (c) 2014-2023 Key4hep-Project. +# +# This file is part of Key4hep. +# See https://key4hep.github.io/key4hep-doc/ for further info. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# import os import subprocess from decorator import decorator