GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
TTipHit.h
Go to the documentation of this file.
1#ifndef TTIPHIT_H
2#define TTIPHIT_H
3
4/** \addtogroup Detectors
5 * @{
6 */
7
8#include <cstdio>
9#include <cmath>
10
11#include "TVector3.h"
12
13#include "TFragment.h"
14#include "TChannel.h"
15#include "TPulseAnalyzer.h"
16
17#include "TDetectorHit.h"
18
19class TTipHit : public TDetectorHit {
20public:
21 TTipHit();
22 explicit TTipHit(const TFragment&);
23 TTipHit(const TTipHit&);
24 TTipHit(TTipHit&&) noexcept = default;
25 TTipHit& operator=(const TTipHit&) = default;
26 TTipHit& operator=(TTipHit&&) noexcept = default;
27 ~TTipHit() override = default;
28
29private:
30 Int_t fFilter{0}; //
31 Double_t fPID{0.}; //
32 Int_t fChiSq{0};
33 Int_t fFitType{0};
34
35 // Double_t fFastAmplitude;
36 // Double_t fSlowAmplitude;
37 // Double_t fGammaAmplitude;
38
39 bool csi_flag{true};
40
41 Int_t fTipChannel{0};
42
43 Double_t fTimeFit{0.};
44 Double_t fSig2Noise{0.};
45
46public:
47 ///////////////////////// /////////////////////////////////////
48 inline void SetFilterPattern(const int& x) { fFilter = x; } //!<!
49 inline void SetPID(Double_t x) { fPID = x; } //!<!
50 inline void SetTipChannel(const int x) { fTipChannel = x; } //!<!
51
52 inline Int_t GetFilterPattern() const { return fFilter; } //!<!
53 inline Double_t GetPID() const { return fPID; } //!<!
54 inline Int_t GetFitChiSq() const { return fChiSq; } //!<!
55 inline Double_t GetFitTime() const { return fTimeFit; } //!<!
56 inline Int_t GetFitType() const { return fFitType; } //!<!
57 inline Double_t GetSignalToNoise() const { return fSig2Noise; } //!<!
58 inline Int_t GetTipChannel() const { return fTipChannel; } //!<!
59
60 inline bool IsCsI() const { return csi_flag; } //!<!
61 inline void SetCsI(bool flag = true) { csi_flag = flag; } //!<!
62 inline void SetFitChiSq(int chisq) { fChiSq = chisq; } //!<!
63
64 bool InFilter(Int_t); //!<!
65
66 // void SetVariables(const TFragment &frag) { SetAddress(frag.ChannelAddress);
67 // SetCfd(frag.GetCfd());
68 // SetCharge(frag.GetCharge());
69 // SetTimeStamp(frag.GetTimeStamp()); }
70
72 {
73 TChannel* channel = GetChannel();
74 if(channel == nullptr) {
75 Error("SetDetector", "No TChannel exists for address %u", GetAddress());
76 return;
77 }
78 Int_t tmp = atoi(channel->GetMnemonic()->ArraySubPositionString().c_str());
79 SetTipChannel(10 * channel->GetMnemonic()->ArrayPosition() + tmp);
80 if(channel->GetMnemonic()->SubSystemString().compare(0, 1, "W") == 0) {
81 SetCsI();
82 }
83 }
84
85 void SetWavefit(const TFragment&);
86
87 void SetPID(const TFragment&);
88
89 TVector3 GetPosition() const override;
90
91 void Clear(Option_t* opt = "") override; //!<!
92 void Print(Option_t* opt = "") const override; //!<!
93 void Print(std::ostream& out) const override; //!<!
94 void Copy(TObject&) const override; //!<!
95 void Copy(TObject&, bool) const override; //!<!
96
97 /// \cond CLASSIMP
98 ClassDefOverride(TTipHit, 1); // NOLINT(readability-else-after-return)
99 /// \endcond
100};
101/*! @} */
102#endif
const TMnemonic * GetMnemonic() const
virtual UInt_t GetAddress() const
!
TChannel * GetChannel() const
!
virtual int16_t ArrayPosition() const
Definition TMnemonic.h:66
virtual std::string ArraySubPositionString() const
Definition TMnemonic.h:71
virtual std::string SubSystemString() const
Definition TMnemonic.h:70
bool csi_flag
Definition TTipHit.h:39
Int_t GetFitType() const
!
Definition TTipHit.h:56
Int_t fTipChannel
Definition TTipHit.h:41
TVector3 GetPosition() const override
!
Definition TTipHit.cxx:57
void SetWavefit(const TFragment &)
Definition TTipHit.cxx:91
Double_t GetFitTime() const
!
Definition TTipHit.h:55
void Print(Option_t *opt="") const override
!
Definition TTipHit.cxx:77
void SetFitChiSq(int chisq)
!
Definition TTipHit.h:62
Int_t GetTipChannel() const
!
Definition TTipHit.h:58
TTipHit()
Definition TTipHit.cxx:14
Double_t fSig2Noise
Definition TTipHit.h:44
bool IsCsI() const
!
Definition TTipHit.h:60
void SetTipChannel(const int x)
!
Definition TTipHit.h:50
void Copy(TObject &) const override
!
Definition TTipHit.cxx:36
void SetFilterPattern(const int &x)
!
Definition TTipHit.h:48
bool InFilter(Int_t)
!
Definition TTipHit.cxx:62
Int_t GetFilterPattern() const
!
Definition TTipHit.h:52
Int_t GetFitChiSq() const
!
Definition TTipHit.h:54
Int_t fChiSq
Definition TTipHit.h:32
Double_t GetPID() const
!
Definition TTipHit.h:53
void SetCsI(bool flag=true)
!
Definition TTipHit.h:61
void Clear(Option_t *opt="") override
!
Definition TTipHit.cxx:69
TTipHit(TTipHit &&) noexcept=default
Int_t fFitType
Definition TTipHit.h:33
Double_t fTimeFit
Definition TTipHit.h:43
void SetPID(Double_t x)
!
Definition TTipHit.h:49
Double_t GetSignalToNoise() const
!
Definition TTipHit.h:57
Double_t fPID
Definition TTipHit.h:31
void SetUpNumbering(TChannel *)
Definition TTipHit.h:71
Int_t fFilter
Definition TTipHit.h:30