Changeset 3032 for trunk/MagicSoft/Mars
- Timestamp:
- 02/05/04 17:37:02 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r3031 r3032 29 29 - default step width 100 ps. 30 30 - look for half maximum (at rising edge) 31 32 * manalysis/MExtractSignal.[h,cc] 33 - removed uncommented code 34 - set start byte back by one like it was before TB's changes 35 (does not affect the calculation of number of FADC slices) 36 31 37 32 38 -
trunk/MagicSoft/Mars/manalysis/MArrivalTimeCalc.cc
r2944 r3032 61 61 // Default constructor. 62 62 // 63 // Initialize step size by default to 0.03 time slices == 100 ps. 64 // 63 65 MArrivalTimeCalc::MArrivalTimeCalc(const char *name, const char *title) 64 : fStepSize(0. 1)66 : fStepSize(0.03) 65 67 { 66 68 … … 80 82 // - MArrivalTime 81 83 // 84 82 85 Int_t MArrivalTimeCalc::PreProcess(MParList *pList) 83 86 { 87 88 84 89 fRawEvt = (MRawEvtData*)pList->FindObject(AddSerialNumber("MRawEvtData")); 85 90 if (!fRawEvt) … … 186 191 187 192 // 188 // Now find the maximum evaluating the spline function at every 1/10 time slice 193 // Now find the half maximum (!) 194 // evaluating the spline function at every fStepSize time slice 189 195 // 190 196 Double_t abscissa=0; … … 201 207 maxAb = abscissa; 202 208 } 209 // make step size a bit bigger first 203 210 abscissa += fStepSize; 204 } 205 206 return (Float_t)maxAb; 207 } 208 211 // abscissa += fStepSize; 212 } 213 214 // 215 // another (much smaller) loop to move back from the maximum 216 // 217 Double_t halfMaxAb = 0; 218 219 abscissa = maxAb; 220 221 while (abscissa > 0) 222 { 223 224 const Double_t swap = spline.Eval(abscissa); 225 226 if (swap < maxOrd/2.) 227 { 228 halfMaxAb = abscissa; 229 break; 230 } 231 232 abscissa -= fStepSize; 233 } 234 235 236 // return (Float_t)maxAb; 237 return (Float_t)halfMaxAb; 238 } 239 -
trunk/MagicSoft/Mars/manalysis/MExtractSignal.cc
r3016 r3032 17 17 ! 18 18 ! Author(s): Markus Gaug, 09/2003 <mailto:markus@ifae.es> 19 ! Thomas Bretz, 01/2004 19 20 ! 20 21 ! Copyright: MAGIC Software Development, 2000-2004 … … 124 125 void MExtractSignal::FindSignal(Byte_t *ptr, Int_t size, Int_t &sum, Byte_t &sat) const 125 126 { 126 Byte_t *end = ptr + size; 127 128 sum = 0; 129 sat = 0; 130 131 while (ptr<end) 132 { 133 sum += *ptr; 134 135 if (*ptr++ >= fSaturationLimit) 136 sat++; 127 128 Byte_t *end = ptr + size; 129 130 sum = 0; 131 sat = 0; 132 133 while (ptr<end) 134 { 135 sum += *ptr; 136 137 if (*ptr++ >= fSaturationLimit) 138 sat++; 137 139 } 138 140 } … … 156 158 Byte_t sathi, satlo; 157 159 158 FindSignal(pixel.GetHiGainSamples()+fHiGainFirst , fNumHiGainSamples, sumhi, sathi);159 FindSignal(pixel.GetLoGainSamples()+fLoGainFirst , fNumLoGainSamples, sumlo, satlo);160 FindSignal(pixel.GetHiGainSamples()+fHiGainFirst-1, fNumHiGainSamples, sumhi, sathi); 161 FindSignal(pixel.GetLoGainSamples()+fLoGainFirst-1, fNumLoGainSamples, sumlo, satlo); 160 162 161 163 if (satlo) … … 170 172 const Float_t pedrms = ped.GetPedestalRms(); 171 173 174 172 175 pix.SetExtractedSignal(sumhi - pedes*fNumHiGainSamples, pedrms*fSqrtHiGainSamples, 173 176 sumlo - pedes*fNumLoGainSamples, pedrms*fSqrtLoGainSamples);
Note:
See TracChangeset
for help on using the changeset viewer.