Project
Loading...
Searching...
No Matches
Tsallis.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
12#include "MathUtils/Tsallis.h"
13#include <cmath>
14
15namespace o2::math_utils
16{
17
18float Tsallis::tsallisCharged(float pt, float mass, float sqrts)
19{
20 const float a = 6.81;
21 const float b = 59.24;
22 const float c = 0.082;
23 const float d = 0.151;
24 const float mt = std::sqrt(mass * mass + pt * pt);
25 const float n = a + b / sqrts;
26 const float T = c + d / sqrts;
27 const float p0 = n * T;
28 return std::pow((1. + mt / p0), -n) * pt;
29}
30
31bool Tsallis::downsampleTsallisCharged(float pt, float factorPt, float sqrts, float& weight, float rnd, float mass)
32{
33 const float prob = tsallisCharged(pt, mass, sqrts);
34 const float probNorm = tsallisCharged(1., mass, sqrts);
35 weight = prob / probNorm;
36 return (rnd * (weight * pt * pt)) < factorPt;
37}
38
39} // namespace o2::math_utils
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char Directory with events to Events directory is and not inside events d
GLdouble n
Definition glcorearb.h:1982
GLuint GLuint GLfloat weight
Definition glcorearb.h:5477
GLboolean GLboolean GLboolean b
Definition glcorearb.h:1233
GLboolean GLboolean GLboolean GLboolean a
Definition glcorearb.h:1233
float float & c
Definition Utils.h:111
static float tsallisCharged(float pt, float mass, float sqrts)
Definition Tsallis.cxx:18
static bool downsampleTsallisCharged(float pt, float factorPt, float sqrts, float &weight, float rnd, float mass=0.13957)
Definition Tsallis.cxx:31