Changeset 2545
- Timestamp:
- 11/20/03 17:34:03 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2544 r2545 6 6 7 7 2003/11/20: Markus Gaug 8 9 * macros/calibration.C 10 - all variables are now plotted in camera displays 8 11 9 12 * manalysis/MCalibrationPix: -
trunk/MagicSoft/Mars/macros/calibration.C
r2525 r2545 26 26 TString calname="./20031102_02400_D_Flip500Hz_E.root") 27 27 { 28 28 29 // 29 30 // Create a empty Parameter List and an empty Task List … … 43 44 read.DisableAutoScheme(); 44 45 45 MGeomApply geomapl; 46 MGeomApply geomapl; 47 MGeomCamMagic geomcam; 48 MGeomCam geom; 46 49 MPedCalcPedRun pedcalc; 47 //MPedestalCam pedcam;50 MPedestalCam pedcam; 48 51 49 52 tlist.AddToList(&read); … … 51 54 tlist.AddToList(&pedcalc); 52 55 53 //plist.AddToList(&pedcam);54 55 MHCamEvent hist ;56 plist.AddToList(&pedcam); 57 58 MHCamEvent hist("Pedestal"); 56 59 hist.SetType(1); 57 60 plist.AddToList(&hist); 58 MFillH fill( "MHCamEvent", "MPedestalCam");61 MFillH fill(&hist, "MPedestalCam"); 59 62 60 63 tlist.AddToList(&fill); 61 64 65 // 66 // Update frequency by default = 1Hz 67 // 68 MStatusDisplay *d = new MStatusDisplay; 69 70 // Set update time to 3s 71 d->SetUpdateTime(3000); 72 62 73 // 63 74 // Create and setup the eventloop … … 65 76 MEvtLoop evtloop; 66 77 evtloop.SetParList(&plist); 78 evtloop.SetDisplay(d); 67 79 68 80 // … … 74 86 tlist.PrintStatistics(); 75 87 76 // plist.FindObject("MPedestalCam")->Print();77 78 88 // 79 89 // Create a empty Parameter List and an empty Task List 80 // The tasklist is identified in the eventloop by its name81 90 // 82 91 MParList plist2; … … 88 97 89 98 MGeomApply geomapl2; 90 tlist2.AddToList(&geomapl 2);99 tlist2.AddToList(&geomapl); 91 100 92 101 // … … 100 109 MCalibrationCalc calcalc; 101 110 calcalc.SetSkipTFits(); 111 112 plist2.AddToList(&geomcam); 113 102 114 // 103 115 // As long, as we don't have digital modules, … … 109 121 tlist2.AddToList(&calcalc); 110 122 123 MHCamEvent hist2; 124 hist2.SetType(0); 125 plist2.AddToList(&hist2); 126 MFillH fill2("MHCamEvent", "MCalibrationCam"); 127 tlist2.AddToList(&fill2); 128 111 129 // 112 130 // Create and setup the eventloop … … 123 141 tlist2.PrintStatistics(); 124 142 125 plist2.FindObject("MCalibrationCam")->Print(); 143 // plist2.FindObject("MCalibrationCam")->Print(); 144 126 145 // 127 146 // just one example how to get the plots of individual pixels 128 147 // 129 148 MCalibrationCam *cam = plist2.FindObject("MCalibrationCam"); 130 MCalibrationPix *pix = cam->GetCalibrationPix(5 60);149 MCalibrationPix *pix = cam->GetCalibrationPix(523); 131 150 pix->Draw(); 132 151 133 /* 134 TCanvas *c = MH::MakeDefCanvas(); 135 c->Divide(3, 2); 136 137 MHCamEvent &h = *(MHCamEvent*)plist->FindObject("MHCamEvent"); 138 MHCamera *disp0 = h.GetHistByName(); 139 MHCamera *disp1 = new MHCamera(geom, "MPedestalCam;avg", "Pedestals Avarage"); 140 MHCamera *disp2 = new MHCamera(geom, "MPedestalCam;rms", "Pedestals Avarage Error"); 141 MHCamera *disp3 = new MHCamera(geom, "MPedestalCam;rel", "Pedestals Avarage ERR/VAL"); 152 TCanvas *c1 = MH::MakeDefCanvas("Calibration1","Plots of FADC Charges",700,900); 153 c1->Divide(5, 2); 154 155 MHCamEvent &h = *(MHCamEvent*)plist2->FindObject("MHCamEvent"); 156 MHCamera *disp0 = h.GetHistByName(); 157 MHCamera *disp1 = new MHCamera(geomcam, "MCalibrationCam;q", "Fitted Mean Charges"); 158 MHCamera *disp2 = new MHCamera(geomcam, "MCalibrationCam;errq", "Error of Fitted Mean Charges"); 159 MHCamera *disp3 = new MHCamera(geomcam, "MCalibrationCam;sigmaq", "Sigma of Fitted Mean Charges"); 160 MHCamera *disp4 = new MHCamera(geomcam, "MCalibrationCam;errsigmaq", "Error of Sigma of Fitted Mean Charges"); 161 MHCamera *disp5 = new MHCamera(geomcam, "MCalibrationCam;probq", "Probability of Fit"); 162 MHCamera *disp6 = new MHCamera(geomcam, "MCalibrationCam;t", "Arrival Times"); 163 MHCamera *disp7 = new MHCamera(geomcam, "MCalibrationCam;sigmat", "Sigma of Arrival Times"); 164 MHCamera *disp8 = new MHCamera(geomcam, "MCalibrationCam;probt", "Probability of Time Fit"); 165 MHCamera *disp9 = new MHCamera(geomcam, "MCalibrationCam;ped", "Pedestals"); 166 MHCamera *disp10 = new MHCamera(geomcam, "MCalibrationCam;pedrms", "Pedestal RMS"); 167 MHCamera *disp11 = new MHCamera(geomcam, "MCalibrationCam;rq", "Reduced Charges"); 168 MHCamera *disp12 = new MHCamera(geomcam, "MCalibrationCam;errrq", "Error of Reduced Charges"); 169 142 170 disp1->SetBit(kCanDelete); 143 171 disp2->SetBit(kCanDelete); 144 172 disp3->SetBit(kCanDelete); 145 146 disp1->SetCamContent(*disp0, 0); 147 disp2->SetCamContent(*disp0, 1); 148 disp3->SetCamContent(*disp0, 2); 149 150 disp1->SetYTitle("P [au]"); 151 disp2->SetYTitle("\\sigma_{P} [au]"); 152 disp3->SetYTitle("\\sigma_{P} [%]"); 153 154 TText text(0.1, 0.5, &fname[fname.Last('/')+1]); 155 text.SetTextSize(0.015); 156 text.DrawClone(); 157 158 c->cd(1); 173 disp4->SetBit(kCanDelete); 174 disp5->SetBit(kCanDelete); 175 disp6->SetBit(kCanDelete); 176 disp7->SetBit(kCanDelete); 177 disp8->SetBit(kCanDelete); 178 disp9->SetBit(kCanDelete); 179 disp10->SetBit(kCanDelete); 180 disp11->SetBit(kCanDelete); 181 disp12->SetBit(kCanDelete); 182 183 disp1->SetCamContent(*cam, 0); 184 disp2->SetCamContent(*cam, 1); 185 disp3->SetCamContent(*cam, 2); 186 disp4->SetCamContent(*cam, 3); 187 disp5->SetCamContent(*cam, 4); 188 disp6->SetCamContent(*cam, 5); 189 disp7->SetCamContent(*cam, 6); 190 disp8->SetCamContent(*cam, 7); 191 disp9->SetCamContent(*cam, 8); 192 disp10->SetCamContent(*cam, 9); 193 disp11->SetCamContent(*cam, 10); 194 disp12->SetCamContent(*cam, 11); 195 196 disp1->SetYTitle("Q [FADC counts]"); 197 disp2->SetYTitle("\\Delta_{Q} [FADC counts]"); 198 disp3->SetYTitle("\\sigma_{Q} [FADC counts]"); 199 disp4->SetYTitle("\\Delta_{\\sigma_{Q}} [FADC counts]"); 200 disp5->SetYTitle("P [au]"); 201 disp6->SetYTitle("T [FADC slices]"); 202 disp7->SetYTitle("\\Delta_{T} [FADC slices]"); 203 disp8->SetYTitle("P [au]"); 204 disp9->SetYTitle("P [FADC counts/ slice ]"); 205 disp10->SetYTitle("RMS_{P} [FADC counts / slice ]"); 206 disp11->SetYTitle("Q [FADC counts]"); 207 disp12->SetYTitle("\\Delta_{Q} [FADC counts]"); 208 209 // TText text(0.1, 0.5, &fname[fname.Last('/')+1]); 210 // text.SetTextSize(0.015); 211 // text.DrawClone(); 212 213 c1->cd(1); 159 214 gStyle->SetOptStat(1111); 160 215 disp1->Draw("hist"); 161 216 gPad->Update(); 162 217 163 c ->cd(2);218 c1->cd(2); 164 219 gStyle->SetOptStat(1101); 165 220 disp2->Draw("hist"); 166 221 gPad->Update(); 167 222 168 c ->cd(3);223 c1->cd(3); 169 224 gStyle->SetOptStat(1101); 170 225 disp3->Draw("hist"); 171 226 gPad->Update(); 172 227 173 c->cd(4); 228 c1->cd(4); 229 gStyle->SetOptStat(1101); 230 disp4->Draw("hist"); 231 gPad->Update(); 232 233 c1->cd(5); 234 gStyle->SetOptStat(1101); 235 disp5->Draw("hist"); 236 gPad->Update(); 237 238 c1->cd(6); 174 239 gPad->SetBorderMode(0); 175 240 gPad->Divide(1,1); … … 177 242 disp1->Draw(); 178 243 179 c ->cd(5);244 c1->cd(7); 180 245 gPad->SetBorderMode(0); 181 246 gPad->Divide(1,1); … … 183 248 disp2->Draw(); 184 249 185 c ->cd(6);250 c1->cd(8); 186 251 gPad->SetBorderMode(0); 187 252 gPad->Divide(1,1); … … 189 254 disp3->Draw(); 190 255 191 c->SaveAs(fname(0, fname.Last('.')+1) + "ps"); 256 c1->cd(9); 257 gPad->SetBorderMode(0); 258 gPad->Divide(1,1); 259 gPad->cd(1); 260 disp4->Draw(); 261 262 c1->cd(10); 263 gPad->SetBorderMode(0); 264 gPad->Divide(1,1); 265 gPad->cd(1); 266 disp5->Draw(); 267 268 TCanvas *c2 = MH::MakeDefCanvas("Calibration2","Plots of Arrival Times",700,900); 269 c2->Divide(3, 2); 270 271 c2->cd(1); 272 gStyle->SetOptStat(1111); 273 disp6->Draw("hist"); 274 gPad->Update(); 275 276 c2->cd(2); 277 gStyle->SetOptStat(1101); 278 disp7->Draw("hist"); 279 gPad->Update(); 280 281 c2->cd(3); 282 gStyle->SetOptStat(1101); 283 disp8->Draw("hist"); 284 gPad->Update(); 285 286 c2->cd(4); 287 gPad->SetBorderMode(0); 288 gPad->Divide(1,1); 289 gPad->cd(1); 290 disp6->Draw(); 291 292 c2->cd(5); 293 gPad->SetBorderMode(0); 294 gPad->Divide(1,1); 295 gPad->cd(1); 296 disp7->Draw(); 297 298 c2->cd(6); 299 gPad->SetBorderMode(0); 300 gPad->Divide(1,1); 301 gPad->cd(1); 302 disp8->Draw(); 303 304 305 TCanvas *c3 = MH::MakeDefCanvas("Calibration3","Plots of Pedestals",700,900); 306 c3->Divide(2, 2); 307 308 c3->cd(1); 309 gStyle->SetOptStat(1111); 310 disp9->Draw("hist"); 311 gPad->Update(); 312 313 c3->cd(2); 314 gStyle->SetOptStat(1101); 315 disp10->Draw("hist"); 316 gPad->Update(); 317 318 c3->cd(3); 319 gPad->SetBorderMode(0); 320 gPad->Divide(1,1); 321 gPad->cd(1); 322 disp9->Draw(); 323 324 c3->cd(4); 325 gPad->SetBorderMode(0); 326 gPad->Divide(1,1); 327 gPad->cd(1); 328 disp10->Draw(); 329 330 TCanvas *c4 = MH::MakeDefCanvas("Calibration4","Plots of Reduced Charges",700,900); 331 c3->Divide(2, 2); 332 333 c4->cd(1); 334 gStyle->SetOptStat(1111); 335 disp11->Draw("hist"); 336 gPad->Update(); 337 338 c4->cd(2); 339 gStyle->SetOptStat(1101); 340 disp12->Draw("hist"); 341 gPad->Update(); 342 343 c4->cd(3); 344 gPad->SetBorderMode(0); 345 gPad->Divide(1,1); 346 gPad->cd(1); 347 disp11->Draw(); 348 349 c4->cd(4); 350 gPad->SetBorderMode(0); 351 gPad->Divide(1,1); 352 gPad->cd(1); 353 disp12->Draw(); 354 355 356 357 // c->SaveAs(fname(0, fname.Last('.')+1) + "ps"); 192 358 //c->SaveAs(fname(0, fname.Last('.')+1) + "root"); 193 359 194 */195 196 360 } 197 361
Note:
See TracChangeset
for help on using the changeset viewer.