CbmRoot
Loading...
Searching...
No Matches
CbmStsCluster.h
Go to the documentation of this file.
1/* Copyright (C) 2008-2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Volker Friese, Anna Kotynia [committer] */
4
16#ifndef CBMSTSCLUSTER_H
17#define CBMSTSCLUSTER_H 1
18
19#include "CbmCluster.h" // for CbmCluster
20
21#include <Rtypes.h> // for ClassDef
22
23#include <cstdint>
24#include <string> // for string
25
35class CbmStsCluster : public CbmCluster {
36
37public:
42
43
45 CbmStsCluster(const CbmStsCluster&) = default;
46
47
51 virtual ~CbmStsCluster();
52
53
59 double GetCharge() const { return fCharge; }
60
61
65 int32_t GetIndex() const { return fIndex; }
66
67
71 double GetPosition() const { return fPosition; }
72
73
77 double GetPositionError() const { return fPositionError; }
78
79
86 int32_t GetSize() const { return fSize; }
87
88
94 double GetTime() const { return fTime; }
95
96
100 double GetTimeError() const { return fTimeError; }
101
102
107 void SetIndex(int32_t index) { fIndex = index; }
108
109
113 void SetPositionError(double error) { fPositionError = error; }
114
115
123 void SetProperties(double charge, double position, double positionError, double time = 0., double timeError = 0.)
124 {
125 fCharge = charge;
126 fPosition = position;
127 fPositionError = positionError;
128 fTime = time;
129 fTimeError = timeError;
130 }
131
132
139 void SetSize(int32_t size) { fSize = size; }
140
141
143 virtual std::string ToString() const;
144
145
146private:
147 double fCharge;
148 int32_t fSize;
149 double fPosition;
151 double fTime;
152 double fTimeError;
153 int32_t fIndex;
154
155
157};
158
159#endif
Base class for cluster objects.
static constexpr size_t size()
Definition KfSimdPseudo.h:2
Base class for cluster objects.
Definition CbmCluster.h:30
Data class for STS clusters.
double GetPositionError() const
Cluster position error @value Error (r.m.s.) of cluster position in channel number units.
double GetCharge() const
Get cluster charge @value Total cluster charge [e].
double fCharge
Total charge.
int32_t GetSize() const
Set size of the cluster (number of channels) @value size Number of channels from first to last.
void SetSize(int32_t size)
Set size of the cluster (number of channels)
virtual std::string ToString() const
double fTimeError
Error of cluster time [ns].
double fPosition
Cluster centre in channel number units.
ClassDef(CbmStsCluster, 7)
void SetPositionError(double error)
Set the position error.
double fTime
Cluster time (average of digi times) [ns].
CbmStsCluster()
Default constructor.
double GetTime() const
Get cluster time.
int32_t fIndex
Index of cluster in input array.
double GetPosition() const
Cluster position @value Cluster position in channel number units.
void SetIndex(int32_t index)
Set cluster index To keep track of the input during hit finding.
int32_t GetIndex() const
Get cluster index.
virtual ~CbmStsCluster()
Destructor.
int32_t fSize
Difference between first and last channel.
void SetProperties(double charge, double position, double positionError, double time=0., double timeError=0.)
CbmStsCluster(const CbmStsCluster &)=default
Copy constructor.
double GetTimeError() const
Get error of cluster time.
double fPositionError
Cluster centre error (r.m.s.) in channel number units.