Skip to content

Commit 459af87

Browse files
jxi24claude
andcommitted
fix: Revert out-of-scope changes introduced during rebase
Restore all source, header, test, and config files to match main, removing duplicated code blocks caused by `git rebase -Xours`. Also removes .readthedocs.yaml and stale nuchic references. This branch should only contain documentation changes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 042a4cf commit 459af87

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+117
-1449
lines changed

.github/workflows/cmake.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -48,21 +48,6 @@ jobs:
4848
ln -fs /usr/local/bin/gfortran-14 /usr/local/bin/gfortran
4949
fi
5050
51-
- name: Install dependencies (MacOS)
52-
if: ${{ matrix.os == 'macos-13' || matrix.os == 'macos-14' }}
53-
run: |
54-
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
55-
brew update
56-
brew install hdf5
57-
brew install --force gcc
58-
os_ver=$(sw_vers -productVersion | cut -d'.' -f1)
59-
# TODO: remove hardcoded gfortran major version
60-
if (( "$os_ver" > 13)); then
61-
ln -fs /opt/homebrew/bin/gfortran-14 /usr/local/bin/gfortran
62-
else
63-
ln -fs /usr/local/bin/gfortran-14 /usr/local/bin/gfortran
64-
fi
65-
6651
- name: Set up cache
6752
id: cache-cpm
6853
uses: actions/cache@v4

.readthedocs.yaml

Lines changed: 0 additions & 32 deletions
This file was deleted.

README.md

Lines changed: 28 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ The Achilles code uses CMake as a means to provide a platform agnositic installa
3030

3131
The default options for the building of Achilles requires HepMC3
3232
and Sherpa. The HepMC3 code provides a means to output events in the convention dictated by the [NuHepMC](https://github.com/NuHepMC/Spec) standard.
33-
Details on obtaining
34-
this code can be found in the next [section](#-optional-dependencies).
33+
The Sherpa interface allows for the simulation of beyond the Standard Model (BSM) processes. Details on obtaining
34+
these codes can be found in the next [section](#-optional-dependencies).
3535

3636
To build Achilles with these default options can be done with:
3737
```bash
3838
mkdir build && cd build
39-
cmake ..
39+
cmake .. -DACHILLES_ENABLE_SHERPA=ON -DSHERPA_ROOT_DIR=/path/to/sherpa
4040
make -jN
4141
```
4242

@@ -63,7 +63,6 @@ To disable the requirement of HepMC3, add the option `-DENABLE_HEPMC3=OFF` to th
6363

6464
#### Sherpa
6565

66-
The Sherpa interface allows for the simulation of beyond the Standard Model (BSM) processes.
6766
The leptonic currents are calculated as described in [arxiv:2110.15319](https://arxiv.org/abs/2110.15319). This involves calculating
6867
temrs using the Berends-Giele recursion relations in arbitrary models. The calculation of these is
6968
implemented into the Comix matrix element generator within the Sherpa codebase.
@@ -72,7 +71,7 @@ The required version of Sherpa is in the process of being made public, but can b
7271
Achilles authors.
7372
Note that to enable UFO support from Sherpa, add the option `--enable-ufo' to the configure command.
7473

75-
To enable building with Sherpa, add the option `-DACHILLES_ENABLE_SHERPA=ON -DSHERPA_ROOT_DIR=/path/to/sherpa` to the cmake command.
74+
To disable the requirement of Sherpa, add the option `-DENABLE_BSM=OFF` to the cmake command.
7675

7776
### CMake Options
7877

@@ -82,7 +81,7 @@ A non-exhaustive list of useful CMake options includes:
8281
| ------ | ------- |
8382
| `ACHILLES_ENABLE_TESTING` | Build the Achilles test suite |
8483
| `ACHILLES_ENABLE_GZIP` | Compile the code with the ability to directly compress event files |
85-
| `ACHILLES_ENABLE_CASCADE_TEST` | Build the executable to only run the cascade (hadron-nucleus cross section or transparency) |
84+
| `ACHILLES_ENABLE_CASCADE_TEST` | Build the executable to only run the cascade (pA cross section or transparency) |
8685
| `ACHILLES_ENABLE_POTENTIAL_TEST` | Build executable to test different potentials |
8786
| `CMAKE_BUILD_TYPE=Debug` | Build the executable with debug symbols enabled |
8887
## Running Achilles
@@ -135,37 +134,39 @@ in more details in the [wiki](https://github.com/AchillesGen/Achilles/wiki) and
135134

136135
#### Run card
137136

138-
The run card consists of eight major sections describing how the generation is to be carried out.
137+
The run card consists of nine major sections describing how the generation is to be carried out.
139138
These sections are:
140139
1. The main event section
141140
2. The process section
142-
3. The options section
143-
4. The incoming beam
144-
5. Settings for the cascade
145-
6. Settings for the nuclear interaction model
146-
7. Settings for the nucleus
147-
8. Any cuts to apply during the generation of the events
141+
3. The initialization of the random number generator and precision of the integrator section
142+
4. The unweighting method to use
143+
5. The incoming beam
144+
6. Settings for the cascade
145+
7. Settings for the nuclear interaction model
146+
8. Settings for the nucleus
147+
9. Any cuts to apply during the generation of the events
148148

149149
Each of these sections are described below and in greater detail in the
150150
[wiki](https://github.com/AchillesGen/Achilles/wiki).
151151

152-
Achilles also provides the option of loading each of these sections from a separate text file. A set of default options for each section is included in the `data/default` directory
153-
154152
The _Main_ section contains options:
155153
- The number of events (`NEvents`)
156154
- If cuts should be applied at the generation level (`HardCuts`)
157155
- The output (`Output`), which contains sub-options:
158-
- The event output format (`Format`, currently options are "HepMC3", "NuHepMC", and "Achilles")
156+
- The event output format (`Format`, currently options are "HepMC3" and "Achilles")
159157
- The name of the output file (`Name`)
160158
- If the file should be written as a gzip file or not (`Zipped`)
161159

162-
The _Processes_ section contains information needed to generate the leptonic current for a given physics model.
160+
The _Process_ section contains information needed to generate the leptonic current for a given physics model.
163161
This contains the options for:
164-
- The incoming and outgoing leptonic states as a list of particle IDs
162+
- The physics model (`Model`)
163+
- The output leptonic states as a list of particle IDs (`Final States`)
164+
165+
The _Initialization_ section describes the initialization of the generator, and contains:
166+
- The random seed to use for event generation for reproducibility (`Seed`)
167+
- The accuracy for the warm-up run of the integrator to achieve before generating events (`Accuracy`)
165168

166-
The _Options_ section contains information on the random number generator, integrator precission, and unweighting methodt to be used in evnet generation. This contains the option for:
167-
- Initialize which contains the random seed to use for event generation for reproducibility (`Seed`), and the accuracy for the warm-up run of the integrator to achieve before generating events (`Accuracy`)
168-
- Unweighting which sets up the methodology for unweighting the events.This has one required setting
169+
The _Unweighting_ section sets up the methodology for unweighting the events. This has one required setting
169170
as the `Name` of the unweighting procedure. Each unweighting procedure has their own set of options
170171
described in detail in the [wiki](https://github.com/AchillesGen/Achilles/wiki/Unweighting).
171172

@@ -193,11 +194,11 @@ primary interaction is defined. The required options are:
193194
- Additional required options depend on the nuclear model used
194195
and can be found in the [wiki](https://github.com/AchillesGen/Achilles/wiki/Nuclear-Models).
195196

196-
The _Nucleus_ section defines the nucleus for interactions. The required options are:
197+
The _Nucleus_ section defines the nucleus for interactions. Currently, only a single isotope and nucleus is
198+
supported to be run at a time. The required options are:
197199
- The name of the nucleus given as the number of nucleons followed by the chemical symbol (_i.e._ "12C").
198200
- The Fermi momentum is needed.
199-
- The Binding energy is needed.
200-
- The setup for the densities and configuration.
201+
- The setup for the density and configuration.
201202
Details can be found in the [wiki](https://github.com/AchillesGen/Achilles/wiki/Nucleus).
202203
- The Fermi gas mode for the cascade. Current options are "Local" and "Global".
203204
- The nuclear potential to use.
@@ -212,27 +213,19 @@ The details of this section are laid out in the [wiki](https://github.com/Achill
212213

213214
The form factor file contains the list of the form factors to use, and the parameters for the different
214215
parameterization. Currently, the form factors implemented are:
215-
- vector:
216+
- Vector:
216217
- Dipole
217218
- Kelly
218219
- BBBA
219220
- ArringtonHill
220-
- axial:
221+
- Axial:
221222
- Dipole
222-
- ZExpansion
223-
- coherent:
223+
- Coherent:
224224
- Helm
225225
- Lovato (Carbon only)
226-
227-
Form factors for each of the above can be chosen by editing the `FormFactors.yml` file.
228226

229227
For additional details on the parameters for each form factor, see the [wiki](https://github.com/AchillesGen/Achilles/wiki/Form-Factors).
230228

231-
#### Achilles Rules
232-
233-
To facilitate the user experience, Achilles implements a set of rules which govern run card options. These can be found in `data/Rules.yml`. These rules cover required options in the run card, which if not found, throw a suggestive error notifying the user of the missing options. In addition, to prevent inconsistent physics models from being used together, certain rules are implemented that will additionally throw an error. An example of inconsistent physics modeling is using a propagating Delta baryon in nucleon-nucleon to nucleon-nucleon-pion interactions while also using the DCC model for pion-nucleon to pion-nucleon interactions. These rules can be changed, but we highly recommend users NOT edit these rules unless they know what they are doing.
234-
235-
236229
### Adding models to Achilles (via Sherpa)
237230

238231
The Beyond the Standard Model handling within Achilles is handled via an interface to Sherpa and Comix.

external/CMakeLists.txt

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -70,25 +70,6 @@ CPMAddPackage(
7070
"GIT_FAIL_IF_NONZERO_EXIT OFF"
7171
)
7272

73-
CPMAddPackage(
74-
NAME HighFive
75-
VERSION 2.6.2
76-
GITHUB_REPOSITORY BlueBrain/HighFive
77-
OPTIONS
78-
"HIGHFIVE_USE_BOOST OFF"
79-
"HIGHFIVE_EXAMPLES OFF"
80-
"HIGHFIVE_BUILD_DOCS OFF"
81-
"HIGHFIVE_UNIT_TESTS OFF"
82-
)
83-
84-
CPMAddPackage(
85-
Name CmakeGitVersion
86-
GITHUB_REPOSITORY andrew-hardin/cmake-git-version-tracking
87-
GIT_TAG master
88-
OPTIONS
89-
"GIT_FAIL_IF_NONZERO_EXIT OFF"
90-
)
91-
9273
# Install testing framework
9374
if(ACHILLES_ENABLE_TESTING)
9475
# Catch2

include/Achilles/Beams.hh

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#include "Achilles/FourVector.hh"
1111
#include "Achilles/PDFBase.hh"
1212
#include "Achilles/ParticleInfo.hh"
13-
#include "Achilles/PDFBase.hh"
1413

1514
namespace achilles {
1615

@@ -125,20 +124,6 @@ class FlatFlux : public FluxType {
125124
double m_min_energy, m_max_energy;
126125
};
127126

128-
class PDFBeam : public FluxType {
129-
public:
130-
PDFBeam(const YAML::Node&);
131-
int NVariables() const override { return 1; }
132-
FourVector Flux(const std::vector<double>&, double) const override;
133-
double GenerateWeight(const FourVector&, std::vector<double>&, double) const override;
134-
std::string Type() const override { return "PDFBeam"; }
135-
double MaxEnergy() const override { return 0; }
136-
double EvaluateFlux(const FourVector&) const override;
137-
138-
private:
139-
std::unique_ptr<PDFBase> p_pdf;
140-
};
141-
142127
class Beam {
143128
public:
144129
using BeamMap = std::map<achilles::PID, std::shared_ptr<FluxType>>;

include/Achilles/Configuration.hh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ struct ConfigurationParticle {
1616
bool is_proton;
1717
std::array<double, 3> position;
1818
};
19-
#endif
2019

2120
struct Configuration {
2221
std::vector<ConfigurationParticle> nucleons;

include/Achilles/Event.hh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#include "Achilles/EventHistory.hh"
1111
#include "Achilles/NuclearRemnant.hh"
1212
#include "Achilles/ProcessInfo.hh"
13-
#include "Achilles/EventHistory.hh"
1413

1514
namespace achilles {
1615

include/Achilles/FormFactor.hh

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -327,29 +327,6 @@ class AxialZExpansion : public FormFactorImpl, RegistrableFormFactor<AxialZExpan
327327
}
328328
};
329329

330-
class AxialZExpansion : public FormFactorImpl, RegistrableFormFactor<AxialZExpansion> {
331-
public:
332-
AxialZExpansion(const YAML::Node&);
333-
void Evaluate(double, FormFactor::Values&) const override;
334-
335-
// Required factory methods
336-
static std::unique_ptr<FormFactorImpl> Construct(FFType, const YAML::Node&);
337-
static std::string Name() { return "AxialZExpansion"; }
338-
static FFType Type() { return FFType::axial; }
339-
private:
340-
double tcut, t0;
341-
std::vector<double> cc_params{}, strange_params{};
342-
double ZExpand(std::vector<double> A, double z) const {
343-
// Compute the z-expansion, \sum{i=0}^{i_max} a_i z^i
344-
double result = 0;
345-
for(size_t i = A.size()-1; i > 0; --i) {
346-
result += A[i];
347-
result *= z;
348-
}
349-
return result + A[0];
350-
}
351-
};
352-
353330
class Kelly : public FormFactorImpl, RegistrableFormFactor<Kelly> {
354331
public:
355332
Kelly(const YAML::Node &);

include/Achilles/HadronicMapper.hh

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -88,27 +88,6 @@ class IntfSpectralMapper
8888
// static constexpr double dE = 400;
8989
};
9090

91-
class IntfSpectralMapper
92-
: public HadronicBeamMapper,
93-
Registrable<HadronicBeamMapper, IntfSpectralMapper, const ProcessInfo &, size_t> {
94-
public:
95-
IntfSpectralMapper(const ProcessInfo &info, size_t idx);
96-
static std::string Name() { return "IntfSpectral"; }
97-
static std::unique_ptr<HadronicBeamMapper> Construct(const ProcessInfo &info, size_t idx) {
98-
return std::make_unique<IntfSpectralMapper>(info, idx);
99-
}
100-
101-
void GeneratePoint(std::vector<FourVector> &, const std::vector<double> &) override;
102-
double GenerateWeight(const std::vector<FourVector> &, std::vector<double> &) override;
103-
size_t NDims() const override { return 7; }
104-
105-
private:
106-
static constexpr double dCos2 = 2;
107-
static constexpr double dPhi = 2 * M_PI;
108-
static constexpr double dp2 = 400; // reduced b/c MF SF has no strength at high P
109-
// static constexpr double dE = 400;
110-
};
111-
11291
} // namespace achilles
11392

11493
#endif

include/Achilles/MultiChannel.hh

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,6 @@ class MultiChannel {
120120
void LoadState(std::istream &);
121121
bool operator==(const MultiChannel &) const;
122122

123-
// Cache Results
124-
void SaveState(std::ostream &) const;
125-
void LoadState(std::istream &);
126-
bool operator==(const MultiChannel &) const;
127-
128123
// YAML interface
129124
friend YAML::convert<achilles::MultiChannel>;
130125

@@ -214,28 +209,6 @@ double achilles::MultiChannel::GenerateWeight(Integrand<T> &func, const std::vec
214209
return func.GenerateWeight(channel_weights, point, densities);
215210
}
216211

217-
template <typename T> std::vector<T> achilles::MultiChannel::GeneratePoint(Integrand<T> &func) {
218-
std::vector<double> rans(ndims);
219-
std::vector<T> point(ndims);
220-
221-
// Generate needed random numbers
222-
Random::Instance().Generate(rans);
223-
224-
// Select a channel
225-
size_t ichannel = Random::Instance().SelectIndex(channel_weights);
226-
227-
// Map the point based on the channel
228-
func.GeneratePoint(ichannel, rans, point);
229-
return point;
230-
}
231-
232-
template <typename T>
233-
double achilles::MultiChannel::GenerateWeight(Integrand<T> &func, const std::vector<T> &point) {
234-
size_t nchannels = channel_weights.size();
235-
std::vector<double> densities(nchannels);
236-
return func.GenerateWeight(channel_weights, point, densities);
237-
}
238-
239212
template <typename T> void achilles::MultiChannel::Optimize(Integrand<T> &func) {
240213
double rel_err = lim::max();
241214
while(NeedsOptimization(rel_err)) {

0 commit comments

Comments
 (0)