Skip to content
Snippets Groups Projects
Commit 009c7159 authored by Eric Torrence's avatar Eric Torrence
Browse files

reco updates

parent 36096e45
Branches
No related tags found
No related merge requests found
......@@ -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()))
......@@ -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")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment