GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
TGriffinHit.h
Go to the documentation of this file.
1#ifndef GRIFFINHIT_H
2#define GRIFFINHIT_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
16#include "TDetectorHit.h"
17
18class TGriffinHit : public TDetectorHit {
19public:
20 enum class EGriffinHitBits {
21 kTotalPU1 = 1 << 0,
22 kTotalPU2 = 1 << 1,
24 kPUHit1 = 1 << 2,
25 kPUHit2 = 1 << 3,
26 kBit4 = 1 << 4,
27 kBit5 = 1 << 5,
28 kBit6 = 1 << 6,
29 kBit7 = 1 << 7
30 };
31
34 TGriffinHit(TGriffinHit&&) noexcept = default;
35 TGriffinHit& operator=(const TGriffinHit&) = default;
36 TGriffinHit& operator=(TGriffinHit&&) noexcept = default;
37 explicit TGriffinHit(const TFragment&);
38 ~TGriffinHit() override = default;
39
40private:
41 Int_t fFilter{0}; ///< The Filter Word
42 TTransientBits<UChar_t> fGriffinHitBits; ///< Transient Member Flags
43 Bool_t fBremSuppressed_flag{false}; //!<! Bremsstrahlung Suppression flag.
44
45public:
46 ///////////////////////// Setters /////////////////////////////////////
47 inline void SetFilterPattern(const int& x) { fFilter = x; } //!<!
48
49 ///////////////////////// Getters /////////////////////////////////////
50 inline Int_t GetFilterPattern() const { return fFilter; } //!<!
51 Double_t GetNoCTEnergy(Option_t* opt = "") const;
52
53 ///////////////////////// Recommended Functions/////////////////////////
54
55 ///////////////////////// TChannel Helpers /////////////////////////////////////
56 UShort_t NPileUps() const;
57 UShort_t PUHit() const;
58 void SetNPileUps(UChar_t npileups);
59 void SetPUHit(UChar_t puhit);
60
61 ///////////////////////// /////////////////////////////////////
62
63 inline UShort_t GetArrayNumber() const override { return (4 * (GetDetector() - 1) + (GetCrystal() + 1)); } //!<!
64 // returns a number 1-64 ( 1 = Detector 1 blue; 64 = Detector 16 white; )
65 Bool_t GetIsBremSuppressed() const { return fBremSuppressed_flag; }
66 void SetIsBremSuppressed(const Bool_t& supp_flag) { fBremSuppressed_flag = supp_flag; }
67 void MakeBremSuppressed(const Bool_t& supp_flag) { fBremSuppressed_flag |= supp_flag; }
68
69 bool InFilter(Int_t); //!<!
70
71 static bool CompareEnergy(const TGriffinHit*, const TGriffinHit*); //!<!
72 void Add(const TDetectorHit*) override; //!<!
73
74 void Clear(Option_t* opt = "") override; //!<!
75 void Print(Option_t* opt = "") const override; //!<!
76 void Print(std::ostream& out) const override; //!<!
77 void Copy(TObject&) const override; //!<!
78 void Copy(TObject&, bool) const override; //!<!
79
80 TVector3 GetPosition(double dist) const override; //!<!
81 TVector3 GetPosition() const override;
82
83private:
84 void SetGriffinFlag(EGriffinHitBits, Bool_t set);
85 Double_t GetDefaultDistance() const { return 110.; }
86
87 /// \cond CLASSIMP
88 ClassDefOverride(TGriffinHit, 8); // Information about a GRIFFIN Hit // NOLINT(readability-else-after-return)
89 /// \endcond
90};
91/*! @} */
92#endif
virtual Int_t GetCrystal() const
!
virtual Int_t GetDetector() const
!
void SetFilterPattern(const int &x)
!
Definition TGriffinHit.h:47
Double_t GetDefaultDistance() const
Definition TGriffinHit.h:85
TVector3 GetPosition() const override
!
void Print(Option_t *opt="") const override
!
TTransientBits< UChar_t > fGriffinHitBits
Transient Member Flags.
Definition TGriffinHit.h:42
Bool_t fBremSuppressed_flag
! Bremsstrahlung Suppression flag.
Definition TGriffinHit.h:43
void SetGriffinFlag(EGriffinHitBits, Bool_t set)
TGriffinHit(TGriffinHit &&) noexcept=default
Int_t GetFilterPattern() const
!
Definition TGriffinHit.h:50
static bool CompareEnergy(const TGriffinHit *, const TGriffinHit *)
!
void SetPUHit(UChar_t puhit)
void SetNPileUps(UChar_t npileups)
UShort_t GetArrayNumber() const override
!
Definition TGriffinHit.h:63
Double_t GetNoCTEnergy(Option_t *opt="") const
Int_t fFilter
The Filter Word.
Definition TGriffinHit.h:41
Bool_t GetIsBremSuppressed() const
Definition TGriffinHit.h:65
UShort_t NPileUps() const
void Add(const TDetectorHit *) override
!
void Clear(Option_t *opt="") override
!
UShort_t PUHit() const
void Copy(TObject &) const override
!
bool InFilter(Int_t)
!
void SetIsBremSuppressed(const Bool_t &supp_flag)
Definition TGriffinHit.h:66
void MakeBremSuppressed(const Bool_t &supp_flag)
Definition TGriffinHit.h:67