Skip to content

Instantly share code, notes, and snippets.

Avatar

arianna rocchetti ariannarocchetti

View GitHub Profile
View gist:361e3b4727120095f3b726c1f011267d
from hax.treemakers.peak_treemakers import PeakExtractor
class CoinPeaksInTPC(PeakExtractor):
__version__ = '0.0.3'
stop_after = 10
peak_fields = ['area', 'type', 'x', 'y', 'n_hits', 'area_per_channel']
event_cut_list = ['event_number %2 == 0' ]
peak_cut_list = ['detector == "tpc"', 'type !="lone_hit"']
extra_branches = ['peaks.area', 'peaks.type', 'peaks.reconstructed_positions*', 'peaks.n_hits', 'peaks.detector']
d_tpit = hax.minitrees.load(dataset, [CoinPeaksInTPC, 'Fundamentals'])
View load_data
#!/bin/bash
########################
### Datasets loading ###
########################
import datetime
dsets_version = 0.0
import numpy as np
import sys
import hax
View gist:1b656a376fd471122a62f0d9eda99ebd
#!/bin/bash
#SBATCH --job-name=notebook
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=8
#SBATCH --mem-per-cpu=4480
#SBATCH --time=12:00:00
#SBATCH --account=pi-lgrandi
#SBATCH --partition=dali
View gist:23b7c045840b214dc09fedaeafb7958d
#!/bin/bash
#BATCH --job-name=mc
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=8
#SBATCH --mem-per-cpu=4480
#SBATCH --time=8:00:00
#SBATCH --account=pi-lgrandi
#SBATCH --partition=xenon1t,dali
#SBATCH --qos=xenon1t
#SBATCH --output=logs/log-%J.txt
View gist:67194f0e9a052017863ab0b660595f48
########################
### Datasets loading ###
########################
import hax
print("starting!!!")
hax.init(pax_version_policy='v6.10.1',
make_minitrees=False,
minitree_paths=[#'/scratch/midway2/coderre/arianna/'
View gist:c41e20e189097ebeb78d11b4f989e173
class S1AreaFractionTop_he(Lichen):
"""Cut between the 0.05th and the 99.9th percentile of the population in the parameter space Z vs S1AFT
Note: https://xe1t-wiki.lngs.infn.it/doku.php?id=xenon:xenon1t:arianna:s1_aft_highenergy
Contact: arianna.rocchetti@physik.uni-freiburg.de Arianna Rocchetti.
Cut defined above cs1>200.
"""
version = 1
def _process(df):
View error_login_node
('Checking for macro:', '/cvmfs/xenon.opensciencegrid.org/releases/mc/arianna_er/macros/XENONnT/preinit_TPC.mac')
('Checking for macro:', '/cvmfs/xenon.opensciencegrid.org/releases/mc/arianna_er/macros/XENONnT/preinit_B_none.mac')
('Checking for macro:', '/cvmfs/xenon.opensciencegrid.org/releases/mc/arianna_er/macros/XENONnT/preinit_EF_C8kVA4kV.mac')
('Checking for macro:', '/cvmfs/xenon.opensciencegrid.org/releases/mc/arianna_er/macros/XENONnT/run_ER_SS_InnerCryostat_Th228.mac')
('Checking for macro:', '/cvmfs/xenon.opensciencegrid.org/releases/mc/arianna_er/macros/XENONnT/setup_optical.mac')
Error with workflow: perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
View gist:edd0aad62222480c835e5deb5fb3cbdc
File "mc_process.py", line 577, in <module>
sys.exit(run_main())
File "mc_process.py", line 527, in run_main
output_directory)
File "mc_process.py", line 94, in pegasus_submit
update_site_catalogs()
File "mc_process.py", line 37, in update_site_catalogs
catalog = open(catalog_file, 'r')
IOError: [Errno 2] No such file or directory: 'osg-sites.xml'
View gist:103995bba9c3ca0b5d5f38b6245cbc70
ariannarocchetti ~/processing/montecarlo $ env | egrep 'LANG|LC'
LANG=en_US.UTF-8
LC_CTYPE=UTF-8
ariannarocchetti ~/processing/montecarlo $ python mc_process.py --flavor G4p10 --config Acrylic_K40 --batch-size 2000 --events 10000 --mc-version v3.0.0 --fax-version head --pax-version head --sciencerun 1 --experiment XENONnT
Generating 10000 events using 5 jobs
('Checking for macro:', '/cvmfs/xenon.opensciencegrid.org/releases/mc/v3.0.0/macros/XENONnT/preinit_TPC.mac')
('Checking for macro:', '/cvmfs/xenon.opensciencegrid.org/releases/mc/v3.0.0/macros/XENONnT/preinit_B_none.mac')
('Checking for macro:', '/cvmfs/xenon.opensciencegrid.org/releases/mc/v3.0.0/macros/XENONnT/preinit_EF_C8kVA4kV.mac')
('Checking for macro:', '/cvmfs/xenon.opensciencegrid.org/releases/mc/v3.0.0/macros/XENONnT/run_Acrylic_K40.mac')
('Checking for macro:', '/cvmfs/xenon.opensciencegrid.org/releases/mc/v3.0.0/macros/XENONnT/setup_optical.mac')
View nSort_stage.py
#!/usr/bin/python
import sys
import os
from datetime import date
#import tqdm
import glob
import subprocess
from pexpect import pxssh
You can’t perform that action at this time.