Skip to content

Commit

Permalink
Merge pull request #32 from JETSCAPE/XSCAPE-1.1.3-RC
Browse files Browse the repository at this point in the history
Xscape 1.1.3 rc
  • Loading branch information
latessa authored Jun 6, 2024
2 parents de2dfc9 + a920082 commit ae88dc2
Show file tree
Hide file tree
Showing 41 changed files with 1,971 additions and 60 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/plot_observables.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- main
- XSCAPE-1.1.2-RC
- XSCAPE-1.1.3-RC

env:
PULL_NUMBER: ${{ github.event.number }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/smash_test_completes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ on:
pull_request:
branches:
- main
- XSCAPE-1.1.2-RC
- XSCAPE-1.1.3-RC

push:
branches:
- main
- XSCAPE-1.1.2-RC
- XSCAPE-1.1.3-RC

env:
REPO_NAME: ${{ github.event.repository.name }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-build-external.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ on:
pull_request:
branches:
- main
- XSCAPE-1.1.2-RC
- XSCAPE-1.1.3-RC

push:
branches:
- main
- XSCAPE-1.1.2-RC
- XSCAPE-1.1.3-RC

env:
REPO_NAME: ${{ github.event.repository.name }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-events-PbPb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ on:
pull_request:
branches:
- main
- XSCAPE-1.1.2-RC
- XSCAPE-1.1.3-RC

push:
branches:
- main
- XSCAPE-1.1.2-RC
- XSCAPE-1.1.3-RC

env:
REPO_NAME: ${{ github.event.repository.name }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-events-Pythia-Isr-Dat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ on:
pull_request:
branches:
- main
- XSCAPE-1.1.2-RC
- XSCAPE-1.1.3-RC

push:
branches:
- main
- XSCAPE-1.1.2-RC
- XSCAPE-1.1.3-RC

env:
REPO_NAME: ${{ github.event.repository.name }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-events-Pythia-Isr-Hadron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ on:
pull_request:
branches:
- main
- XSCAPE-1.1.2-RC
- XSCAPE-1.1.3-RC

push:
branches:
- main
- XSCAPE-1.1.2-RC
- XSCAPE-1.1.3-RC

env:
REPO_NAME: ${{ github.event.repository.name }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-events-Pythia-Isr-Parton.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ on:
pull_request:
branches:
- main
- XSCAPE-1.1.2-RC
- XSCAPE-1.1.3-RC

push:
branches:
- main
- XSCAPE-1.1.2-RC
- XSCAPE-1.1.3-RC

env:
REPO_NAME: ${{ github.event.repository.name }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-events-brick.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ on:
pull_request:
branches:
- main
- XSCAPE-1.1.2-RC
- XSCAPE-1.1.3-RC
- brick_matter_lbt

push:
branches:
- main
- XSCAPE-1.1.2-RC
- XSCAPE-1.1.3-RC
- brick_matter_lbt

env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-events-pp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ on:
pull_request:
branches:
- main
- XSCAPE-1.1.2-RC
- XSCAPE-1.1.3-RC

push:
branches:
- main
- XSCAPE-1.1.2-RC
- XSCAPE-1.1.3-RC

env:
REPO_NAME: ${{ github.event.repository.name }}
Expand Down
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# X-SCAPE 1.1.2
# X-SCAPE 1.1.3

The X-ion collisions with a Statistically and Computationally Advanced Program Envelope (X-SCAPE) is the enhanced (and 2nd) project of the JETSCAPE
collaboration which extends the framework to include small systems created in p-A and p-p collisions, lower energy heavy-ion collisions and electron-Ion collisions.
Expand Down Expand Up @@ -75,16 +75,14 @@ An example reading an ascii output file is provided:
./build/readerTest
```

which reads in the generated showers does some DFS search and shows the output. You can generate an output graph format which can be easily visualized using graphViz or other tools like Gephi (GUI for free for Mac) or more advanced, graph-tools (Python) and many more. Furthermore, as a "closure" test, the FastJet core package (compiled in our JetScape library) is used to perform a simple jetfinding (on the "final" partons, in graph language, incoming partons in a vertex with no outgoing partons/childs), and since the "shower" is perfectly collinear the jet pT is identical to the hard process parton pT (modulo some random new partons/roots in the final state, see above).
which reads in the generated showers does some DFS search and shows the output. You can generate an output graph format which can be easily visualized using graphViz or other tools like Gephi (GUI for free for Mac) or more advanced, graph-tools (Python) and many more. Furthermore, as a "closure" test, the FastJet core package (compiled in our JetScape library) is used to perform a simple jetfinding (on the "final" partons, in graph language, incoming partons in a vertex with no outgoing partons/childs), and since the "shower" is perfectly collinear the jet pT is identical to the hard process parton pT (modulo some random new partons/roots in the final state, see above).

## JETSCAPE Tunes

Currently, there exists a pp tune [PP19](https://arxiv.org/abs/1910.05481), which can be run by:
```bash
./runJetscape ../config/jetscape_user_PP19.xml
```
There are several JETSCAPE tunes from publications available.
The XML files to reproduce the results are available in the `config/publications_config` directory.
Please see [JETSCAPE Tunes](config/publications_config/README.md) for more information.

Tuning of Pb-Pb is ongoing.
Several example hydro profiles can be downloaded using `examples/get_hydroSample*`.

## X-SCAPE modules (New)
Expand Down Expand Up @@ -243,7 +241,6 @@ More material on the physics behind JETSCAPE and how to use it can be found in t
## Troubleshooting

If you encounter a problem, please report the issue [here](https://github.com/JETSCAPE/JETSCAPE/issues).
Please be sure to include enough information so that we can reproduce your issue: your platform, JETSCAPE version, configuration file, and anything else that may be relevant.

# Contributing

Expand Down
18 changes: 17 additions & 1 deletion config/jetscape_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@
<JetScapeWriterRootHepMC> off </JetScapeWriterRootHepMC>
<JetScapeWriterFinalStatePartonsAscii> off </JetScapeWriterFinalStatePartonsAscii>
<JetScapeWriterFinalStateHadronsAscii> off </JetScapeWriterFinalStateHadronsAscii>
<JetScapeWriterQnVectorAscii>off</JetScapeWriterQnVectorAscii>
<QnVector_pTmin>0</QnVector_pTmin>
<QnVector_pTmax>6</QnVector_pTmax>
<QnVector_NpT>30</QnVector_NpT>
<QnVector_rapmin>-4</QnVector_rapmin>
<QnVector_rapmax>4</QnVector_rapmax>
<QnVector_Nrap>80</QnVector_Nrap>
<QnVector_Norder>7</QnVector_Norder>
<write_pthat> 0 </write_pthat>

<!-- Random Settings. For now, just a global seed. -->
Expand Down Expand Up @@ -151,7 +159,8 @@
<matter_on> 1 </matter_on>
<Q0> 2.0 </Q0>
<T0> 0.16 </T0>
<!--if negative vir_factor: parton 3-momentum of hard parton is used to compute initial virtuality in shower; if positive: transverse momentum of parton is used-->
<!--if initial_virtuality_pT == 1: pT of hard parton is used to compute initial virtuality in shower, initial_virtuality_pT == 0: use parton 3-momentum-->
<initial_virtuality_pT> 1 </initial_virtuality_pT>
<vir_factor> 0.25 </vir_factor>
<in_vac> 1 </in_vac>
<recoil_on> 0 </recoil_on>
Expand Down Expand Up @@ -236,6 +245,10 @@

<!-- Create liquifier -->
<Liquefier>
<!--threshold_energy_switch = 1, use e_threshold; threshold_energy_switch = 0, use |e_threshold|*T-->
<threshold_energy_switch>1</threshold_energy_switch>
<e_threshold>2.0</e_threshold>

<!-- CausalLiquefier -->
<CausalLiquefier>
<name>CausalLiquefier</name>
Expand Down Expand Up @@ -412,6 +425,9 @@
<!-- hadron species list 0: PDG 2005; 1: UrQMD; 2: SMASH -->
<afterburner_type>1</afterburner_type>

<include_deltaf_shear>1</include_deltaf_shear>
<include_deltaf_bulk>1</include_deltaf_bulk>
<deltaf_type>20</deltaf_type>
<number_of_repeated_sampling>1</number_of_repeated_sampling>
<Perform_resonance_decays>1</Perform_resonance_decays>
</iSS>
Expand Down
24 changes: 24 additions & 0 deletions config/publications_config/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# JETSCAPE Tunes

Currently, the following tunes are available:

- PP [arXiv:1910.05481](https://arxiv.org/abs/1910.05481)

- AA (soft) [arXiv:2011.01430](https://arxiv.org/pdf/2011.01430)

- AA (hard) [arXiv:2204.01163](https://arxiv.org/pdf/2204.01163)

The different tunes can be run by:
```
./runJetscape ../config/publications_config/arXiv_number/jetscape_user_system_arXiv.xml
```


## Instructions for adding XML files

When a new JETSCAPE paper is published, please add the XML file(s) to `publications_config/arXiv_#` and name the corresponding XML files similar to this one from the PP tune: `jetscape_user_PP_1910.05481.xml`.
Specify the system (PP, AA, PA, ...) and put the arXiv number in the name.

If there is more information needed to reproduce the results an additional `README.md` file can be placed in the directory for the publication.

When XML files are added to the repository, an entry should be added in this file.
File renamed without changes.
8 changes: 8 additions & 0 deletions config/publications_config/arXiv_2011.01430/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# arXiv:2011.01430

The `jetscape_user_AA_2011.01430.xml` file contains one specific parameter set
from the runs in [arXiv:2011.01430](https://arxiv.org/pdf/2011.01430).
See table II in there, which summarizes the MAP parameters for the different runs.

The `cross-section` parameter for Trento has to be 4.2 for 200 GeV and 6.4 for
the 2.76 TeV run.
File renamed without changes.
3 changes: 3 additions & 0 deletions config/publications_config/arXiv_2204.01163/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# arXiv:2102.11337

This XML file requires pre calculated hydro evolutions from file.
File renamed without changes.
7 changes: 3 additions & 4 deletions external_packages/get_smash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ cd smash/smash_code
mkdir build
cd build
cmake .. -DPythia_CONFIG_EXECUTABLE=${PYTHIA8DIR}/bin/pythia8-config
number_of_cores=`nproc --all`
number_of_cores_to_compile=$(( ${number_of_cores} > 20 ? 20 : ${number_of_cores} ))
echo "Compiling SMASH using ${number_of_cores_to_compile} cores."
make -j${number_of_cores} smash_shared
num_cores=${1:-1}
echo "Compiling SMASH using ${num_cores} cores."
make -j${num_cores} smash_shared
13 changes: 13 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,19 @@ set (SOURCES ${SOURCES} ${frameworksources} )
# list (REMOVE_ITEM SOURCES ${CMAKE_SOURCE_DIR}/src/framework/JetScapeWriterAsciiGZ.cc)
# endif()

# Include the endian test
include(TestBigEndian)
test_big_endian(IS_BIG_ENDIAN)

# Add endian-specific definitions based on the test result
if(IS_BIG_ENDIAN)
message(STATUS "Big endian architecture detected.")
add_definitions(-DBIG_ENDIAN_ARCHITECTURE)
else()
message(STATUS "Little endian architecture detected.")
add_definitions(-DLITTLE_ENDIAN_ARCHITECTURE)
endif()

if(NOT "${HEPMC_FOUND}")
list (REMOVE_ITEM SOURCES ${CMAKE_SOURCE_DIR}/src/framework/JetScapeWriterHepMC.cc)
endif()
Expand Down
3 changes: 3 additions & 0 deletions src/framework/JetScape.cc
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,7 @@ void JetScape::DetermineWritersFromXML() {
std::string outputFilenameRootHepMC = outputFilename;
std::string outputFilenameFinalStatePartonsAscii = outputFilename;
std::string outputFilenameFinalStateHadronsAscii = outputFilename;
std::string outputFilenameQnVectorAscii = outputFilename;

// Check if each writer is enabled, and if so add it to the task list
CheckForWriterFromXML("JetScapeWriterAscii",
Expand All @@ -817,6 +818,8 @@ void JetScape::DetermineWritersFromXML() {
outputFilenameFinalStatePartonsAscii.append("_final_state_partons.dat"));
CheckForWriterFromXML("JetScapeWriterFinalStateHadronsAscii",
outputFilenameFinalStateHadronsAscii.append("_final_state_hadrons.dat"));
CheckForWriterFromXML("JetScapeWriterQnVectorAscii",
outputFilenameQnVectorAscii.append("_QnVector.dat"));

// Check for custom writers
tinyxml2::XMLElement *element =
Expand Down
1 change: 0 additions & 1 deletion src/framework/JetScapeModuleBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,6 @@ class RegisterJetScapeModule : public JetScapeModuleFactory {
public:
/// Registers the name of the module to map to a function that can create the module
RegisterJetScapeModule(std::string const &s) {
//std::cout << "Registering " << s << " to the map" << std::endl;
getMap()->insert(std::make_pair(s, &createT<T>));
}
};
Expand Down
78 changes: 78 additions & 0 deletions src/framework/JetScapeParticles.cc
Original file line number Diff line number Diff line change
Expand Up @@ -551,4 +551,82 @@ Photon &Photon::operator=(const Photon &ph) {
return *this;
}

// ---------------
// Qvector (soft particles)
// ---------------

Qvector::Qvector(double pt_min, double pt_max, int npt, double y_min, double y_max, int ny, int norder, int pid, int rapidity_type): pt_min_(pt_min), pt_max_(pt_max), npt_(npt), y_min_(y_min), y_max_(y_max), ny_(ny), ncols_(norder*4+3),norder_(norder), pid_(pid), rapidity_type_(rapidity_type) {
dpt_ = (pt_max - pt_min) / npt ;
dy_ = (y_max - y_min) / ny ;
hist_.resize(npt, std::vector<std::vector<double>>(ny, std::vector<double>(ncols_, 0.0)));
gridpT_.reserve(npt);
gridy_.reserve(ny);
total_num_ = 0;

for (int i = 0; i < npt; ++i) {
gridpT_.push_back(pt_min_ + (i+0.5) * dpt_);
}

for (int i = 0; i < ny; ++i) {
gridy_.push_back(y_min_ + (i+0.5)* dy_);
}
}

void Qvector::fill(double pt_in, double y_in, int col_in, double val) {
int idx = static_cast<int>(floor((pt_in - pt_min_) / dpt_));
int idy = static_cast<int>(floor((y_in - y_min_) / dy_));
if (idx >= 0 && idx < npt_ && idy >= 0 && idy < ny_ && col_in >= 0 && col_in < ncols_) {
hist_[idx][idy][col_in] += val;
if (col_in == 5) total_num_++;
} else {
//std::cerr << "Out of bounds in Qn vector" << std::endl;
}
}

void Qvector::fill_particle(const shared_ptr<Hadron>& h){
double phi= h->phi();
double pT = h->perp();
double y = h->eta();
if(rapidity_type_) y = h->rap();
double Et = h->Et();

fill(pT,y,0,pT);
fill(pT,y,1,pT*pT);
fill(pT,y,2,y);
fill(pT,y,3,y*y);
fill(pT,y,4,Et);

fill(pT,y,5,1);
fill(pT,y,6,1*1);



for(int iorder=1 ; iorder<norder_ ; iorder++){
fill(pT, y, 4*iorder + 3, cos(iorder*phi));
fill(pT, y, 4*iorder + 4, sin(iorder*phi));
fill(pT, y, 4*iorder + 5, cos(iorder*phi)*cos(iorder*phi));
fill(pT, y, 4*iorder + 6, sin(iorder*phi)*sin(iorder*phi));
}
}

double Qvector::get_pt(int idx) const {
if (idx < 0 || idx >= npt_) {
std::cerr << "Index out of bounds in pt array of Qvector" << std::endl;
return -1;
}
return gridpT_[idx];
}

double Qvector::get_y(int idx) const {
if (idx < 0 || idx >= ny_) {
std::cerr << "Index out of bounds in y array of Qvector" << std::endl;
return -1;
}
return gridy_[idx];
}

void Qvector::set_header(std::string a){
header_ = a;
}

} // namespace Jetscape
Loading

0 comments on commit ae88dc2

Please sign in to comment.