Message: variable adding up in profile histogram Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question variable adding up in profile histogram 

Forum: Event and Track Management
Date: 07 May, 2010
From: Katalin Nikolics <Katalin Nikolics>

I'm trying to integrate a variable (total radiation length TotRad) that's calculated in the SteppingAction... the point is to fill that variable then into a profile histogram (TProfile), done so in the EndOfEventAction, together with another variable (Eta) evaluated in the BeginOfEventAction. For that reason, all those methods (BeginOfEventAction, EndOfEventAction, SteppingAction) are gathered in one file. The TFile is opened in the int main() along with the definition of TProfile* prof. This seems to be the logical way to me, however, instead of filling prof for each event, it seems that TotRad is accumulated for events that yield the same value and hence it grows to crazy numbers... despite being set to 0 again in BeginOfEventaction. What's wrong??


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

1 None: Re: variable adding up in profile histogram   (michel maire - 07 May, 2010)
 Add Message Add Message
to: "variable adding up in profile histogram"

 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 ]