Coder Social home page Coder Social logo

mtosi / lab5015analysis Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lab5015/lab5015analysis

0.0 0.0 0.0 454 KB

collection of programs for the analysis of Lab5015 measurements

Shell 0.29% C++ 76.13% Python 20.98% C 2.38% Makefile 0.22%

lab5015analysis's Introduction

Lab5015Analysis

collection of programs for the analysis of Lab5015 measurements

Login to your favourite machine

ssh username@hostname

Fresh installation of the analysis package

export MYNAME=putYourNameHere  #use your name for development
mkdir $MYNAME
cd $MYNAME
git clone --recursive https://github.com/Lab5015/Lab5015Analysis
cd Lab5015Analysis
source scripts/setup.sh
make
make exe

Package structure

This package is structured as follows

  • Utilities are organized in the interface and src folders:
    • interface: contains the class or functions headers
    • src: contains the class or functions implementation
  • main: contains the main analysis code that make use of the Utilities
  • cfg: contains the config files which are used to pass parameters to the executables

After the compilation, each step of the analysis can be executed from the main folder Lab5015Analysis with a command like: ./bin/executable cfg/configfile

Before running the analysis

The output filename and output location of each analysis step are defined in the cfg files. Before running the analysis make sure you have checked and if needed updated the relevant output paths in order not to overwrite the work of others.

Other than that, every time you login remember to source the setup script:

cd Lab5015Analysis
source scripts/setup.sh

Run the analysis

The analysis of the collected data is structured in three steps

  1. moduleCharacterization_step1.cpp: This step performs the first loop over the events and fills base histograms such as energy and ToT for each bar, each theshold and each over-voltage. A skim of the events according to the selections defined in the config file is also performed. The output is in the form of TTrees and histograms.

  2. moduleCharacterization_step2.cpp: This step performs several loops over the events:

    1. loop over the histos filled in step1 and define the energy ranges
    2. loop over the skimmed TTrees and fill raw distribution of energy and energy ratio according to the predefined bins
    3. loop over the skimmed TTrees and compute time walk corrections
    4. loop over the skimmed TTrees and apply the time walk corrections

    The output of this step are histograms.

  3. moduleCharacterizationSummaryPlots.py: This step takes the output of step2 as an input and displays summary plots in a website. Loop over the events doesn't belong here. example:

    python moduleCharacterizationSummaryPlots.py -m 2 -i run2071 -o /var/www/html/TOFHIR2X/ModuleCharacterization/run2071

An additional code which is useful to plot the pulse shape for a given channel is drawPulseShape.exe. The pulse shape is computed with respect to the trigger. example:

./bin/drawPulseShape.exe cfg/drawPulseShape_HPK_2E14_52deg_T-40C_Vov1.50.cfg`

Submit the analysis in parallel on pcfatis

A script under the scripts folder allows the submission of multiple jobs (e.g. a set of runs corresponding to an overvoltage/threshold scan) in parallel on pcfatis. one job per run. The script is used as follows:

python scripts/submit_moduleCharacterization.py --label myTask_stepX -b /path/of/Lab5015Analysis -e bin/moduleCharacterization_stepX.exe -r run1-run2,run3 -c cfg/moduleCharacterization.cfg --submit

The config file is used as a template for each job, and the run number and file names in it are modified by the script as required. The command can be executed without the --submit flag first to inspect the jobs (in the scripts/jobs folder) before actually running them.

Visualize the results

All the results are available for inspection on a website hosted on pcfatis. The link is accessible from the INFN network or via tunnel.

lab5015analysis's People

Contributors

abenagli avatar martinamalberti avatar deguio avatar marcotoliman avatar giacomoboldrini avatar

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.