GRUTinizer
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TS800.h
Go to the documentation of this file.
1 #ifndef _TSEIGHTHUNDRAD_H_
2 #define _TSEIGHTHUNDRAD_H_
3 
4 #include "TClonesArray.h"
5 #include <iostream>
6 #include <vector>
7 #include "TDetector.h"
8 
9 #include "TS800Hit.h"
10 //class TTrigger;
11 
12 class TS800 : public TDetector {
13 public:
14  TS800();
15  virtual ~TS800();
16 
17 
19  virtual void InsertHit(const TDetectorHit&);
20  virtual TDetectorHit& GetHit(int i);
22 
23  void SetEventCounter(Long_t event) { fEventCounter = event; }
24 
25  Long_t GetEventCounter() { return fEventCounter;}
26  Long_t GetTimestamp() { Timestamp(); }
27 
28  TVector3 CRDCTrack(); // not a finished method
29  float GetAFP() const;
30  float GetBFP() const;
31  void MapCalc(float *input);
32  Float_t GetAta() { return fAta; }
33  Float_t GetYta() { return fYta; }
34  Float_t GetBta() { return fBta; }
35  Float_t GetDta() { return fDta; }
36 
37 
38 
39  virtual void Copy(TObject& obj) const;
40  //virtual void Print(Option_t *opt = "") const;
41  virtual void Clear(Option_t* opt = "");
42 
43  TCrdc &GetCrdc(int x=0) const { return (TCrdc&)crdc[x]; }
44  TTof &GetTof() const { return (TTof&)tof; }
45  TMTof &GetMTof() const { return (TMTof&)mtof; }
46  TIonChamber &GetIonChamber() const { return (TIonChamber&)ion; }
47  TScintillator &GetScint(int x=0) const { return (TScintillator&)scint[x]; }
48 
49  //float GetAFP() const {
50  // return TMath::ATan((GetCrdc(0).GetDispersiveX()-GetCrdc(1).GetDispersiveX())/1000.0);
51  //}
52 
53  float GetTofE1_TAC(float c1=0.00,float c2=0.00) const;
54  float GetTofE1_TDC(float c1=0.00,float c2=0.00) const;
55  float GetTofE1_MTDC(float c1=0.00,float c2=0.00);
56 
57  private:
58 
59  bool ReadInvMap(const char* file);
60  virtual int BuildHits();
61 
62  bool HandleTrigPacket(unsigned short*,int);
63  bool HandleTOFPacket(unsigned short*,int);
64  bool HandleScintPacket(unsigned short*,int);
65  bool HandleIonCPacket(unsigned short*,int);
66  bool HandleCRDCPacket(unsigned short*,int);
67  bool HandleMTDCPacket(unsigned short*,int);
68 
69  static bool InvMapFileRead;
70  struct S800_InvMapLine {
71  float coef;
72  int order,exp[6];
73  void Clear(){
74  coef = -1; order = -1;
75  for(int i=0;i<6;i++)
76  exp[i]=-1;
77  }
78  };
80  static std::vector<S800_InvMapLine> fIML_sec1;
81  static std::vector<S800_InvMapLine> fIML_sec2;
82  static std::vector<S800_InvMapLine> fIML_sec3;
83  static std::vector<S800_InvMapLine> fIML_sec4;
84  static short fMaxOrder;
85  static float fBrho;
86  static int fMass;
87  static int fCharge;
88 
94  TCrdc crdc[2];
95  //THodoscope hodo[32];
96 
97  //TMultiHitTof multi_tof;
98 
99  Float_t fAta;
100  Float_t fYta;
101  Float_t fBta;
102  Float_t fDta;
103 
104 
106 
107 
108  ClassDef(TS800,1);
109 };
110 
111 //S8OO PIN
112 // -- e
113 // -- t
114 // -- ecorr
115 // -- dE
116 //
117 
118 //S800 PPAC
119 // -- u
120 // -- d
121 // -- l
122 // -- r
123 // -- a
124 // -- t
125 // -- sumx
126 // -- sumy
127 // -- x
128 // -- y
129 // --
130 // -- z
131 //
132 
133 
134 
135 
136 
137 //S800 Focal Plane
138 // -- FpScintillator E1
139 // -- FpScintillator E2 <-- most likely does not exist
140 // -- FpScintillator E3 <-- most likely does not exist
141 // -- FpIonChamber
142 // -- FpCRDC crdc1
143 // -- FpCRDC crdc2
144 // -- FpTrack track
145 // -- FpHodo hodo
146 
147 
148 //S800 Target
149 // -- PPac ppac2 (why 2?) <-- class
150 // -- PIN pin1 <-- class
151 // -- PIN pin2 <-- class
152 // -- E
153 
154 //S800 Image
155 // -- Classic PPAC ppac1
156 // -- Classic PPAC ppac2
157 // -- double x
158 // -- double theta
159 // -- double y
160 // -- double phi
161 // -- double dp
162 // -- z
163 // -- gap
164 // -- dpphi
165 // --
166 // -- bool trigger
167 // -- char *gate
168 
169 //S800 Object
170 // -- PIN <-- class
171 
172 //S800 Trigger
173 // -- registr
174 // -- s800
175 // -- external1
176 // -- external2
177 // -- secondary
178 // -- timestamp
179 
180 //S800 Time Of Flight
181 // -- rf
182 // -- obj
183 // -- xfp
184 // -- xfp_obj
185 // -- rfe1
186 // -- obje1
187 // -- xfpe1
188 // -- obje2
189 // -- xfpe2
190 // -- tac_obj
191 // -- tac_obje1
192 // -- tac_xfp
193 // -- tac_xfpe1
194 // -- tac_xfpobj
195 // -- tacobj_obj
196 // -- tacxfp_xfp
197 // --
198 // -- mesyhit
199 // -- me1up
200 // -- me1dwn
201 // -- mobj
202 // -- mxfp
203 // -- mrf
204 // -- mcrdc1
205 // -- mcrdc2
206 // -- mhoth
207 // -- mref
208 // -- mobje1
209 // -- mxfpe1
210 // -- mrfe1
211 // --
212 // -- diaor
213 // -- dia1
214 // -- dia2
215 // -- dia3
216 // -- dia4
217 // -- dia1RF
218 // -- dia2RF
219 // -- dia3RF
220 // -- dia4RF
221 // -- diaRF
222 // -- dia1Cor
223 // -- dia2Cor
224 // -- dia3Cor
225 // -- dia4Cor
226 // -- diaCor
227 // --
228 // -- obj_shift
229 // -- xfp_shift
230 // -- rf_shift
231 // -- tac_obj_shift
232 // -- tac_xfp_shift
233 // --
234 // -- // sc800.h +1253
235 //
236 
237 
238 //S800 LaBr
239 // -- eraw
240 // -- ecal
241 // -- traw
242 // -- tcal
243 // -- e_a0
244 // -- e_a1
245 // -- e_a2
246 // -- t_a0
247 //
248 //
249 //
250 
251 
252 
253 
254 #endif