StopMuFilterModule Class Reference

Job module to filter out stopping mu candidates. More...

#include <StopMuFilterModule.h>

Inheritance diagram for StopMuFilterModule:
JobCModule

List of all members.

Public Member Functions

 StopMuFilterModule ()
 ctor
 ~StopMuFilterModule ()
 dtor
void BeginJob ()
 initialize
void EndJob ()
 finalize
JobCResult Ana (const MomNavigator *mom)
 Filtering happens here.
const RegistryDefaultConfig () const
 Default configuration.

Private Attributes

StopMuFinderfStopMuFinder
 pointer to the stop mu finder object

Detailed Description

Job module to filter out stopping mu candidates.

StopMuFilterModule passed events with one track that ends inside the fiducial region.

Author:
Sergei avva@fnal.gov 2005-04
Id
StopMuFilterModule.cxx,v 1.3 2007/03/01 17:15:43 rhatcher Exp

StopMuFilterModule passed events with one track that ends inside the fiducial region.

Author:
Sergei avva@fnal.gov 2005-04

$Id:

Definition at line 18 of file StopMuFilterModule.h.


Constructor & Destructor Documentation

StopMuFilterModule::StopMuFilterModule (  ) 

ctor

Definition at line 40 of file StopMuFilterModule.cxx.

References fStopMuFinder, Msg::kDebug, and MSG.

00041 {
00042     MSG("StopMuFilterModule",Msg::kDebug) 
00043         << "StopMuFilterModule::StopMuFilterModule()" << endl;
00044         
00045     // filter object is created when processing first event
00046     // depending on which detector is being processed
00047     fStopMuFinder = 0;
00048 } // StopMuFilterModule::StopMuFilterModule()

StopMuFilterModule::~StopMuFilterModule (  ) 

dtor

Definition at line 53 of file StopMuFilterModule.cxx.

References fStopMuFinder, Msg::kDebug, and MSG.

00054 {
00055     MSG("StopMuFilterModule",Msg::kDebug) 
00056         << "StopMuFilterModule::~StopMuFilterModule()" << endl;
00057 
00058     // delete filter object
00059     delete fStopMuFinder;
00060 } // StopMuFilterModule::~StopMuFilterModule()


Member Function Documentation

JobCResult StopMuFilterModule::Ana ( const MomNavigator mom  )  [virtual]

Filtering happens here.

do the filtering here

Reimplemented from JobCModule.

Definition at line 85 of file StopMuFilterModule.cxx.

References StopMuFinder::Configure(), exit(), fStopMuFinder, DataUtil::GetCandHeader(), JobCModule::GetConfig(), RecMinosHdr::GetVldContext(), StopMuFinderFactory::Instance(), StopMuFinder::IsStopping(), Msg::kDebug, JobCResult::kFailed, Msg::kFatal, JobCResult::kPassed, and MSG.

00086 {
00087     MSG("StopMuFilterModule",Msg::kDebug) 
00088         << "StopMuFilterModule::Ana(const MomNavigator*)" << endl;
00089         
00090     // if first record - create filter object
00091     static Bool_t  first = kTRUE;
00092     if ( first ) {
00093         first = kFALSE;
00094         
00095         // Get CandRecord from mom
00096         const CandHeader* candHeader = GetCandHeader ( mom );
00097     
00098         if ( !candHeader ) {
00099             MSG("StopMuFilterModule",Msg::kFatal) 
00100                 << "No CandHeader when reading the first record - "
00101                 "input file must be candidates!!" << endl;
00102             exit(0);
00103         }
00104          
00105         const VldContext vldc = candHeader->GetVldContext();
00106         
00107         // build proper stop mu filter
00108         fStopMuFinder = StopMuFinderFactory::Instance().
00109                 CreateStopMuFinder(vldc);
00110                 
00111         // set configuration parameters from JobCModule's registry
00112         fStopMuFinder->Configure(GetConfig());        
00113     }
00114         
00115 
00116     if ( fStopMuFinder->IsStopping(mom) ) {
00117         return JobCResult::kPassed;
00118     } else {
00119         return JobCResult::kFailed;
00120     }
00121 } // JobCResult StopMuFilterModule::Ana(const MomNavigator*)

void StopMuFilterModule::BeginJob ( void   )  [virtual]

initialize

Reimplemented from JobCModule.

Definition at line 65 of file StopMuFilterModule.cxx.

References Msg::kDebug, and MSG.

00066 {
00067     MSG("StopMuFilterModule",Msg::kDebug) 
00068         << "StopMuFilterModule::BeginJob()" << endl;
00069 
00070 } // void StopMuFilterModule::BeginJob()

const Registry & StopMuFilterModule::DefaultConfig ( void   )  const [virtual]

Default configuration.

default configuration

Reimplemented from JobCModule.

Definition at line 126 of file StopMuFilterModule.cxx.

References JobCModule::GetName(), Msg::kDebug, Registry::LockValues(), MSG, Registry::Set(), and Registry::UnLockValues().

00127 {
00128     MSG("StopMuFilterModule",Msg::kDebug) 
00129         << "const Registry& StopMuFilterModule::DefaultConfig() const" << endl;
00130 
00131     static Registry r; // Default configuration for module
00132 
00133     // Set name of config
00134     std::string name = this->GetName();
00135     name += ".config.default";
00136     r.SetName(name.c_str());
00137 
00138     // Set values in configuration
00139     r.UnLockValues();
00140 
00141     // configuration relevant to 'StopMuFinderFar'
00142     r.Set("CandTrackList",          "CandFitTrackSRList");
00143     r.Set("MinZDistance",           0.5);
00144     r.Set("MinRadius",              0.5);
00145     r.Set("MaxRadius",              3.5);
00146     r.Set("MinNPlanes",             10);
00147     r.LockValues();
00148 
00149     return r;
00150 } // const Registry& StopMuFilterModule::DefaultConfig() const

void StopMuFilterModule::EndJob (  )  [virtual]

finalize

Reimplemented from JobCModule.

Definition at line 75 of file StopMuFilterModule.cxx.

References Msg::kDebug, and MSG.

00076 {
00077     MSG("StopMuFilterModule",Msg::kDebug) 
00078         << "StopMuFilterModule::EndJob()" << endl;
00079 
00080 } // void StopMuFilterModule::EndJob()


Member Data Documentation

pointer to the stop mu finder object

Definition at line 37 of file StopMuFilterModule.h.

Referenced by Ana(), StopMuFilterModule(), and ~StopMuFilterModule().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1