Message: Spectrum with Primitive Scorers? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Spectrum with Primitive Scorers? 

Forum: Hits, Digitization and Pileup
Date: 03 Dec, 2014
From: Patrik Eschle <Patrik Eschle>


Is there an elegant way to use primitive scoreres to get a spectrum?

* Background

I'm switching my data collection from SensitiveDetector to PrimitveScorer, so I don't have to re-invent the wheel for all quantities.

One quantity I record is the energy spectrum of the incident radiation. Inside the sensitive detector I fill a histogram with the kinetic energies of the photons entering the detector. The histogram is accessed via a global variable, a typical energy resolution is 100 eV and the detector is implemented as box in a massless parallel world.

* Solution I tried

I tried to implement this in a Primitive Scorer, misusing index as energy bin:

    G4int index = floor((eKin - eMin)/unit+0.5); // eKin >= eMin

* Question

This seems to work and I get back the filled EvtMap. But I see no way to access the energy resolution and the minimal energy I passed to my primitive scorer (variables 'unit' and 'eMin').

I found one suggestion to implement the spectrum via filters, which seems not elegant and efficient at all.

Is there a way to implement the spectrum with a primitive scorer?



 Add Message Add Message
to: "Spectrum with Primitive Scorers?"

 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 ]