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

In This Package:

MuonTag.cc
Go to the documentation of this file.
00001 #include "MuonTag.h"
00002 #include "LafKernel/PhyEvent/RecRpcReadout.h"
00003 #include "LafKernel/PhyEvent.h"
00004 #include "LafKernel/PhyEvent/RecReadout.h"
00005 #include "LafKernel/ToolFactory.h"
00006 
00007 DECLARE_TOOL(MuonTag);
00008 
00009 MuonTag::MuonTag(const std::string& name)
00010     : ITagBase(name)
00011 {
00012   setOption("ApplyVeto",m_veto=false);
00013   setOption("AdMuonThreshold",m_adMuonThr);
00014   setOption("ShowerMuonThreshold",m_showerMuonThr);
00015   setOption("IwsNPmtThreshold",m_iwsNpmtThr);
00016   setOption("OwsNPmtThreshold",m_owsNpmtThr);
00017 
00018   OptionParser::setOption(name, "tagRPCMuon", m_tagRPCMuon=true);
00019   OptionParser::setOption(name, "tagADMuon", m_tagADMuon=true);
00020 }
00021 
00022 bool MuonTag::tag(PhyEvent *event)
00023 {
00024   if(!event->m_good) {
00025     return false;
00026   }
00027 
00028   if(event->m_det==5) { // IWS
00029     if(event->m_nPmt>m_iwsNpmtThr) {
00030       event->m_muonTag=PhyEvent::kWpMuon;
00031       return m_veto;
00032     }
00033   } else if (event->m_det==6) { // OWS
00034     if(event->m_nPmt>m_owsNpmtThr) {
00035       event->m_muonTag=PhyEvent::kWpMuon;
00036       return m_veto;
00037     }
00038   } else if (event->m_det==7) {
00039     if(m_tagRPCMuon && ((event->m_trigType&0x00040000) != 0) ) {  // RPC 3/4
00040       RecRpcReadout* recRpc = event->get<RecRpcReadout>("Event/Rec/RpcSimple");
00041       if(recRpc->eventType == 3 || recRpc->maxHitsInLayer() < 3)  
00042             event->m_muonTag=PhyEvent::kRpcMuon;
00043       return m_veto;
00044     }
00045   } else {
00046     if(event->energy()>m_adMuonThr && m_tagADMuon) {
00047       event->m_muonTag=PhyEvent::kAdMuon;
00048       if(event->energy()>m_showerMuonThr) {
00049         event->m_muonTag=PhyEvent::kShowerMuon;
00050       }
00051       return m_veto;
00052     }
00053   }
00054   return false;
00055 }
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 09:50:56 for SelCycler by doxygen 1.7.4