Message: Re: Can't find source code to pay out mean energy in the gap example N03 Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Can't find source code to pay out mean energy in the gap example N03 

Forum: Installation and Configuration
Re: Question Can't find source code to pay out mean energy in the gap example N03 (Le Ba Manh Hung)
Date: 25 Nov, 2010
From: michel maire <michel maire>

On Thu, 25 Nov 2010 11:35:52 GMT, Le Ba Manh Hung wrote:
> Hi all, I'm studying example N03, but I can't find source code to pay
> out mean energy in a gap every event. Please tell me where can I find
> it. Thanks
> 
  The function to sum up energy per event is very simple and, therefore, inlined . The code is wholly in EventAction.hh

 class EventAction : public G4UserEventAction
 {
 public:
  EventAction(RunAction*);
  virtual ~EventAction();

  void  BeginOfEventAction(const G4Event*);
  void    EndOfEventAction(const G4Event*);

  void AddAbs(G4double de, G4double dl) {EnergyAbs += de; TrackLAbs += dl;};
  void AddGap(G4double de, G4double dl) {EnergyGap += de; TrackLGap += dl;};

  void SetPrintModulo(G4int    val)  {printModulo = val;};

 private:
   RunAction*  runAct;

   G4double  EnergyAbs, EnergyGap;
   G4double  TrackLAbs, TrackLGap;

   G4int     printModulo;

   EventActionMessenger*  eventMessenger;
 };

     Michel

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Ok: Re: Can't find source code to pay out mean energy in the gap example N03   (Le Ba Manh Hung - 28 Nov, 2010)
 Add Message Add Message
to: "Re: Can't find source code to pay out mean energy in the gap example N03"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]