Project
Loading...
Searching...
No Matches
FlowMapper.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
12#ifndef ALICEO2_EVENTGEN_FLOWMAPPER_H_
13#define ALICEO2_EVENTGEN_FLOWMAPPER_H_
14
15#include "TH1D.h"
16#include "TH3D.h"
17#include "TF1.h"
18
19namespace o2
20{
21namespace eventgen
22{
23
24/*****************************************************************/
25/*****************************************************************/
26
27// this class implements a mapper that introduces a synthetic v2
28// into an otherwise uniform initial distribution of phis. It can
29// be used, for instance, to create artificial flow of realistic
30// intensity in PYTHIA simulations.
31
32// The input histograms are to be read from the CCDB and can
33// be customized if necessary. Multiple copies of this mapper
34// could be used in case different species should have different
35// additional flow.
36
37// N.B.: the main advantages of this mapper is that:
38// 1) it preserves total number of particles
39// 2) it retains a (distorted) event structure from
40// an original event generator (e.g. PYTHIA)
41
43{
44 public:
45 // Constructor
46 FlowMapper();
47
48 void SetNBinsPhi(long mBinsPhiProvided) { mBinsPhi = mBinsPhiProvided; };
49 void SetPrecision(long mPrecisionProvided) { mPrecision = mPrecisionProvided; };
50 void SetDerivative(long mDerivativeProvided) { mDerivative = mDerivativeProvided; };
51
52 void CreateLUT(TH1D* mhv2vsPt, TH1D* mhEccVsB);
53
54 Double_t MapPhi(Double_t lPhiInput, Double_t b, Double_t pt);
55
56 long mBinsPhi; // number of phi bins to use
57 double mPrecision = 1e-6; // precision threshold for numerical inversion success
58 double mDerivative = 1e-4; // delta-X for derivative calculation
59
60 // Cumulative function to be inverted
61 std::unique_ptr<TF1> mCumulative;
62
63 // the look-up table
64 std::unique_ptr<TH3D> mhLUT;
65
67};
68
69/*****************************************************************/
70/*****************************************************************/
71
72} // namespace eventgen
73} // namespace o2
74
75#endif /* ALICEO2_EVENTGEN_FLOWMAPPER_H_ */
std::unique_ptr< TF1 > mCumulative
Definition FlowMapper.h:61
std::unique_ptr< TH3D > mhLUT
Definition FlowMapper.h:64
void SetNBinsPhi(long mBinsPhiProvided)
Definition FlowMapper.h:48
void SetPrecision(long mPrecisionProvided)
Definition FlowMapper.h:49
ClassDef(FlowMapper, 1)
void CreateLUT(TH1D *mhv2vsPt, TH1D *mhEccVsB)
void SetDerivative(long mDerivativeProvided)
Definition FlowMapper.h:50
Double_t MapPhi(Double_t lPhiInput, Double_t b, Double_t pt)
GLboolean GLboolean GLboolean b
Definition glcorearb.h:1233
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...