00001
00002
00003
00004
00005
00006
00007
00009
00010 #ifndef NTPSRSHOWER_H
00011 #define NTPSRSHOWER_H
00012
00013 #include <iosfwd>
00014
00015 #include "CandNtupleSR/NtpSRVertex.h"
00016 #include "CandNtupleSR/NtpSRPlane.h"
00017 #include "CandNtupleSR/NtpSRShowerPulseHeight.h"
00018 #include "CandNtupleSR/NtpSRSubShowerSummary.h"
00019
00020 class NtpSRShower;
00021 std::ostream &operator << (std::ostream& os, const NtpSRShower& shower);
00022
00023 class NtpSRShower : public TObject {
00024
00025 public:
00026 NtpSRShower(): index(0),slc(0),ndigit(0),nstpcnt(0),nstrip(0),stp(0),
00027 stpu(0),stpv(0),stpx(0),stpy(0),stpz(0),
00028 stpph0sigmap(0),stpph0mip(0),stpph0gev(0),
00029 stpph1sigmap(0),stpph1mip(0),stpph1gev(0),
00030 stpattn0c0(0),stpattn1c0(0),
00031 stpt0(0),stpt1(0),stptcal0t0(0),stptcal1t0(0),
00032 nUcluster(0),nVcluster(0),ncluster(0),clu(0),contained(0) {}
00033 NtpSRShower(Int_t nstripinit,Int_t nclusterinit=0);
00034
00035 virtual ~NtpSRShower() { this -> Clear(); }
00036
00037
00038 virtual std::ostream& Print(std::ostream& os) const;
00039 virtual void Print(Option_t* option = "") const;
00040
00041
00042 void AddStripAt(Int_t stripindex, Int_t ind);
00043 void AddClusterAt(Int_t clusterindex, Int_t ind);
00044 void Clear(Option_t* = "") { ClearStrips(); ClearClusters(); }
00045 void ClearStrips();
00046 void ClearClusters() { ncluster = 0; if ( clu ) delete [] clu; clu = 0; }
00047
00048 void SetPh(Float_t sigmap,Float_t mip,Float_t gev,
00049 UInt_t istrip,UShort_t iend);
00050 void SetTime(Double_t time, UInt_t istrip, UShort_t iend);
00051 void SetCalT0(Double_t calt0, UInt_t istrip, UShort_t iend);
00052 void SetAttnC0(Double_t attnc0, UInt_t istrip, UShort_t iend);
00053
00054 private:
00055
00056 NtpSRShower(const NtpSRShower& that);
00057 NtpSRShower& operator=(const NtpSRShower& that);
00058
00059 public:
00060
00061
00062
00063
00064 UShort_t index;
00065 Short_t slc;
00066 Int_t ndigit;
00067
00068
00069
00070 Int_t nstpcnt;
00071 Int_t nstrip;
00072 Int_t* stp;
00073 Float_t *stpu;
00074 Float_t *stpv;
00075 Float_t *stpx;
00076 Float_t *stpy;
00077 Float_t *stpz;
00078 Float_t *stpph0sigmap;
00079 Float_t *stpph0mip;
00080 Float_t *stpph0gev;
00081 Float_t *stpph1sigmap;
00082 Float_t *stpph1mip;
00083 Float_t *stpph1gev;
00084 Float_t *stpattn0c0;
00085 Float_t *stpattn1c0;
00086 Double_t *stpt0;
00087 Double_t *stpt1;
00088 Double_t *stptcal0t0;
00089 Double_t *stptcal1t0;
00090 Short_t nUcluster;
00091 Short_t nVcluster;
00092 Int_t ncluster;
00093 Int_t* clu;
00094 Int_t contained;
00095 NtpSRStripPulseHeight ph;
00096 NtpSRShowerPulseHeight shwph;
00097 NtpSRPlane plane;
00098 NtpSRVertex vtx;
00099 NtpSRSubShowerSummary sss;
00100
00101 ClassDef(NtpSRShower,12)
00102 };
00103
00104 inline void NtpSRShower::SetTime(Double_t time, UInt_t istrip, UShort_t iend) {
00105 if ( (Int_t)istrip >= nstrip ) return;
00106 if ( iend == 0 ) stpt0[istrip] = time;
00107 else if ( iend == 1 ) stpt1[istrip] = time;
00108 return;
00109 }
00110 inline void NtpSRShower::SetCalT0(Double_t calt0, UInt_t istrip,UShort_t iend) {
00111 if ( (Int_t)istrip >= nstrip ) return;
00112 if ( iend == 0 ) stptcal0t0[istrip] = calt0;
00113 else if ( iend == 1 ) stptcal1t0[istrip] = calt0;
00114 return;
00115 }
00116 inline void NtpSRShower::SetAttnC0(Double_t attnc0,UInt_t istrip,UShort_t iend){
00117 if ( (Int_t)istrip >= nstrip ) return;
00118 if ( iend == 0 ) stpattn0c0[istrip] = attnc0;
00119 else if ( iend == 1 ) stpattn1c0[istrip] = attnc0;
00120 return;
00121 }
00122 inline void NtpSRShower::SetPh(Float_t sigmap, Float_t mip, Float_t gev,
00123 UInt_t istrip, UShort_t iend) {
00124 if ( (Int_t)istrip >= nstrip ) return;
00125 if ( iend == 0 ) {
00126 stpph0sigmap[istrip] = sigmap;
00127 stpph0mip[istrip] = mip;
00128 stpph0gev[istrip] = gev;
00129 }
00130 else if ( iend == 1 ) {
00131 stpph1sigmap[istrip] = sigmap;
00132 stpph1mip[istrip] = mip;
00133 stpph1gev[istrip] = gev;
00134 }
00135 return;
00136 }
00137
00138 #endif // NTPSRSHOWER_H