process.Flag_eeBadScFilter, process.Flag_ecalLaserCorrFilter,
    process.Flag_trkPOGFilters,
    process.Flag_chargedHadronTrackResolutionFilter,
    process.Flag_muonBadTrackFilter, process.Flag_trkPOG_manystripclus53X,
    process.Flag_trkPOG_toomanystripclus53X,
    process.Flag_trkPOG_logErrorTooManyClusters, process.Flag_METFilters,
    process.endjob_step, process.RECOSIMoutput_step,
    process.MINIAODSIMoutput_step)

# customisation of the process.

# Automatic addition of the customisation function from TauAnalysis.EmbeddingProducer.customisers
from TauAnalysis.EmbeddingProducer.customisers import customiseAllSteps

#call to customisation function customiseAllSteps imported from TauAnalysis.EmbeddingProducer.customisers
process = customiseAllSteps(process)

# End of customisation functions
#do not add changes to your config after this point (unless you know what you are doing)
from FWCore.ParameterSet.Utilities import convertToUnscheduled

process = convertToUnscheduled(process)
process.load('Configuration.StandardSequences.PATMC_cff')
from FWCore.ParameterSet.Utilities import cleanUnscheduled

process = cleanUnscheduled(process)

# customisation of the process.

# Automatic addition of the customisation function from PhysicsTools.PatAlgos.slimming.miniAOD_tools
from PhysicsTools.PatAlgos.slimming.miniAOD_tools import miniAOD_customizeAllMC
    pythiaHepMCVerbosity = cms.untracked.bool(False),
    pythiaPylistVerbosity = cms.untracked.int32(0)
)


process.ProductionFilterSequence = cms.Sequence(process.generator)

# Path and EndPath definitions
process.generation_step = cms.Path(process.pgen)
process.simulation_step = cms.Path(process.psim)
process.genfiltersummary_step = cms.EndPath(process.genFilterSummary)
process.endjob_step = cms.EndPath(process.endOfProcess)
process.FEVTDEBUGoutput_step = cms.EndPath(process.FEVTDEBUGoutput)

# Schedule definition
process.schedule = cms.Schedule(process.generation_step,process.genfiltersummary_step,process.simulation_step,process.endjob_step,process.FEVTDEBUGoutput_step)
# filter all path with the production filter sequence
for path in process.paths:
	getattr(process,path)._seq = process.ProductionFilterSequence * getattr(process,path)._seq 

# customisation of the process.

# Automatic addition of the customisation function from TauAnalysis.EmbeddingProducer.customisers
from TauAnalysis.EmbeddingProducer.customisers import customiseAllSteps 

#call to customisation function customiseAllSteps imported from TauAnalysis.EmbeddingProducer.customisers
process = customiseAllSteps(process)

# End of customisation functions