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

#include <MichelAlg.h>

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

List of all members.

Public Member Functions

 MichelAlg (const std::string &name)
virtual ~MichelAlg ()
virtual bool initialize ()
virtual bool execute ()
virtual bool finalize ()
const std::string & name ()
SvcBaseservice (const std::string &name)
TOutputSvcntupleSvc ()
bool setOption (const std::string &option, Type &var)

Protected Attributes

std::string m_name

Private Attributes

PhyEventBufm_buffer
TNtuple * m_tuple
double m_muEngLow
double m_muEngHigh
double m_t2muLow
double m_t2muHigh
double m_muEng [4]
TTimeStamp m_muTime [4]

Detailed Description

Definition at line 9 of file MichelAlg.h.


Constructor & Destructor Documentation

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

Definition at line 7 of file MichelAlg.cc.

  : AlgBase(name)
{
  setOption("MuEngLow",  m_muEngLow  = 80.);  //80MeV
  setOption("MuEngHigh", m_muEngHigh = 1000.);  //1GeV
  setOption("T2MuLow",   m_t2muLow   = 2.e-6);  //2us
  setOption("T2MuHigh",  m_t2muHigh  = 1.e-5);  //10us

  for(int i=0; i<GlobalVar::NumADs; i++) {
    m_muEng[i] = 0.;
    m_muTime[i] = 0;
  }
}
virtual MichelAlg::~MichelAlg ( ) [inline, virtual]

Definition at line 13 of file MichelAlg.h.

{}

Member Function Documentation

bool MichelAlg::initialize ( ) [virtual]

Implements AlgBase.

Definition at line 21 of file MichelAlg.cc.

{
  LogDebug << "MuEngLow = " << m_muEngLow << std::endl;
  m_buffer = dynamic_cast<PhyEventBuf*>(service("Cycler"));
  m_tuple = ntupleSvc()->bookNtuple("FILE1/Michel", "Michel", "det:energy:muenergy:t2mu");

  return true;
}
bool MichelAlg::execute ( ) [virtual]

Implements AlgBase.

Definition at line 36 of file MichelAlg.cc.

{

  // If bad event, return
  PhyEvent *event = m_buffer->curEvt();
  if ( !event->m_good ) return true;
  if ( !event->isAD() ) return true;

  // tag muon
  if(event->m_energy>m_muEngLow && event->m_energy<m_muEngHigh) { // find a muon
    m_muEng[event->m_det-1] = event->m_energy;
    m_muTime[event->m_det-1] = event->m_trigTime;
    return true;
  }

  double t2mu = (event->m_trigTime - m_muTime[event->m_det-1]);
  if(t2mu>m_t2muLow && t2mu<m_t2muHigh) {
      LogDebug << event->m_det << " " << event->m_energy
               << " " << m_muEng[event->m_det-1] << " " << t2mu << endl;
      m_tuple->Fill(event->m_det,event->m_energy,m_muEng[event->m_det-1],t2mu);
  }

  return true;
}
bool MichelAlg::finalize ( ) [virtual]

Implements AlgBase.

Definition at line 30 of file MichelAlg.cc.

{
  LogDebug << "---MichelAlg::finalize()---" << endl;
  return true;
}

Member Data Documentation

Definition at line 21 of file MichelAlg.h.

TNtuple* MichelAlg::m_tuple [private]

Definition at line 22 of file MichelAlg.h.

double MichelAlg::m_muEngLow [private]

Definition at line 23 of file MichelAlg.h.

double MichelAlg::m_muEngHigh [private]

Definition at line 24 of file MichelAlg.h.

double MichelAlg::m_t2muLow [private]

Definition at line 25 of file MichelAlg.h.

double MichelAlg::m_t2muHigh [private]

Definition at line 26 of file MichelAlg.h.

double MichelAlg::m_muEng[4] [private]

Definition at line 27 of file MichelAlg.h.

TTimeStamp MichelAlg::m_muTime[4] [private]

Definition at line 28 of file MichelAlg.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:49 for Algorithms by doxygen 1.7.4