Public Member Functions

WCSimRecoAB Class Reference

#include "WCSimRecoAB.hh"

Inheritance diagram for WCSimRecoAB:
WCSimReco

List of all members.

Public Member Functions

 WCSimRecoAB ()
 ~WCSimRecoAB ()
void Run ()
void Run (WCSimRecoEvent *evt)
void RunFilter (WCSimRecoEvent *evt)
void RunRecoVertex (WCSimRecoEvent *evt)
void RunRecoRings (WCSimRecoEvent *evt)

Detailed Description

Definition at line 12 of file WCSimRecoAB.hh.


Constructor & Destructor Documentation

WCSimRecoAB::WCSimRecoAB (  ) 
WCSimRecoAB::~WCSimRecoAB (  ) 

Definition at line 29 of file WCSimRecoAB.cc.

{

}


Member Function Documentation

void WCSimRecoAB::Run (  )  [virtual]

Implements WCSimReco.

Definition at line 34 of file WCSimRecoAB.cc.

References WCSimInterface::RecoEvent().

{
  WCSimRecoEvent* myEvent = WCSimInterface::RecoEvent();

  this->Run(myEvent);

  return;
}

void WCSimRecoAB::Run ( WCSimRecoEvent evt  )  [virtual]

Implements WCSimReco.

Definition at line 43 of file WCSimRecoAB.cc.

References RunFilter(), and RunRecoVertex().

{
  // filter digits
  // =============
  this->RunFilter(myEvent);

  // reconstruct vertex
  // ==================
  this->RunRecoVertex(myEvent);

  // reconstruct rings
  // =================
  //this->RunRecoRings(myEvent);

  return;
}

void WCSimRecoAB::RunFilter ( WCSimRecoEvent evt  )  [virtual]

Implements WCSimReco.

Definition at line 60 of file WCSimRecoAB.cc.

References WCSimRecoEvent::AddFilterDigit(), WCSimRecoEvent::GetDigitList(), WCSimDataCleaner::Instance(), WCSimDataCleaner::Run(), and WCSimRecoEvent::SetFilterDone().

Referenced by Run(), and RunRecoVertex().

{  
  // Get Digit List
  // ==============
  std::vector<WCSimRecoDigit*>* myDigitList = (std::vector<WCSimRecoDigit*>*)(myEvent->GetDigitList()); 

  // Get Data Cleaner
  // ================
  WCSimDataCleaner* myDataCleaner = WCSimDataCleaner::Instance();  
  
  // Run Data Cleaner
  // ================
  std::vector<WCSimRecoDigit*>* myFilterDigitList = (std::vector<WCSimRecoDigit*>*)(myDataCleaner->Run(myDigitList));

  // Add Filtered Digits
  // ===================
  for( UInt_t n=0; n<myFilterDigitList->size(); n++ ){
    WCSimRecoDigit* recoDigit = (WCSimRecoDigit*)(myFilterDigitList->at(n));
    myEvent->AddFilterDigit(recoDigit);
  }

  // Done!
  // =====
  myEvent->SetFilterDone();

  return;
}

void WCSimRecoAB::RunRecoRings ( WCSimRecoEvent evt  )  [virtual]

Implements WCSimReco.

Definition at line 144 of file WCSimRecoAB.cc.

References WCSimRecoEvent::AddRing(), WCSimRecoEvent::FoundVertex(), WCSimRecoEvent::GetVertex(), WCSimRingFinder::Instance(), WCSimRecoEvent::IsVertexFinderDone(), WCSimRingFinder::Run(), RunRecoVertex(), and WCSimRecoEvent::SetRingFinderDone().

