Changeset 6768 for trunk/MagicSoft/Mars/mjobs
- Timestamp:
- 03/07/05 17:43:58 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mjobs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mjobs/MJPedestal.cc
r6753 r6768 92 92 using namespace std; 93 93 94 const TString MJPedestal::fgReferenceFile = "mjobs/pedestalref.rc"; 95 const TString MJPedestal::fgBadPixelsFile = "mjobs/badpixels_0_559.rc"; 94 const TString MJPedestal::fgReferenceFile = "mjobs/pedestalref.rc"; 95 const TString MJPedestal::fgBadPixelsFile = "mjobs/badpixels_0_559.rc"; 96 const Float_t MJPedestal::fgExtractWinLeft = 2.5; 97 const Float_t MJPedestal::fgExtractWinRight = 6.0; 96 98 // -------------------------------------------------------------------------- 97 99 // … … 116 118 SetBadPixelsFile(); 117 119 120 SetExtractWinLeft(); 121 SetExtractWinRight(); 118 122 // 119 123 // Default references for case that no value references file is there … … 301 305 disp1.SetCamError (fPedestalCamOut, 3); 302 306 307 /* 303 308 if (fIsUseHists) 304 309 { … … 340 345 } 341 346 } 347 */ 342 348 343 349 if (fExtractionType!=kFundamental/*fExtractorResolution*/) … … 381 387 // Display data 382 388 // 383 if (fDisplayType != kDisplayDataCheck && !fIsUseHists &&fExtractionType==kFundamental/*fExtractorResolution*/)389 if (fDisplayType != kDisplayDataCheck && fExtractionType==kFundamental/*fExtractorResolution*/) 384 390 { 385 391 TCanvas &c3 = fDisplay->AddTab("Pedestals"); … … 391 397 } 392 398 399 #if 0 393 400 if (fIsUseHists) 394 401 { … … 406 413 disp5.CamDraw(c4, 2, 2, 5); 407 414 408 415 /* 409 416 TCanvas &c5 = fDisplay->AddTab("Difference Hist."); 410 417 c5.Divide(2,3); … … 412 419 disp6.CamDraw(c5, 1, 2, 1); 413 420 disp7.CamDraw(c5, 2, 2, 5); 421 */ 414 422 415 423 TCanvas &c6 = fDisplay->AddTab("Difference Calc."); … … 420 428 return; 421 429 } 422 430 #endif 423 431 if (fDisplayType == kDisplayDataCheck) 424 432 { … … 812 820 } 813 821 822 823 SetExtractWinLeft (GetEnv("ExtractWinLeft", fExtractWinLeft )); 824 SetExtractWinRight(GetEnv("ExtractWinRight", fExtractWinRight)); 825 814 826 if (!MJCalib::CheckEnvLocal()) 815 827 return kFALSE; … … 996 1008 MHPedestalCam hpedcam; 997 1009 // fPedestalHist.SetRenorm(kTRUE); 1010 // fPedestalHist.SetPedestalsOut(&fPedestalCamOut); 998 1011 999 1012 MPedestalCam pedinter; … … 1001 1014 1002 1015 MFillH fillped(&hpedcam, "MPedestalCamIntermediate", "FillPedCam"); 1016 // MFillH fillped(&fPedestalHist, "MPedestalCamIntermediate", "FillPedCam"); 1003 1017 MFillH fillpul("MHCalibrationPulseTimeCam", "MRawEvtData", "FillPulseTime"); 1004 // MFillH fillped(&fPedestalHist, "MPedestalCamIntermediate", "FillPedCam");1005 1018 fillped.SetBit(MFillH::kDoNotDisplay); 1006 1019 fillpul.SetBit(MFillH::kDoNotDisplay); … … 1012 1025 sel.SetNumSelectEvts(0); 1013 1026 1014 if (fExtractionType!=kFundamental )1027 if (fExtractionType!=kFundamental && fExtractor) 1015 1028 { 1016 1029 fExtractor->SetFilter(&sel); … … 1235 1248 const Float_t rmspulsetime = cam->GetAverageArea(0).GetHiGainRms(); 1236 1249 *fLog << inf << "Mean pulse time (cosmics): " << meanpulsetime << "+-" << rmspulsetime << endl; 1237 const Int_t newfirst = (Int_t)(meanpulsetime- 2.5);1250 const Int_t newfirst = (Int_t)(meanpulsetime-fExtractWinLeft); 1238 1251 Int_t wshigain = fExtractor->InheritsFrom("MExtractTimeAndCharge") 1239 1252 ? ((MExtractTimeAndCharge*)fExtractor)->GetWindowSizeHiGain() … … 1244 1257 ? ((MExtractTimeAndCharge*)fExtractor)->GetWindowSizeLoGain() 1245 1258 : 6; 1246 const Int_t newlast = (Int_t)(meanpulsetime+6.); 1247 *fLog << inf << "Try to set new range limits: ("<<newfirst<<","<<newlast+wshigain<<")"<<endl; 1259 const Int_t newlast = (Int_t)(meanpulsetime+fExtractWinRight); 1260 *fLog << inf << "Try to set new range limits: ("<<newfirst<<","<<newlast<<"+"<<wshigain 1261 <<","<<newfirst<<","<<newlast<<"+"<<wslogain<<")"<<endl; 1248 1262 if (newfirst < 0) 1249 1263 { … … 1251 1265 return kFALSE; 1252 1266 } 1253 if (newlast+wshigain > data->GetNumHiGainSamples() )1267 if (newlast+wshigain > data->GetNumHiGainSamples()+data->GetNumLoGainSamples()-1) 1254 1268 { 1255 *fLog << err << "Pulse is too much to the right, cannot go beyond higainlimits! "1256 << " Try to use a different extractor... " << endl;1269 *fLog << err << "Pulse is too much to the right, cannot go beyond limits! " 1270 << " Cannot extract at all! ... " << endl; 1257 1271 return kFALSE; 1258 1272 } … … 1263 1277 return kFALSE; 1264 1278 } 1265 fExtractor->SetRange(newfirst,newlast+wshigain,newfirst,data->GetNumLoGainSamples() );1279 fExtractor->SetRange(newfirst,newlast+wshigain,newfirst,data->GetNumLoGainSamples()-1); 1266 1280 if (!WriteExtractor()) 1267 1281 { -
trunk/MagicSoft/Mars/mjobs/MJPedestal.h
r6751 r6768 27 27 private: 28 28 29 static const TString fgReferenceFile; //! default for fReferenceFile ("pedestalref.rc") 30 static const TString fgBadPixelsFile; //! default for fBadPixelsFile ("badpixels_0_559.rc") 29 static const TString fgReferenceFile; //! default for fReferenceFile ("pedestalref.rc") 30 static const TString fgBadPixelsFile; //! default for fBadPixelsFile ("badpixels_0_559.rc") 31 32 static const Float_t fgExtractWinLeft; //! default for fExtractWinLeft (now set to: 2.5) 33 static const Float_t fgExtractWinRight; //! default for fExtractWinRight (now set to: 6.0) 31 34 32 35 Axis_t fPedestalMin; //! Minimum Axis value for pedestal datacheck display … … 47 50 Float_t fRefPedRmsGalacticOuter; //! Ref. line ped. RMS for galactic source - outer pixels 48 51 52 Float_t fExtractWinLeft; // Number of FADC slices to extract leftward from mean pulse pos. 53 Float_t fExtractWinRight; // Number of FADC slices to extract rightward from mean pulse pos. 54 49 55 TString fReferenceFile; // File name containing the reference values 50 56 TString fBadPixelsFile; // File name containing the bad pixels excluded beforehand … … 119 125 void SetBadPixelsFile( const TString ref=fgBadPixelsFile ) { fBadPixelsFile = ref; } 120 126 127 void SetExtractWinLeft ( const Float_t f=fgExtractWinLeft ) { fExtractWinLeft = f; } 128 void SetExtractWinRight( const Float_t f=fgExtractWinRight ) { fExtractWinRight = f; } 129 121 130 MExtractor *GetExtractor() const { return fExtractor; } 122 131
Note:
See TracChangeset
for help on using the changeset viewer.