1 |
pam-de |
1.14 |
/** |
2 |
|
|
* \file ToFLevel2.h |
3 |
|
|
* \author Gianfranca DeRosa / Wolfgang Menn |
4 |
|
|
*/ |
5 |
|
|
|
6 |
mocchiut |
1.1 |
#ifndef ToFLevel2_h |
7 |
|
|
#define ToFLevel2_h |
8 |
|
|
// |
9 |
|
|
#include <TObject.h> |
10 |
mocchiut |
1.4 |
#include <TArrayI.h> |
11 |
|
|
#include <TArrayF.h> |
12 |
mocchiut |
1.1 |
#include <TClonesArray.h> |
13 |
pam-fi |
1.6 |
|
14 |
|
|
#include <ToFStruct.h> |
15 |
pam-de |
1.14 |
|
16 |
|
|
|
17 |
mocchiut |
1.1 |
// |
18 |
|
|
// class which contains track related variables |
19 |
|
|
// |
20 |
|
|
#define ZTOF11 53.74 |
21 |
|
|
#define ZTOF12 53.04 |
22 |
|
|
#define ZTOF21 23.94 |
23 |
|
|
#define ZTOF22 23.44 |
24 |
|
|
#define ZTOF31 -23.49 |
25 |
|
|
#define ZTOF32 -24.34 |
26 |
|
|
|
27 |
mocchiut |
1.4 |
|
28 |
pam-de |
1.14 |
/** |
29 |
|
|
* \brief Class which contains the PMT data |
30 |
|
|
* |
31 |
|
|
*/ |
32 |
mocchiut |
1.4 |
class ToFPMT : public TObject { |
33 |
pam-de |
1.14 |
|
34 |
mocchiut |
1.4 |
private: |
35 |
|
|
|
36 |
|
|
public: |
37 |
pam-de |
1.14 |
Int_t pmt_id; ///<the identification number of the PMT from 0 to 47 |
38 |
|
|
Float_t adc; ///<raw ADC values adc[4,12] |
39 |
|
|
Float_t tdc_tw; ///<time-walk corrected TDC values tdc_tw[4,12] |
40 |
mocchiut |
1.4 |
// |
41 |
|
|
ToFPMT(); |
42 |
|
|
ToFPMT(const ToFPMT&); |
43 |
|
|
// |
44 |
|
|
ToFPMT* GetToFPMT(){return this;}; |
45 |
|
|
void Clear(); |
46 |
|
|
|
47 |
pam-de |
1.14 |
|
48 |
mocchiut |
1.13 |
|
49 |
mocchiut |
1.4 |
ClassDef(ToFPMT,1); |
50 |
|
|
}; |
51 |
|
|
|
52 |
|
|
|
53 |
pam-de |
1.14 |
/** |
54 |
|
|
* \brief Class which contains the tracker realated variables |
55 |
|
|
* |
56 |
|
|
*/ |
57 |
mocchiut |
1.1 |
class ToFTrkVar : public TObject { |
58 |
pam-de |
1.14 |
|
59 |
mocchiut |
1.1 |
private: |
60 |
|
|
|
61 |
|
|
public: |
62 |
mocchiut |
1.13 |
// |
63 |
pam-de |
1.14 |
Int_t trkseqno; ///< tracker sequ. number: -1=ToF standalone, 0=first Tracker track, ... |
64 |
mocchiut |
1.1 |
// |
65 |
pam-de |
1.14 |
Int_t npmttdc; ///<number of TDC used to evaluate beta |
66 |
|
|
TArrayI pmttdc; ///<contains the PMT ID for the tdc used to evaluate beta |
67 |
|
|
TArrayI tdcflag; ///<array flagging the artificial TDCs, "0" if normal TDC value |
68 |
|
|
Float_t beta[13]; ///<beta, 12 measurements for the 12 combinations, beta[13] is weighted mean |
69 |
|
|
// |
70 |
|
|
Int_t npmtadc; ///<number of ADCs used for dEdx evaluation |
71 |
|
|
TArrayI pmtadc; ///<contains the PMT ID for the adc used in evaluate dedx=adc_c |
72 |
|
|
TArrayI adcflag; ///<array flagging the artificial ADCs, "0" if normal ADC value |
73 |
|
|
TArrayF dedx; ///<energy loss in mip |
74 |
mocchiut |
1.4 |
// |
75 |
pam-de |
1.14 |
Float_t xtofpos[3]; ///<x-measurement using the TDC values and the calibration |
76 |
|
|
Float_t ytofpos[3]; ///<x-measurement using the TDC values and the calibration |
77 |
|
|
|
78 |
mocchiut |
1.1 |
// |
79 |
|
|
ToFTrkVar(); |
80 |
|
|
ToFTrkVar(const ToFTrkVar&); |
81 |
pam-de |
1.14 |
|
82 |
mocchiut |
1.1 |
ToFTrkVar* GetToFTrkVar(){return this;}; |
83 |
mocchiut |
1.4 |
void Clear(); |
84 |
|
|
|
85 |
mocchiut |
1.1 |
ClassDef(ToFTrkVar,1); |
86 |
|
|
// |
87 |
|
|
}; |
88 |
|
|
|
89 |
pam-de |
1.14 |
/** |
90 |
|
|
* \brief Class to describe ToF LEVEL2 data |
91 |
|
|
* |
92 |
|
|
*/ |
93 |
|
|
|
94 |
mocchiut |
1.1 |
class ToFLevel2 : public TObject { |
95 |
|
|
private: |
96 |
pam-de |
1.14 |
|
97 |
mocchiut |
1.1 |
public: |
98 |
mocchiut |
1.4 |
// |
99 |
pam-de |
1.14 |
TClonesArray *PMT; ///<class needed to store PMT hit informations |
100 |
|
|
TClonesArray *ToFTrk; ///<track related variable class |
101 |
|
|
Int_t tof_j_flag[6]; ///<number of hitted paddle(s) for each ToF layer: flag = flag + 2**(paddlenumber-1) |
102 |
|
|
|
103 |
mocchiut |
1.7 |
Int_t unpackError; |
104 |
mocchiut |
1.1 |
// |
105 |
mocchiut |
1.4 |
Float_t GetdEdx(Int_t notrack, Int_t plane); |
106 |
mocchiut |
1.1 |
// |
107 |
|
|
// methods to make life simplier during the analysis, returns a pointer to the ToFTrkVar class containing track related variables |
108 |
|
|
// |
109 |
|
|
Int_t ntrk(){return ToFTrk->GetEntries();}; |
110 |
mocchiut |
1.4 |
Int_t npmt(){return PMT->GetEntries();}; |
111 |
pam-de |
1.14 |
|
112 |
mocchiut |
1.1 |
// |
113 |
pam-fi |
1.6 |
void GetLevel2Struct(cToFLevel2 *) const; |
114 |
|
|
// |
115 |
pam-de |
1.14 |
ToFTrkVar *GetToFTrkVar(Int_t notrack); |
116 |
|
|
ToFPMT *GetToFPMT(Int_t nohit); |
117 |
mocchiut |
1.4 |
Int_t GetPMTid(Int_t gg, Int_t hh); |
118 |
|
|
TString GetPMTName(Int_t ind); |
119 |
|
|
Int_t GetPlaneIndex(Int_t pmt_id); |
120 |
|
|
void GetMatrix(Int_t notrack, Float_t adc[4][12], Float_t tdc[4][12]); |
121 |
mocchiut |
1.5 |
void GetPMTIndex(Int_t pmt_id, Int_t &gg, Int_t &hh); |
122 |
mocchiut |
1.1 |
// |
123 |
|
|
// constructor |
124 |
|
|
// |
125 |
|
|
ToFLevel2(); |
126 |
mocchiut |
1.13 |
~ToFLevel2(){Delete();}; //ELENA |
127 |
|
|
void Delete(); //ELENA |
128 |
|
|
void Set();//ELENA |
129 |
mocchiut |
1.1 |
// |
130 |
|
|
// |
131 |
|
|
ToFLevel2* GetToFLevel2(){return this;}; |
132 |
pam-de |
1.14 |
|
133 |
|
|
/** |
134 |
|
|
* Method to get the z-position of the 6 TOF layers from th plane ID |
135 |
|
|
* @param plane_id Plane ID (11 12 21 22 31 32) |
136 |
|
|
*/ |
137 |
mocchiut |
1.4 |
Float_t GetZTOF(Int_t plane_id){ |
138 |
mocchiut |
1.1 |
switch(plane_id){ |
139 |
|
|
case 11: return ZTOF11; |
140 |
|
|
case 12: return ZTOF12; |
141 |
|
|
case 21: return ZTOF21; |
142 |
|
|
case 22: return ZTOF22; |
143 |
|
|
case 31: return ZTOF31; |
144 |
|
|
case 32: return ZTOF32; |
145 |
|
|
default: return 0.; |
146 |
|
|
}; |
147 |
mocchiut |
1.4 |
}; |
148 |
pam-de |
1.14 |
|
149 |
mocchiut |
1.1 |
// |
150 |
|
|
// Paddles position |
151 |
|
|
// |
152 |
|
|
/* |
153 |
|
|
S11 8 paddles 33.0 x 5.1 cm |
154 |
|
|
S12 6 paddles 40.8 x 5.5 cm |
155 |
|
|
S21 2 paddles 18.0 x 7.5 cm |
156 |
|
|
S22 2 paddles 15.0 x 9.0 cm |
157 |
|
|
S31 3 paddles 15.0 x 6.0 cm |
158 |
|
|
S32 3 paddles 18.0 x 5.0 cm |
159 |
|
|
*/ |
160 |
pam-de |
1.14 |
|
161 |
mocchiut |
1.1 |
Int_t GetToFPlaneID(Int_t ip); |
162 |
|
|
Int_t GetToFPlaneIndex(Int_t plane_id); |
163 |
|
|
Bool_t HitPaddle(Int_t ,Int_t); |
164 |
|
|
Int_t GetNHitPaddles(Int_t plane); |
165 |
mocchiut |
1.3 |
void Clear(); |
166 |
mocchiut |
1.1 |
// |
167 |
mocchiut |
1.7 |
ClassDef(ToFLevel2,2); |
168 |
mocchiut |
1.1 |
}; |
169 |
|
|
|
170 |
|
|
#endif |
171 |
pam-de |
1.14 |
|