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