GSI Forum - RDF feed
type: channel
description: GSI Helmholtzzentrum für Schwerionenforschung
items: Time stamps in MCEventHeader
items: Re: Time stamps in MCEventHeader

Time stamps in MCEventHeader
type: item
description: Hi, I added time stamps to the MCEventHeader (r 2772), to use this in the simulation macro: CbmPrimaryGenerator* primGen = new CbmPrimaryGenerator(); primGen->SetEventTimeInterval ( minTime, maxTime) ; the event time will be a random number between minTime and maxTime in nano secounds, it will also be added for each event, i.e: each event will have the time of all previous events+ its own one! regards Mohammad
creator: Mohammad Al-Turany
date: 2008-05-15T07:57:27-00:00

Re: Time stamps in MCEventHeader
type: item
description: Very good! What is the random generator you use? I think it should be a random distribution. Cheers, Tobias
creator: Tobias Stockmanns
date: 2008-05-15T08:10:45-00:00

Re: Time stamps in MCEventHeader
type: item
description: Hi, I use: TRandom::Uniform(min, max) is this enough or should we change it! or should the user have the possibility to choose the Random generator? Mohammad
creator: Mohammad Al-Turany
date: 2008-05-15T08:24:30-00:00

Re: Time stamps in MCEventHeader
type: item
description: Hi Mohammad, it should be an exponential function with the mean time between events (100 ns) as parameter
creator: Tobias Stockmanns
date: 2008-05-16T06:23:17-00:00

Re: Time stamps in MCEventHeader
type: item
description: Hi, Can you explain me in more details what do you mean by this! do you mean the random distribution or the the time it self? Mohammad
creator: Mohammad Al-Turany
date: 2008-05-16T06:38:13-00:00

Re: Time stamps in MCEventHeader
type: item
description: Hi Mohammad, the probability distribution of time intervals between two consecutive events is given by: P(t) = 1/meantime * exp (- 1/meantime * t). The meantime should be a free parameter (typically 100 ns). I hope this clarifies it. Have a nice weekend Tobias
creator: Tobias Stockmanns
date: 2008-05-16T11:00:26-00:00

Re: Time stamps in MCEventHeader
type: item
description: Hi, So, I added a new method SetEventMeanTime(Double_t) to the CbmPrimaryGenerator, setting this value will create a TF1 function: TF1 *f1 = TF1("f1", "1/meanTime * Exp (-t/meanTime)", 0, meanTime*10 ) Then the event time is taken randomly from this distribution (f1->GetRandom()) and will be added for each event! Please test it and let me know! regards Mohammad
creator: Mohammad Al-Turany
date: 2008-05-19T18:41:18-00:00

Re: Time stamps in MCEventHeader
type: item
description: Hi Mohammad, Or you could use TRandom::Exp(Double_t tau), that does exactly the same faster. Greetings Oscar
creator: Oscar Reinecke
date: 2008-05-21T13:34:04-00:00

Re: Time stamps in MCEventHeader
type: item
description: Maybe one could just give a TF1 function as parameter, so that the user can set whichever distribution he likes.
creator: StefanoSpataro
date: 2008-05-21T15:26:06-00:00

Re: Time stamps in MCEventHeader
type: item
description: Hallo Oscar, You are right, it gives the same results! it is not faster but more simple! so now we have two methods: 1. SetEventMeanTime(Double_t) 2. SetEventTimeInterval ( minTime, maxTime) ; do we need a very general one as Stefano suggested ! regards Mohammad
creator: Mohammad Al-Turany
date: 2008-05-23T10:03:48-00:00