Message: Re: Number of Particle Scored in an Event Using Multifunctional Detector Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Number of Particle Scored in an Event Using Multifunctional Detector 

Forum: Hits, Digitization and Pileup
Re: Question Number of Particle Scored in an Event Using Multifunctional Detector (Matthew Lund)
Date: 10 Jun, 2014
From: Matthew Lund <Matthew Lund>

I figured out how to get the number of hits by using entries() function for the event map. I placed in Run.cc, RecordEvent:

            G4double n_hit = evtMap->entries();
            std::map<G4int,G4double*>::iterator itr = evtMap->GetMap()->begin();
            for(; itr != evtMap->GetMap()->end(); itr++) {

            // Add up number of Hits in each detector for event
                fRunMap_NPS[i]->add(itr->first,n_hit);

 Add Message Add Message
to: "Re: Number of Particle Scored in an Event Using Multifunctional Detector"

 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 ]