#################################################################################
# Configuration file for JpsiToChic1GammaToKKPiGamma PWA                              #
#                                                                               #
# Authors: Bertram Kopf                                   #
#################################################################################

#errLogMode = debug
errLogMode = trace

datFile    = ./evtGenChic1ToKKpiData.dat
mcFile     = ./evtGenChic1ToKKpiMc.dat

name = _JpsiToChic1GammaToKKPiGamma

paramFile = ./startparams.dat

noOfDataEvents = 3000
ratioMcToData  = 3

useDataEventWeight = false
useMCEventWeight = false

mode = qaMode

massRangeCuts = 3.50966 3.51166 K+ K- pion0

cmsMass = 3.686109
initial4Vec = 3.686109 0.0305 0. 0.
projectile4Vec = 1.8430545 0.01525 0. 1.8429913364824182

# Determines whether information about configuration options should be emitted
verbose = 1

finalStateParticle = K+
finalStateParticle = K-
finalStateParticle = pion0
finalStateParticle = photon

cloneParticle = Chic1 Chic1a0
cloneParticle = Chic1 Chic1K*+
cloneParticle = Chic1 Chic1K*-
cloneParticle = Chic1 Chic1KPiS12+
cloneParticle = Chic1 Chic1KPiS12-

productionFormalism = Heli


usePhaseSpaceHyp = false

production = Chic1a0 photon BlattWBarrier 0.66
production = Chic1K*+ photon BlattWBarrier 0.66
production = Chic1K*- photon BlattWBarrier 0.66
production = Chic1KPiS12+ photon BlattWBarrier 0.66
production = Chic1KPiS12- photon BlattWBarrier 0.66

decay = Cano aMatrix0 To K+ K-
decay = Cano noIso K*- To K- pion0
decay = Cano noIso K*+ To K+ pion0
decay = Cano noIso KPiS12- To K- pion0
decay = Cano noIso KPiS12+ To K+ pion0

decay = Cano Chic1a0 To aMatrix0 pion0
decay = Cano noIso Chic1K*+ To K*+ K-
decay = Cano noIso Chic1K*- To K*- K+
decay = Cano noIso Chic1KPiS12+ To KPiS12+ K-
decay = Cano noIso Chic1KPiS12- To KPiS12- K+

#Dynamics
# NO dynamics!! Omega shape is in MCs, eta_c shape is in MCs!
addDynamics = K*+ BreitWignerBlattWRel
addDynamics = K*- BreitWignerBlattWRel
addDynamics = KPiS12+ KpiSWaveIso12
addDynamics = KPiS12- KpiSWaveIso12
addDynamics = aMatrix0 KMatrix ./kMatrixa0_pieta_2channel_2poles_kk.cfg

# replacements
replaceParamSuffix  = K*+ K*
replaceParamSuffix  = K*- K*
replaceParamSuffix  = K+ K
replaceParamSuffix  = K- K
replaceParamSuffix  = KPiS12+ KPiS12
replaceParamSuffix  = KPiS12- KPiS12

replaceParamSuffix  = ToChic1K*_photon ToChic1_photon
replaceParamSuffix  = ToChic1KPiS12_photon ToChic1_photon
replaceParamSuffix  = ToChic1a0_photon ToChic1_photon

replaceParamSuffix  = Chic1K*+To Chic1To
replaceParamSuffix  = Chic1K*-To Chic1To
replaceParamSuffix  = Chic1a0To Chic1To

replaceMassKey = K*+ K*
replaceMassKey = K*- K*
replaceMassKey = KPiS12+ KpiS12
replaceMassKey = KPiS12- KpiS12
replaceMassKey = Chic1KPiS12+ Chic1KPiS12
replaceMassKey = Chic1KPiS12- Chic1KPiS12

#Histogramms
histMass = K+ K- pion0 photon
histMass = K+ K- pion0
histMass = K+ pion0
histMass = K- pion0
histMass = K+ K-

histAngles = photon from K+ K- pion0 photon
histAngles = K+ from K+ K- pion0
histAngles = K- from K+ K- pion0
histAngles = pion0 from K+ K- pion0
histAngles = K+ from K+ K-
histAngles = K+ from K+ pion0
histAngles = K- from K- pion0

#Fixed Parameter
#one phase for production amplitudes 
mnParFix = J1P-1C-1Lama0Lamb1_J1P-1C-1ToChic1_photonPhi

#K* wave
mnParFix = L0S1_Chic1ToK*_KMag
mnParFix = L0S1_Chic1ToK*_KPhi
mnParFix = L1S0_K*ToK_pion0Mag
mnParFix = L1S0_K*ToK_pion0Phi



#KPiS wave
mnParFix = L1S0_Chic1KPiS12ToKPiS12_KMag
mnParFix = L1S0_Chic1KPiS12ToKPiS12_KPhi
mnParFix = L0S0_KPiS12ToK_pion0Mag
mnParFix = L0S0_KPiS12ToK_pion0Phi
mnParFix = KpiS12Chic1KPiS12KetapPhi
mnParFix = KpiS12Chic1KPiS12a_Ketap
mnParFix = KpiS12Chic1KPiS12b_Ketap
mnParFix = KpiS12Chic1KPiS12c_Ketap 


#a0 matrix
mnParFix = L1S0_Chic1ToaMatrix0_pion0Mag
mnParFix = L1S0_Chic1ToaMatrix0_pion0Phi

mnParFix = L0S0_aMatrix0ToK_KMag
mnParFix = L0S0_aMatrix0ToK_KPhi

#mnParFix = a980pion0etagFactor
#mnParFix = a1450pion0etagFactor
mnParFix = a1450K+K-gFactor


pdgTableFile = /Particle/pdtNew.table
cacheAmps = true

serverPort = 24214
serverAddress = localhost
noOfClients = 2
noOfThreads = 4
evoIterations = 50
evoPopulation = 160

#calcContribution = eta(2225)  withZeroAmp  Tof2(1910)
#calcContribution = f2(1910)  withZeroAmp  Toeta(2225)
#contributionError = true
#saveContributionHistos = true
