/[PAMELA software]/PamG4/src/EventAction.cc
ViewVC logotype

Annotation of /PamG4/src/EventAction.cc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (hide annotations) (download) (vendor branch)
Tue Dec 13 16:20:39 2005 UTC (19 years ago) by cafagna
Branch: start, MAIN
CVS Tags: v1r0, bogo, HEAD
Changes since 1.1: +0 -0 lines
Geant4 code for ND and Calorimeter

1 cafagna 1.1
2     #include "EventAction.hh"
3     #include "RunAction.hh"
4     #include "G4Run.hh"
5     #include "G4Event.hh"
6     #include "G4EventManager.hh"
7     #include "G4HCofThisEvent.hh"
8     #include "G4VVisManager.hh"r
9     #include "G4UImanager.hh"
10     #include "G4ios.hh"
11     #include "G4UnitsTable.hh"
12    
13    
14     EventAction::EventAction(RunAction* run): printModulo(1),
15     myRU(run)
16     {;}
17    
18     EventAction::~EventAction()
19     {;}
20    
21     void EventAction::BeginOfEventAction(const G4Event* evt)
22     {
23     G4int evtNb = evt->GetEventID();
24     if (evtNb%printModulo == 0)
25     {
26     G4cout << "\n---> Begin of event: " << evtNb << G4endl;
27     };
28     myRU->noOfNeutrons=0;
29     for(G4int i=0;i<36;i++){
30     myRU->Etube[i]=0.;
31     myRU->E1tube[i]=0.;
32     myRU->TimeTube[i]=0.;
33     myRU->tube[i]=0;
34     }
35    
36     }
37    
38    
39     void EventAction::EndOfEventAction(const G4Event* evt)
40     {
41     // G4int evtNb = evt->GetEventID();
42    
43     for(G4int i=0;i<36;i++)
44     {
45     if(myRU->Etube[i]/keV > 200.) myRU->noOfNeutrons++;
46     if(myRU->E1tube[i]/keV > 200.) myRU->noOfNeutrons++;
47     }
48     myRU->N += myRU->noOfNeutrons;
49     G4cout << "neutron "<<myRU->noOfNeutrons <<" N="<<myRU->N<<G4endl;
50    
51     // std::ofstream fileOut;
52     // fileOut.open("nomber.dat",std::ios::app);
53     // fileOut << noOfNeutrons <<" "<<evtNb<<G4endl;
54     //fileOut.close();
55    
56     }
57    
58    
59     // 2005 by G.I.Vasilyev

  ViewVC Help
Powered by ViewVC 1.1.23