Changeset 8582 for trunk/MagicSoft/Mars
- Timestamp:
- 06/19/07 10:35:33 (17 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r8580 r8582 18 18 19 19 -*-*- END OF LINE -*-*- 20 21 2007/06/19 Thomas Bretz 22 23 * callisto.rc, callisto_Dec04Jan05.rc: 24 - changed the default values (commented out anyhow) to the real 25 values. 26 27 * mbase/MEnv.h: 28 - allow printing contents from the context menu 29 30 * mcalib/MCalibrationRelTimeCalc.cc: 31 - replaced kDeviatingTimeResolution by new kDeviatingRelTimeResolution 32 33 * mhcalib/MHCalibrationPulseTimeCam.cc: 34 - automatically scale the saturation limit to the fadc range 35 36 * mjobs/MJCalibrateSignal.cc: 37 - save resource file into signal*.root file 38 - added some code (still commented) for saving the calibration 39 results 40 - do not fill the bad-pixel plots with MCs 41 42 * mjobs/MJCalibration.cc: 43 - save resource file into signal*.root file 44 45 * mjobs/MJPedestal.cc: 46 - clarified output for "mean pulse time" further 47 48 * mpedestal/MExtractPedestal.cc: 49 - automatically scale the maximum variation and the 50 maximum value to fit the FADC range 51 52 * mraw/MRawRunHeader.h: 53 - added a function returnung the maximum value of the FADC 54 - changed the GetScale from a calculation to a switch 55 (faster and easier to understand) 56 57 * msignal/MExtractor.cc: 58 - get the maximum in case of no lo-gains from the run-header 59 60 20 61 21 62 2007/06/18 Thomas Bretz -
trunk/MagicSoft/Mars/NEWS
r8577 r8582 7 7 Also the old values seemed not exactly the PulsePos used for 8 8 teh check. 9 10 - general: Now the output files (calib*.root, etc) also contain the 11 resource file (to check it open it in the TBrowser and choose Print() 12 from the context menu) 9 13 10 14 - callisto: improved calculation of spline coefficients a lot. This -
trunk/MagicSoft/Mars/callisto.rc
r8577 r8582 311 311 # Define the Pulse Position check parameters: 312 312 # ------------------------------------------------------------------------- 313 #MJPedestalY2.MHCalibrationPulseTimeCam.SaturationLimit: 2 55314 #MJPedestalY2.MHCalibrationPulseTimeCam.LowerSignalLimit: 100315 #MJPedestalY2.MHCalibrationPulseTimeCam.NumPixelsRequired: 2313 #MJPedestalY2.MHCalibrationPulseTimeCam.SaturationLimit: 245 314 #MJPedestalY2.MHCalibrationPulseTimeCam.LowerSignalLimit: 85 315 #MJPedestalY2.MHCalibrationPulseTimeCam.NumPixelsRequired: 2 316 316 #MJPedestalY2.PixelCheck: no 317 317 -
trunk/MagicSoft/Mars/callisto_Dec04Jan05.rc
r8577 r8582 339 339 # Define the Pulse Position check parameters: 340 340 # ------------------------------------------------------------------------- 341 #MJPedestalY2.MHCalibrationPulseTimeCam.SaturationLimit: 2 55342 #MJPedestalY2.MHCalibrationPulseTimeCam.LowerSignalLimit: 100343 #MJPedestalY2.MHCalibrationPulseTimeCam.NumPixelsRequired: 2341 #MJPedestalY2.MHCalibrationPulseTimeCam.SaturationLimit: 245 342 #MJPedestalY2.MHCalibrationPulseTimeCam.LowerSignalLimit: 85 343 #MJPedestalY2.MHCalibrationPulseTimeCam.NumPixelsRequired: 2 344 344 #MJPedestalY2.PixelCheck: no 345 345 -
trunk/MagicSoft/Mars/mbase/MEnv.h
r8539 r8582 67 67 void AddEnv(const TEnv &env, Bool_t overwrite=kTRUE); 68 68 69 void Print(Option_t *option) const { TEnv::Print(option); } 70 void Print() const { TEnv::PrintEnv(kEnvLocal); } //*MENU* 71 69 72 void PrintUntouched() const; 70 73 Int_t GetNumUntouched() const; -
trunk/MagicSoft/Mars/mcalib/MCalibrationRelTimeCalc.cc
r8484 r8582 227 227 *fLog << GetDescriptor() << ": Errors statistics:" << endl; 228 228 229 PrintUncalibrated(MBadPixelsPix::kDeviating TimeResolution,229 PrintUncalibrated(MBadPixelsPix::kDeviatingRelTimeResolution, 230 230 Form("%s%2.1f%s","Rel.time rms more than ", fRelTimeResolutionLimit, " dev from median:")); 231 231 PrintUncalibrated(MBadPixelsPix::kRelTimeOscillating, … … 309 309 { 310 310 *fLog << warn << "Pixel " << setw(4) << i << ": Rel-time rms could not be calculated." << endl; 311 (*fBadPixels)[i].SetUncalibrated(MBadPixelsPix::kDeviating TimeResolution);311 (*fBadPixels)[i].SetUncalibrated(MBadPixelsPix::kDeviatingRelTimeResolution); 312 312 continue; 313 313 } … … 320 320 << Form("[%4.2f,%4.2f]", lolim, hilim) << endl; 321 321 322 (*fBadPixels)[i].SetUncalibrated(MBadPixelsPix::kDeviating TimeResolution);322 (*fBadPixels)[i].SetUncalibrated(MBadPixelsPix::kDeviatingRelTimeResolution); 323 323 } 324 324 } … … 342 342 343 343 if (IsCheckDeviatingBehavior()) 344 if (bad.IsUncalibrated(MBadPixelsPix::kDeviating TimeResolution))344 if (bad.IsUncalibrated(MBadPixelsPix::kDeviatingRelTimeResolution)) 345 345 bad.SetUnsuitable(MBadPixelsPix::kUnsuitableRun); 346 346 -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationPulseTimeCam.cc
r8552 r8582 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MHCalibrationPulseTimeCam.cc,v 1.4 0 2007-06-12 20:49:55tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MHCalibrationPulseTimeCam.cc,v 1.41 2007-06-19 09:25:38 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 394 394 395 395 // Check for saturation 396 if (evt->GetSaturation(idx, fSaturationLimit )>0)396 if (evt->GetSaturation(idx, fSaturationLimit*fRunHeader->GetScale())>0) 397 397 continue; 398 398 -
trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc
r8518 r8582 151 151 // file always. Which might make the usage outside of 152 152 // callisto difficult. 153 TObjArray cont; 154 cont.Add(const_cast<TEnv*>(GetEnv())); 155 156 if (fDisplay) 157 cont.Add(fDisplay); 158 153 159 const TString name(Form("signal%08d.root", fSequence.GetSequence())); 154 return Write Display(name, "UPDATE");160 return WriteContainer(cont, name, "UPDATE"); 155 161 } 156 162 … … 675 681 writemc.AddContainer("MMcEvtBasic", "OriginalMC"); 676 682 683 // Write the special calib tree 684 /* 685 MWriteRootFile writecal(2, fname, fOverwrite?"RECREATE":"NEW"); 686 writecal.SetName("WriteCalib"); 687 writecal.AddContainer("MBadPixelsCam", "Calib"); 688 writecal.AddContainer("MCalibrationChargeCam", "Calib"); 689 writecal.AddContainer("MCalibrationRelTimeCam", "Calib"); 690 */ 691 677 692 // Now setup tasklist for events 678 693 MTaskList tlist2; … … 722 737 if (fIsRelTimesUpdate) 723 738 tlist3.AddToList(&recalc); // MCalibrationRelTimeCam 724 } 739 740 //tlist3.AddToList(&writecal); // MWriteRootFile 741 } 725 742 726 743 // Continue for all non-cosmic events … … 761 778 // tlist2.AddToList(&fill7); 762 779 tlist2.AddToList(&fill9); 763 tlist2.AddToList(&fillB); 764 tlist2.AddToList(&fillD); 780 if (!fSequence.IsMonteCarlo()) 781 { 782 tlist2.AddToList(&fillB); 783 tlist2.AddToList(&fillD); 784 } 765 785 if (extractor1->HasLoGain()) 766 786 { -
trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
r8518 r8582 2027 2027 cont.Add(fDisplay); 2028 2028 2029 cont.Add(const_cast<TEnv*>(GetEnv())); 2030 2029 2031 return WriteContainer(cont, GetOutputFileName(), "UPDATE"); 2030 2032 } -
trunk/MagicSoft/Mars/mjobs/MJCut.cc
r8518 r8582 319 319 if (fDisplay) 320 320 arr.Add(fDisplay); 321 322 arr.Add(const_cast<TEnv*>(GetEnv())); 321 323 322 324 return WriteContainer(arr, fname, "UPDATE"); -
trunk/MagicSoft/Mars/mjobs/MJPedestal.cc
r8518 r8582 895 895 return kFALSE; 896 896 897 *fLog << all << "Mean pulse time (" << (fSequence.IsMonteCarlo()?"MC":"cosmics") << "): ";897 *fLog << all << "Mean pulse time/Avg pos.of maximum (" << (fSequence.IsMonteCarlo()?"MC":"cosmics") << "): "; 898 898 *fLog << meanpulsetime << "+-" << rmspulsetime << endl; 899 899 -
trunk/MagicSoft/Mars/mjobs/MJSpectrum.cc
r8222 r8582 1322 1322 1323 1323 // check if output should be written 1324 if (!fPathOut.IsNull()) 1325 fDisplay->SaveAsRoot(fPathOut); 1326 1327 return kTRUE; 1328 } 1324 if (fPathOut.IsNull()) 1325 return kTRUE; 1326 1327 // Write the output 1328 TObjArray cont; 1329 cont.Add((TObject*)GetEnv()); 1330 1331 if (fDisplay) 1332 cont.Add(fDisplay); 1333 1334 return WriteContainer(cont, fPathOut, "RECREATE"); 1335 } -
trunk/MagicSoft/Mars/mjobs/MJStar.cc
r8531 r8582 103 103 } 104 104 105 TObjArray cont; 106 cont.Add(const_cast<TEnv*>(GetEnv())); 107 108 if (fDisplay) 109 cont.Add(fDisplay); 110 105 111 const TString oname = Form("%s/star%08d.root", (const char*)fPathOut, fSequence.GetSequence()); 106 107 *fLog << inf << "Writing to file: " << oname << endl; 108 109 TFile file(oname, "RECREATE"); 110 111 *fLog << inf << " - MStatusDisplay..." << flush; 112 if (fDisplay && fDisplay->Write()<=0) 113 { 114 *fLog << err << "Unable to write MStatusDisplay to " << oname << endl; 115 return kFALSE; 116 } 117 *fLog << inf << "ok." << endl; 118 119 return kTRUE; 112 return WriteContainer(cont, oname, "UPDATE"); 120 113 } 121 114 … … 345 338 // Spark cut 346 339 MFDataPhrase fsparks("log10(MNewImagePar.fConc1) < (-0.371)*log10(MHillas.fSize) + 0.596", "SparkCut"); 340 //fill0b.SetFilter(&fsparks); 347 341 fill0c.SetFilter(&fsparks); 348 342 -
trunk/MagicSoft/Mars/mpedestal/MExtractPedestal.cc
r8564 r8582 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MExtractPedestal.cc,v 1.3 2 2007-06-16 21:59:19 tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MExtractPedestal.cc,v 1.33 2007-06-19 09:25:39 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 620 620 } 621 621 622 max /= fRunHeader->GetScale(); 623 min /= fRunHeader->GetScale(); 624 622 625 // If the maximum in the high gain window is smaller than 623 // FIXME: Precompiled value!624 626 return max-min<fMaxSignalVar && max<fMaxSignalAbs; 625 627 } -
trunk/MagicSoft/Mars/mraw/MRawRunHeader.h
r8565 r8582 115 115 UShort_t GetNumNormalPixels() const; 116 116 UShort_t GetNumSpecialPixels() const; 117 UInt_t GetScale() const { return 1<<((fNumBytesPerSample-1)*8); } 117 UInt_t GetScale() const { switch (fNumBytesPerSample) { case 1: return 0x1; case 2: return 0x100; case 4: return 0x1000000; } return 0; } 118 UInt_t GetMax() const { switch (fNumBytesPerSample) { case 1: return 0xff; case 2: return 0xffff; case 4: return 0xffffffff; } return 0; } 118 119 119 120 UInt_t GetNumSamplesPerCrate() const -
trunk/MagicSoft/Mars/msignal/MExtractor.cc
r8502 r8582 251 251 fLoGainFirst=0; 252 252 fLoGainLast =0; 253 if (fSaturationLimit> 0xff)253 if (fSaturationLimit>fRunHeader->GetMax()) 254 254 { 255 *fLog << " and saturation limit ";256 fSaturationLimit= 0xff;255 *fLog << " and saturation limit to " << fRunHeader->GetMax(); 256 fSaturationLimit=fRunHeader->GetMax(); 257 257 } 258 258 *fLog << "." << endl;
Note:
See TracChangeset
for help on using the changeset viewer.