topSequence += myCalibHitToCaloCellAlg_LAr

# myCalibHitToCaloCellAlg_Tile = CalibHitToCaloCellAlg( #OutputLevel = DEBUG,
#                                   CalibHitToCaloCellToolName = myCalibHitToCaloCellTool_Tile )
# topSequence += myCalibHitToCaloCellAlg_Tile

# myCalibHitToCaloCellAlg_DM = CalibHitToCaloCellAlg( OutputLevel = DEBUG,
#                                 CalibHitToCaloCellToolName = myCalibHitToCaloCellTool_DM,
#                                 TruthCaloCellsOutputName = "TruthCellsDM",
#                                 TruthCaloClustersOutputName = "TruthClustersDM",
#                                 CaloCellMakerTools = [ theCaloCellContainerFinalizerTool ] )
# topSequence += myCalibHitToCaloCellAlg_DM

# Create a POOL output file with the StoreGate contents:
from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
aodStream = MSMgr.NewPoolStream("StreamAOD",
                                "myAOD.withTruthClusters.pool.root")
aodStream.EvtConversionSvc = "AthenaPoolCnvSvc"
aodStream.AddItem("CaloCellContainer#*")
aodStream.AddItem("CaloCompactCellContainer#*")
aodStream.AddItem("CaloCalibrationHitContainer#*")
aodStream.AddItem("xAOD::CaloClusterContainer#*")
aodStream.AddItem("xAOD::CaloClusterAuxContainer#*")
aodStream.AddItem("CaloClusterCellLinkContainer#*")
aodStream.AddItem("xAOD::TrackParticleContainer#In*")
aodStream.AddItem("xAOD::TrackParticleAuxContainer#*")
aodStream.AddItem("xAOD::TruthParticleContainer#*")
aodStream.AddItem("xAOD::TruthParticleAuxContainer#*")
aodStream.AddItem("xAOD::ElectronContainer#*")
aodStream.AddItem("xAOD::ElectronAuxContainer#*")
aodStream.Print()
示例#2
0
        RDOFilePeeker(runArgs, ftkLog)  # not sure what it does
        # enable the detector flag
        from AthenaCommon.DetFlags import DetFlags
        DetFlags.all_setOn()
        DetFlags.ALFA_setOff()
        DetFlags.ZDC_setOff()
        # other services
        from AthenaCommon.AppMgr import ServiceMgr
        from AthenaPoolCnvSvc.AthenaPoolCnvSvcConf import AthenaPoolCnvSvc
        ServiceMgr += AthenaPoolCnvSvc()
        import AthenaPoolCnvSvc.ReadAthenaPool
        ServiceMgr.EventSelector.InputCollections = athenaCommonFlags.FilesInput(
        )
        # Add the FTK collections to the RDO
        from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
        StreamRDO = AthenaPoolOutputStream("StreamRDO",
                                           runArgs.outputRDO_FTKFile)
        #StreamRDO.TakeItemsFromInput=True
        StreamRDO.ForceRead = TRUE
        StreamRDO.ItemList += ["FTK_RawTrackContainer#*"]
    else:
        # generate RDO file from scratch, this represents an RDO
        from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
        StreamRDO = MSMgr.NewPoolStream("StreamRDO", runArgs.outputRDO_FTKFile)
        StreamRDO.AddItem(["FTK_RawTrackContainer#*"])
        StreamRDO.AddItem(["TrigInDetTrackCollection#*"])
else:
    ftkLog.error('No output file for merge given')
    raise RuntimeError, 'No output file for merge given'
alg += FTKMerger
示例#3
0
                                        OutputLevel=DEBUG,
                                        EventInfoName="MyEvent",
                                        dataROOTFileName=localDataFile,
                                        dataROOTHistName="intperbx",
                                        mcROOTFileName=localMCFile,
                                        mcROOTHistName="mu_mc10a")
    pass

# ====================================================================
# Define the test DPD output stream
# ====================================================================
# This stream HAS TO start with "StreamD2AODM_"! If the input was an (D)ESD(M), this should start with "StreamD2ESD(M)_".
# See this twiki for more information: https://twiki.cern.ch/twiki/bin/view/AtlasProtected/DPDNamingConvention
fileName = "DAOD_WithPileupWeight.pool.root"
streamName = "DAOD_TEST"
PielupStream = MSMgr.NewPoolStream(streamName, fileName)

# Only events that pass the filters listed below are written out
# AcceptAlgs  = logical OR of filters
# RequireAlgs = logical AND of filters
#PileupStream.AcceptAlgs( [""] )

# ---------------------------------------------------
# Add the containers to the output stream
# ---------------------------------------------------
from PrimaryDPDMaker import PrimaryDPD_OutputDefinitions as dpdOutput

# Take all items from the input, except for the ones listed in the excludeList
# If the excludeList is empty, all containers from the input file (e.g. AOD)
# are copied to the output file.
excludeList = ["TrigMuonEFContainer#HLT_MuonEF"]
示例#4
0
##
##-----------------------------------------------------------------------------

# ##########################################################################################
# Imports and initial setup
# ##########################################################################################

from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName
from PrimaryDPDMaker.PrimaryDPDFlags import primDPD

from LongLivedParticleDPDMaker.HipsFlags import primHIPsDESD

streamName = primDPD.WriteDESDM_EXOTHIPStream.StreamName
fileName   = buildFileName( primDPD.WriteDESDM_EXOTHIPStream )
HIPsStream      = MSMgr.NewPoolStream( streamName,fileName )


