class HMdcOffsetCheckTimeShift: public HReconstructor

_HADES_CLASS_DESCRIPTION


 HMdcOffsetCheckTimeShift

 Defines the offset  parameter for MDC calibration. Uses HMdcCalParRaw container
 as  input/output for calibration data


Function Members (Methods)

public:
HMdcOffsetCheckTimeShift()
HMdcOffsetCheckTimeShift(const Text_t* name, const Text_t* title)
virtual~HMdcOffsetCheckTimeShift()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidHReconstructor::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual Bool_tHReconstructor::connectTask(HTask* task, Int_t n = 0)
virtual voidTNamed::Copy(TObject& named) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual Int_texecute()
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidTNamed::FillBuffer(char*& buffer)
virtual Bool_tfinalize()
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual HTask*HReconstructor::getComposite()
virtual voidHReconstructor::getConnections()
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
virtual const char*TNamed::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual HTask*HTask::getOwner()
TObjArrayHReconstructor::getTable()
virtual HTask*HReconstructor::getTask(const Char_t* name)
virtual const char*TNamed::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual Bool_tinit()
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tHReconstructor::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
virtual voidHReconstructor::isTimed(Bool_t flag = kTRUE)
Bool_tTObject::IsZombie() const
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual HTask*HReconstructor::next(Int_t& errCode)
virtual Bool_tTObject::Notify()
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
HTask&HTask::operator=(const HTask&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTNamed::Print(Option_t* option = "") const
virtual voidHReconstructor::printTimer()
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
virtual Bool_treinit()
voidTObject::ResetBit(UInt_t f)
virtual voidHReconstructor::resetTimer()
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
voidHReconstructor::setActive(Bool_t state)MENU
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual Bool_tHTask::setConnections()
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidHTask::setManual()
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
voidsetNoise(Int_t o, Int_t w)
voidsetNoiseOffset(Int_t i)
voidsetNoiseWidth(Int_t i)
voidsetNoStart()
voidsetNumberOfEvents(Int_t i)
static voidTObject::SetObjectStat(Bool_t stat)
voidsetOutputAscii(const Char_t*)
voidsetOutputRoot(const Char_t*)
virtual voidHTask::setOwner(HTask* atask)
voidsetPulserFile()
voidsetRangeGauss(Int_t i)
voidsetStepSize(Int_t i)
voidsetThreshold(Float_t min, Float_t max)
voidsetThresholdMax(Float_t f)
voidsetThresholdMin(Float_t f)
voidsetTimeCut(Bool_t cut)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
voidcreateHist(TFile*, Int_t, Int_t, Int_t, Int_t)
voiddeleteHist()
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidfillHist(Int_t, Int_t, Int_t, Int_t)
Int_tfitHist(Int_t, Int_t, Int_t, Int_t)
Float_tgetstarttime()
Bool_tisNaN(float f)
voidTObject::MakeZombie()
TDirectory*Mkdir(TDirectory*, const Char_t*, Int_t, Int_t p = 1)
ofstream*openAsciiFile()
voidsetDefault()
voidwriteAscii(ofstream&, Int_t, Int_t, Int_t, Int_t)
voidwriteHist(TFile*)

Data Members

public:
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
protected:
HCategory*calStartCat! pointer to the cal data
HMdcCalParRaw*calparrawpointer to HMdcCalParRaw container
floatcrosspointXx-value of the intersection point of the two linear fits->offset
Int_teventcountercounts number of calculated events of all files
Bool_tHReconstructor::fActiveActive flag
TList*HReconstructor::fHistogramsList of histograms generated by this reconstructor.
Bool_tHTask::fIsTimedtimer flag
TStringTNamed::fNameobject identifier
Char_t*fNameAsciiOffsetfile name of ascii output file
Char_t*fNameRootOffsetfile name of root output file
TObjArrayHReconstructor::fOutputs
TStopwatchHReconstructor::fTimerTask timer
TStringTNamed::fTitleobject title
Int_tfilecountercounts the number of files
Char_tfilenames[50][200]Array to store the names of the anaylyzed files
floatfitGaussMeanmean of the gaussian fit
floatfitGaussSigmasigma of the gaussian fit
floatfitpar0first fit parameter of the first linear fit
floatfitpar0errorerror of the first fit parameter of the first linear fit
floatfitpar1second fit parameter of the first linear fit
floatfitpar1errorerror of the second fit parameter of the first linear fit
floatfitparNoise0first fit parameter of the second linear fit
floatfitparNoise0errorerror of the first fit parameter of the second linear fit
floatfitparNoise1second fit parameter of the second linear fit
floatfitparNoise1errorerror of the second fit parameter of the second linear fit
TH1F*hintintegrated drift-time histograms
int*hintegral[6][4][20][50][2048]array for the integrated drift-time
TH1F*hinvdrift-time histograms to hold collected data
int*hreverse[6][4][20][50][2048]array for the drift-time (Time1) to be filled in eventloop
Bool_tHTask::isConnected
Bool_tHTask::isInitialised
Bool_tisPulserFileflag for a external calibration file (pulser)
HIterator*iteriterator on raw data
HIterator*iter_start! iterator on start cal data.
HMdcLookupGeom*lookupgeompointer to HMdcLookupGeom container
Bool_tHTask::manual
Float_tmaxfitthresholdmaximum threshold for linear fit (y-range)
Float_tminfitthresholdminimum threshold for linear fit (y-range)
static const Int_tnSubEventsThe max. number of objects per event
static const Int_tnbinNumber of bins ih the histogramms
static const Int_tnbinm1nbin - 1
static const Int_tnbinp1nbin + 1
Bool_tnoStartflag if starttime should not be used
Int_tnumberofeventscounts the number of events which are collected in each step
Int_toffsetfitNoiseoffset of the fit range for the subtraction of the noise (start at yequalzero going to the left)
HTask*HTask::owner
Int_trangeGaussfit range of the gaussian fit around calculated offset
HCategory*rawCatpointer to the raw data
Int_tskipcountcounts the number of events
Int_tstepcounts the number of step of stepsize in same file
Int_tstepsizenumber of events between the hists in same file
HMdcTimeCut*timecutpointer to HMdcTimeCut container
floattotalsigmasigma of the offset calculated from the sigmas of the two linear fits
Bool_tuseTimeCutflag if time cuts should be perormed.
Int_twidthfitNoisewidth of the fit range
floatyequalzerointersection point of the first fit and the x-axis

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

HMdcOffsetCheckTimeShift(void)
HMdcOffsetCheckTimeShift(const Text_t* name, const Text_t* title)
~HMdcOffsetCheckTimeShift(void)
 Destructor.
void setDefault()
 Sets the the default values for the fits.
void setOutputAscii(const Char_t* )
 Sets ascii output of HMdcOffsetCheckTimeShift for debugging output.
void setOutputRoot(const Char_t* )
 Sets rootfile output of HMdcOffsetCheckTimeShift where all created histograms were written.

Bool_t init(void)
  Inits HMdcOffsetCheckTimeShift and the needed HMdcCalParRaw, if this container does not exists
Bool_t reinit(void)
  Inits HMdcOffsetCheckTimeShift and the needed HMdcCalParRaw, if this container does not exists
void createHist(TFile* , Int_t , Int_t , Int_t , Int_t )
 Histograms for inverted Time1 and integrated Time1 per Tdc-Channel are created
 in a subdirectory structure.
void deleteHist()
 Created histograms are deleted
void fillHist(Int_t , Int_t , Int_t , Int_t )
 Histograms for inverted Time1 and integrated Time1 per Tdc-Channel are filled
Int_t fitHist(Int_t , Int_t , Int_t , Int_t )
 The offset is calculated from two linear fits. Some pictures of the fitted histograms
 can be found on 
MDC calibration page
 .
 The first linear fit (red) is done to find the rising edge of the integrated spectra.
 The second linear fit (blue) is done to substract the noise.
 The ranges for both fits can be set through the functions setNoise()(x-range) for the
 second fit (default values: 100,50) and setThreshold()(y-range) for the first fit
 (default values :0.15,0.50). The y-range is calculated by the percentage of the maximum
 height of the spectra.
 The offset ist calculated from the intersection point of both linear fits.
 The sigma of the offset is calculated from the sigmas of the two linear fits.

 If the analyzed file is a pulser file for external calibration a gaussian fit is done.
 To set this fit the function setPulserFile() has to be used in the macro. The range of
 the fit is set through the function setRangeGauss()(default value: 50) around the calculated
 offset.The mean and sigma of the fit is written to the ascii debugging output.
void writeAscii(ofstream& , Int_t , Int_t , Int_t , Int_t )
 The adresses of the channel(sector,module,mbo,tdc),offset, two fitparameters for the
 two linear fits, the sigma of the offset ,offset and the integral(number of entries for this channel)
 are written to the ascii debugging output.In the case of an pulser file (external calibration)
 the mean and the sigma of the gaussian fit are also written to the output.
void writeHist(TFile* )
 All created histograms are written to a rootfile.The file is structured for sector,module,mbo.
ofstream * openAsciiFile()
 Opens the ascii debugging output and writes the headerline.
Bool_t finalize(void)
 This function is called after the execute function is finished. At this point
 the arrays for the drift-time are filled. Froms this arrays the histograms for
 the drift-time and the integrated drift-time are filled. The fits for the calcutation
 of the offsets are done and the offsets and the sigma of the offsets are
 calculated .All histograms are written to a rootfile output and the information
 of the fits to an ascii debugging output. The offset and the sigma of the offset
 are filled into the container (HMdcCalParRaw) for the calibration parameters.
 To characterize the method of calculation of the offsets the function setOffsetMethod()
 of HMdcCalParRaw is used. As default value for the method 2 is used for  automatic
 calibration. If no calibration is done this value is set to 0.
TDirectory * Mkdir(TDirectory* , const Char_t* , Int_t , Int_t p = 1)
 Function to create subdirectories
Float_t getstarttime()
Int_t execute()
 Raw data of Time1  multiplied by the slope of the channel taken from the
 container of the calibration parameters are filled into the array for the
 drift-time . This array contains 2048 (corresponding to the resulution of
 the tdc chip) entries for each tdc channel.
void setPulserFile()
{isPulserFile=kTRUE;}
void setNoStart()
{noStart=kTRUE;}
void setTimeCut(Bool_t cut)
{useTimeCut=cut;}
void setStepSize(Int_t i)
{stepsize =i;}
void setNumberOfEvents(Int_t i)
{numberofevents =i;}
void setNoiseOffset(Int_t i)
{offsetfitNoise =i;}
void setNoiseWidth(Int_t i)
{widthfitNoise =i;}
void setThresholdMin(Float_t f)
{minfitthreshold=f;}
void setThresholdMax(Float_t f)
{maxfitthreshold=f;}
void setNoise(Int_t o, Int_t w)
{offsetfitNoise=o; widthfitNoise=w;}
void setThreshold(Float_t min, Float_t max)
{minfitthreshold=min; maxfitthreshold=max;}
void setRangeGauss(Int_t i)
{rangeGauss=i;}
Bool_t isNaN(float f)
{return (TMath::IsNaN(f)!=0);}

Last change: Sat May 22 13:03:03 2010
Last generated: 2010-05-22 13:03

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.