Changeset 3170 for trunk/MagicSoft/Mars/mcalib
- Timestamp:
- 02/15/04 23:01:04 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mcalib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MHGausEvents.cc
r3167 r3170 151 151 if (fGraphPowerSpectrum) 152 152 delete fGraphPowerSpectrum; 153 154 153 } 155 154 … … 201 200 202 201 203 Bool_t MHGausEvents::FillHistAndArray( Float_t f)202 Bool_t MHGausEvents::FillHistAndArray(const Float_t f) 204 203 { 205 204 … … 208 207 } 209 208 210 Bool_t MHGausEvents::FillHist( Float_t f)209 Bool_t MHGausEvents::FillHist(const Float_t f) 211 210 { 212 211 … … 217 216 } 218 217 219 void MHGausEvents::FillArray( Float_t f)218 void MHGausEvents::FillArray(const Float_t f) 220 219 { 221 220 if (fEvents.GetSize() == 0) … … 251 250 } 252 251 252 253 253 const Double_t MHGausEvents::GetExpProb() const 254 254 { … … 256 256 } 257 257 258 258 259 const Double_t MHGausEvents::GetOffset() const 259 260 { … … 261 262 } 262 263 264 263 265 const Double_t MHGausEvents::GetSlope() const 264 266 { … … 266 268 } 267 269 270 268 271 const Bool_t MHGausEvents::IsEmpty() const 269 272 { … … 271 274 } 272 275 276 273 277 const Bool_t MHGausEvents::IsFourierSpectrumOK() const 274 278 { … … 276 280 } 277 281 282 278 283 const Bool_t MHGausEvents::IsGausFitOK() const 279 284 { … … 281 286 } 282 287 288 283 289 const Bool_t MHGausEvents::IsExpFitOK() const 284 290 { 285 291 return TESTBIT(fFlags,kExpFitOK); 286 292 } 293 287 294 288 295 // ------------------------------------------------------------------- -
trunk/MagicSoft/Mars/mcalib/MHGausEvents.h
r3154 r3170 61 61 62 62 // Setters 63 void SetPowerProbabilityBins(const Int_t nbins=fgPowerProbabilityBins) 64 void SetBinsAfterStripping(const Int_t nbins=fgBinsAfterStripping) 63 void SetPowerProbabilityBins(const Int_t nbins=fgPowerProbabilityBins) { fPowerProbabilityBins = nbins; } 64 void SetBinsAfterStripping(const Int_t nbins=fgBinsAfterStripping) { fBinsAfterStripping = nbins; } 65 65 66 void DrawEvents(); // Draw a graph of the array fEvents66 void DrawEvents(); // Draw a graph of the array fEvents 67 67 void DrawPowerSpectrum(TVirtualPad &pad, Int_t i); // Draw a graph of the array fPowerSpectrum and the hist fHPowerProbability 68 68 … … 76 76 77 77 // Setters 78 void SetEventFrequency(const Float_t f=0) { fEventFrequency = f; } 79 void SetMean(const Double_t d) { fMean = d; } 80 void SetMeanErr(const Double_t d) { fMeanErr = d; } 81 void SetSigma(const Double_t d) { fSigma = d; } 82 void SetSigmaErr(const Double_t d) { fSigmaErr = d; } 78 void SetEventFrequency(const Float_t f=0) { fEventFrequency = f; } 79 80 void SetMean( const Double_t d ) { fMean = d; } 81 void SetMeanErr( const Double_t d ) { fMeanErr = d; } 82 void SetSigma( const Double_t d ) { fSigma = d; } 83 void SetSigmaErr( const Double_t d ) { fSigmaErr = d; } 83 84 84 void SetProbLimit( const Float_t lim=fgProbLimit) { fProbLimit = lim;}85 void SetNDFLimit( const Int_t lim=fgNDFLimit) { fNDFLimit = lim;}85 void SetProbLimit( const Float_t lim=fgProbLimit ) { fProbLimit = lim; } 86 void SetNDFLimit( const Int_t lim=fgNDFLimit ) { fNDFLimit = lim; } 86 87 87 88 // Setters ONLY for MC: 88 void SetGausFitOK( const Bool_t b);89 void SetExpFitOK( const Bool_t b);90 void SetFourierSpectrumOK( const Bool_t b);89 void SetGausFitOK( const Bool_t b ); 90 void SetExpFitOK( const Bool_t b ); 91 void SetFourierSpectrumOK( const Bool_t b ); 91 92 92 93 // Getters 93 const Double_t GetMean() const { return fMean;}94 const Double_t GetMeanErr() const { return fMeanErr;}95 const Double_t GetSigma() const { return fSigma;}96 const Double_t GetSigmaErr() 97 const Double_t GetChiSquare() 98 const Double_t GetProb() const { return fProb;}99 const Int_t GetNdf() 94 const Double_t GetMean() const { return fMean; } 95 const Double_t GetMeanErr() const { return fMeanErr; } 96 const Double_t GetSigma() const { return fSigma; } 97 const Double_t GetSigmaErr() const { return fSigmaErr; } 98 const Double_t GetChiSquare() const; 99 const Double_t GetProb() const { return fProb; } 100 const Int_t GetNdf() const; 100 101 101 const Double_t GetSlope() const;102 const Double_t GetOffset() const;102 const Double_t GetSlope() const; 103 const Double_t GetOffset() const; 103 104 const Double_t GetExpChiSquare() const; 104 const Double_t GetExpProb() const;105 const Int_t GetExpNdf() const;105 const Double_t GetExpProb() const; 106 const Int_t GetExpNdf() const; 106 107 107 TH1F *GetHGausHist() { return &fHGausHist;}108 const TH1F *GetHGausHist() const { return &fHGausHist;}108 TH1F *GetHGausHist() { return &fHGausHist; } 109 const TH1F *GetHGausHist() const { return &fHGausHist; } 109 110 110 TArrayF *GetEvents() { return &fEvents;}111 const TArrayF *GetEvents() const { return &fEvents;}111 TArrayF *GetEvents() { return &fEvents; } 112 const TArrayF *GetEvents() const { return &fEvents; } 112 113 113 TArrayF *GetPowerSpectrum() { return fPowerSpectrum;}114 const TArrayF *GetPowerSpectrum() const { return fPowerSpectrum;}114 TArrayF *GetPowerSpectrum() { return fPowerSpectrum; } 115 const TArrayF *GetPowerSpectrum() const { return fPowerSpectrum; } 115 116 116 TF1 *GetFGausFit() { return fFGausFit;}117 const TF1 *GetFGausFit() const { return fFGausFit;}117 TF1 *GetFGausFit() { return fFGausFit; } 118 const TF1 *GetFGausFit() const { return fFGausFit; } 118 119 119 TH1I *GetHPowerProbability() { return fHPowerProbability;}120 const TH1I *GetHPowerProbability() const { return fHPowerProbability;}120 TH1I *GetHPowerProbability() { return fHPowerProbability; } 121 const TH1I *GetHPowerProbability() const { return fHPowerProbability; } 121 122 122 TF1 *GetFExpFit() { return fFExpFit;}123 const TF1 *GetFExpFit() const { return fFExpFit;}123 TF1 *GetFExpFit() { return fFExpFit; } 124 const TF1 *GetFExpFit() const { return fFExpFit; } 124 125 125 TGraph *GetGraphEvents() { return fGraphEvents;}126 const TGraph *GetGraphEvents() const { return fGraphEvents;}126 TGraph *GetGraphEvents() { return fGraphEvents; } 127 const TGraph *GetGraphEvents() const { return fGraphEvents; } 127 128 128 TGraph *GetGraphPowerSpectrum() { return fGraphPowerSpectrum; }129 const TGraph *GetGraphPowerSpectrum() const 129 TGraph *GetGraphPowerSpectrum() { return fGraphPowerSpectrum; } 130 const TGraph *GetGraphPowerSpectrum() const { return fGraphPowerSpectrum; } 130 131 131 132 const Bool_t IsGausFitOK() const; 132 133 const Bool_t IsExpFitOK() const; 133 134 const Bool_t IsEmpty() const; 134 const Bool_t IsFourierSpectrumOK() 135 const Bool_t IsFourierSpectrumOK() const; 135 136 136 137 // Fill 137 void FillArray( Float_t f);// Fill only the array fEvents138 Bool_t FillHist( Float_t f);// Fill only the histogram HGausHist139 Bool_t FillHistAndArray( Float_t f);// Fill bothe the array fEvents and the histogram HGausHist138 void FillArray(const Float_t f); // Fill only the array fEvents 139 Bool_t FillHist(const Float_t f); // Fill only the histogram HGausHist 140 Bool_t FillHistAndArray(const Float_t f); // Fill bothe the array fEvents and the histogram HGausHist 140 141 141 142 // Fits 142 Bool_t FitGaus(Option_t *option="RQ0"); // Fit the histogram HGausHist with a Gaussian143 Bool_t FitGaus(Option_t *option="RQ0"); // Fit the histogram HGausHist with a Gaussian 143 144 144 145 // Draws … … 149 150 150 151 // Miscelleaneous 151 void CreateFourierSpectrum(); 152 void CreateGraphEvents(); 153 void CreateGraphPowerSpectrum(); 152 void CreateFourierSpectrum(); // Create the fourier spectrum out of fEvents 153 void CreateGraphEvents(); // Create the TGraph fGraphEvents of fEvents 154 void CreateGraphPowerSpectrum(); // Create the TGraph fGraphPowerSpectrum out of fPowerSpectrum 154 155 155 ClassDef(MHGausEvents, 1) // Histograms for events with Gaussian distributed values156 ClassDef(MHGausEvents, 1) // Base class for events with Gaussian distributed values 156 157 }; 157 158
Note:
See TracChangeset
for help on using the changeset viewer.