from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool as skimtool
from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel as kernel

HIPsFilterNames = [] # Filters should append their final selection algo names to this list
filtersToBookkeep = [] # Not sure what this does?


def HipTriggerSelectionString(flags):
    cutString=""
    if flags.triggers.__len__() >=1:
        cutString+=flags.triggers[0]
        if flags.triggers.__len__() >1:
            for trigger in flags.triggers[1:]:
                                     minNumberPassed         = 1,
                                     chargeMax               = 0,
                                     massMin                 = 30.0*Units.GeV
                                     )



#====================================================================
# Define the test DPD output stream
#====================================================================
from D2PDMaker.D2PDHelpers import buildFileName
# This stream HAS TO start with "StreamD2AODM_"! If the input was an (D)ESD(M), this should start with "StreamD2ESD(M)_".
# See this twiki for more information: https://twiki.cern.ch/twiki/bin/view/AtlasProtected/DPDNamingConvention
streamName = "StreamD2AODM_MyZmumu"
fileName   = D2PDFlags.OutputDirectoryName() + "MyD2PDExampleSimpleZmumuStream.pool.root"
ExampleSimpleZmumuStream = MSMgr.NewPoolStream( streamName, fileName )

# Only events that pass the filters listed below are written out
# AcceptAlgs  = logical OR of filters
# RequireAlgs = logical AND of filters
ExampleSimpleZmumuStream.AcceptAlgs( ["D2PDParticleCombinerInExampleSimpleZmumuStream_ZmumuBoson"] )



#---------------------------------------------------
# Add the containers to the output stream
#---------------------------------------------------
from PrimaryDPDMaker import PrimaryDPD_OutputDefinitions as dpdOutput

# Take all items from the input, except for the ones listed in the excludeList
# If the excludeList is empty, all containers from the input file (e.g. AOD)
示例#6
0
##################
### Output stream
##################
from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName
from PrimaryDPDMaker.PrimaryDPDFlags import primDPD

streamName = primDPD.WriteDESDM_PHOJETStream.StreamName
fileName   = buildFileName( primDPD.WriteDESDM_PHOJETStream )

if primDPD.WriteDESDM_PHOJETStream.isVirtual or primDPD.isVirtual() :
    StreamDESDM_PHOJET=MSMgr.NewVirtualStream( streamName, fileName )
    pass
else:
    StreamDESDM_PHOJET=MSMgr.NewPoolStream( streamName, fileName )
    pass

StreamDESDM_PHOJET.AddRequireAlgs(["DESDM_PHOJETKernel"])


from PrimaryDPDMaker import PrimaryDPD_OutputDefinitions as dpdOutput

# Take all items from the input, except for the ones listed in the excludeList,
# list should be copied from AllCells but add back the thinned tracking info for egamma

ExcludeList=[]
#dpdOutput.addAllItemsFromInputExceptExcludeList(streamName,ExcludeList)

trackParticleAuxExclusions="-caloExtension.-cellAssociation.-clusterAssociation.-trackParameterCovarianceMatrices.-parameterX.-parameterY.-parameterZ.-parameterPX.-parameterPY.-parameterPZ.-parameterPosition"
示例#7
0
        trackParticleCollection='TrackParticleCandidate',
        inputCollection='MuidMuonCollection')
    pass

if D2PDFlags.WriteDAODM_HighMDiJetStream.ApplySlimming:
    from PrimaryDPDMaker.PrimaryDPDMakerConf import SlimTrackInfo
    thinSeqHighMassDiJetStream += SlimTrackInfo(
        "SlimTrackParticlesInHighMassDiJetStream",
        thinSvc='ThinningSvc/HighMassDiJetStreamThinning',
        TrackPartContName='TrackParticleCandidate')
    pass

#====================================================================
# Define the DAODM output stream
#====================================================================
HighMassDiJetStream = MSMgr.NewPoolStream(streamName, fileName)

# Only events that pass the filters listed below are written out
# AcceptAlgs  = logical OR of filters
# RequireAlgs = logical AND of filters
HighMassDiJetStream.AcceptAlgs(["StreamHighMassDiJet_AcceptEvent"])

HighMassDiJetStream.AddOtherAlgsToBookkeep(algsToBookkeep)

#---------------------------------------------------
# Add the containers to the output stream
#---------------------------------------------------
from PrimaryDPDMaker import PrimaryDPD_OutputDefinitions as dpdOutput

# Take all items from the input, except for the ones listed in the excludeList
# If the excludeList is empty, all containers from the input file (e.g. AOD)
示例#8
0
#from D2PDMaker.SUSYFilters import SetupMuonsStreamFilters
#acceptAlgs=SetupMuonsStreamFilters(topSequence)
from SUSYD3PDMaker.SUSYTriggerFilters import SetupSUSYTriggerFilters
acceptAlgs = SetupSUSYTriggerFilters(topSequence)

#====================================================================
# Define the test DPD output stream
#====================================================================
from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
from D2PDMaker.D2PDHelpers import buildFileName
from D2PDMaker.D2PDFlags import D2PDFlags
# This stream HAS TO start with "StreamD2AODM_"! If the input was an (D)ESD(M), this should start with "StreamD2ESD(M)_".
# See this twiki for more information: https://twiki.cern.ch/twiki/bin/view/AtlasProtected/DPDNamingConvention
fileName = buildFileName(D2PDFlags.WriteDAOD_SUSYMuonsStream)
streamName = D2PDFlags.WriteDAOD_SUSYMuonsStream.StreamName
SUSYMuonStream = MSMgr.NewPoolStream(streamName, fileName)

