Code Monkey home page Code Monkey logo

h4analysis's Introduction

t1065 tuplizer

set up

git clone --recursive https://github.com/zhangzc11/H4Analysis.git

cd H4Analysis

source scripts/setup.sh

make

(CMSSW not necessacy)

make the template

bin/TemplatesMaker cfg/TemplatesMaker.cfg 5166

run the tuplizer

bin/H4Reco cfg/H4_t1065_test.cfg 5166

*************************************************************

H4Analysis

  • This repository aims to provide a fast reconstruction of data acquired with the H4DAQ mainly with the CAEN V1742 Digitizer
  • The main program is the H4Reco ntuples producer which can be easily configured through the input cfg file (examples in cfg/).

Install and run

git clone --recursive https://github.com/zhangzc11/H4Analysis.git

cd H4Analysis

make

bin/H4Reco cfg/Oct2015_timing.cfg 4443

The cfg file

  • Comment lines start with a ‘#’ followed by a space
  • blocks are defined within <block>...</block>
  • each key (line inside a block) can take an unlimited number of options
  • The importCfg key allows one to express an unlimited number of other cfg files that are read sequentially before the current one so that blocks/keys that are present in more that one file are overwritten.

The H4Reco dumper

  • The main executable.
  • The idea is to run multiple plugins, each dedicated to a specific task, i.e. reconstructing hodoscope hits, digitizer waveform.
  • H4Reco takes two arguments: a cfg file and the run number that overrides the one specified in the cfg file
  • Each Plugin has three methods that are called by the main program:
    • Begin(): is called once after the plugin instance is created and before the first event is processed. Takes two arguments: a CfgManeger with all the option loaded in H4Reco and a index dedicated to synchronize the plunging trees with the main one.
    • ProcessEvent(..): called once for each entry of the H4Tree under analysis. It takes three arguments: the CfgManager with all the options, a reference to the analyzed H4Tree and the list of plugins loaded in the H4Reco plugin sequence. The last arguments allow to share data between plugins through the plugin methods RegisterSharedData and GetSharedData.
    • End(): called at the end of the H4Reco processing, after all the events have been processed.
  • A single output file is produced, it contains the main tree “h4” to which all the trees registered by the plugins as “permanent” are linked (using TTree::AddFriend()).
  • More information can be found in plugin/Readme.org

Some examples:

  • plot WF for APD2 only: h4->Draw("WF_val:WF_time","WF_ch==APD2")
  • plot amplitude map: =h4->Draw(“fit_ampl[APD2]:hodoY1:hodoX1>>map(100,-10,10,100,-10,10)”,”“,”PROFCOLZ”)
  • time resolution: =h4->Draw(“fit_time[APD2]-time[MCP1]”,”amp_max[MCP1]>100 && fit_ampl[APD2]>700”)

h4analysis's People

Contributors

michelif avatar simonepigazzini avatar pmeridian avatar zhangzc11 avatar

Watchers

James Cloos avatar  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.