CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes
lheh5::Events Struct Reference

#include <lheh5.h>

Public Member Functions

std::vector< ParticlemkEvent (size_t ievent) const
 
EventHeader mkEventHeader (int ievent) const
 
Particle mkParticle (size_t idx) const
 

Public Attributes

size_t _particle_offset
 
std::vector< double > _vaqcd
 
std::vector< double > _vaqed
 
std::vector< int > _vcolor1
 
std::vector< int > _vcolor2
 
std::vector< double > _ve
 
std::vector< size_t > _vend
 
std::vector< double > _vfscale
 
std::vector< int > _vid
 
std::vector< double > _vlifetime
 
std::vector< double > _vm
 
std::vector< int > _vmother1
 
std::vector< int > _vmother2
 
std::vector< int > _vnparticles
 
std::vector< int > _vnpLO
 
std::vector< int > _vnpNLO
 
std::vector< int > _vpid
 
std::vector< double > _vpx
 
std::vector< double > _vpy
 
std::vector< double > _vpz
 
std::vector< double > _vrscale
 
std::vector< double > _vscale
 
std::vector< double > _vspin
 
std::vector< size_t > _vstart
 
std::vector< int > _vstatus
 
std::vector< size_t > _vtrials
 
std::vector< double > _vweight
 

Detailed Description

Definition at line 43 of file lheh5.h.

Member Function Documentation

std::vector< Particle > lheh5::Events::mkEvent ( size_t  ievent) const

Definition at line 35 of file lheh5.cc.

References _particle_offset, _vend, _vstart, gpuClustering::id, and mkParticle().

Referenced by lhef::H5Handler::getEvent(), and lhef::H5Handler::getEventProperties().

35  {
36  std::vector<Particle> _E;
37  // NOTE we need to subtract the particle offset here as the
38  // particle properties run from 0 and not the global index when using batches
39  for (size_t id = _vstart[ievent] - _particle_offset; id < _vend[ievent] - _particle_offset; ++id) {
40  _E.push_back(mkParticle(id));
41  }
42 
43  // Make sure beam particles are ordered according to convention i.e. first particle has positive z-momentum
44  if (_E[0].pz < 0) {
45  std::swap<Particle>(_E[0], _E[1]);
46  }
47 
48  return _E;
49  }
uint16_t *__restrict__ id
std::vector< size_t > _vstart
Definition: lheh5.h:45
std::vector< size_t > _vend
Definition: lheh5.h:46
size_t _particle_offset
Definition: lheh5.h:73
Particle mkParticle(size_t idx) const
Definition: lheh5.cc:19
EventHeader lheh5::Events::mkEventHeader ( int  ievent) const

Definition at line 51 of file lheh5.cc.

References _vaqcd, _vaqed, _vfscale, _vnparticles, _vnpLO, _vnpNLO, _vpid, _vrscale, _vscale, _vtrials, _vweight, and iev.

Referenced by lhef::H5Handler::getEventProperties(), and lhef::H5Handler::getHeader().

51  {
52  return {
54  _vpid[iev],
55  _vweight[iev],
56  _vtrials[iev],
57  _vscale[iev],
58  _vrscale[iev],
59  _vfscale[iev],
60  _vaqed[iev],
61  _vaqcd[iev],
62  _vnpLO[iev],
63  _vnpNLO[iev],
64  };
65  }
std::vector< double > _vaqcd
Definition: lheh5.h:70
std::vector< double > _vweight
Definition: lheh5.h:64
std::vector< double > _vaqed
Definition: lheh5.h:69
std::vector< int > _vnpNLO
Definition: lheh5.h:72
std::vector< int > _vnpLO
Definition: lheh5.h:71
std::vector< int > _vnparticles
Definition: lheh5.h:62
std::vector< int > _vpid
Definition: lheh5.h:63
std::vector< size_t > _vtrials
Definition: lheh5.h:65
std::vector< double > _vfscale
Definition: lheh5.h:68
std::vector< double > _vrscale
Definition: lheh5.h:67
std::vector< double > _vscale
Definition: lheh5.h:66
HitContainer const *__restrict__ TkSoA const *__restrict__ Quality const *__restrict__ CAHitNtupletGeneratorKernelsGPU::HitToTuple const *__restrict__ int32_t int iev
Particle lheh5::Events::mkParticle ( size_t  idx) const

Definition at line 19 of file lheh5.cc.

References _vcolor1, _vcolor2, _ve, _vid, _vlifetime, _vm, _vmother1, _vmother2, _vpx, _vpy, _vpz, _vspin, and _vstatus.

Referenced by mkEvent().