# Only events that pass the filters listed below are written out
# AcceptAlgs  = logical OR of filters
# RequireAlgs = logical AND of filters
SUSYMuonStream.AcceptAlgs(acceptAlgs)

#---------------------------------------------------
# Add the containers to the output stream
#---------------------------------------------------
from PrimaryDPDMaker import PrimaryDPD_OutputDefinitions as dpdOutput
# Take all items from the input, except for the ones listed in the excludeList
# If the excludeList is empty, all containers from the input file (e.g. AOD)
# are copied to the output file.
excludeList = []
excludeList = list(set(excludeList))  # This removes dublicates from the list
示例#9
0
                                     outputLinkCollection = 'CentralLooseElectronLinkCollectionInElLoose18Stream',
                                     minNumberPassed      = 1,
                                     electronIsEM         = egammaPID.ElectronLoose,
                                     electronAuthor       = egammaParameters.AuthorElectron,
                                     clusterEtMin         = 18.0*Units.GeV
                                     )
algsToBookkeep.append( "ElectronLooseSelectorInElLoose18Stream" )





#====================================================================
# Define the test DPD output stream
#====================================================================
ElLoose18Stream = MSMgr.NewPoolStream( streamName, fileName )

# Only events that pass the filters listed below are written out
# AcceptAlgs  = logical OR of filters
# RequireAlgs = logical AND of filters
ElLoose18Stream.AcceptAlgs( ["ElectronLooseSelectorInElLoose18Stream"] )

ElLoose18Stream.AddOtherAlgsToBookkeep( algsToBookkeep )

#---------------------------------------------------
# Add the containers to the output stream
#---------------------------------------------------
from PrimaryDPDMaker import PrimaryDPD_OutputDefinitions as dpdOutput

# Take all items from the input, except for the ones listed in the excludeList
# If the excludeList is empty, all containers from the input file (e.g. AOD)
示例#10
0
# Imports and initial setup
# ##########################################################################################

# MJF: Needs attention and cleaning up - lots of PrimaryDPDMaker dependencies!

from OutputStreamAthenaPool.MultipleStreamManager import MSMgr

from LongLivedParticleDPDMaker.LongLivedDPDFlags import WriteRPVLLStream
from LongLivedParticleDPDMaker.PrimaryDPDFlags_RPVLLStream import primRPVLLDESDM

from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName
from PrimaryDPDMaker.PrimaryDPDFlags import primDPD

streamName = primDPD.WriteRPVLLStream.StreamName
fileName = buildFileName(primDPD.WriteRPVLLStream)
RPVLL = MSMgr.NewPoolStream(streamName, fileName)

# MJF: Possibly remove if not useful?
if primRPVLLDESDM.prescaleFlags.applyPrescale:
    RPVLL.SetPrescale(primRPVLLDESDM.prescaleFlags.prescaleFactor)

RPVLLfilterNames = [
]  # Filters should append their final selection algo names to this list
filtersToBookkeep = []  # Not sure what this does?

# ##########################################################################################
# Filter configuration
# ##########################################################################################

## For each analysis, include a job options file that defines the filter
## for that analysis and adds it to the top filter
示例#11
0
from xAODEventFormatCnv.xAODEventFormatCnvConf import xAODMaker__EventFormatSvc
fmtsvc = xAODMaker__EventFormatSvc(FormatNames=[
    'DataVector<DMTest::C_v1>',
    'DMTest::CAuxContainer_v1',
    'DMTest::C_v1',
    'DMTest::CLinks_v1',
    'DataVector<DMTest::CLinks_v1>',
    'DMTest::CLinksAuxInfo_v1',
    'DMTest::CLinksAuxContainer_v1',
])
ServiceMgr += fmtsvc

# Stream's output file
from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
Thinned1_Augmented = MSMgr.NewPoolStream('Thinned1',
                                         'xaodthinned1.root',
                                         asAlg=True,
                                         noTag=True)
Thinned1_Augmented.AddMetaDataItem('xAOD::EventFormat#EventFormat')
Thinned1 = Thinned1_Augmented.GetEventStream()
Thinned1.WritingTool.SubLevelBranchName = '<key>'
# List of DO's to write out
Thinned1.ItemList += fullItemList

ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += ["DEFAULT_SPLITLEVEL='1'"]

# Avoid races when running tests in parallel.
FILECATALOG = 'xAODTestWriteThinned_catalog.xml'

include('DataModelRunTests/commonTrailer.py')
示例#12
0
filter2e2mMuid = AthSequencer("H4l_2e2mMuidFilter")

# use sequencer to combine filters for 2e2m

filter2e2mMuid += H4lDPDMaker.H4lMuonFilter("H4l_2MuonMuidFilter",nMu=2,\
                                        pTCuts=[6*Units.GeV,6*Units.GeV],\
                                        etaCuts=[2.5,2.5],\
                                        qualityCuts=["combined+lowpt","combined+lowpt"])

filter2e2mMuid += H4lDPDMaker.H4lElectronFilter("H4l_2ElectronFilter2",nElec=2,\
                                            eTCuts=[6*Units.GeV,6*Units.GeV],\
                                            etaCuts=[2.5,2.5],\
                                            qualityCuts=["Loose","Loose"])

theJob += filter2e2mMuid

# The job starts here!
include("RecExCommon/RecExCommon_topOptions.py")

# define streams

streamOut = MSMgr.NewPoolStream("HSG2_DPD", "HSG2_DPD.pool.root")
streamOut.AcceptAlgs([
    "H4l_4ElectronFilter", "H4l_4StacoMuonFilter", "H4l_4MuidMuonFilter",
    "H4l_2e2mMuidFilter", "H4l_2e2mStacoFilter"
])

dpdOutHelper.addAllItemsFromInputExceptExcludeList("HSG2_DPD", [])

theApp.EvtMax = 100
示例#13
0
    outputCollection='MyWmunuLooseWmunuBosonCollection',
    minNumberPassed=1,
    missingEtMin=20.0 * Units.GeV,
    massMin=64.0 * Units.GeV,
    massMax=104.0 * Units.GeV)

#====================================================================
# Define the test DPD output stream
#====================================================================
from D2PDMaker.D2PDHelpers import buildFileName
# This stream HAS TO start with "StreamD2AODM_"! If the input was an (D)ESD(M), this should start with "StreamD2ESD(M)_".
# See this twiki for more information: https://twiki.cern.ch/twiki/bin/view/AtlasProtected/DPDNamingConvention
streamName = "StreamD2AODM_Wmunu"
fileName = D2PDFlags.OutputDirectoryName(
) + "MyD2PDExampleSimpleWmunuStream.pool.root"
ExampleSimpleWmunuStream = MSMgr.NewPoolStream(streamName, fileName)

# Only events that pass the filters listed below are written out
# AcceptAlgs  = logical OR of filters
# RequireAlgs = logical AND of filters
ExampleSimpleWmunuStream.AcceptAlgs([
    "MuonSelectorInExampleSimpleWmunuStream",
    "D2PDLeptonNeutrinoCombinerInExampleSimpleWmunuStream_WmunuBoson"
])

#---------------------------------------------------
# Add the containers to the output stream
#---------------------------------------------------
from PrimaryDPDMaker import PrimaryDPD_OutputDefinitions as dpdOutput

# Take all items from the input, except for the ones listed in the excludeList
# Get the AssociationAlgorithm and schedule the AssociationTools
from AnalysisAssociationUtils.AnalysisAssociationUtilsConf import AssociationAlgorithm
topSequence += AssociationAlgorithm(
    "ElectronAssociationAlgorithm",
    inputCollection="ElectronAODCollection",
    associationTools=[ToolSvc.ElectronDeltaRAssociationTool],
    outputAssociationCollections=[
        "ElectronMCTruthClassifierMatch", "ElectronDeltaRTruthMatch"
    ],
    dumpStoreGate=True)

# This stream HAS TO start with "StreamD2AODM_"! If the input was an (D)ESD(M), this should start with "StreamD2ESD(M)_".
# See this twiki for more information: https://twiki.cern.ch/twiki/bin/view/AtlasProtected/DPDNamingConvention
streamName = "StreamD2AOD_MyMatchTest"
fileName = D2PDFlags.OutputDirectoryName() + "MyMatchTestStream.pool.root"
ExampleMatchStream = MSMgr.NewPoolStream(streamName, fileName)

#---------------------------------------------------
# Add the containers to the output stream
#---------------------------------------------------
from PrimaryDPDMaker import PrimaryDPD_OutputDefinitions as dpdOutput
# Take all items from the input, except for the ones listed in the excludeList
# If the excludeList is empty, all containers from the input file (e.g. AOD)
# are copied to the output file.
excludeList = []
excludeList = list(set(excludeList))  # This removes dublicates from the list
dpdOutput.addAllItemsFromInputExceptExcludeList(streamName, excludeList)

# Add the created match containers to the output file
ExampleMatchStream.AddItem(['INav4MomAssocs#ElectronMCTruthClassifierMatch'])
ExampleMatchStream.AddItem(['INav4MomAssocs#ElectronDeltaRTruthMatch'])
示例#15
0
import AthenaCommon.SystemOfUnits as Units

## Include the job property flags for this package and from RecExCommon
from D2PDMaker.D2PDFlags import D2PDFlags
from RecExConfig.RecFlags import rec

## This handels multiple output streams
from OutputStreamAthenaPool.MultipleStreamManager import MSMgr

#====================================================================
# Define the test DPD output stream
#====================================================================
from D2PDMaker.D2PDHelpers import buildFileName
streamName = D2PDFlags.WriteExampleSimpleTestStream.StreamName
fileName = buildFileName(D2PDFlags.WriteExampleSimpleTestStream)
ExampleTestStream = MSMgr.NewPoolStream(streamName, fileName)

