Changeset 3084
- Timestamp:
- 02/10/04 22:45:23 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r3082 r3084 29 29 spectrum 30 30 31 * mfilter/MCosmics.[h,cc] 32 * mfilter/Makefile 33 * mfilter/FilterLinkDef.h 34 - new filter removing cosmics, the same as in MCalibrationCalc 35 where it was removed now. 36 Call: MCosmics cosmics; 37 MContinue cont(&cosmics); 38 tlist.AddToList(&cont); 39 40 * mcalib/MCalibrationCalc.[h,cc] 41 - removed cosmics rejection from there 42 43 * macros/calibration.C 44 * mjobs/MJCalibration.cc 45 - changed cosmics rejection to the filter algorithm 46 31 47 32 48 2004/02/09: Markus Gaug -
trunk/MagicSoft/Mars/macros/calibration.C
r3060 r3084 219 219 MArrivalTimeCalc timecalc; 220 220 MCalibrationCalc calcalc; 221 222 // 223 // Apply a filter against cosmics 224 // (was directly in MCalibrationCalc in earlier versions) 225 // 226 MFCosmics cosmics; 227 MContinue cont(&cosmics); 221 228 222 229 // … … 241 248 // (This is a preliminary feature) 242 249 // 243 //calcalc.ExcludePixelsFromAsciiFile("badpixels_all.dat");250 calcalc.ExcludePixelsFromAsciiFile("badpixels.dat"); 244 251 245 252 // … … 248 255 // 249 256 // calcalc.SkipBlindPixelFit(); 250 251 //252 // In case, you want to skip the cosmics rejection253 // (NOT RECOMMENDED!!!)254 //255 // calcalc.SkipCosmicsRejection();256 257 257 258 // … … 276 277 // 277 278 // tlist2.AddToList(&timecalc); 279 tlist2.AddToList(&cont); 278 280 tlist2.AddToList(&calcalc); 279 281 … … 301 303 // just one example how to get the plots of individual pixels 302 304 // 303 calcam[ 356].DrawClone();305 calcam[543].DrawClone(); 304 306 305 307 // Create histograms to display … … 312 314 MHCamera disp7 (geomcam, "Cal;FFactorConv", "Conversion Factor (F-Factor Method)"); 313 315 MHCamera disp8 (geomcam, "Cal;FFactorFFactor", "Total F-Factor (F-Factor Method)"); 314 MHCamera disp9 (geomcam, "Cal;BlindPixPh", " Nr. of Photonsinside plexiglass (Blind Pixel Method)");316 MHCamera disp9 (geomcam, "Cal;BlindPixPh", "Photon flux inside plexiglass (Blind Pixel Method)"); 315 317 MHCamera disp10 (geomcam, "Cal;BlindPixConv", "Conversion Factor (Blind Pixel Method)"); 316 318 MHCamera disp11 (geomcam, "Cal;BlindPixFFactor","Total F-Factor (Blind Pixel Method)"); 317 MHCamera disp12 (geomcam, "Cal;PINDiodePh", " Nr. of Photonsoutside plexiglass (PIN Diode Method)");319 MHCamera disp12 (geomcam, "Cal;PINDiodePh", "Photon flux outside plexiglass (PIN Diode Method)"); 318 320 MHCamera disp13 (geomcam, "Cal;PINDiodeConv", "Conversion Factor (PIN Diode Method)"); 319 321 MHCamera disp14 (geomcam, "Cal;PINDiodeFFactor","Total F-Factor (PIN Diode Method)"); … … 416 418 disp8.SetYTitle("\\sqrt{N_{PhE}}*\\sigma_{Charge}/\\mu_{Charge} [1]"); 417 419 418 disp9.SetYTitle(" Nr. Photons [1]");420 disp9.SetYTitle("Photon flux [ph/mm^2]"); 419 421 disp10.SetYTitle("Conversion Factor [Phot/FADC Count]"); 420 422 disp11.SetYTitle("\\sqrt{N_{Ph}}*\\sigma_{Charge}/\\mu_{Charge} [1]"); 421 423 422 disp12.SetYTitle(" Nr. Photons [1]");424 disp12.SetYTitle("Photon flux [ph/mm^2]"); 423 425 disp13.SetYTitle("Conversion Factor [Phot/FADC Count]"); 424 426 disp14.SetYTitle("\\sqrt{N_{Ph}}*\\sigma_{Charge}/\\mu_{Charge} [1]"); … … 465 467 // F-Factor Method 466 468 TCanvas &c4 = display->AddTab("F-Factor"); 467 c4.Divide( 3,3);468 469 CamDraw(c4, disp6,calcam,1, 3, 2);470 CamDraw(c4, disp7,calcam,2, 3, 2);471 CamDraw(c4, disp8,calcam,3, 3 , 2);469 c4.Divide(2,3); 470 471 CamDraw(c4, disp6,calcam,1, 2 , 2); 472 CamDraw(c4, disp7,calcam,2, 2 , 2); 473 // CamDraw(c4, disp8,calcam,3, 3 , 2); 472 474 473 475 // Blind Pixel Method -
trunk/MagicSoft/Mars/mcalib/MCalibrationCalc.cc
r3075 r3084 43 43 // Optionally exclude pixels from calibration 44 44 // 45 // Process: Optionally, a cut on cosmics can be performed 46 // 47 // Every MCalibrationPix holds a histogram class, 45 // Process: Every MCalibrationPix holds a histogram class, 48 46 // MHCalibrationPixel which itself hold histograms of type: 49 47 // HCharge(npix) (distribution of summed FADC time slice … … 144 142 145 143 SETBIT(fFlags, kUseBlindPixelFit); 146 SETBIT(fFlags, kUseCosmicsRejection);147 144 SETBIT(fFlags, kUseQualityChecks); 148 145 SETBIT(fFlags, kHiLoGainCalibration); … … 156 153 157 154 fEvents = 0; 158 fCosmics = 0;159 155 160 156 fNumHiGainSamples = 0; … … 391 387 MRawEvtPixelIter pixel(fRawEvt); 392 388 393 //394 // Perform cosmics cut395 //396 if (TESTBIT(fFlags,kUseCosmicsRejection))397 {398 399 Int_t cosmicpix = 0;400 401 //402 // Create a first loop to sort out the cosmics ...403 //404 // This is a very primitive check for the number of cosmicpixs405 // The cut will be applied in the fit, but for the blind pixel,406 // we need to remove this event407 //408 // FIXME: In the future need a much more sophisticated one!!!409 //410 411 while (pixel.Next())412 {413 414 const UInt_t pixid = pixel.GetPixelId();415 416 MExtractedSignalPix &sig = (*fSignals)[pixid];417 MPedestalPix &ped = (*fPedestals)[pixid];418 Float_t pedrms = ped.GetPedestalRms()*fSqrtHiGainSamples;419 Float_t sumhi = sig.GetExtractedSignalHiGain();420 421 //422 // We consider a pixel as presumably due to cosmics423 // if its sum of FADC slices is lower than 3 pedestal RMS424 //425 if (sumhi < 3.*pedrms )426 cosmicpix++;427 }428 429 //430 // If the camera contains more than 230431 // (this is the number of outer pixels plus about 50 inner ones)432 // presumed pixels due to cosmics, then the event is discarted.433 // This procedure is more or less equivalent to keeping only events434 // with at least 350 pixels with high signals.435 //436 if (cosmicpix > 230.)437 {438 fCosmics++;439 return kCONTINUE;440 }441 442 pixel.Reset();443 }444 445 389 fEvents++; 446 390 447 // Float_t referencetime = 0.;448 449 391 // 450 392 // Create a (second) loop to do fill the calibration histograms … … 624 566 { 625 567 *fLog << err << GetDescriptor() 626 << ": This run contains only cosmics or pedestals, " 627 << "cannot find events with more than 350 illuminated pixels. " << endl; 568 << ": This run contains no calibration data! " << endl; 628 569 return kFALSE; 629 570 } 630 571 631 if (fEvents < fCosmics)632 *fLog << warn << GetDescriptor()633 << ": WARNING: Run contains more cosmics or pedestals than calibration events " << endl;634 635 636 572 *fLog << inf << GetDescriptor() << ": Cut Histogram Edges" << endl; 637 573 … … 784 720 fCalibrations->SetReadyToSave(); 785 721 786 if (GetNumExecutions()==0)787 return kTRUE;788 789 *fLog << inf << endl;790 *fLog << dec << setfill(' ') << fCosmics << " Events presumably cosmics" << endl;791 792 722 return kTRUE; 793 723 } 724 794 725 795 726 Bool_t MCalibrationCalc::CalcSignalBlindPixel(Byte_t *ptr, Float_t &signal, const Float_t ped) const -
trunk/MagicSoft/Mars/mcalib/MCalibrationCalc.h
r3056 r3084 54 54 55 55 Int_t fEvents; // Number of events 56 Int_t fCosmics; // Number of events due to supposed cosmics57 56 58 57 Byte_t fNumHiGainSamples; … … 67 66 68 67 enum { kUseBlindPixelFit, kUsePinDiodeFit, 69 kUse CosmicsRejection, kUseQualityChecks,68 kUseQualityChecks, 70 69 kHiLoGainCalibration, 71 70 kHiGainOverFlow, kLoGainOverFlow }; … … 96 95 void SkipPinDiodeFit(Bool_t b=kTRUE) 97 96 {b ? CLRBIT(fFlags, kUsePinDiodeFit) : SETBIT(fFlags, kUsePinDiodeFit);} 98 void SkipCosmicsRejection(Bool_t b=kTRUE)99 {b ? CLRBIT(fFlags, kUseCosmicsRejection) : SETBIT(fFlags, kUseCosmicsRejection);}100 97 void SkipQualityChecks(Bool_t b=kTRUE) 101 98 {b ? CLRBIT(fFlags, kUseQualityChecks) : SETBIT(fFlags, kUseQualityChecks);} -
trunk/MagicSoft/Mars/mfilter/FilterLinkDef.h
r2743 r3084 26 26 #pragma link C++ class MFSelFinal+; 27 27 #pragma link C++ class MFSoftwareTrigger+; 28 #pragma link C++ class MFCosmics+; 28 29 29 30 #pragma link C++ class MFEnergySlope+; -
trunk/MagicSoft/Mars/mfilter/Makefile
r2800 r3084 52 52 MFSelFinal.cc \ 53 53 MFSoftwareTrigger.cc \ 54 MFCosmics.cc \ 54 55 MFEnergySlope.cc 55 56 -
trunk/MagicSoft/Mars/mtools/MFFT.cc
r3074 r3084 68 68 #include "MFFT.h" 69 69 70 #include "TMath.h"70 #include <TMath.h> 71 71 72 72 #include "MLog.h" … … 930 930 931 931 } 932 -
trunk/MagicSoft/Mars/mtools/MFFT.h
r3053 r3084 76 76 TArrayF* PowerSpectrumDensity(const TArrayF *array); 77 77 TArrayD* PowerSpectrumDensity(const TArrayD *array); 78 78 79 79 TArrayF* RealFunctionSpectrum(const TArrayF *data); 80 80
Note:
See TracChangeset
for help on using the changeset viewer.