software:analysis
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
software:analysis [2020/04/21 06:32] – himuser | software:analysis [2022/01/14 18:44] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Analysis | + | ===== Analysis |
- | There are already several files which help you to analyse root files from primasoft: | + | ===Novosibirsk function=== |
- | - PrimaSimAnalysis (can be found here: / | + | The Novosibirsk function is typically used to fit monoenergetic electromagnetic calorimeter spectra. |
- | - Config file for Analysis (examples can be found here: / | + | Explanations on this function are given here {{ :software: |
- | - Rootmacros (examples can be found here: / | + | |
+ | 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. '' | ||
- | + | #include " | |
- | This is what they do: | + | |
- | + | / | |
- | == PrimaSimAnalysis | + | p[1] = peak position |
- | * Sorts hits into clusters | + | |
- | * Single crystal threshold is applied. The value van be set in the config file, default is 2 MeV. This is analogue the to hit detection threshold in a measurement. | + | |
- | | + | |
- | * all crystals are used (768) | + | */ |
- | | + | |
- | * the inner 640 crystals are used in an oval shape (640_oval) | + | |
- | * the inner 560 crystals are used symmetrically | + | |
- | * ff | + | double Y=(x[0]-p[1])*p[3]/p[2]; |
- | | + | |
- | + | if(Y>=1) return p[4]; | |
- | + | ||
- | + | | |
- | == Rootmacro == | + | double s0 = 2/xi*TMath:: |
- | | + | double s02 = s0*s0; |
- | root -l rootmacros/ | + | |
- | </code> | + | double f = p[0]*exp ( -0.5/s02 * lnX*lnX - 0.5*s02) + p[4]; |
- | | + | return f; |
- | | + | |
- | * test.C is a basic example | + | |
- | | + |
software/analysis.1587450741.txt.gz · Last modified: 2022/01/14 18:44 (external edit)