From 009c715944a6f26c60e9f6a2f08ff98221288a3d Mon Sep 17 00:00:00 2001 From: Eric Torrence <eric.torrence@cern.ch> Date: Thu, 26 May 2022 07:09:19 +0200 Subject: [PATCH] reco updates --- .../Reconstruction/scripts/faserMDC_reco.py | 53 +++++++++++++------ .../Reconstruction/scripts/faser_reco.py | 5 ++ 2 files changed, 41 insertions(+), 17 deletions(-) diff --git a/Control/CalypsoExample/Reconstruction/scripts/faserMDC_reco.py b/Control/CalypsoExample/Reconstruction/scripts/faserMDC_reco.py index 15632432..52f8b012 100755 --- a/Control/CalypsoExample/Reconstruction/scripts/faserMDC_reco.py +++ b/Control/CalypsoExample/Reconstruction/scripts/faserMDC_reco.py @@ -7,11 +7,11 @@ # filepath - fully qualified path, including url if needed, to the input raw data file # example: "root://hepatl30//atlas/local/torrence/faser/commissioning/TestBeamData/Run-004150/Faser-Physics-004150-00000.raw" # -# runtype - optionally specify the data type (TI12Data, TI12Data02, or TestBeamData). +# runtype - optionally specify the data type (TI12Data, TI12Data02, TI12Data03 or TestBeamData). # In a normal file system location, this will be extracted from the directory name, # but runtype will override this assignment. -# TI12Data02 is needed for the IFT geometry. -# MDC will assume this geometry. +# > TI12Data02 is needed for the IFT geometry. +# MDC will assume TI12Data03 geometry. # import sys import time @@ -45,7 +45,7 @@ if len(args.run_type) > 0: # Assume based on MDC reco else: - runtype = "TI12Data02" + runtype = "TI12Data03" # Assume this is MC args.isMC = True @@ -72,6 +72,10 @@ ConfigFlags.IOVDb.DatabaseInstance = "OFLP200" # Use MC conditions for now ConfigFlags.Input.ProjectName = "data20" ConfigFlags.GeoModel.Align.Dynamic = False +# Test these... +#ConfigFlags.Detector.GeometryFaserSCT = True +#ConfigFlags.TrackingGeometry.MaterialSource = "Input" # Needs json file + # TI12 Cosmics geometry if runtype == "TI12Data": ConfigFlags.GeoModel.FaserVersion = "FASER-01" @@ -87,6 +91,11 @@ elif runtype == "TI12Data02": ConfigFlags.GeoModel.FaserVersion = "FASER-02" ConfigFlags.IOVDb.GlobalTag = "OFLCOND-FASER-02" +# Final 2022 TI12 geometry +elif runtype == "TI12Data03": + ConfigFlags.GeoModel.FaserVersion = "FASERNU-03" + ConfigFlags.IOVDb.GlobalTag = "OFLCOND-FASER-02" + else: print("Invalid run type found:", runtype) print("Specify correct type or update list") @@ -142,16 +151,29 @@ acc.merge(WaveformReconstructionCfg(ConfigFlags)) # Tracker clusters from TrackerPrepRawDataFormation.TrackerPrepRawDataFormationConfig import FaserSCT_ClusterizationCfg -acc.merge(FaserSCT_ClusterizationCfg(ConfigFlags)) +acc.merge(FaserSCT_ClusterizationCfg(ConfigFlags, DataObjectName="SCT_RDOs")) +# # SpacePoints from TrackerSpacePointFormation.TrackerSpacePointFormationConfig import TrackerSpacePointFinderCfg acc.merge(TrackerSpacePointFinderCfg(ConfigFlags)) -print("Configuring TrackerSegmentFit (new)") # Try Dave's new fitter +print("Configuring TrackerSegmentFit (new)") from TrackerSegmentFit.TrackerSegmentFitConfig import SegmentFitAlgCfg -acc.merge(SegmentFitAlgCfg(ConfigFlags)) +acc.merge(SegmentFitAlgCfg(ConfigFlags, + SharedHitFraction=0.61, + MinClustersPerFit=5, + TanThetaXZCut=0.083)) +# +# Ghost removal +from FaserActsKalmanFilter.GhostBustersConfig import GhostBustersCfg +acc.merge(GhostBustersCfg(ConfigFlags)) + +# +# Kalman Filter for tracking +from FaserActsKalmanFilter.CKF2Config import CKF2Cfg +acc.merge(CKF2Cfg(ConfigFlags, noDiagnostics=True)) # # Configure output @@ -163,9 +185,13 @@ itemList = [ "xAOD::EventInfo#*" , "FaserSCT_RDO_Container#*" , "Tracker::FaserSCT_ClusterContainer#*" , "FaserSCT_SpacePointContainer#*" - #, "FaserSCT_SpacePointOverlapCollection#*" , "TrackCollection#*" ] +# +if args.isMC: + # Add truth records here? + itemList.extend( ["BeamTruthEvent#*", "TruthEvent#*" ] ) + acc.merge(OutputStreamCfg(ConfigFlags, "xAOD", itemList)) # Waveform reconstruction output @@ -189,16 +215,9 @@ if not args.isMC: replicaSvc.UseGeomSQLite = True # Configure verbosity -# ConfigFlags.dump() +ConfigFlags.dump() if args.verbose: acc.foreach_component("*").OutputLevel = VERBOSE - - #acc.getService("FaserByteStreamInputSvc").DumpFlag = True - #acc.getService("FaserEventSelector").OutputLevel = VERBOSE - #acc.getService("FaserByteStreamInputSvc").OutputLevel = VERBOSE - #acc.getService("FaserByteStreamCnvSvc").OutputLevel = VERBOSE - #acc.getService("FaserByteStreamAddressProviderSvc").OutputLevel = VERBOSE - else: acc.foreach_component("*").OutputLevel = INFO @@ -213,5 +232,5 @@ b = time.time() from AthenaCommon.Logging import log log.info(f"Finish execution in {b-a} seconds") -sys.exit(int(sc.isFailure)) +sys.exit(int(sc.isFailure())) diff --git a/Control/CalypsoExample/Reconstruction/scripts/faser_reco.py b/Control/CalypsoExample/Reconstruction/scripts/faser_reco.py index 1579f4c1..78a097b6 100755 --- a/Control/CalypsoExample/Reconstruction/scripts/faser_reco.py +++ b/Control/CalypsoExample/Reconstruction/scripts/faser_reco.py @@ -110,6 +110,11 @@ elif runtype == "TI12Data02": ConfigFlags.GeoModel.FaserVersion = "FASER-02" ConfigFlags.IOVDb.GlobalTag = "OFLCOND-FASER-02" +# Final 2022 TI12 geometry +elif runtype == "TI12Data03": + ConfigFlags.GeoModel.FaserVersion = "FASERNU-03" + ConfigFlags.IOVDb.GlobalTag = "OFLCOND-FASER-02" + else: print("Invalid run type found:", runtype) print("Specify correct type or update list") -- GitLab