Go to the documentation of this file.00001 #ifndef TGEMEVENT_H
00002 #define TGEMEVENT_H
00003
00004 #include "TGo4EventElement.h"
00005 #include <vector>
00006
00007 #include "Riostream.h"
00008 #include <stdint.h>
00009
00010
00011
00012
00013
00014
00015 #define NUM_GEM_STATIONS 2
00016 #define NUM_GEM_ROCS 2
00017 #define NUM_GEM_NX 2
00018 #define NUM_GEM_CH 128
00019 #define NUM_GEM_X 23
00020 #define NUM_GEM_Y 23
00021
00022 #define NUM_STRIPS_Y 128
00023
00024
00025 class TGEMEvent : public TGo4EventElement {
00026
00027 public:
00028
00029 struct gemhit_t {
00030 gemhit_t(Double_t ix, Double_t x, Double_t y, Double_t t, Double_t adc, uint64_t fulltime):
00031 StationIndex(ix),X(x),Y(y),Time(t),Fulltime(fulltime), ADC(adc)
00032 { }
00033 gemhit_t(){}
00034 Int_t StationIndex;
00035 Double_t X;
00036 Double_t Y;
00037 Double_t Time;
00038 uint64_t Fulltime;
00039 Double_t ADC;
00040 };
00041
00042 TGEMEvent();
00043 TGEMEvent(const char* name, Short_t id=0);
00044 virtual ~TGEMEvent();
00045
00047 virtual void Clear(Option_t *t="");
00048
00049 void AddHit(Int_t station, Double_t x, Double_t y, Double_t time, Double_t adc, uint64_t fulltime)
00050 {
00051 gemhit_t hit(station,x,y,time,adc,fulltime);
00052 fHits.push_back(hit);
00053 }
00054
00055
00056 unsigned NumHits() const { return fHits.size(); }
00057
00058
00059 gemhit_t& Hit(unsigned n) { return fHits[n]; }
00060
00061
00062 protected:
00063
00064 std::vector<gemhit_t> fHits;
00065
00066
00067 ClassDef(TGEMEvent,1)
00068 };
00069 #endif //TEVENT_H
00070
00071
00072