/[PAMELA software]/DarthVader/ToFLevel2/inc/ToFLevel2.h
ViewVC logotype

Contents of /DarthVader/ToFLevel2/inc/ToFLevel2.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.14 - (show annotations) (download)
Thu Mar 1 10:48:25 2007 UTC (17 years, 9 months ago) by pam-de
Branch: MAIN
Changes since 1.13: +56 -28 lines
File MIME type: text/plain
Doxygen comments added

1 /**
2 * \file ToFLevel2.h
3 * \author Gianfranca DeRosa / Wolfgang Menn
4 */
5
6 #ifndef ToFLevel2_h
7 #define ToFLevel2_h
8 //
9 #include <TObject.h>
10 #include <TArrayI.h>
11 #include <TArrayF.h>
12 #include <TClonesArray.h>
13
14 #include <ToFStruct.h>
15
16
17 //
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
28 /**
29 * \brief Class which contains the PMT data
30 *
31 */
32 class ToFPMT : public TObject {
33
34 private:
35
36 public:
37 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 //
41 ToFPMT();
42 ToFPMT(const ToFPMT&);
43 //
44 ToFPMT* GetToFPMT(){return this;};
45 void Clear();
46
47
48
49 ClassDef(ToFPMT,1);
50 };
51
52
53 /**
54 * \brief Class which contains the tracker realated variables
55 *
56 */
57 class ToFTrkVar : public TObject {
58
59 private:
60
61 public:
62 //
63 Int_t trkseqno; ///< tracker sequ. number: -1=ToF standalone, 0=first Tracker track, ...
64 //
65 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 //
75 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 //
79 ToFTrkVar();
80 ToFTrkVar(const ToFTrkVar&);
81
82 ToFTrkVar* GetToFTrkVar(){return this;};
83 void Clear();
84
85 ClassDef(ToFTrkVar,1);
86 //
87 };
88
89 /**
90 * \brief Class to describe ToF LEVEL2 data
91 *
92 */
93
94 class ToFLevel2 : public TObject {
95 private:
96
97 public:
98 //
99 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 Int_t unpackError;
104 //
105 Float_t GetdEdx(Int_t notrack, Int_t plane);
106 //
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 Int_t npmt(){return PMT->GetEntries();};
111
112 //
113 void GetLevel2Struct(cToFLevel2 *) const;
114 //
115 ToFTrkVar *GetToFTrkVar(Int_t notrack);
116 ToFPMT *GetToFPMT(Int_t nohit);
117 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 void GetPMTIndex(Int_t pmt_id, Int_t &gg, Int_t &hh);
122 //
123 // constructor
124 //
125 ToFLevel2();
126 ~ToFLevel2(){Delete();}; //ELENA
127 void Delete(); //ELENA
128 void Set();//ELENA
129 //
130 //
131 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){
138 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 };
148
149 //
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
161 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 void Clear();
166 //
167 ClassDef(ToFLevel2,2);
168 };
169
170 #endif
171

  ViewVC Help
Powered by ViewVC 1.1.23