File indexing completed on 2025-08-06 08:19:24
0001
0002
0003 #ifndef G4MAIN_PHG4TRUTHEVENTACTION_H
0004 #define G4MAIN_PHG4TRUTHEVENTACTION_H
0005
0006 #include "PHG4EventAction.h"
0007
0008 #include <map>
0009 #include <set>
0010
0011 class G4Event;
0012 class PHG4HitContainer;
0013 class PHG4TruthInfoContainer;
0014 class PHCompositeNode;
0015
0016 class PHG4TruthEventAction : public PHG4EventAction
0017 {
0018 public:
0019
0020 PHG4TruthEventAction();
0021
0022
0023 ~PHG4TruthEventAction() override {}
0024
0025 void BeginOfEventAction(const G4Event*) override;
0026
0027 void EndOfEventAction(const G4Event*) override;
0028
0029 int ResetEvent(PHCompositeNode*) override;
0030
0031
0032 void SetInterfacePointers(PHCompositeNode*) override;
0033
0034
0035 void AddTrackidToWritelist(const int trackid);
0036
0037 private:
0038 void SearchNode(PHCompositeNode* topNode);
0039 void PruneShowers();
0040 void ProcessShowers();
0041
0042
0043 std::set<int> m_WriteSet;
0044
0045
0046 PHG4TruthInfoContainer* m_TruthInfoContainer;
0047
0048 int m_LowerKeyPrevExist;
0049 int m_UpperKeyPrevExist;
0050
0051 std::map<int, PHG4HitContainer*> m_HitContainerMap;
0052 };
0053
0054 #endif