User Tools

Site Tools


software:analysis

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
software:analysis [2020/04/20 16:39] himusersoftware:analysis [2022/01/14 18:44] (current) – external edit 127.0.0.1
Line 1: Line 1:
-====== Analysis ======+===== Analysis tools =====
  
-There are already several files which help you to analyse root files from primasoft:+===Novosibirsk function===
  
-  - PrimaSimAnalysis (can be found here: /geant4/src/PRIMASimAnalysis.cc, /geant4/include/PRIMASimAnalysis.hh) +The Novosibirsk function is typically used to fit monoenergetic electromagnetic calorimeter spectra
-  - Rootmacros (examples can be found here: /geant4/rootmacros) +Explanations on this function are given here {{ :software:novosibirsk.pdf |}}.
-  - Config file for Rootmacros (examples can be found here/geant4/sim_ana_utilities)+
  
 +A C++ code snippet to calculate the function using ROOT classes is given below. The interface is chosen to be usable with the ROOT fitting routines, e.g. ''TH1::Fit()''. It takes two arrays as input. From the first one only the first element is used as ''x'', From the second array, the values of the fit parameters are taken.
  
-This is what they do: +  #include "TMath.h"  
- +   
-== PrimaSimAnalysis == +  /  p[0] normalisation constant    
-  * Sorts hits into clusters  +       p[1] peak position    
 +       p[2] sigma (energy  resolution)    
 +       p[3] eta (asymmetry parameter)    
 +       p[4] = constant background   
 +  * 
 +  double novosibirsk(double *x, double *p)  
 +  {    
 +     double xi=2.35482004503094933e+00; 
 +     double Y=(x[0]-p[1])*p[3]/p[2]; 
 +   
 +     if(Y>=1) return p[4]; 
 +   
 +     double lnX = log( 1. - Y );    
 +     double s0  = 2/xi*TMath::ASinH(p[3]*xi*0.5);    
 +     double s02 = s0*s0;    
 +     
 +     double f = p[0]*exp ( -0.5/s02 * lnX*lnX - 0.5*s02) + p[4];      
 +     return f;  
 +  } 
software/analysis.1587400742.txt.gz · Last modified: (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki