Skip to content

Instantly share code, notes, and snippets.

View YanzhaoW's full-sized avatar

Yanzhao Wang (王彦昭) YanzhaoW

  • Universität zu Köln
  • Zülpicher Straße 77, Köln
View GitHub Profile
@YanzhaoW
YanzhaoW / README.md
Last active September 2, 2024 09:47
Convert root tree to pandas data frame

Usage

Example:

point_branches = {
    "NeulandPoints.fTime": "float",
    "NeulandPoints.fDetectorID": "int32",
    "NeulandPoints.fELoss": "float64",
    "NeulandPoints.fX": "float64",
 "NeulandPoints.fY": "float64",
@YanzhaoW
YanzhaoW / setup_steps.md
Last active September 27, 2024 17:48
Apptainer container setup with tmux sessions on GSI lustre nodes

Apptainer container setup for GSI servers

This instruction explains how to setup a working environment for GSI servers (lustre.hpc.gsi.de nodes). The setup is involved with multiple programs, such as TMux, zsh, apptainer and ssh. A similar setup can should also be achievable using alternatives, like bash and screen.

Important

The server address lustre.hpc.gsi.de contains multiple nodes. Starting a ssh session with this address could be led to a different node, therefore, losing all tmux sessions from the last login. Users should start a ssh session with a specific node address. In the following example, dslustre01.hpc.gsi.de is used as an example.

Step 1: SSH configuration

In the local machine (either your personal computer or a terminal), you should have already created the ssh public and private key. By default, your ssh configuration folder should be ~/.ssh. Open the file config in the folder (create one if config file doesn't exist)

@YanzhaoW
YanzhaoW / EventStitchingUtils.hpp
Last active June 20, 2024 15:17
ROOT macro script for the event stitching of neuland and sofia data.
namespace ROOT::Internal::RDF
{
std::string GetBranchOrLeafTypeName(TTree& t, const std::string& colName);
}
class InputRootFiles
{
public:
InputRootFiles(std::string_view tree_name) { data_ = std::make_unique<TChain>(tree_name.data()); }
void add_filename(std::string_view filename)
@YanzhaoW
YanzhaoW / DetectorData.h
Last active April 10, 2024 17:01
R3BRoot template for a task class
/******************************************************************************
* Copyright (C) 2019 GSI Helmholtzzentrum für Schwerionenforschung GmbH *
* Copyright (C) 2019-2024 Members of R3B Collaboration *
* *
* This software is distributed under the terms of the *
* GNU General Public Licence (GPL) version 3, *
* copied verbatim in the file "LICENSE". *
* *
* In applying this license GSI does not waive the privileges and immunities *
* granted to it by virtue of its status as an Intergovernmental Organization *