Changeset 2642 for trunk/MagicSoft/Mars
- Timestamp:
- 12/11/03 14:10:12 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2641 r2642 14 14 * mhist/MHCalibrationPixel: 15 15 - store Hi Gain vs. Lo Gain values to extract the conversion factor 16 17 * manalysis/MCalibrationPix: 18 * manalysis/MCalibrationCam: 19 - separate Hi Gain and Lo Gain 20 - include return of PIN Diode measurement 16 21 17 22 2003/12/11: Thomas Bretz -
trunk/MagicSoft/Mars/macros/calibration.C
r2634 r2642 120 120 121 121 tlist2.AddToList(&read2); 122 tlist2.AddToList(&sigsig); 122 123 tlist2.AddToList(&calcalc); 123 tlist2.AddToList(&sigsig);124 124 125 125 MHCamEvent hist2; … … 129 129 tlist2.AddToList(&fill2); 130 130 131 MStatusDisplay *d2 = new MStatusDisplay; 132 d2->SetUpdateTime(3000); 133 131 134 // 132 135 // Create and setup the eventloop … … 134 137 MEvtLoop evtloop2; 135 138 evtloop2.SetParList(&plist2); 139 evtloop2.SetDisplay(d2); 136 140 137 141 // … … 174 178 MHCamera disp14 (geomcam, "MCalibrationCam;photons", "Nr. of Photons (Blind Pixel Method)"); 175 179 MHCamera disp15 (geomcam, "MCalibrationCam;convphot", "Conversion Factor (Blind Pixel Method)"); 176 MHCamera disp16 (geomcam, "MCalibrationCam;sigma/charge", "Sigma per Charge");180 MHCamera disp16 (geomcam, "MCalibrationCam;sigma/charge", "Sigma^2 per Charge^2"); 177 181 178 182 disp1.SetCamContent(*cam, 0); … … 186 190 187 191 disp6.SetCamContent(*cam, 5); 188 disp6.SetCamError(*cam, 6);192 disp6.SetCamError(*cam, 6); 189 193 disp7.SetCamContent(*cam, 6); 190 194 disp8.SetCamContent(*cam, 7); 191 195 192 196 disp9.SetCamContent(*cam, 8); 193 disp9.SetCamError(*cam, 9);197 disp9.SetCamError(*cam, 9); 194 198 disp10.SetCamContent(*cam, 9); 195 199 … … 211 215 disp7.SetYTitle("\\Delta T [FADC slices]"); 212 216 disp8.SetYTitle("P [au]"); 213 disp9.SetYTitle("P [ FADC counts/ slice]");214 disp10.SetYTitle("RMS_{P} [ FADC counts / slice]");217 disp9.SetYTitle("P [Total FADC counts ]"); 218 disp10.SetYTitle("RMS_{P} [Total FADC counts ]"); 215 219 disp11.SetYTitle("\\sigma^2_{Q} - RMS^2_{P} [FADC counts^2]"); 216 220 disp12.SetYTitle("Nr Phe's"); … … 218 222 disp14.SetYTitle("Nr Photons"); 219 223 disp15.SetYTitle("Conversion Factor [Ph/FADC count]"); 220 disp16.SetYTitle("Sigma per Charge [1]"); 221 222 223 MStatusDisplay *d2 = new MStatusDisplay; 224 disp16.SetYTitle("Sigma^2 per Charge^2 [1]"); 225 226 MStatusDisplay *d3 = new MStatusDisplay; 224 227 225 228 // Set update time to 1s 226 d 2->SetUpdateTime(1000);227 228 TCanvas *c1 = &d 2->AddTab("Fitted Charges");229 d3->SetUpdateTime(1000); 230 231 TCanvas *c1 = &d3->AddTab("Fitted Charges"); 229 232 c1->Divide(2, 2); 230 233 … … 252 255 253 256 254 TCanvas *c12 = &d 2->AddTab("Fit Prob.");257 TCanvas *c12 = &d3->AddTab("Fit Prob."); 255 258 c12->Divide(1, 2); 256 259 … … 265 268 obj->Draw(); 266 269 267 TCanvas *c2 = &d 2->AddTab("Fitted Times");270 TCanvas *c2 = &d3->AddTab("Fitted Times"); 268 271 c2->Divide(3, 2); 269 272 … … 295 298 obj->Draw(); 296 299 297 TCanvas *c3 = &d 2->AddTab("Pedestals");300 TCanvas *c3 = &d3->AddTab("Pedestals"); 298 301 c3->Divide(2, 2); 299 302 … … 316 319 obj->Draw(); 317 320 318 TCanvas *c4 = &d 2->AddTab("Reduced Charges");321 TCanvas *c4 = &d3->AddTab("Reduced Charges"); 319 322 c4->Divide(2,2); 320 323 … … 337 340 obj->Draw(); 338 341 339 TCanvas *c5 = &d 2->AddTab("F-Factor Method");342 TCanvas *c5 = &d3->AddTab("F-Factor Method"); 340 343 c5->Divide(2, 2); 341 344 … … 358 361 obj->Draw(); 359 362 360 TCanvas *c6 = &d 2->AddTab("Blind Pixel Method");363 TCanvas *c6 = &d3->AddTab("Blind Pixel Method"); 361 364 c6->Divide(2, 2); 362 365 -
trunk/MagicSoft/Mars/manalysis/MCalibrationBlindPix.cc
r2603 r2642 78 78 Bool_t MCalibrationBlindPix::FitCharge() 79 79 { 80 80 81 if (!fHist->FitSinglePhe()) 81 82 return kFALSE; -
trunk/MagicSoft/Mars/manalysis/MCalibrationBlindPix.h
r2627 r2642 55 55 Bool_t FillRChargevsTime(Float_t rq, Int_t t) { return fHist->FillBlindPixelChargevsN(rq,t); } 56 56 57 Bool_t Is Valid() { return fLambda > 0. || fErrLambda > 0.; }57 Bool_t IsFitOK() { return fHist->IsFitOK(); } 58 58 59 59 Bool_t FitCharge(); -
trunk/MagicSoft/Mars/manalysis/MCalibrationCalc.cc
r2634 r2642 220 220 } 221 221 222 fNumHiGainSamples = fRunHeader->GetNumSamplesHiGain(); 223 fNumLoGainSamples = fRunHeader->GetNumSamplesLoGain(); 222 // fNumHiGainSamples = fRunHeader->GetNumSamplesHiGain(); 223 // fNumLoGainSamples = fRunHeader->GetNumSamplesLoGain(); 224 fNumHiGainSamples = 6; 225 fNumLoGainSamples = 6; 224 226 225 227 // … … 281 283 Float_t pedrms = ped.GetPedestalRms(); 282 284 283 if ((float)sum < ((pedes*fNumHiGainSamples)+( 30.*pedrms)) )285 if ((float)sum < ((pedes*fNumHiGainSamples)+(2.*fNumHiGainSamples*pedrms)) ) 284 286 cosmicpix++; 285 287 } … … 305 307 MExtractedSignalPix &sig = (*fSignals)[pixid]; 306 308 307 Float_t sum = sig.GetExtractedSignal(); 309 Float_t sumhi = sig.GetExtractedSignalHiGain(); 310 Float_t sumlo = sig.GetExtractedSignalLoGain(); 308 311 Bool_t logain = sig.IsLoGainUsed(); 309 312 … … 322 325 case gkCalibrationBlindPixelId: 323 326 324 if (!blindpixel.FillCharge(sum ))327 if (!blindpixel.FillCharge(sumhi)) 325 328 *fLog << warn << 326 "Overflow or Underflow occurred filling Blind Pixel sum = " << sum << endl;329 "Overflow or Underflow occurred filling Blind Pixel sum = " << sumhi << endl; 327 330 328 331 if (!blindpixel.FillTime((int)mid)) … … 330 333 "Overflow or Underflow occurred filling Blind Pixel time = " << (int)mid << endl; 331 334 332 if (!blindpixel.FillRChargevsTime(sum ,fEvents))335 if (!blindpixel.FillRChargevsTime(sumhi,fEvents)) 333 336 *fLog << warn << 334 337 "Overflow or Underflow occurred filling Blind Pixel eventnr = " << fEvents << endl; 335 338 336 339 case gkCalibrationPINDiodeId: 337 if (!pindiode.FillCharge(sum ))340 if (!pindiode.FillCharge(sumhi)) 338 341 *fLog << warn << 339 "Overflow or Underflow occurred filling HCharge: means = " << sum << endl;342 "Overflow or Underflow occurred filling HCharge: means = " << sumhi << endl; 340 343 if (!pindiode.FillTime((int)mid)) 341 344 *fLog << warn << 342 345 "Overflow or Underflow occurred filling HTime: time = " << (int)mid << endl; 343 if (!pindiode.FillRChargevsTime(sum ,fEvents))346 if (!pindiode.FillRChargevsTime(sumhi,fEvents)) 344 347 *fLog << warn << 345 348 "Overflow or Underflow occurred filling HChargevsN: eventnr = " << fEvents << endl; 346 349 347 350 default: 351 352 pix.SetChargesInGraph(sumhi,sumlo); 348 353 349 354 if (logain) 350 355 { 351 356 352 if (!pix.FillChargeLoGain(sum ))357 if (!pix.FillChargeLoGain(sumlo)) 353 358 *fLog << warn << "Could not fill Lo Gain Charge of pixel: " << pixid 354 << " signal = " << sum << endl;359 << " signal = " << sumlo << endl; 355 360 356 361 if (!pix.FillTimeLoGain((int)mid)) … … 361 366 // Fill the reduced charge into the control histo for better visibility 362 367 // 363 if (!pix.FillRChargevsTimeLoGain(sum ,fEvents))368 if (!pix.FillRChargevsTimeLoGain(sumlo,fEvents)) 364 369 *fLog << warn << "Could not fill Lo Gain Charge vs. EvtNr of pixel: " 365 << pixid << " signal = " << sum << " event Nr: " << fEvents << endl;370 << pixid << " signal = " << sumlo << " event Nr: " << fEvents << endl; 366 371 367 372 } 368 373 else 369 374 { 370 if (!pix.FillChargeHiGain(sum ))375 if (!pix.FillChargeHiGain(sumhi)) 371 376 *fLog << warn << "Could not fill Hi Gain Charge of pixel: " << pixid 372 << " signal = " << sum << endl;377 << " signal = " << sumhi << endl; 373 378 374 379 if (!pix.FillTimeHiGain((int)mid)) … … 376 381 << pixid << " time = " << (int)mid << endl; 377 382 378 if (!pix.FillRChargevsTimeHiGain(sum ,fEvents))383 if (!pix.FillRChargevsTimeHiGain(sumhi,fEvents)) 379 384 *fLog << warn << "Could not fill Hi Gain Charge vs. EvtNr of pixel: " 380 << pixid << " signal = " << sum << " event Nr: " << fEvents << endl;385 << pixid << " signal = " << sumhi << " event Nr: " << fEvents << endl; 381 386 } 382 387 -
trunk/MagicSoft/Mars/manalysis/MCalibrationCam.cc
r2631 r2642 13 13 ! * in supporting documentation. It is provided "as is" without express 14 14 ! * or implied warranty. 15 15 16 ! * 16 17 ! … … 372 373 *fLog << pix->GetPixId() << " Pedestals: " << pix->GetPed() << " +- " << pix->GetPedRms() 373 374 << " Reduced Charge: " << pix->GetCharge() << " +- " 374 << pix->GetSigmaCharge() << " Reduced Sigma: " << pix->GetRSigma() << endl;375 << pix->GetSigmaCharge() << " Reduced Sigma: " << TMath::Sqrt(pix->GetRSigmaSquare()) << endl; 375 376 id++; 376 377 } … … 392 393 *fLog << pix->GetPixId() << " Pedestals: " << pix->GetPed() << " +- " << pix->GetPedRms() 393 394 << " Reduced Charge: " << pix->GetCharge() << " +- " 394 << pix->GetSigmaCharge() << " Reduced Sigma: " << pix->GetRSigma() << endl;395 << pix->GetSigmaCharge() << " Reduced Sigma: " << TMath::Sqrt(pix->GetRSigmaSquare()) << endl; 395 396 id++; 396 397 } … … 437 438 break; 438 439 case 10: 439 val = (*this)[idx].GetRSigma();440 val = TMath::Sqrt((*this)[idx].GetRSigmaSquare()); 440 441 break; 441 442 case 15: 442 val = (*this)[idx].GetSigmaCharge()/(*this)[idx].GetCharge(); 443 val = ((*this)[idx].GetSigmaCharge()/(*this)[idx].GetCharge())* 444 ((*this)[idx].GetSigmaCharge()/(*this)[idx].GetCharge()); 443 445 break; 444 446 case 11: … … 482 484 Bool_t MCalibrationCam::CalcNrPhotInnerPixel() 483 485 { 484 if (!fBlindPixel->Is Valid())486 if (!fBlindPixel->IsFitOK()) 485 487 return kFALSE; 486 488 … … 561 563 return kTRUE; 562 564 } 565 566 567 Bool_t MCalibrationCam::GetConversionFactorPINDiode(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma) 568 { 569 570 return kTRUE; 571 572 } 573 574 Bool_t MCalibrationCam::GetConversionFactorCombined(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma) 575 { 576 577 return kTRUE; 578 579 } -
trunk/MagicSoft/Mars/manalysis/MCalibrationCam.h
r2627 r2642 91 91 Bool_t GetConversionFactorFFactor(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma); 92 92 Bool_t GetConversionFactorBlindPixel(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma); 93 Bool_t GetConversionFactorPINDiode(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma); 94 Bool_t GetConversionFactorCombined(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma); 93 95 94 96 ClassDef(MCalibrationCam, 1) // Storage Container for all calibration information of the camera -
trunk/MagicSoft/Mars/manalysis/MCalibrationPix.cc
r2634 r2642 50 50 fSigmaCharge(-1.), 51 51 fErrSigmaCharge(-1.), 52 fRSigma (-1.),52 fRSigmaSquare(-1.), 53 53 fChargeProb(-1.), 54 54 fPed(-1.), … … 61 61 fConversionFFactorMethod(-1.), 62 62 fHiGainSaturation(kFALSE), 63 f LoGainPedRms(4.)63 fElectronicPedRms(3.67) 64 64 { 65 65 … … 140 140 141 141 if (fHiGainSaturation) 142 fRSigma = (fSigmaCharge*fSigmaCharge) - (fLoGainPedRms*fLoGainPedRms); 142 { 143 144 Float_t logainrms = fElectronicPedRms + (TMath::Sqrt(fPedRms*fPedRms - fElectronicPedRms*fElectronicPedRms)); 145 if (logainrms > 0.) 146 fRSigmaSquare = (fSigmaCharge*fSigmaCharge) - (logainrms*logainrms); 147 else 148 fRSigmaSquare = fSigmaCharge*fSigmaCharge; 149 150 } 143 151 else 144 fRSigma = (fSigmaCharge*fSigmaCharge) - (fPedRms*fPedRms);145 146 if (fRSigma > 0. )152 fRSigmaSquare = (fSigmaCharge*fSigmaCharge) - (fPedRms*fPedRms); 153 154 if (fRSigmaSquare > 0. ) 147 155 { 148 fPheFFactorMethod = fFactor * fCharge*fCharge / fRSigma;149 fConversionFFactorMethod =fPheFFactorMethod / fCharge ;156 fPheFFactorMethod = fFactor * fCharge*fCharge / fRSigmaSquare; 157 fConversionFFactorMethod = fPheFFactorMethod / fCharge ; 150 158 } 151 159 else -
trunk/MagicSoft/Mars/manalysis/MCalibrationPix.h
r2631 r2642 18 18 Float_t fSigmaCharge; // The sigma of the mean charge after the fit 19 19 Float_t fErrSigmaCharge; // The error of the sigma of the mean charge after the fit 20 Float_t fRSigma ;// The reduced squares of sigmas after the fit20 Float_t fRSigmaSquare; // The reduced squares of sigmas after the fit 21 21 Float_t fChargeProb; // The probability of the fit function 22 22 … … 34 34 Bool_t fHiGainSaturation; // Is Lo-Gain used at all? 35 35 36 Float_t f LoGainPedRms;36 Float_t fElectronicPedRms; 37 37 38 38 MHCalibrationPixel *fHist; //! Pointer to the histograms performing the fits, etc. … … 46 46 47 47 Float_t GetCharge() const { return fCharge; } 48 Float_t GetRSigma () const { return fRSigma;}48 Float_t GetRSigmaSquare() const { return fRSigmaSquare; } 49 49 50 50 Float_t GetErrCharge() const { return fErrCharge; } … … 62 62 void SetPedestal(Float_t ped, Float_t pedrms); 63 63 void SetHiGainSaturation() { fHiGainSaturation = kTRUE; fHist->SetUseLoGain(); } 64 65 void SetChargesInGraph(Float_t qhi,Float_t qlo) { fHist->SetPointInGraph(qhi,qlo); } 64 66 65 67 Bool_t FillChargeHiGain(Float_t q) { return fHist->FillChargeHiGain(q); } -
trunk/MagicSoft/Mars/manalysis/MExtractSignal.cc
r2640 r2642 246 246 247 247 248 fSignals->SetNumUsedFADCSlices(fNumHiGainSamples );248 fSignals->SetNumUsedFADCSlices(fNumHiGainSamples,fNumLoGainSamples); 249 249 fSignals->SetReadyToSave(); 250 250 -
trunk/MagicSoft/Mars/manalysis/MExtractedSignalCam.h
r2640 r2642 32 32 Byte_t GetNumUsedHiGainFADCSlices() { return fNumUsedHiGainFADCSlices; } 33 33 Byte_t GetNumUsedLoGainFADCSlices() { return fNumUsedLoGainFADCSlices; } 34 SetNumUsedHiGainFADCSlices(Byte_t numh, Byte_t numl)34 void SetNumUsedHiGainFADCSlices(Byte_t numh, Byte_t numl) 35 35 { 36 36 fNumUsedHiGainFADCSlices = numh; -
trunk/MagicSoft/Mars/mhist/MHCalibrationBlindPixel.h
r2627 r2642 39 39 TF1 *fSinglePheFit; 40 40 TF1 *fTimeGausFit; 41 TF1 *fSinglePhePedFit; 41 42 42 43 Axis_t fBlindPixelChargefirst; … … 55 56 56 57 BlindPixelFitFunc fgSinglePheFitFunc; // In the beginning, 57 Int_t fgSinglePheFitNPar; // we want to be flexible using different functions58 Int_t fgSinglePheFitNPar; // we want to be flexible using different functions 58 59 59 60 Double_t fLambda; … … 78 79 Double_t fSigmaTimeErr; 79 80 81 Double_t fLambdaCheck; 82 Double_t fLambdaCheckErr; 83 80 84 public: 81 85 … … 88 92 Bool_t FillBlindPixelChargevsN(Stat_t rq, Int_t t) { return fHBlindPixelChargevsN->Fill(t,rq) > -1; } 89 93 90 const Double_t GetLambda() const { return fLambda; } 91 const Double_t GetMu0() const { return fMu0; } 92 const Double_t GetMu1() const { return fMu1; } 93 const Double_t GetSigma0() const { return fSigma0; } 94 const Double_t GetSigma1() const { return fSigma1; } 94 const Double_t GetLambda() const { return fLambda; } 95 const Double_t GetLambdaCheck() const { return fLambdaCheck; } 96 const Double_t GetMu0() const { return fMu0; } 97 const Double_t GetMu1() const { return fMu1; } 98 const Double_t GetSigma0() const { return fSigma0; } 99 const Double_t GetSigma1() const { return fSigma1; } 95 100 96 const Double_t GetLambdaErr() const { return fLambdaErr; } 97 const Double_t GetMu0Err() const { return fMu0Err; } 98 const Double_t GetMu1Err() const { return fMu1Err; } 99 const Double_t GetSigma0Err() const { return fSigma0Err; } 100 const Double_t GetSigma1Err() const { return fSigma1Err; } 101 const Double_t GetLambdaErr() const { return fLambdaErr; } 102 const Double_t GetLambdaCheckErr() const { return fLambdaCheckErr; } 103 const Double_t GetMu0Err() const { return fMu0Err; } 104 const Double_t GetMu1Err() const { return fMu1Err; } 105 const Double_t GetSigma0Err() const { return fSigma0Err; } 106 const Double_t GetSigma1Err() const { return fSigma1Err; } 101 107 102 const Double_t GetChiSquare() const { return fChisquare; }103 const Double_t GetProb() const { return fProb; }104 const Int_t GetNdf() const { return fNdf; }108 const Double_t GetChiSquare() const { return fChisquare; } 109 const Double_t GetProb() const { return fProb; } 110 const Int_t GetNdf() const { return fNdf; } 105 111 106 112 const Double_t GetMeanTime() const { return fMeanTime; } … … 118 124 Double_t sigma1); 119 125 120 Bool_t FitSinglePhe(Axis_t rmin=0, Axis_t rmax=0, Option_t *opt="R 0+");126 Bool_t FitSinglePhe(Axis_t rmin=0, Axis_t rmax=0, Option_t *opt="RL0+"); 121 127 Bool_t FitTime(Axis_t rmin=0., Axis_t rmax=0.,Option_t *opt="R0+"); 122 128 … … 126 132 void Draw(Option_t *option=""); 127 133 134 Bool_t IsFitOK() { return fFitOK; } 135 128 136 ClassDef(MHCalibrationBlindPixel, 1) 129 137 }; -
trunk/MagicSoft/Mars/mhist/MHCalibrationPixel.cc
r2629 r2642 40 40 41 41 #include <TFitter.h> 42 #include <TGraph.h> 43 #include <TAxis.h> 42 44 43 45 #include <TF1.h> … … 62 64 MHCalibrationPixel::MHCalibrationPixel(const char *name, const char *title) 63 65 : fPixId(-1), 66 fHiGainvsLoGain(NULL), 67 fTotalEntries(0), 68 fHiGains(NULL), 69 fLoGains(NULL), 64 70 fChargeGausFit(NULL), 65 71 fTimeGausFit(NULL), … … 141 147 fHChargevsNLoGain->SetDirectory(NULL); 142 148 149 fHiGains = new TArrayF(); 150 fLoGains = new TArrayF(); 151 143 152 } 144 153 … … 153 162 delete fHTimeLoGain; 154 163 delete fHChargevsNLoGain; 164 165 if (fHiGainvsLoGain) 166 delete fHiGainvsLoGain; 167 168 delete fHiGains; 169 delete fLoGains; 155 170 156 171 if (fChargeGausFit) … … 232 247 fChargeLastHiGain = 9999.5; 233 248 234 fHCharge LoGain->GetXaxis()->SetRangeUser(0.,fChargeLastLoGain);249 fHChargeHiGain->GetXaxis()->SetRangeUser(0.,fChargeLastHiGain); 235 250 236 251 for (Int_t i = fHChargeLoGain->FindBin(fChargeFirstLoGain); … … 280 295 } 281 296 297 void MHCalibrationPixel::SetPointInGraph(Float_t qhi,Float_t qlo) 298 { 299 300 fHiGains->Set(++fTotalEntries); 301 fLoGains->Set(fTotalEntries); 302 303 fHiGains->AddAt(qhi,fTotalEntries-1); 304 fLoGains->AddAt(qlo,fTotalEntries-1); 305 306 } 307 282 308 283 309 // ------------------------------------------------------------------------- … … 338 364 void MHCalibrationPixel::Draw(Option_t *opt) 339 365 { 366 367 if (!fHiGainvsLoGain) 368 { 369 370 // Create TGraph, we set the points later, get hold of the number of points with fTotalEntries 371 fHiGainvsLoGain = new TGraph(fTotalEntries,fHiGains->GetArray(),fLoGains->GetArray()); 372 fHiGainvsLoGain->SetName("HiGainvsLoGain"); 373 fHiGainvsLoGain->SetTitle("Plot the High Gain vs. Low Gain"); 374 fHiGainvsLoGain->GetXaxis()->Set(300,0.,1500.); 375 fHiGainvsLoGain->GetYaxis()->Set(400,0.,2000.); 376 fHiGainvsLoGain->SetMarkerStyle(7); 377 378 } 340 379 341 380 gStyle->SetOptFit(0); … … 374 413 fChargeGausFit->DrawCopy("same"); 375 414 } 415 c->Modified(); 416 c->Update(); 417 418 c->cd(3); 419 gROOT->SetSelectedPad(NULL); 420 fHiGainvsLoGain->DrawClone("Apq")->SetBit(kCanDelete); 421 gPad->Modified(); 422 gPad->Update(); 376 423 377 424 c->cd(4); … … 393 440 gPad->SetLogy(1); 394 441 gPad->SetTicks(); 442 395 443 fHChargeLoGain->DrawCopy(opt); 444 c->Modified(); 445 c->Update(); 446 396 447 c->cd(3); 397 448 DrawLegend(); 449 450 c->cd(4); 451 452 gROOT->SetSelectedPad(NULL); 453 fHiGainvsLoGain->DrawClone("Apq")->SetBit(kCanDelete); 454 gPad->Modified(); 455 gPad->Update(); 456 457 398 458 } 399 459 … … 426 486 427 487 fTimeGausFit->DrawCopy("same"); 488 c->Modified(); 489 c->Update(); 428 490 } 429 491 } … … 445 507 gPad->SetLogy(1); 446 508 fHTimeLoGain->DrawCopy(opt); 509 c->Modified(); 510 c->Update(); 511 447 512 } 448 513 c->Modified(); … … 459 524 c->Update(); 460 525 526 461 527 } 462 528 … … 616 682 fHChargeHiGain->Fit(fChargeGausFit,option); 617 683 618 Axis_t rtry = fChargeGausFit->GetParameter(1) - 2. 5*fChargeGausFit->GetParameter(2);684 Axis_t rtry = fChargeGausFit->GetParameter(1) - 2.0*fChargeGausFit->GetParameter(2); 619 685 620 686 rmin = (rtry < rmin ? rmin : rtry); 621 rmax = fChargeGausFit->GetParameter(1) + 2.5*fChargeGausFit->GetParameter(2);687 rmax = fChargeGausFit->GetParameter(1) + 3.5*fChargeGausFit->GetParameter(2); 622 688 fChargeGausFit->SetRange(rmin,rmax); 623 689 624 690 fHChargeHiGain->Fit(fChargeGausFit,option); 625 626 // rmin = fChargeGausFit->GetParameter(1) - 2.5*fChargeGausFit->GetParameter(2);627 // rmax = fChargeGausFit->GetParameter(1) + 2.5*fChargeGausFit->GetParameter(2);628 // fChargeGausFit->SetRange(rmin,rmax);629 630 // fHChargeHiGain->Fit(fChargeGausFit,option);631 691 632 692 fChargeChisquare = fChargeGausFit->GetChisquare(); … … 697 757 fHChargeLoGain->Fit(fChargeGausFit,option); 698 758 699 Axis_t rtry = fChargeGausFit->GetParameter(1) - 2. 5*fChargeGausFit->GetParameter(2);759 Axis_t rtry = fChargeGausFit->GetParameter(1) - 2.*fChargeGausFit->GetParameter(2); 700 760 701 761 rmin = (rtry < rmin ? rmin : rtry); 702 rmax = fChargeGausFit->GetParameter(1) + 2.5*fChargeGausFit->GetParameter(2);762 rmax = fChargeGausFit->GetParameter(1) + 3.5*fChargeGausFit->GetParameter(2); 703 763 fChargeGausFit->SetRange(rmin,rmax); 704 764 -
trunk/MagicSoft/Mars/mhist/MHCalibrationPixel.h
r2629 r2642 18 18 #endif 19 19 20 #ifndef ROOT_TGraph 21 #include "TGraph.h" 22 #endif 23 24 #ifndef ROOT_TArrayF 25 #include "TArrayF.h" 26 #endif 27 20 28 class TPaveText; 21 29 class TMath; … … 27 35 private: 28 36 29 Int_t fPixId; //-> Pixel Nr 30 37 Int_t fPixId; // Pixel Nr 38 TGraph *fHiGainvsLoGain; // Plot the HiGain vs. the LoGain 39 Int_t fTotalEntries; // Number of entries 40 41 TArrayF *fHiGains; 42 TArrayF *fLoGains; 43 31 44 protected: 32 45 33 TH1F* fHChargeHiGain; //-> Summed FADC slices34 TH1I* fHTimeHiGain; //->Mean arrival time in number of FADC sice35 TH1I* fHChargevsNHiGain; //->Summed Charge vs. Event Nr.46 TH1F* fHChargeHiGain; // Summed FADC slices High Gain 47 TH1I* fHTimeHiGain; // Mean arrival time in number of FADC sice 48 TH1I* fHChargevsNHiGain; // Summed Charge vs. Event Nr. 36 49 37 TH1F* fHChargeLoGain; //-> Summed FADC slices38 TH1I* fHTimeLoGain; //->Mean arrival time in number of FADC sice39 TH1I* fHChargevsNLoGain; //->Summed Charge vs. Event Nr.40 50 TH1F* fHChargeLoGain; // Summed FADC slices Low Gain 51 TH1I* fHTimeLoGain; // Mean arrival time in number of FADC sice 52 TH1I* fHChargevsNLoGain; // Summed Charge vs. Event Nr. 53 41 54 TF1* fChargeGausFit; 42 55 TF1* fTimeGausFit; … … 85 98 Bool_t Fill(const MParContainer *, const Stat_t w=1) { return kTRUE; } 86 99 87 Bool_t FillChargeLoGain(Float_t q) { return fHChargeLoGain->Fill(q) > -1; } 88 Bool_t FillTimeLoGain(Int_t t) { return fHTimeLoGain->Fill(t) > -1; } 89 Bool_t FillChargevsNLoGain(Float_t q, Int_t n) { return fHChargevsNLoGain->Fill(n,q) > -1; } 100 void SetPointInGraph(Float_t qhi, Float_t qlo); 90 101 91 Bool_t FillChargeHiGain(Float_t q) { return fHChargeHiGain->Fill(q) > -1; } 92 Bool_t FillTimeHiGain(Int_t t) { return fHTimeHiGain->Fill(t) > -1; } 93 Bool_t FillChargevsNHiGain(Float_t q, Int_t n) { return fHChargevsNHiGain->Fill(n,q) > -1; } 102 Bool_t FillChargeLoGain(Float_t q) { return (fHChargeLoGain->Fill(q) > -1); } 103 Bool_t FillTimeLoGain(Int_t t) { return (fHTimeLoGain->Fill(t) > -1); } 104 Bool_t FillChargevsNLoGain(Float_t q, Int_t n) { return (fHChargevsNLoGain->Fill(n,q) > -1); } 105 106 Bool_t FillChargeHiGain(Float_t q) { return (fHChargeHiGain->Fill(q) > -1); } 107 Bool_t FillTimeHiGain(Int_t t) { return (fHTimeHiGain->Fill(t) > -1); } 108 Bool_t FillChargevsNHiGain(Float_t q, Int_t n) { return (fHChargevsNHiGain->Fill(n,q) > -1); } 94 109 95 110 void SetUseLoGain() { fUseLoGain = kTRUE; } -
trunk/MagicSoft/Mars/mhist/MHCamera.h
r2627 r2642 125 125 virtual void SetCamContent(const MHCamera &d, Int_t type=0) { Reset(); AddCamContent(d, type); fEntries=d.fEntries; } 126 126 127 virtual void SetCamError(const MCamEvent &ev ent, Int_t type=0);127 virtual void SetCamError(const MCamEvent &evt, Int_t type=0); 128 128 129 129 virtual void CntCamContent(const MCamEvent &evt, Double_t threshold, Int_t type=0);
Note:
See TracChangeset
for help on using the changeset viewer.