ExampleTestStream.AddItem('TruthParticleContainer#SpclMC')
ExampleTestStream.AddItem('MissingEtTruth#MET_Truth_PileUp')
ExampleTestStream.AddItem('MissingET#MET_RefFinal')
ExampleTestStream.AddItem('TrigDec::TrigDecision#TrigDecision')
ExampleTestStream.AddItem('MissingEtTruth#MET_Truth')
ExampleTestStream.AddItem('Analysis::MuonContainer#StacoMuonCollection')
ExampleTestStream.AddItem('CTP_Decision#CTP_Decision')
ExampleTestStream.AddItem('EventInfo#*')
ExampleTestStream.AddItem('Analysis::TauJetContainer#TauRecContainer')
ExampleTestStream.AddItem('JetCollection#Cone4TruthJets')
ExampleTestStream.AddItem('JetCollection#AntiKt4TruthJets')
ExampleTestStream.AddItem('JetCollection#Cone4H1TopoJets')
ExampleTestStream.AddItem('JetCollection#AntiKt4H1TopoJets')
ExampleTestStream.AddItem(
示例#16
0
# from D2PDMaker.SUSYFilters import SetupEGammaStreamFilters
# acceptAlgs=SetupEGammaStreamFilters(topSequence)
from SUSYD3PDMaker.SUSYTriggerFilters import SetupSUSYTriggerFilters
acceptAlgs = SetupSUSYTriggerFilters(topSequence)

#====================================================================
# Define the test DPD output stream
#====================================================================
from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
from D2PDMaker.D2PDHelpers import buildFileName
from D2PDMaker.D2PDFlags import D2PDFlags
# This stream HAS TO start with "StreamD2AODM_"! If the input was an (D)ESD(M), this should start with "StreamD2ESD(M)_".
# See this twiki for more information: https://twiki.cern.ch/twiki/bin/view/AtlasProtected/DPDNamingConvention
fileName = buildFileName(D2PDFlags.WriteDAOD_SUSYEGammaStream)
streamName = D2PDFlags.WriteDAOD_SUSYEGammaStream.StreamName
SUSYEGammaStream = MSMgr.NewPoolStream(streamName, fileName)

# Only events that pass the filters listed below are written out
# AcceptAlgs  = logical OR of filters
# RequireAlgs = logical AND of filters
SUSYEGammaStream.AcceptAlgs(acceptAlgs)

#---------------------------------------------------
# Add the containers to the output stream
#---------------------------------------------------
from PrimaryDPDMaker import PrimaryDPD_OutputDefinitions as dpdOutput
# Take all items from the input, except for the ones listed in the excludeList
# If the excludeList is empty, all containers from the input file (e.g. AOD)
# are copied to the output file.
excludeList = []
excludeList = list(set(excludeList))  # This removes dublicates from the list
示例#17
0
from RecExConfig.RecFlags import rec
rec.readAOD = True
rec.readRDO = False

from AthenaCommon.GlobalFlags import globalflags
globalflags.DetGeo = 'atlas'
globalflags.DataSource = 'data'

### Trigger Decision Tool
from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
athenaCommonFlags.FilesInput = filelist
from TriggerJobOpts.TriggerFlags import TriggerFlags
TriggerFlags.configurationSourceList = ['ds']
from TriggerJobOpts.TriggerConfigGetter import TriggerConfigGetter
cfg = TriggerConfigGetter()

from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
StreamDPD = MSMgr.NewPoolStream(
    "StreamDPD", "/dataDisk/Reprocessed/00179939/slimEnhancedBias.pool.root")
StreamDPD.AddMetaDataItem(["IOVMetaDataContainer#*"])
StreamDPD.AddItem(["EventInfo#*"])
StreamDPD.AddItem([
    "ElectronContainer#ElectronAODCollection",
    "VxContainer#VxPrimaryCandidate", "MissingET#MET_RefFinal",
    "egammaContainer#HLT_egamma_Electrons",
    "egDetailContainer#HLT_egamma_Electrons", "JetCollection#AntiKt4TopoJets",
    "JetMomentMap#AntiKt4TopoJets"
])
StreamDPD.AcceptAlgs(["OfflineElectronSelector"])
示例#18
0
theLArRawChannelBuilderADC2EDataBase = LArRawChannelBuilderADC2EDataBase()
theLArRawChannelBuilder.ADCtoEnergyTools = [
    theLArRawChannelBuilderADC2EDataBase
]
theLArRawChannelBuilderADC2EDataBase.ADC2MeVTool = theLArADC2MeVTool
theLArRawChannelBuilder += theLArRawChannelBuilderADC2EDataBase

from LArRecUtils.LArRecUtilsConf import LArOFPeakRecoTool
theLArOFPeakRecoTool = LArOFPeakRecoTool()
theLArOFPeakRecoTool.UseShape = True
ToolSvc += theLArOFPeakRecoTool

#"ESD" writing
from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
StreamESD_Augmented = MSMgr.NewPoolStream("streamESD",
                                          "esdout.pool.root",
                                          asAlg=True)
StreamESD = StreamESD_Augmented.GetEventStream()
StreamESD.ItemList += ["EventInfo#*", "LArRawChannelContainer#*"]

#CaloD3PD writing
from CaloD3PDMaker.LArDigitD3PDObject import LArDigitD3PDObject
from EventCommonD3PDMaker.EventInfoD3PDObject import EventInfoD3PDObject
alg = MSMgr.NewRootStream("caloD3PD", CafJobOutputs[0])
#alg += EventInfoD3PDObject(10)
alg += LArDigitD3PDObject(2, sgkey="FREE")

#topSequence.caloD3PDAANTStream.ExistDataHeader=False

svcMgr.StoreGateSvc.Dump = True
示例#19
0
  jdmp2.OutputLevel = INFO
  jetalg.Tools += [jdmp2]

  ToolSvc += JetDumper("jdmp3")
  jdmp3 = ToolSvc.jdmp3
  jdmp3.ContainerName = "MyCopiedJets_Kt3Subjets"
  jdmp3.Detail = 2
  jdmp3.LineDetail = 3
  jdmp3.MaxObject = 20
  jdmp3.OutputLevel = INFO
  jdmp3.ElementLinkMoments += ["Parent"]
  jetalg.Tools += [jdmp3]


# Create a POOL output file with the StoreGate contents:
from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
xaodStream = MSMgr.NewPoolStream( "StreamXAOD", "xAOD.root" )

# Set up its contents:
xaodStream.AddItem( "xAOD::JetContainer_v1#*" )
xaodStream.AddItem( "xAOD::JetAuxContainer_v1#*" )
xaodStream.AddMetaDataItem( "xAOD::EventFormat_v1#*" )
xaodStream.Print()

# Split all branches:
ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += [
        "DEFAULT_SPLITLEVEL='99'" ]

# Force POOL to just simply use the StoreGate keys as branch names:
ServiceMgr.AthenaPoolCnvSvc.SubLevelBranchName = "<key>"
示例#20
0
#--------------------------------------------------------------
# Application:
#--------------------------------------------------------------

from DataModelTestDataCommon.DataModelTestDataCommonConf import \
     DMTest__xAODTestWriteCInfo, \
     DMTest__xAODTestDecor
from DataModelTestDataRead.DataModelTestDataReadConf import \
     DMTest__xAODTestFilterCVec

topSequence += DMTest__xAODTestFilterCVec('xAODTestFilterCVec')
topSequence += DMTest__xAODTestWriteCInfo('xAODTestWriteCInfo', Offset=111)
topSequence += DMTest__xAODTestDecor('xAODTestDecor',
                                     DoCVec=False,
                                     DoCTrig=False)

# Stream's output file
Stream1_Augmented = MSMgr.NewPoolStream('Stream1',
                                        'xaoddata_filt.root',
                                        asAlg=True,
                                        noTag=True)
Stream1_Augmented.AddMetaDataItem('xAOD::EventFormat#EventFormat')
Stream1 = Stream1_Augmented.GetEventStream()
Stream1.WritingTool.SubLevelBranchName = '<key>'
Stream1.ItemList += fullItemList  # List of DO's to write out

# Avoid races when running tests in parallel.
FILECATALOG = 'xAODTestReadFilter_catalog.xml'

include('DataModelRunTests/commonTrailer.py')
示例#21
0
                                     TrackCollectionKey="CombinedMuonTracks")
    desdAlignmentTriggerMuonSequence += filAlg_CT
    pass
