Changeset 3992 for trunk/MagicSoft/Mars/macros/pedestalstudies.C
- Timestamp:
- 05/06/04 08:59:56 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/pedestalstudies.C
r3775 r3992 16 16 ! 17 17 ! 18 ! Author(s): Markus Gaug, 11/2003<mailto:markus@ifae.es>18 ! Author(s): Markus Gaug, 04/2004 <mailto:markus@ifae.es> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 320 ! Copyright: MAGIC Software Development, 2000-2004 21 21 ! 22 22 ! … … 26 26 // pedestalstudies.C 27 27 // 28 // macro to observe the pedestalsand pedestalRMS with the number of FADC28 // macro to study the pedestal and pedestalRMS with the number of FADC 29 29 // slices summed up. 30 //31 // In order to use this macro, you have to uncomment the following32 // line in MPedCalcPedRun (line 214):33 //34 // fNumHiGainSamples = runheader->GetNumSamplesHiGain() & ~1;35 //36 30 // 37 31 ///////////////////////////////////////////////////////////////////////////////// … … 104 98 // Set the extraction range higher: 105 99 // 106 //sigcalc.SetRange(1,14,1,14); 100 MExtractFixedWindow sigcalc; 101 sigcalc.SetRange(0,samples-1,0,1); 102 107 103 MPedCalcPedRun pedcalc; 108 pedcalc.SetNumHiGainSamples((Byte_t)samples); 109 110 MExtractSignal sigcalc; 111 sigcalc.SetRange(0,samples-1,0,samples-1); 112 104 pedcalc.SetRange(0,samples-1,0,0); 105 pedcalc.SetWindowSize((Int_t)sigcalc.GetNumHiGainSamples()); 106 113 107 // 114 108 // Additionally to calculating the pedestals, … … 217 211 } 218 212 213 /* 219 214 TF1 *logg = new TF1("logg","[1]+TMath::Log(x-[0])",1.,30.,2); 220 215 logg->SetParameters(1.,3.5); … … 222 217 logg->SetParLimits(1,-1.,7.); 223 218 logg->SetLineColor(kRed); 219 */ 224 220 225 221 TCanvas *canvas = new TCanvas("PedstudInner","Pedestal Studies Inner Pixels",600,900); … … 234 230 gmeaninn->GetXaxis()->SetTitle("Nr. added FADC slices"); 235 231 gmeaninn->GetYaxis()->SetTitle("Calculated Mean per slice"); 236 gmeaninn->Fit("pol0");237 gmeaninn->GetFunction("pol0")->SetLineColor(kGreen);238 // gmeaninn->Fit(logg);232 // gmeaninn->Fit("pol0"); 233 // gmeaninn->GetFunction("pol0")->SetLineColor(kGreen); 234 // // gmeaninn->Fit(logg); 239 235 240 236 canvas->cd(2); … … 247 243 gmuinn->GetXaxis()->SetTitle("Nr. added FADC slices"); 248 244 gmuinn->GetYaxis()->SetTitle("Fitted Mean per Slice"); 249 gmuinn->Fit("pol0");250 gmuinn->GetFunction("pol0")->SetLineColor(kGreen);245 // gmuinn->Fit("pol0"); 246 // gmuinn->GetFunction("pol0")->SetLineColor(kGreen); 251 247 //gmuinn->Fit(logg); 252 248 … … 261 257 grmsinn->GetXaxis()->SetTitle("Nr. added FADC slices"); 262 258 grmsinn->GetYaxis()->SetTitle("Calculated Rms per Slice"); 263 // grmsinn->Fit("pol2");264 // grmsinn->GetFunction("pol2")->SetLineColor(kRed);265 grmsinn->Fit(logg);259 // //grmsinn->Fit("pol2"); 260 // //grmsinn->GetFunction("pol2")->SetLineColor(kRed); 261 // grmsinn->Fit(logg); 266 262 267 263 canvas->cd(4); … … 274 270 gsigmainn->GetXaxis()->SetTitle("Nr. added FADC slices"); 275 271 gsigmainn->GetYaxis()->SetTitle("Fitted Sigma per Slice"); 276 // gsigmainn->Fit("pol2");277 // gsigmainn->GetFunction("pol2")->SetLineColor(kRed);278 gsigmainn->Fit(logg);272 // // gsigmainn->Fit("pol2"); 273 // // gsigmainn->GetFunction("pol2")->SetLineColor(kRed); 274 // gsigmainn->Fit(logg); 279 275 280 276 canvas->cd(5); … … 287 283 gmeandiffinn->GetXaxis()->SetTitle("Nr. added FADC slices"); 288 284 gmeandiffinn->GetYaxis()->SetTitle("Rel. Difference Mean per Slice"); 289 // gmeandiffinn->Fit("pol2");290 // gmeandiffinn->GetFunction("pol2")->SetLineColor(kBlue);291 gmeandiffinn->Fit(logg);285 // //gmeandiffinn->Fit("pol2"); 286 // //gmeandiffinn->GetFunction("pol2")->SetLineColor(kBlue); 287 // gmeandiffinn->Fit(logg); 292 288 293 289 … … 301 297 grmsdiffinn->GetXaxis()->SetTitle("Nr. added FADC slices"); 302 298 grmsdiffinn->GetYaxis()->SetTitle("Rel. Difference Sigma per Slice-RMS"); 303 //grmsdiffinn->Fit("pol2"); 304 //grmsdiffinn->GetFunction("pol2")->SetLineColor(kBlue); 305 grmsdiffinn->Fit(logg); 306 299 // //grmsdiffinn->Fit("pol2"); 300 // //grmsdiffinn->GetFunction("pol2")->SetLineColor(kBlue); 301 // grmsdiffinn->Fit(logg); 302 303 canvas->SaveAs("PedestalStudyInner.root"); 304 canvas->SaveAs("PedestalStudyInner.ps"); 307 305 308 306 TCanvas *canvas2 = new TCanvas("PedstudOut","Pedestal Studies Outer Pixels",600,900); 309 307 canvas2->Divide(2,3); 310 canvas2->cd(1);311 312 313 308 canvas2->cd(1); 314 309 … … 320 315 gmeanout->GetXaxis()->SetTitle("Nr. added FADC slices"); 321 316 gmeanout->GetYaxis()->SetTitle("Calculated Mean per Slice"); 322 gmeanout->Fit("pol0");323 gmeanout->GetFunction("pol0")->SetLineColor(kGreen);317 // gmeanout->Fit("pol0"); 318 // gmeanout->GetFunction("pol0")->SetLineColor(kGreen); 324 319 //gmeanout->Fit(logg); 325 320 … … 333 328 gmuout->GetXaxis()->SetTitle("Nr. added FADC slices"); 334 329 gmuout->GetYaxis()->SetTitle("Fitted Mean per Slice"); 335 gmuout->Fit("pol0");336 gmuout->GetFunction("pol0")->SetLineColor(kGreen);330 // gmuout->Fit("pol0"); 331 // gmuout->GetFunction("pol0")->SetLineColor(kGreen); 337 332 //gmuout->Fit(logg); 338 333 … … 346 341 grmsout->GetXaxis()->SetTitle("Nr. added FADC slices"); 347 342 grmsout->GetYaxis()->SetTitle("Calculated Rms per Slice"); 348 // grmsout->Fit("pol2");349 // grmsout->GetFunction("pol2")->SetLineColor(kRed);350 grmsout->Fit(logg);343 // //grmsout->Fit("pol2"); 344 // //grmsout->GetFunction("pol2")->SetLineColor(kRed); 345 // grmsout->Fit(logg); 351 346 352 347 canvas2->cd(4); … … 359 354 gsigmaout->GetXaxis()->SetTitle("Nr. added FADC slices"); 360 355 gsigmaout->GetYaxis()->SetTitle("Fitted Sigma per Slice"); 361 // gsigmaout->Fit("pol2");362 // gsigmaout->GetFunction("pol2")->SetLineColor(kRed);363 gsigmaout->Fit(logg);356 // //gsigmaout->Fit("pol2"); 357 // //gsigmaout->GetFunction("pol2")->SetLineColor(kRed); 358 // gsigmaout->Fit(logg); 364 359 365 360 … … 373 368 gmeandiffout->GetXaxis()->SetTitle("Nr. added FADC slices"); 374 369 gmeandiffout->GetYaxis()->SetTitle("Rel. Difference Mean per Slice"); 375 // gmeandiffout->Fit("pol2");376 // gmeandiffout->GetFunction("pol2")->SetLineColor(kBlue);377 gmeandiffout->Fit(logg);370 // //gmeandiffout->Fit("pol2"); 371 //w //gmeandiffout->GetFunction("pol2")->SetLineColor(kBlue); 372 // gmeandiffout->Fit(logg); 378 373 379 374 canvas2->cd(6); … … 386 381 grmsdiffout->GetXaxis()->SetTitle("Nr. added FADC slices"); 387 382 grmsdiffout->GetYaxis()->SetTitle("Rel. Difference Sigma per Slice-RMS"); 388 //grmsdiffout->Fit("pol2"); 389 //grmsdiffout->GetFunction("pol2")->SetLineColor(kBlue); 390 grmsdiffout->Fit(logg); 383 // //grmsdiffout->Fit("pol2"); 384 // //grmsdiffout->GetFunction("pol2")->SetLineColor(kBlue); 385 // grmsdiffout->Fit(logg); 386 387 388 canvas2->SaveAs("PedestalStudyOuter.root"); 389 canvas2->SaveAs("PedestalStudyOuter.ps"); 391 390 392 391
Note:
See TracChangeset
for help on using the changeset viewer.