1 |
#ifndef PAMVMC_TOF_DIG_H |
2 |
#define PAMVMC_TOF_DIG_H |
3 |
|
4 |
#include "PamVMCDigitizer.h" |
5 |
|
6 |
#define NP 48 |
7 |
|
8 |
using std::cout; |
9 |
using std::endl; |
10 |
|
11 |
class PamVMCTofDig : public PamVMCDigitizer { |
12 |
|
13 |
Float_t fatte1[NP], fatte2[NP], flambda1[NP], flambda2[NP]; |
14 |
Float_t fQevePmt_pC[NP]; |
15 |
Int_t fADCtof[NP],fTDCint[NP]; |
16 |
Float_t ftdcres[NP],fc1_S[NP],fc2_S[NP],fc3_S[NP]; |
17 |
Float_t ftdc[NP],ftdc1[NP],ftdcpmt[NP]; |
18 |
Bool_t fDEBUG; |
19 |
|
20 |
UCBuffer fDataC; |
21 |
|
22 |
Float_t TimeRes(Int_t PrimaryPDG); |
23 |
//fData TOF 12x23bytes 276bytes |
24 |
void DigitizeTofPlane(Int_t planeNo, TClonesArray* HitColl, Int_t PrimaryPDG); |
25 |
|
26 |
void Paddle2Pmt(Int_t planeNo, Int_t padNo, Int_t *pl, Int_t *pr); |
27 |
|
28 |
UChar_t Bin2GrayTof(UChar_t binaTOF,UChar_t grayTOF); |
29 |
|
30 |
UChar_t EvaluateCrc(UChar_t *pTrg, Int_t nb); |
31 |
|
32 |
void Crc8Tof(UChar_t *oldCRC, UChar_t *crcTof); |
33 |
|
34 |
public: |
35 |
|
36 |
|
37 |
PamVMCTofDig():PamVMCDigitizer("Tof"){ |
38 |
|
39 |
for(Int_t i=0; i<NP; i++){ |
40 |
ftdcres[i] = 50.E-12; // TDC resolution 50 picosec |
41 |
fc1_S[i] = 500.; // cable length in channels |
42 |
fc2_S[i] = 0.; |
43 |
fc3_S[i] = 1000.; |
44 |
fc1_S[i] = fc1_S[i]*ftdcres[i]; // cable length in sec |
45 |
fc2_S[i] = fc2_S[i]*ftdcres[i]; |
46 |
} |
47 |
} |
48 |
|
49 |
virtual ~PamVMCTofDig() {; } |
50 |
|
51 |
void Digitize(){; }//not used |
52 |
|
53 |
void WriteToBuff(){ fraw->CopyUCharToBuff(&fDataC); } |
54 |
|
55 |
void DigitizeTOF(Int_t EventNo, Int_t PrimaryPDG); |
56 |
|
57 |
void LoadCalib(); |
58 |
|
59 |
//AUX |
60 |
/*Plane numerations: |
61 |
planeNo KEY paddles sizes |
62 |
0 S11Y 8 33.0 x 5.1 cm |
63 |
1 S12X 6 40.8 x 5.5 cm |
64 |
2 S21X 2 18.0 x 7.5 cm |
65 |
3 S22Y 2 15.0 x 9.0 cm |
66 |
4 S31Y 3 15.0 x 6.0 cm |
67 |
5 S32X 3 18.0 x 5.0 cm |
68 |
*/ |
69 |
|
70 |
|
71 |
ClassDef(PamVMCTofDig,1) |
72 |
}; |
73 |
|
74 |
|
75 |
#endif //PAMVMC_TOF_DIG_H |