From 2b7eeec9c22dcd009526f77ff0d36ef73c9cd9a1 Mon Sep 17 00:00:00 2001 From: Zhibo Wu Date: Thu, 22 Aug 2024 16:51:01 +0200 Subject: [PATCH 1/4] Enable ALLEGRO ECAL cell noise without filter --- .../ALLEGRO/ALLEGRO_o1_v03/run_digi_reco.py | 67 ++++++++++--------- 1 file changed, 35 insertions(+), 32 deletions(-) diff --git a/FCCee/FullSim/ALLEGRO/ALLEGRO_o1_v03/run_digi_reco.py b/FCCee/FullSim/ALLEGRO/ALLEGRO_o1_v03/run_digi_reco.py index 43e4189..677f0a0 100644 --- a/FCCee/FullSim/ALLEGRO/ALLEGRO_o1_v03/run_digi_reco.py +++ b/FCCee/FullSim/ALLEGRO/ALLEGRO_o1_v03/run_digi_reco.py @@ -55,9 +55,9 @@ # inputfile = "ALLEGRO_sim.root" # input file produced with ddsim Nevts = -1 # -1 means all events -addNoise = False # add noise or not to the cell energy +addNoise = True # add noise or not to the cell energy dumpGDML = False # create GDML file of detector model -runHCal = True # simulate only the ECAL or both ECAL+HCAL +runHCal = False # simulate only the ECAL or both ECAL+HCAL # - what to save in output file # @@ -91,7 +91,7 @@ # BDT regression from total cluster energy and fraction of energy in each layer (after correction for sampling fraction) # not to be applied (yet) for ECAL+HCAL clustering (MVA trained only on ECAL so far) -applyMVAClusterEnergyCalibration = True and not runHCal +applyMVAClusterEnergyCalibration = False and not runHCal # temporarily switched off due to negative cell signals introduced by noise # calculate cluster energy and barycenter per layer and save it as extra parameters addShapeParameters = True and not runHCal @@ -168,15 +168,16 @@ # which is not performed by ddsim) # - merge hits into cells according to initial segmentation ecalBarrelCellsName = "ECalBarrelCells" -createEcalBarrelCells = CreateCaloCells("CreateECalBarrelCells", - doCellCalibration=True, - calibTool=calibEcalBarrel, - addCellNoise=False, - filterCellNoise=False, - addPosition=True, - OutputLevel=INFO, - hits=ecalBarrelReadoutName, - cells=ecalBarrelCellsName) +if not addNoise: # Create ECAL barrel cells without adding noise + createEcalBarrelCells = CreateCaloCells("CreateECalBarrelCells", + doCellCalibration=True, + calibTool=calibEcalBarrel, + addCellNoise=False, + filterCellNoise=False, + addPosition=True, + OutputLevel=INFO, + hits=ecalBarrelReadoutName, + cells=ecalBarrelCellsName) # - add to Ecal barrel cells the position information # (good for physics, all coordinates set properly) @@ -284,28 +285,30 @@ filterNoiseThreshold=0, numRadialLayers=11, scaleFactor=1 / 1000., # MeV to GeV - OutputLevel=DEBUG) - - # needs to be migrated! - #from Configurables import TubeLayerPhiEtaCaloTool - #barrelGeometry = TubeLayerPhiEtaCaloTool("EcalBarrelGeo", - # readoutName=ecalBarrelReadoutNamePhiEta, - # activeVolumeName="LAr_sensitive", - # activeFieldName="layer", - # activeVolumesNumber=12, - # fieldNames=["system"], - # fieldValues=[4]) + OutputLevel=INFO) + + # barrel geometry tool is migrated to match ALLEGRO v3 segmentation + from Configurables import TubeLayerModuleThetaMergedCaloTool + barrelGeometry = TubeLayerModuleThetaMergedCaloTool("EcalBarrelGeo", + readoutName=ecalBarrelReadoutName, + activeVolumeName="LAr_sensitive", + activeFieldName="layer", + activeVolumesNumber=11, + fieldNames=["system"], + fieldValues=[4]) # cells with noise not filtered - # createEcalBarrelCellsNoise = CreateCaloCells("CreateECalBarrelCellsNoise", - # doCellCalibration=False, - # addCellNoise=True, - # filterCellNoise=False, - # OutputLevel=INFO, - # hits="ECalBarrelCellsStep2", - # noiseTool=noiseBarrel, - # geometryTool=barrelGeometry, - # cells=EcalBarrelCellsName) + createEcalBarrelCells = CreateCaloCells("CreateECalBarrelCellsNoise", + doCellCalibration=True, + calibTool=calibEcalBarrel, + addCellNoise=True, + filterCellNoise=False, + noiseTool=noiseBarrel, + addPosition=True, + geometryTool=barrelGeometry, + OutputLevel=INFO, + hits=ecalBarrelReadoutName, + cells=ecalBarrelCellsName) # cells with noise filtered # createEcalBarrelCellsNoise = CreateCaloCells("CreateECalBarrelCellsNoise_filtered", From bb38b85740f7a17a041d379ebc3356498c25607a Mon Sep 17 00:00:00 2001 From: Zhibo Wu Date: Thu, 22 Aug 2024 16:55:28 +0200 Subject: [PATCH 2/4] Add a FIXME comment on the input root file for noise --- FCCee/FullSim/ALLEGRO/ALLEGRO_o1_v03/run_digi_reco.py | 1 + 1 file changed, 1 insertion(+) diff --git a/FCCee/FullSim/ALLEGRO/ALLEGRO_o1_v03/run_digi_reco.py b/FCCee/FullSim/ALLEGRO/ALLEGRO_o1_v03/run_digi_reco.py index 677f0a0..e5490fa 100644 --- a/FCCee/FullSim/ALLEGRO/ALLEGRO_o1_v03/run_digi_reco.py +++ b/FCCee/FullSim/ALLEGRO/ALLEGRO_o1_v03/run_digi_reco.py @@ -271,6 +271,7 @@ if addNoise: + #FIXME Input histograms need to be updated to match the new detector geometry of ALLEGRO v3 ecalBarrelNoisePath = "elecNoise_ecalBarrelFCCee_theta.root" ecalBarrelNoiseRMSHistName = "h_elecNoise_fcc_" from Configurables import NoiseCaloCellsVsThetaFromFileTool From dd6fbf5381de31f11fe17a9c20ca6f7fd4b8841f Mon Sep 17 00:00:00 2001 From: Zhibo Wu <91186438+zwu0922@users.noreply.github.com> Date: Fri, 23 Aug 2024 10:04:19 +0200 Subject: [PATCH 3/4] Update FCCee/FullSim/ALLEGRO/ALLEGRO_o1_v03/run_digi_reco.py Co-authored-by: Giovanni Marchiori <39376142+giovannimarchiori@users.noreply.github.com> --- FCCee/FullSim/ALLEGRO/ALLEGRO_o1_v03/run_digi_reco.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FCCee/FullSim/ALLEGRO/ALLEGRO_o1_v03/run_digi_reco.py b/FCCee/FullSim/ALLEGRO/ALLEGRO_o1_v03/run_digi_reco.py index e5490fa..b7b640e 100644 --- a/FCCee/FullSim/ALLEGRO/ALLEGRO_o1_v03/run_digi_reco.py +++ b/FCCee/FullSim/ALLEGRO/ALLEGRO_o1_v03/run_digi_reco.py @@ -91,7 +91,7 @@ # BDT regression from total cluster energy and fraction of energy in each layer (after correction for sampling fraction) # not to be applied (yet) for ECAL+HCAL clustering (MVA trained only on ECAL so far) -applyMVAClusterEnergyCalibration = False and not runHCal # temporarily switched off due to negative cell signals introduced by noise +applyMVAClusterEnergyCalibration = True and not runHCal and not addNoise # temporarily switched off due to negative cell signals introduced by noise # calculate cluster energy and barycenter per layer and save it as extra parameters addShapeParameters = True and not runHCal From 20f2ad9a549763bce25e8be3ee93122c6d397c3c Mon Sep 17 00:00:00 2001 From: Zhibo Wu Date: Fri, 30 Aug 2024 09:53:11 +0200 Subject: [PATCH 4/4] Switch off noise by default --- FCCee/FullSim/ALLEGRO/ALLEGRO_o1_v03/run_digi_reco.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FCCee/FullSim/ALLEGRO/ALLEGRO_o1_v03/run_digi_reco.py b/FCCee/FullSim/ALLEGRO/ALLEGRO_o1_v03/run_digi_reco.py index b7b640e..bdc5196 100644 --- a/FCCee/FullSim/ALLEGRO/ALLEGRO_o1_v03/run_digi_reco.py +++ b/FCCee/FullSim/ALLEGRO/ALLEGRO_o1_v03/run_digi_reco.py @@ -55,7 +55,7 @@ # inputfile = "ALLEGRO_sim.root" # input file produced with ddsim Nevts = -1 # -1 means all events -addNoise = True # add noise or not to the cell energy +addNoise = False # add noise or not to the cell energy dumpGDML = False # create GDML file of detector model runHCal = False # simulate only the ECAL or both ECAL+HCAL