#include <AlgAltDeMux.h>
Inheritance diagram for AlgAltDeMux:

|
|
Definition at line 46 of file AlgAltDeMux.cxx. References MSG. 00046 : AlgAltDeMuxBase("Beam") 00047 { 00048 //default constructor 00049 00050 MSG("AlgAltDeMux", Msg::kDebug) << "AlgAltDeMux Constructor" << endl; 00051 MSG("AlgAltDeMux", Msg::kDebug) << "XTalkFraction = " << fXTalkFraction << endl; 00052 MSG("AlgAltDeMux", Msg::kDebug) << "XTalk1PEFraction = " << fXTalk1PEFraction << endl; 00053 MSG("AlgAltDeMux", Msg::kDebug) << "XTalk2PEFraction = " << fXTalk2PEFraction << endl; 00054 MSG("AlgAltDeMux", Msg::kDebug) << "XTalk5PEFraction = " << fXTalk5PEFraction << endl; 00055 MSG("AlgAltDeMux", Msg::kDebug) << "NoiseTimeWindow = " << fNoiseTimeWindow << endl; 00056 00057 showTiming = false; 00058 fClearArrayTime=0; 00059 fMakePixelMapTime=0; 00060 fDisplayPixelMapTime=0; 00061 fMakeAltListMapTime=0; 00062 fStripNoiseTime=0; 00063 fStripCrossTalkTime=0; 00064 fFillLowestHighestTime=0; 00065 fGetFibreLengthsTime=0; 00066 fMakeTimingMask1Time=0; 00067 fMakeTimingMask2Time=0; 00068 fDeMuxPass0Time=0; 00069 fDeMuxPass1Time=0; 00070 fDeMuxPass2Time=0; 00071 fReMakeMaskTime=0; 00072 fValidateTime=0; 00073 fHoughTime=0; 00074 fNewFitsTime=0; 00075 fDeMuxPass3Time=0; 00076 fDeMuxPass4Time=0; 00077 fAddBackCrossTalkTime=0; 00078 fDeMuxPass5Time=0; 00079 fEventIDTime=0; 00080 fThroughMuonTime=0; 00081 fReBuildXTalkTime=0; 00082 fStripCrossTalkSinglesTime=0; 00083 fCleanMultipleTime=0; 00084 fContainedTime=0; 00085 fReTagCrossTalkTime=0; 00086 00087 fDeMuxPreparationTime = 0; 00088 fDeMuxGoldenHitsTime = 0; 00089 fDeMuxAsMultipleMuonTime = 0; 00090 fDeMuxAsStraightSingleMuonTime =0; 00091 fDeMuxAsUnknownEventTypeTime = 0; 00092 fValidateThroughGoingMuonTime =0; 00093 fValidateContainedCandidateTime =0; 00094 fDeMuxTidyUpTime =0; 00095 fSearchAndDestroyTime =0; 00096 fTotalTime =0; 00097 00098 fNEvents=0; 00099 }
|
|
|
Definition at line 103 of file AlgAltDeMux.cxx. 00104 {
00105
00106 }
|
|
|
Definition at line 474 of file AlgAltDeMux.cxx. References AlgAltDeMuxBase::CleanMultiple(), AlgAltDeMuxBase::DeMuxPass(), fCleanMultipleTime, fDeMuxPass1Time, fDeMuxPass2Time, fDeMuxPass3Time, fDeMuxPass4Time, fHoughTime, fStripCrossTalkSinglesTime, AlgAltDeMuxBase::Hough(), AlgAltDeMuxBase::ReMuxPlane(), and AlgAltDeMuxBase::StripCrossTalkSingles(). Referenced by RunAlg(). 00474 {
00475
00476 struct timeval tpbefore;
00477 struct timeval tpafter;
00478
00479 // ***************** ReMux stray hits ******************
00480 gettimeofday(&tpbefore, 0);
00481 CleanMultiple();
00482 gettimeofday(&tpafter, 0);
00483 fCleanMultipleTime += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00484
00485 // ***************** DeMux pass 2 ******************
00486 gettimeofday(&tpbefore, 0);
00487 DeMuxPass(2);
00488 gettimeofday(&tpafter, 0);
00489 fDeMuxPass2Time += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00490
00491 // ***************** DeMux pass 3 ******************
00492 fUseFitSlopeTime = false;
00493 fUseFitSlopeHits = false;
00494 gettimeofday(&tpbefore, 0);
00495 DeMuxPass(3);
00496 DeMuxPass(33);
00497 gettimeofday(&tpafter, 0);
00498 fDeMuxPass3Time += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00499 // ***************** StripCrossTalkSingles ******************
00500
00501 gettimeofday(&tpbefore, 0);
00502 StripCrossTalkSingles(cdlh);
00503 gettimeofday(&tpafter, 0);
00504 fStripCrossTalkSinglesTime += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00505
00506 // ***************** DeMux pass 4 ******************
00507 gettimeofday(&tpbefore, 0);
00508 DeMuxPass(4);
00509 gettimeofday(&tpafter, 0);
00510 fDeMuxPass4Time += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00511 if(fDiagnosticPlots)cout << "Done DEMUXPASS(4)" << endl;
00512 //if(fDiagnosticPlots)getchar();
00513
00514
00515 // ***************** Hough Transform of basic DeMux Solution ******************
00516 gettimeofday(&tpbefore, 0);
00517 Hough();
00518 gettimeofday(&tpafter, 0);
00519 fHoughTime += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00520 if(fDiagnosticPlots)cout << "Done Hough Again" << endl;
00521 //if(fDiagnosticPlots)getchar();
00522
00523 // ***************** Erase Solution for all planes
00524 for(Int_t i=0; i<MAX_NUMBER_OF_PLANES;i++)ReMuxPlane(i);
00525 // Reset the DeMuxed group ID counter
00526 fUniqueDeMuxedGroupID=0;
00527
00528
00529 // ***************** DeMux pass 1 (using Hough Solutions) ******************
00530 gettimeofday(&tpbefore, 0);
00531 DeMuxPass(11);
00532 gettimeofday(&tpafter, 0);
00533 fDeMuxPass1Time += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00534 //if(fDiagnosticPlots)getchar();
00535
00536
00537 gettimeofday(&tpbefore, 0);
00538 DeMuxPass(2);
00539 gettimeofday(&tpafter, 0);
00540 fDeMuxPass2Time += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00541
00542 gettimeofday(&tpbefore, 0);
00543 DeMuxPass(3);
00544 gettimeofday(&tpafter, 0);
00545 fDeMuxPass3Time += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00546
00547 gettimeofday(&tpbefore, 0);
00548 DeMuxPass(4);
00549 gettimeofday(&tpafter, 0);
00550 fDeMuxPass4Time += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00551
00552 // ***************** Final Hough Transform ******************
00553 gettimeofday(&tpbefore, 0);
00554 Hough();
00555 gettimeofday(&tpafter, 0);
00556 fHoughTime += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00557 // ***************** Clean up event
00558
00559 gettimeofday(&tpbefore, 0);
00560 CleanMultiple();
00561 gettimeofday(&tpafter, 0);
00562 fCleanMultipleTime += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00563
00564 return;
00565 }
|
|
|
Definition at line 655 of file AlgAltDeMux.cxx. References DeMuxAsUnknownEventType(). Referenced by RunAlg(). 00655 {
00656
00657 this->DeMuxAsUnknownEventType(cdlh);
00658 return;
00659 }
|
|
|
Definition at line 567 of file AlgAltDeMux.cxx. References AlgAltDeMuxBase::DeMuxPass(), fDeMuxPass2Time, fDeMuxPass3Time, fDeMuxPass4Time, fFitsTime, AlgAltDeMuxBase::FitAsCosmic(), fReMakeMaskTime, fStripCrossTalkSinglesTime, fValidateTime, AlgAltDeMuxBase::ReMakeMask(), AlgAltDeMuxBase::StripCrossTalkSingles(), and AlgAltDeMuxBase::ValidateBeamPlane(). Referenced by DeMuxAsStraightSingleMuon(), and RunAlg(). 00567 {
00568
00569 struct timeval tpbefore;
00570 struct timeval tpafter;
00571
00572 gettimeofday(&tpbefore, 0);
00573 DeMuxPass(2);
00574 gettimeofday(&tpafter, 0);
00575 fDeMuxPass2Time += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00576
00577 fUseFitSlopeTime = false;
00578 fUseFitSlopeHits = false;
00579 gettimeofday(&tpbefore, 0);
00580 DeMuxPass(3);
00581 gettimeofday(&tpafter, 0);
00582 fDeMuxPass3Time += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00583 if(fDiagnosticPlots)cout << "DEMUX 3 " << endl;
00584 //if(fDiagnosticPlots)getchar();
00585
00586 gettimeofday(&tpbefore, 0);
00587 StripCrossTalkSingles(cdlh);
00588 gettimeofday(&tpafter, 0);
00589 fStripCrossTalkSinglesTime += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00590
00591 DeMuxPass(33);
00592
00593 gettimeofday(&tpbefore, 0);
00594 ReMakeMask();
00595 gettimeofday(&tpafter, 0);
00596 fReMakeMaskTime += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00597
00598 gettimeofday(&tpbefore, 0);
00599 FitAsCosmic();
00600 gettimeofday(&tpafter, 0);
00601 fFitsTime += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00602 //if(fDiagnosticPlots)getchar();
00603
00604
00605 gettimeofday(&tpbefore, 0);
00606 DeMuxPass(2);
00607 gettimeofday(&tpafter, 0);
00608 fDeMuxPass2Time += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00609
00610 fUseFitSlopeTime = false;
00611 fUseFitSlopeHits = false;
00612 gettimeofday(&tpafter, 0);
00613 bool changed;
00614 changed = false;
00615 if(fEventType!=SINGLE_MUON){
00616 for(Int_t i=0; i<MAX_NUMBER_OF_PLANES;i++){
00617 // bool thisPlaneChanged = ValidateBeamPlane(i);
00618 bool thisPlaneChanged = ValidateBeamPlane(i);
00619 changed = changed || thisPlaneChanged;
00620 }
00621 }
00622
00623 if(changed){
00624 //cout << "REMAKE MASK/FITS " << endl;
00625 ReMakeMask();
00626 FitAsCosmic();
00627 DeMuxPass(3);
00628 }
00629 //cout << " validate plane, fit, pass 3 done" << endl;
00630 //if(fDiagnosticPlots)getchar();
00631 gettimeofday(&tpafter, 0);
00632 fValidateTime += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00633 //if(fDiagnosticPlots)getchar();
00634
00635 gettimeofday(&tpbefore, 0);
00636 //cout << "going into DeMuxPass(4) " << endl;
00637 DeMuxPass(4);
00638 gettimeofday(&tpafter, 0);
00639 fDeMuxPass4Time += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00640
00641
00642
00643
00644 //cout << "---------------------------->Done DEMUXPASS(4)" << endl;
00645
00646
00647 //if(fDiagnosticPlots)getchar();
00648 return;
00649
00650
00651 }
|
|
|
Definition at line 411 of file AlgAltDeMux.cxx. References AlgAltDeMuxBase::BestGuessForView(), AlgAltDeMuxBase::DeMuxPass(), AlgAltDeMuxBase::DrawDiagnosticPlots(), fDeMuxPass0Time, fDeMuxPass1Time, fMakeTimingMask1Time, fMakeTimingMask2Time, AlgAltDeMuxBase::MakeTimingMask(), MSG, CandDeMuxDigitListHandle::SetDeMuxDigitListFlagBit(), CandDeMuxDigitListHandle::SetNumValidPlanesU(), and CandDeMuxDigitListHandle::SetNumValidPlanesV(). Referenced by RunAlg(). 00411 {
00412
00413 struct timeval tpbefore;
00414 struct timeval tpafter;
00415
00416
00417 // First make a mask using timing information
00418 gettimeofday(&tpbefore, 0);
00419 MakeTimingMask(false);
00420 gettimeofday(&tpafter, 0);
00421 fMakeTimingMask1Time += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00422 //if(fDiagnosticPlots)getchar();
00423
00424
00425
00426 // Iterate on timing mask - bootstrap U and V view timing information
00427 gettimeofday(&tpbefore, 0);
00428 MakeTimingMask(true);
00429 gettimeofday(&tpafter, 0);
00430 fMakeTimingMask2Time += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00431
00432
00433
00434 // Now first demux pass - build a mask using loose cuts
00435 gettimeofday(&tpbefore, 0);
00436 DeMuxPass(0);
00437 gettimeofday(&tpafter, 0);
00438 fDeMuxPass0Time += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00439
00440 // Start to demux event for real
00441 gettimeofday(&tpbefore, 0);
00442 DeMuxPass(1);
00443 gettimeofday(&tpafter, 0);
00444 fDeMuxPass1Time += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00445
00446
00447 cdlh.SetNumValidPlanesU(_nDeMuxedPlanesU);
00448 cdlh.SetNumValidPlanesV(_nDeMuxedPlanesV);
00449
00450 if(_nDeMuxedPlanesU < 2 && _nDeMuxedPlanesV < 2 ){
00451 cdlh.SetDeMuxDigitListFlagBit(CandDeMuxDigitList::kTooFewValidPlanes);
00452 }else{
00453 if(_nDeMuxedPlanesU < 2 ){
00454 cdlh.SetDeMuxDigitListFlagBit(CandDeMuxDigitList::kEventFailedFilterUViewOnly);
00455 }
00456 if(_nDeMuxedPlanesV < 2 ){
00457 cdlh.SetDeMuxDigitListFlagBit(CandDeMuxDigitList::kEventFailedFilterVViewOnly);
00458 }
00459 }
00460
00461
00462 if(_nDeMuxedPlanesU < 2 || _nDeMuxedPlanesV < 2 ){
00463 MSG("AlgAltDeMux", Msg::kDebug) << "AlgAltDeMux::DeMuxGoldenHits too few golden planes - use best guess solution " << endl;
00464 // now we are in trouble - make wild guesses
00465 if(_nDeMuxedPlanesU < 2)BestGuessForView(PlaneView::kU);
00466 if(_nDeMuxedPlanesV < 2)BestGuessForView(PlaneView::kV);
00467 if(fDiagnosticPlots)DrawDiagnosticPlots(1);
00468 }
00469
00470 return;
00471
00472 }
|
|
|
Definition at line 353 of file AlgAltDeMux.cxx. References AlgAltDeMuxBase::ClearArrays(), AlgAltDeMuxBase::ClearDiagnosticHistos(), fClearArrayTime, fFillLowestHighestTime, fGetFibreLengthsTime, AlgAltDeMuxBase::FillLowestHighest(), fMakeAltListMapTime, fMakePixelMapTime, fStripCrossTalkTime, fStripNoiseTime, AlgAltDeMuxBase::GetFibreLengths(), AlgAltDeMuxBase::MakeAltListMap(), AlgAltDeMuxBase::MakePixelMap(), AlgAltDeMuxBase::StripCrossTalk(), and AlgAltDeMuxBase::StripNoise(). Referenced by RunAlg(). 00353 {
00354
00355 struct timeval tpbefore;
00356 struct timeval tpafter;
00357
00358
00359 // Reset diagnostic histograms
00360 if(fDiagnosticPlots)ClearDiagnosticHistos();
00361
00362 // clear/zero main arrays and vectors
00363 gettimeofday(&tpbefore, 0);
00364 ClearArrays();
00365 gettimeofday(&tpafter, 0);
00366 fClearArrayTime += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00367
00368 // make map of PMT pixels for cross-talk removal
00369 gettimeofday(&tpbefore, 0);
00370 MakePixelMap(cdlh);
00371 gettimeofday(&tpafter, 0);
00372 fMakePixelMapTime += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00373 //DisplayPixelMap();
00374
00375 // fill basic data structure (NOT using Navigator class in AlgAltDeMux)
00376 gettimeofday(&tpbefore, 0);
00377 MakeAltListMap(cdlh);
00378 gettimeofday(&tpafter, 0);
00379 fMakeAltListMapTime += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00380
00381
00382
00383 // strip out any out-of-time hits
00384 gettimeofday(&tpbefore, 0);
00385 StripNoise();
00386 gettimeofday(&tpafter, 0);
00387 fStripNoiseTime += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00388
00389 // remove cross-talk
00390 gettimeofday(&tpbefore, 0);
00391 StripCrossTalk(cdlh);
00392 gettimeofday(&tpafter, 0);
00393 fStripCrossTalkTime += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00394
00395 // get lowest and highest plane numbers
00396 gettimeofday(&tpbefore, 0);
00397 FillLowestHighest();
00398 gettimeofday(&tpafter, 0);
00399 fFillLowestHighestTime += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00400
00401 // get the fibre lengths for this event and dump into an array
00402 gettimeofday(&tpbefore, 0);
00403 GetFibreLengths();
00404 gettimeofday(&tpafter, 0);
00405 fGetFibreLengthsTime += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00406
00407 return;
00408
00409 }
|
|
|
Definition at line 710 of file AlgAltDeMux.cxx. References AlgAltDeMuxBase::AddBackCrossTalk(), AlgAltDeMuxBase::AddBackNoise(), AlgAltDeMuxBase::CleanIsolatedHits(), CONTAINED_EVENT, AlgAltDeMuxBase::DeMuxPass(), AlgAltDeMuxBase::DeMuxWhatsLeft(), AlgAltDeMuxBase::EventID(), fAddBackCrossTalkTime, fDeMuxPass5Time, AlgAltDeMuxBase::FinalReTagCrossTalk(), fReBuildXTalkTime, fReTagCrossTalkTime, AlgAltDeMuxBase::ReBuildXTalkMap(), and AlgAltDeMuxBase::ValidateCCEndPlanes(). Referenced by RunAlg(). 00710 {
00711
00712 struct timeval tpbefore;
00713 struct timeval tpafter;
00714
00715 gettimeofday(&tpbefore, 0);
00716 ReBuildXTalkMap();
00717 gettimeofday(&tpafter, 0);
00718 fReBuildXTalkTime += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00719 //if(fDiagnosticPlots)getchar();
00720
00721 amShowing = false;
00722 gettimeofday(&tpbefore, 0);
00723 // ********************************** !!!!!!!!!!!!!!!!!!!!!!!!!!
00724
00725 AddBackCrossTalk();
00726
00727 AddBackNoise();
00728 gettimeofday(&tpafter, 0);
00729 fAddBackCrossTalkTime += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00730
00731 gettimeofday(&tpbefore, 0);
00732 DeMuxPass(5);
00733 gettimeofday(&tpafter, 0);
00734 fDeMuxPass5Time += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00735
00736 //if(fDiagnosticPlots)getchar();
00737
00738
00739
00740 DeMuxWhatsLeft();
00741
00742 CleanIsolatedHits();
00743
00744 //***********************
00745 gettimeofday(&tpbefore, 0);
00746 FinalReTagCrossTalk(cdlh);
00747 gettimeofday(&tpafter, 0);
00748 fReTagCrossTalkTime += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00749
00750 fEventType = EventID();
00751
00752
00753 if(fEventType==CONTAINED_EVENT || fEventType==PARTIALLY_CONTAINED_EVENT){
00754 ValidateCCEndPlanes();
00755 }
00756
00757
00758
00759
00760 //***********************
00761
00762 }
|
|
||||||||||||||||
|
Reimplemented from AlgAltDeMuxBase. Definition at line 110 of file AlgAltDeMux.cxx. References CONTAINED_EVENT, AlgAltDeMuxBase::CreateDiagnosticCanvas(), DeMuxAsMultipleMuon(), DeMuxAsStraightSingleMuon(), DeMuxAsUnknownEventType(), DeMuxGoldenHits(), DeMuxPreparation(), DeMuxTidyUp(), AlgAltDeMuxBase::DrawDiagnosticPlots(), AlgAltDeMuxBase::EventID(), fAddBackCrossTalkTime, fClearArrayTime, fDeMuxAsMultipleMuonTime, fDeMuxAsStraightSingleMuonTime, fDeMuxAsUnknownEventTypeTime, fDeMuxGoldenHitsTime, fDeMuxPass0Time, fDeMuxPass1Time, fDeMuxPass2Time, fDeMuxPass3Time, fDeMuxPass4Time, fDeMuxPass5Time, fDeMuxPreparationTime, fDeMuxTidyUpTime, fEventIDTime, fFillLowestHighestTime, fGetFibreLengthsTime, fHoughTime, AlgAltDeMuxBase::FitAsCosmic(), fMakeAltListMapTime, fMakePixelMapTime, fMakeTimingMask1Time, fMakeTimingMask2Time, fNEvents, fNewFitsTime, fReBuildXTalkTime, fReMakeMaskTime, fSearchAndDestroyTime, fStripCrossTalkSinglesTime, fStripCrossTalkTime, fStripNoiseTime, fThroughMuonTime, fTotalTime, fValidateContainedCandidateTime, fValidateThroughGoingMuonTime, fValidateTime, Registry::Get(), CandHandle::GetCandRecord(), RecMinos::GetVldContext(), AlgAltDeMuxBase::Hough(), MSG, MULTIPLE_MUON, PARTIALLY_CONTAINED_EVENT, AlgAltDeMuxBase::PrintNoise(), AlgAltDeMuxBase::PrintWhatRemains(), AlgAltDeMuxBase::SearchAndDestroy(), AlgAltDeMuxBase::SetConstants(), CandDeMuxDigitListHandle::SetDeMuxDigitListFlagBit(), showTiming, SINGLE_MUON, STOPPING_MUON, STRAIGHT_THROUGH_GOING_MUON, THROUGH_GOING_MUON, AlgAltDeMuxBase::TidyUp(), UNKNOWN, ValidateContainedCandidate(), and ValidateThroughGoingMuon(). 00112 {
00113 MSG("AltDeMux", Msg::kDebug) << "RunAlg" << endl;
00114
00115 assert( ch.InheritsFrom("CandDigitListHandle") );
00116 CandDeMuxDigitListHandle &cdlh = dynamic_cast<CandDeMuxDigitListHandle&>(ch);
00117
00118 Int_t tmpi;
00119 tmpi = 0;
00120 fDiagnosticPlots = false;
00121 if (acd.Get("DisplayDiagnosticPlots", tmpi)){
00122 if(tmpi!=0)fDiagnosticPlots = true;
00123 }else {
00124 MSG("AltDeMux", Msg::kError)
00125 << "RunAlg() Missing AlgConfig parameter: DiagnosticPlots" << endl;
00126 }
00127
00128 tmpi = 0;
00129 amWriting = false;
00130 if (acd.Get("UltraVerbose", tmpi)){
00131 if(tmpi!=0)amWriting = true;
00132 }else {
00133 MSG("AltDeMux", Msg::kError)
00134 << "RunAlg() Missing AlgConfig parameter: UltraVerbose" << endl;
00135 }
00136
00137
00138 tmpi = 0;
00139 showTiming = false;
00140 if (acd.Get("ShowTiming", tmpi)){
00141 if(tmpi!=0)showTiming = true;
00142 }else {
00143 MSG("AltDeMux", Msg::kError)
00144 << "RunAlg() Missing AlgConfig parameter: ShowTiming" << endl;
00145 }
00146
00147
00148
00149 Double_t tmpf;
00150 fSigmasForTimingWindow = 2.5;
00151 if(acd.Get("SigmasForTimingWindow",tmpf)){
00152 fSigmasForTimingWindow = tmpf;
00153 }else{
00154 MSG("AltDeMux", Msg::kError)
00155 << "RunAlg() Missing AlgConfig parameter: SigmasForTimingWindow" << endl;
00156 }
00157 MSG("AlgAltDeMux", Msg::kVerbose) << "AlgAltDeMux::DeMuxGoldenHits S.D.s for timing window " << fSigmasForTimingWindow<< endl;
00158
00159
00160 if(fDiagnosticPlots)CreateDiagnosticCanvas();
00161
00162
00163 // get handle to UgliGeometry
00164 const VldContext* vldc = ch.GetCandRecord()->GetVldContext();
00165 UgliGeomHandle ugh(*vldc);
00166 pUgh = &ugh;
00167 SetConstants(vldc);
00168
00169 struct timeval tpbefore;
00170 struct timeval tpafter;
00171 struct timeval tpbeforeX;
00172 struct timeval tpafterX;
00173
00174 gettimeofday(&tpbeforeX, 0);
00175
00176 gettimeofday(&tpbefore, 0);
00177 this->DeMuxPreparation(cdlh);
00178 // Have now constructed basic structures - now proceed to DeMux event
00179 gettimeofday(&tpafter, 0);
00180 fDeMuxPreparationTime += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00181
00182
00183 gettimeofday(&tpbefore, 0);
00184 this->DeMuxGoldenHits(cdlh);
00185 gettimeofday(&tpafter, 0);
00186 fDeMuxGoldenHitsTime += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00187
00188 // Perform a Hough transform on Golden hits
00189 gettimeofday(&tpbefore, 0);
00190 Hough();
00191 gettimeofday(&tpafter, 0);
00192 fHoughTime += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00193
00194 // Switch off Multiple-muon tagging
00195 // if(fEventType==MULTIPLE_MUON)fEventType = UNKNOWN;
00196
00197
00198 if(fEventType != MULTIPLE_MUON){
00199 gettimeofday(&tpbefore, 0);
00200 FitAsCosmic();
00201 gettimeofday(&tpafter, 0);
00202 fNewFitsTime += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00203 //cout << " Done FitAsCosmic " << endl;
00204 //if(fDiagnosticPlots)getchar();
00205 }
00206
00207 switch(fEventType){
00208 case MULTIPLE_MUON:
00209 //getchar();
00210 cdlh.SetDeMuxDigitListFlagBit(CandDeMuxDigitList::kMultipleMuonEvent);
00211 gettimeofday(&tpbefore, 0);
00212 DeMuxAsMultipleMuon(cdlh);
00213 gettimeofday(&tpafter, 0);
00214 fDeMuxAsMultipleMuonTime += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00215 break;
00216 case SINGLE_MUON:
00217 gettimeofday(&tpbefore, 0);
00218 DeMuxAsStraightSingleMuon(cdlh);
00219 gettimeofday(&tpafter, 0);
00220 fDeMuxAsStraightSingleMuonTime += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00221 break;
00222 default:
00223 gettimeofday(&tpbefore, 0);
00224 DeMuxAsUnknownEventType(cdlh);
00225 gettimeofday(&tpafter, 0);
00226 fDeMuxAsUnknownEventTypeTime += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00227 break;
00228 }
00229
00230 gettimeofday(&tpbefore, 0);
00231 fEventType = EventID();
00232 gettimeofday(&tpafter, 0);
00233 fEventIDTime += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00234
00235 switch(fEventType){
00236 case MULTIPLE_MUON:
00237 MSG("AlgAltDeMux", Msg::kDebug) << "AlgAltDeMux::RunAlg EventType : MULTIPLE_MUON" << endl;
00238 break;
00239 case SINGLE_MUON:
00240 MSG("AlgAltDeMux", Msg::kDebug) << "AlgAltDeMux::RunAlg EventType : SINGLE_MUON" << endl;
00241 gettimeofday(&tpbefore, 0);
00242 SearchAndDestroy();
00243 gettimeofday(&tpafter, 0);
00244 fSearchAndDestroyTime += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00245 break;
00246 case STRAIGHT_THROUGH_GOING_MUON:
00247 MSG("AlgAltDeMux", Msg::kDebug) << "AlgAltDeMux::RunAlg EventType : THROUGH GOING SINGLE MUON (Straight)" << endl;
00248 break;
00249 case UNKNOWN:
00250 MSG("AlgAltDeMux", Msg::kDebug) << "AlgAltDeMux::RunAlg EventType : UNKNOWN " << endl;
00251 gettimeofday(&tpbefore, 0);
00252 SearchAndDestroy();
00253 gettimeofday(&tpafter, 0);
00254 fSearchAndDestroyTime += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00255 break;
00256 case THROUGH_GOING_MUON:
00257 MSG("AlgAltDeMux", Msg::kDebug) << "AlgAltDeMux::RunAlg EventType : THROUGH_GOING_MUON" << endl;
00258 gettimeofday(&tpbefore, 0);
00259 ValidateThroughGoingMuon(cdlh);
00260 gettimeofday(&tpafter, 0);
00261 fValidateThroughGoingMuonTime += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00262 break;
00263 case CONTAINED_EVENT:
00264 case PARTIALLY_CONTAINED_EVENT:
00265 MSG("AlgAltDeMux", Msg::kDebug) << "AlgAltDeMux::RunAlg EventType : CONTAINED_EVENT" << endl;
00266 gettimeofday(&tpbefore, 0);
00267 SearchAndDestroy();
00268 gettimeofday(&tpafter, 0);
00269 fSearchAndDestroyTime += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00270
00271 gettimeofday(&tpbefore, 0);
00272 ValidateContainedCandidate(cdlh);
00273 gettimeofday(&tpafter, 0);
00274 fValidateContainedCandidateTime += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00275 break;
00276 case STOPPING_MUON:
00277 MSG("AlgAltDeMux", Msg::kDebug) << "AlgAltDeMux::RunAlg EventType : STOPPING_MUON" << endl;
00278 gettimeofday(&tpbefore, 0);
00279 SearchAndDestroy();
00280 gettimeofday(&tpafter, 0);
00281 fSearchAndDestroyTime += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00282
00283 break;
00284 default:
00285 break;
00286 }
00287
00288
00289 gettimeofday(&tpbefore, 0);
00290 this->DeMuxTidyUp(cdlh);
00291 gettimeofday(&tpafter, 0);
00292 fDeMuxTidyUpTime += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00293
00294
00295 if(fDiagnosticPlots)DrawDiagnosticPlots(4);
00296
00297 fNEvents += 1.;
00298
00299
00300 //if(fDiagnosticPlots)
00301 this->PrintWhatRemains();
00302 //if(fDiagnosticPlots)
00303 this->PrintNoise();
00304
00305
00306 // Cleanly delete all root objects stored in a TList
00307
00308 TidyUp();
00309 //if(fDiagnosticPlots)getchar();
00310
00311 gettimeofday(&tpafterX, 0);
00312 fTotalTime += (tpafterX.tv_sec-tpbeforeX.tv_sec)*1E3+(tpafterX.tv_usec-tpbeforeX.tv_usec)/1E3;
00313
00314 if(showTiming){
00315 cout << " Total Time/evt : " << fTotalTime/fNEvents << " ms" << endl;
00316 cout << "-------------------------------------------------------------" << endl;
00317 cout << " Preparation Time/evt : " << fDeMuxPreparationTime/fNEvents << " ms" << endl; cout << " DeMuxGoldenHits Time/evt : " << fDeMuxGoldenHitsTime/fNEvents << " ms" << endl;
00318 cout << " DeMuxAsMultipleMuon Time/evt : " << fDeMuxAsMultipleMuonTime/fNEvents << " ms" << endl;
00319 cout << " DeMuxAsStraightMuon Time/evt : " << fDeMuxAsStraightSingleMuonTime/fNEvents << " ms" << endl;
00320 cout << " ValidateThruMuon Time/evt : " << fValidateThroughGoingMuonTime/fNEvents << " ms" << endl;
00321 cout << " ValidateContCand Time/evt : " << fValidateContainedCandidateTime/fNEvents << " ms" << endl;
00322 cout << " SearchAndDestroy Time/evt : " << fSearchAndDestroyTime/fNEvents << " ms" << endl; cout << " DeMuxTidyUp Time/evt : " << fDeMuxTidyUpTime/fNEvents << " ms" << endl;
00323 cout << "-------------------------------------------------------------" << endl;
00324 cout << " ClearArray Time/evt : " << fClearArrayTime/fNEvents << " ms" << endl;
00325 cout << " MakePixelMap Time/evt : " << fMakePixelMapTime/fNEvents << " ms" << endl;
00326 cout << " MakeAltListMap Time/evt : " << fMakeAltListMapTime/fNEvents << " ms" << endl;
00327 cout << " StripNoise Time/evt : " << fStripNoiseTime/fNEvents << " ms" << endl;
00328 cout << " StripCrossTalk Time/evt : " << fStripCrossTalkTime/fNEvents << " ms" << endl;
00329 cout << " FillLowestHighest Time/evt : " << fFillLowestHighestTime/fNEvents << " ms" << endl;
00330 cout << " GetFibreLengths Time/evt : " << fGetFibreLengthsTime/fNEvents << " ms" << endl;
00331 cout << " MakeTimingMask1 Time/evt : " << fMakeTimingMask1Time/fNEvents << " ms" << endl;
00332 cout << " MakeTimingMask2 Time/evt : " << fMakeTimingMask2Time/fNEvents << " ms" << endl;
00333 cout << " DeMuxPass0 Time/evt : " << fDeMuxPass0Time/fNEvents << " ms" << endl;
00334 cout << " DeMuxPass1 Time/evt : " << fDeMuxPass1Time/fNEvents << " ms" << endl;
00335 cout << " Hough Time Time/evt : " << fHoughTime/fNEvents << " ms" << endl;
00336 cout << " DeMuxPass2 Time/evt : " << fDeMuxPass2Time/fNEvents << " ms" << endl;
00337 cout << " DeMuxPass3 Time/evt : " << fDeMuxPass3Time/fNEvents << " ms" << endl;
00338 cout << " StripXTalkSingles Time/evt : " << fStripCrossTalkSinglesTime/fNEvents << " ms" << endl;
00339 cout << " ReMakeMask Time/evt : " << fReMakeMaskTime/fNEvents << " ms" << endl;
00340 cout << " FitAsCosmic Time/evt : " << fNewFitsTime/fNEvents << " ms" << endl;
00341 cout << " Validate Time/evt : " << fValidateTime/fNEvents << " ms" << endl;
00342 cout << " EventIDTime Time/evt : " << fEventIDTime/fNEvents << " ms" << endl;
00343 cout << " ThroughMuonTime Time/evt : " << fThroughMuonTime/fNEvents << " ms" << endl;
00344 cout << " DeMuxPass4 Time/evt : " << fDeMuxPass4Time/fNEvents << " ms" << endl;
00345 cout << " AddBackCrossTalk Time/evt : " << fAddBackCrossTalkTime/fNEvents << " ms" << endl;
00346 cout << " ReBuildXTalk Time/evt : " << fReBuildXTalkTime/fNEvents << " ms" << endl;
00347 cout << " DeMuxPass5 Time/evt : " << fDeMuxPass5Time/fNEvents << " ms" << endl;
00348 }
00349
00350 return;
00351 }
|
|
|
Reimplemented from AlgAltDeMuxBase. Definition at line 765 of file AlgAltDeMux.cxx. 00766 {
00767 cout << "IN TRACE " << endl;
00768
00769 }
|
|
|
Definition at line 686 of file AlgAltDeMux.cxx. References AlgAltDeMuxBase::DeMuxPass(), AlgAltDeMuxBase::DrawDiagnosticPlots(), AlgAltDeMuxBase::EventID(), fContainedTime, MSG, and AlgAltDeMuxBase::ValidateContainedCandidateEndPlanes(). Referenced by RunAlg(). 00686 {
00687
00688 struct timeval tpbefore;
00689 struct timeval tpafter;
00690
00691 gettimeofday(&tpbefore, 0);
00692 bool changed = ValidateContainedCandidateEndPlanes();
00693 if(changed)DeMuxPass(3);
00694 if(changed)DeMuxPass(4);
00695 if(changed)DrawDiagnosticPlots(4);
00696 if(changed)fEventType = EventID();
00697 // if(amWriting){
00698 if(fEventType!=CONTAINED_EVENT)MSG("AlgAltDeMux", Msg::kDebug) << "AlgAltDeMux::ValidateContainedCandidate EventType : CONTAINED_EVENT -> SINGLE_MUON" << endl;
00699 if(fEventType==CONTAINED_EVENT)MSG("AlgAltDeMux", Msg::kDebug) << "AlgAltDeMux::ValidateContainedCandidate still a CONTAINED_EVENT" << endl;
00700 //}
00701 gettimeofday(&tpafter, 0);
00702 fContainedTime += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00703
00704 return;
00705
00706 }
|
|
|
Definition at line 662 of file AlgAltDeMux.cxx. References AlgAltDeMuxBase::DeMuxPass(), AlgAltDeMuxBase::FitAsCosmic(), fThroughMuonTime, and AlgAltDeMuxBase::SearchAndDestroy(). Referenced by RunAlg(). 00662 {
00663
00664 struct timeval tpbefore;
00665 struct timeval tpafter;
00666
00667 gettimeofday(&tpbefore, 0);
00668 if(fEventType==THROUGH_GOING_MUON){
00669 FitAsCosmic(true);
00670 DeMuxPass(2);
00671 DeMuxPass(3);
00672 DeMuxPass(33);
00673 DeMuxPass(4);
00674 }
00675 gettimeofday(&tpafter, 0);
00676 fThroughMuonTime += (tpafter.tv_sec-tpbefore.tv_sec)*1E3+(tpafter.tv_usec-tpbefore.tv_usec)/1E3;
00677 //cout << "done ID + through-going " << endl;
00678 //if(fDiagnosticPlots)getchar();
00679 SearchAndDestroy();
00680
00681 return;
00682
00683
00684 }
|
|
|
Definition at line 80 of file AlgAltDeMux.h. Referenced by DeMuxTidyUp(), and RunAlg(). |
|
|
Definition at line 83 of file AlgAltDeMux.h. Referenced by DeMuxAsMultipleMuon(). |
|
|
Definition at line 56 of file AlgAltDeMux.h. Referenced by DeMuxPreparation(), and RunAlg(). |
|
|
Definition at line 84 of file AlgAltDeMux.h. Referenced by ValidateContainedCandidate(). |
|
|
Definition at line 89 of file AlgAltDeMux.h. Referenced by RunAlg(). |
|
|
Definition at line 90 of file AlgAltDeMux.h. Referenced by RunAlg(). |
|
|
Definition at line 91 of file AlgAltDeMux.h. Referenced by RunAlg(). |
|
|
Definition at line 88 of file AlgAltDeMux.h. Referenced by RunAlg(). |
|
|
Definition at line 67 of file AlgAltDeMux.h. Referenced by DeMuxGoldenHits(), and RunAlg(). |
|
|
Definition at line 68 of file AlgAltDeMux.h. Referenced by DeMuxAsMultipleMuon(), DeMuxGoldenHits(), and RunAlg(). |
|
|
Definition at line 77 of file AlgAltDeMux.h. Referenced by DeMuxAsMultipleMuon(), DeMuxAsUnknownEventType(), and RunAlg(). |
|
|
Definition at line 78 of file AlgAltDeMux.h. Referenced by DeMuxAsMultipleMuon(), DeMuxAsUnknownEventType(), and RunAlg(). |
|
|
Definition at line 79 of file AlgAltDeMux.h. Referenced by DeMuxAsMultipleMuon(), DeMuxAsUnknownEventType(), and RunAlg(). |
|
|
Definition at line 81 of file AlgAltDeMux.h. Referenced by DeMuxTidyUp(), and RunAlg(). |
|
|
Definition at line 82 of file AlgAltDeMux.h. |
|
|
Definition at line 87 of file AlgAltDeMux.h. Referenced by RunAlg(). |
|
|
Definition at line 94 of file AlgAltDeMux.h. Referenced by RunAlg(). |
|
|
Definition at line 58 of file AlgAltDeMux.h. |
|
|
Definition at line 74 of file AlgAltDeMux.h. Referenced by RunAlg(). |
|
|
Definition at line 63 of file AlgAltDeMux.h. Referenced by DeMuxPreparation(), and RunAlg(). |
|
|
Definition at line 70 of file AlgAltDeMux.h. Referenced by DeMuxAsUnknownEventType(). |
|
|
Definition at line 64 of file AlgAltDeMux.h. Referenced by DeMuxPreparation(), and RunAlg(). |
|
|
Definition at line 69 of file AlgAltDeMux.h. Referenced by DeMuxAsMultipleMuon(), and RunAlg(). |
|
|
Definition at line 59 of file AlgAltDeMux.h. Referenced by DeMuxPreparation(), and RunAlg(). |
|
|
Definition at line 57 of file AlgAltDeMux.h. Referenced by DeMuxPreparation(), and RunAlg(). |
|
|
Definition at line 65 of file AlgAltDeMux.h. Referenced by DeMuxGoldenHits(), and RunAlg(). |
|
|
Definition at line 66 of file AlgAltDeMux.h. Referenced by DeMuxGoldenHits(), and RunAlg(). |
|
|
Definition at line 97 of file AlgAltDeMux.h. Referenced by RunAlg(). |
|
|
Definition at line 71 of file AlgAltDeMux.h. Referenced by RunAlg(). |
|
|
Definition at line 75 of file AlgAltDeMux.h. Referenced by DeMuxTidyUp(), and RunAlg(). |
|
|
Definition at line 73 of file AlgAltDeMux.h. Referenced by DeMuxAsUnknownEventType(), and RunAlg(). |
|
|
Definition at line 86 of file AlgAltDeMux.h. Referenced by DeMuxTidyUp(). |
|
|
Definition at line 95 of file AlgAltDeMux.h. Referenced by RunAlg(). |
|
|
Definition at line 62 of file AlgAltDeMux.h. Referenced by DeMuxAsMultipleMuon(), DeMuxAsUnknownEventType(), and RunAlg(). |
|
|
Definition at line 61 of file AlgAltDeMux.h. Referenced by DeMuxPreparation(), and RunAlg(). |
|
|
Definition at line 60 of file AlgAltDeMux.h. Referenced by DeMuxPreparation(), and RunAlg(). |
|
|
Definition at line 76 of file AlgAltDeMux.h. Referenced by RunAlg(), and ValidateThroughGoingMuon(). |
|
|
Definition at line 85 of file AlgAltDeMux.h. Referenced by RunAlg(). |
|
|
Definition at line 93 of file AlgAltDeMux.h. Referenced by RunAlg(). |
|
|
Definition at line 92 of file AlgAltDeMux.h. Referenced by RunAlg(). |
|
|
Definition at line 72 of file AlgAltDeMux.h. Referenced by DeMuxAsUnknownEventType(), and RunAlg(). |
|
|
Definition at line 55 of file AlgAltDeMux.h. Referenced by RunAlg(). |
1.3.9.1