Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-22 11:02:34

0001 
0002 #include "CherenkovStackingAction.h"
0003 
0004 #include <TTree.h>
0005 
0006 #include <CherenkovEvent.h>
0007 
0008 // -------------------------------------------------------------------------------------
0009 
0010 CherenkovStackingAction::CherenkovStackingAction(CherenkovEvent *event, TTree *tree): 
0011   G4UserStackingAction(), m_EventPtr(event), m_Tree(tree)
0012 {
0013 } //CherenkovStackingAction::CherenkovStackingAction()
0014 
0015 // -------------------------------------------------------------------------------------
0016 
0017 void CherenkovStackingAction::NewStage()
0018 {
0019   static unsigned counter;
0020   printf("@@@ Calling NewStage() ... %5d\n", counter++);
0021   if (m_Tree) m_Tree->Fill();
0022 } // CherenkovStackingAction::NewStage()
0023 
0024 // -------------------------------------------------------------------------------------
0025 
0026 void CherenkovStackingAction::PrepareNewEvent()
0027 {
0028   if (m_EventPtr) m_EventPtr->Reset();
0029 } // CherenkovStackingAction::PrepareNewEvent()
0030 
0031 // -------------------------------------------------------------------------------------