#
#**** general 
#
Configuration:List = 1
Configuration:History = 1
Verbose:info = 1
Verbose:debug = 1
Verbose:test = 1
MemoryDebug = 1
CobraTrapFPE = 0
TextColor = false

#
#**** number of events to be processed 
# - ignored if using G4 macro or command line
#
Generator:MaximumNumberOfDoableEvents = 10000
NumberOfEventsToBeProcessed = 10000

TrackerNumberingScheme:DumpG4DetectorPosition = 1
TrackerNumberingScheme:DumpG4DetectorHistory = 1
#
#**** random generator sequence
#
CMSRandom:Seeds = 40 3
#
#**** persistency (name of output dataset)
#
# The following two lines reduce the number of files in the dataset.
OneMetaFile = true
*:Location = EventData
FilePath = /afs/cern.ch/user/t/tomalini/scratch0/datasets/OSCAR_330
#FilePath = rfio:/castor/cern.ch/user/t/tomalini/OSCAR_330
PoolCatalogFile = xmlcatalog_file:/afs/cern.ch/user/t/tomalini/scratch0/datasets/OSCAR_330/PoolFileCatalogOneTIBTEC.xml
# N.B. UNLESS STATED OTHERWISE, DELTA RAYS SWITCHED OFF AND BFIELD ON !!!
OutputDataSet = /System/perpendicular/perpendicular
#
GoPersistent = 1 
DBPopulator:LocalMetaData = 1
# Digitize this many events before writing to DB.
# Making it small makes the job very slow, but large needs more memory.
DBPopulator:CommitInterval = 1000
DBPopulator:MaxDBSize = 0.5
DBPopulator:checkDBInterval = 10
DBPopulator:UnNamedContainers = 1
DataSet:JobsPerDB = 1
DataSet:DBPoolIncrement = 1
#
#**** extra packages
#
ExtraPackages = CMSProductionPhysics:MantisGunReader
#ExtraPackages = CMSProductionPhysics:MantisNtplReader
#
#  run manager
#
RunManager:PhysicsTablesDir = PhysicsTables
RunManager:StorePhysicsTables = false                 
RunManager:RestorePhysicsTables = false
RunManager:StoreRNDM = false 
RunManager:RestoreRNDM = false
RunManager:Verbose = 1
#
#**** user action dispatching
#
RunAction:DispatchBeginOfRun = 1
RunAction:DispatchEndOfRun = 1
EventAction:DispatchBeginOfEvent = 1
EventAction:DispatchEndOfEvent = 1
TrackingAction:DispatchPreTrack = 1
TrackingAction:DispatchPostTrack = 1
SteppingAction:DispatchStep = 1
#
#**** Store sim tracks
#
EventAction:SaveSimTracks = true
#TrackingAction:StoreAllTrajectories = 1
#TrackingAction:StoreTrajectoriesForSavedOnly = 1
#TkSimTrackSelection:EnergyThresholdForPersistencyInGeV = -99
#TkSimTrackSelection:EnergyThresholdForHistoryInGeV = -99
#
#**** Geometry  file name and directory.
#
DDDParserInstance = 1
#Geometry_PATH = .:/afs/cern.ch/user/t/tomalini/tracker/ORCA_8_1_3/src/D
ata/TrackerTBGeometries/X5bMay2004/ianx5:${Geometry_PATH}
DDDConfigFile = ./configuration.xml
#DDDConfigFile = ./OSCARconfiguration.xml
#
#**** Physics
#
#Physics = 1
Physics:Verbose = 1
#Physics:GeantinoRun = 0
#Physics:DefaultCutValue(mm) = 0.01
Physics:DefaultCutValue(mm) = 10000
#ProductionPhysics:BuildPreciseRangeTables = false
ProductionPhysics:HadronicPhysicsOn = true
ProductionPhysics:ElectroNuclearProcess = true
ProductionPhysics:SynchrotronRadiation = true
#**** enable usage of "model" physics lists
ProductionPhysics:EMModelPhysics = 0
ProductionPhysics:MuonModelPhysics = 0
ProductionPhysics:IonModelPhysics = 0
#  threshold for eBrem - CMS modification for electron rebirth in MeV
ProductionPhysics:ThresholdForElectron = 500
#
# Geant4 physics lists for calorimetry; for more information follow
# links on physics lists by use-case from
# http://wwwasd.web.cern.ch/wwwasd/geant4/geant4.html
#
# LHEP: the fastest in terms of CPU; uses LEP and HEP parametrized
# models for inelastic scattering;
# parametrizes the final states individual inelastic reactions;
# you will not see resonances;
# the detailed secondary angular distributions for O(100MeV) reactions
# may not be described perfectly;
# the average quantities will be well described
#
# QGSP: uses theory driven modeling for the reactions of energetic
# pions, kaons, and nucleons;
# employs quark gluon string model for the 'punch-through'
# interactions of the projectile with a nucleus, the string excitation
# cross-sections being calculated in quasi-eikonal approximation;
# a pre-equilibrium decay model with an extensive evaporation phase to
# model the behavior of the nucleus 'after the punch';
# it uses current best pion cross-section
#       
# QGSC: as QGSP for the initial reaction, but uses chiral invariant
# phase-space decay (multi-quasmon fragmentation) to model the
# behavior of the system's fragmentation
#
# FTFP: is similar to QGSP for the treatment of the fragmentation, but
# the string excitation/fragmentation is changed from quark-gluon
# string model to a diffractive string excitation similar to that in
# FRITJOF, and the Lund fragmentation functions
#
ProductionPhysics:HadronicsListSelection = LHEP
#
#
#*** Particle generation: 
#*** only switch it off if you don't want any generator (only geometry s
tudies) 
#ParticleGeneration = 1
#
#**** Generator cuts (cuts before tracking)
#
Generator:ApplyPhiCuts = 0
Generator:ApplyEtaCuts = 0
Generator:ApplyPtCuts = 0
#Generator:MinPhiCut(deg) = 
#Generator:MaxPhiCut(deg) =
#Generator:MinEtaCut = -3.5
#Generator:MaxEtaCut = 3.5
#Generator:MinPtCut(MeV) = 40
#Generator:MaxPtCut(MeV) = 9999999
#
#**** Generator options
#
# choose HEPEvt or HepMC
#RawEvent2G4 = HEPEvt
#
#** If generator is particle gun (MantisGunReader in ExtraPackages)
#
#ParticleGun:Gun = FlatRandomPtGun
ParticleGun:Gun = FlatRandomEGun
# mu+
ParticleGun:PID = -13
# pi+
#ParticleGun:PID = 211
# proton
#ParticleGun:PID = 2212
ParticleGun:MinEta =  0
ParticleGun:MaxEta =  0
#ParticleGun:MinPhi = 4.71239
#ParticleGun:MaxPhi = 4.71239
ParticleGun:MinPhi =  3.56
ParticleGun:MaxPhi =  5.86
#ParticleGun:MinPt = 120
#ParticleGun:MaxPt = 120
ParticleGun:MinE = 100
ParticleGun:MaxE = 100
#ParticleGun:PhiSteps =
#ParticleGun:EtaSteps =
#
#** If generator is ntuple reader (MantisNtplReader in ExtraPackages)
#
#EventNtplReader:NtplFileName = /afs/cern.ch/cms/geant4rep/genntpl/minbi
as.ntpl
#EventNtplReader:NtplID = 101
#EventNtplReader:VertexGenerator = GaussianEventVertexGenerator
#HepEventCmkinNtupleReader:FirstEvent = 0
#
#** if generator is test file reader in HEPEVT format (MantisTxtReader i
n ExtraPackages)
#
#EventTxtReader:TxtFileName = pythia_event.data
#EventTxtReader:VertexGenerator = GaussianEventVertexGenerator
#
#** if generator is Pythia (MantisPythiaReader in ExtraPackages)
#EventPythiaReader:VertexGenerator = GaussianEventVertexGenerator

