CMS 3D CMS Logo

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

◆ mkEvent()

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

Definition at line 35 of file lheh5.cc.

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  }

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

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

◆ mkEventHeader()

EventHeader lheh5::Events::mkEventHeader ( int  ievent) const

Definition at line 51 of file lheh5.cc.

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  }

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

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

◆ mkParticle()

Particle lheh5::Events::mkParticle ( size_t  idx) const

Definition at line 19 of file lheh5.cc.

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  }

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

Referenced by mkEvent().

Member Data Documentation

◆ _particle_offset

size_t lheh5::Events::_particle_offset

Definition at line 73 of file lheh5.h.

Referenced by mkEvent().

◆ _vaqcd

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

Definition at line 70 of file lheh5.h.

Referenced by mkEventHeader().

◆ _vaqed

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

Definition at line 69 of file lheh5.h.

Referenced by mkEventHeader().

◆ _vcolor1

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

Definition at line 52 of file lheh5.h.

Referenced by mkParticle().

◆ _vcolor2

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

Definition at line 53 of file lheh5.h.

Referenced by mkParticle().

◆ _ve

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

Definition at line 57 of file lheh5.h.

Referenced by mkParticle().

◆ _vend

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

Definition at line 46 of file lheh5.h.

Referenced by mkEvent().

◆ _vfscale

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

Definition at line 68 of file lheh5.h.

Referenced by mkEventHeader().

◆ _vid

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

Definition at line 48 of file lheh5.h.

Referenced by mkParticle().

◆ _vlifetime

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

Definition at line 59 of file lheh5.h.

Referenced by mkParticle().

◆ _vm

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

Definition at line 58 of file lheh5.h.

Referenced by mkParticle().

◆ _vmother1

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

Definition at line 50 of file lheh5.h.

Referenced by mkParticle().

◆ _vmother2

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

Definition at line 51 of file lheh5.h.

Referenced by mkParticle().

◆ _vnparticles

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

Definition at line 62 of file lheh5.h.

Referenced by mkEventHeader().

◆ _vnpLO

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

Definition at line 71 of file lheh5.h.

Referenced by mkEventHeader().

◆ _vnpNLO

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

Definition at line 72 of file lheh5.h.

Referenced by mkEventHeader().

◆ _vpid

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

Definition at line 63 of file lheh5.h.

Referenced by mkEventHeader().

◆ _vpx

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

Definition at line 54 of file lheh5.h.

Referenced by mkParticle().

◆ _vpy

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

Definition at line 55 of file lheh5.h.

Referenced by mkParticle().

◆ _vpz

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

Definition at line 56 of file lheh5.h.

Referenced by mkParticle().

◆ _vrscale

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

Definition at line 67 of file lheh5.h.

Referenced by mkEventHeader().

◆ _vscale

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

Definition at line 66 of file lheh5.h.

Referenced by mkEventHeader().

◆ _vspin

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

Definition at line 60 of file lheh5.h.

Referenced by mkParticle().

◆ _vstart

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

Definition at line 45 of file lheh5.h.

Referenced by mkEvent().

◆ _vstatus

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

Definition at line 49 of file lheh5.h.

Referenced by mkParticle().

◆ _vtrials

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

Definition at line 65 of file lheh5.h.

Referenced by mkEventHeader().

◆ _vweight

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

Definition at line 64 of file lheh5.h.

Referenced by mkEventHeader().

lheh5::Events::_vstatus
std::vector< int > _vstatus
Definition: lheh5.h:49
lheh5::Events::_vnpLO
std::vector< int > _vnpLO
Definition: lheh5.h:71
lheh5::Events::_ve
std::vector< double > _ve
Definition: lheh5.h:57
lheh5::Events::_vnparticles
std::vector< int > _vnparticles
Definition: lheh5.h:62
lheh5::Events::_vpid
std::vector< int > _vpid
Definition: lheh5.h:63
iev
const HitContainer *__restrict__ const TkSoA *__restrict__ const Quality *__restrict__ const CAHitNtupletGeneratorKernelsGPU::HitToTuple *__restrict__ int32_t int iev
Definition: CAHitNtupletGeneratorKernelsImpl.h:862
lheh5::Events::_particle_offset
size_t _particle_offset
Definition: lheh5.h:73
lheh5::Events::_vtrials
std::vector< size_t > _vtrials
Definition: lheh5.h:65
lheh5::Events::_vid
std::vector< int > _vid
Definition: lheh5.h:48
lheh5::Events::_vfscale
std::vector< double > _vfscale
Definition: lheh5.h:68
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
lheh5::Events::_vscale
std::vector< double > _vscale
Definition: lheh5.h:66
lheh5::Events::_vrscale
std::vector< double > _vrscale
Definition: lheh5.h:67
lheh5::Events::_vmother1
std::vector< int > _vmother1
Definition: lheh5.h:50
lheh5::Events::_vpx
std::vector< double > _vpx
Definition: lheh5.h:54
lheh5::Events::mkParticle
Particle mkParticle(size_t idx) const
Definition: lheh5.cc:19
lheh5::Events::_vpy
std::vector< double > _vpy
Definition: lheh5.h:55
lheh5::Events::_vstart
std::vector< size_t > _vstart
Definition: lheh5.h:45
lheh5::Events::_vcolor2
std::vector< int > _vcolor2
Definition: lheh5.h:53
lheh5::Events::_vaqcd
std::vector< double > _vaqcd
Definition: lheh5.h:70
lheh5::Events::_vlifetime
std::vector< double > _vlifetime
Definition: lheh5.h:59
lheh5::Events::_vmother2
std::vector< int > _vmother2
Definition: lheh5.h:51
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
lheh5::Events::_vcolor1
std::vector< int > _vcolor1
Definition: lheh5.h:52
lheh5::Events::_vaqed
std::vector< double > _vaqed
Definition: lheh5.h:69
lheh5::Events::_vend
std::vector< size_t > _vend
Definition: lheh5.h:46
lheh5::Events::_vnpNLO
std::vector< int > _vnpNLO
Definition: lheh5.h:72
lheh5::Events::_vm
std::vector< double > _vm
Definition: lheh5.h:58
lheh5::Events::_vspin
std::vector< double > _vspin
Definition: lheh5.h:60
lheh5::Events::_vweight
std::vector< double > _vweight
Definition: lheh5.h:64
lheh5::Events::_vpz
std::vector< double > _vpz
Definition: lheh5.h:56