Пример #1
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)
Пример #2
0
# 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 );

Пример #3
0
process.GeometryService = mu2e.Service(
    "GeometryService",
    inputfile=cms.untracked.string("Mu2eG4/test/geom_01.txt"))

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

# Start each new event with an empty event.
process.source = mu2e.Source("EmptySource")

# Make some generated tracks and add them to the event.
process.generate = mu2e.EDProducer(
    "EventGenerator",
    inputfile=mu2e.untracked.string("Mu2eG4/test/genconfig_01.txt"))

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

# 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)
Пример #4
0
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)
Пример #5
0
)

# 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 3)
process.source = mu2e.Source("PoolSource",
   fileNames = mu2e.untracked.vstring("data_03.root")
)

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

# 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.checkhits );

Пример #6
0
)

# End of the section that defines and configures modules.

# Define a path that selects odd numbered events
process.podd = mu2e.Path( process.ex02hitmaker
                	 *process.oddfilter
                        )

# Define a path that selects even numbered events
process.peven = mu2e.Path( process.ex02hitmaker
                	  *process.evenfilter
                         )

# 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")
process.MessageLogger.cerr.ToyHitInfo = mu2e.untracked.PSet(
    limit = mu2e.untracked.int32(-1)
)

# Tell the system to execute all paths.
process.output = mu2e.EndPath(   process.hitinspect
                               *(process.outputeven + process.outputodd)
                             )