Changeset 4105 for trunk/MagicSoft/Cosy/main/MCaos.cc
- Timestamp:
- 05/20/04 05:01:03 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/main/MCaos.cc
r4076 r4105 167 167 fHistallw->SetNameTitle("allw","Rotation angel"); 168 168 fHistallw->SetBins(26, -25, 25); 169 fHistallw->SetXTitle("\\ Phi [arcmin]");169 fHistallw->SetXTitle("\\phi [arcmin]"); 170 170 fHistallw->SetYTitle("counts"); 171 171 172 172 fHistprxpry = new TH2F; 173 fHistprxpry->SetNameTitle("prx und pry","x- and y-coord niate of the ring-center");173 fHistprxpry->SetNameTitle("prx und pry","x- and y-coordinate of the ring-center"); 174 174 fHistprxpry->SetBins(xbin, xmin, xmax, ybin, ymin, ymax); 175 fHistprxpry->SetXTitle("x [ mm]");176 fHistprxpry->SetYTitle("y [ mm]");175 fHistprxpry->SetXTitle("x [pix]"); 176 fHistprxpry->SetYTitle("y [pix]"); 177 177 fHistprxpry->SetZTitle("counts"); 178 178 … … 183 183 fGraphpry->SetTitle("time-developement of the y-coordinate of the ring-center"); 184 184 185 fGraphw = new TGraph*[fPositions.GetEntriesFast()]; 186 for (int i=0; i<fPositions.GetEntriesFast(); i++) 187 { 188 TString title = "Time-developement of the angle "; 189 title += i; 190 191 fGraphw[i] = new TGraph; 192 fGraphw[i]->SetTitle(title); 193 } 185 fGraphw = new TGraph; 186 fGraphw->SetTitle("Time-developement of rotation angle"); 194 187 195 188 fHistpr = new TH1F("pr","Radius of the ring", rbin, rmin, rmax); … … 211 204 delete fGraphprx; 212 205 delete fGraphpry; 206 delete fGraphr; 213 207 214 208 for (int i=0; i<6; i++) … … 216 210 delete fHistled[i]; 217 211 delete fHistw[i]; 218 delete fGraphw [i];212 delete fGraphw; 219 213 } 220 214 delete fHistled; … … 265 259 c2->Update(); 266 260 267 c = new TCanvas("ctime", " timedevelopement of center", 800, 800);268 c->Divide(1, 2);261 c = new TCanvas("ctime", "Timedevelopement of Center", 800, 800); 262 c->Divide(1,3); 269 263 c->cd(1); 270 264 h = fGraphprx->GetHistogram(); … … 272 266 h->SetYTitle("x [pix]"); 273 267 h->DrawCopy(); 274 //fGraphprx->DrawClone("LP*")->SetBit(kCanDelete); 268 ((TPad*)gPad)->SetSelected(NULL); 269 fGraphprx->DrawClone("ALP*")->SetBit(kCanDelete); 275 270 c->cd(2); 276 271 h = fGraphpry->GetHistogram(); … … 278 273 h->SetYTitle("y [pix]"); 279 274 h->DrawCopy(); 280 //fGraphpry->DrawClone("LP*")->SetBit(kCanDelete); 275 ((TPad*)gPad)->SetSelected(NULL); 276 fGraphpry->DrawClone("ALP*")->SetBit(kCanDelete); 277 c->cd(3); 278 h = fGraphr->GetHistogram(); 279 h->SetXTitle("time [s]"); 280 h->SetYTitle("r [pix]"); 281 h->DrawCopy(); 282 ((TPad*)gPad)->SetSelected(NULL); 283 fGraphr->DrawClone("ALP*")->SetBit(kCanDelete); 281 284 c->Modified(); 282 285 c->Update(); 286 287 c = new TCanvas("crot", "rotation angle", 800, 600); 288 c->Divide(2,1); 289 c->cd(1); 290 fHistallw->SetXTitle("\\phi [arcmin]"); 291 fHistallw->SetYTitle("counts"); 292 fHistallw->DrawCopy(); 293 c->cd(2); 294 h = fGraphw->GetHistogram(); 295 h->SetXTitle("time [s]"); 296 h->SetYTitle("\\phi [arcmin]"); 297 h->DrawCopy(); 298 ((TPad*)gPad)->SetSelected(NULL); 299 fGraphw->DrawClone("ALP*")->SetBit(kCanDelete); 300 283 301 284 302 /* -------------------------------------------------------- … … 333 351 f.MarkPoint(l1.GetX(), l1.GetY(), l1.GetMag()); 334 352 353 //old 354 /* 335 355 // Fill values into Histogram 336 356 if (!fHistpr) … … 339 359 fHistled[i]->Fill(l1.GetX(), l1.GetY()); 340 360 fHistw[i]->Fill(l1.GetPhi()); 361 */ 341 362 } 342 363 first = leds.GetEntries(); … … 344 365 345 366 Rings rings; 346 rings.CalcRings(leds, 26 6, 268);367 rings.CalcRings(leds, 265, 268); 347 368 348 369 const Ring ¢er = rings.GetCenter(); … … 358 379 fGraphprx->SetPoint(fGraphprx->GetN(), fEvtTime, center.GetX()); 359 380 fGraphpry->SetPoint(fGraphpry->GetN(), fEvtTime, center.GetY()); 381 382 //new 383 //----- 384 Double_t sum = 0; 385 for (int j=0; j<leds.GetEntries(); j++) 386 { 387 Led &l1 = leds(j); 388 389 fHistled[j]->Fill(l1.GetX(), l1.GetY()); 390 //fHistw[j]->Fill(l1.GetPhi()); 391 392 Double_t phi[6] = 393 { 394 0, 395 0, 396 0, 397 0, 398 0, 399 0 400 }; 401 402 const Double_t w = (leds(j).GetPhi()-phi[j])*60; 403 sum += w; 404 405 fHistw[j]->Fill(w); 406 sum /= leds.GetEntries(); 407 } 408 fGraphw->SetPoint(fGraphw->GetN(), fEvtTime, sum); 409 fHistallw->Fill(sum/leds.GetEntries()); 410 //----- 360 411 } 361 412
Note:
See TracChangeset
for help on using the changeset viewer.