{
  // Find Vertex (if necessary)
  // ==========================
  if( myEvent->IsVertexFinderDone()==0 ){
    this->RunRecoVertex(myEvent);
  }

  // Check Vertex (bail out if necessary)
  // ====================================
  if( myEvent->FoundVertex()==0 ){
    myEvent->SetRingFinderDone();
    return;
  }

  // Get Vertex
  // ==========
  WCSimRecoVertex* myVertex = (WCSimRecoVertex*)(myEvent->GetVertex());

  // Get Ring Finder
  // ===============
  WCSimRingFinder* myRingFinder = WCSimRingFinder::Instance();

  // Run Ring Finder
  // ===============
  std::vector<WCSimRecoRing*>* myRingList = (std::vector<WCSimRecoRing*>*)(myRingFinder->Run(myEvent,myVertex));

  // Add Rings
  // =========
  for( UInt_t n=0; n<myRingList->size(); n++ ){
    WCSimRecoRing* recoRing = (WCSimRecoRing*)(myRingList->at(n));
    myEvent->AddRing(recoRing);
  }

  // Done!
  // =====
  myEvent->SetRingFinderDone();

  return;
}

void WCSimRecoAB::RunRecoVertex ( WCSimRecoEvent evt  )  [virtual]

Implements WCSimReco.

Definition at line 88 of file WCSimRecoAB.cc.

References WCSimRecoVertex::FoundDirection(), WCSimRecoVertex::FoundVertex(), WCSimRecoVertex::GetConeAngle(), WCSimRecoVertex::GetDirX(), WCSimRecoVertex::GetDirY(), WCSimRecoVertex::GetDirZ(), WCSimRecoVertex::GetFOM(), WCSimRecoVertex::GetIterations(), WCSimRecoEvent::GetNFilterDigits(), WCSimRecoVertex::GetPass(), WCSimRecoVertex::GetStatus(), WCSimRecoVertex::GetTime(), WCSimRecoVertex::GetTrackLength(), WCSimRecoVertex::GetX(), WCSimRecoVertex::GetY(), WCSimRecoVertex::GetZ(), WCSimVertexFinder::Instance(), WCSimRecoEvent::IsFilterDone(), WCSimVertexFinder::Run(), RunFilter(), WCSimRecoEvent::SetConeAngle(), WCSimRecoEvent::SetDirection(), WCSimRecoEvent::SetTrackLength(), WCSimRecoEvent::SetVertex(), WCSimRecoEvent::SetVertexFinderDone(), WCSimRecoEvent::SetVtxFOM(), and WCSimRecoEvent::SetVtxStatus().

Referenced by Run(), and RunRecoRings().

{
  // Run Filter (if necessary)
  // =========================
  if( myEvent->IsFilterDone()==0 ){
    this->RunFilter(myEvent);
  }

  // Check Filter Digits (bail out if necessary)
  // ===========================================
  if( myEvent->GetNFilterDigits()==0 ){
    myEvent->SetVertexFinderDone();
    return;
  }

  // Get Vertex Finder
  // =================
  WCSimVertexFinder* myVertexFinder = WCSimVertexFinder::Instance();

  // Run Vertex Finder
  // =================
  WCSimRecoVertex* myVertex = (WCSimRecoVertex*)(myVertexFinder->Run(myEvent));
    
  // Set Vertex
  // ==========
  if( myVertex->FoundVertex() ){
    myEvent->SetVertex(myVertex->GetX(),
                       myVertex->GetY(),
                       myVertex->GetZ(),
                       myVertex->GetTime());
  }

  // Set Direction
  // =============
  if( myVertex->FoundDirection() ){
    myEvent->SetDirection(myVertex->GetDirX(),
                          myVertex->GetDirY(),
                          myVertex->GetDirZ());
  }

  // Set FoM
  // =======
  myEvent->SetConeAngle(myVertex->GetConeAngle());
  myEvent->SetTrackLength(myVertex->GetTrackLength());
  myEvent->SetVtxFOM(myVertex->GetFOM(),
                     myVertex->GetIterations(),
                     myVertex->GetPass() );
  myEvent->SetVtxStatus(myVertex->GetStatus());

  // Done!
  // =====
  myEvent->SetVertexFinderDone();

  return;
}


The documentation for this class was generated from the following files: