Changeset 18243 for trunk/Mars
- Timestamp:
- 06/20/15 15:47:28 (9 years ago)
- Location:
- trunk/Mars
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mdrs/MCalibrateDrsTimes.cc
r18154 r18243 153 153 154 154 const Float_t signal = (*fSignals)[sw].GetArrivalTime(); 155 const Float_t slope = (*fSignals)[sw].GetArrivalTimeHiGainError(); 155 156 const Float_t offset = fCalib ? fCalib->GetOffset(hw, start[hw], signal) : 0; 157 const Float_t offset2 = (fCalib && (signal-slope)>=0) ? fCalib->GetOffset(hw, start[hw], signal-slope) : 0; 156 158 const Float_t delay = fCalib ? fCalib->GetDelay(hw) : 0; 157 159 … … 160 162 161 163 // convert from slices to ns 162 const Float_t utime = 1000*(signal )/fFreq-delay; // [ns] 163 const Float_t time = 1000*(signal-offset)/fFreq-delay; // [ns] 164 const Float_t utime = 1000*(signal )/fFreq-delay; // [ns] 165 const Float_t time = 1000*(signal-offset)/fFreq-delay; // [ns] 166 const Float_t slopecal = (slope-offset+offset2)<0 ? -1 : 1000*(slope-offset+offset2)/fFreq; // [ns] 167 const Float_t uslope = slope<0 ? -1 : 1000*(slope)/fFreq; // [ns] 164 168 165 169 /* … … 172 176 { 173 177 (*fArrivalTime)[idx[j]].SetArrivalTime(time); 178 (*fArrivalTime)[idx[j]].SetTimeSlope(slopecal); 174 179 if (fArrivalTimeU) 180 { 175 181 (*fArrivalTimeU)[idx[j]].SetArrivalTime(utime); 182 (*fArrivalTimeU)[idx[j]].SetTimeSlope(uslope); 183 } 176 184 } 177 185 } -
trunk/Mars/mhist/MHEvent.cc
r13365 r18243 194 194 fHist->SetName("Island Index"); 195 195 fHist->SetYTitle("Index"); 196 fHist->SetPrettyPalette(); 197 break; 198 case kEvtTimeSlope: 199 fHist->SetName("Time Slope"); 200 fHist->SetYTitle("delta_t [ns]"); 196 201 fHist->SetPrettyPalette(); 197 202 break; … … 295 300 fHist->SetCamContent(*event, 5); 296 301 break; 302 case kEvtTimeSlope: 303 fHist->SetCamContent(*event, 12); 304 break; 297 305 default: 298 306 *fLog << "ERROR - Case " << (int)fType << " not implemented..." << endl; -
trunk/Mars/mhist/MHEvent.h
r13365 r18243 27 27 kEvtCleaningLevels, kEvtCleaningData, 28 28 kEvtIdxMax, kEvtArrTime, kEvtArrTimeCleaned, 29 kEvtTrigPix, kEvtIslandIndex 29 kEvtTrigPix, kEvtIslandIndex, kEvtTimeSlope 30 30 }; 31 31 -
trunk/Mars/msignal/MExtractFACT.cc
r17835 r18243 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 { … … 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 } … … 232 235 pix.SetGainSaturation(0); 233 236 234 tix.SetArrivalTime(time );237 tix.SetArrivalTime(time, slope); 235 238 tix.SetGainSaturation(0); 236 239 } -
trunk/Mars/msignal/MSignalCam.cc
r9573 r18243 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 … … 668 669 return pix.GetNumPhotons()>0; 669 670 671 case 12: // time slope 672 val = pix.GetTimeSlope(); 673 break; 674 670 675 case 9: 671 676 default: -
trunk/Mars/msignal/MSignalPix.cc
r12938 r18243 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 -
trunk/Mars/msignal/MSignalPix.h
r8528 r18243 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.