12 |
#include <TClonesArray.h> |
#include <TClonesArray.h> |
13 |
|
|
14 |
#include <math.h> // EMILIANO |
#include <math.h> // EMILIANO |
15 |
|
#include <iostream> // from ToFLevel2.cpp |
16 |
|
#include <fstream> // Emiliano |
17 |
|
#include <sstream> // Emiliano |
18 |
|
#include <string> // Emiliano |
19 |
|
|
20 |
|
|
21 |
#include <ToFStruct.h> |
#include <ToFStruct.h> |
22 |
|
|
23 |
|
#include <TrkLevel2.h> // Emiliano |
24 |
|
#include <TrigLevel2.h> // Emiliano |
25 |
|
#include <GLTables.h> // Emiliano |
26 |
|
#include <OrbitalInfo.h> // Emiliano |
27 |
|
#include <ToFCore.h> // Emiliano |
28 |
|
// |
29 |
|
// Declaration of the core fortran routines |
30 |
|
// |
31 |
|
#define tofl2com tofl2com_ |
32 |
|
extern "C" int tofl2com(); |
33 |
|
#define toftrk toftrk_ |
34 |
|
extern "C" int toftrk(); |
35 |
|
#define rdtofcal rdtofcal_ |
36 |
|
extern "C" int rdtofcal(char [], int *); |
37 |
|
|
38 |
// |
// |
39 |
// class which contains track related variables |
// class which contains track related variables |
67 |
ToFPMT(const ToFPMT&); |
ToFPMT(const ToFPMT&); |
68 |
// |
// |
69 |
ToFPMT* GetToFPMT(){return this;}; |
ToFPMT* GetToFPMT(){return this;}; |
70 |
void Clear(); |
void Clear(Option_t *t=""); |
71 |
|
|
72 |
|
|
73 |
|
|
103 |
TArrayI tdcflag; ///<flag for artificial TDC, "0" if normal TDC value |
TArrayI tdcflag; ///<flag for artificial TDC, "0" if normal TDC value |
104 |
|
|
105 |
/** |
/** |
106 |
* \brief beta, 12 measurements for the 12 combinations, beta[13] is weighted mean |
* \brief beta, 12 measurements for the 12 combinations, beta[13] is modified weighted mean |
107 |
* |
* |
108 |
* The 12 measurements are S11-S31, S11-S32, S12-S31, S12-S32, and then analogue for |
* The 12 measurements are S11-S31, S11-S32, S12-S31, S12-S32, and then analogue for |
109 |
* S2-S3 and S1-S2. |
* S2-S3 and S1-S2. |
110 |
* In the moment all measurements are taken and the weighted mean is calculated. |
* The calculation of beta[13] is now modified: |
111 |
* Note that the weights are just simple overall results for S1-S3, S2-S3, and S1-S2. |
* We check the individual weights for artificial TDC values, then calculate |
112 |
* Artificial measurments are not treated correct, (since there is only one real |
* am mean beta for the first time. In a second step we loop again through |
113 |
* measurment the weight should be different then for two meassurments). |
* the single measurements, checking for the residual from the mean |
114 |
* The beta calculation will be improved in the next release. |
* The cut on the residual reject measurements > "x"-sigma. A chi2 value is |
115 |
|
* calculated, furthermore a "quality" value by adding the weights which |
116 |
|
* are finally used. If all measurements are taken, "quality" will be = 505. |
117 |
|
* A chi2 cut around 3-4 and a quality-cut > 400 is needed for clean beta |
118 |
|
* The Level2 beta[12] which is derived in the fortran routines uses: 10.,200.,20. |
119 |
|
* This is not a very high quality measurement. One can re-calculate a new beta[13] |
120 |
|
* using the L2-method "CalcBeta" |
121 |
*/ |
*/ |
122 |
Float_t beta[13]; |
Float_t beta[13]; |
123 |
// |
// |
136 |
ToFTrkVar(const ToFTrkVar&); |
ToFTrkVar(const ToFTrkVar&); |
137 |
|
|
138 |
ToFTrkVar* GetToFTrkVar(){return this;}; |
ToFTrkVar* GetToFTrkVar(){return this;}; |
139 |
void Clear(); |
void Clear(Option_t *t=""); |
140 |
|
|
141 |
ClassDef(ToFTrkVar,1); |
ClassDef(ToFTrkVar,1); |
142 |
// |
// |
160 |
Int_t default_calib; ///< one if the default calibration has been used to process the data, zero otherwise |
Int_t default_calib; ///< one if the default calibration has been used to process the data, zero otherwise |
161 |
// |
// |
162 |
Float_t GetdEdx(Int_t notrack, Int_t plane, Int_t adcfl); // gf Apr 07 |
Float_t GetdEdx(Int_t notrack, Int_t plane, Int_t adcfl); // gf Apr 07 |
163 |
|
|
164 |
|
Float_t CalcBeta(Int_t notrack, Float_t resmax, Float_t qualitycut, Float_t chi2cut); // wm feb 08 |
165 |
|
|
166 |
|
// |
167 |
|
// Float_t CalcBeta(Int_t notrack, Float_t resmax, Float_t chi2cut, Float_t qualitycut); // wm feb 08 |
168 |
// |
// |
169 |
// methods to make life simplier during the analysis, returns a pointer to the ToFTrkVar class containing track related variables |
// methods to make life simplier during the analysis, returns a pointer to the ToFTrkVar class containing track related variables |
170 |
// |
// |
194 |
void GetPaddlePlane(Int_t padid, Int_t &plane, Int_t &paddle); |
void GetPaddlePlane(Int_t padid, Int_t &plane, Int_t &paddle); |
195 |
Int_t GetNPaddle(Int_t plane); |
Int_t GetNPaddle(Int_t plane); |
196 |
// |
// |
197 |
|
// |
198 |
|
// |
199 |
|
Int_t Process(TrkLevel2 *trk, TrigLevel2 *trg, GL_RUN *run, OrbitalInfo *orb, Bool_t force); // Emiliano |
200 |
|
|
201 |
// |
// |
202 |
// constructor |
// constructor |
203 |
// |
// |
204 |
ToFLevel2(); |
ToFLevel2(); |
205 |
~ToFLevel2(){Delete();}; //ELENA |
~ToFLevel2(){Delete();}; //ELENA |
206 |
void Delete(); //ELENA |
void Delete(Option_t *t=""); //ELENA |
207 |
void Set();//ELENA |
void Set();//ELENA |
208 |
// |
// |
209 |
// |
// |
241 |
Int_t GetToFPlaneIndex(Int_t plane_id); |
Int_t GetToFPlaneIndex(Int_t plane_id); |
242 |
Bool_t HitPaddle(Int_t ,Int_t); |
Bool_t HitPaddle(Int_t ,Int_t); |
243 |
Int_t GetNHitPaddles(Int_t plane); |
Int_t GetNHitPaddles(Int_t plane); |
244 |
void Clear(); |
void Clear(Option_t *t=""); |
245 |
// |
// |
246 |
ClassDef(ToFLevel2,3); |
ClassDef(ToFLevel2,4); |
247 |
}; |
}; |
248 |
|
|
249 |
#endif |
#endif |