diff --git a/FCCee/FullSim/ALLEGRO/ALLEGRO_o1_v03/ctest_sim_digi_reco.sh b/FCCee/FullSim/ALLEGRO/ALLEGRO_o1_v03/ctest_sim_digi_reco.sh index 56446f8..8d0d789 100755 --- a/FCCee/FullSim/ALLEGRO/ALLEGRO_o1_v03/ctest_sim_digi_reco.sh +++ b/FCCee/FullSim/ALLEGRO/ALLEGRO_o1_v03/ctest_sim_digi_reco.sh @@ -19,7 +19,7 @@ if ! test -f ./neighbours_map_ecalB_thetamodulemerged_hcalB_thetaphi.root; then wget https://fccsw.web.cern.ch/fccsw/filesForSimDigiReco/ALLEGRO/ALLEGRO_o1_v03/lgbm_calibration-CaloClusters.onnx wget https://fccsw.web.cern.ch/fccsw/filesForSimDigiReco/ALLEGRO/ALLEGRO_o1_v03/lgbm_calibration-CaloTopoClusters.onnx wget https://fccsw.web.cern.ch/fccsw/filesForSimDigiReco/ALLEGRO/ALLEGRO_o1_v03/neighbours_map_ecalB_thetamodulemerged.root - wget https://fccsw.web.cern.ch/fccsw/filesForSimDigiReco/ALLEGRO/ALLEGRO_o1_v03/neighbours_map_ecalB_thetamodulemerged_hcalB_thetaphi.root + wget https://fccsw.web.cern.ch/fccsw/filesForSimDigiReco/ALLEGRO/ALLEGRO_o1_v03/neighbours_map_ecalB_thetamodulemerged_hcalB_hcalEndcap_phitheta.root fi # run the RECO step 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 8285e93..35d6d8a 100644 --- a/FCCee/FullSim/ALLEGRO/ALLEGRO_o1_v03/run_digi_reco.py +++ b/FCCee/FullSim/ALLEGRO/ALLEGRO_o1_v03/run_digi_reco.py @@ -176,15 +176,11 @@ ecalEndcapReadoutName = "ECalEndcapTurbine" # endcap, turbine-like (baseline) # - HCAL readouts if runHCal: - hcalBarrelReadoutName = "HCalBarrelReadout" # barrel, original segmentation (row-phi) - hcalBarrelReadoutName2 = "BarHCal_Readout_phitheta" # barrel, groups together cells of different row within same theta slice - hcalEndcapReadoutName = "HCalEndcapReadout" # endcap, original segmentation - hcalEndcapReadoutName2 = "HCalEndcapReadout_phitheta" # endcap, groups together cells of different row within same theta slice + hcalBarrelReadoutName = "HCalBarrelReadout" # barrel, original segmentation (HCalPhiTheta) + hcalEndcapReadoutName = "HCalEndcapReadout" # endcap, original segmentation (HCalPhiTheta) else: hcalBarrelReadoutName = "" - hcalBarrelReadoutName2 = "" hcalEndcapReadoutName = "" - hcalEndcapReadoutName2 = "" # - EM scale calibration (sampling fraction) from Configurables import CalibrateInLayersTool @@ -243,12 +239,6 @@ detectorName="HCalBarrel", OutputLevel=INFO ) - cellPositionHCalBarrelTool2 = CellPositionsHCalPhiThetaSegTool( - "CellPositionsHCalBarrel2", - readoutName=hcalBarrelReadoutName2, - detectorName="HCalBarrel", - OutputLevel=INFO - ) cellPositionHCalEndcapTool = CellPositionsHCalPhiThetaSegTool( "CellPositionsHCalEndcap", readoutName=hcalEndcapReadoutName, @@ -256,13 +246,6 @@ numLayersHCalThreeParts=[6, 9, 22], OutputLevel=INFO ) - cellPositionHCalEndcapTool2 = CellPositionsHCalPhiThetaSegTool( - "CellPositionsHCalEndcap2", - readoutName=hcalEndcapReadoutName2, - detectorName="HCalThreePartsEndcap", - numLayersHCalThreeParts=[6, 9, 22], - OutputLevel=INFO - ) # - crosstalk tool if addCrosstalk: @@ -431,39 +414,6 @@ OutputLevel=INFO) TopAlg += [createHCalBarrelCells] - # Compute new cellID of cells based on new readout - removing row information - # We use a RedoSegmentation. Using a RewriteBitField with removeIds=["row"], - # won't work because there are tiles with same layer/theta/phi but different row - # as a consequence there will be multiple cells with same cellID in the output collection - # and this will screw up the SW clustering - - # first we create new hits with the readout without the row information - # and then merge them into new cells, wihotut applying the calibration again - from Configurables import RedoSegmentation - rewriteHCalBarrel = RedoSegmentation("ReSegmentationHCalBarrel", - # old bitfield (readout) - oldReadoutName=hcalBarrelReadoutName, - # specify which fields are going to be altered (deleted/rewritten) - oldSegmentationIds=["row", "theta", "phi"], - # new bitfield (readout), with new segmentation (theta-phi grid) - newReadoutName=hcalBarrelReadoutName2, - OutputLevel=INFO, - debugPrint=200, - inhits=hcalBarrelPositionedCellsName, - outhits="HCalBarrelCellsWithoutRow") - TopAlg += [rewriteHCalBarrel] - - hcalBarrelPositionedCellsName2 = hcalBarrelReadoutName2 + "Positioned" - createHCalBarrelCells2 = CreatePositionedCaloCells("CreatePositionedHCalBarrelCells2", - doCellCalibration=False, - positionsTool=cellPositionHCalBarrelTool2, - addCellNoise=False, - filterCellNoise=False, - OutputLevel=INFO, - hits=rewriteHCalBarrel.outhits.Path, - cells=hcalBarrelPositionedCellsName2) - TopAlg += [createHCalBarrelCells2] - # Create cells in HCal endcap hcalEndcapPositionedCellsName = hcalEndcapReadoutName + "Positioned" createHCalEndcapCells = CreatePositionedCaloCells("CreatePositionedHCalEndcapCells", @@ -477,39 +427,11 @@ cells=hcalEndcapPositionedCellsName) TopAlg += [createHCalEndcapCells] - rewriteHCalEndcap = RedoSegmentation("ReSegmentationHCalEndcap", - # old bitfield (readout) - oldReadoutName=hcalEndcapReadoutName, - # specify which fields are going to be altered (deleted/rewritten) - oldSegmentationIds=["row", "theta", "phi"], - # new bitfield (readout), with new segmentation (theta-phi grid) - newReadoutName=hcalEndcapReadoutName2, - OutputLevel=INFO, - debugPrint=200, - inhits=hcalEndcapPositionedCellsName, - outhits="HCalEndcapCellsWithoutRow") - TopAlg += [rewriteHCalEndcap] - - hcalEndcapPositionedCellsName2 = hcalEndcapReadoutName2 + "Positioned" - createHCalEndcapCells2 = CreatePositionedCaloCells("CreatePositionedHCalEndcapCells2", - doCellCalibration=False, - positionsTool=cellPositionHCalEndcapTool2, - addCellNoise=False, - filterCellNoise=False, - OutputLevel=INFO, - hits=rewriteHCalEndcap.outhits.Path, - cells=hcalEndcapPositionedCellsName2) - TopAlg += [createHCalEndcapCells2] - else: hcalBarrelPositionedCellsName = "emptyCaloCells" - hcalBarrelPositionedCellsName2 = "emptyCaloCells" hcalEndcapPositionedCellsName = "emptyCaloCells" - hcalEndcapPositionedCellsName2 = "emptyCaloCells" cellPositionHCalBarrelTool = None - cellPositionHCalBarrelTool2 = None cellPositionHCalEndcapTool = None - cellPositionHCalEndcapTool2 = None # Empty cells for parts of calorimeter not implemented yet if doSWClustering or doTopoClustering: @@ -738,7 +660,7 @@ def setupTopoClusters(inputCells, # positionsEMFwdTool=inputPositioningTools.get('ecalFwd', None), positionsHCalBarrelTool=inputPositioningTools.get('hcalBarrel', None), positionsHCalBarrelNoSegTool=None, - positionsHCalExtBarrelTool=inputPositioningTools.get('hcalExtBarrel', None), + positionsHCalExtBarrelTool=inputPositioningTools.get('hcalEndcap', None), # positionsHECTool=inputPositioningTools.get('hcalEndcap', None), # positionsHFwdTool=inputPositioningTools.get('hcalFwd', None), noSegmentationHCal=False, @@ -876,14 +798,14 @@ def setupTopoClusters(inputCells, CaloClusterInputs = { "ecalBarrel": ecalBarrelPositionedCellsName, "ecalEndcap": ecalEndcapPositionedCellsName, - "hcalBarrel": hcalBarrelPositionedCellsName2, - "hcalEndcap": hcalEndcapPositionedCellsName2, + "hcalBarrel": hcalBarrelPositionedCellsName, + "hcalEndcap": hcalEndcapPositionedCellsName, } CaloClusterReadouts = { "ecalBarrel": ecalBarrelReadoutName, "ecalEndcap": ecalEndcapReadoutName, - "hcalBarrel": hcalBarrelReadoutName2, - "hcalEndcap": hcalEndcapReadoutName2, + "hcalBarrel": hcalBarrelReadoutName, + "hcalEndcap": hcalEndcapReadoutName, } setupSWClusters(CaloClusterInputs, CaloClusterReadouts, @@ -932,22 +854,25 @@ def setupTopoClusters(inputCells, if runHCal: CaloTopoClusterInputs = { "ecalBarrel": ecalBarrelPositionedCellsName, - "hcalBarrel": hcalBarrelPositionedCellsName2 + "hcalBarrel": hcalBarrelPositionedCellsName, + "hcalEndcap": hcalEndcapPositionedCellsName, } CaloTopoClusterReadouts = { "ecalBarrel": ecalBarrelReadoutName, - "hcalBarrel": hcalBarrelReadoutName2 + "hcalBarrel": hcalBarrelReadoutName, + "hcalEndcap": hcalEndcapReadoutName, } CaloTopoClusterPositioningTools = { "ecalBarrel": cellPositionEcalBarrelTool, - "hcalBarrel": cellPositionHCalBarrelTool2, + "hcalBarrel": cellPositionHCalBarrelTool, + "hcalEndcap": cellPositionHCalEndcapTool, } setupTopoClusters(CaloTopoClusterInputs, CaloTopoClusterReadouts, CaloTopoClusterPositioningTools, "CaloTopoClusters", 0.0, - dataFolder + "neighbours_map_ecalB_thetamodulemerged_hcalB_thetaphi.root", + dataFolder + "neighbours_map_ecalB_thetamodulemerged_hcalB_hcalEndcap_phitheta.root", dataFolder + "cellNoise_map_electronicsNoiseLevel_ecalB_thetamodulemerged_hcalB_thetaphi.root", False, False, @@ -1008,8 +933,8 @@ def setupTopoClusters(inputCells, if resegmentECalBarrel: io_svc.outputCommands.append("drop %s" % ecalBarrelPositionedCellsName2) if runHCal: - io_svc.outputCommands.append("drop %s" % hcalBarrelPositionedCellsName2) - io_svc.outputCommands.append("drop %s" % hcalEndcapPositionedCellsName2) + io_svc.outputCommands.append("drop %s" % hcalBarrelPositionedCellsName) + io_svc.outputCommands.append("drop %s" % hcalEndcapPositionedCellsName) if not saveClusterCells: io_svc.outputCommands.append("drop *Calo*Cluster*Cells*")