19  {
20  return {_vid[idx],
21  _vstatus[idx],
22  _vmother1[idx],
23  _vmother2[idx],
24  _vcolor1[idx],
25  _vcolor2[idx],
26  _vpx[idx],
27  _vpy[idx],
28  _vpz[idx],
29  _ve[idx],
30  _vm[idx],
31  _vlifetime[idx],
32  _vspin[idx]};
33  }
std::vector< double > _vpx
Definition: lheh5.h:54
std::vector< double > _vpy
Definition: lheh5.h:55
std::vector< double > _vlifetime
Definition: lheh5.h:59
std::vector< int > _vcolor2
Definition: lheh5.h:53
std::vector< int > _vcolor1
Definition: lheh5.h:52
std::vector< int > _vmother2
Definition: lheh5.h:51
std::vector< double > _vm
Definition: lheh5.h:58
std::vector< double > _vpz
Definition: lheh5.h:56
std::vector< double > _vspin
Definition: lheh5.h:60
std::vector< int > _vstatus
Definition: lheh5.h:49
std::vector< double > _ve
Definition: lheh5.h:57
std::vector< int > _vid
Definition: lheh5.h:48
std::vector< int > _vmother1
Definition: lheh5.h:50

Member Data Documentation

size_t lheh5::Events::_particle_offset

Definition at line 73 of file lheh5.h.

Referenced by mkEvent().

std::vector<double> lheh5::Events::_vaqcd

Definition at line 70 of file lheh5.h.

Referenced by mkEventHeader().

std::vector<double> lheh5::Events::_vaqed

Definition at line 69 of file lheh5.h.

Referenced by mkEventHeader().

std::vector<int> lheh5::Events::_vcolor1

Definition at line 52 of file lheh5.h.

Referenced by mkParticle().

std::vector<int> lheh5::Events::_vcolor2

Definition at line 53 of file lheh5.h.

Referenced by mkParticle().

std::vector<double> lheh5::Events::_ve

Definition at line 57 of file lheh5.h.

Referenced by mkParticle().

std::vector<size_t> lheh5::Events::_vend

Definition at line 46 of file lheh5.h.

Referenced by mkEvent().

std::vector<double> lheh5::Events::_vfscale

Definition at line 68 of file lheh5.h.

Referenced by mkEventHeader().

std::vector<int> lheh5::Events::_vid

Definition at line 48 of file lheh5.h.

Referenced by mkParticle().

std::vector<double> lheh5::Events::_vlifetime

Definition at line 59 of file lheh5.h.

Referenced by mkParticle().

std::vector<double> lheh5::Events::_vm

Definition at line 58 of file lheh5.h.

Referenced by mkParticle().

std::vector<int> lheh5::Events::_vmother1

Definition at line 50 of file lheh5.h.

Referenced by mkParticle().

std::vector<int> lheh5::Events::_vmother2

Definition at line 51 of file lheh5.h.

Referenced by mkParticle().

std::vector<int> lheh5::Events::_vnparticles

Definition at line 62 of file lheh5.h.

Referenced by mkEventHeader().

std::vector<int> lheh5::Events::_vnpLO

Definition at line 71 of file lheh5.h.

Referenced by mkEventHeader().

std::vector<int> lheh5::Events::_vnpNLO

Definition at line 72 of file lheh5.h.

Referenced by mkEventHeader().

std::vector<int> lheh5::Events::_vpid

Definition at line 63 of file lheh5.h.

Referenced by mkEventHeader().

std::vector<double> lheh5::Events::_vpx

Definition at line 54 of file lheh5.h.

Referenced by mkParticle().

std::vector<double> lheh5::Events::_vpy

Definition at line 55 of file lheh5.h.

Referenced by mkParticle().

std::vector<double> lheh5::Events::_vpz

Definition at line 56 of file lheh5.h.

Referenced by mkParticle().

std::vector<double> lheh5::Events::_vrscale

Definition at line 67 of file lheh5.h.

Referenced by mkEventHeader().

std::vector<double> lheh5::Events::_vscale

Definition at line 66 of file lheh5.h.

Referenced by mkEventHeader().

std::vector<double> lheh5::Events::_vspin

Definition at line 60 of file lheh5.h.

Referenced by mkParticle().

std::vector<size_t> lheh5::Events::_vstart

Definition at line 45 of file lheh5.h.

Referenced by mkEvent().

std::vector<int> lheh5::Events::_vstatus

Definition at line 49 of file lheh5.h.

Referenced by mkParticle().

std::vector<size_t> lheh5::Events::_vtrials

Definition at line 65 of file lheh5.h.

Referenced by mkEventHeader().

std::vector<double> lheh5::Events::_vweight

Definition at line 64 of file lheh5.h.

Referenced by mkEventHeader().