Exemplo n.º 1
0
    inputfile = mu2e.untracked.string("Mu2eG4/test/genconfig_02.txt")
)

# Run G4 and add its hits to the event.
process.g4run = mu2e.EDProducer(
    "G4"
    )

process.outfile = mu2e.OutputModule(
    "PoolOutputModule",
    fileName = cms.untracked.string('file:data_03.root'),
)

# Look at the hits from G4.
process.checkhits = mu2e.EDAnalyzer(
    "ReadBack",
    maxFullPrint = mu2e.untracked.int32(5)
)

# End of the section that defines and configures modules.

# Adjust configuration of message logger.
# Enable debug printout from the module instance "hitinspect".
# Print unlimited messages with category ToyHitInfo.
process.MessageLogger.cerr.threshold = mu2e.untracked.string('DEBUG')
process.MessageLogger.debugModules.append("hitinspect")
process.MessageLogger.categories.append("ToyHitInfo")
process.MessageLogger.categories.append("GEOM")

# Tell the system to execute all paths.
process.output = mu2e.EndPath(  process.generate*process.g4run*process.checkhits*process.outfile );
Exemplo n.º 2
0
# Define the default configuratio for the framework.
import FWCore.ParameterSet.python.Config as mu2e

# Give this job a name.
process = mu2e.Process("Ex03")

# Maximum number of events to do.
process.maxEvents = mu2e.untracked.PSet(input=mu2e.untracked.int32(1))

# Load the standard message logger configuration.
# Threshold=Info. Limit of 5 per category; then exponential backoff.
process.load("Config/MessageLogger_cfi")

# Read events from a file (made by example 2)
process.source = mu2e.Source(
    "PoolSource",
    fileNames=mu2e.untracked.vstring("ExampleData/ex01Input_1.root"))

# Look at provenance information.
process.provinspect = mu2e.EDAnalyzer("Ex03InspectProvenance")

# Adjust configuration of message logger.
# Print unlimited messages with category ToyHitInfo.
process.MessageLogger.categories.append("ProvenanceInfo")
process.MessageLogger.cerr.Provenance = mu2e.untracked.PSet(
    limit=mu2e.untracked.int32(-1))

# Tell the system in which order to execute the modules.
# It is implict that the source module is first.
process.p = mu2e.EndPath(process.provinspect)
Exemplo n.º 3
0
# Load the service that manages root files for histograms.
process.TFileService = mu2e.Service("TFileService",
                                    fileName=mu2e.string("ex01histo.root"),
                                    closeFileFast=mu2e.untracked.bool(False))

# Define and configure some modules to do work on each event.
# Modules are just defined for now, the are scheduled later.

# Read events from a file (made by example 2)
process.source = mu2e.Source(
    "PoolSource",
    fileNames=mu2e.untracked.vstring("ExampleData/ex01Input_1.root"))

# Get the hits out of the event, make plots and printout.
process.hitinspect = mu2e.EDAnalyzer("Ex01InspectHits",
                                     maxFullPrint=mu2e.untracked.int32(10))

# End of the section that defines and configures modules.

# Adjust configuration of message logger.
# Print unlimited messages with category ToyHitInfo.
process.MessageLogger.categories.append("ToyHitInfo")
process.MessageLogger.cerr.ToyHitInfo = mu2e.untracked.PSet(
    limit=mu2e.untracked.int32(-1))

# Tell the message logger summary to include INFO messages.
process.MessageLogger.cerr_stats.threshold = mu2e.untracked.string('INFO')

# Tell the system in which order to execute the modules.
# It is implict that the source module is first.
process.p = mu2e.EndPath(process.hitinspect)