1 |
|
/** |
2 |
|
* \file ToFLevel2.h |
3 |
|
* \author Gianfranca DeRosa / Wolfgang Menn |
4 |
|
*/ |
5 |
|
|
6 |
#ifndef ToFLevel2_h |
#ifndef ToFLevel2_h |
7 |
#define ToFLevel2_h |
#define ToFLevel2_h |
8 |
// |
// |
12 |
#include <TClonesArray.h> |
#include <TClonesArray.h> |
13 |
|
|
14 |
#include <ToFStruct.h> |
#include <ToFStruct.h> |
15 |
|
|
16 |
|
|
17 |
// |
// |
18 |
// class which contains track related variables |
// class which contains track related variables |
19 |
// |
// |
25 |
#define ZTOF32 -24.34 |
#define ZTOF32 -24.34 |
26 |
|
|
27 |
|
|
28 |
|
/** |
29 |
|
* \brief Class which contains the PMT data |
30 |
|
* |
31 |
|
*/ |
32 |
class ToFPMT : public TObject { |
class ToFPMT : public TObject { |
33 |
|
|
34 |
private: |
private: |
35 |
|
|
36 |
public: |
public: |
37 |
Int_t pmt_id; |
Int_t pmt_id; ///<the identification number of the PMT from 0 to 47 |
38 |
Float_t adc; |
Float_t adc; ///<raw ADC values adc[4,12] |
39 |
Float_t tdc_tw; |
Float_t tdc_tw; ///<time-walk corrected TDC values tdc_tw[4,12] |
40 |
// |
// |
41 |
ToFPMT(); |
ToFPMT(); |
42 |
ToFPMT(const ToFPMT&); |
ToFPMT(const ToFPMT&); |
44 |
ToFPMT* GetToFPMT(){return this;}; |
ToFPMT* GetToFPMT(){return this;}; |
45 |
void Clear(); |
void Clear(); |
46 |
|
|
47 |
|
|
48 |
|
|
49 |
ClassDef(ToFPMT,1); |
ClassDef(ToFPMT,1); |
50 |
}; |
}; |
51 |
|
|
52 |
|
|
53 |
|
/** |
54 |
|
* \brief Class which contains the tracker realated variables |
55 |
|
* |
56 |
|
*/ |
57 |
class ToFTrkVar : public TObject { |
class ToFTrkVar : public TObject { |
58 |
|
|
59 |
private: |
private: |
60 |
|
|
61 |
public: |
public: |
62 |
// |
// |
63 |
Int_t trkseqno; // tracker entry coming from tracker, 100 if image track is used, -100 if the track is not consistent with MyDetector2 one |
Int_t trkseqno; ///< tracker sequ. number: -1=ToF standalone, 0=first Tracker track, ... |
64 |
// |
// |
65 |
Int_t npmttdc; |
Int_t npmttdc; ///<number of TDC used to evaluate beta |
66 |
TArrayI pmttdc; |
TArrayI pmttdc; ///<contains the PMT ID for the tdc used to evaluate beta |
67 |
TArrayI tdcflag; // gf: 30 Nov 2006 |
TArrayI tdcflag; ///<array flagging the artificial TDCs, "0" if normal TDC value |
68 |
Float_t beta[13]; |
Float_t beta[13]; ///<beta, 12 measurements for the 12 combinations, beta[13] is weighted mean |
69 |
// |
// |
70 |
Int_t npmtadc; |
Int_t npmtadc; ///<number of ADCs used for dEdx evaluation |
71 |
TArrayI pmtadc; |
TArrayI pmtadc; ///<contains the PMT ID for the adc used in evaluate dedx=adc_c |
72 |
TArrayI adcflag; // gf: 30 Nov 2006 |
TArrayI adcflag; ///<array flagging the artificial ADCs, "0" if normal ADC value |
73 |
TArrayF dedx; |
TArrayF dedx; ///<energy loss in mip |
74 |
// |
// |
75 |
Float_t xtofpos[3]; |
Float_t xtofpos[3]; ///<x-measurement using the TDC values and the calibration |
76 |
Float_t ytofpos[3]; |
Float_t ytofpos[3]; ///<x-measurement using the TDC values and the calibration |
77 |
|
|
78 |
// |
// |
79 |
ToFTrkVar(); |
ToFTrkVar(); |
80 |
ToFTrkVar(const ToFTrkVar&); |
ToFTrkVar(const ToFTrkVar&); |
81 |
|
|
82 |
ToFTrkVar* GetToFTrkVar(){return this;}; |
ToFTrkVar* GetToFTrkVar(){return this;}; |
83 |
void Clear(); |
void Clear(); |
84 |
|
|
86 |
// |
// |
87 |
}; |
}; |
88 |
|
|
89 |
|
/** |
90 |
|
* \brief Class to describe ToF LEVEL2 data |
91 |
|
* |
92 |
|
*/ |
93 |
|
|
94 |
class ToFLevel2 : public TObject { |
class ToFLevel2 : public TObject { |
95 |
private: |
private: |
96 |
|
|
97 |
public: |
public: |
98 |
// |
// |
99 |
TClonesArray *PMT; // class needed to store PMT hit informations |
TClonesArray *PMT; ///<class needed to store PMT hit informations |
100 |
TClonesArray *ToFTrk; // track related variable class |
TClonesArray *ToFTrk; ///<track related variable class |
101 |
Int_t tof_j_flag[6]; |
Int_t tof_j_flag[6]; ///<number of hitted paddle(s) for each ToF layer: flag = flag + 2**(paddlenumber-1) |
102 |
|
|
103 |
Int_t unpackError; |
Int_t unpackError; |
104 |
// |
// |
105 |
Float_t GetdEdx(Int_t notrack, Int_t plane); |
Float_t GetdEdx(Int_t notrack, Int_t plane); |
108 |
// |
// |
109 |
Int_t ntrk(){return ToFTrk->GetEntries();}; |
Int_t ntrk(){return ToFTrk->GetEntries();}; |
110 |
Int_t npmt(){return PMT->GetEntries();}; |
Int_t npmt(){return PMT->GetEntries();}; |
111 |
|
|
112 |
// |
// |
113 |
void GetLevel2Struct(cToFLevel2 *) const; |
void GetLevel2Struct(cToFLevel2 *) const; |
114 |
// |
// |
115 |
ToFTrkVar *GetToFTrkVar(Int_t notrack); |
ToFTrkVar *GetToFTrkVar(Int_t notrack); |
116 |
ToFPMT *GetToFPMT(Int_t nohit); |
ToFPMT *GetToFPMT(Int_t nohit); |
117 |
Int_t GetPMTid(Int_t gg, Int_t hh); |
Int_t GetPMTid(Int_t gg, Int_t hh); |
118 |
TString GetPMTName(Int_t ind); |
TString GetPMTName(Int_t ind); |
119 |
Int_t GetPlaneIndex(Int_t pmt_id); |
Int_t GetPlaneIndex(Int_t pmt_id); |
129 |
// |
// |
130 |
// |
// |
131 |
ToFLevel2* GetToFLevel2(){return this;}; |
ToFLevel2* GetToFLevel2(){return this;}; |
132 |
|
|
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 |
Float_t GetZTOF(Int_t plane_id){ |
Float_t GetZTOF(Int_t plane_id){ |
138 |
switch(plane_id){ |
switch(plane_id){ |
139 |
case 11: return ZTOF11; |
case 11: return ZTOF11; |
145 |
default: return 0.; |
default: return 0.; |
146 |
}; |
}; |
147 |
}; |
}; |
148 |
|
|
149 |
// |
// |
150 |
// Paddles position |
// Paddles position |
151 |
// |
// |
157 |
S31 3 paddles 15.0 x 6.0 cm |
S31 3 paddles 15.0 x 6.0 cm |
158 |
S32 3 paddles 18.0 x 5.0 cm |
S32 3 paddles 18.0 x 5.0 cm |
159 |
*/ |
*/ |
160 |
|
|
161 |
Int_t GetToFPlaneID(Int_t ip); |
Int_t GetToFPlaneID(Int_t ip); |
162 |
Int_t GetToFPlaneIndex(Int_t plane_id); |
Int_t GetToFPlaneIndex(Int_t plane_id); |
163 |
Bool_t HitPaddle(Int_t ,Int_t); |
Bool_t HitPaddle(Int_t ,Int_t); |
168 |
}; |
}; |
169 |
|
|
170 |
#endif |
#endif |
171 |
|
|