Changeset 18282 for branches/MarsGapdTimeJitter/msignal
- Timestamp:
- 08/18/15 10:28:44 (9 years ago)
- Location:
- branches/MarsGapdTimeJitter
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/MarsGapdTimeJitter
- Property svn:mergeinfo changed
-
branches/MarsGapdTimeJitter/msignal/MExtractFACT.cc
r17835 r18282 171 171 // 172 172 Float_t max = -1; 173 Float_t tmax = -1; 173 174 if (pmax>pbeg && pmax<pend-1) 174 175 { … … 194 195 max = exp(a + b*dx + c*dx*dx); 195 196 196 // Timeis position of maximum197 //time= dx;198 //time+= Int_t(pmax-ptr);197 // tmax is position of maximum 198 tmax = dx; 199 tmax += Int_t(pmax-ptr); 199 200 } 200 201 } … … 203 204 204 205 Float_t time = -1; 206 Float_t slope = -1; 205 207 if (max>=0) 206 208 { … … 208 210 209 211 // Time is position of half hight leading edge 210 pend = std::max(pbeg, pmax-1 0);212 pend = std::max(pbeg, pmax-15); 211 213 for (;pmax>=pend; pmax--) 212 214 if (*pmax<max/2) … … 217 219 time = (max/2-pmax[0])/(pmax[1]-pmax[0]); 218 220 time += Int_t(pmax-ptr); 221 slope = tmax - time; 219 222 } 220 223 } … … 223 226 { 224 227 time = gRandom->Uniform(rangehi)+fHiGainFirst+1; 225 max = p beg[uint16_t(time)];228 max = ptr[uint16_t(time)]; 226 229 } 227 230 … … 232 235 pix.SetGainSaturation(0); 233 236 234 tix.SetArrivalTime(time );237 tix.SetArrivalTime(time, slope); 235 238 tix.SetGainSaturation(0); 236 239 } -
branches/MarsGapdTimeJitter/msignal/MSignalCam.cc
r9573 r18282 584 584 // 10: as 0, but returns kFALSE if signal <=0 585 585 // 11: as 8, but returns kFALSE if signal <=0 586 // 12: time slope 586 587 // 587 588 Bool_t MSignalCam::GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type) const … … 593 594 594 595 // Used inlcudes status unampped 595 if (!pix.IsPixelUsed() && (type<6 || type==8 ))596 if (!pix.IsPixelUsed() && (type<6 || type==8 || type==14)) 596 597 return kFALSE; 597 598 … … 668 669 return pix.GetNumPhotons()>0; 669 670 671 case 13: // time slope 672 val = pix.GetTimeSlope(); 673 break; 674 675 case 14: // time slope 676 if (pix.IsPixelUnmapped()) 677 return kFALSE; 678 val = pix.GetTimeSlope(); 679 break; 680 670 681 case 9: 671 682 default: -
branches/MarsGapdTimeJitter/msignal/MSignalPix.cc
r12938 r18282 64 64 // size of the calibrated data by roughly 0.5% 65 65 // 66 // Version 8: 67 // ---------- 68 // - added new time variable fTimeSlope describing the width of the rise time 69 // 66 70 //////////////////////////////////////////////////////////////////////////// 67 71 #include "MSignalPix.h" … … 80 84 MSignalPix::MSignalPix(Float_t phot, Float_t errphot) : 81 85 fIsCore(kFALSE), fRing(1), fIdxIsland(-1), 82 fPhot(phot), fErrPhot(errphot), fArrivalTime(-1) 86 fPhot(phot), fErrPhot(errphot), fArrivalTime(-1), 87 fTimeSlope(-1) 83 88 { 84 89 MMath::ReducePrecision(fPhot); … … 94 99 fErrPhot = 0; 95 100 fArrivalTime = -1; 101 fTimeSlope = -1; 96 102 } 97 103 -
branches/MarsGapdTimeJitter/msignal/MSignalPix.h
r8528 r18282 19 19 Float_t fErrPhot; // the error of fPhot 20 20 Float_t fArrivalTime; // Calibrated Arrival Time 21 Float_t fTimeSlope; // Time between half rise time and position of maximum 21 22 22 23 public: … … 24 25 MSignalPix(const MSignalPix &pix) 25 26 : fIsCore(pix.fIsCore), fRing(pix.fRing), fIdxIsland(pix.fIdxIsland), 26 fPhot(pix.fPhot), fErrPhot(pix.fErrPhot), fArrivalTime(pix.fArrivalTime) 27 fPhot(pix.fPhot), fErrPhot(pix.fErrPhot), fArrivalTime(pix.fArrivalTime), 28 fTimeSlope(pix.fTimeSlope) 27 29 { 28 30 } … … 39 41 pix.fErrPhot = fErrPhot; 40 42 pix.fArrivalTime = fArrivalTime; 43 pix.fTimeSlope = fTimeSlope; 41 44 } 42 45 void Print(Option_t *opt = NULL) const; … … 46 49 Float_t GetErrorPhot() const { return fErrPhot; } 47 50 Float_t GetArrivalTime() const { return fArrivalTime; } 51 Float_t GetTimeSlope() const { return fTimeSlope; } 48 52 49 53 Bool_t IsPixelUsed() const { return fRing>0; } … … 65 69 void Set(Float_t np, Float_t ep) { MMath::ReducePrecision(np); MMath::ReducePrecision(ep); fPhot = np; fErrPhot = ep; } 66 70 void SetArrivalTime(Float_t tm) { fArrivalTime = tm; } 71 void SetTimeSlope(Float_t ts) { fTimeSlope = ts; } 67 72 68 73 //void AddNumPhotons(Float_t f) { fPhot += f; } 69 74 //void Scale(Float_t f) { fPhot /= f; } 70 75 71 ClassDef(MSignalPix, 7) // class containing information about the Cerenkov Photons in a pixel76 ClassDef(MSignalPix, 8) // class containing information about the Cerenkov Photons in a pixel 72 77 }; 73 78
Note:
See TracChangeset
for help on using the changeset viewer.