Use SLHA files from NMSSMTools as input for Calchep

Asked by Niam Wellson

The current NMSSM package that ships with Calchep does not contain the option to read SLHA files produced by NMSSMTools.

If I use the available model files: NMSSM(../spect.dat) and NMSSM(../spect.dat)+hg as givens I get errors such as:
ar: creating lib_0.a
ar: VandP.o: No such file or directory
ranlib: 'lib_0.a': No such file
rm: cannot remove 'VandP.o': No such file or directory
gcc: error: lib_0.a: No such file or directory

And I'm not sure why these files still contain the "input" lines and call to system (they are supposed to just read all data from SLHA aren't they?)

======================================
CW |MW/MZ % cos of the Weinberg angle
SW |sqrt(1-CW^2)
vev |Sqrt2*MW*SW/EE
C2W |CW^2-SW^2
LamQCD |initQCD5(alfSMZ, McMc, MbMb, Mtp)
open |openAppend("inp")
input1 |aPrintF("Block MODSEL # Select model\n 1 1 # SUGRA\n 3 1 # NMSSM PARTICLE CONTENT\n")
input1a|aPrintF(" 8 2 # Precision for Higgs masses\n 13 1 # Decay of sparticles\n")
input2 |aPrintF(" 9 0 # FLAG FOR MICROMEGAS (0=NO)\n 10 0 # No scan, no ...\n")
input3 |aPrintF("Block SMINPUTS # Standard Model inputs\n")
input4 |aPrintF(" 3 %.8E # alpha_s(MZ) SM MSbar\n", alfSMZ)
input5 |aPrintF(" 5 %.8E # mb(mb) SM MSbar\n", MbMb)
input6 |aPrintF(" 6 %.8E # mtop(pole)\n", Mtp)
input7 |aPrintF("Block MINPAR # Input parameters\n")
input8 |aPrintF(" 1 %.8E # m0\n", mZero)
input10|aPrintF(" 2 %.8E # m1/2\n", mHalf)
input11|aPrintF(" 3 %.8E # tanb\n", tb)
input12|aPrintF(" 4 %.0f # sign(mu)\n", sgn)
input13|aPrintF(" 5 %.8E # A0\n", A0)
input14|aPrintF("Block EXTPAR\n")
input15|aPrintF(" 61 %.8E # L \n", Lambda)
input16|aPrintF(" 63 %.8E # A_LAMBDA\n", aLambdaG)
input17|aPrintF(" 64 %.8E # A_K\n", aKappaG)
input18|aPrintF(" 66 %E #XIF\n 67 %E #XIS\n 68 %E #mu'\n 69 # MS'^2\n 72 %E M3H^2\n", mXiFG*fabs(mXiFG), mXiSG*fabs(mXiSG), muPG, msPG*fabs(msPG), m3hG*fabs(m3hG))
sysCall|System("Tools=; export EXPCON_PATH=$NMSSM/EXPCON;rm -f spect; $NMSSM/main/nmspec")
rd |slhaRead("spectr", 0)
mu |slhaVal("HMIX", MZ, 1, 1)

======================================

If I remove the "input" and sysCallSystem lines, and just provide the spectr file produced by NMSSMTools, I still get errors.

What I am looking for is this. I have SLHA files generated by me using NMSSMTools. I would like to be able to feed these to Calchep such that it reads eveything from it (the values of the input parameters and the widths, etc.) and gives me the cross-section for the process I'm interested in.

Is this possible?

Question information

Language:
English Edit question
Status:
Solved
For:
CalcHEP Edit question
Assignee:
No assignee Edit question
Solved by:
Alexander Pukhov
Solved:
Last query:
Last reply:
Revision history for this message
Alexander Pukhov (pukhov) said :
#1

Anything is possible in programming!

You indeed have to remove all  lines starting from  "open"  to "sysCall".

The tricky point is path to file. CalcHEP reads files from directory
"results". But files in "results" are cleaned sometimes.

So, if you are going to dispose your file in directory "work" (one step
up), then you have to write

    rd |slhaRead("../spectr", 0)

This solution is good  until you  launch batch. In this  file will not
be  found. For such case you can dispose it in work/models

    rd |slhaRead("../models/spectr", 0)

