Changeset 3039
- Timestamp:
- 02/05/04 17:52:36 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r3038 r3039 60 60 - split calculation of RMS into two steps to make it more clear to 61 61 the user 62 63 * macros/calibration.C 64 - found bug introduced two days ago, namely calculating pedestlas with 65 MExtractSignal2 which is now fixed 66 - Skip HiLoConversionCalibration 62 67 63 68 -
trunk/MagicSoft/Mars/macros/calibration.C
r3013 r3039 23 23 \* ======================================================================== */ 24 24 25 const TString pedfile = "/mnt/Data/rootdata/CrabNebula/2004_01_27/20040126_12149_P_Cab-On_E.root"; 25 //const TString pedfile = "/mnt/users/mdoro/Mars/Data/20040201_14418_P_OffMrk421-1_E.root"; 26 //const TString calfile = "/mnt/users/mdoro/Mars/Data/20040201_1441*_C_OffMrk421-1_E.root"; 27 28 const TString pedfile = "/mnt/Data/rootdata/CrabNebula/2004_01_27/20040126_12386_P_Cab-On_E.root"; 26 29 const TString calfile = "/mnt/Data/rootdata/CrabNebula/2004_01_27/20040126_12525_C_Cab-On_E.root"; 30 27 31 28 32 //const TString pedfile = "/mnt/Data/rootdata/Miscellaneous/2003_12_19/20031218_03522_P_Park_E.root"; … … 51 55 52 56 MGeomApply geomapl; 53 MExtractSignal 2sigcalc;57 MExtractSignal sigcalc; 54 58 // 55 59 // We saw that the signal jumps between slices, 56 60 // thus set the extraction range as high as possible 57 // Sliding window will be implemented asap.58 61 // 59 //sigcalc.SetRange(1,14,1,14);62 sigcalc.SetRange(1,14,1,14); 60 63 61 64 MPedCalcPedRun pedcalc; 62 //MFillH fill("MPedestalCam", "MExtractedSignalCam");65 MFillH fill("MPedestalCam", "MExtractedSignalCam"); 63 66 64 67 tlist.AddToList(&read); … … 66 69 tlist.AddToList(&sigcalc); 67 70 tlist.AddToList(&pedcalc); 68 //tlist.AddToList(&fill);71 tlist.AddToList(&fill); 69 72 70 73 MGeomCamMagic geomcam; … … 87 90 tlist.PrintStatistics(); 88 91 89 // pedcam [17].DrawClone();92 // pedcam(17).DrawClone(); 90 93 91 94 MStatusDisplay *d1 = new MStatusDisplay; … … 148 151 149 152 CamDraw(b1,dispped0,pedcam,1,4,0); 150 CamDraw(b1,dispped1,pedcam,2,4, 2);151 CamDraw(b1,dispped2,pedcam,3,4, 2);152 CamDraw(b1,dispped3,pedcam,4,4, 2);153 CamDraw(b1,dispped1,pedcam,2,4,1); 154 CamDraw(b1,dispped2,pedcam,3,4,1); 155 CamDraw(b1,dispped3,pedcam,4,4,1); 153 156 154 157 // Fitted values … … 158 161 CamDraw(b2,dispped4,pedcam,1,4,0); 159 162 CamDraw(b2,dispped5,pedcam,2,4,1); 160 CamDraw(b2,dispped6,pedcam,3,4, 0);163 CamDraw(b2,dispped6,pedcam,3,4,1); 161 164 CamDraw(b2,dispped7,pedcam,4,4,1); 162 165 … … 207 210 read2.DisableAutoScheme(); 208 211 209 // MExtractSignal sigcalc; 212 // 213 // We saw that the signal jumps between slices, 214 // thus take the sliding window 215 // 216 MExtractSignal2 sigcalc2; 210 217 MArrivalTimeCalc timecalc; 211 218 MCalibrationCalc calcalc; 219 220 // 221 // Skip the HiGain vs. LoGain calibration 222 // 223 calcalc.SkipHiLoGainCalibration(); 212 224 213 225 // … … 215 227 // faster results 216 228 // 217 timecalc.SetStepSize(0.05);229 // timecalc.SetStepSize(0.05); 218 230 219 231 // … … 253 265 MCalibrationBlindPix *bp = calcam.GetBlindPixel(); 254 266 // bp->ChangeFitFunc(MHCalibrationBlindPixel::kEPolya); 255 267 // bp->ChangeFitFunc(MHCalibrationBlindPixel::kEPoisson4); 256 268 257 269 tlist2.AddToList(&read2); 258 tlist2.AddToList(&sigcalc );270 tlist2.AddToList(&sigcalc2); 259 271 // 260 272 // In case, you want to skip the somewhat lengthy calculation … … 270 282 evtloop2.SetParList(&plist2); 271 283 284 MProgressBar bar; 285 evtloop2.SetProgressBar(&bar); 286 272 287 // 273 288 // Execute second analysis … … 286 301 // just one example how to get the plots of individual pixels 287 302 // 288 calcam[17].DrawClone();303 // calcam[18].DrawClone(); 289 304 290 305 MHCamera disp1 (geomcam, "MCalibrationPix;Charge", "Fitted Mean Charges"); … … 441 456 gPad->SetBorderMode(0); 442 457 TH1D *obj2 = (TH1D*)obj1->Projection(); 458 443 459 obj2->Draw(); 444 460 obj2->SetBit(kCanDelete); 461 445 462 446 463 const Double_t min = obj2->GetBinCenter(obj2->GetXaxis()->GetFirst()); … … 526 543 break; 527 544 } 528 545 546 gPad->Modified(); 547 gPad->Update(); 548 549 /* 550 TPaveStats *st = (TPaveStats*)gPad->GetPrimitive("stats"); 551 st->SetName("Projection"); 552 st->SetX1NDC(0.7); 553 st->SetX2NDC(1.2); 554 st->SetY1NDC(0.4); 555 st->SetY2NDC(1.2); 556 557 gPad->Modified(); 558 gPad->Update(); 559 560 */ 529 561 } -
trunk/MagicSoft/Mars/manalysis/MPedCalcPedRun.cc
r3015 r3039 19 19 ! Author(s): Thomas Bretz 05/2001 <mailto:tbretz@astro.uni-wuerzburg.de> 20 20 ! Author(s): Sebastian Commichau 12/2003 21 ! Author(s): Javier Rico 01/2004 21 ! Author(s): Javier Rico 01/2004 <mailto:jrico@ifae.es> 22 ! Author(s): Markus Gaug 01/2004 <mailto:markus@ifae.es> 22 23 ! 23 24 ! Copyright: MAGIC Software Development, 2000-2004 … … 287 288 // The new version: 288 289 // 289 const Float_t higainrms = TMath::Sqrt((sum2-sum*sum/nevts)/(nevts-1.)/(Float_t)fNumHiGainSamples); 290 290 // 1. Calculate the Variance of the sums: 291 Float_t higainVar = (sum2-sum*sum/nevts)/(nevts-1.); 292 // 2. Scale the variance to the number of slices: 293 higainVar /= (Float_t)fNumHiGainSamples; 294 // 3. Calculate the RMS from the Variance: 295 const Float_t higainrms = TMath::Sqrt(higainVar); 296 291 297 (*fPedestals)[pixid].Set(higainped, higainrms); 292 298
Note:
See TracChangeset
for help on using the changeset viewer.