Analysis Software
Documentation for sPHENIX simulation software
 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 
25 
27  for (unsigned i = 0; i < Hadron_list_.size(); i++) {
28  Hadron_list_.at(i).clear();
29  }
30  Hadron_list_.clear();
31 }
32 
35  JSINFO << "Initialize Soft particlization module ... " << GetId() << " ...";
36 
38 
39  JSINFO << "boost invariance: " << boost_invariance;
40 
41  InitTask();
42 }
43 
45 
47  for (unsigned i = 0; i < Hadron_list_.size(); i++) {
48  Hadron_list_.at(i).clear();
49  }
50  Hadron_list_.clear();
51 }
52 
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