print topSequence

##====================================================================
## Define this Muon DPD output stream
##====================================================================
#WriteMuonAlignmentTriggerStream
streamName = primDPD.WriteDESDM_MSPerfStream.StreamName
fileName = buildFileName(primDPD.WriteDESDM_MSPerfStream)
if primDPD.WriteDESDM_MSPerfStream.isVirtual or primDPD.isVirtual():
    AlignmentTriggerMuonStream = MSMgr.NewVirtualStream(streamName, fileName)
    pass
else:
    AlignmentTriggerMuonStream = MSMgr.NewPoolStream(streamName, fileName)
    pass

if primDPDAlignTrigMu.ApplyThinning():
    AlignmentTriggerMuonStream.AcceptAlgs(["muonTrkTrackThinTool_MS"])
    AlignmentTriggerMuonStream.AcceptAlgs(["muonTrkTrackThinTool_CT"])
    pass

if primDPDAlignTrigMu.ApplySkimming():
    AlignmentTriggerMuonStream.AcceptAlgs(["EventSkimmingKernel"])
    pass
#---------------------------------------------------
# Add the containers to the output stream
#---------------------------------------------------
#old way
#AlignmentTriggerMuonStream.Stream.TakeItemsFromInput = True
示例#22
0
                                           pTCuts=[0,10*Units.GeV],\
                                           eTCuts=[10*Units.GeV,0],\
                                           qualityCuts=["Loose","inMS"],\
                                           types=["e","mu"],\
                                           collections=["RobustLooseElectronCollection","MuidMuonCollection"],\
                                           mass=5*Units.GeV)

theJob += mixedFilterStaco
theJob += mixedFilterMuid

# The job starts here!
rec.AutoConfiguration.append('FieldAndGeo')
#rec.AutoConfiguration.append('BeamType')
rec.AutoConfiguration.append('ConditionsTag')
rec.AutoConfiguration.append('RealOrSim')

include("RecExCommon/RecExCommon_topOptions.py")

# define streams

streamOut = MSMgr.NewPoolStream(
    "HSG2_DPD", "/tmp/disimone/HSG2_DAOD_2lskim.00142383._000001.pool.root")
streamOut.AcceptAlgs([
    "H4l_2ElectronFilter", "H4l_2StacoMuonFilter", "H4l_2MuidMuonFilter",
    "H4lMixedFilterStaco", "H4lMixedFilterMuid"
])

dpdOutHelper.addAllItemsFromInputExceptExcludeList("HSG2_DPD", [])

theApp.EvtMax = 1000
    'ViewVector<DataVector<DMTest::C_v1,DataModel_detail::NoBase> >',
    'DMTest::C_v1',
    'DMTest::CInfoAuxContainer_v1',
    'DataVector<DMTest::G_v1>',
    'DMTest::GAuxContainer_v1',
    'DMTest::G_v1',
    'DMTest::H_v1',
    'DataVector<DMTest::H_v1>',
    'ViewVector<DataVector<DMTest::H_v1,DataModel_detail::NoBase> >',
    'DMTest::HAuxContainer_v1',
])
ServiceMgr += fmtsvc

