Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 #include "PHG4EventActionClearZeroEdep.h"
0002 #include <g4main/PHG4HitContainer.h>
0003 
0004 #include <phool/getClass.h>
0005 
0006 //___________________________________________________
0007 PHG4EventActionClearZeroEdep::PHG4EventActionClearZeroEdep(PHCompositeNode *node, const std::string &name)
0008   : topNode(node)
0009 {
0010   AddNode(name);
0011 }
0012 
0013 void PHG4EventActionClearZeroEdep::AddNode(const std::string &name)
0014 {
0015   nodename_set.insert(name);
0016 }
0017 
0018 //___________________________________________________
0019 void PHG4EventActionClearZeroEdep::EndOfEventAction(const G4Event * /*evt*/)
0020 {
0021   for (auto &node : nodename_set)
0022   {
0023     PHG4HitContainer *generic_hits = findNode::getClass<PHG4HitContainer>(topNode, node);
0024     if (generic_hits)
0025     {
0026       generic_hits->RemoveZeroEDep();
0027     }
0028   }
0029 }