cosorio94 / TWaveform

C++ utility library used to read and process massive sets of waveform data

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TWaveform

A C++ utility library used to read, process, fit and analyze massive sets of waveform data through CERN's ROOT framework.

Team

UCSB High Energy Physics Group

Developer

Supervisor

  • Dr. David Stuart

Table of Contents

  1. Capabilities
  2. User Manual
  3. Examples
    1. Template Fitting and Waveform Analysis
    2. Pulse Templates
    3. TTree and TChain Histograms
  4. Installation
  5. Usage
  6. More Template Fitting Examples
    1. Single-pulse Waveforms
    2. Waveforms with high-noise
    3. Waveforms with multiple pulses

Capabilities

  • Read and plot waveforms from CSV and txt files. It can also be easily adjusted to read data from other file formats.
  • Find the integral and slope of a waveform.
  • Find a waveform’s standard deviation when there is noise.
  • Compare waveforms to each other. It can determine if two waveforms have similar shapes and plots the fit between them.
  • Create templates for different shaped pulses within a waveform set. It does so by analyzing a large number of waveforms and getting an average of the pulses with similar shape and/or size.
  • Find a waveform’s best fitting template. It is also capable of fitting multiple templates to a single waveform. This allows TWaveform to do the following processes:
    • Recognize if a waveform has multiple pulses
    • Record the position and height of each pulses’ peak.
    • Record the rise position of the separate pulses.
    • Find the relative strength of distinct pulses within a waveform.
  • Create TTrees and TChains with information on the properties of a large set of waveforms, such as:
    • Rise and peak positions.
    • Peak heights.
    • Best fitting templates.
    • Area under waveform.
    • Signal’s standard deviation.
    • Uncertainty values.
  • Create and plot 1D and 2D histograms of the time distribution of pulses and their peak heights.

User Manual

View a detailed description of TWaveform's capabilities and how to use it in the user manual here.

Examples

Template Fitting and Waveform Analysis

The graph below was plotted, fitted and analyzed using TWaveform. The blue curve represents the waveform's signal, while the red curve represents the calculated best fit. The red asterisks represent the peak and rise positions of the pulses contained within the waveform, as calculated by TWaveform.

alt text

Pulse Templates

The plot below shows a pulse template created by TWaveform from a set of waveforms similar to the one on top.

alt text

TTree and TChain Histograms

The following histograms were created from a massive collection of waveform data using TWaveform. The data was analyzed using TWaveform's TTree and TChain generating methods that analyze large sets of waveform data.

alt text

alt text

Installation

In the command line, go to the directory where you want to have TWaveform, and run these commands in order:

git clone https://github.com/cosorio94/TWaveform.git
cd TWaveform
make all

Usage

For this step, you will need to have CERN's ROOT framework installed. For instructions on how to install it go here. Now, to use and initialize a TWaveform instance using ROOT's command line, run the following commands on the terminal:

root -l
gSystem->Load("TWaveform.so");
TWaveform wave;

Check the user manual for more instructions on how to use TWaveform's methods.

More Template Fitting Examples

Single-pulse Waveforms:

alt text

alt text

Waveforms with high-noise:

alt text

alt text

Waveforms with multiple pulses:

alt text

alt text

Waveforms with slight second pulse:

alt text

alt text

About

C++ utility library used to read and process massive sets of waveform data


Languages

Language:C++ 99.5%Language:Makefile 0.5%Language:Objective-C 0.0%