CbmRoot
Loading...
Searching...
No Matches
CbmTrdHit.cxx
Go to the documentation of this file.
1/* Copyright (C) 2006-2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Matus Kalisky [committer], Florian Uhlig, Andrey Lebedev */
4
10#include "CbmTrdHit.h"
11
12#include "CbmHit.h" // for kTRDHIT
13
14#include <TVector3.h> // for TVector3
15
16#include <sstream> // for operator<<, basic_ostream, stringstream
17
18using std::endl;
19using std::stringstream;
20
21CbmTrdHit::CbmTrdHit() : CbmPixelHit(), fDefine(0), fNeighborId(-1), fELoss(-1.)
22{
24 SetTime(-1);
25 SetTimeError(-1);
26}
27
28CbmTrdHit::CbmTrdHit(int32_t address, const TVector3& pos, const TVector3& dpos, double dxy, int32_t refId,
29 double eLoss, double time, double timeError)
30 : CbmPixelHit(address, pos, dpos, dxy, refId)
31 , fDefine(0)
32 , fNeighborId(-1)
33 , fELoss(eLoss)
34{
36 SetTime(time);
37 SetTimeError(timeError);
38}
39
41
42std::string CbmTrdHit::ToString() const
43{
44 stringstream ss;
46 ss << "CbmTrdHit" << (GetClassType() ? "2" : "1") << "D: time[ns]=" << GetTime() << "+-" << GetTimeError()
47 << " eloss=" << GetELoss();
48 if (GetClassType()) ss << " Max=" << (GetMaxType() ? "T" : "R");
49 ss << " RC=" << (IsRowCross() ? 'y' : 'n') << " Ovf=" << (HasOverFlow() ? 'y' : 'n') << endl;
50 return ss.str();
51}
52
@ kTRDHIT
Definition CbmHit.h:30
TVector3 dpos
ClassImp(CbmTrdHit)
Class for hits in TRD detector.
void SetTimeError(double error)
Definition CbmHit.h:91
double GetTimeError() const
Definition CbmHit.h:77
double GetTime() const
Definition CbmHit.h:76
void SetType(HitType type)
Sets hit type.
Definition CbmHit.h:112
void SetTime(double time)
Definition CbmHit.h:85
virtual std::string ToString() const
Inherited from CbmBaseHit.
data class for a reconstructed Energy-4D measurement in the TRD
Definition CbmTrdHit.h:40
double GetELoss() const
Definition CbmTrdHit.h:79
bool GetClassType() const
Definition CbmTrdHit.h:80
bool IsRowCross() const
Definition CbmTrdHit.h:83
virtual std::string ToString() const
Inherited from CbmBaseHit.
Definition CbmTrdHit.cxx:42
virtual ~CbmTrdHit()
Destructor.
Definition CbmTrdHit.cxx:40
bool GetMaxType() const
Definition CbmTrdHit.h:81
CbmTrdHit()
Default constructor.
Definition CbmTrdHit.cxx:21
bool HasOverFlow() const
Definition CbmTrdHit.h:82