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