Project
Loading...
Searching...
No Matches
TrackLTIntegral.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#ifndef GPUCA_GPUCODE_DEVICE
13#include <cstdint>
14#endif
15
18#include "MathUtils/Utils.h"
19
20namespace o2
21{
22namespace track
23{
24
25//_____________________________________________________
27{
28#ifndef GPUCA_GPUCODE_DEVICE
29 printf("L(cm): %6.2f, X2X0: %e XRho: %e TOF(ps): ", getL(), getX2X0(), getXRho());
30 if (isTimeNotNeeded()) {
31 printf(" Times not filled");
32 } else {
33 for (int i = 0; i < getNTOFs(); i++) {
34 printf(" %7.1f |", getTOF(i));
35 }
36 }
37 printf("\n");
38#endif
39}
40
41//_____________________________________________________
42GPUd() void TrackLTIntegral::addStep(float dL, float p2Inv)
43{
45 mL += dL;
46 if (isTimeNotNeeded()) {
47 return;
48 }
49 const float dTns = dL * 1000.f / o2::constants::physics::LightSpeedCm2NS; // time change in ps for beta = 1 particle
50 for (int id = 0; id < getNTOFs(); id++) {
51 const float m2z = track::PID::getMass2Z(id);
52 const float betaInv = math_utils::sqrt(1.f + m2z * m2z * p2Inv);
53 mT[id] += dTns * betaInv;
54 }
55}
56
57} // namespace track
58} // namespace o2
General auxilliary methods.
void print() const
int32_t i
Header to collect physics constants.
Track Length and TOF integral.
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
GLuint id
Definition glcorearb.h:650
constexpr float LightSpeedCm2NS
GPUd() value_T BetheBlochSolid(value_T bg
Definition TrackUtils.h:150
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...