CbmRoot
CbmStsHit.cxx
Go to the documentation of this file.
1 
10 #include "CbmStsHit.h"
11 
12 #include <TVector3.h> // for TVector3
13 
14 #include <iomanip> // for operator<<, setprecision
15 #include <sstream> // for operator<<, basic_ostream, char_traits
16 
17 using namespace std;
18 
19 // ----- Default constructor
21  : CbmPixelHit(), fFrontClusterId(-1), fBackClusterId(-1), fDu(-1.), fDv(-1.) {
22  SetTime(-1.);
23  SetTimeError(-1.);
24 }
25 
26 
27 // ----- Constructor with parameters
28 CbmStsHit::CbmStsHit(Int_t address,
29  const TVector3& pos,
30  const TVector3& dpos,
31  Double_t dxy,
32  Int_t frontClusterId,
33  Int_t backClusterId,
34  Double_t time,
35  Double_t timeError,
36  Double_t du,
37  Double_t dv)
38  : CbmPixelHit(address, pos, dpos, dxy, -1)
39  , fFrontClusterId(frontClusterId)
40  , fBackClusterId(backClusterId)
41  , fDu(du)
42  , fDv(dv) {
43  SetTime(time);
44  SetTimeError(timeError);
45 }
46 
47 
48 // ----- Destructor
50 
51 
52 // --- String output
53 string CbmStsHit::ToString() const {
54  stringstream ss;
55  ss << "StsHit: address " << GetAddress() << " | time " << GetTime() << " +- "
56  << GetTimeError() << " | Position (" << std::setprecision(6) << GetX()
57  << ", " << GetY() << ", " << GetZ() << ") cm | Error (" << GetDx() << ", "
58  << GetDy() << ", " << GetDz() << ") cm | Cluster (" << fFrontClusterId
59  << ", " << fBackClusterId << ")";
60  return ss.str();
61 }
62 
63 
CbmHit::GetZ
Double_t GetZ() const
Definition: CbmHit.h:70
CbmPixelHit::GetX
Double_t GetX() const
Definition: CbmPixelHit.h:83
CbmPixelHit::GetY
Double_t GetY() const
Definition: CbmPixelHit.h:84
CbmPixelHit::GetDx
Double_t GetDx() const
Definition: CbmPixelHit.h:85
CbmStsHit::~CbmStsHit
virtual ~CbmStsHit()
Definition: CbmStsHit.cxx:49
CbmPixelHit::GetDy
Double_t GetDy() const
Definition: CbmPixelHit.h:86
CbmHit::GetTimeError
Double_t GetTimeError() const
Definition: CbmHit.h:76
CbmStsHit
data class for a reconstructed 3-d hit in the STS
Definition: CbmStsHit.h:31
CbmStsHit::fFrontClusterId
Int_t fFrontClusterId
Cluster index front side.
Definition: CbmStsHit.h:112
dpos
TVector3 dpos
Definition: CbmMvdSensorDigiToHitTask.cxx:61
CbmHit::GetTime
Double_t GetTime() const
Definition: CbmHit.h:75
CbmHit::GetAddress
Int_t GetAddress() const
Definition: CbmHit.h:73
ClassImp
ClassImp(CbmConverterManager) InitStatus CbmConverterManager
Definition: CbmConverterManager.cxx:12
CbmHit::SetTimeError
void SetTimeError(Double_t error)
Definition: CbmHit.h:89
CbmStsHit::ToString
virtual std::string ToString() const
Definition: CbmStsHit.cxx:53
CbmHit::SetTime
void SetTime(Double_t time)
Definition: CbmHit.h:84
CbmStsHit::fBackClusterId
Int_t fBackClusterId
Cluster index back side.
Definition: CbmStsHit.h:113
CbmStsHit::CbmStsHit
CbmStsHit()
Definition: CbmStsHit.cxx:20
pos
TVector3 pos
Definition: CbmMvdSensorDigiToHitTask.cxx:60
CbmPixelHit
Definition: CbmPixelHit.h:21
CbmHit::GetDz
Double_t GetDz() const
Definition: CbmHit.h:71
CbmStsHit.h
Data class for a reconstructed hit in the STS.