Changeset 5544
- Timestamp:
- 12/01/04 20:49:05 (20 years ago)
- Location:
- trunk/MagicSoft
- Files:
-
- 6 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r5535 r5544 22 22 23 23 2004/12/01: Markus Gaug 24 25 * MExtractTimeAndChargeSpline.[h,cc]: 26 - introduced a random iterator for the "pedestal" calculation of 27 the amplitude spline. 28 24 29 25 30 * MExtractTimeAndChargeDigitalFilter.cc: -
trunk/MagicSoft/Mars/mhcalib/MHGausEvents.cc
r5477 r5544 487 487 488 488 Int_t win = 1; 489 Int_t nofit = 0; 489 490 490 491 if (option.Contains("events")) 491 win += 1; 492 { 493 option.ReplaceAll("events",""); 494 win += 1; 495 } 492 496 if (option.Contains("fourier")) 493 win += 2; 497 { 498 option.ReplaceAll("fourier",""); 499 win += 2; 500 } 501 494 502 if (IsEmpty()) 495 503 win--; 496 504 505 if (option.Contains("nofit")) 506 { 507 option.ReplaceAll("nofit",""); 508 nofit++; 509 } 510 497 511 pad->SetBorderMode(0); 498 512 pad->Divide(1,win); … … 510 524 511 525 fHGausHist.Draw(option); 512 513 if (fFGausFit) 514 { 515 fFGausFit->SetLineColor(IsGausFitOK() ? kGreen : kRed); 516 fFGausFit->Draw("same"); 517 } 526 527 if (!nofit) 528 if (fFGausFit) 529 { 530 fFGausFit->SetLineColor(IsGausFitOK() ? kGreen : kRed); 531 fFGausFit->Draw("same"); 532 } 518 533 } 519 534 -
trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeSpline.cc
r5511 r5544 177 177 // 178 178 MExtractTimeAndChargeSpline::MExtractTimeAndChargeSpline(const char *name, const char *title) 179 : fAbMax(0.), fAbMaxPos(0.), fHalfMax(0.) 179 : fAbMax(0.), fAbMaxPos(0.), fHalfMax(0.), fRandomIter(0) 180 180 { 181 181 … … 251 251 // -------------------------------------------------------------------------- 252 252 // 253 // ReInit 254 // 255 // Calls: 256 // - MExtractTimeAndCharge::ReInit(pList); 257 // - Deletes all arrays, if not NULL 258 // - Creates new arrays according to the extraction range 259 // 260 Bool_t MExtractTimeAndChargeSpline::ReInit(MParList *pList) 253 // InitArrays 254 // 255 // Gets called in the ReInit() and initialized the arrays 256 // 257 Bool_t MExtractTimeAndChargeSpline::InitArrays() 261 258 { 262 259 260 Int_t range = fHiGainLast - fHiGainFirst + 1 + fHiLoLast; 261 262 fHiGainSignal .Set(range); 263 fHiGainFirstDeriv .Set(range); 264 fHiGainSecondDeriv.Set(range); 265 266 range = fLoGainLast - fLoGainFirst + 1; 267 268 fLoGainSignal .Set(range); 269 fLoGainFirstDeriv .Set(range); 270 fLoGainSecondDeriv.Set(range); 271 272 fHiGainSignal .Reset(); 273 fHiGainFirstDeriv .Reset(); 274 fHiGainSecondDeriv.Reset(); 275 276 fLoGainSignal .Reset(); 277 fLoGainFirstDeriv .Reset(); 278 fLoGainSecondDeriv.Reset(); 279 263 280 if (IsExtractionType(kAmplitude)) 264 281 { … … 280 297 fWindowSizeLoGain = (Int_t)(fRiseTime + fFallTime+1); 281 298 } 282 283 if (!MExtractTimeAndCharge::ReInit(pList))284 return kFALSE;285 286 return kTRUE;287 }288 289 // --------------------------------------------------------------------------290 //291 // InitArrays292 //293 // Gets called in the ReInit() and initialized the arrays294 //295 Bool_t MExtractTimeAndChargeSpline::InitArrays()296 {297 298 Int_t range = fHiGainLast - fHiGainFirst + 1 + fHiLoLast;299 300 fHiGainSignal .Set(range);301 fHiGainFirstDeriv .Set(range);302 fHiGainSecondDeriv.Set(range);303 304 range = fLoGainLast - fLoGainFirst + 1;305 306 fLoGainSignal .Set(range);307 fLoGainFirstDeriv .Set(range);308 fLoGainSecondDeriv.Set(range);309 310 fHiGainSignal .Reset();311 fHiGainFirstDeriv .Reset();312 fHiGainSecondDeriv.Reset();313 314 fLoGainSignal .Reset();315 fLoGainFirstDeriv .Reset();316 fLoGainSecondDeriv.Reset();317 299 318 300 return kTRUE; … … 415 397 if (IsNoiseCalculation() && IsExtractionType(kAmplitude)) 416 398 { 417 // 418 // Take the spline value at the middle of the third slice (to avoid egde effects) 419 // 420 sum = 0.5*fHiGainSignal[2] 421 + 0.5*fHiGainSignal[3] 422 + (-0.375)*fHiGainSecondDeriv[2] 423 + (-0.375)*fHiGainSecondDeriv[3]; 399 if (fRandomIter == (TMath::Floor(1./fResolution))) 400 fRandomIter = 0; 401 402 const Float_t b = fRandomIter * fResolution; 403 const Float_t a = 1. - b; 404 405 fRandomIter++; 406 407 sum = a*fHiGainSignal[1] 408 + b*fHiGainSignal[2] 409 + (a*a*a-a)*fHiGainSecondDeriv[1] 410 + (b*b*b-b)*fHiGainSecondDeriv[2]; 424 411 return; 425 412 } … … 531 518 // Try a better precision. 532 519 // 533 const Float_t up = fAbMaxPos+step -0.035;534 const Float_t lo = fAbMaxPos-step +0.035;520 const Float_t up = fAbMaxPos+step - 1.5*fResolution; 521 const Float_t lo = fAbMaxPos-step + 1.5*fResolution; 535 522 const Float_t maxpossave = fAbMaxPos; 536 523 … … 539 526 b = x - lower; 540 527 541 step = 0.025; // step size of 83 ps528 step = fResolution; // step size of 83 ps 542 529 543 530 while (x<up) … … 562 549 563 550 // 564 // Second, try from time down to time-0.2 in steps of 0.025.551 // Second, try from time down to time-0.2 in steps of fResolution. 565 552 // 566 553 x = maxpossave; … … 571 558 // which requires new setting of klocont and khicont 572 559 // 573 if (x < klo + 0.02)560 if (x < klo + fResolution/2.) 574 561 { 575 562 klo--; … … 605 592 { 606 593 time = (Float_t)fHiGainFirst + fAbMaxPos; 607 dtime = 0.025;594 dtime = fResolution; 608 595 } 609 596 else … … 892 879 // Try a better precision. 893 880 // 894 const Float_t up = fAbMaxPos+step -0.035;895 const Float_t lo = fAbMaxPos-step +0.035;881 const Float_t up = fAbMaxPos+step - 1.5*fResolution; 882 const Float_t lo = fAbMaxPos-step + 1.5*fResolution; 896 883 const Float_t maxpossave = fAbMaxPos; 897 884 … … 900 887 b = x - lower; 901 888 902 step = 0.025; // step size of 83 ps889 step = fResolution; // step size of fResolution (33 ps ) 903 890 904 891 while (x<up) … … 932 919 // which requires new setting of klocont and khicont 933 920 // 934 if (x < klo + 0.02)921 if (x < klo + fResolution/2.) 935 922 { 936 923 klo--; … … 966 953 { 967 954 time = (Float_t)fLoGainFirst + fAbMaxPos; 968 dtime = 0.02;955 dtime = fResolution; 969 956 } 970 957 else -
trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeSpline.h
r5511 r5544 39 39 Float_t fFallTime; // The usual fall time of the pulse 40 40 41 UInt_t fRandomIter; // Counter used to randomize weights for noise calculation 42 41 43 Byte_t fFlags; // Bit-field to hold the time extraction types 42 43 Bool_t ReInit( MParList *pList );44 44 45 45 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print); -
trunk/MagicSoft/TDAS-Extractor/Pedestal.tex
r5543 r5544 158 158 \begin{figure}[htp] 159 159 \centering 160 \includegraphics[height=0.29\textheight]{MExtractTimeAndChargeDigitalFilter_Weights_cosmics_weights.dat_Range_00_18_02_14_Run_38993_Signal_Pixel200.eps} 161 \caption{MExtractTimeAndChargeDigitalFilter: Distribution of extracted "pedestals" from pedestal run with 162 closed camera lids for one channel.} 163 \vspace{\floatsep} 164 \includegraphics[height=0.29\textheight]{MExtractTimeAndChargeDigitalFilter_Weights_cosmics_weights.dat_Range_00_18_02_14_Run_38995_Signal_Pixel200.eps} 165 \caption{MExtractTimeAndChargeDigitalFilter: Distribution of extracted "pedestals" from pedestal run with galactic star background for one channel.} 166 \vspace{\floatsep} 167 \includegraphics[height=0.29\textheight]{MExtractTimeAndChargeDigitalFilter_Weights_cosmics_weights.dat_Range_00_18_02_14_Run_38996_Signal_Pixel200.eps} 168 \caption{MExtractTimeAndChargeDigitalFilter: Distribution of extracted "pedestals" from run with 169 continuous light level 100 for one channel.} 170 \end{figure} 171 172 \begin{figure}[htp] 173 \centering 160 174 \includegraphics[height=0.27\textheight]{MExtractTimeAndChargeDigitalFilter_Weights_cosmics_weights.dat_Range_00_18_02_14_Run_38993_RelMean.eps} 161 175 \caption{MExtractTimeAndChargeDigitalFilter: Relative Difference Mean Pedestal per FADC slice from pedestal run with closed camera lids} … … 167 181 \caption{MExtractTimeAndChargeDigitalFilter: Relative Difference Mean Pedestal per FADC slice from run with continuous light level: 100} 168 182 \end{figure} 183 169 184 170 185 \begin{figure}[htp] … … 189 204 \begin{figure}[htp] 190 205 \centering 206 \includegraphics[height=0.29\textheight]{MExtractTimeAndChargeSpline_Amplitude_Range_00_10_04_11_Run_38993_Signal_Pixel200.eps} 207 \caption{MExtractTimeAndChargeSpline with amplitude: Distribution of extracted "pedestals" from pedestal run 208 with closed camera lids for one channel.} 209 \vspace{\floatsep} 210 \includegraphics[height=0.29\textheight]{MExtractTimeAndChargeSpline_Amplitude_Range_00_10_04_11_Run_38995_Signal_Pixel200.eps} 211 \caption{MExtractTimeAndChargeSpline with amplitude: Distribution of extracted "pedestals" from pedestal run 212 with galactic star background for one channel.} 213 \vspace{\floatsep} 214 \includegraphics[height=0.29\textheight]{MExtractTimeAndChargeSpline_Amplitude_Range_00_10_04_11_Run_38996_Signal_Pixel200.eps} 215 \caption{MExtractTimeAndChargeSpline with amplitude: Distribution of extracted "pedestals" from run with 216 continuous light level: 100 for one channel.} 217 \end{figure} 218 219 \begin{figure}[htp] 220 \centering 191 221 \includegraphics[height=0.27\textheight]{MExtractTimeAndChargeSpline_Amplitude_Range_00_10_04_11_Run_38993_RelMean.eps} 192 222 \caption{MExtractTimeAndChargeSpline with amplitude: Relative Difference Mean Pedestal per FADC slice from pedestal run with closed camera lids} … … 198 228 \caption{MExtractTimeAndChargeSpline with amplitude: Relative Difference Mean Pedestal per FADC slice from run with continuous light level: 100} 199 229 \end{figure} 230 200 231 201 232 \begin{figure}[htp]
Note:
See TracChangeset
for help on using the changeset viewer.