Commit 624a749e authored by Atlas-Software Librarian's avatar Atlas-Software Librarian Committed by Graeme Stewart
Browse files

'CMakeLists.txt' (PanTauExample-00-04-00)

parent 0898a595
################################################################################
# Package: PanTauExample
################################################################################
# Declare the package name:
atlas_subdir( PanTauExample )
# Install files from the package:
atlas_install_joboptions( share/*.py )
package PanTauExample
author Peter Wienemann <peter.wienemann@cern.ch>
author Sebastian Fleischmann <Sebastian.Fleischmann@cern.ch>
public
use AtlasPolicy AtlasPolicy-*
private
apply_pattern declare_joboptions files="*.py"
use AtlasReconstructionRunTime AtlasReconstructionRunTime-*
branches run
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
/**
@mainpage PanTauExample Package
This package contains job option fragments for PanTau.
@author Peter Wienemann <peter.wienemann@cern.ch>
@author Sebastian Fleischmann <Sebastian.Fleischmann@cern.ch>
@section PanTauExampleIntro Introduction
Job option fragments for PanTau.
@section PanTauExampleReq Requirements
@include requirements
*/
# @file: PanTauGangaReconstruction.py
# @purpose: generic job submission script to run PanTau reconstruction with Ganga
__doc__ = "generic job submission script to run PanTau reconstruction with Ganga"
__author__ = "Robindra Prabhu"
__version__= "$Revision: 478539 $"
# --- Job modifiers: ---
nameprefix="PanTau_" # output AOD prefix
namesuffix=".recon.AOD.v15040000" # output AOD suffix
numevents_outputfiles=500 # number of desired events in output AODs
# --- Lists of datasets on the NAF: ---
ztautau = ['misal1_mc12.005179.ZtautauNoEF.digit.RDO.v12000605_tid013376'
]
wtauhad = ['misal1_csc11.005107.pythia_Wtauhad.digit.RDO.v12003103_tid003860',
'misal1_csc11.005107.pythia_Wtauhad.digit.RDO.v12003103_tid004537'
]
su1 = ['misal1_csc11.005401.SU1_jimmy_susy.digit.RDO.v12003107_tid006467',
'misal1_csc11.005401.SU1_jimmy_susy.digit.RDO.v12003107_tid008572',
]
su3 = ['misal1_csc11.005403.SU3_jimmy_susy.digit.RDO.v12003107_tid006463',
'misal1_csc11.005403.SU3_jimmy_susy.digit.RDO.v12003107_tid006468'
]
j0 = ['misal1_csc11.005009.J0_pythia_jetjet.digit.RDO.v12003103/',
#'misal1_csc11.005009.J0_pythia_jetjet.digit.RDO.v12003103_tid004079',
#'misal1_csc11.005009.J0_pythia_jetjet.digit.RDO.v12003103_tid010585',
#'misal1_csc11.005009.J0_pythia_jetjet.digit.RDO.v12003103_tid016351',
#'misal1_csc11.005009.J0_pythia_jetjet.digit.RDO.v12003103_tid016352',
#'misal1_csc11.005009.J0_pythia_jetjet.digit.RDO.v12003103_tid018026'
]
j1 = ['ideal2_mc12.005010.J1_pythia_jetjet.digit.RDO.v13003004_tid018228',
'ideal2_mc12.005010.J1_pythia_jetjet.digit.RDO.v13003004_tid018229'
]
j2 = ['ideal2_mc12.005011.J2_pythia_jetjet.digit.RDO.v13003004_tid018733',
'ideal2_mc12.005011.J2_pythia_jetjet.digit.RDO.v13003004_tid018735'
]
j3 = [#'ideal2_mc12.005012.J3_pythia_jetjet.digit.RDO.v13003004/'
'ideal2_mc12.005012.J3_pythia_jetjet.digit.RDO.v13003004_tid018737',
#'ideal2_mc12.005012.J3_pythia_jetjet.digit.RDO.v13003004_tid018738',
'ideal2_mc12.005012.J3_pythia_jetjet.digit.RDO.v13003004_tid018740'
]
sample_list = []
sample_list.append( ztautau )
#sample_list.append( wtauhad )
#sample_list.append( su1 )
#sample_list.append( su3 )
#sample_list.append( j0 )
#sample_list.append( j1 )
#sample_list.append( j2 )
#sample_list.append( j3 )
geometryTag=''
numfilespersubjob=0
for sample in sample_list:
nametag = sample[0].split('.')[2]
if sample is j1 or sample is j2 or sample is j3:
geometryTag = 'DetDescrVersion="ATLAS-CSC-02-00-00"'
numfilespersubjob = int(numevents_outputfiles)/int(25)
else:
geometryTag = 'DetDescrVersion="ATLAS-CSC-01-02-00"'
numfilespersubjob = int(numevents_outputfiles)/int(50)
# --- Job application: ---
j = Job()
j.name="PanTauReco_"
j.application=Athena()
j.application.option_file=['$TestArea/Reconstruction/PanTau/PanTauExample/share/PanTau_topOptions.py']
#j.application.options = '-d'
j.application.options = '-c'+geometryTag
j.application.exclude_from_user_area=["*.o","*.root*","*.exe"]
j.application.prepare_old(athena_compile=False)
#j.application.max_events=2
# --- Inputdata options: ---
j.inputdata=DQ2Dataset()
j.inputdata.dataset= sample
# --- Outputdata options: ---
#j.outputdata=ATLASOutputDataset()
j.outputdata=DQ2OutputDataset()
j.outputdata.outputdata=['AOD.pool.root']
#j.outputdata.location = '/scratch/current/atlas/prabhu/'
#j.outputdata.location = 'DESY-HH_SCRATCHDISK'
j.outputdata.location = 'DESY-HH_LOCALGROUPDISK'
j.outputdata.use_shortfilename = False
j.outputdata.datasetname = nameprefix + nametag + namesuffix
# --- Splitter options: ---
j.splitter=AthenaSplitterJob()
j.splitter.numfiles_subjob=numfilespersubjob
#j.splitter.match_subjobs_files=True
#j.splitter.numsubjobs=2
# --- Merger options: ---
#j.merger=AthenaOutputMerger()
# --- Backend options: ---
#j.backend=Local()
j.backend=SGE()
# --- Job submission: ---
j.name = j.name + nametag
print 'submitting ', j.name
j.submit()
from JetRec.JetGetters import *
#from JetRec.JetRecConf import JetSetCalibStateTool
#from JetRecTools.JetRecToolsConf import JetSetCalibStateTool
from JetCalibTools.JetCalibToolsConf import JetCalibrationTool
def make_eflowJet(finder, param):
#getStandardPostProcessTool(input, doCalib , **options):
#mytoollist_AntiKt04 += getStandardPostProcessTool('Eflow', doCalib=False,addDefaultMoment=True)
#mygetter_AntiKt04 = make_customJetGetter(getterDict_AntiKt04,
#mytoollist_AntiKt04)
# create tool list
toolist = []
# add standard jet finder(cone,kt,anti-kt,etc.) to tool list
toolist += getStandardFinderTools(finder, param)
# configure jet signal selector
initT = JetSignalSelectorTool('JetInitialEtCut')
initT.UseTransverseEnergy = True
initT.MinimumSignal = 0*GeV
toolist += [initT]
finalT = JetSignalSelectorTool('JetFinalEtCut')
finalT.UseTransverseEnergy = True
finalT.UseTransverseMomentum = False
finalT.UseEnergy = False
finalT.MinimumSignal = 7*GeV
finalT.OutputLevel = 2
toolist += [finalT]
# ------------------------------------------------
sortT = JetSorterTool('JetSorter')
toolist += [sortT]
sortT.SortOrder="ByEtDown"
# ------------------------------------------------
# ------------------------------------------------
# append calibration tool to tool list
#calibState = JetSetCalibStateTool('EflowCalibState')
#calibState = JetSetCalibStateTool("eflowSetCalibState")
calibTool = JetCalibrationTool('CalibDummy')
#toolist += [calibTool]
# ------------------------------------------------
# create an attribute dictionnary
#mydic = dict(customJetParams.getterDict)
mydic = dict(jet_attribute_dict)
mydic['_finderType'] = finder
#mydic['_finderSuff'] = 'Bis'
mydic['_finderParams'] = [param]
mydic['_inputType'] = 'eflowObject'
mydic['_inputColl'] = ["eflowObjects01Prime"]
mygetter = make_customJetGetter(mydic, toolist)
return mygetter
# Make custom jets for seeding
include("PanTauExample/PanTauGenericJetGetter.py")
kt6alg = make_eflowJet('Kt', 0.6).jetAlgorithmHandle()
kt6alg.JetCollectionName="EflowKt06Jets"
kt4alg = make_eflowJet('Kt', 0.4).jetAlgorithmHandle()
kt4alg.JetCollectionName="EflowKt04Jets"
kt2alg = make_eflowJet('Kt', 0.2).jetAlgorithmHandle()
kt2alg.JetCollectionName="EflowKt02Jets"
cone7alg = make_eflowJet('Cone',0.7).jetAlgorithmHandle()
cone7alg.JetCollectionName="EflowCone7Jets"
cone4alg = make_eflowJet('Cone',0.4).jetAlgorithmHandle()
cone4alg.JetCollectionName="EflowCone4Jets"
cone2alg = make_eflowJet('Cone',0.2).jetAlgorithmHandle()
cone2alg.JetCollectionName="EflowCone2Jets"
sisCone2alg = make_eflowJet('SISCone',0.2).jetAlgorithmHandle()
sisCone2alg.JetCollectionName="EflowSISCone2Jets"
sisCone4alg = make_eflowJet('SISCone',0.4).jetAlgorithmHandle()
sisCone4alg.JetCollectionName="EflowSISCone4Jets"
antiKt2alg = make_eflowJet('AntiKt',0.2).jetAlgorithmHandle()
antiKt2alg.JetCollectionName="EflowAntiKt02Jets"
antiKt4alg = make_eflowJet('AntiKt',0.4).jetAlgorithmHandle()
antiKt4alg.JetCollectionName="EflowAntiKt04Jets"
camKt2alg = make_eflowJet('CamKt',0.2).jetAlgorithmHandle();
camKt2alg.JetCollectionName="EflowCamKt02Jets"
camKt4alg = make_eflowJet('CamKt',0.4).jetAlgorithmHandle();
camKt4alg.JetCollectionName="EflowCamKt04Jets"
# Make eflowRec cone jet
#from eflowRec.ConeJetEFlowGetter import ConeJetEFlowGetter
#ConeJetEFlow=ConeJetEFlowGetter()
# PanTau options
#from PanTauAlgs.PanTauAlgsConf import PanTau__TauSeedBuilderAlg
#panTauSeedBuilder = PanTau__TauSeedBuilderAlg('TauSeedBuilderAlg')
#panTauSeedBuilder.EflowJetCollectionName = "EflowConeJets"
#panTauSeedBuilder.OutputLevel=1
#topSequence+=panTauSeedBuilder
#PanTauAOD_ItemList=["eflowObjectContainer#eflowObjects*"]
# add all cluster container to output list
# (not all eflow cluster container are written out by default)
#PanTauAOD_ItemList+=["CaloClusterContainer#*"]
from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
athenaCommonFlags.FilesInput=["/tmp/limbach/mc12_8TeV.147916.Pythia8_AU2CT10_jetjet_JZ6W.recon.ESD.e1126_s1599_s1600_r4156_tid01090382_00/ESD.01090382._000092.pool.root.1"]
athenaCommonFlags.EvtMax=20
from RecExConfig.RecFlags import rec#,Rec
rec.doCBNT.set_Value_and_Lock(False)
rec.doWriteESD.set_Value_and_Lock(False)
rec.doWriteAOD.set_Value_and_Lock(True)
rec.doESD.set_Value_and_Lock(True)
rec.doAOD.set_Value_and_Lock(True)
import AthenaPoolCnvSvc.ReadAthenaPool
#EventSelector.BackNavigation = True
#don't need to set Geometry tags anymore. They are read from the file itself.
from RecExConfig.RecFlags import rec
# get inputFileSummary - will use it to extract info for MC/DATA
from RecExConfig.InputFilePeeker import inputFileSummary
# import the data types
import EventKernel.ParticleDataType
include ("RecExCond/RecExCommon_flags.py")
include( "RecExCond/AllDet_detDescr.py" )
include( "AthenaPoolCnvSvc/ReadAthenaPool_jobOptions.py" )
from RecExConfig.RecFlags import rec
from RecExConfig.RecAlgsFlags import recAlgs
rec.doCBNT.set_Value_and_Lock( False )
rec.doTrigger.set_Value_and_Lock( False )
recAlgs.doAtlfast.set_Value_and_Lock( False )
rec.UserAlgs.set_Value_and_Lock("PanTauExample/PanTau_jobOptions.py")
#-----------------------------
# Configure eflowRec
#-_---------------------------
recAlgs.doEFlow = True
recAlgs.doEFlowJet = False
#Recovery:
from eflowRec.eflowRecFlags import jobproperties
jobproperties.eflowRecFlags.runTauMode.set_Value_and_Lock(False)
jobproperties.eflowRecFlags.useSplitShowers.set_Value_and_Lock(True)
jobproperties.eflowRecFlags.recoverIsolatedTracks.set_Value_and_Lock(True)
jobproperties.eflowRecFlags.UseElectronHadronID.set_Value_and_Lock(False)
#-----------------------------------------------------------------------------------------
# When running on input ESDs:
# rebuild topoclusters before eflowRec runs, because only (calibrated) CaloCalTopoCluster
# and not (uncalibrated) CaloTopoCluster are stored in the ESD:
#-----------------------------------------------------------------------------------------
#change some calo flags
from CaloRec.CaloRecFlags import jobproperties
jobproperties.CaloRecFlags.Enabled.set_Value_and_Lock(True)
jobproperties.CaloRecFlags.doCaloCluster.set_Value_and_Lock(True)
jobproperties.CaloRecFlags.doCaloTopoCluster.set_Value_and_Lock(True)
PanTauAOD_ItemList=["JetCollection#EflowKt06Jets"]
PanTauAOD_ItemList+=["JetCollection#EflowKt04Jets"]
PanTauAOD_ItemList+=["JetCollection#EflowKt02Jets"]
PanTauAOD_ItemList+=["JetCollection#EflowCone7Jets"]
PanTauAOD_ItemList+=["JetCollection#EflowCone4Jets"]
PanTauAOD_ItemList+=["JetCollection#EflowCone2Jets"]
PanTauAOD_ItemList+=["JetCollection#EflowSISCone2Jets"]
PanTauAOD_ItemList+=["JetCollection#EflowSISCone4Jets"]
PanTauAOD_ItemList+=["JetCollection#EflowAntiKt02Jets"]
PanTauAOD_ItemList+=["JetCollection#EflowAntiKt04Jets"]
PanTauAOD_ItemList+=["JetCollection#EflowCamKt02Jets"]
PanTauAOD_ItemList+=["JetCollection#EflowCamKt04Jets"]
# main jobOption
include ("RecExCommon/RecExCommon_topOptions.py")
# user modifier should come here
import AthenaCommon.PropertiesManip as manip
manip.appendItemsToList(StreamAOD,'ItemList','eflowObjectContainer#eflowObjects01Prime')
manip.appendItemsToList(StreamAOD,'ItemList','CaloClusterContainer#eflowClusters01Prime')
manip.appendItemsToList(StreamAOD,'ItemList','CaloClusterContainer#CaloTopoCluster')
manip.appendItemsToList(StreamAOD,'ItemList','JetCollection#EflowConeJets')
manip.appendItemsToList(StreamAOD,'ItemList','JetKeyDescriptor#JetKeyMap')
StreamAOD.ItemList += PanTauAOD_ItemList
print "\n * * * * * * * * * * * * * * * * *"
print "modified StreamAOD Itemlist:"
print StreamAOD.ItemList
Markdown is supported
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