- Timestamp:
- 03/29/04 21:55:47 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r3603 r3608 38 38 * mcalib/MCalibrationChargePix.[h,cc] 39 39 - move consistency checks from Pix to Calc 40 41 * mcalib/MHGausEvents.[h,cc] 42 - fixed axes for event and fourier spectrum Draw 40 43 41 44 -
trunk/MagicSoft/Mars/mcalib/MHGausEvents.cc
r3492 r3608 497 497 const Int_t n = fEvents.GetSize(); 498 498 499 fGraphEvents = new TGraph(n,Create Xaxis(n),fEvents.GetArray());499 fGraphEvents = new TGraph(n,CreateEventXaxis(n),fEvents.GetArray()); 500 500 fGraphEvents->SetTitle("Evolution of Events with time"); 501 501 fGraphEvents->GetXaxis()->SetTitle((fEventFrequency) ? "Time [s]" : "Event Nr."); … … 514 514 const Int_t n = fPowerSpectrum->GetSize(); 515 515 516 fGraphPowerSpectrum = new TGraph(n,Create Xaxis(n),fPowerSpectrum->GetArray());516 fGraphPowerSpectrum = new TGraph(n,CreatePSDXaxis(n),fPowerSpectrum->GetArray()); 517 517 fGraphPowerSpectrum->SetTitle("Power Spectrum Density"); 518 518 fGraphPowerSpectrum->GetXaxis()->SetTitle((fEventFrequency) ? "Frequency [Hz]" : "Frequency"); … … 522 522 // ----------------------------------------------------------------------------- 523 523 // 524 // Create the x-axis for the graph525 // 526 Float_t *MHGausEvents::Create Xaxis(Int_t n)524 // Create the x-axis for the event graph 525 // 526 Float_t *MHGausEvents::CreateEventXaxis(Int_t n) 527 527 { 528 528 … … 535 535 for (Int_t i=0;i<n;i++) 536 536 xaxis[i] = (Float_t)i; 537 538 return xaxis; 539 540 } 541 542 // ----------------------------------------------------------------------------- 543 // 544 // Create the x-axis for the event graph 545 // 546 Float_t *MHGausEvents::CreatePSDXaxis(Int_t n) 547 { 548 549 Float_t *xaxis = new Float_t[n]; 550 551 if (fEventFrequency) 552 for (Int_t i=0;i<n;i++) 553 xaxis[i] = 0.5*(Float_t)i*fEventFrequency/n; 554 else 555 for (Int_t i=0;i<n;i++) 556 xaxis[i] = 0.5*(Float_t)i/n; 537 557 538 558 return xaxis; -
trunk/MagicSoft/Mars/mcalib/MHGausEvents.h
r3295 r3608 65 65 void DrawPowerSpectrum(TVirtualPad &pad, Int_t i); // Draw a graph of the array fPowerSpectrum and the hist fHPowerProbability 66 66 67 Float_t *CreateXaxis(Int_t n); // Create an x-axis for the TGraphs 67 Float_t *CreateEventXaxis(Int_t n); // Create an x-axis for the Event TGraphs 68 Float_t *CreatePSDXaxis(Int_t n); // Create an x-axis for the PSD TGraphs 68 69 69 70 public:
Note:
See TracChangeset
for help on using the changeset viewer.