SLIC
6.1.1
Simulation for the Linear Collider (SLIC) - Geant4 simulation application
src
LHEEvent.cc
Go to the documentation of this file.
1
#include "
LHEEvent.hh
"
2
3
// Geant4
4
#include "globals.hh"
5
6
// STL
7
#include <iostream>
8
#include <sstream>
9
#include <stdexcept>
10
11
namespace
slic
{
12
13
LHEEvent::LHEEvent
(std::string& line) {
14
15
std::istringstream iss(line);
16
std::vector<std::string> tokens;
17
do
{
18
std::string elem;
19
iss >> elem;
20
if
(elem.size() != 0) {
21
tokens.push_back(elem);
22
}
23
}
while
(iss);
24
25
if
(tokens.size() != 6) {
26
std::cerr <<
"ERROR: Bad event information record in LHE file ..."
<<
std::endl
;
27
std::cerr <<
" "
<< line <<
std::endl
;
28
G4Exception(
"LHEEvent::LHEEvent"
,
"LHEEventError"
, FatalException,
"Wrong number of tokens in LHE event information record."
);
29
}
30
31
nup_
= atoi(tokens[0].c_str());
32
idprup_
= atoi(tokens[1].c_str());
33
xwgtup_
= atof(tokens[2].c_str());
34
scalup_
= atof(tokens[3].c_str());
35
aqedup_
= atof(tokens[4].c_str());
36
aqcdup_
= atof(tokens[5].c_str());
37
}
38
39
LHEEvent::~LHEEvent
() {
40
for
(std::vector<LHEParticle*>::iterator it =
particles_
.begin(); it !=
particles_
.end(); it++) {
41
delete
(*it);
42
}
43
particles_
.clear();
44
}
45
46
int
LHEEvent::getNUP
() {
47
return
nup_
;
48
}
49
50
int
LHEEvent::getIDPRUP
() {
51
return
idprup_
;
52
}
53
54
double
LHEEvent::getXWGTUP
() {
55
return
xwgtup_
;
56
}
57
58
double
LHEEvent::getSCALUP
() {
59
return
scalup_
;
60
}
61
62
double
LHEEvent::getAQEDUP
() {
63
return
aqedup_
;
64
}
65
66
double
LHEEvent::getAQCDUP
() {
67
return
aqcdup_
;
68
}
69
70
void
LHEEvent::addParticle
(
LHEParticle
* particle) {
71
particles_
.push_back(particle);
72
}
73
74
const
std::vector<LHEParticle*>&
LHEEvent::getParticles
() {
75
return
particles_
;
76
}
77
78
}
LHEEvent.hh
slic::LHEEvent::aqcdup_
double aqcdup_
Definition:
LHEEvent.hh:119
slic::LHEEvent::LHEEvent
LHEEvent(std::string &data)
Definition:
LHEEvent.cc:13
slic::LHEEvent::getXWGTUP
double getXWGTUP()
Definition:
LHEEvent.cc:54
slic::LHEEvent::getNUP
int getNUP()
Definition:
LHEEvent.cc:46
slic::LHEEvent::getAQCDUP
double getAQCDUP()
Definition:
LHEEvent.cc:66
slic::LHEEvent::aqedup_
double aqedup_
Definition:
LHEEvent.hh:114
slic::LHEEvent::nup_
int nup_
Definition:
LHEEvent.hh:94
slic::LHEEvent::particles_
std::vector< LHEParticle * > particles_
Definition:
LHEEvent.hh:124
slic::LHEEvent::getSCALUP
double getSCALUP()
Definition:
LHEEvent.cc:58
slic::LHEEvent::idprup_
int idprup_
Definition:
LHEEvent.hh:99
slic::LHEEvent::xwgtup_
double xwgtup_
Definition:
LHEEvent.hh:104
slic::LHEEvent::addParticle
void addParticle(LHEParticle *particle)
Definition:
LHEEvent.cc:70
slic::LHEEvent::~LHEEvent
virtual ~LHEEvent()
Definition:
LHEEvent.cc:39
slic::LHEEvent::getParticles
const std::vector< LHEParticle * > & getParticles()
Definition:
LHEEvent.cc:74
slic::LHEEvent::getAQEDUP
double getAQEDUP()
Definition:
LHEEvent.cc:62
slic::LHEEvent::getIDPRUP
int getIDPRUP()
Definition:
LHEEvent.cc:50
slic::LHEEvent::scalup_
double scalup_
Definition:
LHEEvent.hh:109
slic::LHEParticle
Single particle record in an LHE event.
Definition:
LHEParticle.hh:20
LOG::endl
@ endl
Definition:
LogStream.hh:26
slic
Definition:
CommandLineOption.hh:9
Generated by
1.9.1