BmnRoot
Loading...
Searching...
No Matches
BmnBaseHit.h
Go to the documentation of this file.
1
12#ifndef BMNBASEHIT_H_
13#define BMNBASEHIT_H_
14
28
29#include "TObject.h"
30
31#include <string>
32
33class BmnMatch;
34
35class BmnBaseHit : public TObject
36{
37public:
41 BmnBaseHit();
42
53 BmnBaseHit(HitType _type, Double_t _z, Double_t _dz,
54 Int_t _refId, Int_t _address,
55 Double_t _time=-1., Double_t _timeError=-1.);
56
60 virtual ~BmnBaseHit();
61
62 /* Accessors */
63 HitType GetType() const { return fType; }
64 Double_t GetZ() const { return fZ; }
65 Double_t GetDz() const { return fDz; }
66 Int_t GetRefId() const { return fRefId; }
67 Int_t GetAddress() const { return fAddress; }
68 BmnMatch* GetMatch() const { return fMatch; }
69 Double_t GetTime() const { return fTime; }
70 Double_t GetTimeError() const { return fTimeError; }
71
72 /* Setters */
73 void SetZ(Double_t z) { fZ = z; }
74 void SetDz(Double_t dz) { fDz = dz; }
75 void SetRefId(Int_t refId) { fRefId = refId; }
76 void SetAddress(Int_t address) { fAddress = address; }
77 void SetMatch(BmnMatch* match);
78 void SetTime(Double_t time) { fTime = time; }
79 void SetTime(Double_t time, Double_t error) {
80 fTime = time; fTimeError = error;
81 }
82 void SetTimeError(Double_t error) { fTimeError = error; }
83
90 virtual Int_t GetPlaneId() const { return -1; }
91
96 virtual std::string ToString() const { return "Has to be implemented in derrived class"; }
97
98protected:
103 void SetType(HitType type) { fType = type; }
104 BmnBaseHit(const BmnBaseHit&);
106
107
108
109private:
110 HitType fType;
111 Double_t fZ;
112 Double_t fDz;
113 Int_t fRefId;
114 Int_t fAddress;
115 Double_t fTime;
116 Double_t fTimeError;
117 BmnMatch* fMatch;
118
119 ClassDef(BmnBaseHit, 3);
120};
121
122#endif /* BMNBASEHIT_H_ */
HitType
Definition BmnBaseHit.h:15
@ kHIT
Definition BmnBaseHit.h:16
@ kMUCHSTRAWHIT
Definition BmnBaseHit.h:23
@ kTOFHIT
Definition BmnBaseHit.h:25
@ kPIXELHIT
Definition BmnBaseHit.h:17
@ kSSDHIT
Definition BmnBaseHit.h:19
@ kMVDHIT
Definition BmnBaseHit.h:20
@ kTRDHIT
Definition BmnBaseHit.h:24
@ kSTRIPHIT
Definition BmnBaseHit.h:18
@ kRICHHIT
Definition BmnBaseHit.h:21
@ kECALHIT
Definition BmnBaseHit.h:26
@ kMUCHPIXELHIT
Definition BmnBaseHit.h:22
BmnBaseHit()
Default constructor.
Double_t GetTime() const
Definition BmnBaseHit.h:69
void SetTimeError(Double_t error)
Definition BmnBaseHit.h:82
void SetRefId(Int_t refId)
Definition BmnBaseHit.h:75
void SetAddress(Int_t address)
Definition BmnBaseHit.h:76
BmnMatch * GetMatch() const
Definition BmnBaseHit.h:68
void SetTime(Double_t time, Double_t error)
Definition BmnBaseHit.h:79
virtual std::string ToString() const
Virtual function. Must be implemented in derived class. Has to return string representation of the ob...
Definition BmnBaseHit.h:96
void SetTime(Double_t time)
Definition BmnBaseHit.h:78
HitType GetType() const
Definition BmnBaseHit.h:63
Double_t GetTimeError() const
Definition BmnBaseHit.h:70
Double_t GetZ() const
Definition BmnBaseHit.h:64
void SetDz(Double_t dz)
Definition BmnBaseHit.h:74
void SetMatch(BmnMatch *match)
Int_t GetAddress() const
Definition BmnBaseHit.h:67
Int_t GetRefId() const
Definition BmnBaseHit.h:66
void SetZ(Double_t z)
Definition BmnBaseHit.h:73
void SetType(HitType type)
Sets hit type.
Definition BmnBaseHit.h:103
virtual ~BmnBaseHit()
Destructor.
virtual Int_t GetPlaneId() const
Definition BmnBaseHit.h:90
Double_t GetDz() const
Definition BmnBaseHit.h:65
BmnBaseHit & operator=(const BmnBaseHit &)