# Stream's output file
from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
Stream1_Augmented = MSMgr.NewPoolStream('Stream1', 'xaoddata.root', asAlg=True)
Stream1_Augmented.AddMetaDataItem('xAOD::EventFormat#EventFormat')
Stream1 = Stream1_Augmented.GetEventStream()
Stream1.WritingTool.SubLevelBranchName = '<key>'
# List of DO's to write out
Stream1.ItemList += fullItemList
ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += ["DEFAULT_SPLITLEVEL='1'"]

#--------------------------------------------------------------
# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
#--------------------------------------------------------------
svcMgr.MessageSvc.OutputLevel = 3
svcMgr.MessageSvc.debugLimit = 100000
svcMgr.ClassIDSvc.OutputLevel = 3

# No stats printout
示例#24
0
# Set up the reading of the input xAOD:
import AthenaPoolCnvSvc.ReadAthenaPool
svcMgr.EventSelector.InputCollections = ["xAOD.pool.root"]

# Access the algorithm sequence:
from AthenaCommon.AlgSequence import AlgSequence
theJob = AlgSequence()

from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__xAODtoHepMCCnvAlg
alg2 = DerivationFramework__xAODtoHepMCCnvAlg()
alg2.OutputLevel = INFO
theJob += alg2

# Do some additional tweaking:
from AthenaCommon.AppMgr import theApp
theApp.EvtMax = -1
ServiceMgr.MessageSvc.OutputLevel = INFO
ServiceMgr.MessageSvc.defaultLimit = 1000000

# Output
from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
hepmcStream = MSMgr.NewPoolStream("StreamAOD", "test.pool.root")
# Additional type(s) created automatically by RecExCommon:
hepmcStream.AddItem("McEventCollection#McEventCollectionFromXAOD")
hepmcStream.AddItem("xAOD::TruthParticleContainer_v1#TruthParticle")
hepmcStream.AddItem("xAOD::TruthParticleAuxContainer_v1#TruthParticleAux.")
hepmcStream.AddItem("xAOD::TruthEventContainer_v1#TruthEvent")
hepmcStream.AddItem("xAOD::TruthEventAuxContainer_v1#TruthEventAux.")
hepmcStream.AddItem("xAOD::TruthVertexContainer_v1#TruthVertex")
hepmcStream.AddItem("xAOD::TruthVertexAuxContainer_v1#TruthVertexAux.")
示例#25
0
        combination_daod_2l = algsList[iAlg]
    else:
        combination_daod_2l += " or " + algsList[iAlg]

totalDecision_daod_2l = LogicalFilterCombiner("HSG2_2LDAODFilter",
                                              cmdstring=combination_daod_2l)
theJob += totalDecision_daod_2l

## This handles multiple output streams
from OutputStreamAthenaPool.MultipleStreamManager import MSMgr

from PrimaryDPDMaker import PrimaryDPD_OutputDefinitions as dpdOutHelper

# define streams

from AthenaCommon.JobProperties import jobproperties
prodFlags = jobproperties.D2PDFlags
from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName

# Construct the stream and file names for the jp:
streamName = prodFlags.WriteDAOD_2LHSG2Stream.StreamName
fileName = buildFileName(prodFlags.WriteDAOD_2LHSG2Stream)

#streamOut = MSMgr.NewPoolStream("StreamDAOD_2LHSG2",runArgs.outputDAOD_2LHSG2File)
streamOut_daod_2l = MSMgr.NewPoolStream(streamName, fileName)
streamOut_daod_2l.AcceptAlgs([totalDecision_daod_2l.getName()])
streamOut_daod_2l.AddOtherAlgsToBookkeep(algsList)

dpdOutHelper.addAllItemsFromInputExceptExcludeList(streamName, [])
streamOut_daod_2l.AddMetaDataItem("EventBookkeeperCollection#*")
示例#26
0
    FTK_RDO_Creator.pmap_path = ftkBaseConfigDir + '/map_files/raw_12Libl.pmap'
    FTK_RDO_Creator.loadHWConf_path = ftkBaseConfigDir + '/hwsdev_file/raw_12L.hw'

# The presence of the option FinalMerge
if FTK_MergeFromTowers:
    FTK_RDO_Creator.NSubRegions = 1
    FTK_RDO_Creator.FTKUnmergedFormatName = "FTKMergedTracksStream%u"
else:
    FTK_RDO_Creator.NSubRegions = 4

# set a meaningful name for the PerfMon file
pmjp.PerfMonFlags.OutputFile = 'ntuple_FTKMerge.pmon.gz'

FTK_RDO_Creator.FTKToMergePaths = inputNTUP_FTKTMPFile
FTK_RDO_Creator.FTKMergedOutput = outputNTUP_FTKFile

alg += FTK_RDO_Creator

#StreamRDO            = AthenaPoolOutputStream ( "StreamRDO" )
#StreamRDO.OutputFile = "InDetRecRDO.root"
#StreamRDO.ItemList   +=  ['FTK_RawTrackContainer#*']

from OutputStreamAthenaPool.MultipleStreamManager import MSMgr

StreamRDO = MSMgr.NewPoolStream("StreamRDO", outputRDOfile)
StreamRDO.AddMetaDataItem(["IOVMetaDataContainer#*"])
#StreamRDO.AddItem( ["DataVector<FTK_RawTrack>#FTK_RDO_Tracks"] )
StreamRDO.AddItem(["FTK_RawTrackContainer#*"])
from RecExConfig.ObjKeyStore import objKeyStore
objKeyStore.addStreamRDO("FTK_RawTrackContainer", "FTK_RDO_Tracks")
示例#27
0
# Set up the reading of a file:
FNAME = "AOD.pool.root"
include("AthenaPython/iread_file.py")

