CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
lheh5::Events2 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< 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 > _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
 
int npLO
 
int npNLO
 

Detailed Description

Definition at line 80 of file lheh5.h.

Member Function Documentation

◆ mkEvent()

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

Definition at line 213 of file lheh5.cc.

213  {
214  std::vector<Particle> _E;
215  // NOTE we need to subtract the particle offset here as the
216  // particle properties run from 0 and not the global index when using batches
217  size_t partno = _vstart[ievent] - _particle_offset;
218  for (int id = 0; id < _vnparticles[ievent]; ++id) {
219  _E.push_back(mkParticle(partno));
220  partno++;
221  }
222 
223  // Make sure beam particles are ordered according to convention i.e. first particle has positive z-momentum
224  if (_E[0].pz < 0) {
225  std::swap<Particle>(_E[0], _E[1]);
226  }
227 
228  return _E;
229  }

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

◆ mkEventHeader()

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

Definition at line 231 of file lheh5.cc.

231  {
232  return {
233  std::move(_vnparticles[iev]),
234  std::move(_vpid[iev]),
235  std::move(_vweight[iev]),
236  std::move(_vtrials[iev]),
237  std::move(_vscale[iev]),
238  std::move(_vrscale[iev]),
239  std::move(_vfscale[iev]),
240  std::move(_vaqed[iev]),
241  std::move(_vaqcd[iev]),
242  npLO,
243  npNLO,
244  };
245  }

References _vaqcd, _vaqed, _vfscale, _vnparticles, _vpid, _vrscale, _vscale, _vtrials, _vweight, eostools::move(), npLO, and npNLO.

◆ mkParticle()

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

Definition at line 197 of file lheh5.cc.

197  {
198  return {std::move(_vid[idx]),
204  std::move(_vpx[idx]),
205  std::move(_vpy[idx]),
206  std::move(_vpz[idx]),
207  std::move(_ve[idx]),
208  std::move(_vm[idx]),
210  std::move(_vspin[idx])};
211  }

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

Referenced by mkEvent().

Member Data Documentation

◆ _particle_offset

size_t lheh5::Events2::_particle_offset

Definition at line 109 of file lheh5.h.

Referenced by mkEvent().

◆ _vaqcd

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

Definition at line 106 of file lheh5.h.

Referenced by mkEventHeader().

◆ _vaqed

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

Definition at line 105 of file lheh5.h.

Referenced by mkEventHeader().

◆ _vcolor1

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

Definition at line 88 of file lheh5.h.

Referenced by mkParticle().

◆ _vcolor2

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

Definition at line 89 of file lheh5.h.

Referenced by mkParticle().

◆ _ve

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

Definition at line 93 of file lheh5.h.

Referenced by mkParticle().

◆ _vfscale

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

Definition at line 104 of file lheh5.h.

Referenced by mkEventHeader().

◆ _vid

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

Definition at line 84 of file lheh5.h.

Referenced by mkParticle().

◆ _vlifetime

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

Definition at line 95 of file lheh5.h.

Referenced by mkParticle().

◆ _vm

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

Definition at line 94 of file lheh5.h.

Referenced by mkParticle().

◆ _vmother1

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

Definition at line 86 of file lheh5.h.

Referenced by mkParticle().

◆ _vmother2

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

Definition at line 87 of file lheh5.h.

Referenced by mkParticle().

◆ _vnparticles

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

Definition at line 98 of file lheh5.h.

Referenced by mkEvent(), and mkEventHeader().

◆ _vpid

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

Definition at line 99 of file lheh5.h.

Referenced by mkEventHeader().

◆ _vpx

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

Definition at line 90 of file lheh5.h.

Referenced by mkParticle().

◆ _vpy

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

Definition at line 91 of file lheh5.h.

Referenced by mkParticle().

◆ _vpz

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

Definition at line 92 of file lheh5.h.

Referenced by mkParticle().

◆ _vrscale

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

Definition at line 103 of file lheh5.h.

Referenced by mkEventHeader().

◆ _vscale

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

Definition at line 102 of file lheh5.h.

Referenced by mkEventHeader().

◆ _vspin

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

Definition at line 96 of file lheh5.h.

Referenced by mkParticle().

◆ _vstart

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

Definition at line 82 of file lheh5.h.

Referenced by mkEvent().

◆ _vstatus

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

Definition at line 85 of file lheh5.h.

Referenced by mkParticle().

◆ _vtrials

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

Definition at line 101 of file lheh5.h.

Referenced by mkEventHeader().

◆ _vweight

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

Definition at line 100 of file lheh5.h.

Referenced by mkEventHeader().

◆ npLO

int lheh5::Events2::npLO

Definition at line 107 of file lheh5.h.

Referenced by mkEventHeader().

◆ npNLO

int lheh5::Events2::npNLO

Definition at line 108 of file lheh5.h.

Referenced by mkEventHeader().

lheh5::Events2::npNLO
int npNLO
Definition: lheh5.h:108
lheh5::Events2::_vtrials
std::vector< size_t > _vtrials
Definition: lheh5.h:101
lheh5::Events2::_vcolor1
std::vector< int > _vcolor1
Definition: lheh5.h:88
lheh5::Events2::_vpx
std::vector< double > _vpx
Definition: lheh5.h:90
lheh5::Events2::_vnparticles
std::vector< int > _vnparticles
Definition: lheh5.h:98
lheh5::Events2::_vaqcd
std::vector< double > _vaqcd
Definition: lheh5.h:106
lheh5::Events2::_vid
std::vector< int > _vid
Definition: lheh5.h:84
lheh5::Events2::_vweight
std::vector< double > _vweight
Definition: lheh5.h:100
lheh5::Events2::_particle_offset
size_t _particle_offset
Definition: lheh5.h:109
lheh5::Events2::_vlifetime
std::vector< double > _vlifetime
Definition: lheh5.h:95
lheh5::Events2::_vm
std::vector< double > _vm
Definition: lheh5.h:94
lheh5::Events2::mkParticle
Particle mkParticle(size_t idx) const
Definition: lheh5.cc:197
lheh5::Events2::_vscale
std::vector< double > _vscale
Definition: lheh5.h:102
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
lheh5::Events2::_vpy
std::vector< double > _vpy
Definition: lheh5.h:91
lheh5::Events2::_vspin
std::vector< double > _vspin
Definition: lheh5.h:96
lheh5::Events2::_vstart
std::vector< size_t > _vstart
Definition: lheh5.h:82
lheh5::Events2::npLO
int npLO
Definition: lheh5.h:107
lheh5::Events2::_vstatus
std::vector< int > _vstatus
Definition: lheh5.h:85
lheh5::Events2::_vmother2
std::vector< int > _vmother2
Definition: lheh5.h:87
lheh5::Events2::_ve
std::vector< double > _ve
Definition: lheh5.h:93
lheh5::Events2::_vfscale
std::vector< double > _vfscale
Definition: lheh5.h:104
lheh5::Events2::_vmother1
std::vector< int > _vmother1
Definition: lheh5.h:86
eostools.move
def move(src, dest)
Definition: eostools.py:511
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
lheh5::Events2::_vaqed
std::vector< double > _vaqed
Definition: lheh5.h:105
lheh5::Events2::_vcolor2
std::vector< int > _vcolor2
Definition: lheh5.h:89
lheh5::Events2::_vpid
std::vector< int > _vpid
Definition: lheh5.h:99
lheh5::Events2::_vpz
std::vector< double > _vpz
Definition: lheh5.h:92
lheh5::Events2::_vrscale
std::vector< double > _vrscale
Definition: lheh5.h:103