Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:18:01

0001 #include "LaserEventRejecter.h"
0002 
0003 #include "LaserEventInfo.h"
0004 
0005 #include <ffaobjects/EventHeader.h>
0006 #include <fun4all/Fun4AllReturnCodes.h>
0007 #include <fun4all/SubsysReco.h>  // for SubsysReco
0008 
0009 #include <phool/PHCompositeNode.h>
0010 #include <phool/getClass.h>
0011 
0012 LaserEventRejecter::LaserEventRejecter(const std::string &name)
0013   : SubsysReco(name)
0014 {
0015 }
0016 
0017 int LaserEventRejecter::process_event(PHCompositeNode *topNode)
0018 {
0019   m_laserEventInfo = findNode::getClass<LaserEventInfo>(topNode, "LaserEventInfo");
0020   if (!m_laserEventInfo)
0021   {
0022     std::cout << PHWHERE << "ERROR: Can't find node LaserEventInfo" << std::endl;
0023     return Fun4AllReturnCodes::ABORTRUN;
0024   }
0025 
0026   if(m_laserEventInfo->isGl1LaserPileupEvent() || m_laserEventInfo->isLaserEvent())
0027   {
0028     return Fun4AllReturnCodes::ABORTEVENT;
0029   }
0030   
0031   return Fun4AllReturnCodes::EVENT_OK;
0032 }