Message: Re: Untitled Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Untitled 

Forum: Analysis
Re: None Untitled (Anil)
Re: None Re: Untitled
Re: None Re: Untitled (Anil)
Date: Jan 11, 13:40
From: <Shams>

Hi Anil,

Thaks for your reply. Yes, I understand the procedure of obtaining a,b,c parameters. Using some online information, here is what I implemented:

// *********************************
// 1D random number
TRandom1 rand;

double fwhm = 0;
double lightSmear = 0;
double a = -0.0137 , b =  .0752, c = -0.121; 

  fwhm = a + b*sqrt( depositedEnergy + c* pow(depositedEnergy,2) );
  
//  Smeared deposited energy

  lightSmear = rand.Gaus(depositedEnergy, fwhm / 2.35);

// If smeared lightoutput is neg, generate Random  number to get positive
	
  while (lightSmear<=-0){  
    lightSmear = rand.Gaus(depositedEnergy, fwhm / 2.35);

  }

// Histogram the smeared deposited energy
LO->Fill(lightOutput);

// *********************************

What do you think of the procedure? The spectrum looks acceptable (attached) but I just wanted to confirm the my implementation method. 

Also, I was not able to understand when you said "add the contributions to no. of counts corresponding to each energy"

Thanks!



   Attachment:
      http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2019/01/11/13.38-4810-Smeared.pdf

 Add Message Add Message
to: "Re: Untitled"

 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 ]