CbmRoot
Loading...
Searching...
No Matches
CbmLitPixelHit.h
Go to the documentation of this file.
1/* Copyright (C) 2008-2013 GSI/JINR-LIT, Darmstadt/Dubna
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Andrey Lebedev [committer] */
4
12#ifndef CBMLITPIXELHIT_H_
13#define CBMLITPIXELHIT_H_
14
15#include "data/CbmLitHit.h"
16
17#include <sstream>
18#include <string>
19
26class CbmLitPixelHit : public CbmLitHit {
27 public:
31 CbmLitPixelHit() : fX(0.), fY(0.), fDx(0.), fDy(0.), fDxy(0.) { SetHitType(kLITPIXELHIT); }
32
36 virtual ~CbmLitPixelHit(){};
37
38 /* Getters */
39 litfloat GetX() const { return fX; }
40 litfloat GetY() const { return fY; }
41 litfloat GetDx() const { return fDx; }
42 litfloat GetDy() const { return fDy; }
43 litfloat GetDxy() const { return fDxy; }
44
45 /* Setters */
46 void SetX(litfloat x) { fX = x; }
47 void SetY(litfloat y) { fY = y; }
48 void SetDx(litfloat dx) { fDx = dx; }
49 void SetDy(litfloat dy) { fDy = dy; }
50 void SetDxy(litfloat dxy) { fDxy = dxy; }
51
56 virtual std::string ToString() const
57 {
58 std::stringstream ss;
59 ss << "PixelHit: pos=(" << GetX() << "," << GetY() << "," << GetZ() << ") err=(" << GetDx() << "," << GetDy() << ","
60 << GetDz() << ") "
61 << " dxy=" << GetDxy() << " refId=" << GetRefId() << " hitType=" << GetType() << " detId=" << GetSystem()
62 << " station=" << GetStation() << std::endl;
63 return ss.str();
64 }
65
66 private:
67 litfloat fX, fY; // X and Y hit positions in [cm].
68 litfloat fDx, fDy; // X and Y hit position errors in [cm].
69 litfloat fDxy; // XY covariance.
70};
71
72#endif /*CBMLITPIXELHIT_H_*/
@ kLITPIXELHIT
Definition CbmLitEnums.h:21
double litfloat
Definition CbmLitFloat.h:19
Base data class for hits.
Base data class for hits.
Definition CbmLitHit.h:29
LitSystemId GetSystem() const
Definition CbmLitHit.h:48
litfloat GetZ() const
Definition CbmLitHit.h:44
void SetHitType(LitHitType hitType)
Definition CbmLitHit.h:53
LitHitType GetType() const
Definition CbmLitHit.h:43
litfloat GetDz() const
Definition CbmLitHit.h:45
Int_t GetStation() const
Definition CbmLitHit.h:49
Int_t GetRefId() const
Definition CbmLitHit.h:42
Base data class for pixel hits.
litfloat GetDxy() const
void SetY(litfloat y)
litfloat GetDy() const
void SetDx(litfloat dx)
void SetDxy(litfloat dxy)
virtual std::string ToString() const
Return string representation of class.
CbmLitPixelHit()
Constructor.
void SetDy(litfloat dy)
litfloat GetX() const
void SetX(litfloat x)
litfloat GetY() const
litfloat GetDx() const
virtual ~CbmLitPixelHit()
Destructor.