# Access the algorithm sequence:
from AthenaCommon.AlgSequence import AlgSequence
theJob = AlgSequence()

# Create a logger object:
from AthenaCommon.Logging import logging
logger = logging.getLogger("xAODTriggerCnv_jobOptions")

# Create a POOL output file with the StoreGate contents:
from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
xaodStream = MSMgr.NewPoolStream("StreamAOD", "xAOD.pool.root")

# Create the xAOD RoIs:
from xAODTriggerCnv.xAODRoICreator import xAODRoICreator
xAODRoICreator()

# Create the xAOD trigger decision:
from xAODTriggerCnv.xAODTrigDecisionCreator import xAODTrigDecisionCreator
xAODTrigDecisionCreator()

# Add bunch configuration metadata to the file:
from xAODTriggerCnv.xAODBunchConfCreator import xAODBunchConfCreator
xAODBunchConfCreator()

# Additional type(s) created automatically by RecExCommon:
xaodStream.AddItem("xAOD::EventInfo_v1#EventInfo")
示例#28
0
#from D2PDMaker.SUSYFilters import SetupJetsStreamFilters
#acceptAlgs=SetupJetsStreamFilters(topSequence)
from SUSYD3PDMaker.SUSYTriggerFilters import SetupSUSYTriggerFilters
acceptAlgs = SetupSUSYTriggerFilters(topSequence)

#====================================================================
# Define the test DPD output stream
#====================================================================
from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
from D2PDMaker.D2PDHelpers import buildFileName
from D2PDMaker.D2PDFlags import D2PDFlags
# This stream HAS TO start with "StreamD2AODM_"! If the input was an (D)ESD(M), this should start with "StreamD2ESD(M)_".
# See this twiki for more information: https://twiki.cern.ch/twiki/bin/view/AtlasProtected/DPDNamingConvention
fileName = buildFileName(D2PDFlags.WriteDAOD_SUSYJetsStream)
streamName = D2PDFlags.WriteDAOD_SUSYJetsStream.StreamName
SUSYJetStream = MSMgr.NewPoolStream(streamName, fileName)

# Only events that pass the filters listed below are written out
# AcceptAlgs  = logical OR of filters
# RequireAlgs = logical AND of filters
SUSYJetStream.AcceptAlgs(acceptAlgs)

#---------------------------------------------------
# Add the containers to the output stream
#---------------------------------------------------
from PrimaryDPDMaker import PrimaryDPD_OutputDefinitions as dpdOutput
# Take all items from the input, except for the ones listed in the excludeList
# If the excludeList is empty, all containers from the input file (e.g. AOD)
# are copied to the output file.
excludeList = []
dpdOutput.addAllItemsFromInputExceptExcludeList(streamName, excludeList)
示例#29
0
mixedFilterMuid=H4lDPDMaker.H4lMixedFilter("H4lMixedFilterMuid", nLept=2,\
                                           pTCuts=[0,10*Units.GeV],\
                                           eTCuts=[10*Units.GeV,0],\
                                           qualityCuts=[eQual,muQual],\
                                           types=["e","mu"],\
                                           collections=["RobustLooseElectronCollection","MuidMuonCollection"],\
                                           mass=5*Units.GeV)

theJob += mixedFilterStaco
theJob += mixedFilterMuid

# The job starts here!
rec.AutoConfiguration.append('FieldAndGeo')
#rec.AutoConfiguration.append('BeamType')
rec.AutoConfiguration.append('ConditionsTag')
rec.AutoConfiguration.append('RealOrSim')

include("RecExCommon/RecExCommon_topOptions.py")

# define streams

streamOut = MSMgr.NewPoolStream("HSG2_DPD", OutputFile2L)
streamOut.AcceptAlgs([
    "H4l_2ElectronFilter", "H4l_2StacoMuonFilter", "H4l_2MuidMuonFilter",
    "H4lMixedFilterStaco", "H4lMixedFilterMuid"
])

dpdOutHelper.addAllItemsFromInputExceptExcludeList("HSG2_DPD", [])

theApp.EvtMax = evtMax
示例#30
0
from OutputStreamAthenaPool.MultipleStreamManager import MSMgr

from PyUtils.MetaReaderPeeker import convert_itemList

inputObjects = convert_itemList(layout=None)


def __addInput(stream, skip=[]):
    for element in inputObjects:
        type_key = "%s#%s" % element
        if type_key not in skip:
            stream.AddItem(type_key)


elStream = MSMgr.NewPoolStream('elXAODStream', 'elXAOD.pool.root')
__addInput(elStream)

phStream = MSMgr.NewPoolRootStream('phXAODStream', 'phXAOD.pool.root')

tauStream = MSMgr.NewPoolRootStream('tauXAODStream', 'tauXAOD.pool.root')

from TrigNavTools.TrigNavToolsConfig import navigationThinningSvc
from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel

dk = DerivationFramework__DerivationKernel()

tokeep = {
    'electron': [
        'HLT_TrigElectronContainer_L2ElectronFex',
        'HLT_TrigElectronContainer_L2IDCaloFex',
        'HLT_xAOD__TrigElectronContainer_L2ElectronFex',