Giter Site home page Giter Site logo

neuralreweighting's Introduction

WARNING!! Work in Progress

This is the code repository for Neural Reweighting Project. The dataset is generated by simulating parton level event records from MadGraph with reweighting enabled. Then a DNN is trained to approximate the reweighting factor.

First Setup

Please fork and checkout the repository from this github url. If you are using it for the first time, please run the command

source setup_FirstTime.sh

It will automatically download MadGraph version 2.8.3.2 and LHAPDF version 6.4.0. It will also download any new physics UFO models necesary. The default UFOs explored in this project have been listed in models_to_get.txt. This file contains the https download links for each UFO, and obtained with the wget command. The following environment variables will be set by the script:

  • $NEURWT_BASE_PATH: Absolute path to the project directory
  • $NEURWT_MGLOC: Absolute path to the location of MadGraph are set up by the setup script.
  • $NEURWT_LHAPDFLOC: Absolute path to the location of installed LHAPDF

Returning Setup

Each time you use return to use the project, run the command

source setup.sh

This will setup the necessary environment variables necessary for the project.

Getting the correct UFO models

If you want to add new UFO models for your event generation, please either add the corresponding link in the models_to_get.txt file after running the setup_FirstTime.sh (if this is the first time you are setting it up) or the setup.sh script. Then running the get_models.sh script will download those models and place the extracted model directories inside the $NEURWT_MGLOC/models directory. You can also download them manually and place them in the desired location.

neuralreweighting's People

Contributors

yorkiva avatar

Stargazers

Mark Neubauer avatar

Watchers

 avatar

neuralreweighting's Issues

Consider turning code directory into small package

As the Python code that is in the code directory has dependencies on itself it you might consider turning it into a very very small package instead. This would both make the maintenance and connections of the code much easier to understand but it also frees you from having to manually manipulate PYTHONPATH (which is annoying and prone to error) or from keeping you only working inside the code directory (as PYTHONPATH places the cwd on it by default in the same way PATH does).

Also, use of

from some_package_name import *

should be avoided basically at all costs. This destroys any use namespaces bring to software.

Document software environment

At the moment there aren't any instructions or environment configuration files, which makes the code hard to get started with. In addition to describing all external dependencies (i.e. MadGraph), it would be good for a Python application like this to also include a way to reproduce the environment. You could do this with something like a top level requirements.txt and pip-tools generated lock file that are both kept in version control. e.g.

# This is all happening inside of your Python virtual environment
$ cat requirements.txt  $ This is the thing you manually edit and control
torch==1.10.2
lxml==4.8.0
...  # other stuff you know you need in here
$ python -m pip install --upgrade pip-tools
$ pip-compile --generate-hashes --output-file requirements.lock requirements.txt  # Generate the lock file that fully defines env
$ python -m pip install --no-deps --require-hashes --only-binary :all: --requirement requirements.lock  # Install quickly and easily

Clarify external software dependencies

This project is making heavy use of MadGraph. It would be good to specify the exact version and any other dependencies in the stack of stuff that MadGraph uses that are used here. Also how are things being distributed (e.g., CVFMS LCG view, built from source, Docker image)?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.