Skip to content
Snippets Groups Projects
Commit b5c8be4a authored by Paul James Laycock's avatar Paul James Laycock Committed by Graeme Stewart
Browse files

Adding DESDM_IDALIGN (PrimaryDPDMaker-00-06-04)

	* Added DESDM_IDALIGN (replacing ALLCELLS for some use cases)
	* Tagging as PrimaryDPDMaker-00-06-04

2016-04-20 Paul Laycock <paul.james.laycock@cern.ch>
	* Updated DAOD_IDPIXLUMI (David Salek)
	* Tagging as PrimaryDPDMaker-00-06-03

2016-04-14 Paul Laycock <paul.james.laycock@cern.ch>
	* Replaced DAOD_IDLUMI with DAOD_IDPIXLUMI
	* Tagging as PrimaryDPDMaker-00-06-02
parent e3545f87
No related branches found
No related tags found
No related merge requests found
......@@ -150,6 +150,19 @@ class WriteAllcellsStream(JobProperty):
jobproperties.PrimaryDPDFlags.add_JobProperty(WriteAllcellsStream)
listESDtoDPD.append(WriteAllcellsStream.StreamName)
class WriteIDALIGNStream(JobProperty):
""" Produce the primary DPD AllCells DPD."""
statusOn = True
allowedTypes = ['bool']
StoredValue = False
StreamName = "StreamDESDM_IDALIGN"
FileName = ""
isVirtual = False
DPDMakerScript = "PrimaryDPDMaker/DESDM_IDALIGN.py"
pass
jobproperties.PrimaryDPDFlags.add_JobProperty(WriteIDALIGNStream)
listESDtoDPD.append(WriteIDALIGNStream.StreamName)
class WriteDESDM_EGAMMAStream(JobProperty):
""" Produce the primary DPD EGamma DPD."""
statusOn = True
......@@ -408,18 +421,18 @@ class WriteDAOD_IDTRKLUMIStream(JobProperty):
jobproperties.PrimaryDPDFlags.add_JobProperty(WriteDAOD_IDTRKLUMIStream)
listESDtoDPD.append(WriteDAOD_IDTRKLUMIStream.StreamName)
class WriteDAOD_IDLUMIStream(JobProperty):
""" Produce the DPD for DAOD_IDLUMI - AOD with PrepRawData """
class WriteDAOD_IDPIXLUMIStream(JobProperty):
""" Produce the DPD for DAOD_IDPIXLUMI - AOD with PrepRawData """
statusOn = True
allowedTypes = ['bool']
StoredValue = False
StreamName = "StreamDAOD_IDLUMI"
StreamName = "StreamDAOD_IDPIXLUMI"
FileName = ""
isVirtual = False
DPDMakerScript = "PrimaryDPDMaker/DAOD_IDLUMI.py"
DPDMakerScript = "PrimaryDPDMaker/DAOD_IDPIXLUMI.py"
pass
jobproperties.PrimaryDPDFlags.add_JobProperty(WriteDAOD_IDLUMIStream)
listESDtoDPD.append(WriteDAOD_IDLUMIStream.StreamName)
jobproperties.PrimaryDPDFlags.add_JobProperty(WriteDAOD_IDPIXLUMIStream)
listESDtoDPD.append(WriteDAOD_IDPIXLUMIStream.StreamName)
class WriteDAOD_L1CALO1(JobProperty):
......
......@@ -7,34 +7,10 @@ from AthenaCommon.JobProperties import jobproperties as athCommonFlags
# Select active sub-systems
dumpPixInfo=True
# Bytestream errors (for sub-systems who have implemented it)
dumpBytestreamErrors=False
# Force to do not dump truth info if set to False
# (otherwise determined by autoconf below)
dumpTruthInfo=True
# Saves partial trigger information in the output stream (none otherwise)
dumpTriggerInfo=True
# Print settings for main tools
printIdTrkDxAODConf = True
## Autoconfiguration adjustements
isIdTrkDxAODSimulation = False
if (globalflags.DataSource == 'geant4'):
isIdTrkDxAODSimulation = True
if ( 'dumpTruthInfo' in dir() ):
dumpTruthInfo = dumpTruthInfo and isIdTrkDxAODSimulation
## Other settings
# Prefix for decoration, if any
prefixName = ""
## More fine-tuning available for each tool/alg below (default value shown)
#################
### Setup tools
#################
......@@ -58,10 +34,10 @@ if dumpPixInfo:
if dumpPixInfo:
from InDetPrepRawDataToxAOD.InDetPrepRawDataToxAODConf import PixelPrepDataToxAOD
xAOD_PixelPrepDataToxAOD = PixelPrepDataToxAOD( name = "IDLUMIxAOD_PixelPrepDataToxAOD")
xAOD_PixelPrepDataToxAOD = PixelPrepDataToxAOD( name = "xAOD_PixelPrepDataToxAOD")
## Content steering Properties (default value shown as comment)
xAOD_PixelPrepDataToxAOD.OutputLevel = INFO
xAOD_PixelPrepDataToxAOD.UseTruthInfo = dumpTruthInfo
xAOD_PixelPrepDataToxAOD.UseTruthInfo = False
xAOD_PixelPrepDataToxAOD.WriteRDOinformation = False
xAOD_PixelPrepDataToxAOD.WriteNNinformation = False
xAOD_PixelPrepDataToxAOD.WriteSDOs = True
......@@ -77,18 +53,11 @@ if dumpPixInfo:
#################
### Setup derivation framework
#################
#from AthenaCommon import CfgMgr
# Set up common services and job object.
# This should appear in ALL derivation job options
from DerivationFrameworkCore.DerivationFrameworkMaster import *
# Set up stream auditor
#from AthenaCommon.AppMgr import ServiceMgr as svcMgr
#if not hasattr(svcMgr, 'DecisionSvc'):
# svcMgr += CfgMgr.DecisionSvc()
#svcMgr.DecisionSvc.CalcStats = True
#====================================================================
# SET UP STREAM
......@@ -96,10 +65,10 @@ from DerivationFrameworkCore.DerivationFrameworkMaster import *
from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
from D2PDMaker.D2PDHelpers import buildFileName
from PrimaryDPDMaker.PrimaryDPDFlags import primDPD
streamName = primDPD.WriteDAOD_IDLUMIStream.StreamName
fileName = buildFileName( primDPD.WriteDAOD_IDLUMIStream )
IDLUMIStream = MSMgr.NewPoolRootStream( streamName, fileName )
IDLUMIStream.AcceptAlgs(["DFIDLUMI_KERN"])
streamName = primDPD.WriteDAOD_IDPIXLUMIStream.StreamName
fileName = buildFileName( primDPD.WriteDAOD_IDPIXLUMIStream )
IDPIXLUMIStream = MSMgr.NewPoolRootStream( streamName, fileName )
IDPIXLUMIStream.AcceptAlgs(["DFTSOS_KERN"])
......@@ -108,25 +77,19 @@ IDLUMIStream.AcceptAlgs(["DFIDLUMI_KERN"])
#################
augmentationTools=[]
# Set up stream auditor
#from AthenaCommon.AppMgr import ServiceMgr as svcMgr
#if not hasattr(svcMgr, 'DecisionSvc'):
# svcMgr += CfgMgr.DecisionSvc()
#svcMgr.DecisionSvc.CalcStats = True
# Add BS error augmentation tool
if dumpBytestreamErrors:
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EventInfoBSErrDecorator
DFEI = DerivationFramework__EventInfoBSErrDecorator(name = "DFEventInfoBSErrDecorator",
ContainerName = "EventInfo",
DecorationPrefix = prefixName,
OutputLevel =INFO)
ToolSvc += DFEI
augmentationTools+=[DFEI]
if (printIdTrkDxAODConf):
print DFEI
print DFEI.properties()
#from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EventInfoPixelDecorator
#DFEI = DerivationFramework__EventInfoPixelDecorator(name = "DFEventInfoPixelDecorator",
# DecorationPrefix = "PixelClusters",
# EventInfoKey = "EventInfo",
# SelectionString = "PixelClusters.bec==0",
# TrackMeasurementValidationKey = "PixelClusters",
# OutputLevel =INFO)
#ToolSvc += DFEI
#augmentationTools+=[DFEI]
#if (printIdTrkDxAODConf):
# print DFEI
# print DFEI.properties()
#====================================================================
......@@ -135,20 +98,21 @@ if dumpBytestreamErrors:
# Establish the thinning helper (which will set up the services behind the scenes)
from DerivationFrameworkCore.ThinningHelper import ThinningHelper
IDLUMIThinningHelper = ThinningHelper( "IDLUMIThinningHelper" )
IDLUMIThinningHelper.AppendToStream( IDLUMIStream )
IDPIXLUMIThinningHelper = ThinningHelper( "IDPIXLUMIThinningHelper" )
IDPIXLUMIThinningHelper.AppendToStream( IDPIXLUMIStream )
thinningTools = []
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackMeasurementThinning
thinning_expression = "PixelClusters.layer == 0"
IDLUMIThinningTool = DerivationFramework__TrackMeasurementThinning( name = "IDLUMIThinningTool",
ThinningService = IDLUMIThinningHelper.ThinningSvc(),
SelectionString = thinning_expression,
TrackMeasurementValidationKey = "PixelClusters",
ApplyAnd = False)
ToolSvc += IDLUMIThinningTool
thinningTools.append(IDLUMIThinningTool)
if dumpPixInfo:
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackMeasurementThinning
thinning_expression = "(PixelClusters.layer == 0) && ((PixelClusters.eta_module >= -10 && PixelClusters.eta_module <= -5) || (PixelClusters.eta_module >= 4 && PixelClusters.eta_module <= 9))"
IDPIXLUMIThinningTool = DerivationFramework__TrackMeasurementThinning( name = "IDPIXLUMIThinningTool",
ThinningService = IDPIXLUMIThinningHelper.ThinningSvc(),
SelectionString = thinning_expression,
TrackMeasurementValidationKey = "PixelClusters",
ApplyAnd = False)
ToolSvc += IDPIXLUMIThinningTool
thinningTools.append(IDPIXLUMIThinningTool)
#====================================================================
......@@ -156,7 +120,7 @@ thinningTools.append(IDLUMIThinningTool)
#====================================================================
from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__CommonAugmentation
DerivationFrameworkJob += CfgMgr.DerivationFramework__DerivationKernel("DFIDLUMI_KERN",
DerivationFrameworkJob += CfgMgr.DerivationFramework__DerivationKernel("DFTSOS_KERN",
AugmentationTools = augmentationTools,
ThinningTools = thinningTools,
OutputLevel =INFO)
......@@ -171,35 +135,15 @@ if (printIdTrkDxAODConf):
#====================================================================
from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
IDLUMISlimmingHelper = SlimmingHelper("IDLUMISlimmingHelper")
IDLUMISlimmingHelper.AppendToDictionary = {'PixelClusters': 'xAOD::TrackMeasurementValidationContainer', 'PixelClustersAux': 'xAOD::TrackMeasurementValidationAuxContainer'}
IDLUMISlimmingHelper.ExtraVariables = [ "PixelClusters.globalX.globalY.globalZ.bec.layer.phi_module.eta_module.eta_pixel_index.phi_pixel_index.sizePhi.sizeZ.nRDO.charge.ToT.LVL1A.isFake.gangedPixel.isSplit" ]
IDLUMISlimmingHelper.AppendContentToStream(IDLUMIStream)
# Add truth-related information
if dumpTruthInfo:
IDLUMIStream.AddItem("xAOD::TruthParticleContainer#*")
IDLUMIStream.AddItem("xAOD::TruthParticleAuxContainer#TruthParticlesAux.-caloExtension")
IDLUMIStream.AddItem("xAOD::TruthVertexContainer#*")
IDLUMIStream.AddItem("xAOD::TruthVertexAuxContainer#*")
IDLUMIStream.AddItem("xAOD::TruthEventContainer#*")
IDLUMIStream.AddItem("xAOD::TruthEventAuxContainer#*")
IDLUMIStream.AddItem("xAOD::TruthPileupEventContainer#*")
IDLUMIStream.AddItem("xAOD::TruthPileupEventAuxContainer#*")
IDPIXLUMISlimmingHelper = SlimmingHelper("IDPIXLUMISlimmingHelper")
IDPIXLUMISlimmingHelper.AppendToDictionary = {'PixelClusters': 'xAOD::TrackMeasurementValidationContainer', 'PixelClustersAux': 'xAOD::TrackMeasurementValidationAuxContainer'}
IDPIXLUMISlimmingHelper.ExtraVariables = [ "PixelClusters.bec.layer.phi_module.eta_module.sizePhi.sizeZ.nRDO.charge.ToT.LVL1A.isFake.gangedPixel.isSplit" ]
IDPIXLUMISlimmingHelper.AllVariables = [ "InDetTrackParticles", "PrimaryVertices" ]
IDPIXLUMISlimmingHelper.SmartCollections = [ "InDetTrackParticles", "PrimaryVertices" ]
IDPIXLUMISlimmingHelper.AppendContentToStream(IDPIXLUMIStream)
# Add trigger information
if dumpTriggerInfo:
IDLUMIStream.AddItem("xAOD::TrigT2MbtsBitsContainer#*")
IDLUMIStream.AddItem("xAOD::TrigDecision#xTrigDecision")
IDLUMIStream.AddItem("BCM_RDO_Container#BCM_RDOs")
IDLUMIStream.AddItem("xAOD::TrigNavigation#TrigNavigation")
IDLUMIStream.AddItem("xAOD::TrigConfKeys#TrigConfKeys")
IDLUMIStream.AddItem("HLT::HLTResult#HLTResult_HLT")
IDLUMIStream.AddItem("xAOD::TrigDecisionAuxInfo#xTrigDecisionAux.")
IDLUMIStream.AddItem("xAOD::TrigNavigationAuxInfo#TrigNavigationAux.")
IDLUMIStream.AddItem("xAOD::TrigT2MbtsBits#HLT_T2Mbts")
IDLUMIStream.AddItem("xAOD::TrigT2MbtsBitsAuxContainer#HLT_T2MbtsAux.")
IDLUMIStream.AddItem("xAOD::TrigT2MbtsBitsAuxContainer#HLT_xAOD__TrigT2MbtsBitsContainer_T2MbtsAux.")
if (printIdTrkDxAODConf):
print IDLUMIStream
print IDPIXLUMIStream
##-----------------------------------------------------------------------------
## Name: DESDM_IDALIGN.py
##
## Author: Paul Laycock
## Email: paul.james.laycock@cern.ch
##
## Description: Based on Allcells from Jamie, and then removing biggest Calo info for ID !
##
##-----------------------------------------------------------------------------
# If this file is already included, don't include it again
include.block("PrimaryDPDMaker/DESDM_IDALIGN.py")
## for messaging
from AthenaCommon.Logging import logging
allcellsDPDStream_msg = logging.getLogger( 'PrimaryDPD_PerfIDALIGNStream' )
## Import the module that allows to use named units, e.g. GeV
import AthenaCommon.SystemOfUnits as Units
## Include the job property flags for this package and from RecExCommon
from PrimaryDPDMaker.PrimaryDPDFlags import primDPD
from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName
from RecExConfig.RecFlags import rec
## This handels multiple output streams
from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
##====================================================================
## Write the used options to the log file
##====================================================================
#if rec.OutputLevel() <= INFO:
# allcellsDPDStream_msg.info('Values of all PrimaryDPDFlags_IDALIGNStream flags:')
# print primIDALIGNDPD
# pass
# ============================================================================
# Create a sub-sequence where all needed algorithms will run in
# ============================================================================
import AthenaCommon.CfgMgr as CfgMgr
desdIDALIGNSequence = CfgMgr.AthSequencer( 'DESDM_IDALIGN_Sequence',
StopOverride = True )
topSequence += desdIDALIGNSequence
##====================================================================
## Define the Single Electron DPD output stream
##====================================================================
streamName = primDPD.WriteIDALIGNStream.StreamName
fileName = buildFileName( primDPD.WriteIDALIGNStream )
if primDPD.WriteIDALIGNStream.isVirtual or primDPD.isVirtual() :
IDALIGNStream=MSMgr.NewVirtualStream( streamName, fileName )
pass
else:
IDALIGNStream=MSMgr.NewPoolStream( streamName, fileName )
pass
#---------------------------------------------------
# Add the containers to the output stream
#---------------------------------------------------
from PrimaryDPDMaker import PrimaryDPD_OutputDefinitions as dpdOutput
# Take everything from the input
ExcludeList=[ "TrackCollection#Tracks",
"InDet::PixelClusterContainer#PixelClusters",
"InDet::SCT_ClusterContainer#SCT_Clusters",
"InDet::TRT_DriftCircleContainer#TRT_DriftCircles",
"PRD_MultiTruthCollection#PRD_MultiTruthTRT",
"PRD_MultiTruthCollection#CSC_TruthMap",
"PRD_MultiTruthCollection#MDT_TruthMap",
"PRD_MultiTruthCollection#PRD_MultiTruthPixel",
"PRD_MultiTruthCollection#PRD_MultiTruthSCT",
"PRD_MultiTruthCollection#RPC_TruthMap",
"PRD_MultiTruthCollection#TGC_TruthMap",
"Muon::CscStripPrepDataContainer#CSC_Measurements",
"Muon::RpcPrepDataContainer#RPC_Measurements",
"Muon::TgcPrepDataContainer#TGC_Measurements",
"Muon::TgcPrepDataContainer#TGC_MeasurementsNextBC",
"Muon::TgcPrepDataContainer#TGC_MeasurementsPriorBC",
"Muon::MdtPrepDataContainer#MDT_DriftCircles",
"Muon::RpcCoinDataContainer#RPC_triggerHits",
"MuonSimDataCollection#MDT_SDO",
"MuonSimDataCollection#RPC_SDO",
"MuonSimDataCollection#TGC_SDO",
"CscSimDataCollection#CSC_SDO",
"CscRawDataContainer#CSCRDO",
"Muon::CscPrepDataContainer#CSC_Clusters",
"InDet::PixelGangedClusterAmbiguities#PixelClusterAmbiguitiesMap",
"InDet::PixelGangedClusterAmbiguities#SplitClusterAmbiguityMap",
"MdtCsmContainer#MDTCSM",
# not sure if the detailed track truth will be useful?
"DetailedTrackTruthCollection#ConvertedMBoyMuonSpectroOnlyTracksTruth",
"DetailedTrackTruthCollection#ConvertedMBoyTracksTruth",
"DetailedTrackTruthCollection#DetailedTrackTruth",
"DetailedTrackTruthCollection#MooreTracksTruth",
"DetailedTrackTruthCollection#MuonSpectrometerTracksTruth",
"DetailedTrackTruthCollection#ResolvedForwardTracksDetailedTruth",
"CaloCellContainer#AllCalo",
]
dpdOutput.addAllItemsFromInputExceptExcludeList(streamName,ExcludeList)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment