Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature dune v1.1 develop #11

Merged
merged 85 commits into from
Oct 18, 2024
Merged

Feature dune v1.1 develop #11

merged 85 commits into from
Oct 18, 2024

Conversation

EdAtkin
Copy link
Contributor

@EdAtkin EdAtkin commented Oct 16, 2024

Changing the DUNE code to be up to date with a new version of the core code. The version of the core code is currently being reviewed but will be release as a 2.0.0 tag.

The main changes consist of changing the constructor of the samplePDFFD object to take a lot of the information from the sample yaml file. This reduces the amount of code that need to be written in each samplePDFDune object.

We now also use the NuOscillator object to calculate oscillation probabilities in the core code.

The samplePDF objects in DUNE have also been slightly renamed to no longer include the word "base" in them as they are not intended to be base classes.

Lots of files have also been removed to reduce the clutter. A few additional exes will be added shortly for people to use as clear examples. There is also a "factory" method to initialise the different samplePDF instances meaning that a lot of executables can now be shared across the beam and atmoshperic samples.

Copy link
Member

@dbarrow257 dbarrow257 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments left to address

CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
configs/CovObjs/MaCh3Modes.yaml Show resolved Hide resolved
samplePDFDUNE/samplePDFDUNEAtm.h Show resolved Hide resolved
scripts/link_files.sh Show resolved Hide resolved
setup.sh Outdated Show resolved Hide resolved
src/Fit.cpp Outdated Show resolved Hide resolved
src/Fit.cpp Show resolved Hide resolved
NDDetectorSystPointers = std::vector<const double*>(nNDDetectorSystPointers);

int func_it = 0;
for (std::vector<int>::iterator it = funcParsIndex.begin(); it != funcParsIndex.end(); ++it, ++func_it) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we using manual iterators in 2024?

for(auto const &fpi : funcParsIndex){ 
  //...

would be nice

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, I guess you want the enumeration index too,

for(int func_it = 0; func_it < nNDDetectorSystPointers; ++func_it){
  auto const & fpi = funcParsIndex[func_it]; // or just use the full thing, iterators are confusing...


int samplePDFDUNEBeamFD::setupExperimentMC(int iSample) {
const char *sampleFile = (mtuple_files[iSample]).c_str();
dunemc_base *duneobj = &(dunemcSamples[iSample]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its fairly minor, but this is just unnecessary. We really can do without any bare pointers in most of this code:

auto &duneobj = dunemcSamples[iSample];

//...
duneobj.bla[i] = _bla;

Copy link
Member

@dbarrow257 dbarrow257 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only minor comments left which modify code style but don't change behaviour

samplePDFDUNE/samplePDFDUNEBeamND.cpp Outdated Show resolved Hide resolved
samplePDFDUNE/samplePDFDUNEBeamNDGar.cpp Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
configs/CovObjs/MaCh3Modes.yaml Show resolved Hide resolved
samplePDFDUNE/samplePDFDUNEBeamND.cpp Outdated Show resolved Hide resolved
samplePDFDUNE/samplePDFDUNEBeamNDGar.cpp Outdated Show resolved Hide resolved
samplePDFDUNE/samplePDFDUNEAtm.cpp Outdated Show resolved Hide resolved
samplePDFDUNE/samplePDFDUNEAtm.h Show resolved Hide resolved
src/Fit.cpp Outdated Show resolved Hide resolved
@dbarrow257 dbarrow257 merged commit 3aa2f96 into develop Oct 18, 2024
@dbarrow257 dbarrow257 deleted the feature_DUNE_v1.1_develop branch October 18, 2024 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants