Changeset 2906 for trunk/MagicSoft/Mars/macros
- Timestamp:
- 01/24/04 01:56:57 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/calibration.C
r2877 r2906 23 23 \* ======================================================================== */ 24 24 25 // const TString pedfile = "/mnt/Data/rootdata/DarkPatch4/2003_11_27/20031126_03030_P_DarkPatch4_E.root";26 // const TString calfile = "/mnt/Data/rootdata/DarkPatch4/2004_01_17/20040116_*_C_DarkPatch2_E.root";27 28 25 const TString pedfile = "/mnt/Data/rootdata/Miscellaneous/2003_12_19/20031218_03522_P_Park_E.root"; 29 26 const TString calfile = "/mnt/Data/rootdata/Miscellaneous/2003_12_19/20031218_03527_C_Park_E.root"; … … 68 65 tlist.AddToList(&fill); 69 66 70 MStatusDisplay *d1 = new MStatusDisplay;71 72 //Set update time to 3s73 d1->SetUpdateTime(3000);74 75 67 // 76 68 // Create and setup the eventloop … … 78 70 MEvtLoop evtloop; 79 71 evtloop.SetParList(&plist); 80 evtloop.SetDisplay(d1);81 72 82 73 // … … 118 109 read2.DisableAutoScheme(); 119 110 120 MExtractSignal sigsig; 111 MExtractSignal sigcalc; 112 MArrivalTimeCalc timecalc; 121 113 MCalibrationCalc calcalc; 114 115 // 116 // As long, as we don't have digital modules, 117 // we have to set the color of the pulser LED by hand 118 // 119 calcalc.SetPulserColor(MCalibrationCalc::kECT1); 122 120 123 121 // … … 125 123 // (This is a preliminary feature) 126 124 // 127 // calcalc.ExcludePixelsFromAsciiFile("badpixels.dat");125 // calcalc.ExcludePixelsFromAsciiFile("badpixels_all.dat"); 128 126 129 127 // 130 // As long, as we don't have digital modules, 131 // we have to set the color of the pulser LED by hand 132 // 133 calcalc.SetPulserColor(MCalibrationCalc::kECT1); 128 // In case, you want to skip the blind pixel method: 129 // (NOT RECOMMENDED!!!) 130 // 131 // calcalc.SkipBlindPixelFit(); 132 133 // 134 // In case, you want to skip the cosmics rejection 135 // (NOT RECOMMENDED!!!) 136 // 137 // calcalc.SkipCosmicsRejection(); 138 139 // 140 // In case, you want to skip the quality checks 141 // (NOT RECOMMENDED!!!) 142 // 143 // calcalc.SkipQualityChecks(); 134 144 135 145 // … … 141 151 142 152 tlist2.AddToList(&read2); 143 tlist2.AddToList(&sigsig); 153 tlist2.AddToList(&sigcalc); 154 // 155 // In case, you want to skip the somewhat lengthy calculation 156 // of the arrival times using a spline, uncomment the next line 157 // 158 // tlist2.AddToList(&timecalc); 144 159 tlist2.AddToList(&calcalc); 145 160 … … 159 174 160 175 // 176 // print the most important results of all pixels 177 // 178 calcam.Print(); 179 180 // 161 181 // just one example how to get the plots of individual pixels 162 182 // 163 MCalibrationCam *cam = plist2.FindObject("MCalibrationCam"); 164 cam.Print(); 183 calcam[17].DrawClone(); 165 184 166 185 MHCamEvent camevt; … … 183 202 MHCamera disp16 (geomcam, "MCalibrationPix;RSigma/Charge", "Reduced Sigma per Charge"); 184 203 185 disp1.SetCamContent( *cam, 0);186 disp1.SetCamError( *cam,1);187 188 disp3.SetCamContent( *cam, 2);189 disp3.SetCamError( *cam,3);190 191 disp5.SetCamContent( *cam, 4);192 193 disp6.SetCamContent( *cam, 5);194 disp6.SetCamError( *cam, 6);195 disp7.SetCamContent( *cam, 6);196 disp8.SetCamContent( *cam, 7);197 198 disp9.SetCamContent( *cam, 8);199 disp9.SetCamError( *cam, 9);200 201 disp10.SetCamContent( *cam, 9);202 disp11.SetCamContent( *cam, 10);203 204 disp12.SetCamContent( *cam, 11);205 disp12.SetCamError( *cam, 12);206 207 disp13.SetCamContent( *cam, 13);208 disp13.SetCamError( *cam, 14);209 210 disp14.SetCamContent( *cam, 15);211 disp15.SetCamContent( *cam, 16);212 disp16.SetCamContent( *cam, 17);204 disp1.SetCamContent(calcam, 0); 205 disp1.SetCamError(calcam,1); 206 207 disp3.SetCamContent(calcam, 2); 208 disp3.SetCamError(calcam,3); 209 210 disp5.SetCamContent(calcam, 4); 211 212 disp6.SetCamContent(calcam, 5); 213 disp6.SetCamError(calcam, 6); 214 disp7.SetCamContent(calcam, 6); 215 disp8.SetCamContent(calcam, 7); 216 217 disp9.SetCamContent(calcam, 8); 218 disp9.SetCamError(calcam, 9); 219 220 disp10.SetCamContent(calcam, 9); 221 disp11.SetCamContent(calcam, 10); 222 223 disp12.SetCamContent(calcam, 11); 224 disp12.SetCamError(calcam, 12); 225 226 disp13.SetCamContent(calcam, 13); 227 disp13.SetCamError(calcam, 14); 228 229 disp14.SetCamContent(calcam, 15); 230 disp15.SetCamContent(calcam, 16); 231 disp16.SetCamContent(calcam, 17); 213 232 214 233 … … 239 258 c1.Divide(2,3); 240 259 241 CamDraw(c1,disp1, cam,1,2,1);242 CamDraw(c1,disp3, cam,2,2,2);260 CamDraw(c1,disp1,&calcam,1,2,1); 261 CamDraw(c1,disp3,&calcam,2,2,2); 243 262 244 263 // Fit Probability … … 246 265 c2.Divide(1,3); 247 266 248 CamDraw(c2,disp5, cam,1,1,3);267 CamDraw(c2,disp5,&calcam,1,1,3); 249 268 250 269 // Times … … 252 271 c3.Divide(3,3); 253 272 254 CamDraw(c3,disp6, cam,1,3,1);255 CamDraw(c3,disp7, cam,2,3,0);256 CamDraw(c3,disp8, cam,3,3,0);273 CamDraw(c3,disp6,&calcam,1,3,1); 274 CamDraw(c3,disp7,&calcam,2,3,0); 275 CamDraw(c3,disp8,&calcam,3,3,0); 257 276 258 277 // Pedestals … … 260 279 c4.Divide(2,3); 261 280 262 CamDraw(c4,disp9, cam,1,2,0);263 CamDraw(c4,disp10, cam,2,2,1);281 CamDraw(c4,disp9,&calcam,1,2,0); 282 CamDraw(c4,disp10,&calcam,2,2,1); 264 283 265 284 // Reduced Sigmas … … 267 286 c5.Divide(2,3); 268 287 269 CamDraw(c5,disp11, cam,1,2,2);270 CamDraw(c5,disp16, cam,2,2,2);288 CamDraw(c5,disp11,&calcam,1,2,2); 289 CamDraw(c5,disp16,&calcam,2,2,2); 271 290 272 291 // F-Factor Method … … 274 293 c6.Divide(2,3); 275 294 276 CamDraw(c6,disp12, cam,1,2,1);277 CamDraw(c6,disp13, cam,2,2,1);295 CamDraw(c6,disp12,&calcam,1,2,1); 296 CamDraw(c6,disp13,&calcam,2,2,2); 278 297 279 298 // Blind Pixel Method … … 281 300 c7.Divide(2, 3); 282 301 283 CamDraw(c7,disp14, cam,1,2,9);284 CamDraw(c7,disp15, cam,2,2,1);302 CamDraw(c7,disp14,&calcam,1,2,9); 303 CamDraw(c7,disp15,&calcam,2,2,2); 285 304 286 305 } … … 301 320 c.cd(i+2*j); 302 321 gPad->SetBorderMode(0); 303 Float_t he = gStyle->GetStatH();304 Float_t wi = gStyle->GetStatH();305 gStyle->SetStatH(0.4);306 gStyle->SetStatW(0.25);307 308 322 TH1D *obj2 = (TH1D*)obj1->Projection(); 309 323 obj2->Draw(); … … 317 331 const Double_t width = max-min; 318 332 333 if (rms == 0. || width == 0. ) 334 return; 335 319 336 switch (fit) 320 337 { 321 338 case 0: 322 339 TF1 *sgaus = new TF1("sgaus","gaus(0)",min,max); 340 sgaus->SetBit(kCanDelete); 323 341 sgaus->SetParNames("Area","#mu","#sigma"); 324 342 sgaus->SetParameters(integ/rms,mean,rms); … … 332 350 case 1: 333 351 TF1 *dgaus = new TF1("dgaus","gaus(0)+gaus(3)",min,max); 352 dgaus->SetBit(kCanDelete); 334 353 dgaus->SetParNames("A1","#mu1","#sigma1","A2","#mu2","#sigma2"); 335 354 dgaus->SetParameters(integ/width,max-width/6.,width/4., … … 347 366 case 2: 348 367 TF1 *tgaus = new TF1("tgaus","gaus(0)+gaus(3)+gaus(6)",min,max); 368 tgaus->SetBit(kCanDelete); 349 369 tgaus->SetParNames("A1","#mu1","#sigma1","A2","#mu2","#sigma2","A3","#mu3","#sigma3"); 350 370 tgaus->SetParameters(integ/width,max-width/6.,width/4., … … 375 395 } 376 396 377 gStyle->SetStatH(he);378 gStyle->SetStatW(wi);379 380 397 }
Note:
See TracChangeset
for help on using the changeset viewer.