CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/SimCalorimetry/EcalTestBeam/python/gensimdigi_H4EEtest_cfg.py

Go to the documentation of this file.
00001 import FWCore.ParameterSet.Config as cms
00002 
00003 process = cms.Process("EcalTBH4GenSimDigi")
00004 
00005 process.load("FWCore.MessageLogger.MessageLogger_cfi")
00006 
00007 process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")
00008 
00009 process.RandomNumberGeneratorService = cms.Service("RandomNumberGeneratorService",
00010     saveFileName = cms.untracked.string(''),
00011     generator = cms.PSet(
00012         initialSeed = cms.untracked.uint32(123456789),      
00013         engineName = cms.untracked.string('HepJamesRandom') 
00014     ),                                                      
00015     VtxSmeared = cms.PSet(
00016         initialSeed = cms.untracked.uint32(98765432),
00017         engineName = cms.untracked.string('HepJamesRandom')
00018     ),
00019     g4SimHits = cms.PSet(
00020         initialSeed = cms.untracked.uint32(11),
00021         engineName = cms.untracked.string('HepJamesRandom')
00022     ),
00023     SimEcalTBG4Object = cms.PSet(
00024         initialSeed = cms.untracked.uint32(12),
00025         engineName = cms.untracked.string('HepJamesRandom')
00026     ),
00027     mix = cms.PSet(
00028         initialSeed = cms.untracked.uint32(12345),
00029         engineName = cms.untracked.string('HepJamesRandom')
00030     ),
00031     simEcalUnsuppressedDigis = cms.PSet(
00032         initialSeed = cms.untracked.uint32(1234567),
00033         engineName = cms.untracked.string('HepJamesRandom')
00034     ),
00035 )
00036 
00037 process.RandomEngineStateProducer = cms.EDProducer("RandomEngineStateProducer")
00038 
00039 
00040 process.maxEvents = cms.untracked.PSet(
00041     input = cms.untracked.int32(25)
00042 )
00043 
00044 #Geometry
00045 
00046 process.load("Geometry.EcalTestBeam.TBH4_2007_GeometryIdeal_cfi")
00047 
00048 # No magnetic field
00049 
00050 process.load("MagneticField.Engine.uniformMagneticField_cfi")
00051 
00052 process.source = cms.Source("EmptySource")
00053 
00054 # defines common_beam_direction_parameters
00055 process.load("SimG4CMS.EcalTestBeam.ee_PositionParticleGun_cff")
00056 
00057 process.generator = cms.EDProducer("FlatRandomEGunProducer",
00058     PGunParameters = cms.PSet(
00059         process.common_beam_direction_parameters,
00060         PartID = cms.vint32(11),
00061         MinE = cms.double(119.99),
00062         MaxE = cms.double(120.01)
00063     ),
00064     Verbosity = cms.untracked.int32(1), ## set to 1 (or greater)  for printouts
00065 
00066     psethack = cms.string('single electron'),
00067     AddAntiParticle = cms.bool(False),
00068 )
00069 
00070 process.ProductionFilterSequence = cms.Sequence(process.generator)
00071 
00072 from IOMC.EventVertexGenerators.VtxSmearedParameters_cfi import *
00073 
00074 #
00075 # this module takes input in the units of *cm* and *radian*!!!
00076 #
00077 
00078 process.VtxSmeared = cms.EDProducer("BeamProfileVtxGenerator",
00079     process.common_beam_direction_parameters,
00080     VtxSmearedCommon,
00081     BeamSigmaX = cms.double(2.4),
00082     BeamSigmaY = cms.double(2.4),
00083     GaussianProfile = cms.bool(False),
00084     BinX = cms.int32(50),
00085     BinY = cms.int32(50),
00086     File       = cms.string('beam.profile'),
00087     UseFile    = cms.bool(False),
00088     TimeOffset = cms.double(0.)                      
00089 )
00090 
00091 # Geant4, ECAL test beam specific OscarProducer configuration
00092 
00093 process.load("SimG4Core.Application.g4SimHits_cfi")
00094 
00095 process.g4SimHits.UseMagneticField = cms.bool(False)
00096 process.g4SimHits.Physics.DefaultCutValue = 1.
00097 process.g4SimHits.NonBeamEvent = cms.bool(True)
00098 process.g4SimHits.generator.HepMCProductLabel = cms.string('generator')
00099 process.g4SimHits.generator.ApplyPCuts = cms.bool(False)
00100 process.g4SimHits.generator.ApplyEtaCuts = cms.bool(True)
00101 process.g4SimHits.generator.ApplyPhiCuts = cms.bool(False)
00102 process.g4SimHits.generator.MaxEtaCut = cms.double(2.5)
00103 process.g4SimHits.generator.MinEtaCut = cms.double(0.0)
00104 process.g4SimHits.CaloSD.CorrectTOFBeam = cms.bool(True)
00105 process.g4SimHits.CaloSD.BeamPosition = cms.double(-26733.5)
00106 process.g4SimHits.CaloTrkProcessing.TestBeam = cms.bool(True)
00107 process.g4SimHits.StackingAction.MaxTrackTime = cms.double(10000.)
00108 process.g4SimHits.SteppingAction.MaxTrackTime = cms.double(10000.)
00109 process.g4SimHits.CaloSD.TmaxHit = cms.double(10000.)
00110 process.g4SimHits.CaloSD.TmaxHits = cms.vdouble(10000.,10000.,10000.,10000.,10000.)
00111 
00112 process.g4SimHits.Watchers = cms.VPSet(cms.PSet(
00113     type = cms.string('EcalTBH4Trigger'),
00114     verbose = cms.untracked.bool(False),
00115     #IMPORTANT    #    #    #    #    #    #    #    # NUMBER OF EVENTS TO BE TRIGGERED 
00116     trigEvents = cms.untracked.int32(25)
00117 ))
00118 
00119 
00120 # Test Beam ECAL specific MC info
00121 
00122 process.SimEcalTBG4Object = cms.EDProducer("EcalTBMCInfoProducer",
00123     process.common_beam_direction_parameters,
00124     CrystalMapFile = cms.FileInPath('Geometry/EcalTestBeam/data/BarrelSM1CrystalCenterElectron120GeV.dat'),
00125     moduleLabelVtx = cms.untracked.string('generator')
00126 )
00127 
00128 # Test Beam ECAL hodoscope raw data simulation
00129 
00130 process.SimEcalTBHodoscope = cms.EDProducer("TBHodoActiveVolumeRawInfoProducer")
00131 
00132 # Test Beam ECAL Event header filling
00133 
00134 process.SimEcalEventHeader = cms.EDProducer("FakeTBEventHeaderProducer",
00135     EcalTBInfoLabel = cms.untracked.string('SimEcalTBG4Object')
00136 )
00137 
00138 # Digitization
00139 
00140 # no pileup
00141 
00142 process.load("SimGeneral.MixingModule.mixNoPU_cfi")
00143 
00144 # fake TB conditions
00145 
00146 process.load("CalibCalorimetry.EcalTrivialCondModules.EcalTrivialCondRetrieverTB_cfi")
00147 
00148 # Test beam unsuppressed digis
00149 
00150 process.load("SimCalorimetry.EcalTestBeam.ecaldigi_eetestbeam_cfi")
00151 
00152 # Output
00153 
00154 process.output = cms.OutputModule("PoolOutputModule",
00155     outputCommands = cms.untracked.vstring('keep *', 
00156         'drop PSimHits_g4SimHits_*_Sim', 
00157         'keep PCaloHits_g4SimHits_EcalHitsEE_Sim', 
00158         'keep PCaloHits_g4SimHits_CaloHitsTk_Sim', 
00159         'keep PCaloHits_g4SimHits_EcalTBH4BeamHits_Sim'),
00160     fileName = cms.untracked.string('ECALH4TB_detsim_digi.root')
00161 )
00162 
00163 # sequences
00164 
00165 process.doSimHits = cms.Sequence(process.ProductionFilterSequence*process.VtxSmeared*process.g4SimHits)
00166 process.doSimTB = cms.Sequence(process.SimEcalTBG4Object*process.SimEcalTBHodoscope*process.SimEcalEventHeader)
00167 process.doEcalDigis = cms.Sequence(process.mix*process.simEcalUnsuppressedDigis)
00168 process.p1 = cms.Path(process.doSimHits*process.doSimTB*process.doEcalDigis)
00169 process.outpath = cms.EndPath(process.output)
00170 
00171 
00172 # modify the default behavior of the MessageLogger
00173     
00174 process.MessageLogger.destinations=cms.untracked.vstring('cout'
00175                                                          ,'cerr'
00176                                                          ,'G4msg'
00177                                                          )
00178 process.MessageLogger.categories=cms.untracked.vstring('FwkJob'
00179                                                        ,'FwkReport'
00180                                                        ,'FwkSummary'
00181                                                        ,'Root_NoDictionary'
00182                                                        ,'TimeReport'
00183                                                        ,'TimeModule'
00184                                                        ,'TimeEvent'
00185                                                        ,'MemoryCheck'
00186                                                        ,'PhysicsList'
00187                                                        ,'G4cout'
00188                                                        ,'G4cerr'
00189                                                        ,'BeamProfileVtxGenerator'
00190                                                        )
00191 
00192 process.MessageLogger.debugModules = cms.untracked.vstring('g4SimHits','VtxSmeared')
00193 
00194 #Configuring the G4msg.log output
00195 process.MessageLogger.G4msg =  cms.untracked.PSet(
00196     noTimeStamps = cms.untracked.bool(True)
00197     #First eliminate unneeded output
00198     ,threshold = cms.untracked.string('INFO')
00199     #,DEBUG = cms.untracked.PSet(limit = cms.untracked.int32(0))
00200     ,INFO = cms.untracked.PSet(limit = cms.untracked.int32(0))
00201     ,FwkReport = cms.untracked.PSet(limit = cms.untracked.int32(0))
00202     ,FwkSummary = cms.untracked.PSet(limit = cms.untracked.int32(0))
00203     ,Root_NoDictionary = cms.untracked.PSet(limit = cms.untracked.int32(0))
00204     ,FwkJob = cms.untracked.PSet(limit = cms.untracked.int32(0))
00205     ,TimeReport = cms.untracked.PSet(limit = cms.untracked.int32(0))
00206     ,TimeModule = cms.untracked.PSet(limit = cms.untracked.int32(0))
00207     ,TimeEvent = cms.untracked.PSet(limit = cms.untracked.int32(0))
00208     ,MemoryCheck = cms.untracked.PSet(limit = cms.untracked.int32(0))
00209     #TimeModule, TimeEvent, TimeReport are written to LogAsbolute instead of LogInfo with a category
00210     #so they cannot be eliminated from any destination (!) unless one uses the summaryOnly option
00211     #in the Timing Service... at the price of silencing the output needed for the TimingReport profiling
00212     #
00213     #Then add the wanted ones:
00214     ,PhysicsList = cms.untracked.PSet(limit = cms.untracked.int32(-1))
00215     ,G4cout = cms.untracked.PSet(limit = cms.untracked.int32(99999))
00216     ,G4cerr = cms.untracked.PSet(limit = cms.untracked.int32(99999))
00217     ,BeamProfileVtxGenerator = cms.untracked.PSet(limit = cms.untracked.int32(-1))
00218     )
00219 
00220 #Add these 3 lines to put back the summary for timing information at the end of the logfile
00221 #(needed for TimeReport report)
00222 process.options = cms.untracked.PSet(
00223     wantSummary = cms.untracked.bool(True)
00224 )
00225 
00226 #process.load("FWCore.MessageLogger.MessageLogger_cfi")
00227 #process.MessageLogger.cout.placeholder = cms.untracked.bool(False)
00228 #process.MessageLogger.cout.threshold = cms.untracked.string('DEBUG')
00229 #process.MessageLogger.debugModules = cms.untracked.vstring('*')
00230 
00231 
00232 #process.load("Validation.Performance.TimeMemoryG4Info")
00233 
00234 
00235 #process.g4SimHits.G4Commands = cms.vstring('/tracking/verbose 1')