Project
Loading...
Searching...
No Matches
FragmentParam.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_ZDC_FRAGMENTPARAM_H_
13#define ALICEO2_ZDC_FRAGMENTPARAM_H_
14
15#include <Rtypes.h>
16#include <array>
17#include <TF1.h>
18
19namespace o2
20{
21namespace zdc
22{
23
25{
26
27 public:
28 static constexpr int POLDEG = 4; // degree of polyomial for spectator parametrization function
29 static constexpr int NCOEFFS = POLDEG + 1; // number of coefficients
30
32 FragmentParam(std::array<double, NCOEFFS> const& fn, std::array<double, NCOEFFS> const& fp,
33 std::array<double, NCOEFFS> const& sigman, std::array<double, NCOEFFS> const& sigmap);
34
35 void print() const;
36
37 std::array<double, NCOEFFS> const& getParamsfn() const { return mParamfn; }
38 std::array<double, NCOEFFS> const& getParamsfp() const { return mParamfp; }
39 std::array<double, NCOEFFS> const& getParamssigman() const { return mParamsigman; }
40 std::array<double, NCOEFFS> const& getParamssigmap() const { return mParamsigmap; }
41 //
42 TF1 const& getfNeutrons() const { return *mFNeutrons.get(); }
43 TF1 const& getsigmaNeutrons() const { return *mFSigmaNeutrons.get(); }
44 TF1 const& getfProtons() const { return *mFProtons.get(); }
45 TF1 const& getsigmaProtons() const { return *mFSigmaProtons.get(); }
46 //
47 void setParamsfn(std::array<double, NCOEFFS> const& arrvalues);
48 void setParamsfp(std::array<double, NCOEFFS> const& arrvalues);
49 void setParamssigman(std::array<double, NCOEFFS> const& arrvalues);
50 void setParamssigmap(std::array<double, NCOEFFS> const& arrvalues);
51
52 private:
53 std::array<double, NCOEFFS> mParamfn{8.536764, -0.841422, 1.403253, -0.117200, 0.002091};
54 std::array<double, NCOEFFS> mParamsigman{0.689335, -0.238903, 0.044252, -0.003913, 0.000133};
55 std::array<double, NCOEFFS> mParamfp{1.933857, -1.285600, 0.670891, -0.064681, 0.001718};
56 std::array<double, NCOEFFS> mParamsigmap{1.456359, -0.505661, 0.088046, -0.007115, 0.000225};
57
58 // functions
59 void initFunctions();
60
61 std::unique_ptr<TF1> mFNeutrons;
62 std::unique_ptr<TF1> mFSigmaNeutrons;
63 std::unique_ptr<TF1> mFProtons;
64 std::unique_ptr<TF1> mFSigmaProtons;
65
66 ClassDefNV(FragmentParam, 1);
67};
68
69} // namespace zdc
70} // namespace o2
71
72#endif /* ALICEO2_ZDC_FRAGMENTPARAM_H_ */
void setParamsfn(std::array< double, NCOEFFS > const &arrvalues)
std::array< double, NCOEFFS > const & getParamsfp() const
void setParamsfp(std::array< double, NCOEFFS > const &arrvalues)
TF1 const & getfProtons() const
std::array< double, NCOEFFS > const & getParamsfn() const
void setParamssigman(std::array< double, NCOEFFS > const &arrvalues)
void setParamssigmap(std::array< double, NCOEFFS > const &arrvalues)
TF1 const & getfNeutrons() const
static constexpr int POLDEG
TF1 const & getsigmaNeutrons() const
std::array< double, NCOEFFS > const & getParamssigmap() const
std::array< double, NCOEFFS > const & getParamssigman() const
TF1 const & getsigmaProtons() const
static constexpr int NCOEFFS
struct o2::upgrades_utils::@463 zdc
structure to keep FT0 information
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...