File indexing completed on 2025-08-05 08:19:20
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 #include "SoftParticlization.h"
0021
0022 namespace Jetscape {
0023
0024 SoftParticlization::SoftParticlization() { boost_invariance = false; }
0025
0026 SoftParticlization::~SoftParticlization() {
0027 for (unsigned i = 0; i < Hadron_list_.size(); i++) {
0028 Hadron_list_.at(i).clear();
0029 }
0030 Hadron_list_.clear();
0031 }
0032
0033 void SoftParticlization::Init() {
0034 JetScapeModuleBase::Init();
0035 JSINFO << "Initialize Soft particlization module ... " << GetId() << " ...";
0036
0037 boost_invariance = check_boost_invariance();
0038
0039 JSINFO << "boost invariance: " << boost_invariance;
0040
0041 InitTask();
0042 }
0043
0044 void SoftParticlization::Exec() {}
0045
0046 void SoftParticlization::Clear() {
0047 for (unsigned i = 0; i < Hadron_list_.size(); i++) {
0048 Hadron_list_.at(i).clear();
0049 }
0050 Hadron_list_.clear();
0051 }
0052
0053 bool SoftParticlization::check_boost_invariance() {
0054 bool boost_invariance_flag = false;
0055 double grid_max_z = GetXMLElementDouble({"IS", "grid_max_z"});
0056 double grid_step_z = GetXMLElementDouble({"IS", "grid_step_z"});
0057 int nz = static_cast<int>(2. * grid_max_z / grid_step_z);
0058 if (nz <= 1) {
0059 boost_invariance_flag = true;
0060 }
0061 return (boost_invariance_flag);
0062 }
0063
0064 }