Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2026-04-03 08:08:52

0001 #include "DstMBDSelection.h"
0002 #include <fun4all/Fun4AllReturnCodes.h>
0003 #include <phool/getClass.h>
0004 
0005 DstMBDSelection::DstMBDSelection(const std::string &name, const int runnb)
0006   : SubsysReco(name)
0007   , runnumber(runnb)
0008 {
0009 }
0010 
0011 DstMBDSelection::~DstMBDSelection()
0012 {
0013 }
0014 
0015 int DstMBDSelection::Init(PHCompositeNode *)
0016 {  
0017   return 0;
0018 }
0019 
0020 int DstMBDSelection::InitRun(PHCompositeNode *topNode)
0021 {
0022   gl1packet = findNode::getClass<Gl1Packet>(topNode, "14001");
0023   if (!gl1packet)
0024   {
0025     std::cerr << "AnNeutralMeson Gl1Packet node is missing" << std::endl;
0026     return Fun4AllReturnCodes::ABORTRUN;
0027   }
0028   
0029   return Fun4AllReturnCodes::EVENT_OK;
0030 }
0031 
0032 int DstMBDSelection::process_event(PHCompositeNode *)
0033 {
0034   // Store event-level entries
0035   scaled_trigger = gl1packet->getScaledVector();
0036 
0037   trigger_mbd_any_vtx = ((scaled_trigger >> 10 & 0x1U) == 0x1U);
0038   trigger_mbd_vtx_10 = ((scaled_trigger >> 12 & 0x1U) == 0x1U);
0039   
0040   if (!(trigger_mbd_any_vtx || trigger_mbd_vtx_10))
0041     return Fun4AllReturnCodes::ABORTEVENT;
0042   
0043   return Fun4AllReturnCodes::EVENT_OK;
0044 }
0045 
0046 int DstMBDSelection::End(PHCompositeNode *)
0047 {
0048   return 0;
0049 }