Changeset 2767 for trunk/MagicSoft
- Timestamp:
- 01/12/04 10:37:11 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2766 r2767 9 9 - replace logainshift by two independent variables: 10 10 logainfirst, logainlast 11 - because in most data, maximum occurs in slice 4, shift default 12 from slices 4-9 to slices 3-8. 11 13 12 14 -
trunk/MagicSoft/Mars/manalysis/MExtractSignal.cc
r2728 r2767 56 56 // Default constructor. 57 57 // 58 MExtractSignal::MExtractSignal(/*const Byte_t first, const Byte_t last, const Byte_t logainshift,*/ 59 const char *name, const char *title) 60 : /*fNumHiGainSamples(last-first+1), fNumLoGainSamples(last-first+1),*/ 61 fSaturationLimit(254) 58 MExtractSignal::MExtractSignal(const char *name, const char *title) 59 : fSaturationLimit(254) 62 60 { 63 61 … … 68 66 69 67 SetRange(); 70 /* 71 fFirst = first; 72 fLoGainFirst = first+logainshift; 73 74 fSqrtHiGainSamples = TMath::Sqrt((Float_t)fNumHiGainSamples); 75 fSqrtLoGainSamples = TMath::Sqrt((Float_t)fNumLoGainSamples); 76 */ 77 } 78 79 void MExtractSignal::SetRange(Byte_t first, Byte_t last, Byte_t logainshift) 80 { 81 fNumHiGainSamples = last-first+1; 82 fNumLoGainSamples = last-first+1; 83 84 fFirst = first; 85 fLoGainFirst = first+logainshift; 68 } 69 70 void MExtractSignal::SetRange(Byte_t hifirst, Byte_t hilast, Byte_t lofirst, Byte_t lolast) 71 { 72 73 fNumHiGainSamples = hilast-hifirst+1; 74 fNumLoGainSamples = lolast-lofirst+1; 75 76 fHiGainFirst = hifirst; 77 fLoGainFirst = lofirst; 86 78 87 79 fSqrtHiGainSamples = TMath::Sqrt((Float_t)fNumHiGainSamples); … … 144 136 fSignals->InitSize(cam->GetNumPixels()); 145 137 146 fSignals->SetNumUsedFADCSlices(fNumHiGainSamples, f First, fFirst+fNumHiGainSamples-1,147 fNumLoGainSamples, f First, fFirst+fNumLoGainSamples-1);138 fSignals->SetNumUsedFADCSlices(fNumHiGainSamples, fHiGainFirst, fHiGainFirst+fNumHiGainSamples-1, 139 fNumLoGainSamples, fLoGainFirst, fLoGainFirst+fNumLoGainSamples-1); 148 140 149 141 return kTRUE; … … 167 159 168 160 Byte_t *ptr = pixel.GetHiGainSamples(); 169 Byte_t *first = ptr + f First;170 Byte_t *last = ptr + f First + fNumHiGainSamples;161 Byte_t *first = ptr + fHiGainFirst; 162 Byte_t *last = ptr + fHiGainFirst + fNumHiGainSamples; 171 163 172 164 UInt_t sumHi = 0; … … 200 192 201 193 ptr = pixel.GetLoGainSamples(); 202 first = ptr + fLoGainFirst + 1;203 last = ptr + fLoGainFirst + fNumLoGainSamples +1;194 first = ptr + fLoGainFirst; 195 last = ptr + fLoGainFirst + fNumLoGainSamples; 204 196 Byte_t maxlo = 0; 205 197 Byte_t midlo = 0; … … 228 220 pedrms*fSqrtHiGainSamples, 229 221 ((Float_t)sumLo - pedes*(Float_t)fNumLoGainSamples), 230 pedrms*fSqrtLoGainSamples 231 ); 222 pedrms*fSqrtLoGainSamples); 232 223 233 224 pix.SetGainSaturation(satHi, satHi, satLo); … … 235 226 // FIXME: Arrival time has to be stored in MArrivalTime! 236 227 if (satHi) 237 pix.SetArrivalTimes((Float_t)(midlo+f First),0.,0.);228 pix.SetArrivalTimes((Float_t)(midlo+fLoGainFirst),0.,0.); 238 229 else 239 pix.SetArrivalTimes((Float_t)(midhi+f LoGainFirst),0.,0.);230 pix.SetArrivalTimes((Float_t)(midhi+fHiGainFirst),0.,0.); 240 231 241 232 } /* while (pixel.Next()) */
Note:
See TracChangeset
for help on using the changeset viewer.