Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
EventAction Class Reference

#include <EventAction.hh>

Inheritance diagram for EventAction:
G4UserEventAction G4UserEventAction G4UserEventAction G4UserEventAction G4UserEventAction G4UserEventAction G4UserEventAction G4UserEventAction G4UserEventAction G4UserEventAction G4UserEventAction G4UserEventAction G4UserEventAction G4UserEventAction G4UserEventAction G4UserEventAction G4UserEventAction G4UserEventAction G4UserEventAction G4UserEventAction G4UserEventAction G4UserEventAction G4UserEventAction G4UserEventAction G4UserEventAction G4UserEventAction G4UserEventAction G4UserEventAction G4UserEventAction G4UserEventAction G4UserEventAction G4UserEventAction

Public Member Functions

 EventAction (DetectorConstruction *, RunAction *, PrimaryGeneratorAction *, HistoManager *)
 
 ~EventAction ()
 
void BeginOfEventAction (const G4Event *)
 
void EndOfEventAction (const G4Event *)
 
void SetDrawFlag (G4String val)
 
void SetPrintModulo (G4int val)
 
void SumVisibleEnergy (G4int pixel, G4double de)
 
void SumTotalEnergy (G4int pixel, G4double de)
 
void SumNbRadLength (G4double dn)
 
void SetWriteFile (G4bool)
 
void WritePixels (const G4Event *)
 
 EventAction (RunAction *)
 
 ~EventAction ()
 
void BeginOfEventAction (const G4Event *)
 
void EndOfEventAction (const G4Event *)
 
 EventAction (RunAction *, HistoManager *)
 
virtual ~EventAction ()
 
virtual void BeginOfEventAction (const G4Event *)
 
virtual void EndOfEventAction (const G4Event *)
 
void AddAbs (G4double de, G4double dl)
 
void AddGap (G4double de, G4double dl)
 
 EventAction ()
 
 ~EventAction ()
 
virtual void BeginOfEventAction (const G4Event *)
 
virtual void EndOfEventAction (const G4Event *)
 
void AddEdep (G4double Edep)
 
G4double GetEnergyDeposit ()
 
 EventAction ()
 
 ~EventAction ()
 
virtual void BeginOfEventAction (const G4Event *)
 
virtual void EndOfEventAction (const G4Event *)
 
void AddEdep (G4double edep)
 
G4double GetEdep () const
 
 EventAction (RunAction *)
 
 ~EventAction ()
 
virtual void BeginOfEventAction (const G4Event *)
 
virtual void EndOfEventAction (const G4Event *)
 
void AddEdep (G4double edep)
 
void SetDrawFlag (G4String val)
 
void SetPrintModulo (G4int val)
 
 EventAction ()
 
 ~EventAction ()
 
virtual void BeginOfEventAction (const G4Event *)
 
virtual void EndOfEventAction (const G4Event *)
 
void SetPrintModulo (G4int val)
 
 EventAction ()
 
 ~EventAction ()
 
virtual void BeginOfEventAction (const G4Event *)
 
virtual void EndOfEventAction (const G4Event *)
 
void SetPrintModulo (G4int val)
 
 EventAction ()
 
 ~EventAction ()
 
virtual void BeginOfEventAction (const G4Event *)
 
virtual void EndOfEventAction (const G4Event *)
 
void SetPrintModulo (G4int val)
 
 EventAction ()
 
 ~EventAction ()
 
virtual void BeginOfEventAction (const G4Event *)
 
virtual void EndOfEventAction (const G4Event *)
 
void SetDrawFlag (G4String val)
 
void SetPrintModulo (G4int val)
 
 EventAction ()
 
 ~EventAction ()
 
virtual void BeginOfEventAction (const G4Event *)
 
virtual void EndOfEventAction (const G4Event *)
 
void SetPrintModulo (G4int val)
 
 EventAction (RunAction *)
 
 ~EventAction ()
 
virtual void BeginOfEventAction (const G4Event *)
 
virtual void EndOfEventAction (const G4Event *)
 
void AddEnergyDeposit (G4double edep)
 
void AddSecondary (G4double ekin)
 
void SetDrawFlag (G4String val)
 
void SetPrintModulo (G4int val)
 
 EventAction ()
 
virtual ~EventAction ()
 
virtual void BeginOfEventAction (const G4Event *)
 
virtual void EndOfEventAction (const G4Event *)
 
