/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Protected Attributes | Private Attributes
FanAdMuonTag Class Reference

#include <FanAdMuonTag.h>

Inheritance diagram for FanAdMuonTag:
Inheritance graph
[legend]
Collaboration diagram for FanAdMuonTag:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 FanAdMuonTag (const std::string &name)
virtual ~FanAdMuonTag ()
virtual bool tag (PhyEventBuf *buf)
const std::string & name ()
bool setOption (const std::string &option, Type &var)

Protected Attributes

bool m_veto
std::string m_name

Private Attributes

double m_adMuonThr
double m_showerMuonThr
std::vector< double > m_window

Detailed Description

Definition at line 7 of file FanAdMuonTag.h.


Constructor & Destructor Documentation

FanAdMuonTag::FanAdMuonTag ( const std::string &  name)

Definition at line 7 of file FanAdMuonTag.cc.

    : IFanTagBase(),
      ToolBase(name)
{
    setOption("ApplyVeto", m_veto=false);

    setOption("AdMuonThreshold", m_adMuonThr);
    setOption("ShowerMuonThreshold", m_showerMuonThr);
    setOption("CoincWindow", m_window);
    if ( m_window.size() != 2 ) {
        m_window.clear();
        m_window.push_back(-600e-9);
        m_window.push_back(600e-9);
    }
}
virtual FanAdMuonTag::~FanAdMuonTag ( ) [inline, virtual]

Definition at line 12 of file FanAdMuonTag.h.

{}

Member Function Documentation

bool FanAdMuonTag::tag ( PhyEventBuf buf) [virtual]

Implements IFanTagBase.

Definition at line 23 of file FanAdMuonTag.cc.

{
    // Tagging the current event in buf
    PhyEvent* event = buf->curEvt();

    if ( event->m_det < 5 ) {
        if ( event->energy() > m_adMuonThr ) {
          PhyEventBuf::Iterator it = buf->current();
          while ( --it >= buf->begin() ) {
            PhyEvent* _evt = *it;
            if ( (_evt->m_trigTime - event->m_trigTime) < m_window[0] ) break;
            if ( !_evt->isAD() && _evt->isMuon() ) {
              if ( event->energy() <= m_showerMuonThr ) {
                event->m_muonTag = PhyEvent::kAdMuon;
                return m_veto;
              }
              else {
                event->m_muonTag = PhyEvent::kShowerMuon;
                return m_veto;
              }
            }
          }
          it = buf->current();
          while ( ++it < buf->end() ) {
            PhyEvent* _evt = *it;
            if ( (_evt->m_trigTime - event->m_trigTime) > m_window[1] ) break;
            if ( !_evt->isAD() && _evt->isMuon() ) {
              if ( event->energy() <= m_showerMuonThr ) {
                event->m_muonTag = PhyEvent::kAdMuon;
                return m_veto;
              }
              else {
                event->m_muonTag = PhyEvent::kShowerMuon;
                return m_veto;
              }
            }
          }
        }
    }

    return false;
}

Member Data Documentation

double FanAdMuonTag::m_adMuonThr [private]

Definition at line 19 of file FanAdMuonTag.h.

Definition at line 20 of file FanAdMuonTag.h.

std::vector<double> FanAdMuonTag::m_window [private]

Definition at line 21 of file FanAdMuonTag.h.

bool IFanTagBase::m_veto [protected, inherited]

Definition at line 15 of file IFanTagBase.h.


The documentation for this class was generated from the following files:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 09:50:53 for FanCycler by doxygen 1.7.4