/[PAMELA software]/PamVMC_update/trk/include/PamVMCTrkDig.h
ViewVC logotype

Contents of /PamVMC_update/trk/include/PamVMCTrkDig.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Tue Oct 15 15:51:27 2013 UTC (11 years, 1 month ago) by formato
Branch point for: MAIN, rel
File MIME type: text/plain
Initial revision

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 fextrnd = new TRandom3(0);
21 fextrnd->SetName("TRKEXT");
22 frnd->RegisterRandom("TRKEXT", fextrnd);
23 };
24
25 virtual ~PamVMCTrkDig(){ delete fextrnd; };
26
27 void LoadCalib(){
28 LoadFile();
29 DigitizeTrackCalib(1);
30 UInt_t length=fData.size()*2;
31 DigitizePSCU(length,0x12);
32 AddPadding();
33 WriteCalib();
34
35 DigitizeTrackCalib(2);
36 length=fData.size()*2;
37 DigitizePSCU(length,0x13);
38 AddPadding();
39 WriteCalib();
40
41 LoadMipCor();
42 }
43
44 /*Setting a pointer to random number if needed */
45 virtual void SetRandom(TRandom3* random){
46 *frandom = *random;
47 frandom->SetName(fdname);
48 SetRandomExt( random );
49 }
50
51 virtual void SetRandomExt(TRandom3* random){
52 *fextrnd = *random;
53 fextrnd->SetName("TRKEXT");
54 }
55
56
57 void RegisterTrkData(pGPSSPEHits * hits){ fhits = hits; }
58
59 void Digitize();
60
61 void PrintCollections(){
62 cout<<"HitCollection for Tracker: "<<fhits<<endl;
63 }
64
65
66 private:
67
68
69
70 //AUX functions//
71
72 void LoadFile();
73
74 void WriteCalib();
75
76 void LoadMipCor();
77
78 void DigitizeTrackCalib(Int_t n);
79
80 void BrokenStrip(Int_t planebr, Int_t vabr, Int_t plane,
81 Int_t strip, Int_t & goodst){
82 if(plane==planebr && strip>=(256*(vabr-1)) && strip<(256*vabr))
83 goodst=strip-(256*(vabr-1));
84 }
85
86 Float_t SaturationTrackx(Float_t ADC);
87
88 Float_t SaturationTracky(Float_t ADC);
89
90 void CompressTrackData();
91
92 static const Int_t fNviews = 12;
93 static const Int_t fNladder=3;
94 static const Int_t fNstrips_ladder = 1024;
95 static const Int_t fNstrips_view = 3072;
96
97 static const Float_t fSigmaCommon = 25.; // to be adjusted
98 static const Int_t fCutzop = 4;
99 static const Int_t fCutclu = 7;
100 static const Int_t fNclst = 2;
101
102
103 Float_t fSigmaTrack[fNviews][fNstrips_view];
104 Float_t fPedeTrack[fNviews][fNstrips_view];
105
106
107 Float_t AdcTrack[fNviews][fNstrips_view];//Vector of strips to be compressed
108
109 //UShort_t fDataTrack[fTRACKbuffer];
110 //UInt_t fTracklength; // Actual length of buffer
111 Float_t fMipCor[fNladder][fNviews] ;
112 // end vectors, buffer, and variables for tracker
113
114 TRandom3 * fextrnd;
115
116 pGPSSPEHits * fhits; //pointer to Tracker's SD hit data
117
118 ClassDef(PamVMCTrkDig,1)
119
120 };
121
122
123
124 #endif // PAMVMCTRKSD_H

  ViewVC Help
Powered by ViewVC 1.1.23