1 |
nikolas |
1.1 |
#ifndef PAMVMCTRKDIG_H |
2 |
|
|
#define PAMVMCTRKDIG_H |
3 |
|
|
|
4 |
|
|
|
5 |
|
|
#include <iostream> |
6 |
|
|
|
7 |
|
|
#include "PamVMCTrkF77GpsSpe.h" |
8 |
|
|
#include "CalibTrk1Event.h" |
9 |
|
|
#include "CalibTrk2Event.h" |
10 |
|
|
#include "PamVMCDigitizer.h" |
11 |
|
|
#include "PamVMCTrkF77GpsSpe.h" |
12 |
|
|
|
13 |
|
|
|
14 |
|
|
class PamVMCTrkDig: public PamVMCDigitizer{ |
15 |
|
|
|
16 |
|
|
|
17 |
|
|
public: |
18 |
|
|
PamVMCTrkDig():PamVMCDigitizer("Tracker") |
19 |
|
|
{ ; }; |
20 |
|
|
|
21 |
|
|
virtual ~PamVMCTrkDig(){; }; |
22 |
|
|
|
23 |
|
|
void LoadCalib(){ |
24 |
|
|
LoadFile(); |
25 |
|
|
DigitizeTrackCalib(1); |
26 |
|
|
UInt_t length=fData.size()*2; |
27 |
|
|
DigitizePSCU(length,0x12); |
28 |
|
|
AddPadding(); |
29 |
|
|
WriteCalib(); |
30 |
|
|
|
31 |
|
|
DigitizeTrackCalib(2); |
32 |
|
|
length=fData.size()*2; |
33 |
|
|
DigitizePSCU(length,0x13); |
34 |
|
|
AddPadding(); |
35 |
|
|
WriteCalib(); |
36 |
|
|
|
37 |
|
|
LoadMipCor(); |
38 |
|
|
} |
39 |
|
|
|
40 |
|
|
|
41 |
|
|
void RegisterTrkData(pGPSSPEHits * hits){ fhits = hits; } |
42 |
|
|
|
43 |
|
|
void Digitize(){ ;}; //will be empty |
44 |
|
|
//we will use another method instead, because here we must |
45 |
|
|
//pass not CloesArray, but pGPSSPEHits object |
46 |
|
|
|
47 |
|
|
void DigitizeTRK(const pGPSSPEHits* hits); |
48 |
|
|
|
49 |
|
|
|
50 |
|
|
|
51 |
|
|
|
52 |
|
|
|
53 |
|
|
private: |
54 |
|
|
|
55 |
|
|
|
56 |
|
|
|
57 |
|
|
//AUX functions// |
58 |
|
|
|
59 |
|
|
void LoadFile(); |
60 |
|
|
|
61 |
|
|
void WriteCalib(); |
62 |
|
|
|
63 |
|
|
void LoadMipCor(); |
64 |
|
|
|
65 |
|
|
void DigitizeTrackCalib(Int_t n); |
66 |
|
|
|
67 |
|
|
void BrokenStrip(Int_t planebr, Int_t vabr, Int_t plane, |
68 |
|
|
Int_t strip, Int_t & goodst){ |
69 |
|
|
if(plane==planebr && strip>=(256*(vabr-1)) && strip<(256*vabr)) |
70 |
|
|
goodst=strip-(256*(vabr-1)); |
71 |
|
|
} |
72 |
|
|
|
73 |
|
|
static const Int_t fTRACKbuffer = 50000; // to be optimized |
74 |
|
|
static const Int_t fNviews = 12; |
75 |
|
|
static const Int_t fNladder=3; |
76 |
|
|
static const int fNstrips_ladder = 1024; |
77 |
|
|
static const Int_t fNstrips_view = 3072; |
78 |
|
|
Float_t fSigmaTrack[fNviews][fNstrips_view]; |
79 |
|
|
Float_t fPedeTrack[fNviews][fNstrips_view]; |
80 |
|
|
|
81 |
|
|
UShort_t fDataTrack[fTRACKbuffer]; |
82 |
|
|
//UInt_t fTracklength; // Actual length of buffer |
83 |
|
|
Float_t fMipCor[fNladder][fNviews] ; |
84 |
|
|
// end vectors, buffer, and variables for tracker |
85 |
|
|
|
86 |
|
|
pGPSSPEHits * fhits; //pointer to Tracker's SD hit data |
87 |
|
|
|
88 |
|
|
ClassDef(PamVMCTrkDig,1) |
89 |
|
|
|
90 |
|
|
}; |
91 |
|
|
|
92 |
|
|
|
93 |
|
|
|
94 |
|
|
#endif // PAMVMCTRKSD_H |