Commit e03a9be7 authored by Paul James Laycock's avatar Paul James Laycock Committed by Graeme Stewart
Browse files

Bugfix for DAOD_IDNCB (PrimaryDPDMaker-00-06-10)

	* Bugfix DAOD_IDNCB, will need to remove line 165 if DerivationFrameworkInDet-00-00-56 or greater is used
	* Tagging as PrimaryDPDMaker-00-06-10

2016-05-11 Paul Laycock <paul.james.laycock@cern.ch>
	* Added Tau jet selection to DESDM_CALJET for Quentin Buat
	* Tagging as PrimaryDPDMaker-00-06-09

2016-05-10 Paul Laycock <paul.james.laycock@cern.ch>
	* Bugfix DAOD_IDNCB
	* Tagging as PrimaryDPDMaker-00-06-08
parent 04076bce
......@@ -160,12 +160,12 @@ DFIDNCB = DerivationFramework__TrackStateOnSurfaceDecorator(name = "DFTrackState
StorePixel = dumpPixInfo,
IsSimulation = isIdTrkDxAODSimulation,
OutputLevel = INFO)
if dumpTrtInfo:
#Add tool to calculate TRT-based dEdx
DFIDNCB.TRT_ToT_dEdx = TRT_dEdx_Tool
# this variable is redundant and remove from DerivationFrameworkInDet-00-00-56
DFIDNCB.TRT_ToT_dEdx = TRT_dEdx_Tool
ToolSvc += DFIDNCB
augmentationTools+=[DFIDNCB]
if (printIdTrkDxAODConf):
print DFIDNCB
print DFIDNCB.properties()
......@@ -204,6 +204,7 @@ if dumpUnassociatedHits:
OutputLevel =INFO)
ToolSvc += unassociatedHitsDecorator
augmentationTools+=[unassociatedHitsDecorator]
if (printIdTrkDxAODConf):
print unassociatedHitsDecorator
print unassociatedHitsDecorator.properties()
......@@ -223,6 +224,7 @@ if dumpLArCollisionTime:
OutputLevel =INFO)
ToolSvc += lArCollisionTimeDecorator
augmentationTools+=[lArCollisionTimeDecorator]
if (printIdTrkDxAODConf):
print lArCollisionTimeDecorator
print lArCollisionTimeDecorator.properties()
......@@ -236,6 +238,7 @@ skimmingTools = []
#====================================================================
# Thinning Tools
#====================================================================
thinningTools = []
# TrackParticles directly
......@@ -248,12 +251,43 @@ IDNCBThinningTool = DerivationFramework__TrackParticleThinning(name = "IDNCBThin
ToolSvc += IDNCBThinningTool
thinningTools.append(IDNCBThinningTool)
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackMeasurementThinning
thin_sct = "SCT_Clusters.bec != 0"
IDNCBThinningTool_sct = DerivationFramework__TrackMeasurementThinning( name = "IDNCBSCTThinningTool",
ThinningService = "IDNCBThinningSvc",
SelectionString = thin_sct,
TrackMeasurementValidationKey = "SCT_Clusters",
ApplyAnd = False)
ToolSvc += IDNCBThinningTool_sct
thinningTools.append(IDNCBThinningTool_sct)
thin_pix = "PixelClusters.bec != 0"
IDNCBThinningTool_pix = DerivationFramework__TrackMeasurementThinning( name = "IDNCBPIXThinningTool",
ThinningService = "IDNCBThinningSvc",
SelectionString = thin_pix,
TrackMeasurementValidationKey = "PixelClusters",
ApplyAnd = False)
ToolSvc += IDNCBThinningTool_pix
thinningTools.append(IDNCBThinningTool_pix)
thin_trt = "(TRT_DriftCircles.bec != -2) && (TRT_DriftCircles.layer > 5)"
IDNCBThinningTool_trt = DerivationFramework__TrackMeasurementThinning( name = "IDNCBTRTThinningTool",
ThinningService = "IDNCBThinningSvc",
SelectionString = thin_trt,
TrackMeasurementValidationKey = "TRT_DriftCircles",
ApplyAnd = False)
ToolSvc += IDNCBThinningTool_trt
thinningTools.append(IDNCBThinningTool_trt)
#====================================================================
# Create the derivation Kernel and setup output stream
#====================================================================
# Add the derivation job to the top AthAlgSeqeuence
# DerivationJob is COMMON TO ALL DERIVATIONS
DerivationFrameworkJob = CfgMgr.AthSequencer("MySeq2")
DerivationFrameworkJob = CfgMgr.AthSequencer("IDNCBSeq")
from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__CommonAugmentation
DerivationFrameworkJob += CfgMgr.DerivationFramework__DerivationKernel("DFIDNCB_KERN",
AugmentationTools = augmentationTools,
......@@ -289,7 +323,9 @@ evtStream = augStream.GetEventStream()
svcMgr += createThinningSvc( svcName="IDNCBThinningSvc", outStreams=[evtStream] )
excludedAuxData = "-caloExtension.-cellAssociation.-clusterAssociation.-trackParameterCovarianceMatrices.-parameterX.-parameterY.-parameterZ.-parameterPX.-parameterPY.-parameterPZ.-parameterPosition"
excludeTRT="-board.-chip.-T0.-driftTimeToTCorrection.-driftTimeHTCorrection.-highThreshold.-bitPattern.-truth_barcode.-strawnumber"
excludedTRTData = "-T0.-TRTboard.-TRTchip.-bitPattern.-driftTimeToTCorrection.-driftTimeHTCorrection.-highThreshold.-strawnumber"
excludedSCTData = "-detectorElementID.-hitsInThirdTimeBin.-rdo_groupsize"
# Add generic event information
IDNCBStream.AddItem("xAOD::EventInfo#*")
IDNCBStream.AddItem("xAOD::EventAuxInfo#*")
......@@ -334,6 +370,10 @@ if dumpTruthInfo:
#SKC---always include BCM information!
IDNCBStream.AddItem("BCM_RDO_Container#BCM_RDOs")
#PJL - Slim the SCT and TRT data
IDNCBStream.AddItem("xAOD::TrackMeasurementValidationAuxContainer#TRT_DriftCirclesAux."+excludedTRTData)
IDNCBStream.AddItem("xAOD::TrackMeasurementValidationAuxContainer#SCT_ClustersAux."+excludedSCTData)
if dumpTriggerInfo:
IDNCBStream.AddMetaDataItem("xAOD::TriggerMenuContainer#TriggerMenu")
IDNCBStream.AddMetaDataItem("xAOD::TriggerMenuAuxContainer#TriggerMenuAux.")
......
......@@ -3,6 +3,8 @@
##
## Author: Christopher Young (CERN)
## Email: christopher.young@cern.ch
## Modified: Quentin Buat (Adding tau part)
## Email: quentin.buat@cern.ch
##
## Description: This defines the content of the CalJet DPD output stream.
##
......@@ -10,6 +12,10 @@
# Sequence
from AthenaCommon.AlgSequence import AlgSequence
from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool
from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__FilterCombinationOR
from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__FilterCombinationAND
from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__PrescaleTool
topSequence = AlgSequence()
DESDM_CALJET_Seq = CfgMgr.AthSequencer("DESDM_CALJET_Seq")
......@@ -41,11 +47,8 @@ prescaleF = 10
prescaleG = 5
prescaleH = 1
# Event selection tool
from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool
from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__FilterCombinationOR
from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__FilterCombinationAND
from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__PrescaleTool
DESDM_CALJET_SkimmingToolA = DerivationFramework__xAODStringSkimmingTool(name = "DESDM_CALJET_SkimmingToolA", expression = desd_jetA)
ToolSvc += DESDM_CALJET_SkimmingToolA
......@@ -99,8 +102,75 @@ ToolSvc += DESDM_CALJET_ANDToolG
DESDM_CALJET_SkimmingToolH = DerivationFramework__xAODStringSkimmingTool(name = "DESDM_CALJET_SkimmingToolH", expression = desd_jetH)
ToolSvc += DESDM_CALJET_SkimmingToolH
DESDM_CALJET_ORTool = DerivationFramework__FilterCombinationOR(name="myLogicalCombination", FilterList=[DESDM_CALJET_ANDToolA,DESDM_CALJET_ANDToolB,DESDM_CALJET_ANDToolC,DESDM_CALJET_ANDToolD,DESDM_CALJET_ANDToolE,DESDM_CALJET_ANDToolF,DESDM_CALJET_ANDToolG,DESDM_CALJET_SkimmingToolH] )
##============================================================================
## Define the skimming for the DESDM_CALJET output stream for the taus
##============================================================================
# Object selection strings
sel_tau = '(TauJets.pt > 20.0*GeV) && (abs(TauJets.eta) < 2.6) && (TauJets.nTracks == 1 || TauJets.nTracks == 3)'
prescale_rules = {
'HLT_j15': 1,
'HLT_j25': 1,
'HLT_j35': 3,
'HLT_j45': 4,
'HLT_j55': 4,
'HLT_j85': 8,
'HLT_j110': 20,
'HLT_j175': 20,
'HLT_j260': 20,
'HLT_j360': 400,
}
# Define skimming and prescale tool for each trigger
TauCombTools = []
for trigger in prescale_rules.keys():
expression = '{0} && count({1}) >= 1'.format(
trigger, sel_tau)
# skimming tool
skimming_tool_name = "DESDM_CALJET_TauSkimmingTool_{0}".format(trigger)
TauSkimmingTool = DerivationFramework__xAODStringSkimmingTool(
name=skimming_tool_name, expression=expression)
ToolSvc += TauSkimmingTool
# prescale tool
prescale_tool_name = "DESDM_CALJET_TauPrescaleTool_{0}".format(trigger)
TauPrescaleTool = DerivationFramework__PrescaleTool(
name=prescale_tool_name, Prescale=prescale_rules[trigger])
ToolSvc += TauPrescaleTool
# Skimming AND Prescale
TauCombTool = DerivationFramework__FilterCombinationAND(
name="DESDM_CALJET_Tau_{0}".format(trigger),
FilterList=[TauSkimmingTool, TauPrescaleTool])
TauCombTools.append(TauCombTool)
ToolSvc += TauCombTool
filter_list = [
DESDM_CALJET_ANDToolA,
DESDM_CALJET_ANDToolB,
DESDM_CALJET_ANDToolC,
DESDM_CALJET_ANDToolD,
DESDM_CALJET_ANDToolE,
DESDM_CALJET_ANDToolF,
DESDM_CALJET_ANDToolG,
DESDM_CALJET_SkimmingToolH
]
filter_list += TauCombTools
DESDM_CALJET_ORTool = DerivationFramework__FilterCombinationOR(
name="TauCalTauTool", FilterList=filter_list)
ToolSvc += DESDM_CALJET_ORTool
print DESDM_CALJET_ORTool
# Kernel algorithm
from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment