LData
class description - source file - inheritance tree
class LData : public TNamed
private:
void AddAV(const Float_t avelocity)
int AddTH2F(TH2F* a, TH2F* b)
Float_t CalcIndexToTime(const Int_t idx) const
void ClearArray()
void SetStyle(TH1* his, const char* xaxis, const char* yaxis)
Float_t Velocity(const Int_t i, const Int_t n, const Float_t* track) const
public:
LData LData()
LData LData(LDataHeader* header)
LData LData(const LData&)
virtual void ~LData()
void Add(const Int_t n, const Float_t* track, const Float_t* tracke, const Float_t ttime, Double_t cputime = -1.)
void Add(const LContainer* container)
LData* Add(LData* data)
virtual void Browse(TBrowser*)
static TClass* Class()
virtual void Draw(Option_t* option)
virtual void DrawPanel()
Float_t GetAV()
Double_t GetCPUtime() const
LDataHeader* GetHeader() const
TObject* GetHistogram(Option_t* option, Float_t binwidth = 1.0)
Long_t GetJobID() const
Float_t GetMaxTTime()
Float_t GetMinTTime()
Float_t GetTTime(Float_t to = 0)
virtual TClass* IsA() const
virtual void Paint(Option_t* option)
Int_t Prepare()
void SetHeader(LDataHeader* header)
void SetJobID(const Long_t id)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
bool Test(Int_t mode) const
private:
Float_t* fav_temp ! temporary storing ttime array
Int_t fnav_temp ! index
Double_t fcpu_time time of cpu used to calc data
protected:
Long_t fjobID identification of job
public:
Int_t fN number of all repetitions stored in fp and fe
Int_t fnav number of elements in fav (note that transit times,
Float_t* fav average velocity array
TH2F* fpt position vs time distribution
TH2F* fvt velocity vs time distribution
TH2F* fvp velocity vs position distribution
TH2F* fet energy vs time distribution
LDataHeader* fheader Data Header class
Float_t favg Transit time average
Float_t favsig variance of ttime average
This is data tranfer class
it can calculate averages of track positions
velocity end energies. It can present data in
format, approptiate for presentations.
it was created to do statistics with the Monte Carlo
simulation data obtained by LDisorder class.
basic operation of adding data:
position and energy vs time is obtained by LDisorder
class. See hoppclient.cc for example. This data is
then transported through network or other media via
LContainer class and then added to LData. See hoppserv.cc
for details. Other posibility is shown with hoppclient in
queue mode and empty_container.C script.
Before streaming of data, the Prepare function should be
called to create fav array off correct size. Temporary
array is not streamed.
adding data using LContainer
LContainer class is used to transfer multiple tracks from
simulation part to storage part instead of big LData class.
adding of another LData:
fp and fe are summed, fN is increased by the fN of added
data
WARNING: all indexes of array are 1-based in contrast to for
example to LDisorder, where are 0-indexed!!!
WARNING: time units are arbitrary! So velocity as well as tof current
and all time axes needs to be converted to real time units
velocity need to be divided by real time units
If you need to compare different simulations it is enough to
use fresolution as a time unit. In contrast time axis should be
multiplied by time units...
tof was already normalized to time units!
Logs:
$Log: LData.cc,v $
Revision 1.28 2004/10/12 10:02:25 cvs
corrected GetAV, so the zero values are rejected.
Revision 1.27 2004/08/26 09:11:44 cvs
corrected gettime so it return always positive time value regardless average velocity obtained with GetAV().
Revision 1.26 2004/07/13 10:12:44 cvs
forgot to modify info
Revision 1.25 2004/07/13 09:57:57 cvs
found bug in tof normalization. solution is to multiply histogram with tof->Scale(data->fvt->GetEntries()/(Double_t)data->fN/(header->rpmax-header->rpmin)/header->fresolution); and then the tof is normalized! This bug was corrected and commited to cvs.
Revision 1.24 2004/07/12 17:14:30 cvs
found right tof normalization. Not implemented in code yet
Revision 1.23 2004/07/09 09:43:23 cvs
updated info of LData.cc
Revision 1.22 2004/04/09 13:21:05 cvs
added cputime logging...
Revision 1.21 2004/01/06 08:28:27 cvs
found a bug in LData::Add(int,float*,float*) which caused segfault at adding only one track
Revision 1.20 2003/12/22 14:32:36 cvs
added simulation of laser -> LDataHeader version 5
modified hoppserver sigint interruption
Revision 1.19 2003/12/15 16:17:26 cvs
more verbosity
Revision 1.18 2003/11/24 17:06:23 cvs
a bug was corrected in LServer::GetLData and the error bars were corrected when drawing Draw(".tof.")
Revision 1.17 2003/11/15 17:17:26 cvs
new scheme is working...
Clients (hoppclient) are connected as kLC_AMAX and free socket is given
TLServer (lserver) is multithreading
LServer (hoppserver) has a file which is always in memory - faster but needs more memory
Revision 1.16 2003/11/03 13:54:40 cvs
TLServer is now threaded, LData and LDataHeader have now right Draw and Paint methods, LIV is controlled and comments were added.
Revision 1.15 2003/08/30 11:28:52 cvs
simplified and checked LIV calculations
Revision 1.14 2003/08/28 14:41:17 cvs
corrected the bug in LData::Add(float,float,float,...). Description of bug: position index, that was obtained by simulation, was not shifted by -1 like was shifted the range of position in LDataHeader::SetDefaults.
Revision 1.13 2003/07/25 11:36:26 cvs
simulation of IV measurements is done with iv program
some minority fixes to LDisorder - corrected ft to match the recorded position
Revision 1.12 2003/07/15 14:19:35 cvs
corrected ranges when creating histograms. See LDataHeader::Defaults(). Added Draw(".bias.") to draw bias array
Revision 1.11 2003/07/09 13:27:39 cvs
Modified ranges for histograms stored in LData. Ranges are set by LDataHeader->SetDefaults() and MAX_BINS in Config.h
Revision 1.10 2003/07/08 16:02:13 cvs
added correct calculations for Draw(".tof.") including statistical error calculation.
Revision 1.9 2003/07/01 13:09:27 cvs
added Draw(".tof.") to simulate photocurrent measurements
Revision 1.8 2003/07/01 12:17:18 cvs
New LData organization. data is stored in TH2F histograms. This enables easier manipulation. Found a bug in drawing averaged velocity vs time. The average number was calcuated over whole times.
Revision 1.7 2003/06/27 07:43:16 cvs
error corrected in Add(float* float* float) in adding velocity.
Revision 1.6 2003/06/26 12:23:15 cvs
averaged velocity is stored in .TTIME. instead of transit time. This was done, becose we need to know the average velocity instead of transit time to know mobility.
Revision 1.5 2003/06/26 09:27:11 cvs
added log fields...
LData():TNamed()
LData(LDataHeader* header):TNamed("data","Monte Carlo simulation results")
this copy parameters from header
it creates a temporary fav_temp array of size FNAV_TEMP
before the data is sent you must call LData::Prepare() to
prepare LData class for containing real data
~LData()
default destructor
ClearArray()
set array values to 0
clear arrays
Velocity(const Int_t i,const Int_t n,const Float_t* track) const
this is used to calculate velocity in track i of size fy
set here the division with time interval if neccessary!!
set here the multiplication with header->fbasez!!
Add(LData* data)
this add another data to this data class! fjobID must be equal
or 0 is returned! It uses AddTime to store ttime
Add(const Int_t n,const Float_t* track,const Float_t* tracke,const Float_t ttime,const Double_t cputime)
n is the last index of track and tracke
this add ttime, tracks fp and fe and increases fN by one
STORE AVERAGE VELOCITY INSTEAD TRANSIT TIME into fav
Add(const LContainer* container)
adds data from a container
AddAV(const Float_t avelocity)
this add ttime to fav_temp array and increase fnav counter by 1
if necessary increases fav_temp bye FNAV_TEMP
Prepare()
this function is called to prepare LData for streaming....
this function store from fttime_temp to fttime array and correct its
size. I have done this to avoid the ?slow? dinamic resizing
GetMaxTTime()
this return the max ttime value
GetMinTTime()
this return the min ttime value
GetTTime(Float_t to)
return transit time calculated from average velocities (fav array)
to...time units
GetAV()
calculates average and standard deviation of average
velocity from fav array
average is returned, while st.dev. is stored in LData::favsig
average is also stored in LData::favg
average velocity, that is simulated with LDisorder and added to fav array
could be negative or zero. This happens, when the particle travel distance
is zero - particle starts at zero and exits at the same point or at any
point with smaller z position. These values are thus rejected from
the calculation of average velocity.
Average velocity is defined as total distance/average time!
SetStyle(TH1* his,const char* xaxis,const char* yaxis)
AddTH2F(TH2F* a,TH2F* b)
this add a to b
GetHistogram(Option_t* option,Float_t binwidth)
create and fill histograms
binwidth is used for RESOLUTION parameter
when using option TTIME, binwidth (if set) is used to set number of bins
for option see LData::Draw
Profiles are used with default options- error on mean
Browse(TBrowser*)
DrawPanel()
Draw(Option_t* option)
see LData::Paint() for more info
Paint(Option_t* option)
Regarding option, this method draws distribution of
.VT. -- velocity vs time
.AVT. -- average velocity vs time
.PT. -- position vs time
.APT. -- average position vs time
.VP. -- velocity vs position
.AVP. -- average velocity vs position
.ET. -- energy vs time
.AET. -- average energy vs time
.AV. -- average velocity distibution (different data)
.TOF. -- photogenerated current vs time
.BIAS. -- bias vs position
histograms are created dynamically - potential memory leak!
Test(Int_t mode)const
various tests, see LDisorder::for example
* in test mode 1, the particle should only travel in z dimension,
so at each time step, they should be in another bin. The most important
is, that the MAX is equal to SPACEZ
TF1* GetTTime(Int_t nbins)
this fits gaussian to ttime histogram and returns the fitted function
use ->GetParameter(2) to mean value
use ->GetParameter(3) to std
Streamer(TBuffer &R__b)
special streamer for LContainer
Inline Functions
Double_t GetCPUtime() const
void SetJobID(const Long_t id)
Long_t GetJobID() const
void SetHeader(LDataHeader* header)
LDataHeader* GetHeader() const
Float_t CalcIndexToTime(const Int_t idx) const
TClass* Class()
TClass* IsA() const
void ShowMembers(TMemberInspector& insp, char* parent)
void StreamerNVirtual(TBuffer& b)
LData LData(const LData&)
Author: Egon Pavlica
Last update: Sat Oct 16 19:10:30 2004
ROOT page - Class index - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.