- Timestamp:
- 02/17/05 17:09:00 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r6565 r6569 35 35 36 36 37 37 38 2005/02/17 Thomas Bretz 38 39 39 40 * mjobs/MJStar.cc: 40 41 - fixed some missing containers in case of MC files 42 43 * callisto.cc: 44 - removed obsolete second check for kModeC 45 46 * mars.rc: 47 - added a lot of option to be able to use a 48 different signal extractor looking into uncalibrated 49 data 50 51 * manalysis/MCameraData.[h,cc]: 52 - added Print() member function 53 54 * manalysis/MCerPhotAnal2.[h,cc]: 55 - switched off writing into MCerPhotEvt 56 57 * mdata/MDataChain.[h,cc]: 58 - added code to handle priorities of operators correctly 59 60 * mhist/MHEvent.cc: 61 - fixed display for MPedestalRMS 62 63 * mjobs/MJCalib.cc: 64 - fixed treatment of PixelCheck resource 65 66 * mjobs/MJCalibrateSignal.cc: 67 - added some comments about Monte Carlo 68 69 * mjobs/MJPedestal.cc: 70 - do not allow 'UseData' for Monte Carlos. Reason is given as 71 comment in the code 72 73 * mmain/MEventDisplay.[h,cc]: 74 - changed such, that mars.cc allows to set the used extractor 75 - removed the obsolete cam.root, ped.root option 76 77 * mmain/MCameraDisplay.cc: 78 - adapted to change in MEventDisplay 79 41 80 42 81 -
trunk/MagicSoft/Mars/callisto.cc
r6558 r6569 385 385 } 386 386 387 if (kModeC) 388 { 389 // 390 // Do calibration 391 // 392 MJCalibration job3(Form("MJCalibration #%d", seq.GetSequence())); 393 job3.SetSequence(seq); 394 job3.SetEnv(&env); 395 job3.SetEnvDebug(kDebugEnv); 396 job3.SetDisplay(d); 397 job3.SetOverwrite(kOverwrite); 398 job3.SetPathOut(kOutpathC); 399 job3.SetPathData(kInpathD); 400 job3.SetDataType(kDataType); 401 // job2.SetPathIn(kInpathC); // not yet needed 402 403 job3.SetBadPixels(job2.GetBadPixels()); 404 job3.SetExtractor(job2.GetExtractor()); 405 job3.SetExtractorCam(job2.GetPedestalCam()); 406 407 if (!job3.ProcessFile(job1.GetPedestalCam())) 408 { 409 gLog << err << "Calculation of calibration failed." << endl << endl; 410 return -1; 411 } 412 413 if (kDebugEnv>0) 414 env.PrintUntouched(); 415 416 if (!job3.GetDisplay()) 417 { 418 gLog << warn << "Display closed by user... execution aborted." << endl << endl; 419 return 1; 420 } 387 // 388 // Do calibration 389 // 390 MJCalibration job3(Form("MJCalibration #%d", seq.GetSequence())); 391 job3.SetSequence(seq); 392 job3.SetEnv(&env); 393 job3.SetEnvDebug(kDebugEnv); 394 job3.SetDisplay(d); 395 job3.SetOverwrite(kOverwrite); 396 job3.SetPathOut(kOutpathC); 397 job3.SetPathData(kInpathD); 398 job3.SetDataType(kDataType); 399 // job2.SetPathIn(kInpathC); // not yet needed 400 401 job3.SetBadPixels(job2.GetBadPixels()); 402 job3.SetExtractor(job2.GetExtractor()); 403 job3.SetExtractorCam(job2.GetPedestalCam()); 404 405 if (!job3.ProcessFile(job1.GetPedestalCam())) 406 { 407 gLog << err << "Calculation of calibration failed." << endl << endl; 408 return -1; 409 } 410 411 if (kDebugEnv>0) 412 env.PrintUntouched(); 413 414 if (!job3.GetDisplay()) 415 { 416 gLog << warn << "Display closed by user... execution aborted." << endl << endl; 417 return 1; 421 418 } 422 419 -
trunk/MagicSoft/Mars/manalysis/MCameraData.cc
r4838 r6569 420 420 *fLog << warn << "MCameraData::DrawPixelContent - not available." << endl; 421 421 } 422 423 void MCameraData::Print(Option_t *o) const 424 { 425 MParContainer::Print(o); 426 *fLog << "Size = " << fData.GetSize() << endl; 427 for (int i=0; i<fData.GetSize(); i++) 428 cout << i << ": " << fData[i] << endl; 429 } -
trunk/MagicSoft/Mars/manalysis/MCameraData.h
r4838 r6569 52 52 Double_t operator[](int i) { return fData[i]; } 53 53 54 void Print(Option_t *o="") const; 55 54 56 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const; 55 57 void DrawPixelContent(Int_t num) const; -
trunk/MagicSoft/Mars/manalysis/MCerPhotAnal2.cc
r3538 r6569 31 31 // 32 32 // Input Containers: 33 // MRawEvtData, MPed PhotCam33 // MRawEvtData, MPedestalCam 34 34 // 35 35 // Output Containers: … … 48 48 #include "MRawEvtData.h" // MRawEvtData::GetNumPixels 49 49 #include "MCerPhotEvt.h" 50 #include "MPed PhotPix.h"51 #include "MPed PhotCam.h"50 #include "MPedestalPix.h" 51 #include "MPedestalCam.h" 52 52 #include "MRawEvtPixelIter.h" 53 53 … … 78 78 // - MRawRunHeader 79 79 // - MRawEvtData 80 // - MPe dPhotCam80 // - MPestalCam 81 81 // 82 82 // The following output containers are also searched and created if … … 124 124 } 125 125 126 fPedestals = (MPed PhotCam*)pList->FindCreateObj("MPedPhotCam");126 fPedestals = (MPedestalCam*)pList->FindCreateObj("MPedestalCam"); 127 127 if (runheader && !fPedestals) 128 128 return kFALSE; … … 263 263 264 264 Int_t idx = pixel.GetPixelId(); 265 fCerPhotEvt->AddPixel(idx, s, sigs);265 // fCerPhotEvt->AddPixel(idx, s, sigs); 266 266 267 267 // Preliminary: Do not overwrite pedestals calculated by … … 271 271 } 272 272 273 fCerPhotEvt->FixSize();274 fCerPhotEvt->SetReadyToSave();273 // fCerPhotEvt->FixSize(); 274 // fCerPhotEvt->SetReadyToSave(); 275 275 276 276 if (fPedestals) -
trunk/MagicSoft/Mars/manalysis/MCerPhotAnal2.h
r3389 r6569 16 16 17 17 class MRawEvtData; 18 class MPed PhotCam;18 class MPedestalCam; 19 19 class MCerPhotEvt; 20 20 class MRawRunHeader; … … 23 23 { 24 24 private: 25 MPed PhotCam*fPedestals; // Pedestals of all pixels in the camera25 MPedestalCam *fPedestals; // Pedestals of all pixels in the camera 26 26 MRawEvtData *fRawEvt; // raw event data (time slices) 27 27 MCerPhotEvt *fCerPhotEvt; // Cerenkov Photon Event used for calculation -
trunk/MagicSoft/Mars/mars.rc
r6338 r6569 20 20 21 21 # ------------------------------------------------------------------------- 22 # Define here which signal extractor you are going to use for the 23 # whole calibration chain 24 # ------------------------------------------------------------------------- 25 ExtractSignal: MExtractTimeAndChargeDigitalFilter 26 # ------------------------------------------------------------------------- 27 # Define here an extractor which can be used for the December 04 data. 28 # ------------------------------------------------------------------------- 29 #ExtractSignal: MExtractTimeAndChargeSpline, MExtractTimeAndChargeDigitalFilterPeakSearch, MExtractTimeAndChargeSlidingWindow 30 # ------------------------------------------------------------------------- 31 # Define here parameters valid for all extractors above 32 # ------------------------------------------------------------------------- 33 #ExtractSignal.HiGainFirst: 0 34 #ExtractSignal.HiGainLast: 15 35 #ExtractSignal.LoGainFirst: 3 36 #ExtractSignal.LoGainLast: 14 37 #ExtractSignal.SaturationLimit: 250 38 #ExtractSignal.OffsetLoGain: 1.51 39 #ExtractSignal.OffsetLoGain: 0 40 #ExtractSignal.LoGainSwitch: 150 41 #ExtractSignal.LoGainStartShift: -2.8 42 #ExtractSignal.LoGainStartShift: -2.8 43 # ------------------------------------------------------------------------- 44 # Define here parameters valid for the spline: 45 # ------------------------------------------------------------------------- 46 #ExtractSignal.Resolution: 0.05 47 #ExtractSignal.RiseTimeHiGain: 0.5 48 #ExtractSignal.FallTimeHiGain: 1.5 49 #ExtractSignal.LoGainStretch: 1.5 50 #ExtractSignal.ExtractionType: Integral <default> 51 #ExtractSignal.ExtractionType: Amplitude 52 # ------------------------------------------------------------------------- 53 # Define here parameters valid for the sliding window: 54 # ------------------------------------------------------------------------- 55 #ExtractSignal.HiGainWindowSize: 6 56 #ExtractSignal.LoGainWindowSize: 6 57 # ------------------------------------------------------------------------- 58 # Define here parameters valid for the digital filter with peak search: 59 # ------------------------------------------------------------------------- 60 #ExtractSignal.OffsetLeftFromPeak: 3 61 #ExtractSignal.OffsetRightFromPeak: 3 62 #ExtractSignal.PeakSearchWindowSize: 2 63 #ExtractSignal.HiGainFailureLimit: 10 64 #ExtractSignal.LoGainFailureLimit: 25 65 66 # ------------------------------------------------------------------------- 67 # In the case of the Digital filter you have to overwrite the default 68 # weights file depending on what you are extracting 69 # ------------------------------------------------------------------------- 70 #ExtractSignal.WeightsFile: msignal/cosmics_weights.dat 71 72 # ------------------------------------------------------------------------- 73 # Setup level for determining of bad pixels 74 # ------------------------------------------------------------------------- 75 #MBadPixelsCalc.PedestalLevel: 3.0 76 #MBadPixelsCalc.PedestalLevelVariance: 3.0 77 #MBadPixelsTreat.NumMinNeighbors: 3 78 #MBadPixelsTreat.UseInterpolation: yes 79 #MBadPixelsTreat.ProcessPedestalEvt: yes 80 #MBadPixelsTreat.ProcessPedestalRun: no 81 #MBadPixelsTreat.ProcessTimes: yes 82 #MBadPixelsTreat.UseCentralPixel: no 83 #MBadPixelsTreat.HardTreatment: no 84 85 # ------------------------------------------------------------------------- 22 86 # This is how you can setup the Image cleaning used in the Camera Display 23 87 # ------------------------------------------------------------------------- -
trunk/MagicSoft/Mars/mdata/MDataChain.cc
r6515 r6569 52 52 // --------- 53 53 // 54 // The allowed operations are: +, -, *, /, %, ^ 54 // The allowed operations are: +, -, *, /, %, ^ and ** for ^ 55 55 // 56 56 // While a%b returns the floating point reminder of a/b. 57 57 // While a^b returns a to the power of b 58 58 // 59 // Warning: There is no priority rule build in. So better use parantheses60 // to get correct results. The rule is parsed/evaluated from the left61 // to the right, which means:62 // 63 // "MHillas.fWidth + MHillas.fLength / HillasSource.fDist"64 // 65 // is parses as66 // 67 // "(MHillas.fWidth + MHillas.fLength) / HillasSource.fDist"59 // Priority 60 // -------- 61 // 62 // The priority of the operators is build in as: 63 // ^ (highest), %, *, /, +, - 64 // 65 // Priorities are evaluated before parsing the rule by inserting 66 // artificial paranthesis. If you find ANY problem with this please 67 // report it immediatly! It is highly recommended to check the result! 68 68 // 69 69 // You can also use mathmatical operators, eg: … … 168 168 #include <stdlib.h> // strtod, ... 169 169 170 #include <TRegexp.h> 170 171 #include <TRandom.h> 171 172 #include <TMethodCall.h> … … 371 372 } 372 373 374 // -------------------------------------------------------------------------- 375 // 376 // Remove all whitespaces 377 // Replace all kind of double +/- by a single + or - 378 // 373 379 void MDataChain::SimplifyString(TString &txt) const 374 380 { 381 txt.ReplaceAll(" ", ""); 382 txt.ReplaceAll("**", "^"); 383 375 384 while (txt.First("--")>=0 || txt.First("++")>=0 || 376 385 txt.First("+-")>=0 || txt.First("-+")>=0) … … 385 394 // -------------------------------------------------------------------------- 386 395 // 396 // Add Parenthesis depending on the priority of the operators. The 397 // priorities are defined by the default of the second argument. 398 // 399 void MDataChain::AddParenthesis(TString &test, const TString op) const 400 { 401 const TString low = op(1, op.Length()); 402 if (low.Length()==0) 403 return; 404 405 //cout << "--- " << Form("[%c]", op[0]) << " ---" << endl; 406 407 int offset = 0; 408 while (1) 409 { 410 const TString check = test(offset, test.Length()); 411 if (check.IsNull()) 412 break; 413 414 const Ssiz_t pos = check.First(op[0]); 415 if (pos<0) 416 break; 417 418 int cnt=0; 419 420 int i; 421 for (i=pos-1; i>=0; i--) 422 { 423 if (check[i]==')') 424 cnt++; 425 if (check[i]=='(') 426 cnt--; 427 if (cnt>0 || low.First(check[i])<0) 428 continue; 429 break; 430 } 431 432 cnt=0; 433 int j; 434 for (j=pos; j<check.Length(); j++) 435 { 436 if (check[j]=='(') 437 cnt++; 438 if (check[j]==')') 439 cnt--; 440 if (cnt>0 || low.First(check[j])<0) 441 continue; 442 break; 443 } 444 445 const TString sub = test(offset+i+1, j-i-1); 446 447 // Check if it contains operators, 448 // otherwise we can simply skip it 449 static const TRegexp regexp("[%/*^+-]"); 450 if (sub.Index(regexp)>0) 451 { 452 test.Insert(offset+j, ")"); 453 test.Insert(offset+i+1, "("); 454 offset += 2; 455 } 456 offset += j+1; 457 } 458 459 AddParenthesis(test, low); 460 } 461 462 // -------------------------------------------------------------------------- 463 // 387 464 // Core of the data chain. Here the chain is constructed out of the rule. 388 465 // … … 390 467 { 391 468 if (level==0) 469 { 392 470 SimplifyString(txt); 471 AddParenthesis(txt); 472 } 393 473 394 474 MData *member0=NULL; … … 828 908 return kTRUE; 829 909 } 910 /* 911 void MDataChain::ReconstructElements() 912 { 913 if (!fMember) 914 return; 915 916 if (fMember->InheritsFrom(MDataElement::Class())) 917 { 918 MData *data = ((MDataElement*)fMember)->CloneColumn(); 919 delete fMember; 920 fMember = data; 921 } 922 923 fMember->ReconstructElements(); 924 } 925 */ -
trunk/MagicSoft/Mars/mdata/MDataChain.h
r5956 r6569 45 45 46 46 void SimplifyString(TString &txt) const; 47 void AddParenthesis(TString &test, const TString op="^%*/+-") const; 47 48 MData *ParseString(TString txt, Int_t level); 48 49 MData *ParseDataMember(TString txt); … … 62 63 TString GetRule() const; 63 64 TString GetDataMember() const; 65 //void ReconstructElements() { if (fMember) fMember->ReconstructElements(); } 64 66 65 67 // MParContainer -
trunk/MagicSoft/Mars/mhist/MHEvent.cc
r5807 r6569 215 215 break; 216 216 case kEvtPedestalRMS: 217 fHist->SetCamContent(*event, 1);217 fHist->SetCamContent(*event, 2); 218 218 break; 219 219 case kEvtPedPhot: -
trunk/MagicSoft/Mars/mjobs/MJCalib.cc
r6475 r6569 37 37 38 38 const Int_t MJCalib::fgCheckedPixId = 100; 39 39 40 // -------------------------------------------------------------------------- 40 41 // … … 54 55 Bool_t MJCalib::CheckEnvLocal() 55 56 { 56 57 57 if (HasEnv("PixelCheck")) 58 SetPixelCheck();58 SetPixelCheck(GetEnv("PixelCheck", fPixelCheck)); 59 59 60 60 if (HasEnv("CheckedPixId")) 61 SetCheckedPixId(GetEnv("CheckedPixId",fCheckedPixId));61 SetCheckedPixId(GetEnv("CheckedPixId",fCheckedPixId)); 62 62 63 63 if (!HasEnv("DataType")) -
trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc
r6505 r6569 464 464 taskenv3.SetDefault(extractor3); 465 465 466 MCalibrateData calib;467 466 // 468 467 // This is new calibration to eff. photo-electrons, hard-coded as decided … … 470 469 // 471 470 #warning Default calibration now in equiv. photo-electrons! 471 MCalibrateData calib; 472 472 calib.SetSignalType(MCalibrateData::kPhe); 473 473 //----- WORKAROUND: Currently MC has no lo-gain switch ------ 474 474 if (IsUseMC()) // MC file 475 475 { … … 488 488 calib.SetPedestalFlag(MCalibrateData::kEvent); 489 489 } 490 //---------------------------------------------------------- 490 491 491 492 MExtractPINDiode pinext; … … 621 622 tlist2.AddToList(&apply); 622 623 tlist2.AddToList(&merge); 624 //----- WORKAROUND: Currently MC has no lo-gain switch ------ 623 625 if (IsUseMC()) 624 626 tlist2.AddToList(&pcopy); … … 629 631 tlist2.AddToList(&pedlo3); 630 632 } 633 //----------------------------------------------------------- 631 634 if (fIsInterlaced) 632 635 { 633 636 pinext.SetFilter(&fcalib); 634 637 bldext.SetFilter(&fcalib); … … 655 658 if (fIsRelTimesUpdate) 656 659 tlist2.AddToList(&recalc); 657 660 } 658 661 659 662 tlist2.AddToList(&conttp); -
trunk/MagicSoft/Mars/mjobs/MJPedestal.cc
r6553 r6569 791 791 792 792 if (HasEnv("UseData")) 793 fExtractType = GetEnv("UseData",kFALSE) ? kUseData : kUsePedRun; 793 fExtractType = GetEnv("UseData",kFALSE) ? kUseData : kUsePedRun; 794 795 if (IsUseMC() && fExtractType==kUseData) 796 { 797 // The reason is, that the standard data files contains empty 798 // (untriggered) events. If we would loop over the default 500 799 // first events of the data file you would calculate the 800 // pedestal from only some single events... 801 *fLog << inf; 802 *fLog << "Sorry, you cannot extract the starting pedestal from the first" << endl; 803 *fLog << "events in your data files... using pedestal file instead. The" << endl; 804 *fLog << "result should not differ..." << endl; 805 fExtractType = kUsePedRun; 806 } 807 794 808 795 809 if (HasEnv("UseHists")) … … 1002 1016 1003 1017 if (fIsUseHists) 1004 1018 { 1005 1019 pedcalc.SetIntermediateStorage(); 1006 1020 pedlogain.SetIntermediateStorage(); … … 1009 1023 // plist.AddToList(&fPedestalHist); 1010 1024 tlist.AddToList(&fillped); 1011 1025 } 1012 1026 1013 1027 pedcalc.SetPedestalsIn(&fPedestalCamIn); 1014 1028 pedlogain.SetPedestalsIn(&fPedestalCamIn); 1029 1015 1030 pedcalc.SetPedestalsInter(&pedinter); 1016 1031 pedlogain.SetPedestalsInter(&pedinter); … … 1135 1150 DisplayResult(plist); 1136 1151 1137 if (fExtractionType!=kFundamental)1138 fExtractor->SetFilter(0);1139 1140 1152 if (!WriteResult()) 1141 1153 return kFALSE; -
trunk/MagicSoft/Mars/mmain/MCameraDisplay.cc
r3503 r6569 90 90 { 91 91 case kButDisplay: 92 new MEventDisplay(fInputFile , "ped.root", "cal.root");92 new MEventDisplay(fInputFile); 93 93 return kTRUE; 94 94 } -
trunk/MagicSoft/Mars/mmain/MEventDisplay.cc
r6339 r6569 70 70 #include "MMcPedestalNSBAdd.h" // MMcPedestalNSBAdd 71 71 72 #include "MCerPhotAnal2.h" // MCerPhotAnal2 72 #include "MCerPhotAnal2.h" // MPedestalCalc 73 #include "MTaskEnv.h" // MTaskEnv 74 #include "MExtractTimeAndChargeDigitalFilter.h" 73 75 #include "MImgCleanStd.h" // MImgCleanStd 74 76 #include "MHillasCalc.h" // MHillasCalc 75 //#include "MHillasSrcCalc.h" // MHillasSrcCalc 76 //#include "MBlindPixelCalc.h" // MBlindPixelCalc 77 #include "MArrivalTimeCalc.h" // MArrivalTimeCalc 77 #include "MCalibrationRelTimeCalc.h" // MHillasSrcCalc 78 #include "MPrint.h" // 79 #include "MBadPixelsCalc.h" // MBadPixelsCalc 80 #include "MBadPixelsTreat.h" // MBadPixelsTreat 78 81 #include "MFillH.h" // MFillH 79 82 #include "MExtractSignal.h" // MExtractsignal … … 107 110 // Constructor. 108 111 // 109 MEventDisplay::MEventDisplay(const char *fname , const char *pname, const char *cname) : MStatusDisplay(), fEvtLoop(0)112 MEventDisplay::MEventDisplay(const char *fname) : MStatusDisplay(), fEvtLoop(0) 110 113 { 111 114 // 112 115 // Setup Task list for hillas calculation 113 116 // 114 SetupTaskList("Events", fname , pname, cname);117 SetupTaskList("Events", fname); 115 118 116 119 // … … 170 173 // preprocess tasks and read in first event (process) 171 174 // 172 void MEventDisplay::SetupTaskList(const char *tname, const char *fname, 173 const char *pname, const char *cname) 174 { 175 MCalibrationChargeCam *ccam=0; 176 MPedPhotCam *pcam=0; 175 void MEventDisplay::SetupTaskList(const char *tname, const char *fname) 176 { 177 // MCalibrationChargeCam *ccam=0; 178 // MPedPhotCam *pcam=0; 177 179 178 180 MBadPixelsCam *badpix = new MBadPixelsCam; … … 187 189 } 188 190 189 if (type==2)190 {191 TFile file(pname, "READ");192 if (!file.IsZombie())193 pcam = new MPedPhotCam;194 if (pcam)195 {196 if (pcam->Read()<=0)197 {198 delete pcam;199 pcam = NULL;200 }201 202 if (file.FindKey("MBadPixelsCam"))203 {204 MBadPixelsCam bad;205 if (bad.Read()>0)206 badpix->Merge(bad);207 }208 }209 file.Close();210 file.Open(cname, "READ");211 if (!file.IsZombie())212 ccam = new MCalibrationChargeCam;213 if (ccam)214 {215 if (ccam->Read()<=0)216 {217 delete ccam;218 ccam = NULL;219 }220 221 if (file.FindKey("MBadPixelsCam"))222 {223 MBadPixelsCam bad;224 if (bad.Read()>0)225 badpix->Merge(bad);226 }227 }228 file.Close();229 }230 231 191 // 232 192 // Setup an empty job, with a reader task only. … … 248 208 plist->AddToList(tlist); 249 209 plist->AddToList(badpix); 250 if (pcam)251 plist->AddToList(pcam);252 if (ccam)253 plist->AddToList(ccam);254 210 255 211 //MArrivalTime *atime = new MArrivalTime; … … 290 246 plist->AddToList(evt10); 291 247 248 MExtractTimeAndChargeDigitalFilter *digf = new MExtractTimeAndChargeDigitalFilter; 249 digf->ReadWeightsFile("msignal/MC_weights.dat"); 250 251 MTaskEnv *taskenv1=new MTaskEnv("ExtractSignal"); 252 taskenv1->SetDefault(digf); 253 taskenv1->SetOwner(); 254 292 255 MCerPhotAnal2 *nanal = new MCerPhotAnal2; 293 256 MFillH *fill01 = new MFillH(evt01, "MCerPhotEvt", "MFillH01"); 294 257 MImgCleanStd *clean = new MImgCleanStd; 295 258 MFillH *fill02 = new MFillH(evt02, "MCerPhotEvt", "MFillH02"); 296 MFillH *fill03 = new MFillH(evt03, type==1?"MPedPhotFundamental":"MPed PhotCam","MFillH03");297 MFillH *fill04 = new MFillH(evt04, type==1?"MPedPhotFromExtractorRndm":"MPed PhotCam", "MFillH04");259 MFillH *fill03 = new MFillH(evt03, type==1?"MPedPhotFundamental":"MPedestalCam", "MFillH03"); 260 MFillH *fill04 = new MFillH(evt04, type==1?"MPedPhotFromExtractorRndm":"MPedestalCam", "MFillH04"); 298 261 MFillH *fill06a= new MFillH(evt06a, "MCameraData", "MFillH06a"); 299 262 MFillH *fill06b= new MFillH(evt06b, "MCameraData", "MFillH06b"); 300 //MBlindPixelCalc *blind = new MBlindPixelCalc;301 263 MHillasCalc *hcalc = new MHillasCalc; 302 264 MMcTriggerLvl2Calc *trcal = new MMcTriggerLvl2Calc; … … 304 266 MFillH *fill10 = new MFillH(evt10, "MCerPhotEvt", "MFillH10"); 305 267 268 MBadPixelsCalc *bcalc = new MBadPixelsCalc; 269 MBadPixelsTreat *btreat = new MBadPixelsTreat; 270 btreat->SetProcessTimes(kFALSE); 306 271 if (type==1) 272 { 273 bcalc->SetNamePedPhotCam("MPedPhotFromExtractor"); 274 btreat->AddNamePedPhotCam("MPedPhotFromExtractorRndm"); 307 275 clean->SetNamePedPhotCam("MPedPhotFromExtractorRndm"); 276 } 308 277 309 278 // If no pedestal or no calibration file is availble 310 279 if (type==2) 311 280 { 312 if (!pcam || !ccam) 313 { 314 MFilter *f1=new MFDataMember("MRawRunHeader.fRunType", '>', 255.5); 315 MFilter *f2=new MFDataMember("MRawRunHeader.fRunType", '<', 255.5); 316 f1->SetName("MFMonteCarlo"); 317 f2->SetName("MFRealData"); 318 319 MMcPedestalCopy *pcopy = new MMcPedestalCopy; 320 MMcPedestalNSBAdd *pdnsb = new MMcPedestalNSBAdd; 321 322 MExtractSignal* extra = new MExtractSignal(); 323 extra->SetRange(0, 14, 0, 14); 324 extra->SetSaturationLimit(240); 325 326 MMcCalibrationUpdate* mcupd = new MMcCalibrationUpdate; 327 mcupd->SetOuterPixelsGainScaling(kFALSE); 328 329 MCalibrateData* mccal = new MCalibrateData; 330 mccal->SetCalibrationMode(MCalibrateData::kFfactor); 331 332 // MC 333 extra->SetFilter(f1); 334 mcupd->SetFilter(f1); 335 mccal->SetFilter(f1); 336 trcal->SetFilter(f1); 337 //fill09->SetFilter(f1); 338 339 // Data 340 nanal->SetFilter(f2); 341 342 // TaskList 343 tlist->AddToList(f1); 344 tlist->AddToList(f2); 345 tlist->AddToList(pcopy); 346 tlist->AddToList(pdnsb); 347 348 tlist->AddToList(extra); 349 tlist->AddToList(mcupd); 350 tlist->AddToList(mccal); 351 352 353 tlist->AddToList(nanal); 354 } 355 else 356 { 357 MCalibrateData* calib = new MCalibrateData; 358 tlist->AddToList(calib); 359 } 281 MFilter *f1=new MFDataMember("MRawRunHeader.fRunType", '>', 255.5); 282 f1->SetName("MFMonteCarlo"); 283 284 MMcPedestalCopy *pcopy = new MMcPedestalCopy; 285 MMcPedestalNSBAdd *pdnsb = new MMcPedestalNSBAdd; 286 287 MMcCalibrationUpdate* mcupd = new MMcCalibrationUpdate; 288 mcupd->SetOuterPixelsGainScaling(kFALSE); 289 290 MCalibrateData* calib = new MCalibrateData; 291 calib->SetCalibrationMode(MCalibrateData::kFlatCharge); 292 calib->SetPedestalFlag(MCalibrateData::kEvent); 293 294 //MCalibrationRelTimeCalc *tcalc = new MCalibrationRelTimeCalc; 295 296 // MC 297 mcupd->SetFilter(f1); 298 trcal->SetFilter(f1); 299 300 // TaskList 301 tlist->AddToList(f1); 302 tlist->AddToList(pcopy); 303 tlist->AddToList(pdnsb); 304 305 tlist->AddToList(nanal); // Calculated MPedPhotCam 306 tlist->AddToList(taskenv1); // Calculates MExtractedSignalCam, MArrivalTimeCam 307 tlist->AddToList(mcupd); 308 tlist->AddToList(calib); // MExtractedSignalCam --> MCerPhotEvt 309 310 tlist->AddToList(bcalc); // Produce MBadPixelsCam 311 tlist->AddToList(btreat); // Treat MBadPixelsCam 360 312 } 361 313 … … 367 319 tlist->AddToList(fill06a); 368 320 tlist->AddToList(fill06b); 369 //tlist->AddToList(blind);370 321 tlist->AddToList(fill10); 371 tlist->AddToList(hcalc); 372 if ((!pcam || !ccam) && type==2) 373 { 374 MArrivalTimeCalc *tcalc = new MArrivalTimeCalc; 375 MFillH *fill07 = new MFillH(evt07, "MRawEvtData", "MFillH7"); 376 MFillH *fill08 = new MFillH(evt08, "MArrivalTimeCam", "MFillH8"); 377 tlist->AddToList(tcalc); 322 if (type==2) 323 { 324 MFillH *fill07 = new MFillH(evt07, "MRawEvtData", "MFillH7"); 325 MFillH *fill08 = new MFillH(evt08, "MArrivalTimeCam", "MFillH8"); 378 326 tlist->AddToList(fill07); 379 327 tlist->AddToList(fill08); … … 387 335 tlist->AddToList(fill08); 388 336 } 337 tlist->AddToList(hcalc); 389 338 390 339 // … … 570 519 } 571 520 572 if (!tlist->Process()) 521 const Int_t rc = tlist->Process(); 522 if (rc==kFALSE || rc==kERROR) 573 523 return; 574 524 … … 609 559 void MEventDisplay::ReadFirstEvent() 610 560 { 611 if (!fEvtLoop->PreProcess()) 561 const Int_t rc = fEvtLoop->PreProcess(); 562 if (rc==kFALSE || rc==kERROR) 612 563 return; 613 564 -
trunk/MagicSoft/Mars/mmain/MEventDisplay.h
r4714 r6569 38 38 39 39 void UpdateDisplay(); 40 void SetupTaskList(const char *tname, const char *fname, 41 const char *pname=0, const char *cname=0); 40 void SetupTaskList(const char *tname, const char *fname); 42 41 43 42 void ReadFirstEvent(); … … 49 48 50 49 public: 51 MEventDisplay(const char *fname , const char *pname=0, const char *cname=0);50 MEventDisplay(const char *fname); 52 51 ~MEventDisplay(); 53 52
Note:
See TracChangeset
for help on using the changeset viewer.