Project
Loading...
Searching...
No Matches
MathiesonOriginal.cxx
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
16
18
19#include <TMath.h>
20
21namespace o2
22{
23namespace mch
24{
25
26//_________________________________________________________________________________________________
28{
31 mSqrtKx3 = sqrtKx3;
32 mKx2 = TMath::Pi() / 2. * (1. - 0.5 * mSqrtKx3);
33 float cx1 = mKx2 * mSqrtKx3 / 4. / TMath::ATan(static_cast<double>(mSqrtKx3));
34 mKx4 = cx1 / mKx2 / mSqrtKx3;
35}
36
37//_________________________________________________________________________________________________
39{
42 mSqrtKy3 = sqrtKy3;
43 mKy2 = TMath::Pi() / 2. * (1. - 0.5 * mSqrtKy3);
44 float cy1 = mKy2 * mSqrtKy3 / 4. / TMath::ATan(static_cast<double>(mSqrtKy3));
45 mKy4 = cy1 / mKy2 / mSqrtKy3;
46}
47
48//_________________________________________________________________________________________________
49float MathiesonOriginal::integrate(float xMin, float yMin, float xMax, float yMax) const
50{
52
53 xMin *= mInversePitch;
54 xMax *= mInversePitch;
55 yMin *= mInversePitch;
56 yMax *= mInversePitch;
57 //
58 // The Mathieson function
59 double uxMin = mSqrtKx3 * TMath::TanH(mKx2 * xMin);
60 double uxMax = mSqrtKx3 * TMath::TanH(mKx2 * xMax);
61
62 double uyMin = mSqrtKy3 * TMath::TanH(mKy2 * yMin);
63 double uyMax = mSqrtKy3 * TMath::TanH(mKy2 * yMax);
64
65 return static_cast<float>(4. * mKx4 * (TMath::ATan(uxMax) - TMath::ATan(uxMin)) *
66 mKy4 * (TMath::ATan(uyMax) - TMath::ATan(uyMin)));
67}
68
69} // namespace mch
70} // namespace o2
float & yMax
Original definition of the Mathieson function.
void setSqrtKy3AndDeriveKy2Ky4(float sqrtKy3)
void setSqrtKx3AndDeriveKx2Kx4(float sqrtKx3)
float integrate(float xMin, float yMin, float xMax, float yMax) const
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...