Skip to content

Instantly share code, notes, and snippets.

View xgarrido's full-sized avatar

Xavier Garrido xgarrido

View GitHub Profile
@xgarrido
xgarrido / pid_cuts.conf
Created May 8, 2015 12:50
SN@ilWare - not cut
[name="alpha::calo_association" type="snemo::cut::particle_track_cut"]
#@description Cut description
cut.description : string = "Check if track has associated calorimeter hits"
#@description Logging priority
logging.priority : string = "warning"
#@description The running mode of this cut instance
mode.has_associated_calorimeter_hits : boolean = 1
@xgarrido
xgarrido / getting_hit_id.cpp
Last active August 29, 2015 14:24
An example of how to get hit id
// Get the 'calibrated_data' entry from the data model :
const snemo::datamodel::calibrated_data & the_calibrated_data
= data_record_.get<snemo::datamodel::calibrated_data>("CD");
const snemo::datamodel::calibrated_data::calorimeter_hit_collection_type & chits
= calibrated_data_.calibrated_calorimeter_hits();
for (snemo::datamodel::calibrated_data::calorimeter_hit_collection_type::const_iterator
icalo = chits.begin(); icalo != chits.end();
++icalo) {
@xgarrido
xgarrido / sngenbb_manager.conf
Last active August 29, 2015 14:24
An example of multi particles generator
[name="multi_particles" type="genbb::combined_particle_generator"]
#@config A model that generates several particles at the same time
#@description Logging priority
logging.priority : string = "warning"
#@description The mode ("timing", "plain_probability" or "activity")
mode : string = "time"
#@description The list of particle generators that compose the combo
@xgarrido
xgarrido / patch-atomic.diff
Last active November 6, 2015 15:19
Patch file for boost 1.55 and gcc > 4.5
--- boost/atomic/detail/cas128strong.hpp
+++ boost/atomic/detail/cas128strong.hpp
@@ -196,15 +196,17 @@ class base_atomic<T, void, 16, Sign>
public:
BOOST_DEFAULTED_FUNCTION(base_atomic(void), {})
- explicit base_atomic(value_type const& v) BOOST_NOEXCEPT : v_(0)
+ explicit base_atomic(value_type const& v) BOOST_NOEXCEPT
{
+ memset(&v_, 0, sizeof(v_));
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
ACLOCAL_AMFLAGS = -I m4
lib_LTLIBRARIES = libhealpix_cxx.la
src_c_utils = \
c_utils/c_utils.c \
c_utils/c_utils.h \
c_utils/walltime_c.c \
c_utils/walltime_c.h \
c_utils/trig_utils.c \
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
import cobaya
import camb
print(" Numpy :", np.__version__)
print("Matplotlib :", mpl.__version__)
print(" CAMB :", camb.__version__)
print(" Cobaya :", cobaya.__version__)
@xgarrido
xgarrido / hotspots.cc
Created December 8, 2019 22:40
Additionnal files for Healpix hotspots
#include "hotspots.h"
void hotspots(const Healpix_Map<double> & inmap,
Healpix_Map<double> & outmap,
std::vector<int> & min_pixels,
std::vector<int> & max_pixels)
{
outmap.Set(inmap.Order(),inmap.Scheme());
const int npix = inmap.Npix();
(yapfify jupyter org-msg forge cython-mode pyvenv yaml-mode
magit-svn dockerfile-mode csv-mode counsel projectile paradox
firestarter xml-rpc multi-term dired-k direx popwin dired-subtree
dired-details ob-ipython htmlize org-bullets gist git-gutter
magit gnuplot go-mode cmake-mode yasnippet multi-web-mode
markdown-mode key-chord hydra auto-complete wgrep-ag wgrep ag
ack-and-a-half golden-ratio flex-isearch fold-this lorem-ipsum
expand-region browse-kill-ring wrap-region undo-tree smartparens
fill-column-indicator swiper hideshowvis rainbow-mode
highlight-parentheses idle-highlight-mode ido-at-point