Skip to content

Latest commit

 

History

History
101 lines (75 loc) · 5.11 KB

README.md

File metadata and controls

101 lines (75 loc) · 5.11 KB

CaliceAnalysis

GitHub commits GitHub license

Personal analysis scripts for the detector analysis will go here before pushing to upstream Main analysis scripts are located in cpp/analysis. This code analyzes the data taken from the beam test and compare the result with the one in the simulation.

For the data event analysis, the preparation of the event building is handled by the SiWECAL-TB-monitoring project. An output rootfile from this event building will become an input file for the data analysis for this project. Beam test results in the past are stored in

/eos/project-s/siw-ecal/TB2022-06/beamData

on lxplus. Here, you can find the raw data from the beam test. For the actual root file that has gone through the event building, this is stored in pc-calice2 computer in the IJCLab.

For the simulation event analysis, the event generation and building are both handled in SiWECAL-Sim. An output root file from this project becomes an input file for this analysis.

The analysis code will look for these input files in data/ directory at the top of this project. One can create directory there and place simulated and data files. Details can be found in cpp/analysis/include/FileSelector.hh.

Requirements

We use CMake to build the project. Minimum of requirements are:

Version
CMake V3.0
ROOT V6.24/00

Build

In order to build this project, you only need to execute following line after moving to cpp/analysis directory.

./build.sh

If this gives an error, this may be caused by the version incompatibility from the building of ROOT. Try changing the CMAKE_CXX_STANDARD version in the CMakeLists.txt.

Simulation Conversion

TTree structure of a root file from data event building and simulation are almost identical. However there is a key difference: data root file stores variables in an array, whereas simulated root file stores them in a vector. This difference cause error upon variable extraction from the TTree, thus one needs to convert the simulation file to store everything in array. One can simply accomplish this by executing

./converter.exe [beam energy]

Analysis Execusion

After the build, execution file main.exe should be created. One can execute it by:

./main.exe [analysis mode] [beam type] [beam energy]
  • analysis mode: reco or conv_sim depending of data or simulation analysis.
  • beam type: e- or mu-
  • beam energy: Beam energy in GeV.

List of parameters used by this analysis can be found in TreeStructures.hh.

NtupleProcessor

The analysis code follows the basic workflow defined in TSelector class of ROOT. Main programs reside in NtupleProcessor directory.

After executing the main.exe, main.cc will call for NtupleProcessor class. NtupleProcessor will then open an input file and attach its TTree to TSelector, along with predefined class, which is ECALAnalyzer for our case. (see here)

For TSelector (see TreeIterator.cc) will execute its methods to the attached TTree in following order:

  1. Init
  2. SlaveBegin
  3. Begin
  4. Notify
  5. Process
  6. SlaveTerminate
  7. Terminate

See TSelector class documentation for more info.

ECALAnalyzer

Both data and simulation root files are analyzed in this class.

Caution

Path and file names are strictly defined in FileSelector.hh. Particularly for data files, one needs to change the run number in this file in order for the program to recognize the file.

General analysis flow is following:

  1. Cut is applied with ECALAnalyzer::Select() method.
  2. Main analysis happens in ECALAnalyzer::Analyze() method. It fills the histograms for hit and energy information needed for the further analysis. The list of histograms can be found in HistManager.cc.

Macros

The codes used for plotting histograms obtained from the ECALAnalyzer is stored in cpp/scripts.