Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
SoftParticlization.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file SoftParticlization.cc
1
/*******************************************************************************
2
* Copyright (c) The JETSCAPE Collaboration, 2018
3
*
4
* Modular, task-based framework for simulating all aspects of heavy-ion collisions
5
*
6
* For the list of contributors see AUTHORS.
7
*
8
* Report issues at https://github.com/JETSCAPE/JETSCAPE/issues
9
*
10
* or via email to bugs.jetscape@gmail.com
11
*
12
* Distributed under the GNU General Public License 3.0 (GPLv3 or later).
13
* See COPYING for details.
14
******************************************************************************/
15
// -----------------------------------------
16
// JETSCPAE module for soft particlization
17
// This module will generate Monte-Carlo samples for soft hadrons
18
// -----------------------------------------
19
20
#include "
SoftParticlization.h
"
21
22
namespace
Jetscape {
23
24
SoftParticlization::SoftParticlization
() {
boost_invariance
=
false
; }
25
26
SoftParticlization::~SoftParticlization
() {
27
for
(
unsigned
i
= 0;
i
<
Hadron_list_
.size();
i
++) {
28
Hadron_list_
.at(
i
).clear();
29
}
30
Hadron_list_
.clear();
31
}
32
33
void
SoftParticlization::Init
() {
34
JetScapeModuleBase::Init
();
35
JSINFO
<<
"Initialize Soft particlization module ... "
<<
GetId
() <<
" ..."
;
36
37
boost_invariance
=
check_boost_invariance
();
38
39
JSINFO
<<
"boost invariance: "
<<
boost_invariance
;
40
41
InitTask
();
42
}
43
44
void
SoftParticlization::Exec
() {}
45
46
void
SoftParticlization::Clear
() {
47
for
(
unsigned
i
= 0;
i
<
Hadron_list_
.size();
i
++) {
48
Hadron_list_
.at(
i
).clear();
49
}
50
Hadron_list_
.clear();
51
}
52
53
bool
SoftParticlization::check_boost_invariance
() {
54
bool
boost_invariance_flag =
false
;
55
double
grid_max_z =
GetXMLElementDouble
({
"IS"
,
"grid_max_z"
});
56
double
grid_step_z =
GetXMLElementDouble
({
"IS"
,
"grid_step_z"
});
57
int
nz
=
static_cast<
int
>
(2. * grid_max_z / grid_step_z);
58
if
(nz <= 1) {
59
boost_invariance_flag =
true
;
60
}
61
return
(boost_invariance_flag);
62
}
63
64
}
// end namespace Jetscape
JETSCAPE
blob
main
src
framework
SoftParticlization.cc
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:25
using
1.8.2 with
sPHENIX GitHub integration