Changeset 8929
- Timestamp:
- 06/08/08 13:55:36 (17 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r8924 r8929 22 22 2008/06/06 Thomas Bretz 23 23 24 * datacenter/macros/plotdb.C: 25 - added average temperature and wind speed 26 - reviewed some ranges 27 28 * mhbase/MH3.cc: 29 - in the 2D case with labels and boxes use blue line color 30 31 * mhflux/MHEffectiveOnTime.[h,cc]: 32 - added a new data member fTotalTime counting the total run-time 33 from the run-headers 34 - added the new data member to the display 35 - increased class version number accordingly 36 37 * mjobs/MJCalibrateSignal.cc: 38 - let sum-trigger events pass to get calibrated 39 - improved DefineLabel table for trigger patterns 40 - added MTriggerPattern to output 41 42 * mjobs/MJStar.cc: 43 - added a new tab "Rate" showing the remaining rates per run and 44 trigger pattern after image cleaning 45 - let only event with Lvl1 trigger pass to effective on-time 46 calculation 47 - changed title in plot of avg dc currents and pedestal rms 48 49 * mtrigger/MFTriggerPattern.[h,cc]: 50 - added a counter counting the trigger decision 51 - print the result in the PostProcess 52 53 54 55 2008/06/06 Thomas Bretz 56 24 57 * datacenter/macros/fillstar.C: 25 58 - added windspeed and temperature 59 60 * datacenter/macros/fillcalib.C, datacenter/macros/fillsignal.C, 61 datacenter/macros/fillstar.C: 62 - use MSQLMagic instead of MSQLServer 63 64 * datacenter/macros/plotdb.C: 65 - added wind speed and temperature 66 67 * datacenter/macros/plotstat.C: 68 - added a plot showing the observation time per exposure (based on 69 the source key) 70 71 * mbase/MStatusDisplay.cc: 72 - fixed the SaveAs. A wrong version was comitted 73 74 * mextralgo/MExtralgoSpline.h: 75 - added the missing inclusion of TMath (root 5.18) 26 76 27 77 … … 44 94 * mcalib/MCalibrationChargeCam.cc, 45 95 mcalib/MCalibrationChargePINDiode.cc: 46 - added the missing inclusion of TMath 96 - added the missing inclusion of TMath (root 5.18) 47 97 48 98 * mgeom/MGeomCam.[h,cc]: -
trunk/MagicSoft/Mars/datacenter/macros/plotdb.C
r8796 r8929 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: plotdb.C,v 1.3 8 2007-12-20 11:54:22 tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: plotdb.C,v 1.39 2008-06-08 12:55:22 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 534 534 plot.Plot("Calibration.fArrTimeMeanInner", 0, 40.0, 0.1); 535 535 plot.SetDescription("RMS Arrival Time inner Camera;\\sigma_{T,I} [sl]", "RmsArrTmI"); 536 plot.Plot("Calibration.fArrTimeRmsInner", 0, 3.0, 0.01);536 plot.Plot("Calibration.fArrTimeRmsInner", 0, 4.5, 0.01); 537 537 plot.SetDescription("Number of unsuitable pixels inner Camera;N{I}", "UnsuitI"); 538 538 plot.Plot("Calibration.fUnsuitableInner", 0, 75, 1); … … 550 550 plot.Plot("Calibration.fPulsePosCheckMean", 1, 50.0, 0.1); 551 551 plot.SetDescription("Rms PulsePosCheck (falling edge) inner camera;T [sl]", "ChkRms"); 552 plot.Plot("Calibration.fPulsePosCheckRms", 0, 1 0.0, 0.1);552 plot.Plot("Calibration.fPulsePosCheckRms", 0, 12.0, 0.1); 553 553 plot.SetDescription("Mean calibrated PulsePos;T", "PulPos"); 554 554 plot.Plot("Calibration.fPulsePosMean", 1, 40.0, 0.1); … … 559 559 plot.Plot("Calibration.fPulsePosOffMed", -0.33, 0.5, 0.01); 560 560 plot.SetDescription("Hi-/Lo-Gain ratio;", "HiLoRatio"); 561 plot.Plot("Calibration.fHiLoGainRatioMed", 10, 1 2.5, 0.05);561 plot.Plot("Calibration.fHiLoGainRatioMed", 10, 15, 0.05); 562 562 563 563 //plot.SetDescription("Pulse Variance;", "PulVar"); … … 588 588 plot.SetDescription("Maximum Humidity [%]", "Hum"); 589 589 plot.Plot("Star.fMaxHumidity", 0, 100, 1); 590 plot.SetDescription("Average Temperature [\\circ C];T [\\circ C]", "Temp"); 591 plot.Plot("Star.fAvgTemperature", -5, 25, 1); 592 plot.SetDescription("Average Wind Speed [km/h];v [km/h]", "Wind"); 593 plot.Plot("Star.fAvgWindSpeed", 0, 50, 1); 590 594 591 595 //muon … … 616 620 plot.Plot("Calibration.fArrTimeMeanOuter", 0, 45, 0.1); 617 621 plot.SetDescription("RMS Arrival Time outer Camera;\\sigma_{T,O} [sl]", "RmsArrTmO"); 618 plot.Plot("Calibration.fArrTimeRmsOuter", 0, 3.0, 0.01);622 plot.Plot("Calibration.fArrTimeRmsOuter", 0, 4.5, 0.01); 619 623 plot.SetDescription("Number of unsuitable pixels outer Camera;N{O}", "UnsuitO"); 620 624 plot.Plot("Calibration.fUnsuitableOuter", 0, 25, 1); -
trunk/MagicSoft/Mars/mhbase/MH3.cc
r8910 r8929 932 932 str.ToLower(); 933 933 934 if (str.IsNull() && GetLabels() && fDimension==2) 935 str = "colz"; 934 if (GetLabels()) 935 { 936 if (str.IsNull() && fDimension==2) 937 str = "colz"; 938 939 if (str.Contains("box", TString::kIgnoreCase) && fDimension==2) 940 fHist->SetLineColor(kBlue); 941 } 936 942 937 943 const Bool_t only = str.Contains("only") && TMath::Abs(fDimension)==2; -
trunk/MagicSoft/Mars/mhflux/MHEffectiveOnTime.cc
r8695 r8929 19 19 ! Author(s): Wolfgang Wittek, 1/2002 <mailto:wittek@mppmu.mpg.de> 20 20 ! 21 ! Copyright: MAGIC Software Development, 2000-200 421 ! Copyright: MAGIC Software Development, 2000-2008 22 22 ! 23 23 ! … … 70 70 // Input Container: 71 71 // MPointingPos 72 // MRawRunHeader 73 // MTime 72 74 // 73 75 // Output Container: … … 81 83 // + UInt_t fNumEvents; 82 84 // - Int_t fNumEvents; 85 // 86 // Class version 3: 87 // ---------------- 88 // + Double_t fTotalTime; 83 89 // 84 90 // … … 276 282 #include "MParameters.h" 277 283 #include "MPointingPos.h" 284 #include "MRawRunHeader.h" 278 285 279 286 #include "MBinning.h" … … 293 300 MHEffectiveOnTime::MHEffectiveOnTime(const char *name, const char *title) 294 301 : fPointPos(0), fTime(0), fParam(0), fIsFinalized(kFALSE), 295 fNumEvents(200*60), fFirstBin(3) 302 fNumEvents(200*60), fFirstBin(3), fTotalTime(-1) 296 303 //fNumEvents(2*60), fFirstBin(1) 297 304 { … … 469 476 SetBinning(&fH2DeltaT, binsdtime, binstheta); 470 477 478 fTotalTime = 0; 479 471 480 return kTRUE; 481 } 482 483 Bool_t MHEffectiveOnTime::ReInit(MParList *pList) 484 { 485 MRawRunHeader *header = (MRawRunHeader*)pList->FindObject("MRawRunHeader"); 486 if (header) 487 { 488 *fLog << err << "MRawRunHeader not found... aborting." << endl; 489 return kFALSE; 490 } 491 492 fTotalTime += header->GetRunLength(); 493 494 return kTRUE; 472 495 } 473 496 … … 771 794 text.SetTextSize(0.04); 772 795 773 text.SetText(0.45, 0.94, Form("T_{eff} = %.1fs \\pm %.1fs", val, error));774 text.Paint();775 776 if ( range<0)777 return;778 779 text.SetText(0. 66, 0.94, Form("T_{axe} = %.1fs", range));796 TString txt = Form("T_{eff} = %.1fs \\pm %.1fs", val, error); 797 if (range>0) 798 txt += Form(" T_{axe} = %.1fs", range); 799 if (fTotalTime>0) 800 txt += Form(" T_{max} = %.1fs", fTotalTime); 801 802 text.SetText(0.35, 0.94, txt); 780 803 text.Paint(); 781 804 } -
trunk/MagicSoft/Mars/mhflux/MHEffectiveOnTime.h
r7818 r8929 50 50 UInt_t fFirstBin; // For bin for fit 51 51 52 Double_t fTotalTime; //[s] Total time accumulated from run-header 53 54 // MHEffectiveOnTime 52 55 Bool_t FitH(TH1D *h, Double_t *res, Bool_t paint=kFALSE) const; 53 56 void FitThetaBins(); … … 60 63 void PrintStatistics(); 61 64 65 // MH 62 66 Bool_t SetupFill(const MParList *pList); 67 Bool_t ReInit(MParList *pList); 63 68 Bool_t Fill(const MParContainer *par, const Stat_t w=1); 64 69 Bool_t Finalize(); 65 70 71 // MParContainer 66 72 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print); 67 73 … … 69 75 MHEffectiveOnTime(const char *name=NULL, const char *title=NULL); 70 76 77 // Setter 71 78 void SetNumEvents(Int_t i) { fNumEvents=i; } 72 79 void SetFirstBin(Int_t i) { fFirstBin=i; } 80 81 // Getter 82 Double_t GetTotalTime() const { return fTotalTime; } 73 83 74 84 const TH1D &GetHEffOnTheta() const { return fHThetaEffOn; } … … 77 87 const TH2D &GetH2DeltaT() const { return fH2DeltaT; } 78 88 89 // TObject 79 90 void Draw(Option_t *option=""); 80 91 void Paint(Option_t *opt=""); 81 92 82 ClassDef(MHEffectiveOnTime, 2) // Histogram to determin effective On-Time vs Time and Zenith Angle93 ClassDef(MHEffectiveOnTime, 3) // Histogram to determin effective On-Time vs Time and Zenith Angle 83 94 }; 84 95 -
trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc
r8914 r8929 410 410 //hpat.DefineLabelsY("1=Lvl1;2=Cal;3=Cal;4=Lvl2;5=Cal;7=Cal;8=Ped;9=Ped+Trig;13=Ped+Trig;16=Pin;32=Sum"); 411 411 hpat.DefaultLabelY("UNKNOWN"); 412 hpat.DefineLabelY( 0, "0"); // 0: No pattern 413 hpat.DefineLabelY( 1, "Trig"); // Lvl1 414 hpat.DefineLabelY( 2, "Cal"); // Cal 415 hpat.DefineLabelY( 3, "Cal"); // Cal+Lvl1 416 hpat.DefineLabelY( 4, "Trig"); // Lvl2 417 hpat.DefineLabelY( 5, "Trig"); // Lvl1+Lvl2 418 hpat.DefineLabelY( 7, "Cal"); // Cal+Lvl1+Lvl2 419 hpat.DefineLabelY( 8, "Ped"); // Ped 420 hpat.DefineLabelY( 9, "Ped+Trig"); // Ped+Lvl1 421 hpat.DefineLabelY(13, "Ped+Trig"); // Ped+Lvl2 422 hpat.DefineLabelY(16, "Pin"); 423 hpat.DefineLabelY(32, "Sum"); // Sum 424 hpat.DefineLabelY(33, "Sum"); // Sum+Lvl1 425 hpat.DefineLabelY(37, "Sum"); // Sum+Lvl1+Lvl2 412 hpat.DefineLabelY( 0, "0"); // 0: No pattern 413 hpat.DefineLabelY( 1, "Trig"); // 1: Lvl1 414 hpat.DefineLabelY( 2, "Cal"); // 2: Cal 415 hpat.DefineLabelY( 3, "Cal"); // Cal+Lvl1 416 hpat.DefineLabelY( 4, "Trig"); // 4: Lvl2 417 hpat.DefineLabelY( 5, "Trig"); // Lvl2+Lvl1 418 hpat.DefineLabelY( 7, "Cal"); // Lvl2+Cal+Lvl 419 hpat.DefineLabelY( 8, "Ped"); // 8: Ped 420 hpat.DefineLabelY( 9, "Ped+Trig"); // Ped+Lvl1 421 hpat.DefineLabelY(10, "Ped+Cal"); // Ped+Cal 422 hpat.DefineLabelY(12, "Ped+Trig"); // Ped+Lvl2 423 hpat.DefineLabelY(13, "Ped+Trig"); // Ped+Lvl2+Lvl1 424 hpat.DefineLabelY(16, "Pin"); // 16: Pin 425 hpat.DefineLabelY(32, "Sum"); // 32: Sum 426 hpat.DefineLabelY(33, "Trig"); // Sum+Lvl1 427 hpat.DefineLabelY(34, "Cal"); // Sum+Cal 428 hpat.DefineLabelY(35, "Cal"); // Sum+Cal+Lvl1 429 hpat.DefineLabelY(36, "Trig"); // Sum+Lvl2 430 hpat.DefineLabelY(37, "Trig"); // Sum+Lvl1+Lvl2 431 hpat.DefineLabelY(39, "Cal"); // Sum+Lvl2+Cal+Lvl1 426 432 427 433 MFillH fillpat(&hpat, "", "FillPattern"); … … 439 445 fcalped.AllowTriggerLvl1(); 440 446 fcalped.AllowTriggerLvl2(); 441 //fcalped.AllowSumTrigger();447 fcalped.AllowSumTrigger(); 442 448 443 449 // This will skip interleaved events with a cal- or ped-trigger … … 699 705 write.AddContainer("MTime", "Events", kFALSE); 700 706 write.AddContainer("MRawEvtHeader", "Events"); 707 write.AddContainer("MTriggerPattern", "Events"); 701 708 702 709 // Slow-Control: Current-tree -
trunk/MagicSoft/Mars/mjobs/MJStar.cc
r8903 r8929 18 18 ! Author(s): Thomas Bretz, 1/2004 <mailto:tbretz@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 720 ! Copyright: MAGIC Software Development, 2000-2008 21 21 ! 22 22 ! … … 35 35 #include <TFile.h> 36 36 37 // Core 37 38 #include "MLog.h" 38 39 #include "MLogManip.h" … … 45 46 #include "MStatusDisplay.h" 46 47 48 // Histograms 47 49 #include "MHSectorVsTime.h" 48 50 #include "MHEffectiveOnTime.h" … … 50 52 #include "MBinning.h" 51 53 54 ///NEEWWWW 55 #include "MH3.h" 56 57 // Tasks 52 58 #include "MReadReports.h" 53 59 #include "MReadMarsFile.h" 54 #include "MFDataPhrase.h"55 #include "MFilterList.h"56 #include "MFDataMember.h"57 #include "MFDeltaT.h"58 #include "MFSoftwareTrigger.h"59 60 #include "MContinue.h" 60 61 #include "MGeomApply.h" … … 69 70 #include "MWriteRootFile.h" 70 71 72 // Filter 73 #include "MFDataPhrase.h" 74 #include "MFTriggerPattern.h" 75 #include "MFilterList.h" 76 #include "MFDataMember.h" 77 #include "MFDeltaT.h" 78 #include "MFSoftwareTrigger.h" 79 80 // Parameter container 71 81 #include "MMuonSetup.h" 72 82 #include "MObservatory.h" 83 //#include "MTriggerPattern.h" 73 84 #include "MPointingPosCalc.h" 74 85 … … 242 253 fill0d.SetNameTab("Sparks"); 243 254 255 // FIXME: This should be replaced by a cut working for all triggers! 256 MTriggerPattern par; // An empty trigger pattern for older files 257 plist.AddToList(&par); // without MTriggerPattern stored in the file 258 259 // For the effective on-time calculation we don't want SUM-only events 260 MFTriggerPattern fsum; 261 fsum.SetDefault(kTRUE); 262 fsum.DenySumTrigger(); 263 fsum.AllowTriggerLvl1(); 264 fill9.SetFilter(&fsum); 265 266 // Plot the trigger pattern rates vs. run-number 267 MH3 hrate("MRawRunHeader.fRunNumber", "MTriggerPattern.GetUnprescaled"); 268 hrate.SetWeight("1./MRawRunHeader.GetRunLength"); 269 hrate.SetName("Rate"); 270 hrate.SetTitle("Event rate after cleaning [Hz];Run Number;Trigger Type;"); 271 hrate.InitLabels(MH3::kLabelsX); 272 hrate.DefaultLabelY("ERROR"); 273 hrate.DefineLabelY( 0, "0"); // 0: No pattern 274 hrate.DefineLabelY( 1, "Trig"); // 1: Lvl1 275 hrate.DefineLabelY( 4, "Trig"); // 4: Lvl2 276 hrate.DefineLabelY( 5, "Trig"); // Lvl2+Lvl1 277 hrate.DefineLabelY(32, "Sum"); // 32: Sum 278 hrate.DefineLabelY(33, "Trig"); // Sum+Lvl1 279 hrate.DefineLabelY(36, "Trig"); // Sum+Lvl2 280 hrate.DefineLabelY(37, "Trig"); // Sum+Lvl1+Lvl2 281 282 MFillH frate(&hrate, "", "FillRate"); 283 frate.SetDrawOption("box"); 284 244 285 // ------------------ Setup write task ---------------- 245 286 … … 260 301 write.AddContainer("MRawEvtHeader", "Events"); 261 302 write.AddContainer("MPointingPos", "Events"); 303 write.AddContainer("MTriggerPattern", "Events"); 262 304 263 305 // Run Header … … 333 375 tlist2.AddToList(&rate); 334 376 tlist2.AddToList(&fillvs); 377 tlist2.AddToList(&fsum); 335 378 tlist2.AddToList(&fill9); 336 379 tlist2.AddToList(&writet); … … 358 401 tlist2.AddToList(&fill0d); 359 402 tlist2.AddToList(&fill0b); 403 tlist2.AddToList(&frate); 360 404 tlist2.AddToList(&fill1); 361 405 tlist2.AddToList(&fill2); … … 409 453 MHSectorVsTime histdc, histrms; 410 454 histdc.SetNameTime("MTimeCurrents"); 411 histdc.SetTitle(" Mean of all DC Currents;;<I> [nA]");455 histdc.SetTitle("Average DC currents of all pixels vs time;;<I> [nA]"); 412 456 histdc.SetMinimum(0); 413 457 histdc.SetMaximum(10); 414 458 histrms.SetNameTime("MTimeCurrents"); 415 histrms.SetTitle(" Mean pedestal rms of all pixels;;<\\sigma_{p}> [phe]");459 histrms.SetTitle("Average pedestal rms of all pixels vs time;;<\\sigma_{p}> [phe]"); 416 460 histrms.SetType(5); 417 461 histrms.SetMinimum(0); -
trunk/MagicSoft/Mars/mtrigger/MFTriggerPattern.cc
r8903 r8929 93 93 } 94 94 95 memset(fCounter, 0, sizeof(fCounter)); 96 95 97 return kTRUE; 96 98 } … … 103 105 // If any bit matches the fMasDenied* mask fResult is forced to be false. 104 106 // 105 Int_t MFTriggerPattern:: Process()107 Int_t MFTriggerPattern::Eval() const 106 108 { 107 109 const Byte_t p = fPattern->GetPrescaled(); … … 109 111 if (p==0 && u==0) 110 112 { 111 fResult = fDefault; 112 return kTRUE; 113 return fDefault; 113 114 } 114 115 115 fResult= kFALSE;116 Bool_t rc = kFALSE; 116 117 117 118 // Check whether all the bits required are ON 118 119 if ( ((p & fMaskRequiredPrescaled) == fMaskRequiredPrescaled) && 119 120 ((u & fMaskRequiredUnprescaled) == fMaskRequiredUnprescaled)) 120 fResult= kTRUE;121 rc = kTRUE; 121 122 122 123 // Now overwrite the result if one of the bits is denied 123 124 if ( (p & fMaskDeniedPrescaled) || (u & fMaskDeniedUnprescaled) ) 124 fResult = kFALSE; 125 return kFALSE; 126 127 return rc; 128 } 129 130 // -------------------------------------------------------------------------- 131 // 132 // If Prescaled and Unprescaled pattern is 0 return default. 133 // If all bits of the fMaskRequired* mask are found in the pattern set 134 // fResult to true. 135 // If any bit matches the fMasDenied* mask fResult is forced to be false. 136 // 137 Int_t MFTriggerPattern::Process() 138 { 139 fResult = Eval(); 140 fCounter[fResult ? 0 : 1]++; 141 142 return kTRUE; 143 } 144 145 // -------------------------------------------------------------------------- 146 // 147 Int_t MFTriggerPattern::PostProcess() 148 { 149 const UInt_t n = GetNumExecutions(); 150 if (n==0) 151 return kTRUE; 152 153 *fLog << inf << endl; 154 *fLog << GetDescriptor() << " execution statistics:" << endl; 155 *fLog << dec << setfill(' '); 156 157 *fLog << " " << setw(7) << fCounter[0] << " (" << setw(3) ; 158 *fLog << (int)(fCounter[0]*100/n); 159 *fLog << "%) Accepted trigger pattern." << endl; 160 161 *fLog << " " << setw(7) << fCounter[1] << " (" << setw(3) ; 162 *fLog << (int)(fCounter[1]*100/n); 163 *fLog << "%) Rejected trigger pattern!" << endl; 164 *fLog << endl; 125 165 126 166 return kTRUE; -
trunk/MagicSoft/Mars/mtrigger/MFTriggerPattern.h
r8903 r8929 29 29 30 30 Bool_t fDefault; // Default which is used if trigger pattern has default value (p==0&&u==0) 31 31 32 Bool_t fResult; //! Calculated result to be returned by IsExpressionTrue 33 Int_t fCounter[2]; //! Counter for results 32 34 33 35 // MFTriggerPattern … … 36 38 void Allow(const Byte_t mask, Prescale_t prescaled=kUnPrescaled); 37 39 40 Int_t Eval() const; 41 38 42 // MTask 39 43 Int_t PreProcess(MParList *pList); 40 44 Int_t Process(); 45 Int_t PostProcess(); 41 46 42 47 // MFilter
Note:
See TracChangeset
for help on using the changeset viewer.