1 #ifndef AliTRDtestBeam_h
2 #define AliTRDtestBeam_h
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
9 The class to read the test beam 2007 data
16 class AliTRDrawStreamV2;
17 class AliTRDRawStreamTB;
20 class AliTRDtestBeam: public TObject {
24 AliTRDtestBeam(); // ctor
25 AliTRDtestBeam(const char *filename); // constructor
26 AliTRDtestBeam(const AliTRDtestBeam &tb);
27 AliTRDtestBeam &operator=(const AliTRDtestBeam& /*tb*/) {return *this; }
28 virtual ~AliTRDtestBeam(); // dtor
32 AliTRDRawStreamTB *GetTRDrawStream(); // needs RawStreamTB
35 Short_t GetNSi1() const {return fNSi1;}
36 Short_t GetNSi2() const {return fNSi2;}
38 Int_t GetSi1Address(Int_t i) const {return (i<fNSi1)? fSi1Address[i] : -1;};
39 Int_t GetSi2Address(Int_t i) const {return (i<fNSi2)? fSi2Address[i] : -1;};
41 Int_t GetSi1Charge(Int_t i) const {return (i<fNSi1)? fSi1Charge[i] : -1;};
42 Int_t GetSi2Charge(Int_t i) const {return (i<fNSi2)? fSi1Charge[i] : -1;};
44 Double_t GetX(Int_t n) const {return (n<2)? fX[n] : -1;}
45 Double_t GetY(Int_t n) const {return (n<2)? fY[n] : -1;}
46 Double_t GetQx(Int_t n) const {return (n<2)? fQx[n] : -1;}
47 Double_t GetQy(Int_t n) const {return (n<2)? fQy[n] : -1;}
50 Double_t GetCher() const {return fCher;}
51 Double_t GetPb() const {return fPb;}
55 ifstream *fDataStream; // input data stream
57 Bool_t fHeaderIsRead; // do we read Header ?
58 Int_t fEventCount; // number of events
60 Int_t fCurrent; // ...
62 Int_t fDdlOff; // offset to DDL data
63 Int_t fSiOff; // offset to Silicon data
64 Int_t fQdcOff; // offset to Cherenkov and LeadGlass data
65 Int_t fDdlSize; // size of DDL data
67 Char_t *fFileHeader; // file header data
68 Char_t *fEventHeader; // event header data
69 Char_t *fEventData; // actual event data
73 Short_t fNSi1; // number of fired silicon pads from Si1
74 Short_t fNSi2; // fired pads in Si2
76 Int_t fSi1Address[1270]; // addresses of fires silicon pads Si1
77 Int_t fSi2Address[1270]; // addresses if fires silicon pads Si2
79 Int_t fSi1Charge[1270]; // charge collected on Si1
80 Int_t fSi2Charge[1270]; // charge collected on Si2
82 // reconstructed Silicon data
84 Double_t fX[2]; // x position for Si1 and Si2
85 Double_t fY[2]; // y position
86 Double_t fQx[2]; // charge on X
87 Double_t fQy[2]; // charge on y
90 Double_t fCher; // cherenkov signal
91 Double_t fPb; // lead glass signal
96 Int_t Int(Int_t i, Char_t *start);
100 static const Long_t fgkFileHeadSize; //= 544; // ?
101 static const Long_t fgkEventHeadSize; // = 68; //?
102 static const Long_t fgkLdcHeadSize; // = 68; //?
103 static const Long_t fgkEquipHeadSize; // = 28; //
104 static const Int_t fgkVmeIn; //=1; //VME event in
105 static const Int_t fgkSimIn; //=1; //Si-strips in
110 static const Int_t fgkPosRun; // = 20; //run nr. (in file and event header)
111 static const Int_t fgkPosLength; // = 0; //event/equip. length
112 static const Int_t fgkEqId; // = 8; //equipment id.
113 static const Int_t fgkPosSiOff; // = 12; //Si data size offset (3 extra words!!!)
115 ClassDef(AliTRDtestBeam,1) // description