CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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  return IDBMUP == other.IDBMUP && EBMUP == other.EBMUP && PDFGUP == other.PDFGUP && PDFSUP == other.PDFSUP &&
35  IDWTUP == other.IDWTUP && NPRUP == other.NPRUP && XSECUP == other.XSECUP && XERRUP == other.XERRUP &&
36  XMAXUP == other.XMAXUP && LPRUP == other.LPRUP;
37  }
38 
44  void resize(int nrup) {
45  NPRUP = nrup;
46  resize();
47  }
48 
54  void resize() {
55  XSECUP.resize(NPRUP);
56  XERRUP.resize(NPRUP);
57  XMAXUP.resize(NPRUP);
58  LPRUP.resize(NPRUP);
59  }
60 
61  void swap(HEPRUP &other) {
62  IDBMUP.swap(other.IDBMUP);
63  EBMUP.swap(other.EBMUP);
64  PDFGUP.swap(other.PDFGUP);
65  PDFSUP.swap(other.PDFSUP);
66  std::swap(IDWTUP, other.IDWTUP);
67  std::swap(NPRUP, other.NPRUP);
68  XSECUP.swap(other.XSECUP);
69  XERRUP.swap(other.XERRUP);
70  XMAXUP.swap(other.XMAXUP);
71  LPRUP.swap(other.LPRUP);
72  }
73 
77  std::pair<int, int> IDBMUP;
78 
82  std::pair<double, double> EBMUP;
83 
88  std::pair<int, int> PDFGUP;
89 
94  std::pair<int, int> PDFSUP;
95 
101  int IDWTUP;
102 
107  int NPRUP;
108 
112  std::vector<double> XSECUP;
113 
118  std::vector<double> XERRUP;
119 
123  std::vector<double> XMAXUP;
124 
128  std::vector<int> LPRUP;
129  };
130 
138  class HEPEUP {
139  public:
145  HEPEUP() : NUP(0), IDPRUP(0), XWGTUP(0.0), XPDWUP(0.0, 0.0), SCALUP(0.0), AQEDUP(0.0), AQCDUP(0.0) {}
147 
148  public:
149  struct FiveVector {
150  double operator[](unsigned int i) const { return x[i]; }
151  double &operator[](unsigned int i) { return x[i]; }
152 
153  double x[5];
154  };
155 
161  void resize(int nup) {
162  NUP = nup;
163  resize();
164  }
165 
171  void resize() {
172  IDUP.resize(NUP);
173  ISTUP.resize(NUP);
174  MOTHUP.resize(NUP);
175  ICOLUP.resize(NUP);
176  PUP.resize(NUP);
177  VTIMUP.resize(NUP);
178  SPINUP.resize(NUP);
179  }
180 
184  int NUP;
185 
189  int IDPRUP;
190 
194  double XWGTUP;
195 
202  std::pair<double, double> XPDWUP;
203 
208  double SCALUP;
209 
213  double AQEDUP;
214 
218  double AQCDUP;
219 
223  std::vector<int> IDUP;
224 
228  std::vector<int> ISTUP;
229 
234  std::vector<std::pair<int, int> > MOTHUP;
235 
240  std::vector<std::pair<int, int> > ICOLUP;
241 
246  std::vector<FiveVector> PUP;
247 
252  std::vector<double> VTIMUP;
253 
259  std::vector<double> SPINUP;
260  };
261 
262 } // namespace lhef
263 
264 #endif // SimDataFormats_GeneratorProducts_LesHouches_h
void resize(int nrup)
Definition: LesHouches.h:44
void resize()
Definition: LesHouches.h:54
std::vector< std::pair< int, int > > ICOLUP
Definition: LesHouches.h:240
std::pair< double, double > EBMUP
Definition: LesHouches.h:82
std::vector< double > VTIMUP
Definition: LesHouches.h:252
std::pair< int, int > IDBMUP
Definition: LesHouches.h:77
bool operator==(const HEPRUP &other) const
Definition: LesHouches.h:33
std::pair< double, double > XPDWUP
Definition: LesHouches.h:202
std::pair< int, int > PDFGUP
Definition: LesHouches.h:88
void resize()
Definition: LesHouches.h:171
void resize(int nup)
Definition: LesHouches.h:161
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
std::vector< FiveVector > PUP
Definition: LesHouches.h:246
std::vector< double > SPINUP
Definition: LesHouches.h:259
std::vector< int > ISTUP
Definition: LesHouches.h:228
std::vector< std::pair< int, int > > MOTHUP
Definition: LesHouches.h:234
std::vector< int > IDUP
Definition: LesHouches.h:223
std::vector< double > XERRUP
Definition: LesHouches.h:118
std::vector< double > XMAXUP
Definition: LesHouches.h:123
double AQCDUP
Definition: LesHouches.h:218
double operator[](unsigned int i) const
Definition: LesHouches.h:150
std::pair< int, int > PDFSUP
Definition: LesHouches.h:94
void swap(HEPRUP &other)
Definition: LesHouches.h:61
double AQEDUP
Definition: LesHouches.h:213
std::vector< double > XSECUP
Definition: LesHouches.h:112
double & operator[](unsigned int i)
Definition: LesHouches.h:151
double XWGTUP
Definition: LesHouches.h:194
std::vector< int > LPRUP
Definition: LesHouches.h:128
double SCALUP
Definition: LesHouches.h:208