void SetPrintModulo (G4int val)
 
 EventAction (DetectorConstruction *, RunAction *)
 
 ~EventAction ()
 
virtual void BeginOfEventAction (const G4Event *)
 
virtual void EndOfEventAction (const G4Event *)
 
void SetDrawFlag (G4String val)
 
void SetPrintModulo (G4int val)
 
void SumEnergy (G4int k, G4double de, G4double dl)
 
 EventAction ()
 
 ~EventAction ()
 
virtual void BeginOfEventAction (const G4Event *)
 
virtual void EndOfEventAction (const G4Event *)
 
void addEdep (G4double Edep)
 
G4double GetEnergyDeposit ()
 
 EventAction ()
 
 ~EventAction ()
 
virtual void BeginOfEventAction (const G4Event *)
 
virtual void EndOfEventAction (const G4Event *)
 
void AddEnergy (G4double edep)
 
void AddTrakLenCharg (G4double length)
 
void AddTrakLenNeutr (G4double length)
 
void CountStepsCharg ()
 
void CountStepsNeutr ()
 
void SetTransmitFlag (G4int flag)
 
void SetReflectFlag (G4int flag)
 
 EventAction ()
 
 ~EventAction ()
 
virtual void BeginOfEventAction (const G4Event *)
 
virtual void EndOfEventAction (const G4Event *)
 
void SetDrawFlag (G4String val)
 
void SetPrintModulo (G4int val)
 
 EventAction ()
 
 ~EventAction ()
 
virtual void BeginOfEventAction (const G4Event *)
 
virtual void EndOfEventAction (const G4Event *)
 
void SetDrawFlag (G4String val)
 
void SetPrintModulo (G4int val)
 
 EventAction ()
 
virtual ~EventAction ()
 
virtual void BeginOfEventAction (const G4Event *)
 
virtual void EndOfEventAction (const G4Event *)
 
 EventAction ()
 
virtual ~EventAction ()
 
virtual void BeginOfEventAction (const G4Event *)
 
virtual void EndOfEventAction (const G4Event *)
 
void SetPrintModulo (G4int val)
 
 EventAction ()
 
 ~EventAction ()
 
virtual void BeginOfEventAction (const G4Event *)
 
virtual void EndOfEventAction (const G4Event *)
 
void SetPrintModulo (G4int val)
 
 EventAction ()
 
virtual ~EventAction ()
 
virtual void BeginOfEventAction (const G4Event *)
 
virtual void EndOfEventAction (const G4Event *)
 
void SetPrintModulo (G4int val)
 
void AddEventToDebug (G4int val)
 
 EventAction ()
 
virtual ~EventAction ()
 
virtual void BeginOfEventAction (const G4Event *)
 
virtual void EndOfEventAction (const G4Event *)
 
void SetPrintModulo (G4int val)
 
void AddEventToDebug (G4int val)
 
 EventAction ()
 
virtual ~EventAction ()
 
virtual void BeginOfEventAction (const G4Event *)
 
virtual void EndOfEventAction (const G4Event *)
 
void SetPrintModulo (G4int val)
 
void SetDrawFlag (G4String val)
 
void AddEventToDebug (G4int val)
 
 EventAction ()
 
 ~EventAction ()
 
virtual void BeginOfEventAction (const G4Event *)
 
virtual void EndOfEventAction (const G4Event *)
 
void SetPrintModulo (G4int val)
 
 EventAction ()
 
virtual ~EventAction ()
 
virtual void BeginOfEventAction (const G4Event *)
 
virtual void EndOfEventAction (const G4Event *)
 
void SetPrintModulo (G4int val)
 
void AddEventToDebug (G4int val)
 
 EventAction ()
 
 ~EventAction ()
 
virtual void BeginOfEventAction (const G4Event *)
 
virtual void EndOfEventAction (const G4Event *)
 
void SetDrawFlag (G4String val)
 
void SetPrintModulo (G4int val)
 
 EventAction (RunAction *)
 
 ~EventAction ()
 
virtual void BeginOfEventAction (const G4Event *)
 
virtual void EndOfEventAction (const G4Event *)
 
void SetDrawFlag (G4String val)
 
void SetPrintModulo (G4int val)
 
 EventAction (RunAction *)
 
 ~EventAction ()
 
virtual void BeginOfEventAction (const G4Event *)
 
virtual void EndOfEventAction (const G4Event *)
 
void SetDrawFlag (G4String val)
 
void SetPrintModulo (G4int val)
 
 EventAction ()
 
 ~EventAction ()
 
virtual void BeginOfEventAction (const G4Event *aevent)
 
virtual void EndOfEventAction (const G4Event *aevent)
 
 EventAction (RunAction *)
 
 ~EventAction ()
 
void BeginOfEventAction (const G4Event *)
 
void EndOfEventAction (const G4Event *)
 
void SetPrintModulo (G4int val)
 
 EventAction ()
 
 ~EventAction ()
 
virtual void BeginOfEventAction (const G4Event *)
 
virtual void EndOfEventAction (const G4Event *)
 
void SetPrintModulo (G4int val)
 
void AddDecayChain (G4String val)
 
- Public Member Functions inherited from G4UserEventAction
 G4UserEventAction ()
 
virtual ~G4UserEventAction ()
 
void SetEventManager (G4EventManager *value)
 

Additional Inherited Members

- Protected Attributes inherited from G4UserEventAction
G4EventManagerfpEventManager
 

Detailed Description

Definition at line 47 of file advanced/amsEcal/include/EventAction.hh.

Constructor & Destructor Documentation

EventAction::EventAction ( DetectorConstruction det,
RunAction run,
PrimaryGeneratorAction prim,
HistoManager hist 
)

Definition at line 43 of file advanced/amsEcal/src/EventAction.cc.

References python.hepunit::keV.

45 :detector(det), runAct(run), primary(prim), histoManager(hist)
46 {
47  trigger = false;
48  Eseuil = 10*keV;
49 
50  writeFile = false;
51 
52  drawFlag = "none";
53  printModulo = 1000;
54  eventMessenger = new EventActionMessenger(this);
55 }
EventAction::~EventAction ( )

Definition at line 59 of file advanced/amsEcal/src/EventAction.cc.

60 {
61  delete eventMessenger;
62 }
EventAction::EventAction ( RunAction run)

Definition at line 44 of file advanced/microbeam/src/EventAction.cc.

45 :fRun(run)
46 {}
EventAction::~EventAction ( )
EventAction::EventAction ( RunAction run,
HistoManager histo 
)

Definition at line 46 of file extended/analysis/shared/src/EventAction.cc.

48  fRunAct(run),fHistoManager(histo),
49  fEnergyAbs(0.), fEnergyGap(0.),
50  fTrackLAbs(0.), fTrackLGap(0.),
51  fPrintModulo(0)
52 {
53  fPrintModulo = 100; }
virtual EventAction::~EventAction ( )
virtual
EventAction::EventAction ( )
EventAction::~EventAction ( )
EventAction::EventAction ( )
EventAction::~EventAction ( )
EventAction::EventAction ( RunAction )
EventAction::~EventAction ( )
EventAction::EventAction ( )
EventAction::~EventAction ( )
EventAction::EventAction ( )
EventAction::~EventAction ( )
EventAction::EventAction ( )
EventAction::~EventAction ( )
EventAction::EventAction ( )
EventAction::~EventAction ( )
EventAction::EventAction ( )
EventAction::~EventAction ( )
EventAction::EventAction ( RunAction )
EventAction::~EventAction ( )
EventAction::EventAction ( )
virtual EventAction::~EventAction ( )
virtual
EventAction::EventAction ( DetectorConstruction det,
RunAction run 
)

Definition at line 44 of file extended/electromagnetic/TestEm3/src/EventAction.cc.

45 :G4UserEventAction(),fDetector(det), fRunAct(run),
46  fEventMessenger(0)
47 {
48  fDrawFlag = "none";
49  fPrintModulo = 10000;
50  fEventMessenger = new EventActionMessenger(this);
51 }
EventAction::~EventAction ( )
EventAction::EventAction ( )
EventAction::~EventAction ( )
EventAction::EventAction ( )
EventAction::~EventAction ( )
EventAction::EventAction ( )
EventAction::~EventAction ( )
EventAction::EventAction ( )
EventAction::~EventAction ( )
EventAction::EventAction ( )
virtual EventAction::~EventAction ( )
virtual
EventAction::EventAction ( )
virtual EventAction::~EventAction ( )
virtual
EventAction::EventAction ( )
EventAction::~EventAction ( )
EventAction::EventAction ( )
virtual EventAction::~EventAction ( )
virtual
EventAction::EventAction ( )
virtual EventAction::~EventAction ( )
virtual
EventAction::EventAction ( )
virtual EventAction::~EventAction ( )
virtual
EventAction::EventAction ( )
EventAction::~EventAction ( )
EventAction::EventAction ( )
virtual EventAction::~EventAction ( )
virtual
EventAction::EventAction ( )
EventAction::~EventAction ( )
EventAction::EventAction ( RunAction )
EventAction::~EventAction ( )
EventAction::EventAction ( RunAction )
EventAction::~EventAction ( )
EventAction::EventAction ( )
EventAction::~EventAction ( )
EventAction::EventAction ( RunAction )
EventAction::~EventAction ( )
EventAction::EventAction ( )
EventAction::~EventAction ( )

Member Function Documentation

void EventAction::AddAbs ( G4double  de,
G4double  dl 
)
inline

Definition at line 57 of file extended/analysis/shared/include/EventAction.hh.

57 {fEnergyAbs += de; fTrackLAbs += dl;};
void EventAction::AddDecayChain ( G4String  val)
inline

Definition at line 55 of file extended/radioactivedecay/rdecay01/include/EventAction.hh.

55 {fDecayChain += val;};
void EventAction::AddEdep ( G4double  edep)
inline

Definition at line 52 of file extended/electromagnetic/TestEm11/include/EventAction.hh.

52 { fTotalEdep += edep; }
void EventAction::AddEdep ( G4double  Edep)
inline

Definition at line 53 of file extended/electromagnetic/TestEm1/include/EventAction.hh.

53 {fTotalEnergyDeposit += Edep;};
void EventAction::AddEdep ( G4double  edep)
inline

Definition at line 55 of file extended/electromagnetic/TestEm12/include/EventAction.hh.

55 {fTotalEdep += edep;};
void EventAction::addEdep ( G4double  Edep)
inline

Definition at line 55 of file extended/electromagnetic/TestEm4/include/EventAction.hh.

55 {fTotalEnergyDeposit += Edep;};
void EventAction::AddEnergy ( G4double  edep)
inline

Definition at line 52 of file extended/electromagnetic/TestEm5/include/EventAction.hh.

52 {fEnergyDeposit += edep;};
void EventAction::AddEnergyDeposit ( G4double  edep)
inline

Definition at line 55 of file extended/electromagnetic/TestEm18/include/EventAction.hh.

55 {fEnergyDeposit += edep;};
void EventAction::AddEventToDebug ( G4int  val)
inline

Definition at line 93 of file extended/hadronic/Hadr00/include/EventAction.hh.

94 {
95  fSelectedEvents.push_back(val);
96  ++fSelected;
97 }
void EventAction::AddEventToDebug ( G4int  val)
inline
void EventAction::AddEventToDebug ( G4int  val)
inline
void EventAction::AddEventToDebug ( G4int  val)
inline

Definition at line 68 of file extended/hadronic/Hadr02/include/EventAction.hh.

68  {selectedEvents.push_back(val);
69  nSelected++;};
void EventAction::AddGap ( G4double  de,
G4double  dl 
)
inline

Definition at line 58 of file extended/analysis/shared/include/EventAction.hh.

58 {fEnergyGap += de; fTrackLGap += dl;};
void EventAction::AddSecondary ( G4double  ekin)
inline

Definition at line 56 of file extended/electromagnetic/TestEm18/include/EventAction.hh.

56 {fEnergySecondary += ekin;};
void EventAction::AddTrakLenCharg ( G4double  length)
inline

Definition at line 53 of file extended/electromagnetic/TestEm5/include/EventAction.hh.

53 {fTrakLenCharged += length;};
void EventAction::AddTrakLenNeutr ( G4double  length)
inline

Definition at line 54 of file extended/electromagnetic/TestEm5/include/EventAction.hh.

54 {fTrakLenNeutral += length;};
virtual void EventAction::BeginOfEventAction ( const G4Event aevent)
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::BeginOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::BeginOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::BeginOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::BeginOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::BeginOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::BeginOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::BeginOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::BeginOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::BeginOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::BeginOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::BeginOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::BeginOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

void EventAction::BeginOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::BeginOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::BeginOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::BeginOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::BeginOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::BeginOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

void EventAction::BeginOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::BeginOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::BeginOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::BeginOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::BeginOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

void EventAction::BeginOfEventAction ( const G4Event evt)
virtual

Reimplemented from G4UserEventAction.

Definition at line 66 of file advanced/amsEcal/src/EventAction.cc.

References G4cout, G4endl, G4Event::GetEventID(), and DetectorConstruction::GetSizeVectorPixels().

67 {
68  G4int evtNb = evt->GetEventID();
69 
70  //survey printing
71  if (evtNb%printModulo == 0)
72  G4cout << "\n---> Begin Of Event: " << evtNb << G4endl;
73 
74  //initialize Energy per event
75  //
76  G4int nbOfPixels = detector->GetSizeVectorPixels();
77  G4int size = totalEnergy.size();
78  if (size < nbOfPixels) {
79  visibleEnergy.resize(nbOfPixels);
80  totalEnergy.resize(nbOfPixels);
81  }
82 
83  for (G4int k=0; k<nbOfPixels; k++) {
84  visibleEnergy[k] = totalEnergy[k] = 0.0;
85  }
86  nbRadLen = 0.;
87 }
int G4int
Definition: G4Types.hh:78
G4int GetEventID() const
Definition: G4Event.hh:140
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
virtual void EventAction::BeginOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::BeginOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::BeginOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::BeginOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::BeginOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::BeginOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::BeginOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

void EventAction::CountStepsCharg ( )
inline

Definition at line 56 of file extended/electromagnetic/TestEm5/include/EventAction.hh.

56 {fNbStepsCharged++ ;};
void EventAction::CountStepsNeutr ( )
inline

Definition at line 57 of file extended/electromagnetic/TestEm5/include/EventAction.hh.

57 {fNbStepsNeutral++ ;};
virtual void EventAction::EndOfEventAction ( const G4Event aevent)
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::EndOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::EndOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::EndOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::EndOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::EndOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::EndOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::EndOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::EndOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::EndOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::EndOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

void EventAction::EndOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::EndOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::EndOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::EndOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::EndOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::EndOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

void EventAction::EndOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::EndOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::EndOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::EndOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::EndOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::EndOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::EndOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::EndOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

void EventAction::EndOfEventAction ( const G4Event evt)
virtual

Reimplemented from G4UserEventAction.

Definition at line 91 of file advanced/amsEcal/src/EventAction.cc.

References HistoManager::AddRowNtuple(), HistoManager::FillHisto(), RunAction::fillNbRadLen(), HistoManager::FillNtuple(), RunAction::fillPerEvent_1(), RunAction::fillPerEvent_2(), RunAction::fillPerEvent_3(), DetectorConstruction::GetN1Pixels(), DetectorConstruction::GetN1Shift(), DetectorConstruction::GetN2Pixels(), G4ParticleGun::GetParticleEnergy(), PrimaryGeneratorAction::GetParticleGun(), and WritePixels().

92 {
93  G4int n1pxl = detector->GetN1Pixels();
94  G4int n2pxl = detector->GetN2Pixels();
95  G4int n1shift = detector->GetN1Shift();
96 
97  // code for trigger conditions :
98  // 1 and only 1 pixel fired per layer
99  //
100  if (trigger) {
101  for (G4int i1=0; i1<n1pxl; i1++) {
102  //count number of pixels fired
103  G4int count = 0;
104  for (G4int i2=0; i2<n2pxl; i2++) {
105  G4int k = i1*n1shift + i2;
106  if (visibleEnergy[k] > Eseuil) count++;
107  }
108  //if event killed --> skip EndOfEventAction
109  if (count > 1) return;
110  }
111  }
112 
113  //pass informations to RunAction and HistoManager
114  //
115  G4double calorEvis = 0.;
116  G4double calorEtot = 0.;
117  for (G4int i1=0; i1<n1pxl; i1++) {
118  //sum energy per readout layer
119  G4double layerEvis = 0.;
120  G4double layerEtot = 0.;
121  for (G4int i2=0; i2<n2pxl; i2++) {
122  G4int k = i1*n1shift + i2;
123  runAct->fillPerEvent_1(k,visibleEnergy[k],totalEnergy[k]);
124  layerEvis += visibleEnergy[k];
125  layerEtot += totalEnergy[k];
126  calorEvis += visibleEnergy[k];
127  calorEtot += totalEnergy[k];
128  }
129  runAct->fillPerEvent_2(i1,layerEvis,layerEtot);
130  if (layerEvis > 0.) histoManager->FillNtuple(1, i1, layerEvis);
131  if (layerEtot > 0.) histoManager->FillNtuple(1, n1pxl+i1, layerEtot);
132  }
133 
134  histoManager->AddRowNtuple(1);
135 
136  if (calorEvis > 0.) histoManager->FillHisto(1,calorEvis);
137  if (calorEtot > 0.) histoManager->FillHisto(2,calorEtot);
138 
139  G4double Ebeam = primary->GetParticleGun()->GetParticleEnergy();
140  G4double Eleak = Ebeam - calorEtot;
141  runAct->fillPerEvent_3(calorEvis,calorEtot,Eleak);
142 
143  //nb of radiation lenght
144  //
145  runAct->fillNbRadLen(nbRadLen);
146  if (nbRadLen > 0.) histoManager->FillHisto(5,nbRadLen);
147 
148  //write file of pixels
149  //
150  if (writeFile) WritePixels(evt);
151 }
void FillNtuple(G4int id, G4int column, G4double value)
void FillHisto(G4int id, G4double bin, G4double weight=1.0)
void fillPerEvent_1(G4int, G4double, G4double)
void fillPerEvent_2(G4int, G4double, G4double)
int G4int
Definition: G4Types.hh:78
void WritePixels(const G4Event *)
double G4double
Definition: G4Types.hh:76
void fillPerEvent_3(G4double, G4double, G4double)
G4double GetParticleEnergy() const
virtual void EventAction::EndOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::EndOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::EndOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::EndOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::EndOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

virtual void EventAction::EndOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

G4double EventAction::GetEdep ( ) const
inline

Definition at line 53 of file extended/electromagnetic/TestEm11/include/EventAction.hh.

53 { return fTotalEdep; }
G4double EventAction::GetEnergyDeposit ( )
inline

Definition at line 54 of file extended/electromagnetic/TestEm1/include/EventAction.hh.

54 {return fTotalEnergyDeposit;};
G4double EventAction::GetEnergyDeposit ( )
inline

Definition at line 56 of file extended/electromagnetic/TestEm4/include/EventAction.hh.

56 {return fTotalEnergyDeposit;};
void EventAction::SetDrawFlag ( G4String  val)
inline

Definition at line 54 of file extended/electromagnetic/TestEm16/include/EventAction.hh.

54 {fDrawFlag = val;};
void EventAction::SetDrawFlag ( G4String  val)
inline

Definition at line 54 of file extended/medical/electronScattering/include/EventAction.hh.

54 {fDrawFlag = val;};
void EventAction::SetDrawFlag ( G4String  val)
inline

Definition at line 54 of file extended/electromagnetic/TestEm6/include/EventAction.hh.

54 { fDrawFlag = val;};
void EventAction::SetDrawFlag ( G4String  val)
inline

Definition at line 54 of file extended/electromagnetic/TestEm7/include/EventAction.hh.

54 { fDrawFlag = val;};
void EventAction::SetDrawFlag ( G4String  val)
inline

Definition at line 55 of file extended/medical/fanoCavity/include/EventAction.hh.

55 {fDrawFlag = val;};
void EventAction::SetDrawFlag ( G4String  val)
inline

Definition at line 55 of file extended/medical/fanoCavity2/include/EventAction.hh.

55 {fDrawFlag = val;};
void EventAction::SetDrawFlag ( G4String  val)
inline

Definition at line 55 of file extended/electromagnetic/TestEm3/include/EventAction.hh.

55 {fDrawFlag = val;};
void EventAction::SetDrawFlag ( G4String  val)
inline

Definition at line 57 of file extended/electromagnetic/TestEm12/include/EventAction.hh.

57 {fDrawFlag = val;};
void EventAction::SetDrawFlag ( G4String  val)
inline

Definition at line 57 of file advanced/amsEcal/include/EventAction.hh.

Referenced by EventActionMessenger::SetNewValue(), and EventMessenger::SetNewValue().

57 {drawFlag = val;};
void EventAction::SetDrawFlag ( G4String  val)
inline

Definition at line 58 of file extended/electromagnetic/TestEm18/include/EventAction.hh.

58 {fDrawFlag = val;};
void EventAction::SetDrawFlag ( G4String  val)
inline

Definition at line 67 of file extended/hadronic/Hadr02/include/EventAction.hh.

67 {drawFlag = val;};
void EventAction::SetPrintModulo ( G4int  val)
inline

Definition at line 54 of file extended/electromagnetic/TestEm14/include/EventAction.hh.

54 {fPrintModulo = val;};
void EventAction::SetPrintModulo ( G4int  val)
inline

Definition at line 54 of file extended/polarisation/Pol01/include/EventAction.hh.

54 {printModulo = val;};
void EventAction::SetPrintModulo ( G4int  val)
inline

Definition at line 54 of file extended/electromagnetic/TestEm15/include/EventAction.hh.

54 {fPrintModulo = val;};
void EventAction::SetPrintModulo ( G4int  val)
inline

Definition at line 54 of file extended/electromagnetic/TestEm17/include/EventAction.hh.

54 {fPrintModulo = val;};
void EventAction::SetPrintModulo ( G4int  val)
inline

Definition at line 54 of file extended/hadronic/Hadr03/include/EventAction.hh.

54 {fPrintModulo = val;};
void EventAction::SetPrintModulo ( G4int  val)
inline

Definition at line 54 of file extended/exoticphysics/monopole/include/EventAction.hh.

54 { fPrintModulo = val; };
void EventAction::SetPrintModulo ( G4int  val)
inline

Definition at line 54 of file extended/electromagnetic/TestEm13/include/EventAction.hh.

54 {fPrintModulo = val;};
void EventAction::SetPrintModulo ( G4int  val)
inline

Definition at line 54 of file extended/radioactivedecay/rdecay01/include/EventAction.hh.

54 {fPrintModulo = val;};
void EventAction::SetPrintModulo ( G4int  val)
inline

Definition at line 55 of file extended/electromagnetic/TestEm6/include/EventAction.hh.

55 { fPrintModulo = val;};
void EventAction::SetPrintModulo ( G4int  val)
inline

Definition at line 55 of file extended/electromagnetic/TestEm16/include/EventAction.hh.

55 {fPrintModulo = val;};
void EventAction::SetPrintModulo ( G4int  val)
inline

Definition at line 55 of file extended/electromagnetic/TestEm7/include/EventAction.hh.

55 { fPrintModulo = val;};
void EventAction::SetPrintModulo ( G4int  val)
inline

Definition at line 55 of file extended/medical/electronScattering/include/EventAction.hh.

55 {fPrintModulo = val;};
void EventAction::SetPrintModulo ( G4int  val)
inline

Definition at line 56 of file extended/medical/fanoCavity/include/EventAction.hh.

56 {fPrintModulo = val;};
void EventAction::SetPrintModulo ( G4int  val)
inline

Definition at line 56 of file extended/electromagnetic/TestEm3/include/EventAction.hh.

56 {fPrintModulo = val;};
void EventAction::SetPrintModulo ( G4int  val)
inline

Definition at line 56 of file extended/medical/fanoCavity2/include/EventAction.hh.

56 {fPrintModulo = val;};
void EventAction::SetPrintModulo ( G4int  val)
inline

Definition at line 56 of file extended/electromagnetic/TestEm2/include/EventAction.hh.

56 {fPrintModulo = val;};
void EventAction::SetPrintModulo ( G4int  val)
inline

Definition at line 57 of file extended/electromagnetic/TestEm9/include/EventAction.hh.

57 { fPrintModulo = val;};
void EventAction::SetPrintModulo ( G4int  val)
inline

Definition at line 58 of file extended/electromagnetic/TestEm12/include/EventAction.hh.

58 {fPrintModulo = val;};
void EventAction::SetPrintModulo ( G4int  val)
inline

Definition at line 58 of file advanced/amsEcal/include/EventAction.hh.

Referenced by EventActionMessenger::SetNewValue(), and EventMessenger::SetNewValue().

58 {printModulo = val;};
void EventAction::SetPrintModulo ( G4int  val)
inline

Definition at line 59 of file extended/electromagnetic/TestEm18/include/EventAction.hh.

59 {fPrintModulo = val;};
void EventAction::SetPrintModulo ( G4int  val)
inline
void EventAction::SetPrintModulo ( G4int  val)
inline
void EventAction::SetPrintModulo ( G4int  val)
inline
void EventAction::SetPrintModulo ( G4int  val)
inline

Definition at line 66 of file extended/hadronic/Hadr02/include/EventAction.hh.

