- Timestamp:
- 11/26/03 02:21:16 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/calibration.C
r2545 r2569 24 24 25 25 void calibration(TString pedname="./20031102_02399_P_Unavailable_E.root", 26 TString calname="./20031102_02400_D_Flip500Hz_E.root")26 TString calname="./20031102_02400_D_Flip500Hz_E.root") 27 27 { 28 28 … … 148 148 MCalibrationCam *cam = plist2.FindObject("MCalibrationCam"); 149 149 MCalibrationPix *pix = cam->GetCalibrationPix(523); 150 pix->Draw(); 151 152 TCanvas *c1 = MH::MakeDefCanvas("Calibration1","Plots of FADC Charges",700,900); 153 c1->Divide(5, 2); 150 //pix->Draw(); 151 152 gROOT->GetListOfCanvases()->Delete(); 154 153 155 154 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 170 disp1->SetBit(kCanDelete); 171 disp2->SetBit(kCanDelete); 172 disp3->SetBit(kCanDelete); 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]"); 155 MHCamera &disp0 = *h.GetHistByName(); 156 MHCamera disp1 (geomcam, "MCalibrationCam;q", "Fitted Mean Charges"); 157 MHCamera disp2 (geomcam, "MCalibrationCam;errq", "Error of Fitted Mean Charges"); 158 MHCamera disp3 (geomcam, "MCalibrationCam;sigmaq", "Sigma of Fitted Mean Charges"); 159 MHCamera disp4 (geomcam, "MCalibrationCam;errsigmaq", "Error of Sigma of Fitted Mean Charges"); 160 MHCamera disp5 (geomcam, "MCalibrationCam;probq", "Probability of Fit"); 161 MHCamera disp6 (geomcam, "MCalibrationCam;t", "Arrival Times"); 162 MHCamera disp7 (geomcam, "MCalibrationCam;sigmat", "Sigma of Arrival Times"); 163 MHCamera disp8 (geomcam, "MCalibrationCam;probt", "Probability of Time Fit"); 164 MHCamera disp9 (geomcam, "MCalibrationCam;ped", "Pedestals"); 165 MHCamera disp10 (geomcam, "MCalibrationCam;pedrms", "Pedestal RMS"); 166 MHCamera disp11 (geomcam, "MCalibrationCam;rq", "Reduced Charges"); 167 MHCamera disp12 (geomcam, "MCalibrationCam;errrq", "Error of Reduced Charges"); 168 169 disp1.SetCamContent(*cam, 0); 170 disp2.SetCamContent(*cam, 1); 171 disp3.SetCamContent(*cam, 2); 172 disp4.SetCamContent(*cam, 3); 173 disp5.SetCamContent(*cam, 4); 174 disp6.SetCamContent(*cam, 5); 175 disp7.SetCamContent(*cam, 6); 176 disp8.SetCamContent(*cam, 7); 177 disp9.SetCamContent(*cam, 8); 178 disp10.SetCamContent(*cam, 9); 179 disp11.SetCamContent(*cam, 10); 180 disp12.SetCamContent(*cam, 11); 181 182 disp1.SetYTitle("Q [FADC counts]"); 183 disp2.SetYTitle("\\Delta_{Q} [FADC counts]"); 184 disp3.SetYTitle("\\sigma_{Q} [FADC counts]"); 185 disp4.SetYTitle("\\Delta_{\\sigma_{Q}} [FADC counts]"); 186 disp5.SetYTitle("P [au]"); 187 disp6.SetYTitle("T [FADC slices]"); 188 disp7.SetYTitle("\\Delta_{T} [FADC slices]"); 189 disp8.SetYTitle("P [au]"); 190 disp9.SetYTitle("P [FADC counts/ slice ]"); 191 disp10.SetYTitle("RMS_{P} [FADC counts / slice ]"); 192 disp11.SetYTitle("Q [FADC counts]"); 193 disp12.SetYTitle("\\Delta_{Q} [FADC counts]"); 208 194 209 195 // TText text(0.1, 0.5, &fname[fname.Last('/')+1]); 210 196 // text.SetTextSize(0.015); 211 197 // text.DrawClone(); 198 TCanvas *c1 = MH::MakeDefCanvas("Calibration1","Plots of FADC Charges",700,900); 199 c1->Divide(5, 2); 200 201 TObject *obj; 212 202 213 203 c1->cd(1); 214 204 gStyle->SetOptStat(1111); 215 disp1->Draw("hist"); 216 gPad->Update(); 205 obj=disp1.DrawCopy("hist"); 206 207 c1->cd(6); 208 gPad->SetBorderMode(0); 209 obj->Draw(); 217 210 218 211 c1->cd(2); 219 212 gStyle->SetOptStat(1101); 220 disp2->Draw("hist"); 221 gPad->Update(); 213 obj=disp2.DrawCopy("hist"); 214 215 c1->cd(7); 216 gPad->SetBorderMode(0); 217 obj->Draw(); 222 218 223 219 c1->cd(3); 224 220 gStyle->SetOptStat(1101); 225 disp3->Draw("hist"); 226 gPad->Update(); 221 obj=disp3.DrawCopy("hist"); 222 223 c1->cd(8); 224 gPad->SetBorderMode(0); 225 obj->Draw(); 227 226 228 227 c1->cd(4); 229 228 gStyle->SetOptStat(1101); 230 disp4->Draw("hist"); 231 gPad->Update(); 229 obj=disp4.DrawCopy("hist"); 230 231 c1->cd(9); 232 gPad->SetBorderMode(0); 233 obj->Draw(); 232 234 233 235 c1->cd(5); 234 236 gStyle->SetOptStat(1101); 235 disp5->Draw("hist"); 236 gPad->Update(); 237 238 c1->cd(6); 239 gPad->SetBorderMode(0); 240 gPad->Divide(1,1); 241 gPad->cd(1); 242 disp1->Draw(); 243 244 c1->cd(7); 245 gPad->SetBorderMode(0); 246 gPad->Divide(1,1); 247 gPad->cd(1); 248 disp2->Draw(); 249 250 c1->cd(8); 251 gPad->SetBorderMode(0); 252 gPad->Divide(1,1); 253 gPad->cd(1); 254 disp3->Draw(); 255 256 c1->cd(9); 257 gPad->SetBorderMode(0); 258 gPad->Divide(1,1); 259 gPad->cd(1); 260 disp4->Draw(); 237 obj=disp5.DrawCopy("hist"); 261 238 262 239 c1->cd(10); 263 240 gPad->SetBorderMode(0); 264 gPad->Divide(1,1); 265 gPad->cd(1); 266 disp5->Draw(); 241 obj->Draw(); 267 242 268 243 TCanvas *c2 = MH::MakeDefCanvas("Calibration2","Plots of Arrival Times",700,900); … … 271 246 c2->cd(1); 272 247 gStyle->SetOptStat(1111); 273 disp6->Draw("hist"); 274 gPad->Update(); 248 obj=disp6.DrawCopy("hist"); 249 250 c2->cd(4); 251 obj->Draw(); 275 252 276 253 c2->cd(2); 277 254 gStyle->SetOptStat(1101); 278 disp7->Draw("hist"); 279 gPad->Update(); 255 obj=disp7.DrawCopy("hist"); 256 257 c2->cd(5); 258 obj->Draw(); 280 259 281 260 c2->cd(3); 282 261 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(); 262 obj=disp8.DrawCopy("hist"); 297 263 298 264 c2->cd(6); 299 gPad->SetBorderMode(0); 300 gPad->Divide(1,1); 301 gPad->cd(1); 302 disp8->Draw(); 303 265 obj->Draw(); 304 266 305 267 TCanvas *c3 = MH::MakeDefCanvas("Calibration3","Plots of Pedestals",700,900); … … 308 270 c3->cd(1); 309 271 gStyle->SetOptStat(1111); 310 disp9->Draw("hist"); 311 gPad->Update(); 272 obj=disp9.DrawCopy("hist"); 273 274 c3->cd(3); 275 obj->Draw(); 312 276 313 277 c3->cd(2); 314 278 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(); 279 obj=disp10.DrawCopy("hist"); 323 280 324 281 c3->cd(4); 325 gPad->SetBorderMode(0); 326 gPad->Divide(1,1); 327 gPad->cd(1); 328 disp10->Draw(); 282 obj->Draw(); 329 283 330 284 TCanvas *c4 = MH::MakeDefCanvas("Calibration4","Plots of Reduced Charges",700,900); 331 c 3->Divide(2, 2);285 c4->Divide(2, 2); 332 286 333 287 c4->cd(1); 334 288 gStyle->SetOptStat(1111); 335 disp11->Draw("hist"); 336 gPad->Update(); 289 obj=disp11.DrawCopy("hist"); 290 291 c4->cd(3); 292 obj->Draw(); 337 293 338 294 c4->cd(2); 339 295 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(); 296 obj=disp12.DrawCopy("hist"); 348 297 349 298 c4->cd(4); 350 gPad->SetBorderMode(0); 351 gPad->Divide(1,1); 352 gPad->cd(1); 353 disp12->Draw(); 354 355 299 obj->Draw(); 356 300 357 301 // c->SaveAs(fname(0, fname.Last('.')+1) + "ps");
Note:
See TracChangeset
for help on using the changeset viewer.