@@ -519,7 +519,9 @@ class GenWeightsTableProducer : public edm::global::EDProducer<edm::StreamCache<
519
519
for (int i = 0 ; i < vectorSize; i++) {
520
520
wPS.push_back (genWeights.at (i + 2 ) / nominal);
521
521
}
522
- psWeightDocStr = " All PS weights (w_var / w_nominal)" ;
522
+ psWeightDocStr = ((int )genWeightChoice->psWeightIDs .size () == vectorSize)
523
+ ? genWeightChoice->psWeightsDoc
524
+ : " All PS weights (w_var / w_nominal)" ;
523
525
} else {
524
526
if (!psWeightWarning_.exchange (true ))
525
527
edm::LogWarning (" LHETablesProducer" )
@@ -530,8 +532,8 @@ class GenWeightsTableProducer : public edm::global::EDProducer<edm::StreamCache<
530
532
wPS.push_back (genWeights.at (i) / nominal);
531
533
}
532
534
psWeightDocStr =
533
- " PS weights (w_var / w_nominal); [0] is ISR=2 FSR=1; [1] is ISR=1 FSR=2 "
534
- " [2] is ISR=0.5 FSR=1; [3] is ISR=1 FSR=0.5;" ;
535
+ " PS weights (w_var / w_nominal); default (maybe incorrect) order is: "
536
+ " [0] is ISR=2 FSR=1; [1] is ISR=1 FSR=2; [ 2] is ISR=0.5 FSR=1; [3] is ISR=1 FSR=0.5;" ;
535
537
}
536
538
} else {
537
539
wPS.push_back (1.0 );
@@ -989,7 +991,7 @@ class GenWeightsTableProducer : public edm::global::EDProducer<edm::StreamCache<
989
991
990
992
std::regex scalew (" LHE,\\ s+id\\ s+=\\ s+(\\ d+),\\ s+(.+)\\ ,\\ s+mur=(\\ S+)\\ smuf=(\\ S+)" );
991
993
std::regex pdfw (" LHE,\\ s+id\\ s+=\\ s+(\\ d+),\\ s+(.+),\\ s+Member\\ s+(\\ d+)\\ s+of\\ ssets\\ s+(\\ w+\\ b)" );
992
- std::regex mainPSw (" sr(Def|:murfac=)(Hi|Lo|_dn|_up|0.5|2.0)" );
994
+ std::regex mainPSw (" sr(Def|:murfac=| \\ .murfac= )(Hi|Lo|_dn|_up|0\\ .5|2\\ .0)" );
993
995
std::smatch groups;
994
996
auto weightNames = genLumiInfoHead->weightNames ();
995
997
std::unordered_map<std::string, uint32_t > knownPDFSetsFromGenInfo_;
@@ -1017,7 +1019,8 @@ class GenWeightsTableProducer : public edm::global::EDProducer<edm::StreamCache<
1017
1019
} else if (line == " Baseline" ) {
1018
1020
weightChoice->psBaselineID = weightIter;
1019
1021
} else if (line.find (" isr" ) != std::string::npos || line.find (" fsr" ) != std::string::npos) {
1020
- weightChoice->matchPS_alt = line.find (" sr:" ) != std::string::npos; // (f/i)sr: for new weights
1022
+ weightChoice->matchPS_alt = line.find (" sr:" ) != std::string::npos ||
1023
+ line.find (" sr." ) != std::string::npos; // (f/i)sr: for new weights
1021
1024
if (keepAllPSWeights_) {
1022
1025
weightChoice->psWeightIDs .push_back (weightIter); // PS variations
1023
1026
} else if (std::regex_search (line, groups, mainPSw)) {
@@ -1031,18 +1034,20 @@ class GenWeightsTableProducer : public edm::global::EDProducer<edm::StreamCache<
1031
1034
weightIter++;
1032
1035
}
1033
1036
if (keepAllPSWeights_) {
1034
- weightChoice->psWeightsDoc = " All PS weights (w_var / w_nominal)" ;
1037
+ weightChoice->psWeightsDoc = " All PS weights (w_var / w_nominal) " ;
1035
1038
} else if (weightChoice->psWeightIDs .size () == 4 ) {
1036
- weightChoice->psWeightsDoc =
1037
- " PS weights (w_var / w_nominal); [0] is ISR=2 FSR=1; [1] is ISR=1 FSR=2"
1038
- " [2] is ISR=0.5 FSR=1; [3] is ISR=1 FSR=0.5;" ;
1039
+ weightChoice->psWeightsDoc = " PS weights (w_var / w_nominal) " ;
1039
1040
for (int i = 0 ; i < 4 ; i++) {
1040
1041
if (static_cast <int >(weightChoice->psWeightIDs [i]) == -1 )
1041
1042
weightChoice->setMissingWeight (i);
1042
1043
}
1043
1044
} else {
1044
1045
weightChoice->psWeightsDoc = " dummy PS weight (1.0) " ;
1045
1046
}
1047
+ for (unsigned i = 0 ; i < weightChoice->psWeightIDs .size (); ++i) {
1048
+ weightChoice->psWeightsDoc +=
1049
+ " [" + std::to_string (i) + " ] " + weightNames.at (weightChoice->psWeightIDs .at (i)) + " ; " ;
1050
+ }
1046
1051
1047
1052
weightChoice->scaleWeightIDs .clear ();
1048
1053
weightChoice->pdfWeightIDs .clear ();
0 commit comments