All models directory is copied to batch session.
Best
     Alexander Pukhov

12/19/21 15:20, Niam Wellson пишет:
> Question #699924 on CalcHEP changed:
> https://answers.launchpad.net/calchep/+question/699924
>
> Description changed to:
> The current NMSSM package that ships with Calchep does not contain the
> option to read SLHA files produced by NMSSMTools. All .mdl files contain
> input commands and reading the spectr file generated by the
> "sysCallSystem" command in .mdl.
>
> Specifically, all model files contain the following lines:
>
> ======================================
> CW |MW/MZ % cos of the Weinberg angle
> SW |sqrt(1-CW^2)
> vev |Sqrt2*MW*SW/EE
> C2W |CW^2-SW^2
> LamQCD |initQCD5(alfSMZ, McMc, MbMb, Mtp)
> open |openAppend("inp")
> input1 |aPrintF("Block MODSEL # Select model\n 1 1 # SUGRA\n 3 1 # NMSSM PARTICLE CONTENT\n")
> input1a|aPrintF(" 8 2 # Precision for Higgs masses\n 13 1 # Decay of sparticles\n")
> input2 |aPrintF(" 9 0 # FLAG FOR MICROMEGAS (0=NO)\n 10 0 # No scan, no ...\n")
> input3 |aPrintF("Block SMINPUTS # Standard Model inputs\n")
> input4 |aPrintF(" 3 %.8E # alpha_s(MZ) SM MSbar\n", aEverything is possible in programming!lfSMZ)
> input5 |aPrintF(" 5 %.8E # mb(mb) SM MSbar\n", MbMb)
> input6 |aPrintF(" 6 %.8E # mtop(pole)\n", Mtp)
> input7 |aPrintF("Block MINPAR # Input parameters\n")
> input8 |aPrintF(" 1 %.8E # m0\n", mZero)
> input10|aPrintF(" 2 %.8E # m1/2\n", mHalf)
> input11|aPrintF(" 3 %.8E # tanb\n", tb)
> input12|aPrintF(" 4 %.0f # sign(mu)\n", sgn)
> input13|aPrintF(" 5 %.8E # A0\n", A0)
> input14|aPrintF("Block EXTPAR\n")
> input15|aPrintF(" 61 %.8E # L \n", Lambda)
> input16|aPrintF(" 63 %.8E # A_LAMBDA\n", aLambdaG)
> input17|aPrintF(" 64 %.8E # A_K\n", aKappaG)
> input18|aPrintF(" 66 %E #XIF\n 67 %E #XIS\n 68 %E #mu'\n 69 # MS'^2\n 72 %E M3H^2\n", mXiFG*fabs(mXiFG), mXiSG*fabs(mXiSG), muPG, msPG*fabs(msPG), m3hG*fabs(m3hG))
> sysCall|System("Tools=; export EXPCON_PATH=$NMSSM/EXPCON;rm -f spect; $NMSSM/main/nmspec")
> rd |slhaRead("spectr", 0)
> mu |slhaVal("HMIX", MZ, 1, 1)
>
>
> ======================================
>
> If I remove the "input" and sysCallSystem lines, and just provide the
> spectr file produced by NMSSMTools, I get errors.
>
> What I am looking for is this. I have SLHA files generated by me using
> NMSSMTools. I would like to be able to feed these to Calchep such that
> it reads eveything from it (the values of the input parameters and the
> widths, etc.) and gives me the cross-section for the process I'm
> interested in.
>
> Is this possible?
>

Revision history for this message
Alexander Pukhov (pukhov) said :
#2

May be.  I'll check. Try to use   the way that I proposed.

Best

    Alexander Pukhov

