Message: Energy deposit event by event Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Energy deposit event by event 

Forum: Event and Track Management
Date: 05 Apr, 2016
From: <Nicolas78>

Hello everyone,

I'd like to know how I can get the energy deposit event by event using eventID.
In fact, I have a ntuple where I get the eventID and the energy deposit by each step.
But now I'd like to get the edeposit by each event.
For instance, using my output.root file for the first event I'd do something like:

which sums all the energy deposit by the first event. Now let's suppose I have 400events and each of them can generate multiple particles so I have to get the sum of edep for each event.

I've tried to use a for loop like: for(eventID=0;eventID<400;eventID++) sum+=edep; But it would only give me the total energy deposit generated by all the events.

I'd like to get something like: eventID0 edep=... eventID1 edep=... ... ...

Any suggestions on how to make it ?

Thank you very much

 Add Message Add Message
to: "Energy deposit event by event"

 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 ]