Error matrix for EMC [message #11044] |
Fri, 01 October 2010 15:13 |
Dima Melnychuk
Messages: 213 Registered: April 2004 Location: National Centre for Nucle...
|
first-grade participant |
From: *fuw.edu.pl
|
|
Dear colleagues,
I have commited some code related to EMC error matrix calculation and treatment.
So far parametrization of error matrix was hardcoded with parameters obtained by Marc Pelizaeus in Babar framework. My modification are based on the code from Marc and include possibility to use different parameters for different EMC geometries and include macro to recalculate parameters if some modification in EMC geometry are introduced (with as the most obvious example - inclusion of dead material).
I have created a PndEmcErrorMatrixPar class to store these parameters in RTDB in object PndEmcErrorMatrixParObject.
PndEmcErrorMatrix perform actual calculation of error matrix for given EmcCluster using its energy in method
PndEmcErrorMatrix::Get4MomentumErrorMatrix(const PndEmcCluster &cluster)
PndEmcErrorMatrix needs parametrs in the object PndEmcErrorMatrixParObject, which can be obtained from RTDB or root file. Therefore there are 2 methods of its initialization
PndEmcErrorMatrix::Init(PndEmcErrorMatrixParObject *par)
or
PndEmcErrorMatrix::InitFromFile(Int_t geomVersion)
geomVersion is parameter stored in RTDB in EMC simulation and depending on EMC geometry version, error matrix is initialised from different files, which names are hardcoded in PndEmcErrorMatrix::InitFromFile().
The place where error matrix is actually calculated in the code is PndPidCorrelator::ConstructNeutralCandidate(). I have attached a modified version of PndPidCorrelator.cxx, PndPidCorrelator.h, /pid/CMakeLists.txt and I would like to ask Stefano to commit my changes there, since I do not have write permission to /pid/ directory. In addition there two files with parameters emc_error_matrix_default.root and emc_error_matrix_1.root, which should be placed to /input/ directory.
There are 3 macro added to /macro/emc/dedicated/:
fill_error_matrix_param.C create root file (emc_error_matrix_default.root) with parameters, taken from Babar framework.
error_matrix_data_production.C(Int_t emcGeometry=17, Int_t emc_component=1, Int_t nEvents=10)
which perform data production for given emc geometry version and emc component (1- barrel, 2 - forward endcap, 3 -backward endcap, 4 - shashlyk).
So this macro should be run 4 times, once for each emc component.
The data produced are photon with an energy and theta range dependent on emc component.
error_matrix_fit.C(Int_t emcGeometry=17, TString fileVersion="1")
takes 4 files produced by error_matrix_data_production.C and perform calculation of energy and position error and fit them with function shown at the attached figures. Parameters of the fit are stored in PndEmcErrorMatrixParObject in the file, which names ends with fileVersion.
For the barrel the energy dependence of error of (energy, phi, z) is used, for other EMC components error of (energy, x, y).
Concerning the actual parametrs, results are far from final and still should be checked.
There are two figures attached for errors in barrel and forward endcap. They are close to what Marc showed 3 years ago, however fit gives slightly different parameters and there are some irregularities which still should be understood. I have produced 10k events for each emc module and may be at higher statistics results will improve.
There is an obstacle for parametrisation of error matrix for shashlyk calorimeter, namely energy correction. Despite there is energy correction from babar framework and energy correction obtained by Ola Biegun in pandaroot they are not suitable for the recent version of shashlyk geometry and proper parametrisation of error matrix should wait till proper energy correction for shashlyk.
So emc_error_matrix_1.root file include error matrix obtained for geometries "emc_module12.dat","emc_module3new.root","emc_module4_StraightGeo24.4.root " and paramatrization for shashlyk from the Babar framework.
Quality assurance for error marix would be reconstruction of the decay pi0->gamma gamma, which I plan to do but it still need some additional work on energy-position correction.
Best regards,
Dima
|
|
|
|
|
|
|
Re: Error matrix for EMC [message #11050 is a reply to message #11048] |
Mon, 04 October 2010 10:50 |
M.Babai
Messages: 46 Registered: January 2008 Location: Netherlands
|
continuous participant |
From: *KVI.nl
|
|
Hi Stefano,
Here I have the same problem.
The solution is adding #include <cstdlib> or #include <stdlib.h> to PndEmcErrorMatrix.h. Because we use C++, I would prefer the first one.
But the question remains if we need to use abort(). According to the documentation:
======================
Aborts the process with an abnormal program termination.
The function generates the SIGABRT signal, which by default causes the program to terminate returning an unsuccessful termination error code to the host environment.
The program is terminated without executing destructors for objects of automatic or static storage duration, and without calling any atexit function.
The function never returns to its caller.
======================
I have not looked into the source code yet, but in the most cases, it is not a good idea to use abort().
btw. should I add the lines to the headers and submit?
/M
[Updated on: Mon, 04 October 2010 11:04] Report message to a moderator
|
|
|
|
|
|
|
|