CMS 3D CMS Logo

LesHouches.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Copyright (C) 1999-2007 Leif Lonnblad
4 //
5 // Modified by C.Saout
6 //
7 #ifndef SimDataFormats_GeneratorProducts_LesHouches_h
8 #define SimDataFormats_GeneratorProducts_LesHouches_h
9 
10 #include <utility>
11 #include <vector>
12 
13 namespace lhef {
14 
22 class HEPRUP {
23  public:
29  HEPRUP() : IDWTUP(0), NPRUP(0) {}
31 
32  public:
33  bool operator == (const HEPRUP &other) const
34  {
35  return IDBMUP == other.IDBMUP &&
36  EBMUP == other.EBMUP &&
37  PDFGUP == other.PDFGUP &&
38  PDFSUP == other.PDFSUP &&
39  IDWTUP == other.IDWTUP &&
40  NPRUP == other.NPRUP &&
41  XSECUP == other.XSECUP &&
42  XERRUP == other.XERRUP &&
43  XMAXUP == other.XMAXUP &&
44  LPRUP == other.LPRUP;
45  }
46 
52  void resize(int nrup)
53  {
54  NPRUP = nrup;
55  resize();
56  }
57 
63  void resize() {
64  XSECUP.resize(NPRUP);
65  XERRUP.resize(NPRUP);
66  XMAXUP.resize(NPRUP);
67  LPRUP.resize(NPRUP);
68  }
69 
70  void swap(HEPRUP& other) {
71  IDBMUP.swap(other.IDBMUP);
72  EBMUP.swap(other.EBMUP);
73  PDFGUP.swap(other.PDFGUP);
74  PDFSUP.swap(other.PDFSUP);
75  std::swap(IDWTUP, other.IDWTUP);
76  std::swap(NPRUP, other.NPRUP);
77  XSECUP.swap(other.XSECUP);
78  XERRUP.swap(other.XERRUP);
79  XMAXUP.swap(other.XMAXUP);
80  LPRUP.swap(other.LPRUP);
81  }
82 
86  std::pair<int, int> IDBMUP;
87 
91  std::pair<double, double> EBMUP;
92 
97  std::pair<int, int> PDFGUP;
98 
103  std::pair<int, int> PDFSUP;
104 
110  int IDWTUP;
111 
116  int NPRUP;
117 
121  std::vector<double> XSECUP;
122 
127  std::vector<double> XERRUP;
128 
132  std::vector<double> XMAXUP;
133 
137  std::vector<int> LPRUP;
138 };
139 
140 
148 class HEPEUP {
149  public:
155  HEPEUP() :
156  NUP(0), IDPRUP(0), XWGTUP(0.0), XPDWUP(0.0, 0.0),
157  SCALUP(0.0), AQEDUP(0.0), AQCDUP(0.0)
158  {}
160 
161  public:
162  struct FiveVector {
163  double operator [] (unsigned int i) const { return x[i]; }
164  double &operator [] (unsigned int i) { return x[i]; }
165 
166  double x[5];
167  };
168 
174  void resize(int nup)
175  {
176  NUP = nup;
177  resize();
178  }
179 
185  void resize()
186  {
187  IDUP.resize(NUP);
188  ISTUP.resize(NUP);
189  MOTHUP.resize(NUP);
190  ICOLUP.resize(NUP);
191  PUP.resize(NUP);
192  VTIMUP.resize(NUP);
193  SPINUP.resize(NUP);
194  }
195 
199  int NUP;
200 
204  int IDPRUP;
205 
209  double XWGTUP;
210 
217  std::pair<double, double> XPDWUP;
218 
223  double SCALUP;
224 
228  double AQEDUP;
229 
233  double AQCDUP;
234 
238  std::vector<int> IDUP;
239 
243  std::vector<int> ISTUP;
244 
249  std::vector< std::pair<int, int> > MOTHUP;
250 
255  std::vector< std::pair<int, int> > ICOLUP;
256 
261  std::vector<FiveVector> PUP;
262 
267  std::vector<double> VTIMUP;
268 
274  std::vector<double> SPINUP;
275 
276 };
277 
278 } // namespace lhef
279 
280 #endif // SimDataFormats_GeneratorProducts_LesHouches_h
void resize(int nrup)
Definition: LesHouches.h:52
void resize()
Definition: LesHouches.h:63
std::pair< double, double > EBMUP
Definition: LesHouches.h:91
std::vector< double > VTIMUP
Definition: LesHouches.h:267
std::pair< int, int > IDBMUP
Definition: LesHouches.h:86
bool operator==(const HEPRUP &other) const
Definition: LesHouches.h:33
std::pair< double, double > XPDWUP
Definition: LesHouches.h:217
std::pair< int, int > PDFGUP
Definition: LesHouches.h:97
void resize()
Definition: LesHouches.h:185
std::vector< std::pair< int, int > > MOTHUP
Definition: LesHouches.h:249
void resize(int nup)
Definition: LesHouches.h:174
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
std::vector< FiveVector > PUP
Definition: LesHouches.h:261
std::vector< double > SPINUP
Definition: LesHouches.h:274
T operator[](int i) const
std::vector< int > ISTUP
Definition: LesHouches.h:243
std::vector< int > IDUP
Definition: LesHouches.h:238
std::vector< double > XERRUP
Definition: LesHouches.h:127
std::vector< double > XMAXUP
Definition: LesHouches.h:132
double AQCDUP
Definition: LesHouches.h:233
std::pair< int, int > PDFSUP
Definition: LesHouches.h:103
void swap(HEPRUP &other)
Definition: LesHouches.h:70
double AQEDUP
Definition: LesHouches.h:228
std::vector< double > XSECUP
Definition: LesHouches.h:121
double XWGTUP
Definition: LesHouches.h:209
std::vector< std::pair< int, int > > ICOLUP
Definition: LesHouches.h:255
std::vector< int > LPRUP
Definition: LesHouches.h:137
double SCALUP
Definition: LesHouches.h:223