7 #include "Pythia8/SusyLesHouches.h"
13 #if (defined GZIPSUPPORT && ((__GNUC__ * 100) + __GNUC_MINOR__) >= 406)
14 #pragma GCC diagnostic ignored "-Wshadow"
18 #include "boost/iostreams/filtering_stream.hpp"
19 #include "boost/iostreams/filter/gzip.hpp"
22 #if (defined GZIPSUPPORT && ((__GNUC__ * 100) + __GNUC_MINOR__) >= 406)
23 #pragma GCC diagnostic warning "-Wshadow"
38 int SusyLesHouches::readFile(
string slhaFileIn,
int verboseIn,
42 slhaFile = slhaFileIn;
43 verboseSav = verboseIn;
44 useDecay = useDecayIn;
48 const char* cstring = slhaFile.c_str();
52 ifstream file(cstring);
56 boost::iostreams::filtering_istream file;
57 ifstream fileBase(cstring);
60 if (!fileBase.good()) file.setstate(ios_base::badbit);
64 const char *last = strrchr(cstring,
'.');
65 if (last && strncmp(last,
".gz", 3) == 0)
66 file.push(boost::iostreams::gzip_decompressor());
73 message(2,
"readFile",slhaFile+
" not found",0);
77 if (verboseSav >= 3) {
78 message(0,
"readFile",
"parsing "+slhaFile,0);
86 vector<string> processedBlocks;
92 bool foundSlhaTag =
false;
93 bool xmlComment =
false;
94 bool decayPrinted =
false;
108 while ( getline(file, line) ) {
112 for (
unsigned int i=0;i<line.length();i++) line[i]=tolower(line[i]);
115 while (line.find(
" ") != string::npos) line.erase( line.find(
" "), 1);
118 if (line.find(
"<leshouches") != string::npos
119 || line.find(
"<slha") != string::npos) {
126 if (line.find(
"-->") != string::npos) {
129 else if (xmlComment)
continue;
130 else if (line.find(
"<!--") != string::npos) {
134 if (line.find(
"<slha") != string::npos) {
138 if (! headerPrinted) printHeader();
141 if (line.find(
"</header>") != string::npos ||
142 line.find(
"<init") != string::npos) {
143 if (!foundSlhaTag)
return 101;
147 if (!lhefSlha)
continue;
151 if (line.find(
"#") == 0)
continue;
154 if (line.size() == 0)
continue;
155 if (line.size() == 1 && line.substr(0,1) ==
" ")
continue;
158 if (line.find(
"#") != string::npos) {
159 if (line.find(
"#") + 1 < line.length() )
160 comment = line.substr(line.find(
"#")+1,line.length()-line.find(
"#")-2);
163 line.erase(line.find(
"#"),line.length()-line.find(
"#")-1);
167 while (line.find(
" =") != string::npos) line.erase( line.find(
" ="), 1);
168 while (line.find(
"= ") != string::npos) line.erase( line.find(
"= ")+1, 1);
171 if (line.find(
"block") <= 1) {
174 if (! headerPrinted) printHeader();
179 int nameEnd=blockIn.find(
" ",7);
180 blockName=blockIn.substr(nameBegin,nameEnd-nameBegin);
183 if (blockIn.find(
"qnumbers") != string::npos) {
185 int pdgBegin=blockIn.find(
" ",7)+1;
186 int pdgEnd=blockIn.find(
" ",pdgBegin);
187 string pdgString = blockIn.substr(pdgBegin,pdgEnd-pdgBegin);
188 istringstream linestream(pdgString);
190 LHblock<int> newQnumbers;
191 newQnumbers.set(0,linestream);
192 qnumbers.push_back(newQnumbers);
194 string defName, defAntiName, newName, newAntiName;
195 ostringstream idStream;
196 idStream << newQnumbers(0);
197 defName = idStream.str();
198 defAntiName =
"-"+defName;
200 newAntiName = defAntiName;
202 if (comment.length() >= 1) {
203 int firstCommentBeg(0), firstCommentEnd(0);
204 if ( comment.find(
" ") == 0) firstCommentBeg = 1;
205 if ( comment.find(
" ",firstCommentBeg+1) == string::npos)
206 firstCommentEnd = comment.length();
208 firstCommentEnd = comment.find(
" ",firstCommentBeg+1);
209 if (firstCommentEnd > firstCommentBeg)
210 newName = comment.substr(firstCommentBeg,
211 firstCommentEnd-firstCommentBeg);
213 int secondCommentBeg(firstCommentEnd+1), secondCommentEnd(0);
214 if (secondCommentBeg <
int(comment.length())) {
215 if ( comment.find(
" ",secondCommentBeg+1) == string::npos)
216 secondCommentEnd = comment.length();
218 secondCommentEnd = comment.find(
" ",secondCommentBeg+1);
219 if (secondCommentEnd > secondCommentBeg)
220 newAntiName = comment.substr(secondCommentBeg,
221 secondCommentEnd-secondCommentBeg);
225 if (newName != defName && newAntiName == defAntiName) newAntiName =
"";
226 qnumbersName.push_back(newName);
227 qnumbersAntiName.push_back(newAntiName);
228 if (pdgString != newName) {
229 message(0,
"readFile",
"storing QNUMBERS for id = "+pdgString+
" "
230 +newName+
" "+newAntiName,iLine);
232 message(0,
"readFile",
"storing QNUMBERS for id = "+pdgString,iLine);
242 for (
int i=0; i<int(processedBlocks.size()); ++i)
243 if (blockName == processedBlocks[i]) exists =
true;
245 message(0,
"readFile",
"skipping copy of block "+blockName,iLine);
249 processedBlocks.push_back(blockName);
255 LHgenericBlock gBlock;
256 genericBlocks[blockName]=gBlock;
260 if (blockIn.find(
"q=") != string::npos) {
261 int qbegin=blockIn.find(
"q=")+2;
262 istringstream qstream(blockIn.substr(qbegin,blockIn.length()));
267 if (blockName==
"hmix") hmix.setq(q);
268 if (blockName==
"yu") yu.setq(q);
269 if (blockName==
"yd") yd.setq(q);
270 if (blockName==
"ye") ye.setq(q);
271 if (blockName==
"au") au.setq(q);
272 if (blockName==
"ad") ad.setq(q);
273 if (blockName==
"ae") ae.setq(q);
274 if (blockName==
"msoft") msoft.setq(q);
275 if (blockName==
"gauge") gauge.setq(q);
277 if (blockName==
"vckm") vckm.setq(q);
278 if (blockName==
"upmns") upmns.setq(q);
279 if (blockName==
"msq2") msq2.setq(q);
280 if (blockName==
"msu2") msu2.setq(q);
281 if (blockName==
"msd2") msd2.setq(q);
282 if (blockName==
"msl2") msl2.setq(q);
283 if (blockName==
"mse2") mse2.setq(q);
284 if (blockName==
"tu") tu.setq(q);
285 if (blockName==
"td") td.setq(q);
286 if (blockName==
"te") te.setq(q);
287 if (blockName==
"rvlamlle") rvlamlle.setq(q);
288 if (blockName==
"rvlamlqd") rvlamlqd.setq(q);
289 if (blockName==
"rvlamudd") rvlamudd.setq(q);
290 if (blockName==
"rvtlle") rvtlle.setq(q);
291 if (blockName==
"rvtlqd") rvtlqd.setq(q);
292 if (blockName==
"rvtudd") rvtudd.setq(q);
293 if (blockName==
"rvkappa") rvkappa.setq(q);
294 if (blockName==
"rvd") rvd.setq(q);
295 if (blockName==
"rvm2lh1") rvm2lh1.setq(q);
296 if (blockName==
"rvsnvev") rvsnvev.setq(q);
297 if (blockName==
"imau") imau.setq(q);
298 if (blockName==
"imad") imad.setq(q);
299 if (blockName==
"imae") imae.setq(q);
300 if (blockName==
"imhmix") imhmix.setq(q);
301 if (blockName==
"immsoft") immsoft.setq(q);
302 if (blockName==
"imtu") imtu.setq(q);
303 if (blockName==
"imtd") imtd.setq(q);
304 if (blockName==
"imte") imte.setq(q);
305 if (blockName==
"imvckm") imvckm.setq(q);
306 if (blockName==
"imupmns") imupmns.setq(q);
307 if (blockName==
"immsq2") immsq2.setq(q);
308 if (blockName==
"immsu2") immsu2.setq(q);
309 if (blockName==
"immsd2") immsd2.setq(q);
310 if (blockName==
"immsl2") immsl2.setq(q);
311 if (blockName==
"immse2") immse2.setq(q);
312 if (blockName==
"nmssmrun") nmssmrun.setq(q);
322 else if (line.find(
"decay") <= 1) {
325 if (! headerPrinted) printHeader();
328 if (decay !=
"" && ! decayPrinted) {
329 if (verboseSav >= 2) message(0,
"readFile",
"reading WIDTH for "+nameNow
330 +
" (but no decay channels found)",0);
337 int nameEnd=decay.find(
" ",7);
338 nameNow=decay.substr(nameBegin,nameEnd-nameBegin);
341 istringstream dstream(nameNow);
347 message(0,
"readFile",
"ignoring DECAY table for "+nameNow
348 +
" (DECAY read-in switched off)",iLine);
353 string widthName=decay.substr(nameEnd+1,decay.length());
354 istringstream wstream(widthName);
358 decays.push_back(LHdecayTable(idNow,width));
359 decayIndices[idNow]=decays.size()-1;
362 string endComment=
"";
364 endComment=
"(forced width < 0 to zero)";
367 message(0,
"readFile",
"reading stable particle "+nameNow
371 decays[decayIndices[idNow]].setWidth(width);
373 decayPrinted =
false;
377 message(0,
"readFile",
"ignoring DECAY table for "+nameNow
378 +
" (read failed)",iLine);
386 message(0,
"readFile",
387 "PDG Code unreadable. Ignoring this DECAY block",iLine);
398 else if (line.find(
"</slha>") != string::npos) {
409 while (line.find(
"=") != string::npos) {
410 int firstEqual = line.find_first_of(
"=");
411 line.replace(firstEqual, 1,
" ");
420 istringstream linestream(line);
423 if (blockName ==
"qnumbers") {
424 int iEnd = qnumbers.size()-1;
425 if (iEnd >= 0) ifail = qnumbers[iEnd].set(linestream);
430 else if (blockName ==
"modsel") {
434 if (i == 12) {ifail=modsel12.set(0,linestream);}
435 else if (i == 21) {ifail=modsel21.set(0,linestream);}
436 else {ifail=modsel.set(i,linestream);};}
440 if (blockName ==
"minpar") ifail=minpar.set(linestream);
441 if (blockName ==
"sminputs") ifail=sminputs.set(linestream);
442 if (blockName ==
"extpar") ifail=extpar.set(linestream);
443 if (blockName ==
"qextpar") ifail=qextpar.set(linestream);
445 if (blockName ==
"vckmin") ifail=vckmin.set(linestream);
446 if (blockName ==
"upmnsin") ifail=upmnsin.set(linestream);
447 if (blockName ==
"msq2in") ifail=msq2in.set(linestream);
448 if (blockName ==
"msu2in") ifail=msu2in.set(linestream);
449 if (blockName ==
"msd2in") ifail=msd2in.set(linestream);
450 if (blockName ==
"msl2in") ifail=msl2in.set(linestream);
451 if (blockName ==
"mse2in") ifail=mse2in.set(linestream);
452 if (blockName ==
"tuin") ifail=tuin.set(linestream);
453 if (blockName ==
"tdin") ifail=tdin.set(linestream);
454 if (blockName ==
"tein") ifail=tein.set(linestream);
456 if (blockName ==
"rvlamllein") ifail=rvlamllein.set(linestream);
457 if (blockName ==
"rvlamlqdin") ifail=rvlamlqdin.set(linestream);
458 if (blockName ==
"rvlamuddin") ifail=rvlamuddin.set(linestream);
459 if (blockName ==
"rvtllein") ifail=rvtllein.set(linestream);
460 if (blockName ==
"rvtlqdin") ifail=rvtlqdin.set(linestream);
461 if (blockName ==
"rvtuddin") ifail=rvtuddin.set(linestream);
462 if (blockName ==
"rvkappain") ifail=rvkappain.set(linestream);
463 if (blockName ==
"rvdin") ifail=rvdin.set(linestream);
464 if (blockName ==
"rvm2lh1in") ifail=rvm2lh1in.set(linestream);
465 if (blockName ==
"rvsnvevin") ifail=rvsnvevin.set(linestream);
467 if (blockName ==
"imminpar") ifail=imminpar.set(linestream);
468 if (blockName ==
"imextpar") ifail=imextpar.set(linestream);
470 if (blockName ==
"immsq2in") ifail=immsq2in.set(linestream);
471 if (blockName ==
"immsu2in") ifail=immsu2in.set(linestream);
472 if (blockName ==
"immsd2in") ifail=immsd2in.set(linestream);
473 if (blockName ==
"immsl2in") ifail=immsl2in.set(linestream);
474 if (blockName ==
"immse2in") ifail=immse2in.set(linestream);
475 if (blockName ==
"imtuin") ifail=imtuin.set(linestream);
476 if (blockName ==
"imtdin") ifail=imtdin.set(linestream);
477 if (blockName ==
"imtein") ifail=imtein.set(linestream);
479 if (blockName ==
"spinfo" || blockName==
"dcinfo") {
482 linestream >> i >> entry;
483 string blockStr=
"RGE";
484 if (blockName==
"dcinfo") blockStr=
"DCY";
488 string warning=line.substr(line.find(
"3")+1,line.length());
489 message(1,
"readFile",
"(from "+blockStr+
" program): "+warning,0);
490 if (blockName ==
"spinfo") spinfo3.set(warning);
491 else dcinfo3.set(warning);
492 }
else if ( i == 4 ) {
493 string error=line.substr(line.find(
"4")+1,line.length());
494 message(2,
"readFile",
"(from "+blockStr+
" program): "+error,0);
495 if (blockName ==
"spinfo") spinfo4.set(error);
496 else dcinfo4.set(error);
499 for (
unsigned int j=0;j<entry.length();j++)
500 entry[j]=toupper(entry[j]);
501 ifail=(blockName==
"spinfo") ? spinfo.set(i,entry)
502 : dcinfo.set(i,entry);
510 if (blockName ==
"mass") ifail=mass.set(linestream);
513 if (blockName ==
"alpha") ifail=alpha.set(linestream,
false);
514 if (blockName ==
"stopmix") ifail=stopmix.set(linestream);
515 if (blockName ==
"sbotmix") ifail=sbotmix.set(linestream);
516 if (blockName ==
"staumix") ifail=staumix.set(linestream);
517 if (blockName ==
"nmix") ifail=nmix.set(linestream);
518 if (blockName ==
"umix") ifail=umix.set(linestream);
519 if (blockName ==
"vmix") ifail=vmix.set(linestream);
521 if (blockName ==
"usqmix") ifail=usqmix.set(linestream);
522 if (blockName ==
"dsqmix") ifail=dsqmix.set(linestream);
523 if (blockName ==
"selmix") ifail=selmix.set(linestream);
524 if (blockName ==
"snumix") ifail=snumix.set(linestream);
525 if (blockName ==
"snsmix") ifail=snsmix.set(linestream);
526 if (blockName ==
"snamix") ifail=snamix.set(linestream);
528 if (blockName ==
"rvnmix") ifail=rvnmix.set(linestream);
529 if (blockName ==
"rvumix") ifail=rvumix.set(linestream);
530 if (blockName ==
"rvvmix") ifail=rvvmix.set(linestream);
531 if (blockName ==
"rvhmix") ifail=rvhmix.set(linestream);
532 if (blockName ==
"rvamix") ifail=rvamix.set(linestream);
533 if (blockName ==
"rvlmix") ifail=rvlmix.set(linestream);
535 if (blockName ==
"cvhmix") ifail=cvhmix.set(linestream);
536 if (blockName ==
"imcvhmix") ifail=imcvhmix.set(linestream);
538 if (blockName ==
"imusqmix") ifail=imusqmix.set(linestream);
539 if (blockName ==
"imdsqmix") ifail=imdsqmix.set(linestream);
540 if (blockName ==
"imselmix") ifail=imselmix.set(linestream);
541 if (blockName ==
"imsnumix") ifail=imsnumix.set(linestream);
542 if (blockName ==
"imnmix") ifail=imnmix.set(linestream);
543 if (blockName ==
"imumix") ifail=imumix.set(linestream);
544 if (blockName ==
"imvmix") ifail=imvmix.set(linestream);
546 if (blockName ==
"nmhmix") ifail=nmhmix.set(linestream);
547 if (blockName ==
"nmamix") ifail=nmamix.set(linestream);
548 if (blockName ==
"nmnmix") ifail=nmnmix.set(linestream);
551 if (blockName ==
"gauge") ifail=gauge.set(linestream);
552 if (blockName ==
"yu") ifail=yu.set(linestream);
553 if (blockName ==
"yd") ifail=yd.set(linestream);
554 if (blockName ==
"ye") ifail=ye.set(linestream);
555 if (blockName ==
"au") ifail=au.set(linestream);
556 if (blockName ==
"ad") ifail=ad.set(linestream);
557 if (blockName ==
"ae") ifail=ae.set(linestream);
558 if (blockName ==
"hmix") ifail=hmix.set(linestream);
559 if (blockName ==
"msoft") ifail=msoft.set(linestream);
561 if (blockName ==
"vckm") ifail=vckm.set(linestream);
562 if (blockName ==
"upmns") ifail=upmns.set(linestream);
563 if (blockName ==
"msq2") ifail=msq2.set(linestream);
564 if (blockName ==
"msu2") ifail=msu2.set(linestream);
565 if (blockName ==
"msd2") ifail=msd2.set(linestream);
566 if (blockName ==
"msl2") ifail=msl2.set(linestream);
567 if (blockName ==
"mse2") ifail=mse2.set(linestream);
568 if (blockName ==
"tu") ifail=tu.set(linestream);
569 if (blockName ==
"td") ifail=td.set(linestream);
570 if (blockName ==
"te") ifail=te.set(linestream);
572 if (blockName ==
"rvlamlle") ifail=rvlamlle.set(linestream);
573 if (blockName ==
"rvlamlqd") ifail=rvlamlqd.set(linestream);
574 if (blockName ==
"rvlamudd") ifail=rvlamudd.set(linestream);
575 if (blockName ==
"rvtlle") ifail=rvtlle.set(linestream);
576 if (blockName ==
"rvtlqd") ifail=rvtlqd.set(linestream);
577 if (blockName ==
"rvtudd") ifail=rvtudd.set(linestream);
578 if (blockName ==
"rvkappa") ifail=rvkappa.set(linestream);
579 if (blockName ==
"rvd") ifail=rvd.set(linestream);
580 if (blockName ==
"rvm2lh1") ifail=rvm2lh1.set(linestream);
581 if (blockName ==
"rvsnvev") ifail=rvsnvev.set(linestream);
583 if (blockName ==
"imau") ifail=imau.set(linestream);
584 if (blockName ==
"imad") ifail=imad.set(linestream);
585 if (blockName ==
"imae") ifail=imae.set(linestream);
586 if (blockName ==
"imhmix") ifail=imhmix.set(linestream);
587 if (blockName ==
"immsoft") ifail=immsoft.set(linestream);
589 if (blockName ==
"imvckm") ifail=imvckm.set(linestream);
590 if (blockName ==
"imupmns") ifail=imupmns.set(linestream);
591 if (blockName ==
"immsq2") ifail=immsq2.set(linestream);
592 if (blockName ==
"immsu2") ifail=immsu2.set(linestream);
593 if (blockName ==
"immsd2") ifail=immsd2.set(linestream);
594 if (blockName ==
"immsl2") ifail=immsl2.set(linestream);
595 if (blockName ==
"immse2") ifail=immse2.set(linestream);
596 if (blockName ==
"imtu") ifail=imtu.set(linestream);
597 if (blockName ==
"imtd") ifail=imtd.set(linestream);
598 if (blockName ==
"imte") ifail=imte.set(linestream);
600 if (blockName ==
"nmssmrun") ifail=nmssmrun.set(linestream);
604 if (ifail == -2 && !genericBlocks[blockName].exists() ) {
605 message(0,
"readFile",
"storing non-SLHA(2) block: "+blockName,iLine);
608 message(1,
"readFile",
"read error or empty line",iLine);
611 message(0,
"readFile",blockName+
" existing entry overwritten",iLine);
617 if (line.size() >= 2) {
618 genericBlocks[blockName].set(line);
624 else if (decay !=
"") {
625 if (! decayPrinted) {
627 message(0,
"readFile",
"reading DECAY table for "+nameNow,0);
634 istringstream linestream(line);
636 if (! linestream) ok =
false;
637 if (ok) linestream >> nDa;
638 if (! linestream) ok =
false;
640 for (
int i=0; i<nDa; i++) {
642 linestream >> idThis;
647 idDa.push_back(idThis);
652 if (!ok || nDa < 2) {
653 message(1,
"readFile",
"read error or empty line",iLine);
657 decays[decayIndices[idNow]].addChannel(brat,nDa,idDa);
666 if ( lhefRead && !foundSlhaTag) {
669 else return iFailFile;
677 void SusyLesHouches::printHeader() {
678 if (verboseSav == 0)
return;
680 if (! headerPrinted) {
681 cout <<
" *----------------------- SusyLesHouches SUSY/BSM"
682 <<
" Interface ------------------------*\n";
683 message(0,
"",
"Last Change 03 Mar 2014 - P. Skands",0);
685 message(0,
"",
"Parsing: "+slhaFile,0);
696 void SusyLesHouches::printFooter() {
697 if (verboseSav == 0)
return;
698 if (! footerPrinted) {
700 cout <<
" *-----------------------------------------------------"
701 <<
"-------------------------------*\n";
712 void SusyLesHouches::printSpectrum(
int ifail) {
715 if (verboseSav <= 0)
return;
718 if (! headerPrinted) printHeader();
723 message(0,
"",
" Spectrum Calculator was: "+spinfo(1)+
" version: "
725 if (lhefRead) message(0,
"",
" Read <slha> spectrum from: "+slhaFile);
726 else message(0,
"",
" Read SLHA spectrum from: "+slhaFile);
731 message(0,
"",
" Check revealed problems. Only using masses.");
736 cout <<
" | ~g m" << endl;
737 cout << setprecision(3) <<
" | 1000021 " << setw(10) <<
738 ( (mass(2000003) > 1e7) ? scientific : fixed) << mass(1000021) << endl;
742 cout <<
" | ~d m ~dL ~sL ~bL"
743 <<
" ~dR ~sR ~bR" << endl;
745 cout << setprecision(3) <<
" | 1000001 " << setw(10)
746 << ( (mass(1000001) > 1e7) ? scientific : fixed) << mass(1000001)
748 for (
int icur=1;icur<=6;icur++) cout << setw(6) << dsqmix(1,icur) <<
" ";
750 cout << endl <<
" | 1000003 " << setw(10)
751 << ( (mass(1000003) > 1e7) ? scientific : fixed) << mass(1000003)
753 for (
int icur=1;icur<=6;icur++) cout << setw(6) << dsqmix(2,icur) <<
" ";
755 cout << endl <<
" | 1000005 " << setw(10)
756 << ( (mass(1000005) > 1e7) ? scientific : fixed) << mass(1000005)
758 for (
int icur=1;icur<=6;icur++) cout << setw(6) << dsqmix(3,icur) <<
" ";
760 cout << endl <<
" | 2000001 " << setw(10)
761 << ( (mass(2000001) > 1e7) ? scientific : fixed) << mass(2000001)
763 for (
int icur=1;icur<=6;icur++) cout << setw(6) << dsqmix(4,icur) <<
" ";
765 cout << endl <<
" | 2000003 " << setw(10)
766 << ( (mass(2000003) > 1e7) ? scientific : fixed) << mass(2000003)
768 for (
int icur=1;icur<=6;icur++) cout << setw(6) << dsqmix(5,icur) <<
" ";
770 cout << endl <<
" | 2000005 " << setw(10)
771 << ( (mass(2000005) > 1e7) ? scientific : fixed) << mass(2000005)
773 for (
int icur=1;icur<=6;icur++) cout << setw(6) << dsqmix(6,icur) <<
" ";
779 cout <<
" | ~u m ~uL ~cL ~tL"
780 <<
" ~uR ~cR ~tR" << endl;
782 cout << setprecision(3) <<
" | 1000002 " << setw(10)
783 << ( (mass(1000002) > 1e7) ? scientific : fixed) << mass(1000002)
785 for (
int icur=1;icur<=6;icur++) cout << setw(6) << usqmix(1,icur) <<
" ";
787 cout << endl <<
" | 1000004 " << setw(10)
788 << ( (mass(1000004) > 1e7) ? scientific : fixed) << mass(1000004)
790 for (
int icur=1;icur<=6;icur++) cout << setw(6) << usqmix(2,icur) <<
" ";
792 cout << endl <<
" | 1000006 " << setw(10)
793 << ( (mass(1000006) > 1e7) ? scientific : fixed) << mass(1000006)
795 for (
int icur=1;icur<=6;icur++) cout << setw(6) << usqmix(3,icur) <<
" ";
797 cout << endl <<
" | 2000002 " << setw(10)
798 << ( (mass(2000002) > 1e7) ? scientific : fixed) << mass(2000002)
800 for (
int icur=1;icur<=6;icur++) cout << setw(6) << usqmix(4,icur) <<
" ";
802 cout << endl <<
" | 2000004 " << setw(10)
803 << ( (mass(2000004) > 1e7) ? scientific : fixed) << mass(2000004)
805 for (
int icur=1;icur<=6;icur++) cout << setw(6) << usqmix(5,icur) <<
" ";
807 cout << endl <<
" | 2000006 " << setw(10)
808 << ( (mass(2000006) > 1e7) ? scientific : fixed) << mass(2000006)
810 for (
int icur=1;icur<=6;icur++) cout << setw(6) << usqmix(6,icur) <<
" ";
819 cout <<
" | ~e m ~eL ~muL ~tauL"
820 <<
" ~eR ~muR ~tauR" << endl;
822 cout << setprecision(3) <<
" | 1000011 " << setw(10)
823 << ( (mass(1000011) > 1e7) ? scientific : fixed) << mass(1000011)
825 for (
int icur=1;icur<=6;icur++) cout << setw(6) << selmix(1,icur) <<
" ";
827 cout << endl <<
" | 1000013 " << setw(10)
828 << ( (mass(1000013) > 1e7) ? scientific : fixed) << mass(1000013)
830 for (
int icur=1;icur<=6;icur++) cout << setw(6) << selmix(2,icur) <<
" ";
832 cout << endl <<
" | 1000015 " << setw(10)
833 << ( (mass(1000015) > 1e7) ? scientific : fixed) << mass(1000015)
835 for (
int icur=1;icur<=6;icur++) cout << setw(6) << selmix(3,icur) <<
" ";
837 cout << endl <<
" | 2000011 " << setw(10)
838 << ( (mass(2000011) > 1e7) ? scientific : fixed) << mass(2000011)
840 for (
int icur=1;icur<=6;icur++) cout << setw(6) << selmix(4,icur) <<
" ";
842 cout << endl <<
" | 2000013 " << setw(10)
843 << ( (mass(2000013) > 1e7) ? scientific : fixed) << mass(2000013)
845 for (
int icur=1;icur<=6;icur++) cout << setw(6) << selmix(5,icur) <<
" ";
847 cout << endl <<
" | 2000015 " << setw(10)
848 << ( (mass(2000015) > 1e7) ? scientific : fixed) << mass(2000015)
850 for (
int icur=1;icur<=6;icur++) cout << setw(6) << selmix(6,icur) <<
" ";
855 cout <<
" | H-/~e m H1- H2- ~eL ~muL"
856 <<
" ~tauL ~eR ~muR ~tauR" << endl;
858 cout << setprecision(3) <<
" | -37 " << setw(10) <<
859 ( (mass(37) > 1e7) ? scientific : fixed) << mass(37) << fixed <<
" ";
860 for (
int icur=1;icur<=8;icur++) cout << setw(6) << rvlmix(1,icur) <<
" ";
862 cout << endl <<
" | 1000011 " << setw(10)
863 << ( (mass(1000011) > 1e7) ? scientific : fixed) << mass(1000011)
865 for (
int icur=1;icur<=8;icur++) cout << setw(6) << rvlmix(2,icur) <<
" ";
867 cout << endl <<
" | 1000013 " << setw(10)
868 << ( (mass(1000013) > 1e7) ? scientific : fixed) << mass(1000013)
870 for (
int icur=1;icur<=8;icur++) cout << setw(6) << rvlmix(3,icur) <<
" ";
872 cout << endl <<
" | 1000015 " << setw(10)
873 << ( (mass(1000015) > 1e7) ? scientific : fixed) << mass(1000015)
875 for (
int icur=1;icur<=8;icur++) cout << setw(6) << rvlmix(4,icur) <<
" ";
877 cout << endl <<
" | 2000011 " << setw(10)
878 << ( (mass(2000011) > 1e7) ? scientific : fixed) << mass(2000011)
880 for (
int icur=1;icur<=8;icur++) cout << setw(6) << rvlmix(5,icur) <<
" ";
882 cout << endl <<
" | 2000013 " << setw(10)
883 << ( (mass(2000013) > 1e7) ? scientific : fixed) << mass(2000013)
885 for (
int icur=1;icur<=8;icur++) cout << setw(6) << rvlmix(6,icur) <<
" ";
887 cout << endl <<
" | 2000015 " << setw(10)
888 << ( (mass(2000015) > 1e7) ? scientific : fixed) << mass(2000015)
890 for (
int icur=1;icur<=8;icur++) cout << setw(6) << rvlmix(7,icur) <<
" ";
900 if (snumix.exists()) cout <<
" ~nu_e ~nu_mu ~nu_tau";
903 cout << setprecision(3) <<
" | 1000012 " << setw(10)
904 << ( (mass(1000012) > 1e7) ? scientific : fixed) << mass(1000012)
906 if (snumix.exists())
for (
int icur=1;icur<=3;icur++)
907 cout << setw(6) << snumix(1,icur) <<
" ";
909 cout << endl <<
" | 1000014 " << setw(10)
910 << ( (mass(1000014) > 1e7) ? scientific : fixed) << mass(1000014)
912 if (snumix.exists())
for (
int icur=1;icur<=3;icur++)
913 cout << setw(6) << snumix(2,icur) <<
" ";
915 cout << endl <<
" | 1000016 " << setw(10)
916 << ( (mass(1000016) > 1e7) ? scientific : fixed) << mass(1000016)
918 if (snumix.exists())
for (
int icur=1;icur<=3;icur++)
919 cout << setw(6) << snumix(3,icur) <<
" ";
924 cout <<
" | H0/~nu m";
925 if (snumix.exists()) cout <<
" H0_1 H0_2 ~nu_e ~nu_mu ~nu_tau";
928 cout << setprecision(3) <<
" | 25 " << setw(10)
929 << ( (mass(25) > 1e7) ? scientific : fixed) << mass(25)
931 if (rvhmix.exists())
for (
int icur=1;icur<=5;icur++)
932 cout << setw(6) << rvhmix(1,icur) <<
" ";
934 cout << endl <<
" | 35 " << setw(10)
935 << ( (mass(35) > 1e7) ? scientific : fixed) << mass(35)
937 if (rvhmix.exists())
for (
int icur=1;icur<=5;icur++)
938 cout << setw(6) << rvhmix(2,icur) <<
" ";
940 cout << endl <<
" | 1000012 " << setw(10)
941 << ( (mass(1000012) > 1e7) ? scientific : fixed) << mass(1000012)
943 if (rvhmix.exists())
for (
int icur=1;icur<=5;icur++)
944 cout << setw(6) << rvhmix(3,icur) <<
" ";
946 cout << endl <<
" | 1000014 " << setw(10)
947 << ( (mass(1000014) > 1e7) ? scientific : fixed) << mass(1000014)
949 if (rvhmix.exists())
for (
int icur=1;icur<=5;icur++)
950 cout << setw(6) << rvhmix(4,icur) <<
" ";
952 cout << endl <<
" | 1000016 " << setw(10)
953 << ( (mass(1000016) > 1e7) ? scientific : fixed) << mass(1000016)
955 if (rvhmix.exists())
for (
int icur=1;icur<=5;icur++)
956 cout << setw(6) << rvhmix(5,icur) <<
" ";
961 if (modsel(4) >= 1 && rvamix.exists()) {
963 cout <<
" | A0/~nu m A0_1 A0_2 ~nu_e ~nu_mu ~nu_tau"
966 cout << setprecision(3) <<
" | 36 " << setw(10)
967 << ( (mass(36) > 1e7) ? scientific : fixed) << mass(36)
969 for (
int icur=1;icur<=5;icur++) cout << setw(6) << rvamix(1,icur) <<
" ";
971 cout << endl <<
" | 1000017 " << setw(10)
972 << ( (mass(1000017) > 1e7) ? scientific : fixed) << mass(1000017)
974 for (
int icur=1;icur<=5;icur++) cout << setw(6) << rvamix(2,icur) <<
" ";
976 cout << endl <<
" | 1000018 " << setw(10)
977 << ( (mass(1000018) > 1e7) ? scientific : fixed) << mass(1000018)
979 for (
int icur=1;icur<=5;icur++) cout << setw(6) << rvamix(3,icur) <<
" ";
981 cout << endl <<
" | 1000019 " << setw(10)
982 << ( (mass(1000019) > 1e7) ? scientific : fixed) << mass(1000019)
984 for (
int icur=1;icur<=5;icur++) cout << setw(6) << rvamix(4,icur) <<
" ";
993 if (modsel(3) >= 1) {
994 cout <<
" | ~chi0 m ~B ~W_3 ~H_1 ~H_2 ~S"
997 cout << setprecision(3) <<
" | 1000022 " << setw(10)
998 << ( (mass(1000022) > 1e7) ? scientific : fixed) << mass(1000022)
1000 for (
int icur=1;icur<=5;icur++) cout << setw(6) << nmnmix(1,icur) <<
" ";
1002 cout << endl <<
" | 1000023 " << setw(10)
1003 << ( (mass(1000023) > 1e7) ? scientific : fixed) << mass(1000023)
1005 for (
int icur=1;icur<=5;icur++) cout << setw(6) << nmnmix(2,icur) <<
" ";
1007 cout << endl <<
" | 1000025 " << setw(10)
1008 << ( (mass(1000025) > 1e7) ? scientific : fixed) << mass(1000025)
1010 for (
int icur=1;icur<=5;icur++) cout << setw(6) << nmnmix(3,icur) <<
" ";
1012 cout << endl <<
" | 1000035 " << setw(10)
1013 << ( (mass(1000035) > 1e7) ? scientific : fixed) << mass(1000035)
1015 for (
int icur=1;icur<=5;icur++) cout << setw(6) << nmnmix(4,icur) <<
" ";
1017 cout << endl <<
" | 1000045 " << setw(10)
1018 << ( (mass(1000045) > 1e7) ? scientific : fixed) << mass(1000045)
1020 for (
int icur=1;icur<=5;icur++) cout << setw(6) << nmnmix(5,icur) <<
" ";
1025 else if (modsel(4) < 1) {
1026 cout <<
" | ~chi0 m ~B ~W_3 ~H_1 ~H_2"
1029 cout << setprecision(3) <<
" | 1000022 " << setw(10)
1030 << ( (mass(1000022) > 1e7) ? scientific : fixed) << mass(1000022)
1032 for (
int icur=1;icur<=4;icur++) cout << setw(6) << nmix(1,icur) <<
" ";
1034 cout << endl <<
" | 1000023 " << setw(10)
1035 << ( (mass(1000023) > 1e7) ? scientific : fixed) << mass(1000023)
1037 for (
int icur=1;icur<=4;icur++) cout << setw(6) << nmix(2,icur) <<
" ";
1039 cout << endl <<
" | 1000025 " << setw(10)
1040 << ( (mass(1000025) > 1e7) ? scientific : fixed) << mass(1000025)
1042 for (
int icur=1;icur<=4;icur++) cout << setw(6) << nmix(3,icur) <<
" ";
1044 cout << endl <<
" | 1000035 " << setw(10)
1045 << ( (mass(1000035) > 1e7) ? scientific : fixed) << mass(1000035)
1047 for (
int icur=1;icur<=4;icur++) cout << setw(6) << nmix(4,icur) <<
" ";
1053 cout <<
" | nu/~chi0 m nu_e nu_mu nu_tau ~B"
1054 <<
" ~W_3 ~H_1 ~H_2" << endl;
1056 cout << setprecision(3) <<
" | 12 " << setw(10)
1057 << ( (mass(12) > 1e7) ? scientific : fixed) << mass(12)
1059 for (
int icur=1;icur<=7;icur++) cout << setw(6) << rvnmix(1,icur) <<
" ";
1061 cout << endl <<
" | 14 " << setw(10)
1062 << ( (mass(14) > 1e7) ? scientific : fixed) << mass(14)
1064 for (
int icur=1;icur<=7;icur++) cout << setw(6) << rvnmix(2,icur) <<
" ";
1066 cout << endl <<
" | 16 " << setw(10) <<
1067 ( (mass(16) > 1e7) ? scientific : fixed) << mass(16) << fixed <<
" ";
1068 for (
int icur=1;icur<=7;icur++) cout << setw(6) << rvnmix(3,icur) <<
" ";
1070 cout << endl <<
" | 1000022 " << setw(10)
1071 << ( (mass(1000022) > 1e7) ? scientific : fixed) << mass(1000022)
1073 for (
int icur=1;icur<=7;icur++) cout << setw(6) << rvnmix(4,icur) <<
" ";
1075 cout << endl <<
" | 1000023 " << setw(10)
1076 << ( (mass(1000023) > 1e7) ? scientific : fixed) << mass(1000023)
1078 for (
int icur=1;icur<=7;icur++) cout << setw(6) << rvnmix(5,icur) <<
" ";
1080 cout << endl <<
" | 1000025 " << setw(10)
1081 << ( (mass(1000025) > 1e7) ? scientific : fixed) << mass(1000025)
1083 for (
int icur=1;icur<=7;icur++) cout << setw(6) << rvnmix(6,icur) <<
" ";
1085 cout << endl <<
" | 1000035 " << setw(10)
1086 << ( (mass(1000035) > 1e7) ? scientific : fixed) << mass(1000035)
1088 for (
int icur=1;icur<=7;icur++) cout << setw(6) << rvnmix(7,icur) <<
" ";
1096 if (modsel(4) < 1) {
1097 cout <<
" | ~chi+ m U: ~W ~H | V: ~W ~H"
1100 cout << setprecision(3) <<
" | 1000024 " << setw(10)
1101 << ((mass(1000024) > 1e7) ? scientific : fixed) << mass(1000024)
1103 for (
int icur=1;icur<=2;icur++) cout << setw(6) << umix(1,icur) <<
" ";
1105 for (
int icur=1;icur<=2;icur++) cout << setw(6) << vmix(1,icur) <<
" ";
1107 cout << endl <<
" | 1000037 " << setw(10)
1108 << ((mass(1000037) > 1e7) ? scientific : fixed) << mass(1000037)
1110 for (
int icur=1;icur<=2;icur++) cout << setw(6) << umix(2,icur) <<
" ";
1112 for (
int icur=1;icur<=2;icur++) cout << setw(6) << vmix(2,icur) <<
" ";
1117 cout <<
" | e+/~chi+ m U: eL+ muL+ tauL+ ~W+"
1118 <<
" ~H1+ | V: eR+ muR+ tauR+ ~W+ ~H2+" << endl;
1120 cout << setprecision(3) <<
" | -11 " << setw(10)
1121 << ((mass(11) > 1e7) ? scientific : fixed) << mass(11)
1123 for (
int icur=1;icur<=5;icur++) cout << setw(6) << rvumix(1,icur) <<
" ";
1125 for (
int icur=1;icur<=5;icur++) cout << setw(6) << rvvmix(1,icur) <<
" ";
1127 cout << endl <<
" | -13 " << setw(10)
1128 << ((mass(13) > 1e7) ? scientific : fixed) << mass(13)
1130 for (
int icur=1;icur<=5;icur++) cout << setw(6) << rvumix(2,icur) <<
" ";
1132 for (
int icur=1;icur<=5;icur++) cout << setw(6) << rvvmix(2,icur) <<
" ";
1134 cout << endl <<
" | -15 " << setw(10)
1135 << ((mass(15) > 1e7) ? scientific : fixed) << mass(15)
1137 for (
int icur=1;icur<=5;icur++) cout << setw(6) << rvumix(3,icur) <<
" ";
1139 for (
int icur=1;icur<=5;icur++) cout << setw(6) << rvvmix(3,icur) <<
" ";
1141 cout << endl <<
" | 1000024 " << setw(10)
1142 << ((mass(1000024) > 1e7) ? scientific : fixed) << mass(1000024)
1144 for (
int icur=1;icur<=5;icur++) cout << setw(6) << rvumix(4,icur) <<
" ";
1146 for (
int icur=1;icur<=5;icur++) cout << setw(6) << rvvmix(4,icur) <<
" ";
1148 cout << endl <<
" | 1000037 " << setw(10)
1149 << ((mass(1000037) > 1e7) ? scientific : fixed) << mass(1000037)
1151 for (
int icur=1;icur<=5;icur++) cout << setw(6) << rvumix(5,icur) <<
" ";
1153 for (
int icur=1;icur<=5;icur++) cout << setw(6) << rvvmix(5,icur) <<
" ";
1161 if (modsel(3) >= 1) {
1163 if (nmhmix.exists()) cout <<
" H_10 H_20 S0";
1166 cout << setprecision(3) <<
" | 25 " << setw(10)
1167 << ( (mass(25) > 1e7) ? scientific : fixed) << mass(25)
1169 if (nmhmix.exists())
for (
int icur=1;icur<=3;icur++)
1170 cout << setw(6) << nmhmix(1,icur) <<
" ";
1172 cout << endl <<
" | 35 " << setw(10)
1173 << ( (mass(35) > 1e7) ? scientific : fixed) << mass(35)
1175 if (nmhmix.exists())
for (
int icur=1;icur<=3;icur++)
1176 cout << setw(6) << nmhmix(2,icur) <<
" ";
1178 cout << endl <<
" | 45 " << setw(10)
1179 << ( (mass(45) > 1e7) ? scientific : fixed) << mass(45)
1181 if (nmhmix.exists())
for (
int icur=1;icur<=3;icur++)
1182 cout << setw(6) << nmhmix(3,icur) <<
" ";
1184 cout << endl <<
" |"<<endl;
1186 if (nmamix.exists()) cout <<
" H_10 H_20 S0";
1189 cout << setprecision(3) <<
" | 36 " << setw(10)
1190 << ( (mass(36) > 1e7) ? scientific : fixed) << mass(36)
1192 if (nmamix.exists())
for (
int icur=1;icur<=3;icur++)
1193 cout << setw(6) << nmamix(1,icur) <<
" ";
1195 cout << endl <<
" | 46 " << setw(10)
1196 << ( (mass(46) > 1e7) ? scientific : fixed) << mass(46)
1198 if (nmamix.exists())
for (
int icur=1;icur<=3;icur++)
1199 cout << setw(6) << nmamix(2,icur) <<
" ";
1201 cout << endl <<
" |"<<endl;
1202 cout <<
" | H+ m"<< endl;
1204 cout << setprecision(3) <<
" | 37 " << setw(10)
1205 << ( (mass(37) > 1e7) ? scientific : fixed) << mass(37)<<endl;
1207 cout << endl<<
" |"<<endl;
1210 else if (modsel(4) < 1) {
1211 cout <<
" | Higgs m"<<endl;
1212 cout << setprecision(3) <<
" | 25 " << setw(10)
1213 << ( (mass(25) > 1e7) ? scientific : fixed) << mass(25)<<endl;
1214 cout << setprecision(3) <<
" | 35 " << setw(10)
1215 << ( (mass(35) > 1e7) ? scientific : fixed) << mass(35)<<endl;
1216 cout << setprecision(3) <<
" | 36 " << setw(10)
1217 << ( (mass(36) > 1e7) ? scientific : fixed) << mass(36)<<endl;
1218 cout << setprecision(3) <<
" | 37 " << setw(10)
1219 << ( (mass(37) > 1e7) ? scientific : fixed) << mass(37)<<endl;
1221 cout <<
" | alpha ";
1222 if (alpha.exists()) cout << setw(8) << alpha();
1223 else cout <<
" absent";
1224 cout << endl<<
" |"<<endl;
1227 if (hmix.exists()) {
1228 cout <<
" | Hmix "<<endl;
1230 if (hmix.exists(1)) cout << setw(8) << hmix(1)
1231 <<
" (DRbar running value at Q = " << hmix.q() <<
" GeV)";
1232 else cout <<
" absent";
1233 cout <<
"\n | tan(beta) ";
1234 if (hmix.exists(2)) cout << setw(8) << hmix(2)
1235 <<
" (DRbar running value at Q = " << hmix.q() <<
" GeV)";
1236 else cout <<
" absent";
1238 if (hmix.exists(3)) cout << setw(8) << hmix(3)
1239 <<
" (DRbar running value at Q = " << hmix.q() <<
" GeV)";
1240 else cout <<
" absent";
1242 if (hmix.exists(4)) cout << setw(9)
1243 << ((abs(hmix(4)) > 1e5) ? scientific : fixed) << hmix(4)
1244 <<
" (DRbar running value at Q = " << fixed << hmix.q() <<
" GeV)";
1245 else cout <<
" absent";
1251 if (gauge.exists()) {
1252 cout <<
" | Gauge " << endl;
1254 if (gauge.exists(1)) cout << setw(8) << gauge(1)
1255 <<
" (DRbar running value at Q = " << hmix.q() <<
" GeV)";
1256 else cout <<
" absent";
1258 if (gauge.exists(2)) cout << setw(8) << gauge(2)
1259 <<
" (DRbar running value at Q = " << hmix.q() <<
" GeV)";
1260 else cout <<
" absent";
1262 if (gauge.exists(3)) cout << setw(8) << gauge(3)
1263 <<
" (DRbar running value at Q = " << hmix.q() <<
" GeV)";
1264 else cout <<
" absent";
1269 footerPrinted=
false;
1278 int SusyLesHouches::checkSpectrum() {
1280 if (! headerPrinted) printHeader();
1282 bool foundModsel = modsel.exists();
1283 if (! foundModsel) {
1284 if (mass.exists())
return 1;
1289 if (!modsel.exists(1)) {
1290 message(1,
"checkSpectrum",
"MODSEL(1) undefined. Assuming = 0",0);
1294 if (!modsel.exists(3)) modsel.set(3,0);
1295 if (!modsel.exists(4)) modsel.set(4,0);
1296 if (!modsel.exists(5)) modsel.set(5,0);
1297 if (!modsel.exists(6)) modsel.set(6,0);
1298 if (!modsel.exists(11)) modsel.set(11,1);
1303 if (!minpar.exists()) {
1304 message(1,
"checkSpectrum",
"MINPAR not found",0);
1306 if (!sminputs.exists()) {
1307 message(1,
"checkSpectrum",
"SMINPUTS not found",0);
1309 if (!mass.exists()) {
1310 message(1,
"checkSpectrum",
"MASS not found",0);
1312 if (!gauge.exists()) {
1313 message(1,
"checkSpectrum",
"GAUGE not found",0);
1317 if (modsel(3) == 0 && modsel(4) == 0 && modsel(5) == 0 && modsel(6) == 0) {
1319 if (!staumix.exists() && !selmix.exists()) {
1320 message(1,
"checkSpectrum",
"STAUMIX or SELMIX not found",0);
1322 if (!sbotmix.exists() && !dsqmix.exists()) {
1323 message(1,
"checkSpectrum",
"SBOTMIX or DSQMIX not found",0);
1325 if (!stopmix.exists() && !usqmix.exists()) {
1326 message(1,
"checkSpectrum",
"STOPMIX or USQMIX not found",0);
1328 if (!nmix.exists()) {
1329 message(1,
"checkSpectrum",
"NMIX not found",0);
1331 if (!umix.exists()) {
1332 message(1,
"checkSpectrum",
"UMIX not found",0);
1334 if (!vmix.exists()) {
1335 message(1,
"checkSpectrum",
"VMIX not found",0);
1337 if (modsel(3) == 0 && !alpha.exists()) {
1338 message(1,
"checkSpectrum",
"ALPHA not found",0);
1340 if (!hmix.exists()) {
1341 message(1,
"checkSpectrum",
"HMIX not found",0);
1343 if (!msoft.exists()) {
1344 message(1,
"checkSpectrum",
"MSOFT not found",0);
1349 else if (modsel(4) != 0) {
1351 if (!rvnmix.exists()) {
1352 if (nmix.exists()) {
1353 message(1,
"checkSpectrum",
1354 "MODSEL 4 != 0 but NMIX given instead of RVNMIX",0);
1355 for (
int i=1; i<=4; i++) {
1356 if (i<=3) rvnmix.set(i,i,1.0);
1357 for (
int j=1; j<=4; j++)
1358 rvnmix.set(i+3,j+3,nmix(i,j));
1361 message(1,
"checkSpectrum",
"MODSEL 4 != 0 but RVNMIX not found",0);
1365 if (!rvumix.exists()) {
1366 if (umix.exists()) {
1367 message(1,
"checkSpectrum",
1368 "MODSEL 4 != 0 but UMIX given instead of RVUMIX",0);
1369 for (
int i=1; i<=3; i++) rvumix.set(i,i,1.0);
1370 for (
int i=1; i<=2; i++) {
1371 for (
int j=1; j<=2; j++)
1372 rvumix.set(i+3,j+3,umix(i,j));
1375 message(1,
"checkSpectrum",
"MODSEL 4 != 0 but RVUMIX not found",0);
1379 if (!rvvmix.exists()) {
1380 if (vmix.exists()) {
1381 message(1,
"checkSpectrum",
1382 "MODSEL 4 != 0 but VMIX given instead of RVVMIX",0);
1383 for (
int i=1; i<=3; i++) rvvmix.set(i,i,1.0);
1384 for (
int i=1; i<=2; i++) {
1385 for (
int j=1; j<=2; j++)
1386 rvvmix.set(i+3,j+3,vmix(i,j));
1389 message(1,
"checkSpectrum",
"MODSEL 4 != 0 but RVVMIX not found",0);
1393 if (!rvhmix.exists()) {
1394 if (alpha.exists()) {
1395 message(1,
"checkSpectrum",
1396 "MODSEL 4 != 0 but ALPHA given instead of RVHMIX",0);
1397 rvhmix.set(1,1,cos(alpha()));
1398 rvhmix.set(1,2,sin(alpha()));
1399 rvhmix.set(2,1,-sin(alpha()));
1400 rvhmix.set(2,2,cos(alpha()));
1401 rvhmix.set(3,3,1.0);
1402 rvhmix.set(4,4,1.0);
1403 rvhmix.set(5,5,1.0);
1405 message(1,
"checkSpectrum",
"MODSEL 4 != 0 but RVHMIX not found",0);
1409 if (!rvamix.exists()) {
1410 message(1,
"checkSpectrum",
"MODSEL 4 != 0 but RVAMIX not found",0);
1412 if (!rvlmix.exists()) {
1413 if (selmix.exists()) {
1414 message(1,
"checkSpectrum",
1415 "MODSEL 4 != 0 but SELMIX given instead of RVLMIX",0);
1416 for (
int i=1; i<=6; i++) {
1417 for (
int j=6; j<=6; j++)
1418 rvlmix.set(i+1,j+2,selmix(i,j));
1420 }
if (staumix.exists()) {
1421 message(1,
"checkSpectrum",
1422 "MODSEL 4 != 0 but STAUMIX given instead of RVLMIX",0);
1423 rvlmix.set(2,3,1.0);
1424 rvlmix.set(3,4,1.0);
1425 rvlmix.set(4,5,staumix(1,1));
1426 rvlmix.set(4,8,staumix(1,2));
1427 rvlmix.set(5,6,1.0);
1428 rvlmix.set(6,7,1.0);
1429 rvlmix.set(7,5,staumix(2,1));
1430 rvlmix.set(7,8,staumix(2,2));
1432 message(1,
"checkSpectrum",
"MODSEL 4 != 0 but RVLMIX not found",0);
1436 if (!usqmix.exists()) {
1437 if (stopmix.exists()) {
1438 message(1,
"checkSpectrum",
1439 "MODSEL 4 != 0 but STOPMIX given instead of USQMIX",0);
1440 usqmix.set(1,1, 1.0);
1441 usqmix.set(2,2, 1.0);
1442 usqmix.set(4,4, 1.0);
1443 usqmix.set(5,5, 1.0);
1444 usqmix.set(3,3, stopmix(1,1));
1445 usqmix.set(3,6, stopmix(1,2));
1446 usqmix.set(6,3, stopmix(2,1));
1447 usqmix.set(6,6, stopmix(2,2));
1449 message(1,
"checkSpectrum",
"MODSEL 4 != 0 but USQMIX not found",0);
1453 if (!dsqmix.exists()) {
1454 if (sbotmix.exists()) {
1455 message(1,
"checkSpectrum",
1456 "MODSEL 4 != 0 but SBOTMIX given instead of DSQMIX",0);
1457 dsqmix.set(1,1, 1.0);
1458 dsqmix.set(2,2, 1.0);
1459 dsqmix.set(4,4, 1.0);
1460 dsqmix.set(5,5, 1.0);
1461 dsqmix.set(3,3, sbotmix(1,1));
1462 dsqmix.set(3,6, sbotmix(1,2));
1463 dsqmix.set(6,3, sbotmix(2,1));
1464 dsqmix.set(6,6, sbotmix(2,2));
1466 message(1,
"checkSpectrum",
"MODSEL 4 != 0 but DSQMIX not found",0);
1473 else if (modsel(6) != 0) {
1475 if (modsel(6) != 2) {
1476 if (!usqmix.exists()) {
1477 message(1,
"checkSpectrum",
"quark FLV on but USQMIX not found",0);
1480 if (!dsqmix.exists()) {
1481 message(1,
"checkSpectrum",
"quark FLV on but DSQMIX not found",0);
1486 if (modsel(6) != 1) {
1487 if (!upmns.exists()) {
1488 message(1,
"checkSpectrum",
"lepton FLV on but UPMNSIN not found",0);
1491 if (!selmix.exists()) {
1492 message(1,
"checkSpectrum",
"lepton FLV on but SELMIX not found",0);
1495 if (!snumix.exists() && !snsmix.exists()) {
1496 message(1,
"checkSpectrum",
"lepton FLV on but SNUMIX not found",0);
1503 if (modsel(5) != 0) {
1504 if (!cvhmix.exists()) {
1505 message(1,
"checkSpectrum",
"MODSEL 5 != 0 but CVHMIX not found",0);
1511 if (modsel(6) != 0) {
1513 if (modsel(6) != 2) {
1514 if (!vckmin.exists()) {
1515 message(1,
"checkSpectrum",
"quark FLV on but VCKMIN not found",0);
1518 if (!msq2in.exists()) {
1519 message(0,
"checkSpectrum",
"note: quark FLV on but MSQ2IN not found",0);
1522 if (!msu2in.exists()) {
1523 message(0,
"checkSpectrum",
"note: quark FLV on but MSU2IN not found",0);
1526 if (!msd2in.exists()) {
1527 message(0,
"checkSpectrum",
"note: quark FLV on but MSD2IN not found",0);
1530 if (!tuin.exists()) {
1531 message(0,
"checkSpectrum",
"note: quark FLV on but TUIN not found",0);
1534 if (!tdin.exists()) {
1535 message(0,
"checkSpectrum",
"note: quark FLV on but TDIN not found",0);
1540 if (modsel(6) != 1) {
1541 if (!msl2in.exists()) {
1542 message(0,
"checkSpectrum",
1543 "note: lepton FLV on but MSL2IN not found",0);
1546 if (!mse2in.exists()) {
1547 message(0,
"checkSpectrum",
1548 "note: lepton FLV on but MSE2IN not found",0);
1551 if (!tein.exists()) {
1552 message(0,
"checkSpectrum",
1553 "note: lepton FLV on but TEIN not found",0);
1563 if (stopmix.exists() && ! usqmix.exists() ) {
1565 usqmix.set(1,1, 1.0);
1566 usqmix.set(2,2, 1.0);
1567 usqmix.set(4,4, 1.0);
1568 usqmix.set(5,5, 1.0);
1570 usqmix.set(3,3, stopmix(1,1));
1571 usqmix.set(3,6, stopmix(1,2));
1572 usqmix.set(6,3, stopmix(2,1));
1573 usqmix.set(6,6, stopmix(2,2));
1575 if (sbotmix.exists() && ! dsqmix.exists() ) {
1577 dsqmix.set(1,1, 1.0);
1578 dsqmix.set(2,2, 1.0);
1579 dsqmix.set(4,4, 1.0);
1580 dsqmix.set(5,5, 1.0);
1582 dsqmix.set(3,3, sbotmix(1,1));
1583 dsqmix.set(3,6, sbotmix(1,2));
1584 dsqmix.set(6,3, sbotmix(2,1));
1585 dsqmix.set(6,6, sbotmix(2,2));
1587 if (staumix.exists() && ! selmix.exists() ) {
1589 selmix.set(1,1, 1.0);
1590 selmix.set(2,2, 1.0);
1591 selmix.set(4,4, 1.0);
1592 selmix.set(5,5, 1.0);
1594 selmix.set(3,3, staumix(1,1));
1595 selmix.set(3,6, staumix(1,2));
1596 selmix.set(6,3, staumix(2,1));
1597 selmix.set(6,6, staumix(2,2));
1599 if (! snumix.exists() && ! snsmix.exists()) {
1601 snumix.set(1,1, 1.0);
1602 snumix.set(2,2, 1.0);
1603 snumix.set(3,3, 1.0);
1609 if (mass.exists()) {
1611 if (abs(mass(25)) > abs(mass(35))
1612 || (modsel(3) == 1 && abs(mass(35)) > abs(mass(45))) )
1613 message(0,
"checkSpectrum",
"Note: Higgs sector is not mass-ordered",0);
1615 if (modsel(3) == 1 && abs(mass(36)) > abs(mass(46)))
1616 message(0,
"checkSpectrum",
1617 "Note: CP-odd Higgs sector is not mass-ordered",0);
1619 if (abs(mass(1000022)) > abs(mass(1000023))
1620 || abs(mass(1000023)) > abs(mass(1000025))
1621 || abs(mass(1000025)) > abs(mass(1000035))
1622 || (modsel(3) == 1 && abs(mass(1000035)) > abs(mass(1000045))) )
1623 message(0,
"checkSpectrum",
"Note: Neutralino sector is not mass-ordered"
1626 if (abs(mass(1000024)) > abs(mass(1000037)))
1627 message(0,
"checkSpectrum",
"Note: Chargino sector is not mass-ordered",0);
1631 if (nmix.exists()) {
1632 for (
int i=1;i<=4;i++) {
1635 for (
int j=1;j<=4;j++) {
1636 cn1 += pow(nmix(i,j),2);
1637 cn2 += pow(nmix(j,i),2);
1639 if (abs(1.0-cn1) > 1e-3 || abs(1.0-cn2) > 1e-3) {
1641 message(2,
"checkSpectrum",
"NMIX is not unitary (wrong format?)",0);
1648 if (vmix.exists() && umix.exists()) {
1651 for (
int i=1;i<=2;i++) {
1656 for (
int j=1;j<=2;j++) {
1657 cu1 += pow(umix(i,j),2);
1658 cu2 += pow(umix(j,i),2);
1659 cv1 += pow(vmix(i,j),2);
1660 cv2 += pow(vmix(j,i),2);
1662 if (abs(1.0-cu1) > 1e-3 || abs(1.0-cu2) > 1e-3) {
1663 cu1 += pow(umix(1,1),2);
1664 cu2 += pow(umix(1,1),2);
1665 if (abs(1.0-cu1) > 1e-3 || abs(1.0-cu2) > 1e-3) {
1667 message(2,
"checkSpectrum",
"UMIX is not unitary (wrong format?)",0);
1671 message(1,
"checkSpectrum",
"UMIX is not unitary (repaired)",0);
1672 umix.set(2,2,umix(1,1));
1675 if (abs(1.0-cv1) > 1e-3 || abs(1.0-cv2) > 1e-3) {
1676 cv1 += pow(vmix(1,1),2);
1677 cv2 += pow(vmix(1,1),2);
1678 if (abs(1.0-cv1) > 1e-3 || abs(1.0-cv2) > 1e-3) {
1680 message(2,
"checkSpectrum",
"VMIX is not unitary (wrong format?)",0);
1684 message(1,
"checkSpectrum",
"VMIX is not unitary (repaired)",0);
1685 vmix.set(2,2,vmix(1,1));
1693 if (stopmix.exists() && sbotmix.exists()) {
1694 for (
int i=1;i<=2;i++) {
1699 for (
int j=1;j<=2;j++) {
1700 ct1 += pow(stopmix(i,j),2);
1701 ct2 += pow(stopmix(j,i),2);
1702 cb1 += pow(sbotmix(i,j),2);
1703 cb2 += pow(sbotmix(j,i),2);
1705 if (abs(1.0-ct1) > 1e-3 || abs(1.0-ct2) > 1e-3) {
1707 message(2,
"checkSpectrum",
"STOPMIX is not unitary (wrong format?)",0);
1710 if (abs(1.0-cb1) > 1e-3 || abs(1.0-cb2) > 1e-3) {
1712 message(2,
"checkSpectrum",
"SBOTMIX is not unitary (wrong format?)",0);
1719 if (staumix.exists()) {
1720 for (
int i=1;i<=2;i++) {
1723 for (
int j=1;j<=2;j++) {
1724 ct1 += pow(staumix(i,j),2);
1725 ct2 += pow(staumix(j,i),2);
1727 if (abs(1.0-ct1) > 1e-3 || abs(1.0-ct2) > 1e-3) {
1729 message(2,
"checkSpectrum",
"STAUMIX is not unitary (wrong format?)",0);
1736 if (dsqmix.exists()) {
1737 for (
int i=1;i<=6;i++) {
1740 for (
int j=1;j<=6;j++) {
1741 sr += pow(dsqmix(i,j),2);
1742 sc += pow(dsqmix(j,i),2);
1744 if (abs(1.0-sr) > 1e-3 || abs(1.0-sc) > 1e-3) {
1746 message(2,
"checkSpectrum",
"DSQMIX is not unitary (wrong format?)",0);
1753 if (usqmix.exists()) {
1754 for (
int i=1;i<=6;i++) {
1757 for (
int j=1;j<=6;j++) {
1758 sr += pow(usqmix(i,j),2);
1759 sc += pow(usqmix(j,i),2);
1761 if (abs(1.0-sr) > 1e-3 || abs(1.0-sc) > 1e-3) {
1763 message(2,
"checkSpectrum",
"USQMIX is not unitary (wrong format?)",0);
1770 if (selmix.exists()) {
1771 for (
int i=1;i<=6;i++) {
1774 for (
int j=1;j<=6;j++) {
1775 sr += pow(selmix(i,j),2);
1776 sc += pow(selmix(j,i),2);
1778 if (abs(1.0-sr) > 1e-3 || abs(1.0-sc) > 1e-3) {
1780 message(2,
"checkSpectrum",
"SELMIX is not unitary (wrong format?)",0);
1785 if (modsel(3) == 1) {
1787 if ( nmnmix.exists() ) {
1788 for (
int i=1;i<=5;i++) {
1791 for (
int j=1;j<=5;j++) {
1792 cn1 += pow(nmnmix(i,j),2);
1793 cn2 += pow(nmnmix(j,i),2);
1795 if (abs(1.0-cn1) > 1e-3 || abs(1.0-cn2) > 1e-3) {
1797 message(2,
"checkSpectrum",
"NMNMIX is not unitary (wrong format?)",0);
1804 message(1,
"checkSpectrum",
"MODSEL 3 = 1 (NMSSM) but no NMNMIX found",0);
1807 if ( nmamix.exists() ) {
1808 for (
int i=1;i<=2;i++) {
1810 for (
int j=1;j<=3;j++) {
1811 cn1 += pow(nmamix(i,j),2);
1813 if (abs(1.0-cn1) > 1e-3) {
1815 message(2,
"checkSpectrum",
"NMAMIX is not unitary (wrong format?)",0);
1821 message(1,
"checkSpectrum",
"MODSEL 3 = 1 (NMSSM) but no NMAMIX found",0);
1824 if ( nmhmix.exists() ) {
1825 for (
int i=1;i<=3;i++) {
1828 for (
int j=1;j<=3;j++) {
1829 cn1 += pow(nmhmix(i,j),2);
1830 cn2 += pow(nmhmix(j,i),2);
1832 if (abs(1.0-cn1) > 1e-3 || abs(1.0-cn2) > 1e-3) {
1834 message(2,
"checkSpectrum",
"NMHMIX is not unitary (wrong format?)",0);
1840 message(1,
"checkSpectrum",
"MODSEL 3 = 1 (NMSSM) but no NMHMIX found",0);
1843 if (! nmssmrun.exists() ) {
1845 message(2,
"checkSpectrum",
"MODSEL 3 = 1 (NMSSM) but no NMSSMRUN found",
1851 if (slhaRead && ! spinfo.exists(1)) spinfo.set(1,
"unknown");
1852 if (slhaRead && ! spinfo.exists(2)) spinfo.set(2,
"unknown");
1853 if (! slhaRead && ! spinfo.exists(1)) {
1854 spinfo.set(1,
"DEFAULT");
1855 spinfo.set(2,
"n/a");
1860 message(0,
"checkSpectrum",
"one or more serious problems were found");
1873 int SusyLesHouches::checkDecays() {
1875 if (! headerPrinted) printHeader();
1879 for (
int i = 0; i < int(decays.size()); ++i) {
1882 LHdecayTable decTab = decays[i];
1883 int idRes = decTab.getId();
1884 double width = decTab.getWidth();
1885 if (width <= 0.0 || decTab.size() == 0)
continue;
1889 double absSum = 0.0;
1890 int decSize = decTab.size();
1891 for (
int j = 0; j < decSize; ++j) {
1893 double brat = decTab.getBrat(j);
1896 if (abs(brat) > 0.0) {
1897 vector<int> idDa = decTab.getIdDa(j);
1898 double massSum=abs(mass(idRes));
1899 for (
int k=0; k<int(idDa.size()); ++k) {
1900 if (mass.exists(idDa[k])) massSum -= mass(abs(idDa[k]));
1902 else if (abs(idDa[k]) == 24) massSum -= 79.0;
1903 else if (abs(idDa[k]) == 23) massSum -= 91.0;
1904 else if (abs(idDa[k]) == 6) massSum -= 165.0;
1905 else if (abs(idDa[k]) == 5) massSum -= 4.0;
1906 else if (abs(idDa[k]) == 4) massSum -= 1.0;
1908 if (massSum < 0.0) {
1910 ostringstream errCode;
1911 errCode << idRes <<
" ->";
1912 for (
int jDa=0; jDa<int(idDa.size()); ++jDa)
1913 errCode <<
" " << idDa[jDa];
1914 message(1,
"checkDecays",errCode.str()
1915 +
": Phase Space Closed, but BR != 0");
1923 absSum += abs(brat);
1927 if (abs(1.0-absSum) > 1e-6) {
1928 message(1,
"checkDecays",
"sum(BR) != 1");
1929 cout <<
" | offending particle: " << idRes <<
" sum(BR) = "
1945 void SusyLesHouches::message(
int level,
string place,
string themessage,
1947 if (verboseSav == 0)
return;
1949 ostream* outstream = &cerr;
1950 if (level <= 1) outstream = &cout;
1952 if (place !=
"") *outstream <<
" | (SLHA::"+place+
") ";
1953 else *outstream <<
" | ";
1954 if (level == 1) *outstream <<
"Warning: ";
1955 if (level == 2) { *outstream <<
"ERROR: "; }
1956 if (line != 0) *outstream <<
"line " << line <<
" - ";
1957 *outstream << themessage << endl;
1959 footerPrinted=
false;