Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

AltAlgStpPatternRec.cxx

Go to the documentation of this file.
00001 
00002 // $Id: AltAlgStpPatternRec.cxx,v 1.2 2004/07/26 12:22:52 west Exp $
00003 //
00004 // AltAlgStpPatternRec.h
00005 //
00006 //    -- Algorithm using Neural Net Techniques to compute the likelihoods
00007 //       for each strip in the given slice to belong in a "track-like" or
00008 //       a "shower-like" formation
00009 //
00010 // Costas Andreopoulos <C.V.Andreopoulos@rl.ac.uk>
00011 // CCLRC, Rutherford Appleton Laboratory
00012 // July 01, 2003
00014 
00015 #include <cassert>
00016 #include <map>
00017 
00018 #include "AltAlgStpPatternRec.h"
00019 #include "AltCandStpProbHandle.h"
00020 
00021 #include "RecoBase/CandStripHandle.h"
00022 #include "Candidate/CandContext.h"
00023 #include "LeakChecker/Lea.h"
00024 #include "MessageService/MsgService.h"
00025 #include "MinosObjectMap/MomNavigator.h"
00026 #include "RecoBase/CandStripHandle.h"
00027 #include "RecoBase/CandSliceHandle.h"
00028 #include "Validity/VldContext.h"
00029 
00030 ClassImp(AltAlgStpPatternRec)
00031 
00032 //______________________________________________________________________
00033 CVSID("$Id: AltAlgStpPatternRec.cxx,v 1.2 2004/07/26 12:22:52 west Exp $");
00034 //______________________________________________________________________
00035 AltAlgStpPatternRec::AltAlgStpPatternRec()
00036 {
00037  LEA_CTOR;
00038 }
00039 //______________________________________________________________________
00040 AltAlgStpPatternRec::~AltAlgStpPatternRec()
00041 {
00042  LEA_DTOR;
00043 }
00044 //______________________________________________________________________
00045 void AltAlgStpPatternRec::Trace(const char * /* c */) const
00046 {
00047 
00048 }
00049 //______________________________________________________________________
00050 void AltAlgStpPatternRec::RunAlg(
00051                   AlgConfig & /* ac */, CandHandle &ch, CandContext &cx)
00052 {
00053   MSG("AltAlg",Msg::kDebug)
00054                      << "Begin Of AltAlgStpPatternRec::RunAlg()" << endl;
00055 
00056   assert(cx.GetDataIn());
00057   assert(cx.GetDataIn()->InheritsFrom("CandSliceHandle"));
00058 
00059   try {
00060      AltCandStpProbHandle & likelihoods =
00061                                dynamic_cast<AltCandStpProbHandle &>(ch);
00062 
00063      CandSliceHandle * cslh = (CandSliceHandle *) (cx.GetDataIn());
00064 
00065      CandStripHandleItr strip_iter( cslh->GetDaughterIterator() );
00066 
00067      while (CandStripHandle * cstph = strip_iter()) {
00068 
00069         // do the neural net calculation
00070 
00071         likelihoods.SetStripLikelihood(cstph->DupHandle(), 0.0);
00072      }
00073 
00074   } catch( std::bad_cast ) {
00075     
00076      MSG("AltAlg",Msg::kWarning)
00077            << "AltCandStpProbHandle & likelihoods = "
00078            << "dynamic_cast<AltCandStpProbHandle &>(ch) failed" << endl;
00079   }
00080 }
00081 //______________________________________________________________________

Generated on Mon Feb 15 11:06:21 2010 for loon by  doxygen 1.3.9.1