#
#**** Generator vertex smearing (in units of mm)
# 
Generator:VertexGenerator = FlatEventVertexGenerator
#Generator:VertexGenerator = GaussianEventVertexGenerator

#** If VertexGenerator is GaussianEventVertexGenerator
#
VertexGenerator:MeanX = 0.
VertexGenerator:MeanY = 0.
VertexGenerator:MeanZ = -1999.
VertexGenerator:SigmaX = 20.
VertexGenerator:SigmaY = 20.
VertexGenerator:SigmaZ = 1.
# 
#** If VertexGenerator is FlatEventVertexGenerator
# 
VertexGenerator:MinX = -3
VertexGenerator:MinY =  0.
VertexGenerator:MinZ = -50.
VertexGenerator:MaxX =  3
VertexGenerator:MaxY =  0.
VertexGenerator:MaxZ =  50.
# 
# 
#**** Magnetic Field
#
MantisMagneticField:UseMagneticField = true
MagneticField:Name = UniformMagneticField
#UniformMagneticField:Value = 0.001
#gufld:delta = 1.0
gufld:delta = -1.0

#
#**** Avoid loops, ping-pong between volumes, crashings
# 
SteppingAction:KillBeamPipe = true
SteppingAction:Kick0Steppers = true
SteppingAction:PrintKicks = true
SteppingAction:CriticalEnergyForVacuum(MeV) = 2.0
SteppingAction:CriticalDensity(g/cm3) = 1.e-25
SteppingAction:CriticalStepLength(mm) = 1.e-6
SteppingAction:KickLength(mm) = 0.9e-6
SteppingAction:CriticalNumberOfSteps = 10000

#
#**** Geant4 macro (NO_G4_MACRO = 1 => macro ignored; batch processing)
#
NO_G4_MACRO = true
#
# Number of events is specified in here.
# Running minimal.macro inside this macro will draw picture of geometry.
#G4InputFile = hit-writing.macro