Changeset 2581 for trunk/MagicSoft/Mars/macros
- Timestamp:
- 12/01/03 18:58:01 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/calibration.C
r2570 r2581 23 23 \* ======================================================================== */ 24 24 25 void calibration(TString pedname=". /20031102_02399_P_Unavailable_E.root",26 TString calname=". /20031102_02400_D_Flip500Hz_E.root")25 void calibration(TString pedname="../../Mars-0.8.2/20031102_02399_P_Unavailable_E.root", 26 TString calname="../../Mars-0.8.2/20031102_02400_D_Flip500Hz_E.root") 27 27 { 28 28 … … 45 45 46 46 MGeomApply geomapl; 47 MPedCalcPedRun pedcalc; 47 48 MGeomCamMagic geomcam; 48 MGeomCam geom;49 MPedCalcPedRun pedcalc;50 49 MPedestalCam pedcam; 51 50 … … 57 56 58 57 MHCamEvent hist("Pedestal"); 59 hist.SetType( 1);58 hist.SetType(0); 60 59 plist.AddToList(&hist); 61 60 MFillH fill(&hist, "MPedestalCam"); … … 63 62 tlist.AddToList(&fill); 64 63 65 // 66 // Update frequency by default = 1Hz 67 // 68 MStatusDisplay *d = new MStatusDisplay; 64 MStatusDisplay *d1 = new MStatusDisplay; 69 65 70 66 // Set update time to 3s 71 d ->SetUpdateTime(3000);67 d1->SetUpdateTime(3000); 72 68 73 69 // … … 76 72 MEvtLoop evtloop; 77 73 evtloop.SetParList(&plist); 78 evtloop.SetDisplay(d );74 evtloop.SetDisplay(d1); 79 75 80 76 // … … 86 82 tlist.PrintStatistics(); 87 83 84 MPedestalCam *ped = plist.FindObject("MPedestalCam"); 85 ped.Print(); 86 88 87 // 89 88 // Create a empty Parameter List and an empty Task List … … 94 93 plist2.AddToList(&tlist2); 95 94 95 96 96 plist2.AddToList((MPedestalCam*)plist.FindObject("MPedestalCam")); 97 97 98 MGeomApply geomapl2;98 // MGeomApply geomapl2; 99 99 tlist2.AddToList(&geomapl); 100 100 … … 108 108 109 109 MCalibrationCalc calcalc; 110 calcalc.SetSkipTFits();110 // calcalc.SetSkipTFits(); 111 111 112 112 plist2.AddToList(&geomcam); … … 114 114 // 115 115 // As long, as we don't have digital modules, 116 // we have to set the color by hand116 // we have to set the color of the pulser LED by hand 117 117 // 118 118 calcalc.SetPulserColor(MCalibrationCalc::kEBlue); … … 141 141 tlist2.PrintStatistics(); 142 142 143 // plist2.FindObject("MCalibrationCam")->Print();144 145 143 // 146 144 // just one example how to get the plots of individual pixels … … 148 146 MCalibrationCam *cam = plist2.FindObject("MCalibrationCam"); 149 147 MCalibrationPix *pix = cam->GetCalibrationPix(523); 150 //pix->Draw(); 151 148 pix->Draw(); 149 150 // 151 // Here we are confronted to a serious bug in ROOT: 152 // If we do not apply the next command, gPad will get 153 // screwed up completely: (Thanks to tbretz for finding out 154 // the reason during several hours!!!) 155 // 152 156 gROOT->GetListOfCanvases()->Delete(); 153 157 … … 193 197 disp12.SetYTitle("\\Delta_{Q} [FADC counts]"); 194 198 195 // TText text(0.1, 0.5, &fname[fname.Last('/')+1]); 196 // text.SetTextSize(0.015); 197 // text.DrawClone(); 198 TCanvas *c1 = &d->AddTab("Cal1");//MH::MakeDefCanvas("Calibration1","Plots of FADC Charges",700,900); 199 MStatusDisplay *d2 = new MStatusDisplay; 200 201 // Set update time to 1s 202 d2->SetUpdateTime(1000); 203 204 TCanvas *c1 = &d2->AddTab("Fitted Charges"); 199 205 c1->Divide(5, 2); 200 206 … … 241 247 obj->Draw(); 242 248 243 TCanvas *c2 = &d ->AddTab("Cal2");//MH::MakeDefCanvas("Calibration2","Plots of Arrival Times",700,900);249 TCanvas *c2 = &d2->AddTab("Fitted Times"); 244 250 c2->Divide(3, 2); 245 251 … … 265 271 obj->Draw(); 266 272 267 TCanvas *c3 = &d ->AddTab("Cal3");//MH::MakeDefCanvas("Calibration3","Plots of Pedestals",700,900);273 TCanvas *c3 = &d2->AddTab("Pedestals"); 268 274 c3->Divide(2, 2); 269 275 … … 282 288 obj->Draw(); 283 289 284 TCanvas *c4 = &d ->AddTab("Cal4");//MH::MakeDefCanvas("Calibration4","Plots of Reduced Charges",700,900);290 TCanvas *c4 = &d2->AddTab("Reduced Charges"); 285 291 c4->Divide(2, 2); 286 292 … … 299 305 obj->Draw(); 300 306 301 // c->SaveAs(fname(0, fname.Last('.')+1) + "ps"); 302 //c->SaveAs(fname(0, fname.Last('.')+1) + "root"); 307 #endif 303 308 304 309 }
Note:
See TracChangeset
for help on using the changeset viewer.