CbmRoot
Loading...
Searching...
No Matches
CaTimesliceHeader.h
Go to the documentation of this file.
1/* Copyright (C) 2024 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Sergei Zharko [committer] */
4
9
10#pragma once
11
12#include <string>
13
14namespace cbm::algo::ca
15{
19 public:
21 float& End() { return fEnd; }
22 float End() const { return fEnd; }
23
25 float& Start() { return fStart; }
26 float Start() const { return fStart; }
27
29 std::string ToString() const;
30
32 float ConvToTau(float time) const { return (time - fStart) / (fEnd - fStart); }
33
35 float ConvToNs(float tau) const { return fStart + tau * (fEnd - fStart); }
36
37 private:
38 float fStart;
39 float fEnd;
40 };
41} // namespace cbm::algo::ca
Structure for keeping the current information on the timeslice.
float ConvToTau(float time) const
Converts time from ns to tau.
float & End()
Accesses the end of timeslice [ns].
float & Start()
Accesses the start of timeslice [ns].
float fStart
Start of timeslice.
float ConvToNs(float tau) const
Converts time from tau to ns.
std::string ToString() const
String representation of the contents.
TODO: SZh 8.11.2022: add selection of parameterisation.
Definition CaBranch.h:14