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 */
8 ////////////////////////////////////////////////////////////////////////////
10 // Class to handle the test beam data of 2007 //
13 // Sylwester Radomski (radomski@physi.uni-heidelberg.de) //
14 // Anton Andronic (A.Andronic@gsi.de) //
16 ////////////////////////////////////////////////////////////////////////////
22 class AliTRDrawStreamV2;
23 class AliTRDrawStream;
27 class AliTRDtestBeam: public TObject {
31 AliTRDtestBeam(); // ctor
32 AliTRDtestBeam(const char *filename); // constructor
33 AliTRDtestBeam(const AliTRDtestBeam &tb);
34 AliTRDtestBeam& operator = (const AliTRDtestBeam& /*tb*/) { return *this; };
35 virtual ~AliTRDtestBeam(); // dtor
39 AliTRDrawStream *GetTRDrawStream(); // needs RawStreamTB
42 Short_t GetNSi1() const {return fNSi1;}
43 Short_t GetNSi2() const {return fNSi2;}
45 Int_t GetSi1Address(Int_t i) const {return (i<fNSi1)? fSi1Address[i] : -1;};
46 Int_t GetSi2Address(Int_t i) const {return (i<fNSi2)? fSi2Address[i] : -1;};
48 Int_t GetSi1Charge(Int_t i) const {return (i<fNSi1)? fSi1Charge[i] : -1;};
49 Int_t GetSi2Charge(Int_t i) const {return (i<fNSi2)? fSi2Charge[i] : -1;};
51 Double_t GetX(Int_t n) const {return (n<2)? fX[n] : -1;}
52 Double_t GetY(Int_t n) const {return (n<2)? fY[n] : -1;}
53 Double_t GetQx(Int_t n) const {return (n<2)? fQx[n] : -1;}
54 Double_t GetQy(Int_t n) const {return (n<2)? fQy[n] : -1;}
57 Double_t GetCher() const {return fCher;}
58 Double_t GetPb() const {return fPb;}
62 ifstream *fDataStream; // input data stream
64 Bool_t fHeaderIsRead; // do we read Header ?
65 Int_t fEventCount; // number of events
67 Int_t fCurrent; // ...
69 Int_t fDdlOff; // offset to DDL data
70 Int_t fSiOff; // offset to Silicon data
71 Int_t fQdcOff; // offset to Cherenkov and LeadGlass data
72 Int_t fDdlSize; // size of DDL data
74 Char_t *fFileHeader; // file header data
75 Char_t *fEventHeader; // event header data
76 Char_t *fEventData; // actual event data
80 Short_t fNSi1; // number of fired silicon pads from Si1
81 Short_t fNSi2; // fired pads in Si2
83 Int_t fSi1Address[1270]; // addresses of fires silicon pads Si1
84 Int_t fSi2Address[1270]; // addresses if fires silicon pads Si2
86 Int_t fSi1Charge[1270]; // charge collected on Si1
87 Int_t fSi2Charge[1270]; // charge collected on Si2
89 // reconstructed Silicon data
91 Double_t fX[2]; // x position for Si1 and Si2
92 Double_t fY[2]; // y position
93 Double_t fQx[2]; // charge on X
94 Double_t fQy[2]; // charge on y
97 Double_t fCher; // cherenkov signal
98 Double_t fPb; // lead glass signal
103 Int_t Int(Int_t i, Char_t *start) const;
107 static const Long_t fgkFileHeadSize; //= 544; // ?
108 static const Long_t fgkEventHeadSize; // = 68; //?
109 static const Long_t fgkLdcHeadSize; // = 68; //?
110 static const Long_t fgkEquipHeadSize; // = 28; //
111 static const Int_t fgkVmeIn; //=1; //VME event in
112 static const Int_t fgkSimIn; //=1; //Si-strips in
117 static const Int_t fgkPosRun; // = 20; //run nr. (in file and event header)
118 static const Int_t fgkPosLength; // = 0; //event/equip. length
119 static const Int_t fgkEqId; // = 8; //equipment id.
120 static const Int_t fgkPosSiOff; // = 12; //Si data size offset (3 extra words!!!)
122 ClassDef(AliTRDtestBeam,1) // description