Go to the documentation of this file.00001 #ifndef TSTSEVENT_H
00002 #define TSTSEVENT_H
00003
00004 #include "TGo4EventElement.h"
00005 #include <vector>
00006 #include "../TSpacepoint.h"
00007 #include "TSTSTopology.h"
00008 #include "TSTSDigi.h"
00009
00010
00011
00012
00013
00014
00015 #define LASERSCANIDOFF 1000
00016
00017
00018 #define NUM_STS_STATIONS 2
00019 #define NUM_STS_ROCS 6
00020 #define NUM_STS_STRIPS 257
00021
00022
00023
00024 class TSTSEvent : public TGo4EventElement {
00025 protected:
00026 Int_t fNStations;
00027 std::vector< std::vector < TSpacepoint > > fPoints;
00028 std::vector< std::vector< std::vector < TSTSDigi > > > fDigis;
00029
00030 virtual Int_t Init();
00031 public:
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045 struct lasersetup_t {
00046 lasersetup_t(UInt_t id, Double_t x, Double_t y, Double_t u,
00047 UInt_t t) :
00048 ScanId(id), Xpos(x), Ypos(y), Voltage(u), UnixTime(t)
00049 {
00050 }
00051 lasersetup_t()
00052 {
00053 }
00054 void Clear()
00055 {
00056 ScanId=0;
00057 Xpos=-1;
00058 Ypos=-1;
00059 Voltage=-1;
00060 UnixTime=0;
00061 }
00062
00063 UInt_t ScanId;
00064 Double_t Xpos;
00065 Double_t Ypos;
00066 Double_t Voltage;
00067 UInt_t UnixTime;
00068 };
00069
00070
00071 TSTSEvent();
00072 TSTSEvent(const char* name, Short_t id=0);
00073 virtual ~TSTSEvent();
00074
00076 virtual void Clear(Option_t *t="");
00077
00078 void AddPoint( UInt_t plane, TSpacepoint const & point );
00079 Int_t GetNPlanes() const { return fPoints.size(); }
00080 Int_t GetNPoints( UInt_t plane ) const { return fPoints.at( plane ).size(); }
00081 TSpacepoint const & GetPoint( UInt_t plane, Int_t point ) const { return fPoints.at( plane ).at( point ); }
00082
00083 void AddDigi( UInt_t station, UInt_t side, TSTSDigi const & digi );
00084 Int_t GetNStations() const { return fNStations; }
00085 Int_t GetNDigis( UInt_t station, UInt_t side ) const { return fDigis.at( station ).at( side ).size(); }
00086 TSTSDigi const & GetDigi( UInt_t station, UInt_t side, UInt_t digi ) const { return fDigis.at( station ).at( side ).at( digi ); }
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101 const lasersetup_t& GetLaserSetup()
00102 {
00103 return fCurrentScan;
00104 }
00105
00106 void SetLaserSetup(lasersetup_t set)
00107 {
00108 fCurrentScan=set;
00109 }
00110 void ClearLaserSetup()
00111 {
00112 fCurrentScan.Clear();;
00113 }
00114
00115 protected:
00116
00117
00118
00119 lasersetup_t fCurrentScan;
00120
00121
00122 ClassDef(TSTSEvent,1)
00123 };
00124 #endif //TEVENT_H
00125
00126
00127