/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
GeneralMuonTag Class Reference

#include <GeneralMuonTag.h>

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

List of all members.

Public Member Functions

 GeneralMuonTag (const std::string &name)
virtual ~GeneralMuonTag ()
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_window

Detailed Description

Definition at line 7 of file GeneralMuonTag.h.


Constructor & Destructor Documentation

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

Definition at line 7 of file GeneralMuonTag.cc.

    : IFanTagBase(),
      ToolBase(name)
{
    setOption("CoincWindow", m_window = 2e-6);
}
virtual GeneralMuonTag::~GeneralMuonTag ( ) [inline, virtual]

Definition at line 12 of file GeneralMuonTag.h.

{}

Member Function Documentation

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

Implements IFanTagBase.

Definition at line 14 of file GeneralMuonTag.cc.

{
    static const std::string ukey = "TotalE";

    PhyEvent* event = buf->curEvt();

    if ( (!event->isRPC()) && event->m_userTag.find(ukey) == event->m_userTag.end() ) {
        unsigned int dflag = 1<<(event->m_det);
        float totalE = event->isAD() ? event->energy() : event->m_nPESum*2.5;
        PhyEventBuf::Iterator it = buf->current();
        while ( ++it < buf->end() ) {
            PhyEvent* _evt = *it;
            if ( (_evt->m_trigTime - event->m_trigTime) > m_window ) break;
            //criterions
            if ( ! _evt->isRPC() ) {
                unsigned int dindex = 1<<(_evt->m_det);
                if ( (dflag&dindex) == 0 ) {
                    totalE += _evt->isAD() ? _evt->energy() : _evt->m_nPESum*2.5;
                    dflag &= dindex;
                }
                _evt->m_userTag[ukey] = -1.0;
            }
        }
        event->m_userTag[ukey] = totalE;
    }

    return false;
}

Member Data Documentation

double GeneralMuonTag::m_window [private]

Definition at line 18 of file GeneralMuonTag.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