Changeset 4399 for trunk/MagicSoft
- Timestamp:
- 07/16/04 14:06:40 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r4398 r4399 25 25 * msignal/MExtractFixedWindowSpline.cc 26 26 - replace the delete's by delete []. 27 28 * mcalib/MHCalibrationChargeCam.cc 29 - remove some obsolete commented code 30 31 * mcalib/MHCalibrationChargeBlindPix.[h,cc] 32 - derive only from MHGausEvents and not additionally from 33 MHCalibrationChargePix 34 - Additional setter for MCalibrationChargeBlindPix, used by 35 MHCalibrationChargeBlindCam 36 - Getter for fSinglePheCut 27 37 28 38 -
trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeBlindPix.cc
r4383 r4399 102 102 const Axis_t MHCalibrationChargeBlindPix::fgChargeFirst = -0.5; 103 103 const Axis_t MHCalibrationChargeBlindPix::fgChargeLast = 255.5; 104 const Float_t MHCalibrationChargeBlindPix::fgSinglePheCut = 60.;104 const Float_t MHCalibrationChargeBlindPix::fgSinglePheCut = 30.; 105 105 const Float_t MHCalibrationChargeBlindPix::fgNumSinglePheLimit = 50.; 106 106 // -------------------------------------------------------------------------- … … 236 236 if (fFitLegend) 237 237 { 238 239 238 delete fFitLegend; 239 fFitLegend = NULL; 240 240 } 241 241 … … 259 259 260 260 261 MH CalibrationChargePix::Clear();261 MHGausEvents::Clear(); 262 262 return; 263 } 264 265 // -------------------------------------------------------------------------- 266 // 267 // Empty function to overload MHGausEvents::Reset() 268 // 269 void MHCalibrationChargeBlindPix::Reset() 270 { 263 271 } 264 272 … … 329 337 // - MExtractedSignalBlindPixel 330 338 // 339 Bool_t MHCalibrationChargeBlindPix::SetupFill(const MParList *pList) 340 { 341 342 fRawEvt = (MRawEvtData*)pList->FindObject("MRawEvtData"); 343 if (!fRawEvt) 344 { 345 *fLog << err << "MRawEvtData not found... aborting." << endl; 346 return kFALSE; 347 } 348 349 fSignal = (MExtractedSignalBlindPixel*)pList->FindObject("MExtractedSignalBlindPixel"); 350 if (!fSignal) 351 { 352 *fLog << err << "MExtractedSignalBlindPixel not found... aborting " << endl; 353 return kFALSE; 354 } 355 356 return kTRUE; 357 } 358 359 // -------------------------------------------------------------------------- 360 // 361 // Gets or creates the pointers to: 362 // - MCalibrationChargeBlindPix 363 // 331 364 // Calls: 332 365 // - MHGausHist::InitBins() 333 //334 Bool_t MHCalibrationChargeBlindPix::SetupFill(const MParList *pList)335 {336 337 fRawEvt = (MRawEvtData*)pList->FindObject("MRawEvtData");338 if (!fRawEvt)339 {340 *fLog << err << "MRawEvtData not found... aborting." << endl;341 return kFALSE;342 }343 344 fSignal = (MExtractedSignalBlindPixel*)pList->FindObject("MExtractedSignalBlindPixel");345 if (!fSignal)346 {347 *fLog << err << "MExtractedSignalBlindPixel not found... aborting " << endl;348 return kFALSE;349 }350 351 return kTRUE;352 }353 354 // --------------------------------------------------------------------------355 //356 // Gets or creates the pointers to:357 // - MCalibrationChargeBlindPix358 366 // 359 367 Bool_t MHCalibrationChargeBlindPix::ReInit(MParList *pList) … … 364 372 return kFALSE; 365 373 366 /*367 fExtractor = (MExtractBlindPixel*)pList->FindObject("MExtractBlindPixel");368 if (!fExtractor)369 {370 *fLog << err << "MExtractBlindPixel not found... aborting " << endl;371 return kFALSE;372 }373 374 374 const Int_t samples = fSignal->GetNumFADCSamples(); 375 const Int_t integ = f Extractor->IsExtractionType( MExtractBlindPixel::kIntegral );375 const Int_t integ = fSignal->IsExtractionType( MExtractBlindPixel::kIntegral ); 376 376 377 377 // … … 380 380 if ( fLast < samples*integ*fgChargeLast ) 381 381 { 382 SetLast ( samples * 256. - 0.5);382 SetLast ( samples * (fgChargeLast+0.5) - 0.5 ); 383 383 SetSinglePheCut( samples * fgSinglePheCut ); 384 384 } 385 */ 386 SetLast ( 20. * 256. - 0.5 ); 385 387 386 MHGausEvents::InitBins(); 388 387 … … 411 410 { 412 411 413 const Int_t samples = (Int_t)fRawEvt->GetNumHiGainSamples()+(Int_t)fRawEvt->GetNumLoGainSamples(); 412 const Int_t samples = (Int_t)fRawEvt->GetNumHiGainSamples() 413 +(Int_t)fRawEvt->GetNumLoGainSamples(); 414 414 415 415 if (!fASinglePheFADCSlices.IsValid()) … … 429 429 if (slices == 0.) 430 430 { 431 *fLog << err << "Number of used signal slices in MExtractedSignalBlindPix is zero ... abort." 431 *fLog << err 432 << "Number of used signal slices in MExtractedSignalBlindPix " 433 << "is zero ... abort." 432 434 << endl; 433 435 return kFALSE; … … 438 440 // 439 441 const Float_t signal = fSignal->GetExtractedSignal(fPixId); 442 440 443 if (signal > -0.5) 441 FillHist AndArray(signal);444 FillHist(signal); 442 445 else 443 446 return kTRUE; … … 475 478 if (IsEmpty()) 476 479 { 477 *fLog << err << GetDescriptor() << ": My histogram has not been filled !! " << endl; 480 *fLog << err << GetDescriptor() << " ID: " << fPixId 481 << " My histogram has not been filled !! " << endl; 478 482 return kFALSE; 479 483 } 480 481 CreateFourierSpectrum();482 fBlindPix->SetOscillating ( !IsFourierSpectrumOK() );483 484 484 485 fBlindPix->SetValid(kTRUE); … … 1024 1025 // The following options can be chosen: 1025 1026 // 1026 // "": displays the fHGausHist, the legend and fASinglePheFADCSlices and fAPedestalFADCSlices1027 // "": displays the fHGausHist, the fits, the legend and fASinglePheFADCSlices and fAPedestalFADCSlices 1027 1028 // "all": executes additionally MHGausEvents::Draw(), with option "fourierevents" 1029 // "datacheck" display the fHGausHist, the fits and the legend 1028 1030 // 1029 1031 void MHCalibrationChargeBlindPix::Draw(Option_t *opt) … … 1038 1040 TVirtualPad *pad = NULL; 1039 1041 1040 oldpad->SetBorderMode(0);1041 1042 1042 if (option.Contains("all")) 1043 1043 { … … 1051 1051 pad->cd(1); 1052 1052 } 1053 else if (option.Contains("datacheck")) 1054 { 1055 pad = oldpad; 1056 pad->Divide(2,1); 1057 pad->cd(1); 1058 } 1053 1059 else 1054 1060 { … … 1080 1086 } 1081 1087 1082 1083 1088 pad->cd(2); 1084 1089 DrawLegend(); 1090 1091 if (option.Contains("datacheck")) 1092 return; 1085 1093 1086 1094 pad->cd(3); -
trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeBlindPix.h
r4379 r4399 24 24 class MExtractBlindPixel; 25 25 class MExtractedSignalBlindPixel; 26 class MHCalibrationChargeBlindPix : public MH CalibrationChargePix26 class MHCalibrationChargeBlindPix : public MHGausEvents 27 27 { 28 28 private: … … 43 43 MCalibrationChargeBlindPix *fBlindPix; //! Storage container results 44 44 MExtractedSignalBlindPixel *fSignal; //! Storage container extracted signal 45 MExtractBlindPixel *fExtractor; //! Extractor blind pixel46 45 MRawEvtData *fRawEvt; //! Storage container raw data 47 46 … … 75 74 76 75 Byte_t fFlags; // Bit-field for the flags 77 enum { kSinglePheFitOK, kPedestalFitOK }; 76 enum { kSinglePheFitOK, kPedestalFitOK }; // Possible bits to be set 78 77 79 78 TPaveText *fFitLegend; //! Some legend to display the fit results … … 95 94 96 95 void Clear(Option_t *o=""); 96 void Reset(); 97 97 98 98 // TObject *Clone(const char *) const; … … 110 110 const Double_t GetSigma0 () const { return fSigma0; } 111 111 const Double_t GetSigma1 () const { return fSigma1; } 112 113 112 const Double_t GetLambdaErr () const { return fLambdaErr; } 114 113 const Double_t GetLambdaCheckErr() const { return fLambdaCheckErr; } … … 117 116 const Double_t GetSigma0Err () const { return fSigma0Err; } 118 117 const Double_t GetSigma1Err () const { return fSigma1Err; } 119 118 const Float_t GetSinglePheCut () const { return fSinglePheCut; } 119 120 120 TVector &GetASinglePheFADCSlices() { return fASinglePheFADCSlices; } 121 121 const TVector &GetASinglePheFADCSlices() const { return fASinglePheFADCSlices; } … … 128 128 129 129 // Setters 130 void SetSinglePheCut ( const Float_t cut =fgSinglePheCut ) { fSinglePheCut = cut; } 131 void SetNumSinglePheLimit ( const Float_t lim =fgNumSinglePheLimit ) { fNumSinglePheLimit = lim; } 130 void SetCalibrationChargeBlindPix ( MCalibrationChargeBlindPix *pix) { fBlindPix = pix; } 131 void SetSinglePheCut ( const Float_t cut =fgSinglePheCut ) { fSinglePheCut = cut; } 132 void SetNumSinglePheLimit ( const Float_t lim =fgNumSinglePheLimit ) { fNumSinglePheLimit = lim; } 132 133 133 134 void SetMeanPedestal ( const Float_t f ) { fMeanPedestal = f; } -
trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.cc
r4389 r4399 865 865 } 866 866 867 // 868 // From here on , the datacheck - Draw 869 // 867 870 TVirtualPad *pad = gPad ? gPad : MH::MakeDefCanvas(this); 868 871 pad->SetBorderMode(0); … … 924 927 925 928 for (int i=0; i<navhi; i++) 926 { 927 // delete (*cam->fAverageHiGainAreas)[i]; 928 (*cam->fAverageHiGainAreas)[i] = (*fAverageHiGainAreas)[i]->Clone(); 929 } 929 (*cam->fAverageHiGainAreas)[i] = (*fAverageHiGainAreas)[i]->Clone(); 930 930 for (int i=0; i<navlo; i++) 931 { 932 // delete (*cam->fAverageLoGainAreas)[i]; 933 (*cam->fAverageLoGainAreas)[i] = (*fAverageLoGainAreas)[i]->Clone(); 934 } 931 (*cam->fAverageLoGainAreas)[i] = (*fAverageLoGainAreas)[i]->Clone(); 935 932 for (int i=0; i<nsehi; i++) 936 { 937 // delete (*cam->fAverageHiGainSectors)[i]; 938 (*cam->fAverageHiGainSectors)[i] = (*fAverageHiGainSectors)[i]->Clone(); 939 } 933 (*cam->fAverageHiGainSectors)[i] = (*fAverageHiGainSectors)[i]->Clone(); 940 934 for (int i=0; i<nselo; i++) 941 { 942 // delete (*cam->fAverageLoGainSectors)[i]; 943 (*cam->fAverageLoGainSectors)[i] = (*fAverageLoGainSectors)[i]->Clone(); 944 } 935 (*cam->fAverageLoGainSectors)[i] = (*fAverageLoGainSectors)[i]->Clone(); 945 936 946 937 cam->fAverageAreaNum = fAverageAreaNum; -
trunk/MagicSoft/Mars/mcalib/MHGausEvents.cc
r4382 r4399 529 529 } 530 530 531 pad->SetTicks();532 531 pad->SetBorderMode(0); 533 532 pad->Divide(1,win); … … 536 535 if (!IsEmpty()) 537 536 gPad->SetLogy(); 537 538 gPad->SetTicks(); 538 539 539 540 fHGausHist.Draw(opt); -
trunk/MagicSoft/Mars/msignal/MExtractBlindPixel.cc
r4388 r4399 79 79 const Byte_t MExtractBlindPixel::fgLast = 7; 80 80 const Byte_t MExtractBlindPixel::fgHiGainFirst = 10; 81 const Byte_t MExtractBlindPixel::fgHiGainLast = 29;81 const Byte_t MExtractBlindPixel::fgHiGainLast = 19; 82 82 const Byte_t MExtractBlindPixel::fgLoGainFirst = 0; 83 83 const Byte_t MExtractBlindPixel::fgLoGainLast = 7; … … 649 649 } 650 650 } 651 651 652 } 652 653
Note:
See TracChangeset
for help on using the changeset viewer.