00001
00002
00003
00004
00005
00006
00007
00009
00010 #ifndef NTPSREVENT_H
00011 #define NTPSREVENT_H
00012
00013 #include <iosfwd>
00014 #include "CandNtupleSR/NtpSRVertex.h"
00015 #include "CandNtupleSR/NtpSRPlane.h"
00016 #include "CandNtupleSR/NtpSRBleach.h"
00017 #include "CandNtupleSR/NtpSRWindow.h"
00018 #include "CandNtupleSR/NtpSRStripPulseHeight.h"
00019
00020 class NtpSREvent;
00021 std::ostream &operator << (std::ostream& os, const NtpSREvent& event);
00022
00023 class NtpSREvent : public TObject {
00024
00025 public:
00026 NtpSREvent(): index(0),slc(0),ndigit(0),nstpcnt(0),nstrip(0),stp(0),
00027 stpph0sigmap(0),stpph0mip(0),stpph0gev(0),stpph1sigmap(0),
00028 stpph1mip(0),stpph1gev(0),nshower(0),shw(0),ntrack(0),trk(0),
00029 contained(1) {}
00030 NtpSREvent(Int_t nstripinit,Int_t nshowerinit, Int_t ntrackinit);
00031 virtual ~NtpSREvent() { this -> Clear(); }
00032
00033
00034 virtual std::ostream& Print(std::ostream& os) const;
00035 virtual void Print(Option_t* option = "") const;
00036
00037
00038 void AddStripAt(Int_t stripindex,Int_t ind);
00039 void AddShowerAt(Int_t showerindex,Int_t ind);
00040 void AddTrackAt(Int_t trackindex,Int_t ind);
00041
00042 void Clear(Option_t* = "") { ClearStrips();
00043 nshower = 0; if ( shw ) delete [] shw; shw = 0;
00044 ntrack = 0; if ( trk ) delete [] trk; trk = 0; }
00045 void ClearStrips() { nstrip = 0; if ( stp ) delete [] stp; stp = 0; }
00046
00047 void SetPh(Float_t sigmap,Float_t mip,Float_t gev,
00048 UInt_t istrip,UShort_t iend);
00049
00050 public:
00051
00052
00053
00054
00055 UShort_t index;
00056 Short_t slc;
00057 Int_t ndigit;
00058
00059
00060
00061 Int_t nstpcnt;
00062 Int_t nstrip;
00063 Int_t* stp;
00064 Float_t* stpph0sigmap;
00065 Float_t* stpph0mip;
00066 Float_t* stpph0gev;
00067 Float_t* stpph1sigmap;
00068 Float_t* stpph1mip;
00069 Float_t* stpph1gev;
00070 Int_t nshower;
00071 Int_t* shw;
00072 Int_t ntrack;
00073 Int_t* trk;
00074 Int_t primshw;
00075
00076
00077
00078
00079
00080
00081 Int_t primtrk;
00082 Int_t contained;
00083
00084 NtpSRStripPulseHeight ph;
00085 NtpSRPlane plane;
00086 NtpSRVertex vtx;
00087 NtpSRVertex end;
00088 NtpSRBleach bleach;
00089 NtpSRWindow win;
00090
00091 ClassDef(NtpSREvent,8)
00092 };
00093
00094 inline void NtpSREvent::SetPh(Float_t sigmap, Float_t mip, Float_t gev,
00095 UInt_t istrip, UShort_t iend) {
00096 if ( (Int_t)istrip >= nstrip ) return;
00097 if ( iend == 0 ) {
00098 stpph0sigmap[istrip] = sigmap;
00099 stpph0mip[istrip] = mip;
00100 stpph0gev[istrip] = gev;
00101 }
00102 else if ( iend == 1 ) {
00103 stpph1sigmap[istrip] = sigmap;
00104 stpph1mip[istrip] = mip;
00105 stpph1gev[istrip] = gev;
00106 }
00107 return;
00108 }
00109
00110 #endif // NTPSREVENT_H