heavyionanalysis / qntools Goto Github PK
View Code? Open in Web Editor NEWFramework for flow analyses in heavy-ion collisions.
License: GNU General Public License v3.0
Framework for flow analyses in heavy-ion collisions.
License: GNU General Public License v3.0
Good day!
@kreisl, as I understand it correctly, new version of QnTools isn't compatible with content of files created with older versions of the framework, is it? Can you please add backward compatibility to the package so we can use it with on DataContainers made with older versions.
@kreisl, developing the inteface for resolution and flow calculation I faced the problem.
Here's the bug:
Division of multidimensional data container of stats by non-zero one-dimensional data container gives inf/nan in result container.
In the same time, making projection on one axis, gives adequate result. And projection on two axis gives inf/nan too.
Numerator and denuminator are both refference-weighted.
Dear @kreisl,
We found a bunch of bugs connected to Qn::DataContainerStats arithmetics.
Can you please check this?
With root v6.22 I'm getting warning:
In file included from /home/eugene/CLionProjects/QnAnalysis/cmake-build-debug/_deps/qntools-src/src/dataframe/common/AverageHelper.hpp:28,
from /home/eugene/CLionProjects/QnAnalysis/cmake-build-debug/_deps/qntools-src/src/dataframe/QnDataFrame.hpp:20,
from /home/eugene/CLionProjects/QnAnalysis/src/QnAnalysisCorrelate/CorrelationTaskRunner.hpp:22,
from /home/eugene/CLionProjects/QnAnalysis/src/QnAnalysisCorrelate/CorrelationTaskRunner.cpp:8:
/home/eugene/SOFT/ROOT/root-6.22.02.gcc10.1/include/TROOT.h:89:11: note: declared here
89 | UInt_t GetImplicitMTPoolSize() R__DEPRECATED(6, 24, "Please use ROOT::GetThreadPoolSize() instead");
New CMake (since 3.11.4) provides cool feature FetchContent
which allows more convenient dependency management. Unlike ExternalProject
it incorporates configuration of external project (targets, etc) into configuration of the dependent project. Under the hood it calls add_subdirectory(_deps/QnTools)
.
Unfortunately at this moment QnTools cannot be used as subproject. But it requires very minor changes (mainly replacement CMAKE_SOURCE_DIR with CMAKE_CURRENT_SOURCE_DIR)
This leads to weird "no such branch" errors in runtime due to uninitialized array;
Hi again!
For the same reason as #19 I propose to change signature (or maybe overload) of AddCutOnDetector by
void AddCutOnDetector(std::string name, std::vectorstd::string args, bool (double * args));
How to handle power of weights that enter in the cumulants calculated from the Q-vectors.
Right now we need a Q-vector / Detector for each power. So to calculate v_2{4} 4 different weights are needed.
Is there some smarter way, how to store this information in the Q-vector internally?
See https://doi.org/10.1103/PhysRevC.83.044913 appendix B for more information.
Hi Lukas,
I'm trying to run flow analysis for our data in NA61/Shine. I'm seeing now weird difference between 'x' and 'y' component (not seen before), so I decided to look into correction step to understand what is going on.
There is a Q-vector pion_neg_pt
which is related to negative pions. Corrections: RECENTERING, TWIST-AND-RESCALE. Normalization: sum of weights. Weight: Ones.
I'm looking at single kinematic bin, only events where number of contributing vectors == 1. So, it is data_[0] and data_[0].n_ == 1
Circle is expected, circle is found. Non-uniform acceptance of the NA61 is clearly seen here.
Same plot, but now RECENTERED:
I expected to see one circle (since it is only one kinematical bin) with shifted centre. But here centre is fluctuating (event-by-event).
Can you clarify this?
Hi!
Colleagues reported that QnTools requires minimum 6/20 version of ROOT:
Line 40 in defca4c
I'm fully supporting the idea to not care about compatibility with really old software but ROOT 6/18 is not that old in my opinion. For example at the moment CBM is providing root-6.16.00-gcc-8.1.0-nrkpihv
.
(draft based on discussion with Ilya)
To evaluate systematic uncertainties we compare different estimations (Q-vector components, reference subevent, cuts, etc).
Currently Qn::StatCalculate provides machinery to evaluate only statistical uncertainties.
To evaluate systematic uncertainties one has to operate either on exported TGraph or play with DataContainer and develop own structures to keep variations and maintain consistency during various transformations.
Ilya proposed to extend current Qn::StatCalculate
with internal field (structure) Systematics
which will keep systematic variations and calculate significance of variation.
Variations (V) are added to 'reference' (R) estimation (it is usually all components and all references combined), so I propose method: Qn::StatCalculate::AddVariation (const Qn::StatCalculate& variation)
Internal structure Systematics
contains list of systematic variations each of them consists of:
For QA purposes I propose to keep (or calculate ad-hoc) in Systematics
a matrix with correlations:
|| R | V1 | V2 | ...
| R || 1 | cor(R,V1) | cor(R,V2) | ...
| V1 || cor(V1,R) | 1 | cor(V1,V2) | ...
Where correlation coefficient is obtained as follows
cor(R,V) = sum_{b-st. samples} (R_s - <R>) (V_s - <V>)/Var(R)/Var(V)
Using this matrix one can obtain 'independent' (uncorrelated) sources of systematic uncertainty by changing basis.
See:
https://en.wikipedia.org/wiki/Principal_component_analysis and
https://root.cern.ch/doc/master/classTPrincipal.html
This issue appeared today after pulling from master. It appears while QnToolsSimulationTests is being built.
$ root-config --version
6.20/04
$ root-config --features
cxx17 asimage builtin_clang builtin_llvm builtin_vdt clad dataframe exceptions fftw3 fitsio gdml http mathmore mlp pyroot roofit webgui root7 runtime_cxxmodules shared ssl tmva tmva-pymva spectrum vdt x11
Removing ROOTVecOps from dependencies list fixes the problem. This is weird, because libROOTVecOps.so exists in the system.
I propose:
Dear @kreisl,
I faced a problem with error calculation using bootstrapping in Qn::DataContainerStatCalculate. I read Qn::DataContainerStatCollect (correlations after correlation task) from file, then convert this containers to StatCalculate type and perform resolution calculation. And if I use bootstrap flag for error calculation, I get almost 50% errors on their relative value. At the same time if I switch to propagation error type, I get rather smaller errors. The correlations were filled using 50 samples.
So, can you please tell if I do something wrong, and if not check if there's a bug in error calculation with bootstrapping.
I'm getting out of range error at this line:
Both results_
and is_configured_
have 1 element and is_configure_[0] = false
.
In this situation iterator
is_configured_.end()
. And it gives out of range index for results_
.
I don't know whether this is healthy situation or not.
UPD. This is happening when tree->GetEntries() == 0
Now QnTools enables tests if CMAKE_BUILD_TYPE == Debug
. Lets do a dedicated flag (QnTools_BUILD_TESTS) so we could explicitly switch off tests if QnTools is a part (dependency) of other project.
Hi,
I found something which looks like a bug.
QnTools/src/base/DataContainerHelper.cpp
Line 44 in abe1124
If sum of weights equals to zero, loop is continued and ibin
is not incremented.
Further it is used to get bin ranges:
QnTools/src/base/DataContainerHelper.cpp
Line 47 in abe1124
QnTools/src/base/DataContainerHelper.cpp
Line 53 in abe1124
is it /tests
or ${CMAKE_CURRENT_SOURCE_DIR}
?
Dear all,
In src/dataframe/correlation/CorrelationAction.hpp there is a specific condition in LoopOverBins() function (lines 314 and 325):
if sum of weights is smaller than 1, this entry is not added to correlations.
I wonder if this condition is necessary. And what about case of magnitude normalization, when we can operate with weights smaller than 1?
HeavyIonAnalysis/QnAnalysis#16
Hi,
My installation throws errors during the compilation:
QnAnalysis/build/_deps/qntools-src/include/base/QnTools/DataContainer.hpp:407:12: error: no member named 'set' in namespace 'std'
Proposed solution:
add #include in DataContainer.hpp and#include <TObjString.h> in CorrelationTaskRunner.cpp
Dear @kreisl,
Recently, I faced the problem while attempting to select bins on an axis with non-uniform-width binning. An example of the problem appearance you can find in my repository:
https://github.com/mam-mih-val/qn_tools_test
Please, use the file, attached to the project.
If you try to select the 9 out of 10 initial bins on pT-axis, you see, that bin-edges are biased after the operation. Moreover, the conversion of the container with selected bins into TGraph somehow gives the third version of binning with 5 bins, not similar to the previous two.
I Hope, you can sort it out, or explain if I'm doing something wrong
Cheers,
Mikhail
when cmake prepares build:
Cloning into 'googletest-src'...
fatal: invalid reference: master
change master to main in tests/CMakeLists.txt.in
Hi!
I've recently found that you refactored management of weights for correlation task. So now I have to pass two functions one for correlation itself and another one which evaluates weights.
I have few questions concerning underlying math.
Previously we had OBSERVABLE type and REFERENCE type of Q-vectors. Is there a representation of those types in new version?
You added weights functions into CorrelationFunctions.hpp
. Maybe I'm stupid, but I cannot catch new notation (n2
, nd2
,etc). Can you clarify this? I see also that there is a common ansatz for weights of the form M(M-1)
. Can you also say few words on that?
Thanks a lot!
Hi!
In the condition of the real analysis it may happen so one or few means from bootstrap get nan
.
In this case the nan
-ish bootstrap mean will be propagated to all derivative objects i.e results of arithmetical operations, merges et cetera.
The most annoying thing is that even a single nan
in the vector of bootstrap means ruins statistical error of the bin.
It happens in the StatCalclulate::VarianceOfMeanFromBootstrap
:
I don't know when and where to filter out nan
s and who shall take care of it (keep in mind that user has no access to b-p samples). But I think it make sense to introduce guard to the StatCalclulate::VarianceOfMeanFromBootstrap
. We can lose few samples per bin, but number of samples is usually a large number (for me it's 50), so I guess we can survive this.
Which operations are needed to construct our flow observables? We should document all of them and make sure every path is implemented.
Hi,
In current implementation of the QnTools, the non-uniform binning in QA is not implemented, while it is very important for QA purposes.
QnTools/src/correction/QAHistogram.cpp
Line 90 in f39fe1f
Currently CorrectionManager::AddDetector has integer template parameter N which defines size of raw C++ array for the list of needed harmonics in the argument of AddDetector.
Despite we rarely change this parameter, static-ness of AddDetector conceptually blocks any possibility for complete runtime configuration of correction task.
Segfault occurs on destruction of TFile
in CorrectionManager:
New and old features should be tested to verify they work. Pull request #24 and all of the older calculations need some simple test
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.