12/19/21 15:35, Niam Wellson пишет:
> Question #699924 on CalcHEP changed:
> https://answers.launchpad.net/calchep/+question/699924
>
> Description changed to:
> The current NMSSM package that ships with Calchep does not contain the
> option to read SLHA files produced by NMSSMTools.
>
> If I use the available model files: NMSSM(../spect.dat) and NMSSM(../spect.dat)+hg as givens I get errors such as:
> ar: creating lib_0.a
> ar: VandP.o: No such file or directory
> ranlib: 'lib_0.a': No such file
> rm: cannot remove 'VandP.o': No such file or directory
> gcc: error: lib_0.a: No such file or directory
>
> And I'm not sure why these files still contain the "input" lines and
> call to system (they are supposed to just read all data from SLHA aren't
> they?)
>
> ======================================
> CW |MW/MZ % cos of the Weinberg angle
> SW |sqrt(1-CW^2)
> vev |Sqrt2*MW*SW/EE
> C2W |CW^2-SW^2
> LamQCD |initQCD5(alfSMZ, McMc, MbMb, Mtp)
> open |openAppend("inp")
> input1 |aPrintF("Block MODSEL # Select model\n 1 1 # SUGRA\n 3 1 # NMSSM PARTICLE CONTENT\n")
> input1a|aPrintF(" 8 2 # Precision for Higgs masses\n 13 1 # Decay of sparticles\n")
> input2 |aPrintF(" 9 0 # FLAG FOR MICROMEGAS (0=NO)\n 10 0 # No scan, no ...\n")
> input3 |aPrintF("Block SMINPUTS # Standard Model inputs\n")
> input4 |aPrintF(" 3 %.8E # alpha_s(MZ) SM MSbar\n", alfSMZ)
> input5 |aPrintF(" 5 %.8E # mb(mb) SM MSbar\n", MbMb)
> input6 |aPrintF(" 6 %.8E # mtop(pole)\n", Mtp)
> input7 |aPrintF("Block MINPAR # Input parameters\n")
> input8 |aPrintF(" 1 %.8E # m0\n", mZero)
> input10|aPrintF(" 2 %.8E # m1/2\n", mHalf)
> input11|aPrintF(" 3 %.8E # tanb\n", tb)
> input12|aPrintF(" 4 %.0f # sign(mu)\n", sgn)
> input13|aPrintF(" 5 %.8E # A0\n", A0)
> input14|aPrintF("Block EXTPAR\n")
> input15|aPrintF(" 61 %.8E # L \n", Lambda)
> input16|aPrintF(" 63 %.8E # A_LAMBDA\n", aLambdaG)
> input17|aPrintF(" 64 %.8E # A_K\n", aKappaG)
> input18|aPrintF(" 66 %E #XIF\n 67 %E #XIS\n 68 %E #mu'\n 69 # MS'^2\n 72 %E M3H^2\n", mXiFG*fabs(mXiFG), mXiSG*fabs(mXiSG), muPG, msPG*fabs(msPG), m3hG*fabs(m3hG))
> sysCall|System("Tools=; export EXPCON_PATH=$NMSSM/EXPCON;rm -f spect; $NMSSM/main/nmspec")
> rd |slhaRead("spectr", 0)
> mu |slhaVal("HMIX", MZ, 1, 1)
>
>
> ======================================
>
> If I remove the "input" and sysCallSystem lines, and just provide the
> spectr file produced by NMSSMTools, I still get errors.
>
> What I am looking for is this. I have SLHA files generated by me using
> NMSSMTools. I would like to be able to feed these to Calchep such that
> it reads eveything from it (the values of the input parameters and the
> widths, etc.) and gives me the cross-section for the process I'm
> interested in.
>
> Is this possible?
>

Revision history for this message
Niam Wellson (nwells) said (last edit ):
#3

Thanks Alexander for your answer.
I tried this and it worked. But just to clarify, I find is that the "Variables" are still written as in "var*.mdl" not from the SLHA file. (for example A0= -1.3 TeV when it is -300 GeV in the SLHA file). Should I do something such that the input values are read off from the SLHA file?
Or does it not matter at this point since Calchep is actually using the values of masses, widths, etc that it needs from the SLHA file, which was computed using my own input values?

Revision history for this message
Alexander Pukhov (pukhov) said :
#4

I think here no collision. I guess now it works properly.

Of course, we can move some parameters from "vars" to "func". You can try.

Best

     Alexander Pukhov

12/19/21 15:50, Niam Wellson пишет:
> Question #699924 on CalcHEP changed:
> https://answers.launchpad.net/calchep/+question/699924
>
> Niam Wellson posted a new comment:
> Thanks Alexander for your answer.
> I tried this, but what I find is that the "Variables" are still taken from "var*.mdl" not from the SLHA file. Should I do something such that the input values are read off from the SLHA file?
> Or does it not matter at this point since Calchep is actually using the values of masses, widths, etc that it needs from the SLHA file?
>

Revision history for this message
Niam Wellson (nwells) said (last edit ):
#5
Revision history for this message
Niam Wellson (nwells) said (last edit ):
#6

Hello. Thanks a lot for your help. One final question,

I managed to run the batch file. However, I only need to obtain the production cross-section for a specific process. Since I have thousands of SLHA files, this will take a long time since each run of the batch file will take several seconds (even if I write a script to loop over SLHA files and extract sigma each time it will take forever). Is there a quick way to do this? For example in the SM, I can use name_cycle to get sigma quickly. But for the NMSSM using SLHA files, we can't use this method since I can't give name_cycle an SLHA file as input. Any suggestions?

Best regards,

Revision history for this message
Best Alexander Pukhov (pukhov) said :
#7

But I have written yesterday:

I think first of all to organize  cycle you have somehow numerate your
input files.

For instance  you can implement new variable NN  (in vars#.mdl) and
read  files

sysCall| System("cp ../spectr_%.0f spectr_",NN)
rd     |slhaRead("spectr_", 0)

Then you can organize cycle via batch. The table of result will be saved.

Other way, you can use CalcHEP/bin/name_cycle

For this case you can to create n_calchep, set all cuts via  GUI session
and  call from directory  results "name_cycle"

../bin/name_cycle

........

12/20/21 09:45, Niam Wellson пишет:
> Question #699924 on CalcHEP changed:
> https://answers.launchpad.net/calchep/+question/699924
>
> Niam Wellson posted a new comment:
> Hello. Thanks a lot for your help. One final question,
>
> I managed to run the batch file. However, I only need to obtain the
> production cross-section for a specific process. Since I have thousands
> of SLHA files, this will take a long time for each file (even if I write
> a script to loop over SLHA files and extract sigma each time). Is there
> a quick way to do this? For example in the SM, I can use name_cycle to
> get sigma quickly. But for the NMSSM using SLHA files, I couldn't use
> this method. Any suggestions?
>
> Best regards,
>

Revision history for this message
Niam Wellson (nwells) said (last edit ):
#8

Thanks again for your help and patience. I am new to Calchep but I am getting there.

I defined a variable for particle NN. I used name_cycle and it worked: name_cycle MNN 1000 10 10. Then I get a table of mass vs cross section. I can use this to interpolate and write a function for the cross-section.

Thanks a lot for your help.

Revision history for this message
Niam Wellson (nwells) said :
#9

Thanks Alexander Pukhov, that solved my question.

Revision history for this message
Alexander Pukhov (pukhov) said :
#10

12/20/21 12:20, Niam Wellson пишет:
> Question #699924 on CalcHEP changed:
> https://answers.launchpad.net/calchep/+question/699924
>
> Niam Wellson posted a new comment:
> Thanks again for your help and patience. I am new to Calchep but I am
> getting there.
>
> I defined a variable for particle NN. I used name_cycle and it worked:
> name_cycle MNN 1000 10 10. Then I get a table of mass vs cross section.
> I can use this to interpolate and write a function for the cross-
> section. This is kind of approximation I can use.
>
> If I want to be more accurate then do you think it is enough to modify
> the "session.dat" file in /results and put corresponding values for each
> SLHA file? (e.g. values of lamada, kappa, low-scale susy particles,
> etc). And then do name_cycle "mass as in SLHA file" 0 1 and store output
> in file, and repeat this procedure for all SLHA files.
>
> This is my last question, and thanks a lot for your help.

Not clear what you mean. You can pass parameters via session,dat.

Other option is par_scan.  Here you   prepare a file with  set of input
parameters and get output with cross section and other calculated
parameters.

Best

    Alexander Pukhov

>

Revision history for this message
Niam Wellson (nwells) said :
#11

Ok thanks, then I think the easiest option for me is to write script to modify values of session.dat based on a given SLHA files, then use name_cycle MNN *mass as in relevant SLHA file" 0 1. This way I get cross section relevant to each SLHA file and put all in a table.