CMS 3D CMS Logo

LHEEvent.cc
Go to the documentation of this file.
1 #include <algorithm>
2 #include <iostream>
3 #include <iomanip>
4 #include <sstream>
5 #include <cstring>
6 #include <string>
7 #include <vector>
8 #include <memory>
9 #include <cmath>
10 
11 #include "HepMC/GenEvent.h"
12 #include "HepMC/GenVertex.h"
13 #include "HepMC/GenParticle.h"
14 #include "HepMC/SimpleVector.h"
15 
17 
19 
22 
23 static int skipWhitespace(std::istream &in) {
24  int ch;
25  do {
26  ch = in.get();
27  } while (std::isspace(ch));
28  if (ch != std::istream::traits_type::eof())
29  in.putback(ch);
30  return ch;
31 }
32 
33 namespace lhef {
34 
35  LHEEvent::LHEEvent(const std::shared_ptr<LHERunInfo> &runInfo, std::istream &in)
36  : runInfo(runInfo),
37  weights_(0),
38  counted(false),
39  readAttemptCounter(0),
40  npLO_(-99),
41  npNLO_(-99)
42 
43  {
44  hepeup.NUP = 0;
45  hepeup.XPDWUP.first = hepeup.XPDWUP.second = 0.0;
46 
48  if (!in.good())
49  throw cms::Exception("InvalidFormat") << "Les Houches file contained invalid"
50  " event header."
51  << std::endl;
52 
53  // store the original value of XWGTUP for the user
55 
56  int idwtup = runInfo->getHEPRUP()->IDWTUP;
57  if (idwtup >= 0 && hepeup.XWGTUP < 0) {
58  edm::LogWarning("Generator|LHEInterface") << "Non-allowed negative event weight encountered." << std::endl;
60  }
61 
62  if (std::abs(idwtup) == 3 && std::abs(hepeup.XWGTUP) != 1.) {
63  edm::LogInfo("Generator|LHEInterface") << "Event weight not set to one for abs(IDWTUP) == 3" << std::endl;
64  hepeup.XWGTUP = hepeup.XWGTUP > 0. ? 1.0 : -1.0;
65  }
66 
67  hepeup.resize();
68 
69  for (int i = 0; i < hepeup.NUP; i++) {
70  in >> hepeup.IDUP[i] >> hepeup.ISTUP[i] >> hepeup.MOTHUP[i].first >> hepeup.MOTHUP[i].second >>
71  hepeup.ICOLUP[i].first >> hepeup.ICOLUP[i].second >> hepeup.PUP[i][0] >> hepeup.PUP[i][1] >>
72  hepeup.PUP[i][2] >> hepeup.PUP[i][3] >> hepeup.PUP[i][4] >> hepeup.VTIMUP[i] >> hepeup.SPINUP[i];
73  if (!in.good())
74  throw cms::Exception("InvalidFormat") << "Les Houches file contained invalid event"
75  " in particle line "
76  << (i + 1) << "." << std::endl;
77  }
78 
79  while (skipWhitespace(in) == '#') {
81  std::getline(in, line);
82  std::istringstream ss(line);
84  ss >> tag;
85  if (tag == "#pdf") {
86  pdf.reset(new PDF);
87  ss >> pdf->id.first >> pdf->id.second >> pdf->x.first >> pdf->x.second >> pdf->scalePDF >> pdf->xPDF.first >>
88  pdf->xPDF.second;
89  if (ss.bad()) {
90  edm::LogWarning("Generator|LHEInterface") << "Les Houches event contained"
91  " unparseable PDF information."
92  << std::endl;
93  pdf.reset();
94  } else
95  continue;
96  }
97  comments.push_back(line + "\n");
98  }
99 
100  if (!in.eof())
101  edm::LogWarning("Generator|LHEInterface") << "Les Houches file contained spurious"
102  " content after event data."
103  << std::endl;
104  }
105 
106  LHEEvent::LHEEvent(const std::shared_ptr<LHERunInfo> &runInfo, const HEPEUP &hepeup)
107  : runInfo(runInfo), hepeup(hepeup), counted(false), readAttemptCounter(0), npLO_(-99), npNLO_(-99) {}
108 
109  LHEEvent::LHEEvent(const std::shared_ptr<LHERunInfo> &runInfo,
110  const HEPEUP &hepeup,
111  const LHEEventProduct::PDF *pdf,
112  const std::vector<std::string> &comments)
113  : runInfo(runInfo),
114  hepeup(hepeup),
115  pdf(pdf ? new PDF(*pdf) : nullptr),
117  counted(false),
118  readAttemptCounter(0),
119  npLO_(-99),
120  npNLO_(-99) {}
121 
122  LHEEvent::LHEEvent(const std::shared_ptr<LHERunInfo> &runInfo, const LHEEventProduct &product)
123  : runInfo(runInfo),
124  hepeup(product.hepeup()),
125  pdf(product.pdf() ? new PDF(*product.pdf()) : nullptr),
126  weights_(product.weights()),
127  comments(product.comments_begin(), product.comments_end()),
128  counted(false),
129  readAttemptCounter(0),
130  originalXWGTUP_(product.originalXWGTUP()),
131  scales_(product.scales()),
132  npLO_(product.npLO()),
133  npNLO_(product.npNLO()) {}
134 
136 
137  void LHEEvent::removeParticle(HEPEUP &hepeup, int index) {
138  index--;
139  if (index < 0 || index >= hepeup.NUP) {
140  edm::LogError("Generator|LHEInterface")
141  << "removeParticle: Index " << (index + 1) << " out of bounds." << std::endl;
142  return;
143  }
144 
145  std::pair<int, int> mo = hepeup.MOTHUP[index];
146 
147  hepeup.IDUP.erase(hepeup.IDUP.begin() + index);
148  hepeup.ISTUP.erase(hepeup.ISTUP.begin() + index);
149  hepeup.MOTHUP.erase(hepeup.MOTHUP.begin() + index);
150  hepeup.ICOLUP.erase(hepeup.ICOLUP.begin() + index);
151  hepeup.PUP.erase(hepeup.PUP.begin() + index);
152  hepeup.VTIMUP.erase(hepeup.VTIMUP.begin() + index);
153  hepeup.SPINUP.erase(hepeup.SPINUP.begin() + index);
154 
155  hepeup.NUP--;
156 
157  index++;
158  for (int i = 0; i < hepeup.NUP; i++) {
159  if (hepeup.MOTHUP[i].first == index) {
160  if (hepeup.MOTHUP[i].second > 0)
161  edm::LogError("Generator|LHEInterface")
162  << "removeParticle: Particle " << (i + 2) << " has two mothers." << std::endl;
163  hepeup.MOTHUP[i] = mo;
164  }
165 
166  if (hepeup.MOTHUP[i].first > index)
167  hepeup.MOTHUP[i].first--;
168  if (hepeup.MOTHUP[i].second > index)
169  hepeup.MOTHUP[i].second--;
170  }
171  }
172 
173  void LHEEvent::removeResonances(const std::vector<int> &ids) {
174  for (int i = 1; i <= hepeup.NUP; i++) {
175  int id = std::abs(hepeup.IDUP[i - 1]);
176  if (hepeup.MOTHUP[i - 1].first > 0 && hepeup.MOTHUP[i - 1].second > 0 &&
177  std::find(ids.begin(), ids.end(), id) != ids.end())
178  removeParticle(hepeup, i--);
179  }
180  }
181 
182  void LHEEvent::count(LHERunInfo::CountMode mode, double weight, double matchWeight) {
183  if (counted)
184  edm::LogWarning("Generator|LHEInterface") << "LHEEvent::count called twice on same event!" << std::endl;
185 
186  runInfo->count(hepeup.IDPRUP, mode, hepeup.XWGTUP, weight, matchWeight);
187 
188  counted = true;
189  }
190 
191  void LHEEvent::fillPdfInfo(HepMC::PdfInfo *info) const {
192  if (pdf.get()) {
193  info->set_id1(pdf->id.first);
194  info->set_id2(pdf->id.second);
195  info->set_x1(pdf->x.first);
196  info->set_x2(pdf->x.second);
197  info->set_pdf1(pdf->xPDF.first);
198  info->set_pdf2(pdf->xPDF.second);
199  info->set_scalePDF(pdf->scalePDF);
200  } else if (hepeup.NUP >= 2) {
201  const HEPRUP *heprup = getHEPRUP();
202  info->set_id1(hepeup.IDUP[0] == 21 ? 0 : hepeup.IDUP[0]);
203  info->set_id2(hepeup.IDUP[1] == 21 ? 0 : hepeup.IDUP[1]);
204  info->set_x1(std::abs(hepeup.PUP[0][2] / heprup->EBMUP.first));
205  info->set_x2(std::abs(hepeup.PUP[1][2] / heprup->EBMUP.second));
206  info->set_pdf1(-1.0);
207  info->set_pdf2(-1.0);
208  info->set_scalePDF(hepeup.SCALUP);
209  } else {
210  info->set_x1(-1.0);
211  info->set_x2(-1.0);
212  info->set_pdf1(-1.0);
213  info->set_pdf2(-1.0);
214  info->set_scalePDF(hepeup.SCALUP);
215  }
216  }
217 
219  event->set_signal_process_id(hepeup.IDPRUP);
220  event->set_event_scale(hepeup.SCALUP);
221  event->set_alphaQED(hepeup.AQEDUP);
222  event->set_alphaQCD(hepeup.AQCDUP);
223  }
224 
225  std::unique_ptr<HepMC::GenEvent> LHEEvent::asHepMCEvent() const {
226  std::unique_ptr<HepMC::GenEvent> hepmc(new HepMC::GenEvent);
227 
228  hepmc->set_signal_process_id(hepeup.IDPRUP);
229  hepmc->set_event_scale(hepeup.SCALUP);
230  hepmc->set_alphaQED(hepeup.AQEDUP);
231  hepmc->set_alphaQCD(hepeup.AQCDUP);
232 
233  unsigned int nup = hepeup.NUP; // particles in event
234 
235  // any particles in HEPEUP block?
236  if (!nup) {
237  edm::LogWarning("Generator|LHEInterface") << "Les Houches Event does not contain any partons. "
238  << "Not much to convert.";
239  return hepmc;
240  }
241 
242  // stores (pointers to) converted particles
243  std::vector<HepMC::GenParticle *> genParticles;
244  std::vector<HepMC::GenVertex *> genVertices;
245 
246  // I. convert particles
247  for (unsigned int i = 0; i < nup; i++)
248  genParticles.push_back(makeHepMCParticle(i));
249 
250  // II. loop again to build vertices
251  for (unsigned int i = 0; i < nup; i++) {
252  unsigned int mother1 = hepeup.MOTHUP.at(i).first;
253  unsigned int mother2 = hepeup.MOTHUP.at(i).second;
254  double cTau = hepeup.VTIMUP.at(i); // decay time
255 
256  // current particle has a mother? --- Sorry, parent! We're PC.
257  if (mother1) {
258  mother1--; // FORTRAN notation!
259  if (mother2)
260  mother2--;
261  else
262  mother2 = mother1;
263 
264  HepMC::GenParticle *in_par = genParticles.at(mother1);
265  HepMC::GenVertex *current_vtx = in_par->end_vertex(); // vertex of first mother
266 
267  if (!current_vtx) {
268  current_vtx = new HepMC::GenVertex(HepMC::FourVector(0, 0, 0, cTau));
269 
270  // add vertex to event
271  genVertices.push_back(current_vtx);
272  }
273 
274  for (unsigned int j = mother1; j <= mother2; j++) // set mother-daughter relations
275  if (!genParticles.at(j)->end_vertex())
276  current_vtx->add_particle_in(genParticles.at(j));
277 
278  // connect THIS outgoing particle to current vertex
279  current_vtx->add_particle_out(genParticles.at(i));
280  }
281  }
282 
283  checkHepMCTree(hepmc.get());
284 
285  // III. restore color flow
286  // ok, nobody knows how to do it so far...
287 
288  // IV. fill run information
289  const HEPRUP *heprup = getHEPRUP();
290 
291  // set beam particles
293  HepMC::FourVector(0.0, 0.0, +heprup->EBMUP.first, heprup->EBMUP.first), heprup->IDBMUP.first);
295  HepMC::FourVector(0.0, 0.0, -heprup->EBMUP.second, heprup->EBMUP.second), heprup->IDBMUP.second);
296  b1->set_status(3);
297  b2->set_status(3);
298 
299  HepMC::GenVertex *v1 = new HepMC::GenVertex();
300  HepMC::GenVertex *v2 = new HepMC::GenVertex();
301  v1->add_particle_in(b1);
302  v2->add_particle_in(b2);
303 
304  hepmc->add_vertex(v1);
305  hepmc->add_vertex(v2);
306  hepmc->set_beam_particles(b1, b2);
307 
308  // first two particles have to be the hard partons going into the interaction
309  if (genParticles.size() >= 2) {
310  if (!genParticles.at(0)->production_vertex() && !genParticles.at(1)->production_vertex()) {
311  v1->add_particle_out(genParticles.at(0));
312  v2->add_particle_out(genParticles.at(1));
313  } else
314  edm::LogWarning("Generator|LHEInterface") << "Initial partons do already have a"
315  " production vertex. "
316  << std::endl
317  << "Beam particles not connected.";
318  } else
319  edm::LogWarning("Generator|LHEInterface") << "Can't find any initial partons to be"
320  " connected to the beam particles.";
321 
322  for (std::vector<HepMC::GenVertex *>::const_iterator iter = genVertices.begin(); iter != genVertices.end(); ++iter)
323  hepmc->add_vertex(*iter);
324 
325  // do some more consistency checks
326  for (unsigned int i = 0; i < nup; i++) {
327  if (!genParticles.at(i)->parent_event()) {
328  edm::LogWarning("Generator|LHEInterface") << "Not all LHE particles could be stored"
329  " stored in the HepMC event. "
330  << std::endl
331  << "Check the mother-daughter relations"
332  " in the given LHE input file.";
333  break;
334  }
335  }
336 
337  hepmc->set_signal_process_vertex(const_cast<HepMC::GenVertex *>(findSignalVertex(hepmc.get(), false)));
338 
339  return hepmc;
340  }
341 
343  HepMC::GenParticle *particle = new HepMC::GenParticle(
344  HepMC::FourVector(hepeup.PUP.at(i)[0], hepeup.PUP.at(i)[1], hepeup.PUP.at(i)[2], hepeup.PUP.at(i)[3]),
345  hepeup.IDUP.at(i));
346 
347  int status = hepeup.ISTUP.at(i);
348 
349  particle->set_generated_mass(hepeup.PUP.at(i)[4]);
350  particle->set_status(status > 0 ? (status == 2 ? 3 : status) : 3);
351 
352  return particle;
353  }
354 
356  double px = 0, py = 0, pz = 0, E = 0;
357 
358  for (HepMC::GenEvent::particle_const_iterator iter = event->particles_begin(); iter != event->particles_end();
359  iter++) {
360  int status = (*iter)->status();
361  HepMC::FourVector fv = (*iter)->momentum();
362 
363  // incoming particles
364  if (status == 3 && *iter != event->beam_particles().first && *iter != event->beam_particles().second) {
365  px -= fv.px();
366  py -= fv.py();
367  pz -= fv.pz();
368  E -= fv.e();
369  }
370 
371  // outgoing particles
372  if (status == 1) {
373  px += fv.px();
374  py += fv.py();
375  pz += fv.pz();
376  E += fv.e();
377  }
378  }
379 
380  if (px * px + py * py + pz * pz + E * E > 0.1) {
381  edm::LogWarning("Generator|LHEInterface")
382  << "Energy-momentum badly conserved. " << std::setprecision(3) << "sum p_i = [" << std::setw(7) << E << ", "
383  << std::setw(7) << px << ", " << std::setw(7) << py << ", " << std::setw(7) << pz << "]";
384 
385  return false;
386  }
387 
388  return true;
389  }
390 
391  const HepMC::GenVertex *LHEEvent::findSignalVertex(const HepMC::GenEvent *event, bool status3) {
392  double largestMass2 = -9.0e-30;
393  const HepMC::GenVertex *vertex = nullptr;
394  for (HepMC::GenEvent::vertex_const_iterator iter = event->vertices_begin(); iter != event->vertices_end(); ++iter) {
395  if ((*iter)->particles_in_size() < 2)
396  continue;
397  if ((*iter)->particles_out_size() < 1 ||
398  ((*iter)->particles_out_size() == 1 &&
399  (!(*(*iter)->particles_out_const_begin())->end_vertex() ||
400  !(*(*iter)->particles_out_const_begin())->end_vertex()->particles_out_size())))
401  continue;
402 
403  double px = 0.0, py = 0.0, pz = 0.0, E = 0.0;
404  bool hadStatus3 = false;
405  for (HepMC::GenVertex::particles_out_const_iterator iter2 = (*iter)->particles_out_const_begin();
406  iter2 != (*iter)->particles_out_const_end();
407  ++iter2) {
408  hadStatus3 = hadStatus3 || (*iter2)->status() == 3;
409  px += (*iter2)->momentum().px();
410  py += (*iter2)->momentum().py();
411  pz += (*iter2)->momentum().pz();
412  E += (*iter2)->momentum().e();
413  }
414  if (status3 && !hadStatus3)
415  continue;
416 
417  double mass2 = E * E - (px * px + py * py + pz * pz);
418  if (mass2 > largestMass2) {
419  vertex = *iter;
420  largestMass2 = mass2;
421  }
422  }
423 
424  return vertex;
425  }
426 
427  static void fixSubTree(HepMC::GenVertex *vertex,
428  HepMC::FourVector &_time,
429  std::set<const HepMC::GenVertex *> &visited) {
430  HepMC::FourVector time = _time;
431  HepMC::FourVector curTime = vertex->position();
432  bool needsFixup = curTime.t() < time.t();
433 
434  if (!visited.insert(vertex).second && !needsFixup)
435  return;
436 
437  if (needsFixup)
438  vertex->set_position(time);
439  else
440  time = curTime;
441 
442  for (HepMC::GenVertex::particles_out_const_iterator iter = vertex->particles_out_const_begin();
443  iter != vertex->particles_out_const_end();
444  ++iter) {
445  HepMC::GenVertex *endVertex = (*iter)->end_vertex();
446  if (endVertex)
447  fixSubTree(endVertex, time, visited);
448  }
449  }
450 
452  std::set<const HepMC::GenVertex *> visited;
453  HepMC::FourVector zeroTime;
454  for (HepMC::GenEvent::vertex_iterator iter = event->vertices_begin(); iter != event->vertices_end(); ++iter)
455  fixSubTree(*iter, zeroTime, visited);
456  }
457 
458 } // namespace lhef
lhef::HEPEUP::AQCDUP
double AQCDUP
Definition: LesHouches.h:218
lhef::fixSubTree
static void fixSubTree(HepMC::GenVertex *vertex, HepMC::FourVector &_time, std::set< const HepMC::GenVertex * > &visited)
Definition: LHEEvent.cc:427
HLT_2018_cff.weights
weights
Definition: HLT_2018_cff.py:87167
mps_fire.i
i
Definition: mps_fire.py:355
MessageLogger.h
genParticles2HepMC_cfi.genParticles
genParticles
Definition: genParticles2HepMC_cfi.py:4
funct::false
false
Definition: Factorize.h:34
LHEEventProduct
Definition: LHEEventProduct.h:12
lhef::LHEEvent::fillEventInfo
void fillEventInfo(HepMC::GenEvent *hepmc) const
Definition: LHEEvent.cc:218
lhef::HEPEUP::MOTHUP
std::vector< std::pair< int, int > > MOTHUP
Definition: LesHouches.h:234
mps_update.status
status
Definition: mps_update.py:69
lhef::HEPEUP::ISTUP
std::vector< int > ISTUP
Definition: LesHouches.h:228
multPhiCorr_741_25nsDY_cfi.py
py
Definition: multPhiCorr_741_25nsDY_cfi.py:12
skipWhitespace
static int skipWhitespace(std::istream &in)
Definition: LHEEvent.cc:23
ALCARECOPromptCalibProdSiPixelAli0T_cff.mode
mode
Definition: ALCARECOPromptCalibProdSiPixelAli0T_cff.py:96
edm::LogInfo
Definition: MessageLogger.h:254
lhef::HEPEUP::SPINUP
std::vector< double > SPINUP
Definition: LesHouches.h:259
lhef::LHEEvent::counted
bool counted
Definition: LHEEvent.h:90
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:152
lhef::LHEEvent::makeHepMCParticle
HepMC::GenParticle * makeHepMCParticle(unsigned int i) const
Definition: LHEEvent.cc:342
lhef::LHEEvent::fillPdfInfo
void fillPdfInfo(HepMC::PdfInfo *info) const
Definition: LHEEvent.cc:191
b2
static constexpr float b2
Definition: L1EGammaCrystalsEmulatorProducer.cc:82
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
HepMC::GenEvent
Definition: hepmc_rootio.cc:9
lhef::HEPRUP::EBMUP
std::pair< double, double > EBMUP
Definition: LesHouches.h:82
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
b1
static constexpr float b1
Definition: L1EGammaCrystalsEmulatorProducer.cc:82
gen::PdfInfo
Definition: PdfInfo.h:11
lhef::HEPEUP::NUP
int NUP
Definition: LesHouches.h:184
lhef::LHEEvent::checkHepMCTree
static bool checkHepMCTree(const HepMC::GenEvent *event)
Definition: LHEEvent.cc:355
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
lhef::LHEEvent::findSignalVertex
static const HepMC::GenVertex * findSignalVertex(const HepMC::GenEvent *event, bool status3=true)
Definition: LHEEvent.cc:391
class-composition.visited
visited
Definition: class-composition.py:74
lhef::LHEEvent::originalXWGTUP_
double originalXWGTUP_
Definition: LHEEvent.h:92
lhef::LHEEvent::pdf
std::unique_ptr< PDF > pdf
Definition: LHEEvent.h:87
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::LogWarning
Definition: MessageLogger.h:141
lhef::HEPEUP::ICOLUP
std::vector< std::pair< int, int > > ICOLUP
Definition: LesHouches.h:240
indexGen.comments
comments
Definition: indexGen.py:75
bphysicsOniaDQM_cfi.vertex
vertex
Definition: bphysicsOniaDQM_cfi.py:7
edm::LogError
Definition: MessageLogger.h:183
lhef::HEPEUP::VTIMUP
std::vector< double > VTIMUP
Definition: LesHouches.h:252
LHERunInfo.h
lhef
Definition: ExhumeHadronizer.h:12
recoMuon::in
Definition: RecoMuonEnumerators.h:6
lhef::LHERunInfo::CountMode
CountMode
Definition: LHERunInfo.h:64
lhef::HEPRUP
Definition: LesHouches.h:22
lhef::HEPEUP::AQEDUP
double AQEDUP
Definition: LesHouches.h:213
lhef::LHEEvent::fixHepMCEventTimeOrdering
static void fixHepMCEventTimeOrdering(HepMC::GenEvent *event)
Definition: LHEEvent.cc:451
lhef::LHEEvent::hepeup
HEPEUP hepeup
Definition: LHEEvent.h:86
lhef::HEPEUP
Definition: LesHouches.h:138
LesHouches.h
lhef::HEPEUP::XWGTUP
double XWGTUP
Definition: LesHouches.h:194
pdg::cTau
double cTau(int pdgID, const HepPDT::ParticleDataTable *pdt)
Definition: pdg_functions.cc:26
lhef::HEPEUP::XPDWUP
std::pair< double, double > XPDWUP
Definition: LesHouches.h:202
multPhiCorr_741_25nsDY_cfi.px
px
Definition: multPhiCorr_741_25nsDY_cfi.py:10
lhef::LHEEvent::LHEEvent
LHEEvent(const std::shared_ptr< LHERunInfo > &runInfo, std::istream &in)
Definition: LHEEvent.cc:35
GenParticle.GenParticle
GenParticle
Definition: GenParticle.py:18
lhef::LHEEvent::~LHEEvent
~LHEEvent()
Definition: LHEEvent.cc:135
lhef::HEPEUP::IDUP
std::vector< int > IDUP
Definition: LesHouches.h:223
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
lhef::LHEEvent::comments
std::vector< std::string > comments
Definition: LHEEvent.h:89
lhef::LHEEvent::asHepMCEvent
std::unique_ptr< HepMC::GenEvent > asHepMCEvent() const
Definition: LHEEvent.cc:225
lhef::HEPEUP::IDPRUP
int IDPRUP
Definition: LesHouches.h:189
LHEEvent.h
lhef::LHEEvent::count
void count(LHERunInfo::CountMode count, double weight=1.0, double matchWeight=1.0)
Definition: LHEEvent.cc:182
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
lhef::LHEEvent::runInfo
const std::shared_ptr< LHERunInfo > runInfo
Definition: LHEEvent.h:84
lhef::HEPEUP::resize
void resize(int nup)
Definition: LesHouches.h:161
cms::Exception
Definition: Exception.h:70
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
lhef::LHEEvent::removeResonances
void removeResonances(const std::vector< int > &ids)
Definition: LHEEvent.cc:173
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
ntuplemaker.time
time
Definition: ntuplemaker.py:310
event
Definition: event.py:1
mps_splice.line
line
Definition: mps_splice.py:76
lhef::HEPEUP::PUP
std::vector< FiveVector > PUP
Definition: LesHouches.h:246
weight
Definition: weight.py:1
lhef::HEPEUP::SCALUP
double SCALUP
Definition: LesHouches.h:208
lhef::LHEEvent::removeParticle
static void removeParticle(lhef::HEPEUP &hepeup, int index)
Definition: LHEEvent.cc:137
lhef::LHEEvent::getHEPRUP
const HEPRUP * getHEPRUP() const
Definition: LHEEvent.h:39
reco::vertex_iterator
VertexRefVector::iterator vertex_iterator
iterator over a vector of references to Vertex objects in the same collection
Definition: VertexFwd.h:19