BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
CbmBaseHit.h
Go to the documentation of this file.
1
/**
2
* \file CbmBaseHit.h
3
* \author Andrey Lebedev <andrey.lebedev@gsi.de>
4
* \date 2009
5
*
6
* Base class for hits used for tracking in CBM.
7
* Derives from TObject.
8
* Each hit has its unique identifier of type HitType_o,
9
* which can be later use for safe type casting.
10
**/
11
#ifndef CBMBASEHIT_H_
12
#define CBMBASEHIT_H_
13
14
enum
HitType_o
15
{
16
kHIT_o
,
17
kPIXELHIT_o
,
18
kSTRIPHIT_o
,
19
kSTSHIT_o
,
20
kMVDHIT_o
,
21
kRICHHIT_o
,
22
kMUCHPIXELHIT_o
,
23
kMUCHSTRAWHIT_o
,
24
kTRDHIT_o
,
25
kTOFHIT_o
,
26
kECALHIT_o
27
};
28
29
#include "
TObject.h
"
30
31
#include <string>
32
using
std::string;
33
class
FairMultiLinkedData
;
34
35
class
CbmBaseHit
:
public
TObject
36
{
37
public
:
38
/**
39
* \brief Default constructor.
40
*/
41
CbmBaseHit
();
42
43
/**
44
* \brief Destructor.
45
*/
46
virtual
~CbmBaseHit
();
47
48
/* Accessors */
49
HitType_o
GetType
()
const
{
return
fType
; }
50
Double_t
GetZ
()
const
{
return
fZ
; }
51
Double_t
GetDz
()
const
{
return
fDz
; }
52
Int_t
GetRefId
()
const
{
return
fRefId
; }
53
Int_t
GetAddress
()
const
{
return
fAddress
; }
54
FairMultiLinkedData
*
GetLinks
()
const
{
return
fLinks
; }
55
56
/* Setters */
57
void
SetZ
(
Double_t
z) {
fZ
= z; }
58
void
SetDz
(
Double_t
dz) {
fDz
= dz; }
59
void
SetRefId
(
Int_t
refId) {
fRefId
= refId; }
60
void
SetAddress
(
Int_t
address) {
fAddress
= address; }
61
void
SetLinks
(
FairMultiLinkedData
* links) {
fLinks
= links; }
62
63
/**
64
* Pure virtual function. Must be implemented in derived class.
65
* Should return plane identifier of the hit. Usually this is station or layer
66
* number of the detector. Can be calculated using unique detector identifier
67
* or can use additional class member from the derived class to store the plane identifier.
68
**/
69
virtual
Int_t
GetPlaneId
()
const
= 0;
70
71
/**
72
* \brief Pure virtual function. Must be implemented in derived class.
73
* Has to return string representation of the object.
74
**/
75
virtual
string
ToString
()
const
= 0;
76
77
protected
:
78
/**
79
* \brief Sets hit type.
80
* \param type hit type
81
**/
82
void
SetType
(
HitType_o
type) {
fType
= type; }
83
84
CbmBaseHit
(
const
CbmBaseHit
&);
85
CbmBaseHit
&
operator=
(
const
CbmBaseHit
&);
86
87
private
:
88
HitType_o
fType
;
///< hit type
89
Double_t
fZ
;
///< Z position of hit [cm]
90
Double_t
fDz
;
///< Z position error [cm]
91
Int_t
fRefId
;
///< some reference id (usually to cluster, digi or MC point)
92
Int_t
fAddress
;
///< detector unique identifier
93
FairMultiLinkedData
*
fLinks
;
///< Monte-Carlo link collection
94
95
ClassDef
(
CbmBaseHit
, 1);
96
};
97
98
#endif
/* CBMBASEHIT_H_ */
Int_t
int Int_t
Double_t
double Double_t
ClassDef
#define ClassDef(name, id)
TObject.h
HitType_o
HitType_o
Definition
CbmBaseHit.h:15
kECALHIT_o
@ kECALHIT_o
Definition
CbmBaseHit.h:26
kMUCHSTRAWHIT_o
@ kMUCHSTRAWHIT_o
Definition
CbmBaseHit.h:23
kSTRIPHIT_o
@ kSTRIPHIT_o
Definition
CbmBaseHit.h:18
kTOFHIT_o
@ kTOFHIT_o
Definition
CbmBaseHit.h:25
kHIT_o
@ kHIT_o
Definition
CbmBaseHit.h:16
kPIXELHIT_o
@ kPIXELHIT_o
Definition
CbmBaseHit.h:17
kMUCHPIXELHIT_o
@ kMUCHPIXELHIT_o
Definition
CbmBaseHit.h:22
kSTSHIT_o
@ kSTSHIT_o
Definition
CbmBaseHit.h:19
kRICHHIT_o
@ kRICHHIT_o
Definition
CbmBaseHit.h:21
kTRDHIT_o
@ kTRDHIT_o
Definition
CbmBaseHit.h:24
kMVDHIT_o
@ kMVDHIT_o
Definition
CbmBaseHit.h:20
CbmBaseHit
Definition
CbmBaseHit.h:36
CbmBaseHit::GetZ
Double_t GetZ() const
Definition
CbmBaseHit.h:50
CbmBaseHit::GetDz
Double_t GetDz() const
Definition
CbmBaseHit.h:51
CbmBaseHit::operator=
CbmBaseHit & operator=(const CbmBaseHit &)
Definition
CbmBaseHit.cxx:36
CbmBaseHit::GetAddress
Int_t GetAddress() const
Definition
CbmBaseHit.h:53
CbmBaseHit::fDz
Double_t fDz
Z position error [cm].
Definition
CbmBaseHit.h:90
CbmBaseHit::SetLinks
void SetLinks(FairMultiLinkedData *links)
Definition
CbmBaseHit.h:61
CbmBaseHit::SetRefId
void SetRefId(Int_t refId)
Definition
CbmBaseHit.h:59
CbmBaseHit::fZ
Double_t fZ
Z position of hit [cm].
Definition
CbmBaseHit.h:89
CbmBaseHit::GetPlaneId
virtual Int_t GetPlaneId() const =0
Pure virtual function.
CbmBaseHit::GetRefId
Int_t GetRefId() const
Definition
CbmBaseHit.h:52
CbmBaseHit::SetDz
void SetDz(Double_t dz)
Definition
CbmBaseHit.h:58
CbmBaseHit::GetLinks
FairMultiLinkedData * GetLinks() const
Definition
CbmBaseHit.h:54
CbmBaseHit::SetZ
void SetZ(Double_t z)
Definition
CbmBaseHit.h:57
CbmBaseHit::fLinks
FairMultiLinkedData * fLinks
Monte-Carlo link collection.
Definition
CbmBaseHit.h:93
CbmBaseHit::GetType
HitType_o GetType() const
Definition
CbmBaseHit.h:49
CbmBaseHit::CbmBaseHit
CbmBaseHit()
Default constructor.
Definition
CbmBaseHit.cxx:12
CbmBaseHit::SetAddress
void SetAddress(Int_t address)
Definition
CbmBaseHit.h:60
CbmBaseHit::fRefId
Int_t fRefId
some reference id (usually to cluster, digi or MC point)
Definition
CbmBaseHit.h:91
CbmBaseHit::ToString
virtual string ToString() const =0
Pure virtual function.
CbmBaseHit::fAddress
Int_t fAddress
detector unique identifier
Definition
CbmBaseHit.h:92
CbmBaseHit::fType
HitType_o fType
hit type
Definition
CbmBaseHit.h:88
CbmBaseHit::~CbmBaseHit
virtual ~CbmBaseHit()
Destructor.
Definition
CbmBaseHit.cxx:59
CbmBaseHit::SetType
void SetType(HitType_o type)
Sets hit type.
Definition
CbmBaseHit.h:82
FairMultiLinkedData
TObject::TObject
TObject()
HitType_o
HitType_o
Definition
CbmBaseHit.h:15
base
cbm
CbmBaseHit.h
Generated on
for BmnRoot by
1.17.0