#include <SampleXsection.h>
|
enum | showering {
pythia =0,
herwig =1,
sherpa =2,
pythia8 =4,
herwigpp =5,
sherpa21 =6,
amcatnlopythia8 =7,
herwigpp713 =8,
sherpa228 =9,
sherpa2210 =10,
herwigpp721 =11,
sherpa2212 =12,
amcatnloherwig7 =13,
unknown =14
} |
|
Definition at line 19 of file SampleXsection.h.
◆ showering
Enumerator |
---|
pythia | |
herwig | |
sherpa | |
pythia8 | |
herwigpp | |
sherpa21 | |
amcatnlopythia8 | |
herwigpp713 | |
sherpa228 | |
sherpa2210 | |
herwigpp721 | |
sherpa2212 | |
amcatnloherwig7 | |
unknown | |
Definition at line 21 of file SampleXsection.h.
◆ SampleXsection() [1/2]
SampleXsection::SampleXsection |
( |
| ) |
|
|
inline |
◆ SampleXsection() [2/2]
◆ ~SampleXsection()
SampleXsection::~SampleXsection |
( |
| ) |
|
|
inline |
◆ applyTranslation()
◆ getKfactor()
double SampleXsection::getKfactor |
( |
const int |
dsid | ) |
const |
◆ getRawXsection()
double SampleXsection::getRawXsection |
( |
const int |
dsid | ) |
const |
◆ getShowering()
◆ getShoweringIndex()
int SampleXsection::getShoweringIndex |
( |
const int |
dsid | ) |
const |
Definition at line 150 of file SampleXsection.cxx.
156 if (shower == showering::pythia)
return 0;
157 else if (shower == showering::herwigpp || shower == showering::herwig)
160 else if (shower == showering::pythia8)
return 2;
161 else if (shower == showering::sherpa)
return 3;
162 else if (shower == showering::sherpa21)
return 4;
163 else if (shower == showering::amcatnlopythia8)
return 5;
164 else if (shower == showering::herwigpp713)
return 6;
165 else if (shower == showering::sherpa228)
return 7;
166 else if (shower == showering::sherpa2210)
return 8;
167 else if (shower == showering::herwigpp721)
return 9;
168 else if (shower == showering::sherpa2212)
return 10;
169 else if (shower == showering::amcatnloherwig7)
return 11;
172 "==========================================================================================================================================="
174 std::cout <<
"ERROR:TopDataPreparation: The DSID " <<
dsid <<
175 " does not have a showering algorithm defined!!! This is needed for MC/MC SF!!! ---> EXIT." << std::endl;
176 std::cout <<
"\t" << std::endl;
◆ getShoweringString()
std::string SampleXsection::getShoweringString |
( |
const int |
dsid | ) |
const |
◆ getXsection()
double SampleXsection::getXsection |
( |
const int |
dsid | ) |
const |
◆ getXsectionDown()
double SampleXsection::getXsectionDown |
( |
const int |
dsid | ) |
const |
◆ getXsectionDownUp()
pair< double, double > SampleXsection::getXsectionDownUp |
( |
const int |
dsid | ) |
const |
◆ getXsectionUp()
double SampleXsection::getXsectionUp |
( |
const int |
dsid | ) |
const |
◆ operator=()
◆ readFromFile()
bool SampleXsection::readFromFile |
( |
const char * |
fName | ) |
|
Definition at line 23 of file SampleXsection.cxx.
26 if (!in)
return false;
30 if (!getline(in,
line))
break;
31 if (!
line.empty() &&
line[0] !=
'#') {
32 istringstream istr(
line);
34 double xSect, kFact, xSectDw, xSectUp;
35 string s_shower, s_xSectDw, s_xSectUp;
37 istr >>
dsid >> xSect >> kFact >> s_shower >> s_xSectDw >> s_xSectUp;
38 if (!s_shower.empty() && s_shower[0] !=
'#') {
42 "ERROR!! TopDataPreparation::SampleXsection::readFromFile: unknown showering (which is needed for btagging SF!!!) : "
43 << s_shower <<
" for DSID= " <<
dsid << endl;
46 if (!s_xSectDw.empty() && s_xSectDw[0] !=
'#') {
47 xSectDw =
atof(s_xSectDw.c_str());
48 if (!s_xSectUp.empty()) {
49 xSectUp =
atof(s_xSectUp.c_str());
51 cerr <<
"ERROR!! SampleXsection::readFromFile: xSectDw of " <<
dsid <<
" is defined ( " << s_xSectDw <<
52 " ), but not xSectUp" << endl;
◆ setSample()
Definition at line 73 of file SampleXsection.cxx.
77 map<int, pair<double, double> >::const_iterator
it =
m_Xsects.find(
dsid);
79 cerr <<
"ERROR!! SampleXsection::setSample: duplicate entry ! DSID= " <<
dsid << endl;
◆ setTranslator()
void SampleXsection::setTranslator |
( |
const std::unordered_map< std::string, std::string > & |
map | ) |
|
|
inline |
◆ showerToString()
std::string SampleXsection::showerToString |
( |
const showering |
shower | ) |
const |
|
private |
Definition at line 196 of file SampleXsection.cxx.
197 if (shower == showering::pythia)
return "pythia";
198 else if (shower == showering::herwig)
return "herwig";
199 else if (shower == showering::herwigpp)
return "herwig";
200 else if (shower == showering::sherpa)
return "sherpa";
201 else if (shower == showering::sherpa21)
return "sherpa21";
202 else if (shower == showering::pythia8)
return "pythia8";
203 else if (shower == showering::amcatnlopythia8)
return "amcatnlopythia8";
204 else if (shower == showering::herwigpp713)
return "herwigpp713";
205 else if (shower == showering::sherpa228)
return "sherpa228";
206 else if (shower == showering::sherpa2210)
return "sherpa2210";
207 else if (shower == showering::herwigpp721)
return "herwigpp721";
208 else if (shower == showering::sherpa2212)
return "sherpa2212";
209 else if (shower == showering::amcatnloherwig7)
return "amcatnloherwig7";
◆ stringToShower()
Definition at line 214 of file SampleXsection.cxx.
215 if (
name ==
"pythia")
return showering::pythia;
216 else if (
name ==
"herwig")
return showering::herwig;
217 else if (
name ==
"sherpa")
return showering::sherpa;
218 else if (
name ==
"sherpa21")
return showering::sherpa21;
219 else if (
name ==
"pythia8")
return showering::pythia8;
220 else if (
name ==
"herwigpp")
return showering::herwigpp;
221 else if (
name ==
"amcatnlopythia8")
return showering::amcatnlopythia8;
222 else if (
name ==
"herwigpp713")
return showering::herwigpp713;
223 else if (
name ==
"sherpa228")
return showering::sherpa228;
224 else if (
name ==
"sherpa2210")
return showering::sherpa2210;
225 else if (
name ==
"herwigpp721")
return showering::herwigpp721;
226 else if (
name ==
"sherpa2212")
return showering::sherpa2212;
227 else if (
name ==
"amcatnloherwig7")
return showering::amcatnloherwig7;
◆ m_Showering
std::map<int, showering > SampleXsection::m_Showering |
|
private |
◆ m_translator
std::unordered_map<std::string, std::string> SampleXsection::m_translator |
|
private |
◆ m_Uncert
std::map<int, std::pair<double, double> > SampleXsection::m_Uncert |
|
private |
◆ m_Xsects
std::map<int, std::pair<double, double> > SampleXsection::m_Xsects |
|
private |
The documentation for this class was generated from the following files:
void setSample(const int dsid, const double xSect, const double kFact, const showering shower, const double xSectDw, const double xSectUp)