Changeset 18278 for branches/MarsWobble/mdrs/MCalibrateDrsTimes.cc
- Timestamp:
- 08/18/15 10:09:13 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/MarsWobble/mdrs/MCalibrateDrsTimes.cc
r18154 r18278 152 152 continue; 153 153 154 const Float_t signal = (*fSignals)[sw].GetArrivalTime(); 154 const Float_t signal = (*fSignals)[sw].GetArrivalTimeHiGain(); 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 }
Note:
See TracChangeset
for help on using the changeset viewer.