BmnRoot
Loading...
Searching...
No Matches
BmnSsdHit.cxx
Go to the documentation of this file.
1
8#include "BmnSsdHit.h"
9
10#include <iomanip>
11#include <sstream>
12
13using namespace std;
14
15// ----- Default constructor
17 : BmnPixelHit()
18 , fFrontClusterId(-1)
19 , fBackClusterId(-1)
20 , fDu(-1.)
21 , fDv(-1.)
22{
23 SetTime(-1.);
24 SetTimeError(-1.);
25}
26
27
28
29// ----- Constructor with parameters
30BmnSsdHit::BmnSsdHit(Int_t address, const TVector3& pos, const TVector3& dpos,
31 Double_t dxy, Int_t frontClusterId, Int_t backClusterId,
32 Double_t time, Double_t timeError, Double_t du,
33 Double_t dv)
34 : BmnPixelHit(address, pos, dpos, dxy, -1)
35 , fFrontClusterId(frontClusterId)
36 , fBackClusterId(backClusterId)
37 , fDu(du)
38 , fDv(dv)
39{
40 SetTime(time);
41 SetTimeError(timeError);
42}
43
44
45
46// ----- Destructor
50
51
52// --- String output
53string BmnSsdHit::ToString() const {
54 stringstream ss;
55 ss << "SsdHit: address " << GetAddress() << " | time " << GetTime()
56 << " +- " << GetTimeError()
57 << " | Position (" << std::setprecision(6) << GetX() << ", " << GetY()
58 << ", " << GetZ() << ") cm | Error (" << GetDx() << ", " << GetDy()
59 << ", " << GetDz() << ") cm";
60 return ss.str();
61}
Data class for a reconstructed hit in the SSD.
Double_t GetTime() const
Definition BmnBaseHit.h:69
void SetTimeError(Double_t error)
Definition BmnBaseHit.h:82
void SetTime(Double_t time)
Definition BmnBaseHit.h:78
Double_t GetTimeError() const
Definition BmnBaseHit.h:70
Double_t GetZ() const
Definition BmnBaseHit.h:64
Int_t GetAddress() const
Definition BmnBaseHit.h:67
Double_t GetDz() const
Definition BmnBaseHit.h:65
Double_t GetX() const
Definition BmnPixelHit.h:85
Double_t GetDy() const
Definition BmnPixelHit.h:88
Double_t GetY() const
Definition BmnPixelHit.h:86
Double_t GetDx() const
Definition BmnPixelHit.h:87
virtual std::string ToString() const
Definition BmnSsdHit.cxx:53
virtual ~BmnSsdHit()
Definition BmnSsdHit.cxx:47
STL namespace.