Skip to content
Snippets Groups Projects
Commit 0803ad6c authored by Edward Moyse's avatar Edward Moyse
Browse files

Merge branch 'ART_tau' into 'master'

tauRec: add two ART tests

See merge request atlas/athena!31610
parents 63429bb7 ee8db773
No related branches found
No related tags found
No related merge requests found
...@@ -73,7 +73,7 @@ class TauRecCoreBuilder ( TauRecConfigured ) : ...@@ -73,7 +73,7 @@ class TauRecCoreBuilder ( TauRecConfigured ) :
#switch off TJVA if jet reco don't use tracks. #switch off TJVA if jet reco don't use tracks.
from JetRec.JetRecFlags import jetFlags from JetRec.JetRecFlags import jetFlags
if not jetFlags.useTracks(): if not tauFlags.isStandalone() and not jetFlags.useTracks():
self.do_TJVA = False # switch off TJVA self.do_TJVA = False # switch off TJVA
tools = [] tools = []
...@@ -86,7 +86,7 @@ class TauRecCoreBuilder ( TauRecConfigured ) : ...@@ -86,7 +86,7 @@ class TauRecCoreBuilder ( TauRecConfigured ) :
doMVATrackClassification = jobproperties.tauRecFlags.tauRecMVATrackClassification() doMVATrackClassification = jobproperties.tauRecFlags.tauRecMVATrackClassification()
doRNNTrackClassification = jobproperties.tauRecFlags.tauRecRNNTrackClassification() doRNNTrackClassification = jobproperties.tauRecFlags.tauRecRNNTrackClassification()
if InDetFlags.doVertexFinding(): if tauFlags.isStandalone() or InDetFlags.doVertexFinding():
tools.append(taualgs.getTauVertexFinder(doUseTJVA=self.do_TJVA)) tools.append(taualgs.getTauVertexFinder(doUseTJVA=self.do_TJVA))
tools.append(taualgs.getTauAxis()) tools.append(taualgs.getTauAxis())
tools.append(taualgs.getTauTrackFinder(removeDuplicateTracks=(not doMVATrackClassification) )) tools.append(taualgs.getTauTrackFinder(removeDuplicateTracks=(not doMVATrackClassification) ))
......
...@@ -31,6 +31,13 @@ class doTauRec(JobProperty): ...@@ -31,6 +31,13 @@ class doTauRec(JobProperty):
def get_Value(self): def get_Value(self):
return self.statusOn and self.StoredValue and jobproperties.tauRecFlags.Enabled() return self.statusOn and self.StoredValue and jobproperties.tauRecFlags.Enabled()
class isStandalone(JobProperty):
""" if standalone ESD -> AOD reconstruction
"""
statusOn=True
allowedTypes=['bool']
StoredValue=False
class tauRecSeedJetCollection(JobProperty): class tauRecSeedJetCollection(JobProperty):
""" jet collection used to seed tau reconstruction """ jet collection used to seed tau reconstruction
""" """
...@@ -192,7 +199,7 @@ class tauRecFlags(JobPropertyContainer): ...@@ -192,7 +199,7 @@ class tauRecFlags(JobPropertyContainer):
jobproperties.add_Container(tauRecFlags) jobproperties.add_Container(tauRecFlags)
# I want always the following flags in the Rec container # I want always the following flags in the Rec container
_list_tau=[Enabled,doTauRec,tauRecSeedJetCollection,tauRecToolsCVMFSPath,TauDiscriminantCVMFSPath,tauRecMVATrackClassification,tauRecRNNTrackClassification,tauRecMVATrackClassificationConfig,tauRecRNNTrackClassificationConfig,tauRecSeedMaxEta,tauRecToolsDevToolList,tauRecToolsDevToolListProcessor,doRunTauDiscriminant,useVertexBasedConvFinder,useNewPIDBasedConvFinder,doPanTau,doPi0,pi0EtCuts,pi0MVACuts_1prong,pi0MVACuts_mprong,shotPtCut_1Photon,shotPtCut_2Photons,useOldVertexFitterAPI] _list_tau=[Enabled,doTauRec,isStandalone,tauRecSeedJetCollection,tauRecToolsCVMFSPath,TauDiscriminantCVMFSPath,tauRecMVATrackClassification,tauRecRNNTrackClassification,tauRecMVATrackClassificationConfig,tauRecRNNTrackClassificationConfig,tauRecSeedMaxEta,tauRecToolsDevToolList,tauRecToolsDevToolListProcessor,doRunTauDiscriminant,useVertexBasedConvFinder,useNewPIDBasedConvFinder,doPanTau,doPi0,pi0EtCuts,pi0MVACuts_1prong,pi0MVACuts_mprong,shotPtCut_1Photon,shotPtCut_2Photons,useOldVertexFitterAPI]
for j in _list_tau: for j in _list_tau:
jobproperties.tauRecFlags.add_JobProperty(j) jobproperties.tauRecFlags.add_JobProperty(j)
del _list_tau del _list_tau
......
from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
athenaCommonFlags.FilesInput=["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/tauRec/input/standalone.ESD.pool.root"]
from RecExConfig.RecFlags import rec
rec.doEgamma.set_Value_and_Lock(False)
rec.doMuon.set_Value_and_Lock(False)
from CaloRec.CaloRecFlags import jobproperties
jobproperties.CaloRecFlags.Enabled.set_Value_and_Lock(False)
jobproperties.CaloRecFlags.doCaloCluster.set_Value_and_Lock(False)
jobproperties.CaloRecFlags.doCaloTopoCluster.set_Value_and_Lock(False)
#this turns off CaloCluster2xAOD
rec.doWritexAOD.set_Value_and_Lock(False)
#nothing to say on these
rec.doWriteTAG.set_Value_and_Lock(False)
rec.doTruth.set_Value_and_Lock(True)
rec.doAODCaloCells.set_Value_and_Lock(False)
rec.doTrigger.set_Value_and_Lock(False)
#Turns off xAODRingSetConfWriter
rec.doCaloRinger.set_Value_and_Lock(False)
#disables VertexCnvAlg
from InDetRecExample.InDetJobProperties import jobproperties
jobproperties.InDetJobProperties.doxAOD.set_Value_and_Lock(False)
#Disables AllExecutedEvents
rec.doFileMetaData.set_Value_and_Lock(False)
athenaCommonFlags.EvtMax=10
# Run TauVertexFinder with TJVA on
from tauRec.tauRecFlags import tauFlags
tauFlags.isStandalone.set_Value_and_Lock(True)
UserAlgs = ["tauRec/tauRec_jobOptions.py"]
include ("RecExCommon/RecExCommon_topOptions.py")
#!/bin/bash
#
# art-description: ART for standalone tau reconstruction
# art-type: grid
# art-include: master/Athena
# art-output: myAOD.pool.root
# art-output: NTUP_PHYSVAL.root
# art-output: rootcomp.root
# art-output: *.log
# art-output: *.ps
NEVENTS=1000
REF_DIR="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/tauRec/reference/q431"
# run the reconstruction
Reco_tf.py --maxEvents=${NEVENTS} --AMI=q431
echo "art-result: $? Reconstrution"
# compare the AOD file
art.py compare ref --entries ${NEVENTS} --mode=semi-detailed --order-trees --diff-root myAOD.pool.root ${REF_DIR}/myAOD.pool.root >> AOD_diff_root.log 2>&1
echo "art-result: $? diff-root"
# run the physics validation
Reco_tf.py --maxEvents=${NEVENTS} --validationFlags 'noExample,doTau' --inputAODFile=myAOD.pool.root --outputNTUP_PHYSVALFile=NTUP_PHYSVAL.root
echo "art-result: $? PhysVal"
# compare the histograms
rootcomp.py NTUP_PHYSVAL.root ${REF_DIR}/NTUP_PHYSVAL.root >> rootcomp.log 2>&1
echo "art-result: $? rootcomp"
#!/bin/bash
#
# art-description: ART for standalone tau reconstruction
# art-type: grid
# art-include: master/Athena
# art-output: *.root
# art-output: *.log
# art-output: *.ps
NEVENTS=1000
REF_DIR="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/tauRec/reference/standalone"
# run the reconstruction
athena.py --evtMax=${NEVENTS} tauRec/tau_standalone_ESDtoAOD.py >> tau_standalone.log 2>&1
echo "art-result: $? Reconstrution"
# compare the AOD file
art.py compare ref --entries ${NEVENTS} --mode=semi-detailed --order-trees --diff-root AOD.pool.root ${REF_DIR}/AOD.pool.root >> AOD_diff_root.log 2>&1
echo "art-result: $? diff-root"
# run the physics validation
Reco_tf.py --maxEvents=${NEVENTS} --validationFlags 'noExample,doTau' --inputAODFile=AOD.pool.root --outputNTUP_PHYSVALFile=NTUP_PHYSVAL.root
echo "art-result: $? PhysVal"
# compare the histograms
rootcomp.py NTUP_PHYSVAL.root ${REF_DIR}/NTUP_PHYSVAL.root >> rootcomp.log 2>&1
echo "art-result: $? rootcomp"
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