- Timestamp:
- 06/28/07 21:30:25 (17 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r8617 r8618 34 34 * mmain/Makefile: 35 35 - added inlcude of mjobs for MSequence 36 37 * mbadpixels/MBadPixelsTreat.cc: 38 - we assume now that the maximum arrival time difference 39 is calibrated already in nanoseconds 40 41 * mcalib/MCalibrateRelTimes.[h,cc]: 42 - the arrival time is now converted from slices into nanoseconds 43 44 * mfilter/MFSoftwareTrigger.cc: 45 - the arrival time is now assumed to be in nanoseconds. 46 the default is changed accordingly from 0.5 to 1.7 47 48 * mjobs/MJCalibrateSignal.cc: 49 - changed axis label of PulsePos plot (now in nanosec) 36 50 37 51 -
trunk/MagicSoft/Mars/NEWS
r8612 r8618 29 29 use the summary file instead. 30 30 31 - mars: new ways to call mars are implemented. Instead 32 of calling 33 mars filename.root 34 you can now also use 35 mars sequence.txt 36 or 37 mars sequence.txt inputpath 38 or replace sequence.txt by the sequence number if the default 39 sequence file should be used. 40 31 41 - callisto: was broken for MCs... fixed. 32 42 … … 47 57 pixel treatment is now in units of nanoseconds, which leads to 3.0ns 48 58 for both, old FADC and MUX-FADC, data. 59 60 - callisto: Be aware that callisto is now calibrating the arrival time 61 in nanoseconds rather than time slices. Also all following tasks 62 have been changed to assume ns units now. If you star data 63 calibrated with an older version it might be necessary to adapt 64 some timimng parameters (Muon Analysis and MFSoftwareTrigger) 65 to obtain optimal results. The plot in the PulsePos tab 66 will now be in ns, too. 49 67 50 68 - ganymed: From XXXX on a real starguider calibration with a real -
trunk/MagicSoft/Mars/ganymed_onoff.rc
r8456 r8618 100 100 # ------------------------------------------------------------------------- 101 101 # There are three cuts: 102 # Cut0: After energy estimation, before writing summary file 102 # CutQ: Cut after reading file 103 # Cut0: After calculation of src dependant parameters, energy estimation 104 # and disp calculation, before writing summary file 103 105 # Cut1: After writing summary file before filling false source plots 104 106 # Cut2: After filling false source plots before filling alpha plots 105 107 # Cut3: After filling alpha plots (eg. Alpha cuts) for image parameter 106 # display 108 # display, eg. write only events after alpha cut to ganymed file 107 109 # ------------------------------------------------------------------------- 110 CutQ.Inverted: Yes 108 111 Cut0.Inverted: Yes 109 112 Cut1.Inverted: Yes … … 112 115 113 116 # Get rid of triangular events... 114 Cut 0.Condition: ({0} || {1}) && {2} && {3} && {4} && {5} && {6}115 Cut 0.0: MImagePar.fNumSatPixelsHG < 1116 Cut 0.1: MHillas.GetArea*(MGeomCam.fConvMm2Deg^2) > (0.003*MImagePar.fNumSatPixelsHG) + 0.0325117 Cut 0.2: MNewImagePar.fNumUsedPixels>5118 Cut 0.3: MNewImagePar.fLeakage1 < 0.3119 Cut 0.4: MImagePar.fNumSatPixelsLG<2120 Cut 0.5: MImagePar.fNumIslands<3121 Cut 0.6: log10(MNewImagePar.fConc1) < (-0.371)*log10(MHillas.fSize) + 0.596117 CutQ.Condition: ({0} || {1}) && {2} && {3} && {4} && {5} && {6} 118 CutQ.0: MImagePar.fNumSatPixelsHG < 1 119 CutQ.1: MHillas.GetArea*(MGeomCam.fConvMm2Deg^2) > (0.003*MImagePar.fNumSatPixelsHG) + 0.0325 120 CutQ.2: MNewImagePar.fNumUsedPixels>5 121 CutQ.3: MNewImagePar.fLeakage1 < 0.3 122 CutQ.4: MImagePar.fNumSatPixelsLG<2 123 CutQ.5: MImagePar.fNumIslands<3 124 CutQ.6: log10(MNewImagePar.fConc1) < (-0.371)*log10(MHillas.fSize) + 0.596 122 125 123 126 # ---------- SETUP FOR ONOFF-MODE ----------- -
trunk/MagicSoft/Mars/mbadpixels/MBadPixelsTreat.cc
r8577 r8618 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MBadPixelsTreat.cc,v 1. 39 2007-06-18 14:11:08tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MBadPixelsTreat.cc,v 1.40 2007-06-28 20:13:17 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 445 445 void MBadPixelsTreat::InterpolateTimes() const 446 446 { 447 const Double_t maxdiff = fMaxArrivalTimeDiff*fRawRunHeader->GetFreqSampling()/1000.;448 449 447 const Int_t n = fEvt->GetNumPixels(); 450 448 for (int i=0; i<n; i++) … … 491 489 492 490 // Calculate mean arrival time of pixel probably inside the shower 493 if (TMath::Abs(tm1 - tm2)< maxdiff)491 if (TMath::Abs(tm1 - tm2)<fMaxArrivalTimeDiff) 494 492 { 495 493 sum2 += tm1+tm2; -
trunk/MagicSoft/Mars/mbase/MTaskList.cc
r7808 r8618 89 89 // this name in the parameter list (by MEvtLoop::SetParList) 90 90 // 91 MTaskList::MTaskList(const char *name, const char *title) 91 MTaskList::MTaskList(const char *name, const char *title) : fNumPasses(0), fNumPass(0) 92 92 { 93 93 fName = name ? name : gsDefName.Data(); … … 108 108 // TaskList in the new TaskList. 109 109 // 110 MTaskList::MTaskList( MTaskList &ts) : MTask()110 MTaskList::MTaskList(const MTaskList &ts) : MTask(), fNumPasses(ts.fNumPasses) 111 111 { 112 112 fTasks->AddAll(ts.fTasks); … … 612 612 } 613 613 614 // -------------------------------------------------------------------------- 615 // 616 // do the event execution of all tasks in the task-list 617 // 618 Int_t MTaskList::Process() 619 { 620 // 621 // Check whether there is something which can be processed, otherwise 622 // stop the eventloop. 623 // 624 if (fTasksProcess.GetSize()==0) 625 { 626 *fLog << warn << "Warning: No entries in " << GetDescriptor() << " for Processing." << endl; 627 return kFALSE; 628 } 629 630 // 631 // Reset the ReadyToSave flag. 632 // Reset all containers. 633 // 634 // Make sure, that the parameter list is not reset from a tasklist 635 // running as a task in another tasklist. 636 // 637 const Bool_t noreset = fParList->TestBit(MParList::kIsProcessing); 638 if (!noreset) 639 { 640 fParList->SetBit(MParList::kIsProcessing); 641 if (!HasAccelerator(kAccDontReset)) 642 fParList->Reset(); 643 } 644 614 Int_t MTaskList::ProcessTaskList() 615 { 645 616 // 646 617 // create the Iterator for the TaskList … … 707 678 } 708 679 680 return rc; 681 } 682 683 // -------------------------------------------------------------------------- 684 // 685 // do the event execution of all tasks in the task-list. 686 // 687 // If a task returns kCONTINUE, kCONTINUE is propagated if the 688 // number of passes==0, otherwise kTRUE is returned instead. 689 // 690 Int_t MTaskList::Process() 691 { 692 // 693 // Check whether there is something which can be processed, otherwise 694 // stop the eventloop. 695 // 696 if (fTasksProcess.GetSize()==0) 697 { 698 *fLog << warn << "Warning: No entries in " << GetDescriptor() << " for Processing." << endl; 699 return kFALSE; 700 } 701 702 // 703 // Reset the ReadyToSave flag. 704 // Reset all containers. 705 // 706 // Make sure, that the parameter list is not reset from a tasklist 707 // running as a task in another tasklist. 708 // 709 const Bool_t noreset = fParList->TestBit(MParList::kIsProcessing); 710 if (!noreset) 711 { 712 fParList->SetBit(MParList::kIsProcessing); 713 if (!HasAccelerator(kAccDontReset)) 714 fParList->Reset(); 715 } 716 717 // Initialize storage variable for the return code 718 Int_t rc = kTRUE; 719 720 // Execute the task list at least once 721 const UInt_t cnt = fNumPasses==0 ? 1 : fNumPasses; 722 for (fNumPass=0; fNumPass<cnt; fNumPass++) 723 { 724 // Execute the tasklist once 725 rc = ProcessTaskList(); 726 // In cae of error or a stop-request leave loop 727 if (rc==kERROR || rc==kFALSE) 728 break; 729 } 730 731 // Reset to the default 709 732 if (!noreset) 710 733 { … … 713 736 } 714 737 738 // If the number of passes==0 <default> propagete kCONTINUE 739 if (rc==kCONTINUE) 740 return fNumPasses==0 ? kCONTINUE : kTRUE; 741 742 // Return return code 715 743 return rc; 716 744 } -
trunk/MagicSoft/Mars/mbase/MTaskList.h
r7808 r8618 28 28 MParList *fParList; //! The parameter list given in PreProcess 29 29 30 UInt_t fNumPasses; 31 UInt_t fNumPass; //! 32 30 33 enum { kIsOwner = BIT(14) }; 31 34 … … 33 36 void StreamPrimitive(ostream &out) const; 34 37 Bool_t CheckAddToList(MTask *task, /*const char *tType,*/ const MTask *where=NULL) const; 38 Int_t ProcessTaskList(); 35 39 36 40 public: 37 41 MTaskList(const char *name=NULL, const char *title=NULL); 38 MTaskList( MTaskList &ts);42 MTaskList(const MTaskList &ts); 39 43 40 44 ~MTaskList(); … … 43 47 void SetDisplay(MStatusDisplay *d); 44 48 void SetAccelerator(Byte_t acc=kAccStandard); 49 void SetNumPasses(UInt_t cnt=0) { fNumPasses=cnt; } 50 51 UInt_t GetNumPass() const { return fNumPass; } 52 UInt_t GetNumPasses() const { return fNumPasses; } 45 53 46 54 Bool_t AddToListBefore(MTask *task, const MTask *where, const char *tType="All"); -
trunk/MagicSoft/Mars/mcalib/MCalibrateRelTimes.cc
r7876 r8618 60 60 #include "MSignalPix.h" 61 61 62 #include "MRawRunHeader.h" 63 62 64 ClassImp(MCalibrateRelTimes); 63 65 … … 86 88 { 87 89 fSignals = (MArrivalTimeCam*)pList->FindObject(AddSerialNumber("MArrivalTimeCam")); 88 89 90 if (!fSignals) 90 91 { … … 99 100 fCalibrations = (MCalibrationRelTimeCam*)pList->FindObject(AddSerialNumber("MCalibrationRelTimeCam")); 100 101 if (!fCalibrations) 101 102 { 102 103 *fLog << err << AddSerialNumber("MCalibrationRelTimeCam") << " not found ... aborting." << endl; 103 104 return kFALSE; 104 105 } 105 106 106 107 fArrivalTime = (MSignalCam*)pList->FindCreateObj(AddSerialNumber("MSignalCam")); … … 108 109 return kFALSE; 109 110 111 return kTRUE; 112 } 113 114 Bool_t MCalibrateRelTimes::ReInit(MParList *pList) 115 { 116 MRawRunHeader *runheader = (MRawRunHeader*)pList->FindObject(AddSerialNumber("MRawRunHeader")); 117 if (!runheader) 118 { 119 *fLog << err << AddSerialNumber("MRawRunHeader") << " not found ... aborting." << endl; 120 return kFALSE; 121 } 122 123 fFreq = runheader->GetFreqSampling(); 124 110 125 return kTRUE; 111 126 } … … 131 146 const Float_t offset = pix.GetTimeOffset(); 132 147 133 (*fArrivalTime)[idx].SetArrivalTime(signal-offset); 148 // convert from slices to ns 149 const Float_t time = 1000*(signal-offset)/fFreq; // [ns] 150 151 (*fArrivalTime)[idx].SetArrivalTime(time); 134 152 135 153 // FIXME: Is this necessary or explicitly done by the signal- -
trunk/MagicSoft/Mars/mcalib/MCalibrateRelTimes.h
r7829 r8618 10 10 class MCalibrationRelTimeCam; 11 11 class MArrivalTimeCam; 12 class MRawRunHeader; 12 13 class MSignalCam; 13 14 … … 21 22 MSignalCam *fArrivalTime; // Calibrated arrival times 22 23 23 Int_t PreProcess(MParList *pList); 24 Int_t Process(); 24 UShort_t fFreq; //! [MHz] Sampling Frequency 25 26 Int_t PreProcess(MParList *pList); 27 Bool_t ReInit(MParList *pList); 28 Int_t Process(); 25 29 26 30 public: -
trunk/MagicSoft/Mars/mfilter/MFSoftwareTrigger.cc
r8489 r8618 88 88 MFSoftwareTrigger::MFSoftwareTrigger(const char *name, const char *title) 89 89 : fCam(NULL), fEvt(NULL), fThreshold(5), 90 fTimeWindow( 0.5), fNumNeighbors(4), fType(kSinglePixelNeighbors)90 fTimeWindow(1.7), fNumNeighbors(4), fType(kSinglePixelNeighbors) 91 91 { 92 92 fName = name ? name : "MFSoftwareTrigger"; … … 435 435 *fLog << " Threshold=" << fThreshold << ", Number=" << (int)fNumNeighbors; 436 436 if (fTimeWindow>0) 437 *fLog << ", Time Window=" << fTimeWindow ;437 *fLog << ", Time Window=" << fTimeWindow << "ns"; 438 438 *fLog << endl; 439 439 *fLog << dec << setfill(' '); -
trunk/MagicSoft/Mars/mhbase/MFillH.h
r7804 r8618 62 62 void SetRuleForIdx(MData *rule); 63 63 64 void ResetWeight() { fWeight=0; fWeightName=""; } 64 65 void SetWeight(MParameterD *w) { fWeight = w; } 65 66 void SetWeight(const char *name="MWeight") { fWeightName = name; } -
trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc
r8582 r8618 573 573 // MHCamEvent evt7( 6, "Times", "Calibrated Arrival Time;;T [fadc sl]"); 574 574 MHCamEvent evt8( 0, "Conv", "Calibration Conv. Factors;;[phe/cnts]"); 575 MHCamEvent evt9( 7, "PulsePos", "Pulse Position of cosmics (>50phe);;T ");575 MHCamEvent evt9( 7, "PulsePos", "Pulse Position of cosmics (>50phe);;T [ns]"); 576 576 MHCamEvent evtR( 4, "HiLoCal", "Hi-/Lo-Gain ratio;;Ratio"); 577 577 MHCamEvent evtO( 7, "HiLoOff", "Lo-/Hi-Gain Offset;;Offset"); -
trunk/MagicSoft/Mars/mjobs/MJCut.cc
r8590 r8618 89 89 MJCut::MJCut(const char *name, const char *title) 90 90 : fStoreSummary(kFALSE), fStoreResult(kTRUE), fWriteOnly(kFALSE), 91 fFullDisplay(kTRUE), 92 f RndmSrcPos(kFALSE), fNameHist("MHThetaSq"),91 fFullDisplay(kTRUE), fRndmSrcPos(kFALSE), fNumOffSourcePos(3), 92 fNameHist("MHThetaSq"), 93 93 fCalcHadronness(0), fCalcDisp(0), fEstimateEnergy(0) 94 94 { … … 347 347 EnableFullDisplay(GetEnv("FullDisplay", fFullDisplay)); 348 348 EnableRandomSrcPos(GetEnv("RandomSourcePosition", fRndmSrcPos)); 349 350 fNumOffSourcePos = GetEnv("NumOffSourcePositions", (Int_t)fNumOffSourcePos); 349 351 //EnableSubstraction(GetEnv("HistogramSubstraction", fSubstraction)); 350 352 … … 626 628 // -------------------------------------------------------------------------------- 627 629 630 MParameterD scale; 631 scale.SetVal(1./fNumOffSourcePos); 632 628 633 // Setup fitter and histograms 629 634 MAlphaFitter fit; 630 635 plist.AddToList(&fit); 631 636 if (set.IsWobbleMode()) 637 { 632 638 fit.SetScaleMode(MAlphaFitter::kNone); 639 fit.SetScaleUser(1./fNumOffSourcePos); 640 } 633 641 634 642 MHAlpha *halphaoff = CreateNewHist(plist, "Off"); … … 638 646 639 647 // FIXME: If fPathIn read cuts and energy estimator from file! 648 MContinue contq("", "CutQ"); 640 649 MContinue cont0("", "Cut0"); 641 650 MContinue cont1("", "Cut1"); 642 651 MContinue cont2("", "Cut2"); 643 652 MContinue cont3("", "Cut3"); 653 contq.SetAllowEmpty(); 644 654 cont0.SetAllowEmpty(); 645 655 cont1.SetAllowEmpty(); … … 691 701 setrunnum.SetNameParameter("RunNumber"); 692 702 693 // MFillH fill0a("OnPos [MHSrcPosCam]", "MSrcPosCam", "FillSrcPosCam");694 703 MFillH fill1a("MHHillasOffPre [MHHillas]", "MHillas", "FillHillasPre"); 695 704 MFillH fill2a("MHHillasOffPost [MHHillas]", "MHillas", "FillHillasPost"); … … 715 724 print2.EnableSkip(); 716 725 726 MTaskList tlist2; 727 if (set.IsWobbleMode()) 728 { 729 tlist2.SetNumPasses(fNumOffSourcePos); 730 fill2a.SetWeight(&scale); 731 fill3a.SetWeight(&scale); 732 fill4a.SetWeight(&scale); 733 fill5a.SetWeight(&scale); 734 fill6a.SetWeight(&scale); 735 fill7a.SetWeight(&scale); 736 } 737 717 738 // How to get source position from off- and on-data? 718 739 MSrcPosCalc scalc; 719 740 scalc.SetMode(set.IsWobbleMode()?MSrcPosCalc::kWobble:MSrcPosCalc::kOffData); /********************/ 741 scalc.SetCallback(&tlist2); 720 742 721 743 MSrcPosCorrect scor; … … 730 752 MSrcPosRndm srcrndm; 731 753 732 MTaskList tlist2;733 754 tlist2.AddToList(&scalc); 734 755 tlist2.AddToList(&scor); 735 756 tlist2.AddToList(&srcrndm); 736 //if (fRndmSrcPos && !set.IsWobbleMode())737 // tlist2.AddToList(&fill0a);738 757 tlist2.AddToList(&hcalc); 739 758 if (set.IsWobbleMode()) 740 759 tlist2.AddToList(&hcalc2); 741 760 //tlist2.AddToList(&taskenv1); 742 tlist2.AddToList(&cont0); 761 tlist2.AddToList(&cont0); 743 762 tlist2.AddToList(&taskenv2); 744 763 tlist2.AddToList(&taskenv3); … … 747 766 if (write0) 748 767 tlist2.AddToList(write0); 749 if (!fWriteOnly)750 tlist2.AddToList(&fill1a);751 768 tlist2.AddToList(&cont1); 752 769 if (!fWriteOnly && (!set.IsWobbleMode() || !fNameHistFS.IsNull())) … … 786 803 tlist.AddToList(&print2, "EffectiveOnTime"); 787 804 tlist.AddToList(&devcalc, "Starguider"); 805 tlist.AddToList(&contq, "Events"); 806 if (!fWriteOnly) 807 tlist.AddToList(&fill1a, "Events"); 788 808 tlist.AddToList(&tlist2, "Events"); 789 809 … … 802 822 803 823 TObjArray cont; 824 cont.Add(&contq); 804 825 cont.Add(&cont0); 805 826 cont.Add(&cont1); … … 879 900 fill6b.SetDrawOption(set.HasOffSequences()||set.IsWobbleMode()?"same":""); 880 901 fill7b.SetDrawOption(set.HasOffSequences()||set.IsWobbleMode()?"same":""); 881 882 902 //fill9b.SetFilter(&fbin); 883 903 … … 922 942 fillphi.SetDrawOption("anticut"); 923 943 944 tlist2.SetNumPasses(); 945 924 946 tlist.Replace(&readon); 925 947 if (fRndmSrcPos && !set.IsWobbleMode()) 926 {927 // tlist2.RemoveFromList(&fill0a);928 948 tlist2.RemoveFromList(&srcrndm); 929 }930 949 931 950 MFillH fillsrc(&hsrcpos, "MSrcPosCam", "FillSrcPosCam"); … … 936 955 if (!fWriteOnly) 937 956 { 938 tlist 2.Replace(&fill1b);957 tlist.Replace(&fill1b); 939 958 /* if (fIsWobble) 940 959 { -
trunk/MagicSoft/Mars/mjobs/MJCut.h
r8456 r8618 24 24 Bool_t fRndmSrcPos; 25 25 //Bool_t fSubstraction; 26 27 UInt_t fNumOffSourcePos; 26 28 27 29 TString fNameSummary; -
trunk/MagicSoft/Mars/mpointing/MSrcPosCalc.cc
r8601 r8618 68 68 69 69 #include "MParList.h" 70 #include "MTaskList.h" 70 71 71 72 #include "MLog.h" … … 94 95 MSrcPosCalc::MSrcPosCalc(const char *name, const char *title) 95 96 : fObservatory(NULL), fPointPos(NULL), fSourcePos(NULL), fDeviation(NULL), 96 fSrcPosCam(NULL), fSrcPosAnti(NULL), fGeom(NULL), fTime(NULL), fMode(kDefault) 97 fSrcPosCam(NULL), fSrcPosAnti(NULL), fGeom(NULL), fTime(NULL), fCallback(NULL), 98 fMode(kDefault) 97 99 { 98 100 fName = name ? name : "MSrcPosCalc"; … … 196 198 //*fLog << "Pointing Position: " << GetRaDec(*fPointPos) << endl; 197 199 *fLog << "Source Position: " << GetRaDec(*fSourcePos) << endl; 200 if (fCallback) 201 *fLog << "Using " << fCallback->GetNumPasses() << " off-regions." << endl; 198 202 199 203 // For the case ReInit is never called we try: … … 215 219 { 216 220 fSrcPosAnti->SetXY(v); 217 v *= -1; 221 222 if (fCallback) 223 { 224 const Double_t step = TMath::TwoPi()/(fCallback->GetNumPasses()+1); 225 v = v.Rotate(step*(fCallback->GetNumPass()+1)); 226 } 227 else 228 v *= -1; 229 218 230 fSrcPosCam->SetXY(v); 219 231 } -
trunk/MagicSoft/Mars/mpointing/MSrcPosCalc.h
r7287 r8618 17 17 class MTime; 18 18 class MVector3; 19 class MTaskList; 19 20 20 21 class MSrcPosCalc : public MTask … … 39 40 MGeomCam *fGeom; 40 41 MTime *fTime; 42 MTaskList *fCallback; 41 43 42 44 UShort_t fRunType; //! Run Type to decide where to get pointing position from … … 68 70 void SetOwner(Bool_t b=kTRUE) { b ? SetBit(kIsOwner) : ResetBit(kIsOwner); } // Make MSrcPosCalc owner of fSourcePos 69 71 void SetMode(Mode_t m=kDefault) { fMode = m; } 72 void SetCallback(MTaskList *list) { fCallback=list; } 70 73 71 74 ClassDef(MSrcPosCalc, 0) // Calculates the source position in the camera
Note:
See TracChangeset
for help on using the changeset viewer.