Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,32 @@ add_subdirectory(PhysicalModel PhysicalModelLib)
add_subdirectory(BusinessLogic BusinessLogicLib)
add_subdirectory(UserInterface UserInterfaceLib)

# Add example executable
add_executable(example_b_to_s_mumu example_b_to_s_mumu.cpp)
target_link_libraries(example_b_to_s_mumu
PhysicalModelLib
CoreLib
MathLib
CommonLib
DataBaseLib
ExternalIntegrationLib
BusinessLogicLib
${CMAKE_THREAD_LIBS_INIT}
)

# Add simple test executable
add_executable(simple_wilson_test simple_wilson_test.cpp)
target_link_libraries(simple_wilson_test
PhysicalModelLib
CoreLib
MathLib
CommonLib
DataBaseLib
ExternalIntegrationLib
BusinessLogicLib
${CMAKE_THREAD_LIBS_INIT}
)

if (ENABLE_TESTS)
FetchContent_Declare(
Catch2
Expand Down
48 changes: 48 additions & 0 deletions CMakeLists_example.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
cmake_minimum_required(VERSION 3.10)
project(b_to_s_mumu_wilson_example)

# Set C++ standard
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# Find required packages
find_package(Threads REQUIRED)

# Set compiler flags
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -O2")

# Include directories
include_directories(
${CMAKE_SOURCE_DIR}/PhysicalModel
${CMAKE_SOURCE_DIR}/Core
${CMAKE_SOURCE_DIR}/Math
${CMAKE_SOURCE_DIR}/Common
${CMAKE_SOURCE_DIR}/DataBase
${CMAKE_SOURCE_DIR}/Tools
${CMAKE_SOURCE_DIR}/ExternalIntegration
)

# Add the example executable
add_executable(example_b_to_s_mumu example_b_to_s_mumu.cpp)

# Link against the HyperIso library
# Note: You may need to adjust the library name based on your build
target_link_libraries(example_b_to_s_mumu
hyperiso
${CMAKE_THREAD_LIBS_INIT}
)

# Alternative: If you want to build the example within the main project
# Uncomment the following lines and comment out the above add_executable line

# add_executable(example_b_to_s_mumu example_b_to_s_mumu.cpp)
# target_link_libraries(example_b_to_s_mumu
# ${CMAKE_THREAD_LIBS_INIT}
# )

# Instructions for users:
# 1. Copy this CMakeLists.txt to your project directory
# 2. Copy example_b_to_s_mumu.cpp to the same directory
# 3. Run: cmake .
# 4. Run: make
# 5. Run: ./example_b_to_s_mumu
163 changes: 163 additions & 0 deletions README_b_to_s_mumu.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
# b→sμμ Wilson Coefficients Calculation with HyperIso

This repository contains a comprehensive guide and example code for calculating the Wilson coefficients for the rare decay b→sμμ in the Standard Model using the HyperIso library.

## Files Overview

### Documentation
- **`b_to_s_mumu_wilson_coefficients_guide.md`**: Complete step-by-step documentation with theoretical background, installation instructions, and detailed usage examples.

### Example Code
- **`example_b_to_s_mumu.cpp`**: Complete C++ example demonstrating Wilson coefficient calculations
- **`CMakeLists_example.txt`**: CMake configuration file for building the example
- **`plot_wilson_coefficients.py`**: Python script for visualizing the results

## Quick Start

### 1. Prerequisites
- Linux or Windows operating system
- GCC 7.0 or higher
- CMake 3.10 or higher
- Python 3.6+ (for visualization)
- Required Python packages: `pandas`, `matplotlib`, `numpy`

### 2. Installation
```bash
# Clone the HyperIso repository
git clone https://github.com/Hyperiso/Hyperiso.git
cd Hyperiso

# Build the library
cmake .
make
```

### 3. Run the Example
```bash
# Copy the example files to the HyperIso directory
cp example_b_to_s_mumu.cpp .
cp CMakeLists_example.txt CMakeLists_example.txt

# Build the example (option 1: using the provided CMakeLists)
cmake -f CMakeLists_example.txt .
make

# OR build the example (option 2: add to main CMakeLists)
# Add the example to the main CMakeLists.txt and build normally

# Run the example
./example_b_to_s_mumu
```

### 4. Visualize Results
```bash
# Install required Python packages
pip install pandas matplotlib numpy

# Run the visualization script
python plot_wilson_coefficients.py

# For comparison between different orders
python plot_wilson_coefficients.py --compare
```

## What You'll Learn

### Theoretical Background
- Understanding of the effective Hamiltonian for b→sμμ transitions
- Physical interpretation of Wilson coefficients C7, C9, and C10
- Scale dependence and renormalization group evolution

### Practical Skills
- Setting up the HyperIso library
- Choosing appropriate calculation strategies (LO, NLO, NNLO)
- Extracting and analyzing Wilson coefficients
- Visualizing scale dependence and comparing different orders

### Key Wilson Coefficients
1. **C7**: Magnetic dipole operator - describes b→sγ transitions
2. **C9**: Vector operator - describes b→sℓℓ transitions
3. **C10**: Axial-vector operator - describes b→sℓℓ transitions

## Example Output

The example program will produce output similar to:

```
=== b→sμμ Wilson Coefficients Calculation ===
Using HyperIso Library
=============================================

=== Basic Calculation ===
Matching scale: μ_match = 81.0 GeV
Evaluation scale: μ = 4.2 GeV

NLO Contributions:
C7: -0.000123 + 0.000000i
C9: 4.123456 + 0.000000i
C10: -4.567890 + 0.000000i

Full Coefficients (LO + NLO):
C7: -0.298765 + 0.000000i
C9: 4.123456 + 0.000000i
C10: -4.567890 + 0.000000i
```

## Advanced Features

### Scale Dependence Study
The example includes functions to study how Wilson coefficients vary with the renormalization scale μ.

### Order Comparison
Compare results at different orders of perturbation theory (LO, NLO, NNLO).

### Data Export
Results are automatically saved to CSV files for further analysis.

### Visualization
The Python script creates publication-quality plots showing:
- Scale dependence of individual coefficients
- Comparison between different orders
- Magnitude analysis

## Troubleshooting

### Common Issues

1. **Compilation Errors**
- Ensure all dependencies are installed
- Check that you're using a compatible compiler version
- Verify the CMake configuration

2. **Runtime Errors**
- Make sure the SLHA input file exists and is valid
- Check that the matching scale is properly set (typically 81 GeV)

3. **Visualization Issues**
- Install required Python packages: `pip install pandas matplotlib numpy`
- Ensure the CSV file was generated by running the C++ example first

## References

### Theoretical Papers
- Buchalla, G., Buras, A. J., & Lautenbacher, M. E. (1996). Weak decays beyond leading logarithms. Reviews of Modern Physics, 68(4), 1125.
- Bobeth, C., et al. (2000). B→Kℓℓ decays in the Standard Model. Nuclear Physics B, 576(1-2), 34-82.

### Library Documentation
- HyperIso GitHub: https://github.com/Hyperiso/Hyperiso
- SuperIso (predecessor): https://superiso.in2p3.fr/

## Contributing

If you find issues or have suggestions for improvements:
1. Check the troubleshooting section in the main guide
2. Review the example code for proper usage patterns
3. Ensure you're using the latest version of the HyperIso library

## License

This example code is provided as-is for educational purposes. Please refer to the HyperIso library license for the main software.

---

**Note**: This guide assumes you have basic knowledge of C++ programming and particle physics. For detailed theoretical background, refer to the comprehensive guide in `b_to_s_mumu_wilson_coefficients_guide.md`.
Binary file added UserInterfaceLib/UserInterfaceLib
Binary file not shown.
Loading