Changeset 1295
- Timestamp:
- 04/24/02 14:10:54 (23 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r1288 r1295 275 275 - changed pointers in Calc functions to references 276 276 277 278 279 2002/04/24: Wolfgang Wittek 280 281 * Work was done on the calculation of photon fluxes as a function of 282 Theta and as a function of time. The work is still in progress. 283 284 * macros/wowflux.C 285 - the macr was added (extended and improved version of flux.C) 286 - the macro steers the calculation of photon fluxes as a function 287 of Theta and time 288 - the macro is not yet complete; testing and developing is going on 289 290 * mhist/MHAlphaEnergyTheta 291 MHAlphaEnergyTime 292 MHEffOnTimeTheta 293 MHEffOnTimeTime 294 MHTimeDiffTheta 295 MHTimeDiffTime 296 297 - documentation was added 298 - histogram axes were labeled 299 - in addition : 300 in MHEffOnTimeTheta 301 - range in which the fit of the distribution of time differences 302 is to be performed has been calculated 303 - new histograms were added (chi2/NDF, lambda, N0del) 304 305 306 * mhist/MHThetabarTheta calculation of <Theta> as a function of 307 Theta 308 MHThetabarTime calculation of <Theta> as a function of 309 time 310 311 - these classes were added; 312 they are needed in the flux calculation in 313 order to select for a given bin in Theta (or time) the appropriate 314 effective collection area, which is assumed to be given as a function 315 of Theta and the true energy 316 317 318 * mhist/MHMcEnergyMigration calculation of the migration matrix in 319 the energy 320 - this class was added; 321 the migration matrix describes the migration from the true (E_true) 322 to the estimated energy (E_est); it is needed to determine the 323 distribution of E_true from the measured distribution of E_est 324 by unfolding 277 325 278 326 … … 713 761 - fix bug of Pedestal and Pedestal fluctuaions correspondence. 714 762 715 <<<<<<< Changelog716 717 =======718 >>>>>>> 1.148719 763 720 764 2001/12/18: Thomas Bretz -
trunk/MagicSoft/Mars/mhist/MHEffOnTimeTime.cc
r1265 r1295 28 28 // MHEffOnTimeTime // 29 29 // // 30 // calculates the effective on time for each bin in time // 30 31 // // 31 32 ////////////////////////////////////////////////////////////////////////////// 32 33 33 34 #include "MHEffOnTimeTime.h" 35 36 #include <TStyle.h> 34 37 35 38 #include <TF1.h> … … 50 53 // -------------------------------------------------------------------------- 51 54 // 52 // Default Constructor. It sets name and title only. Typically you won't 53 // need to change this. 55 // Default Constructor. It sets name and title of the histograms. 54 56 // 55 57 MHEffOnTimeTime::MHEffOnTimeTime(const char *name, const char *title) 56 : fH ist()58 : fHEffOn() 57 59 { 58 60 // … … 62 64 fTitle = title ? title : "1-D histogram of Eff On Time"; 63 65 64 fHist.SetName("EffOn"); 65 fHist.SetTitle("Effective On Time Vs. Time"); 66 67 68 fHist.SetDirectory(NULL); 69 70 fHist.SetXTitle("t_{eff} [s]"); 71 fHist.SetYTitle("t [s]"); 72 } 73 74 TObject *MHEffOnTimeTime::DrawClone(Option_t *opt) const 75 { 76 TCanvas *c = MakeDefCanvas("EffOnTimeTime", "t_eff vs. t"); 77 78 gROOT->SetSelectedPad(NULL); 79 80 ((TH2&)fHist).DrawCopy(opt); 81 82 c->Modified(); 83 c->Update(); 84 85 return c; 86 } 87 88 void MHEffOnTimeTime::Draw(Option_t *opt) 89 { 90 if (!gPad) 91 MakeDefCanvas("EffOnTimeTime", "t_eff vs. t"); 92 93 fHist.Draw(opt); 94 95 gPad->Modified(); 96 gPad->Update(); 97 } 98 99 66 // effective on time versus time 67 fHEffOn.SetName("EffOn"); 68 fHEffOn.SetTitle("Effective On Time vs. Time"); 69 70 fHEffOn.SetDirectory(NULL); 71 72 fHEffOn.SetXTitle("time [s]"); 73 fHEffOn.SetYTitle("t-eff [s]"); 74 75 // chi2/NDF versus time 76 fHChi2.SetName("Chi2/NDF"); 77 fHChi2.SetTitle("Chi2/NDF of OnTimeFit vs. Time"); 78 79 fHChi2.SetDirectory(NULL); 80 81 fHChi2.SetXTitle("time [s]"); 82 fHChi2.SetYTitle("chi2/NDF"); 83 84 // lambda versus time 85 fHLambda.SetName("lambda"); 86 fHLambda.SetTitle("lambda of OnTimeFit vs. Time"); 87 88 fHLambda.SetDirectory(NULL); 89 90 fHLambda.SetXTitle("time [s]"); 91 fHLambda.SetYTitle("\\lambda [Hz]"); 92 93 // N0del versus time 94 fHN0del.SetName("N0del"); 95 fHN0del.SetTitle("N0del of OnTimeFit vs. Time"); 96 97 fHN0del.SetDirectory(NULL); 98 99 fHN0del.SetXTitle("time [s]"); 100 fHN0del.SetYTitle("N0del"); 101 } 102 103 // ----------------------------------------------------------------------- 104 // 105 // Calculate the effective on time by fitting the distribution of 106 // time differences 107 // 100 108 void MHEffOnTimeTime::Calc(TH2D *hist) 101 109 { 110 // nbins = number of time bins 102 111 const Int_t nbins = hist->GetNbinsY(); 103 112 104 for (int i=1; i< nbins; i++)113 for (int i=1; i<=nbins; i++) 105 114 { 106 //char txt[100]; 107 //sprintf(txt, "Name%d", 100*i); 108 //new TCanvas(txt, "Title"); 109 110 TH1D &h = *hist->ProjectionX("dTime-Distribution for fixed Theta", i, i); 111 112 //hist->Draw(); 113 //gPad->SetLogy(); 114 115 Double_t Nmdel = h.Integral("width"); 116 Double_t mean = h.GetMean(); 117 118 TF1 func("Poisson", "[1] * [0] * exp(-[0] *x)", 119 mean, hist->GetXaxis()->GetXmax()); 120 121 func.SetParameter(0, 100); // [Hz] 122 func.SetParameter(1, Nmdel); 123 124 func.SetParLimits(0, 0, 1000); // [Hz] 125 func.SetParLimits(1, 0, 2*Nmdel); 126 127 func.SetParName(0, "lambda"); 128 func.SetParName(1, "Nmdel"); 129 130 h.Fit("Poisson", "RN"); 131 132 //func.SetRange(0, 0.1); // Range of Drawing 133 //func.DrawCopy("same"); 134 135 //cout << func.GetParameter(0) << " " << func.GetParameter(1) << endl; 136 137 Double_t lambda = func.GetParameter(0); 138 //Double_t a = func.GetParameter(1); 139 140 //cout << "t_eff = " << h->Integral()/lambda << " T(last)=" << time.GetTimeLo()*0.0001 << endl; 141 142 fHist.SetBinContent(i, h.Integral()/lambda); 115 116 // TH1D &h = *hist->ProjectionX("Calc-time", i, i, "E"); 117 TH1D &h = *hist->ProjectionX("Calc-time", i, i, "E"); 118 119 120 // Nmdel = Nm * binwidth, with Nm = number of observed events 121 const Double_t Nmdel = h.Integral("width"); 122 const Double_t Nm = h.Integral(); 123 // Double_t mean = h->GetMean(); 124 125 //................................................... 126 // determine range (yq[0], yq[1]) of time differences 127 // where fit should be performed; 128 // require a fraction >=xq[0] of all entries to lie below yq[0] 129 // and a fraction <=xq[1] of all entries to lie below yq[1]; 130 // within the range (yq[0], yq[1]) there must be no empty bin; 131 // choose pedestrian approach as long as GetQuantiles is not available 132 133 Double_t xq[2] = { 0.15, 0.95 }; 134 Double_t yq[2]; 135 136 // GetQuantiles doesn't seem to be available in root 3.01/06 137 // h->GetQuantiles(2,yq,xq); 138 139 const Double_t sumtot = h.Integral(); 140 const Int_t jbins = h.GetNbinsX(); 141 142 if (sumtot > 0.0) 143 { 144 // char txt[100]; 145 // sprintf(txt, "time_bin:%d", i); 146 // new TCanvas(txt, txt); 147 148 Double_t sum1 = 0.0; 149 yq[0] = h.GetBinLowEdge(jbins+1); 150 for (int j=1; j<=jbins; j++) 151 { 152 if (sum1 >= xq[0]*sumtot) 153 { 154 yq[0] = h.GetBinLowEdge(j); 155 break; 156 } 157 sum1 += h.GetBinContent(j); 158 } 159 160 Double_t sum2 = 0.0; 161 yq[1] = h.GetBinLowEdge(jbins+1); 162 for (int j=1; j<=jbins; j++) 163 { 164 const Double_t content = h.GetBinContent(j); 165 sum2 += content; 166 if (sum2 >= xq[1]*sumtot || content == 0.0) 167 { 168 yq[1] = h.GetBinLowEdge(j); 169 break; 170 } 171 } 172 173 //................................................... 174 175 // parameter 0 = lambda 176 // parameter 1 = N0*del with N0 = ideal number of events 177 // and del = bin width of time difference 178 TF1 func("Poisson", "[1] * [0] * exp(-[0] *x)", yq[0], yq[1]); 179 180 func.SetParameter(0, 100); // [Hz] 181 func.SetParameter(1, Nmdel); 182 183 func.SetParLimits(0, 0, 1000); // [Hz] 184 func.SetParLimits(1, 0, 10*Nmdel); 185 186 func.SetParName(0, "lambda"); 187 func.SetParName(1, "Nmdel"); 188 189 // options : 0 (=zero) do not plot the function 190 // I use integral of function in bin rather than value at bin center 191 // R use the range specified in the function range 192 // Q quiet mode 193 h.Fit("Poisson", "0IRQ"); 194 195 // gPad->SetLogy(); 196 // gStyle->SetOptFit(1011); 197 // h->GetXaxis()->SetTitle("time difference [s]"); 198 // h->GetYaxis()->SetTitle("Counts"); 199 // h->DrawCopy(); 200 201 // func.SetRange(yq[0], yq[1]); // Range of Drawing 202 // func.DrawCopy("same"); 203 204 const Double_t lambda = func.GetParameter(0); 205 const Double_t N0del = func.GetParameter(1); 206 const Double_t chi2 = func.GetChisquare(); 207 const Int_t NDF = func.GetNDF(); 208 209 // was fit successful ? 210 if (NDF>0 && chi2<2.5*NDF) 211 { 212 // the effective on time is Nm/lambda 213 fHEffOn.SetBinContent(i, Nm/lambda); 214 215 // plot chi2/NDF of fit 216 fHChi2.SetBinContent(i, NDF ? chi2/NDF : 0.0); 217 218 // lambda of fit 219 fHLambda.SetBinContent(i, lambda); 220 221 // N0del of fit 222 fHN0del.SetBinContent(i, N0del); 223 224 delete &h; 225 continue; 226 } 227 } 228 229 fHEffOn.SetBinContent (i, 1.e-20); 230 fHChi2.SetBinContent (i, 1.e-20); 231 fHLambda.SetBinContent(i, 1.e-20); 232 fHN0del.SetBinContent (i, 1.e-20); 143 233 144 234 delete &h; … … 146 236 } 147 237 238 // ------------------------------------------------------------------------- 239 // 240 // Set the binnings and prepare the filling of the histograms 241 // 148 242 Bool_t MHEffOnTimeTime::SetupFill(const MParList *plist) 149 243 { … … 155 249 } 156 250 157 SetBinning(&fHist, binstime); 251 SetBinning(&fHEffOn, binstime); 252 SetBinning(&fHChi2, binstime); 253 SetBinning(&fHLambda, binstime); 254 SetBinning(&fHN0del, binstime); 255 256 fHEffOn.Sumw2(); 257 fHChi2.Sumw2(); 258 fHLambda.Sumw2(); 259 fHN0del.Sumw2(); 158 260 159 261 return kTRUE; 160 262 } 161 263 264 // ------------------------------------------------------------------------- 265 // 266 // Dummy Fill 267 // without it get error message : 268 // Error: MHEffOnTimeTime() no default constructor FILE:macros/wowflux.C LINE:359 269 //*** Interpreter error recovered *** 162 270 Bool_t MHEffOnTimeTime::Fill(const MParContainer *par) 163 271 { 164 return kTRUE; 165 } 166 272 return kTRUE; 273 } 274 275 // ------------------------------------------------------------------------- 276 // 277 // Draw a copy of the histogram 278 // 279 TObject *MHEffOnTimeTime::DrawClone(Option_t *opt) const 280 { 281 TCanvas &c = *MakeDefCanvas("EffOnTimeTime", "Results from on time fit vs. time"); 282 c.Divide(2, 2); 283 284 gROOT->SetSelectedPad(NULL); 285 286 c.cd(1); 287 ((TH2*)&fHEffOn)->DrawCopy(opt); 288 289 c.cd(2); 290 ((TH2*)&fHChi2)->DrawCopy(opt); 291 292 c.cd(3); 293 ((TH2*)&fHLambda)->DrawCopy(opt); 294 295 c.cd(4); 296 ((TH2*)&fHN0del)->DrawCopy(opt); 297 298 c.Modified(); 299 c.Update(); 300 301 return &c; 302 } 303 304 // ------------------------------------------------------------------------- 305 // 306 // Draw the histogram 307 // 308 void MHEffOnTimeTime::Draw(Option_t *opt) 309 { 310 if (!gPad) 311 MakeDefCanvas("EffOnTimeTime", "Results from on time fit vs. time"); 312 313 gPad->Divide(2,2); 314 315 gPad->cd(1); 316 fHEffOn.Draw(opt); 317 318 gPad->cd(2); 319 fHChi2.Draw(opt); 320 321 gPad->cd(3); 322 fHLambda.Draw(opt); 323 324 gPad->cd(4); 325 fHN0del.Draw(opt); 326 327 gPad->Modified(); 328 gPad->Update(); 329 } 330 331 332 333 334 -
trunk/MagicSoft/Mars/mhist/MHTimeDiffTheta.cc
r1263 r1295 28 28 // MHTimeDiffTheta // 29 29 // // 30 // calculates the 2D-histogram time-difference vs. Theta // 30 31 // // 31 32 ////////////////////////////////////////////////////////////////////////////// … … 49 50 // -------------------------------------------------------------------------- 50 51 // 51 // Default Constructor. It sets name and title only. Typically you won't 52 // need to change this. 52 // Default Constructor. It sets name and title of the histogram. 53 53 // 54 54 MHTimeDiffTheta::MHTimeDiffTheta(const char *name, const char *title) … … 59 59 // 60 60 fName = name ? name : "MHTimeDiffTheta"; 61 fTitle = title ? title : "2-D histogram in timeand time difference";61 fTitle = title ? title : "2-D histogram in Theta and time difference"; 62 62 63 63 fHist.SetDirectory(NULL); 64 64 65 fHist.GetXaxis()->SetTitle("\\Delta t [s]"); 66 fHist.GetYaxis()->SetTitle("\\Theta [\\circ]"); 67 } 68 65 fHist.SetXTitle("\\Delta t [s]"); 66 fHist.SetYTitle("\\Theta [\\circ]"); 67 } 68 69 // -------------------------------------------------------------------------- 70 // 71 // Set the binnings and prepare the filling of the histogram 72 // 69 73 Bool_t MHTimeDiffTheta::SetupFill(const MParList *plist) 70 74 { … … 96 100 } 97 101 102 // -------------------------------------------------------------------------- 103 // 104 // Draw a copy of the histogram 105 // 98 106 TObject *MHTimeDiffTheta::DrawClone(Option_t *opt) const 99 107 { 100 TCanvas *c = MakeDefCanvas("DiffTimeTheta", "Distrib of Delta t, Theta"); 101 c->Divide(2, 2); 108 TCanvas &c = *MakeDefCanvas("DiffTimeTheta", "Distrib of \\Delta t, Theta"); 109 110 c.Divide(2, 2); 102 111 103 112 gROOT->SetSelectedPad(NULL); … … 106 115 // FIXME: ProjectionX,Y is not const within root 107 116 // 117 108 118 TH1D *h; 109 119 110 c->cd(1); 111 h = ((TH2*)&fHist)->ProjectionX("ProX", -1, 9999, "E"); 112 h->DrawCopy(opt); 113 delete h; 120 c.cd(1); 121 h = ((TH2*)&fHist)->ProjectionX("ProjX-Theta", -1, 9999, "E"); 122 123 h->SetTitle("Distribution of \\Delta t [s]"); 124 h->SetXTitle("\\Delta t [s]"); 125 h->SetYTitle("Counts"); 126 127 h->Draw(opt); 128 h->SetBit(kCanDelete);; 114 129 gPad->SetLogy(); 115 130 116 c->cd(2); 117 h = ((TH2*)&fHist)->ProjectionY("ProY", -1, 9999, "E"); 118 h->DrawCopy(opt); 119 delete h; 120 121 c->cd(3); 131 c.cd(2); 132 h = ((TH2*)&fHist)->ProjectionY("ProjY-timediff", -1, 9999, "E"); 133 134 h->SetTitle("Distribution of \\Theta [\\circ]"); 135 h->SetXTitle("\\Theta [\\circ]"); 136 h->SetYTitle("Counts"); 137 138 h->Draw(opt); 139 h->SetBit(kCanDelete);; 140 141 c.cd(3); 122 142 ((TH2*)&fHist)->DrawCopy(opt); 123 143 124 c->Modified(); 125 c->Update(); 126 127 return c; 128 } 129 144 c.Modified(); 145 c.Update(); 146 147 return &c; 148 } 149 150 // -------------------------------------------------------------------------- 151 // 152 // Draw the histogram 153 // 130 154 void MHTimeDiffTheta::Draw(Option_t *opt) 131 155 { … … 138 162 139 163 gPad->cd(1); 140 h = fHist.ProjectionX("ProX", -1, 9999, "E"); 141 h->DrawCopy(opt); 142 delete h; 164 h = fHist.ProjectionX("ProjX_Theta", -1, 9999, "E"); 165 166 h->SetTitle("Distribution of \\Delta t [s]"); 167 h->SetXTitle("\\Delta t [s]"); 168 h->SetYTitle("Counts"); 169 170 h->Draw(opt); 171 h->SetBit(kCanDelete);; 143 172 gPad->SetLogy(); 144 173 145 174 gPad->cd(2); 146 h = fHist.ProjectionY("ProY", -1, 9999, "E"); 147 h->DrawCopy(opt); 148 delete h; 175 h = fHist.ProjectionY("ProjY_timediff", -1, 9999, "E"); 176 177 h->SetTitle("Distribution of \\Theta [\\circ]"); 178 h->SetXTitle("\\Theta [\\circ]"); 179 h->SetYTitle("Counts"); 180 181 h->Draw(opt); 182 h->SetBit(kCanDelete);; 149 183 150 184 gPad->cd(3); 151 fHist.Draw (opt);185 fHist.DrawCopy(opt); 152 186 153 187 gPad->Modified(); 154 188 gPad->Update(); 155 } 156 189 190 } 191 192 // -------------------------------------------------------------------------- 193 // 194 // Fill the histogram 195 // 157 196 Bool_t MHTimeDiffTheta::Fill(const MParContainer *par) 158 197 { -
trunk/MagicSoft/Mars/mhist/MHTimeDiffTheta.h
r1211 r1295 35 35 TObject *DrawClone(Option_t *option="") const; 36 36 37 ClassDef(MHTimeDiffTheta, 1) // Histogram to store a 3-Dim histogram in alpha, Energy and time37 ClassDef(MHTimeDiffTheta, 1) //2D-histogram time-diff vs. Theta 38 38 }; 39 39 -
trunk/MagicSoft/Mars/mhist/MHTimeDiffTime.cc
r1265 r1295 28 28 // MHTimeDiffTime // 29 29 // // 30 // calculates the 2D-histogram time-difference vs. time // 31 // // 30 32 // // 31 33 ////////////////////////////////////////////////////////////////////////////// … … 48 50 // -------------------------------------------------------------------------- 49 51 // 50 // Default Constructor. It sets name and title only. Typically you won't 51 // need to change this. 52 // Default Constructor. It sets name and title of the histogram 52 53 // 53 54 MHTimeDiffTime::MHTimeDiffTime(const char *name, const char *title) … … 62 63 fHist.SetDirectory(NULL); 63 64 64 fHist. GetXaxis()->SetTitle("\\Delta t [s]");65 fHist. GetYaxis()->SetTitle("t [s]");65 fHist.SetXTitle("\\Delta t [s]"); 66 fHist.SetYTitle("t [s]"); 66 67 } 67 68 69 // -------------------------------------------------------------------------- 70 // 71 // Set the binnings and prepare the filling of the histogram 72 // 68 73 Bool_t MHTimeDiffTime::SetupFill(const MParList *plist) 69 74 { 70 fTime = (MTime*)plist->FindObject("MTime");71 if (!fTime)72 {73 *fLog << err << dbginf << "MTime not found... aborting." << endl;74 return kFALSE;75 }75 fTime = (MTime*)plist->FindObject("MTime"); 76 if (!fTime) 77 { 78 *fLog << err << dbginf << "MTime not found... aborting." << endl; 79 return kFALSE; 80 } 76 81 77 const MBinning* binsdtime = (MBinning*)plist->FindObject("BinningTimeDiff");78 const MBinning* binstime = (MBinning*)plist->FindObject("BinningTime");79 if (!binstime || !binsdtime)80 {81 *fLog << err << dbginf << "At least one MBinning not found... aborting." << endl;82 return kFALSE;83 }82 const MBinning* binsdtime = (MBinning*)plist->FindObject("BinningTimeDiff"); 83 const MBinning* binstime = (MBinning*)plist->FindObject("BinningTime"); 84 if (!binstime || !binsdtime) 85 { 86 *fLog << err << dbginf << "At least one MBinning not found... aborting." << endl; 87 return kFALSE; 88 } 84 89 85 SetBinning(&fHist, binsdtime, binstime);90 SetBinning(&fHist, binsdtime, binstime); 86 91 87 return kTRUE;92 return kTRUE; 88 93 } 89 94 95 // -------------------------------------------------------------------------- 96 // 97 // Draw a copy of the histogram 98 // 90 99 TObject *MHTimeDiffTime::DrawClone(Option_t *opt) const 91 100 { 92 TCanvas *c = MakeDefCanvas("DiffTimeTime", "Distrib of dt, t"); 93 c->Divide(2, 2); 101 102 TCanvas &c = *MakeDefCanvas("DiffTimeTime", "Distrib of \\Delta t, time"); 103 104 c.Divide(2, 2); 94 105 95 106 gROOT->SetSelectedPad(NULL); 96 107 97 //98 // FIXME: ProjectionX,Y is not const within root99 //100 108 TH1D *h; 101 109 102 c->cd(1); 103 h = ((TH2*)&fHist)->ProjectionX("ProX", -1, 9999, "E"); 110 c.cd(1); 111 h = ((TH2*)&fHist)->ProjectionX("ProjX-sumtime", -1, 9999, "E"); 112 113 h->SetTitle("Distribution of \\Delta t [s]"); 114 h->SetXTitle("\\Delta t [s]"); 115 h->SetYTitle("Counts"); 116 104 117 h->Draw(opt); 105 118 h->SetBit(kCanDelete); 106 119 gPad->SetLogy(); 107 120 108 c->cd(2); 109 h = ((TH2*)&fHist)->ProjectionY("ProY", -1, 9999, "E"); 121 c.cd(2); 122 h = ((TH2*)&fHist)->ProjectionY("ProjY-sumtimediff", -1, 9999, "E"); 123 124 h->SetTitle("Distribution of time [s]"); 125 h->SetXTitle("time [s]"); 126 h->SetYTitle("Counts"); 127 110 128 h->Draw(opt); 111 129 h->SetBit(kCanDelete); 112 130 113 c ->cd(3);131 c.cd(3); 114 132 ((TH2*)&fHist)->DrawCopy(opt); 115 133 116 c ->Modified();117 c ->Update();134 c.Modified(); 135 c.Update(); 118 136 119 return c;137 return &c; 120 138 } 121 139 140 // -------------------------------------------------------------------------- 141 // 142 // Draw the histogram 143 // 122 144 void MHTimeDiffTime::Draw(Option_t *opt) 123 145 { 124 146 if (!gPad) 125 MakeDefCanvas("DiffTimeTime", "Distrib of dt, t");147 MakeDefCanvas("DiffTimeTime", "Distrib of \\Delta t, time"); 126 148 127 149 gPad->Divide(2,2); … … 130 152 131 153 gPad->cd(1); 132 h = fHist.ProjectionX("ProX", -1, 9999, "E"); 154 h = fHist.ProjectionX("ProjX_sumtime", -1, 9999, "E"); 155 156 h->SetTitle("Distribution of \\Delta t [s]"); 157 h->SetXTitle("\\Delta t [s]"); 158 h->SetYTitle("Counts"); 159 133 160 h->Draw(opt); 134 161 h->SetBit(kCanDelete); … … 136 163 137 164 gPad->cd(2); 138 h = fHist.ProjectionY("ProY", -1, 9999, "E"); 165 h = fHist.ProjectionY("ProjY_sumtimediff", -1, 9999, "E"); 166 167 h->SetTitle("Distribution of time [s]"); 168 h->SetXTitle("time [s]"); 169 h->SetYTitle("Counts"); 170 139 171 h->Draw(opt); 140 172 h->SetBit(kCanDelete); … … 145 177 gPad->Modified(); 146 178 gPad->Update(); 179 147 180 } 148 181 182 // -------------------------------------------------------------------------- 183 // 184 // Fill the histogram 185 // 149 186 Bool_t MHTimeDiffTime::Fill(const MParContainer *par) 150 187 { … … 158 195 } 159 196 197 198 199 -
trunk/MagicSoft/Mars/mhist/MHTimeDiffTime.h
r1211 r1295 33 33 TObject *DrawClone(Option_t *option="") const; 34 34 35 ClassDef(MHTimeDiffTime, 1) // Histogram to store a 3-Dim histogram in alpha, Energy andtime35 ClassDef(MHTimeDiffTime, 1) //2D-histogram time-diff vs. time 36 36 }; 37 37
Note:
See TracChangeset
for help on using the changeset viewer.