ARTEMIS-CRIB
 
Loading...
Searching...
No Matches
TTelescopeData.h
Go to the documentation of this file.
1/**
2 * @file TTelescopeData.h
3 * @brief
4 * @author Kodai Okawa <okawa@cns.s.u-tokyo.ac.jp>
5 * @date 2024-01-17 17:11:50
6 * @note last modified: 2025-01-08 10:36:09
7 * @details
8 */
9
10#ifndef _CRIB_TTELESCOPEDATA_H_
11#define _CRIB_TTELESCOPEDATA_H_
12
13#include "TArtTypes.h"
14#include <TDataObject.h>
15#include <TVector3.h>
16#include <constant.h>
17
18namespace art::crib {
19class TTelescopeData;
20} // namespace art::crib
21
23 public:
24 typedef enum { kID,
26 typedef enum { kASC,
28
30 ~TTelescopeData() override;
31
34
35 TVector3 GetPosition() const { return fPos; }
36 void SetPosition(TVector3 vec) { fPos = vec; }
37 void SetPosition(Double_t x, Double_t y, Double_t z) { fPos.SetXYZ(x, y, z); }
38
39 Int_t GetN() const { return fNE; }
40 void SetN(Int_t arg) { fNE = arg; }
41
42 Int_t GetTelID() const { return fTelID; }
43 void SetTelID(Int_t arg) { fTelID = arg; }
44 Int_t GetXID() const { return fXID; }
45 void SetXID(Int_t arg) { fXID = arg; }
46 Int_t GetYID() const { return fYID; }
47 void SetYID(Int_t arg) { fYID = arg; }
48
49 Double_t GetdE() const { return fdE; }
50 void SetdE(Double_t arg) { fdE = arg; }
51 Double_t GetdEX() const { return fdEX; }
52 void SetdEX(Double_t arg) { fdEX = arg; }
53 Double_t GetdEY() const { return fdEY; }
54 void SetdEY(Double_t arg) { fdEY = arg; }
55
56 Double_t GetE() const { return fE; }
57 void SetE(Double_t arg) { fE = arg; }
58 Double_t GetEtotal() const { return fEtotal; }
59 void SetEtotal(Double_t arg) { fEtotal = arg; }
60 Double_t GetTelXTiming() const { return fXTiming; }
61 void SetTelXTiming(Double_t arg) { fXTiming = arg; }
62 Double_t GetTelYTiming() const { return fYTiming; }
63 void SetTelYTiming(Double_t arg) { fYTiming = arg; }
64
65 Double_t GetTheta_L() const { return fTheta_L; }
66 void SetTheta_L(Double_t arg) { fTheta_L = arg; }
67
68 DoubleVec_t GetEnergyArray() const { return fEnergyArray; }
69 Double_t GetEnergyArray(Int_t id) const { return fEnergyArray[id]; }
70 void PushEnergyArray(Double_t arg) { fEnergyArray.emplace_back(arg); }
71 DoubleVec_t GetTimingArray() const { return fTimingArray; }
72 Double_t GetTimingArray(Int_t id) const { return fTimingArray[id]; }
73 void PushTimingArray(Double_t arg) { fTimingArray.emplace_back(arg); }
74
75 Double_t E() const { return fEtotal; } // get total energy
76 Double_t E(Int_t id) const {
77 if (fEnergyArray.size() == 0) {
78 return kInvalidD;
79 }
80 if (id < 0 || id >= fNE) {
81 return kInvalidD;
82 }
83 return fEnergyArray[id];
84 } // get each layer energy
85
86 Double_t T() const {
87 if (fTimingArray.size() == 0) {
88 return kInvalidD;
89 }
90 return fTimingArray[0];
91 } // get timing
92 Double_t T(Int_t id) const {
93 if (fTimingArray.size() == 0) {
94 return kInvalidD;
95 }
96 if (id < 0 || id >= fNE) {
97 return kInvalidD;
98 }
99 return fTimingArray[id];
100 } // get each layer timing
101
102 Double_t A() const { return fTheta_L; } // get angle: A()-> Lab angle (deg)
103 Double_t X() const { return fPos.X(); } // get hit X position (mm)
104 Double_t Y() const { return fPos.Y(); } // get hit Y position (mm)
105 Double_t Z() const { return fPos.Z(); } // get hit Z position (mm)
106
107 void Copy(TObject &dest) const override;
108 void Clear(Option_t *opt = "") override;
109
110 protected:
111 TVector3 fPos; // detected position (X, Y, Z)
112
113 Int_t fTelID; // telescope ID
114 Int_t fXID; // X strip number
115 Int_t fYID; // Y strip number
116 Int_t fNE; // number of all SSDs
117
118 Double_t fdE; // energy at first layor
119 Double_t fdEX; // X side energy (=~ fdEY)
120 Double_t fdEY; // Y side energy (=~ fdEX)
121 Double_t fE; // added energy at thick SSDs
122 Double_t fEtotal; // all energy deposit in the telescope
123 Double_t fXTiming; // timing information at the first layor (X side)
124 Double_t fYTiming; // for case that X side have trouble (Y side)
125
126 Double_t fTheta_L; // reaction angle in LAB system
127
128 DoubleVec_t fEnergyArray; // energy array for each SSD
129 DoubleVec_t fTimingArray; // timing array for each SSD
130
131 ClassDefOverride(TTelescopeData, 3)
132};
133
134#endif // _TTELESCOPEDATA_H_
void SetPosition(TVector3 vec)
TVector3 GetPosition() const
void Copy(TObject &dest) const override
void SetdEX(Double_t arg)
void SetTelXTiming(Double_t arg)
Double_t GetTimingArray(Int_t id) const
DoubleVec_t GetTimingArray() const
Double_t T(Int_t id) const
Double_t E(Int_t id) const
void Clear(Option_t *opt="") override
void SetE(Double_t arg)
void SetTheta_L(Double_t arg)
void PushEnergyArray(Double_t arg)
void SetdEY(Double_t arg)
DoubleVec_t GetEnergyArray() const
void PushTimingArray(Double_t arg)
Double_t GetEtotal() const
void SetPosition(Double_t x, Double_t y, Double_t z)
void SetTelYTiming(Double_t arg)
Double_t GetTelYTiming() const
TTelescopeData & operator=(const TTelescopeData &rhs)
void SetEtotal(Double_t arg)
Double_t GetEnergyArray(Int_t id) const
void SetdE(Double_t arg)
Double_t GetTheta_L() const
Double_t GetTelXTiming() const
return to the guide