Beispiel #1
0
def buildFileName( jobPropFlagOrString ):
    fileName = ""
    if type(jobPropFlagOrString) == str :
        fileName = D2PDFlags.OutputDirectoryName()+D2PDFlags.OutputPoolRootFileNamePrefix()+jobPropFlagOrString+D2PDFlags.OutputMiddleName()+".pool.root"
        pass
    else :
        if jobPropFlagOrString.is_locked() :
            fileName = jobPropFlagOrString.FileName
            pass
        else :
            fileName = D2PDFlags.OutputDirectoryName()+D2PDFlags.OutputPoolRootFileNamePrefix()+jobPropFlagOrString.StreamName+D2PDFlags.OutputMiddleName()+".pool.root"
            pass
        pass
    return fileName
if D2PDFlags.WriteDAOD_H4lBremRecStream(
) and D2PDFlags.WriteDAOD_H4lBremRecStream.DoBremRec:
    from RecExConfig.RecAlgsFlags import recAlgs
    recAlgs.doEgammaBremReco.set_Value_and_Lock(True)
    include("egammaBremRec/egammaBremRec_preInclude.py")
    #recAlgs.doEgammaBremReco.set_Value_and_Lock(True)
    #include( "RecExCond/RecExCommon_flags.py" )
    #DetFlags.ID_setOn()
    #DetFlags.LAr_setOn()
    pass

#from AthenaCommon.DetFlags import DetFlags
#DetFlags.ID_setOn()

# Output file name handling. No need to change anything here
if len(D2PDFlags.OutputDirectoryName()
       ) >= 1 and not D2PDFlags.OutputDirectoryName().endswith("/"):
    D2PDFlags.OutputDirectoryName = D2PDFlags.OutputDirectoryName() + "/"
    pass

# Print the used configuration to the log file
if rec.OutputLevel() <= INFO:
    print rec
    print D2PDFlags
    pass

# =============================================================================
# Final debugging options...
# Dump list of containers on StoreGate to output log
#StoreGateSvc = Service( "StoreGateSvc" )
#StoreGateSvc.Dump = True
                                     outputCollection        = 'MyZmumuLooseZmumuBosonCollection',
                                     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
Beispiel #4
0
    pdgIDList=[11, 13],  # e-, e+, mu+, mu-
    pdgIDListOrigin=[23, 24, 25],  # Z, W, H boson
    acceptStatusCodeList=[1],  # stable
    removeDocumentationLine=True,
    keepOnlyGenerator=True,
    keepOnlyStable=True,
    removeSelfDecay=True)

#====================================================================
# 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_Test"
fileName = D2PDFlags.OutputDirectoryName() + "MyD2PDTestStream.pool.root"
TestStream = 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
TestStream.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
#excludeList = []
#excludeList = list(set(excludeList)) # This removes dublicates from the list