Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CalibrationSmearer.h

Go to the documentation of this file.
00001 
00002 // $Id: CalibrationSmearer.h,v 1.2 2004/07/21 16:36:05 tagg Exp $
00003 // CalibrationSmearer
00004 //
00005 // Base class for an object that can provide hashable random number lookup
00006 // to smear random number generation.
00007 //
00008 //
00009 // Nathaniel Tagg n.tagg1@physics.ox.ac.uk
00011 
00012 #ifndef CALIBRATIONSMEARER_H
00013 #define CALIBRATIONSMEARER_H
00014 
00016 // 
00017 // CalibrationSmearer
00018 //
00019 // A class that serves to serve random numbers generated once from 
00020 // a key. This can be used to change the calibration values around
00021 // their means by random errors.
00022 //
00023 // To use: Make one. Store it somewhere for the length of the job run.
00024 // To get values out, use GetGausSmear(key), where key is a channel ID 
00025 // of some kind (like PlexStripEndId::GetEncoded())
00026 //
00027 // Nathaniel Tagg n.tagg1@physics.ox.ac.uk
00028 //
00030 
00031 #include <TRandom.h>
00032 
00033 class CalibrationSmearer : public TObject
00034 {
00035  public:
00036   CalibrationSmearer( Int_t size = 1001, TRandom* generator = 0 );
00037   ~CalibrationSmearer();
00038   
00039   // Return a single random normal number (-inf,inf) that is always the same for 
00040   // a single value of KEY:
00041   Float_t       GetGausSmear(Int_t key) const;
00042 
00043   // Return a set of n random normal numbers:
00044   const Float_t* GetGausSmears(Int_t key, Int_t n) const;
00045 
00046  private:
00047   Int_t     fN;
00048   Float_t* fValues;
00049 
00050   ClassDef(CalibrationSmearer,0);
00051 };
00052 
00053 #endif

Generated on Mon Feb 15 11:06:27 2010 for loon by  doxygen 1.3.9.1