66 {printModulo = val;};
void EventAction::SetReflectFlag ( G4int  flag)
inline

Definition at line 61 of file extended/electromagnetic/TestEm5/include/EventAction.hh.

62  {if (flag > fReflectFlag) fReflectFlag = flag;};
void EventAction::SetTransmitFlag ( G4int  flag)
inline

Definition at line 59 of file extended/electromagnetic/TestEm5/include/EventAction.hh.

60  {if (flag > fTransmitFlag) fTransmitFlag = flag;};
void EventAction::SetWriteFile ( G4bool  val)

Definition at line 155 of file advanced/amsEcal/src/EventAction.cc.

References RunAction::SetWriteFile().

Referenced by EventActionMessenger::SetNewValue().

156 {
157  writeFile = val;
158  runAct->SetWriteFile(val);
159 }
void EventAction::SumEnergy ( G4int  k,
G4double  de,
G4double  dl 
)
inline

Definition at line 58 of file extended/electromagnetic/TestEm3/include/EventAction.hh.

59  {fEnergyDeposit[k] += de; fTrackLengthCh[k] += dl;};
void EventAction::SumNbRadLength ( G4double  dn)
inline

Definition at line 66 of file advanced/amsEcal/include/EventAction.hh.

Referenced by SteppingAction::UserSteppingAction().

66 {nbRadLen += dn;};
void EventAction::SumTotalEnergy ( G4int  pixel,
G4double  de 
)
inline

Definition at line 63 of file advanced/amsEcal/include/EventAction.hh.

Referenced by SteppingAction::UserSteppingAction().

64  {totalEnergy[pixel] += de;};
void EventAction::SumVisibleEnergy ( G4int  pixel,
G4double  de 
)
inline

Definition at line 60 of file advanced/amsEcal/include/EventAction.hh.

Referenced by SteppingAction::UserSteppingAction().

61  {visibleEnergy[pixel] += de;};
void EventAction::WritePixels ( const G4Event evt)

Definition at line 167 of file advanced/amsEcal/src/EventAction.cc.

References testem0::app, G4endl, G4Event::GetEventID(), HistoManager::GetFileName(), G4ParticleGun::GetParticleEnergy(), PrimaryGeneratorAction::GetParticleGun(), G4ParticleGun::GetParticleMomentumDirection(), G4VPrimaryGenerator::GetParticlePosition(), and DetectorConstruction::GetSizeVectorPixels().

Referenced by EndOfEventAction().

168 {
169  // event is appended onto file created at BeginOfRun
170  //
171  G4String name = histoManager->GetFileName();
172  G4String fileName = name + ".pixels.ascii";
173 
174  std::ofstream File(fileName, std::ios::app);
175  std::ios::fmtflags mode = File.flags();
176  File.setf( std::ios::scientific, std::ios::floatfield );
177  G4int prec = File.precision(3);
178 
179  //write event number
180  //
181  File << evt->GetEventID() << G4endl;
182 
183  //gun particle informations
184  //
185  G4ParticleGun* gun = primary->GetParticleGun();
186  G4double ekin = gun->GetParticleEnergy();
187  G4ThreeVector direction = gun->GetParticleMomentumDirection();
189  File << ekin << " " << direction << " " << position << G4endl;
190 
191  //count nb of fired pixels
192  //
193  G4int firedPixels = 0;
194  G4int nbOfPixels = detector->GetSizeVectorPixels();
195  for (G4int k=0; k<nbOfPixels; k++) {
196  if (totalEnergy[k] > 0.0) firedPixels++;
197  }
198  File << firedPixels << G4endl;
199 
200  //write pixels
201  //
202  for (G4int k=0; k<nbOfPixels; k++) {
203  if (totalEnergy[k] > 0.0)
204  File << k << " " << visibleEnergy[k] << " " << totalEnergy[k] << " ";
205  }
206  File << G4endl;
207 
208  // restaure default formats
209  File.setf(mode,std::ios::floatfield);
210  File.precision(prec);
211 }
const XML_Char * name
G4ThreeVector GetParticlePosition()
int G4int
Definition: G4Types.hh:78
G4int GetEventID() const
Definition: G4Event.hh:140
G4ParticleMomentum GetParticleMomentumDirection() const
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
G4double GetParticleEnergy() const

The documentation for this class was generated from the following files: