Hi guys
I am building a model within a workspace with this code
w.factory("SUM::loc_norm(nS[0,400]*Uniform::unif(Z),nB[-10,10]*unif)")
# Create a new model norm_loc, starting from loc_norm
w.factory(f"EDIT::norm_LOc(loc_norm, nB=expr('nruns*Rloc*{tlocmax-tlocmin}',nruns[6],Rloc[{ncosmrateloc},0.,0.6]), nS=expr('S/K*(1+E*D)/(1-D*D)',S[1000,50,500],D[0.,-0.8,0.8],E[0.,-2.,2.],K[1.30,0.7,1.6]))")
# Now with the defined expressions for the nB and nS, build the composite model with the templates
w.factory("SUM::model(nU[900,1500]*pdf_pbarUp,nD[900,1500]*pdf_pbarDn,nB*pdf_cosm)")
w.factory("expr::nU_expr('0.5*S*(1+E)', S, E)") # expression for nU
w.factory("expr::nD_expr('0.5*S*(1-E)', S, E)") # expression for nD
w.factory(f"expr::nB_expr('nruns*R*{tmagbmax-tmagbmin}*KK',nruns,R[{ncosmrate},0.,20], KK[1])") # expression for nB
w.factory(f"EDIT::model_MAGB(model, nB=nB_expr, nU=nU_expr, nD=nD_expr)")
w.factory(f"Gaussian::Rconstr(R,{ncosmrate},{ecosmrate})") # constrain su R, rate cosmici
# Define a R variable, used to adjust the background
R = w.var('R')
R.setMin(ncosmrate-6*ecosmrate)
R.setMax(ncosmrate+6*ecosmrate)
R.setVal(ncosmrate)
w.factory(f"Gaussian::Dconstr(D,{Dmu},{Dsigma})") # constrain on D, efficiency
w.factory("SIMCLONE::model_fit( model_MAGB, $SplitParam({S,E,nruns, KK},biaskey) )") # for the variable in the list, a different one for each bias key
w.Print()
I am wondering if SplitParam at the end is splitting the expression nB, nU, and ND or if it is splitting only the variables, and the model then relies on the old expression nU and nB that are not splitted.