CbmRoot
Loading...
Searching...
No Matches
CbmStsSignal.h
Go to the documentation of this file.
1/* Copyright (C) 2014-2019 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Volker Friese [committer] */
4
10#ifndef CBMSTSSIGNAL_H
11#define CBMSTSSIGNAL_H 1
12
13#include "CbmMatch.h"
14
15#include "TObject.h"
16
17
32class CbmStsSignal : public TObject {
33
34public:
42 CbmStsSignal(Double_t time = 0., Double_t charge = 0., Int_t index = 0, Int_t entry = -1, Int_t file = -1);
43
44
46 virtual ~CbmStsSignal();
47
48
55 void AddLink(Double_t charge, Int_t index, Int_t entry = -1, Int_t file = -1)
56 {
57 fMatch.AddLink(charge, index, entry, file);
58 }
59
60
64 Double_t GetCharge() const { return fMatch.GetTotalWeight(); }
65
66
70 const CbmMatch& GetMatch() const { return fMatch; }
71
72
76 Double_t GetTime() const { return fTime; }
77
78
82 void SetTime(Double_t time) { fTime = time; }
83
84
89 bool operator<(const CbmStsSignal& otherSignal) const { return (fTime < otherSignal.GetTime()); }
90
91
96 struct Before {
97 bool operator()(CbmStsSignal* signal1, CbmStsSignal* signal2) const
98 {
99 return (signal1->GetTime() < signal2->GetTime());
100 }
101 };
102
103private:
104 Double_t fTime;
106
108};
109
110#endif /* CBMSTSSIGNAL_H */
void AddLink(const CbmLink &newLink)
Definition CbmMatch.cxx:47
double GetTotalWeight() const
Definition CbmMatch.h:43
Data class for an analog signal in the STS.
CbmMatch fMatch
Match object (total weight = charge)
CbmStsSignal(Double_t time=0., Double_t charge=0., Int_t index=0, Int_t entry=-1, Int_t file=-1)
const CbmMatch & GetMatch() const
ClassDef(CbmStsSignal, 1)
void SetTime(Double_t time)
Double_t GetCharge() const
bool operator<(const CbmStsSignal &otherSignal) const
void AddLink(Double_t charge, Int_t index, Int_t entry=-1, Int_t file=-1)
Double_t GetTime() const
virtual ~CbmStsSignal()
Double_t fTime
Signal time [ns].
bool operator()(CbmStsSignal *signal1, CbmStsSignal *signal2) const