class HMdcOffset: public HReconstructor

_HADES_CLASS_DESCRIPTION


 HMdcOffset

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


Function Members (Methods)

public:
HMdcOffset()
HMdcOffset(const Text_t* name, const Text_t* title)
virtual~HMdcOffset()
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)
voidsetCleanThreshold(Int_t thresh)
virtual Bool_tHTask::setConnections()
voidsetCounter(Int_t size)
voidsetDebug()
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidsetFillHistsOnly(Bool_t fill)
voidsetFillPerMBO(Bool_t fillPerMBO)
voidsetFillPerMBOafterSingle(Bool_t fillPerMBO)
voidsetFilterWindow1(Float_t window)
voidsetFilterWindow2(Float_t window)
voidsetFitNoise(Bool_t fit)
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)
voidsetNotUseStart(Bool_t nouse)
voidsetNSkipEvents(Int_t nskipevents)
static voidTObject::SetObjectStat(Bool_t stat)
voidsetOutputAscii(const Char_t*)
voidsetOutputRoot(const Char_t*)
virtual voidHTask::setOwner(HTask* atask)
voidsetPulserFile()
voidsetRangeGauss(Int_t i)
voidsetReadHists(TString inp, Bool_t print = kFALSE)
voidsetSignalSpeed(Float_t speed)
voidsetThreshold(Float_t min, Float_t max)
voidsetThresholdMax(Float_t f)
voidsetThresholdMin(Float_t f)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
voidsetUseClusters(Bool_t use)
voidsetUseTimeCuts(Bool_t cut)
voidsetUseTof(TString inp)
voidsetUseWireOffset(Bool_t use)
voidsetValidOffsetRange(Float_t range)
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, Bool_t = kFALSE)
voidcreateHist_2D(Int_t, Int_t, Bool_t = kFALSE)
voiddeleteHist()
voiddeleteHist_2D()
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
Int_texecuteClus()
Int_texecuteRaw()
voidfillArrays(TH1F*, Int_t, Int_t, Int_t, Int_t)
voidfillCalParRaw(TH1F*, Int_t, Int_t, Int_t, Int_t)
voidfillHist(Int_t, Int_t, Int_t, Int_t)
voidfillHist_2D(Int_t, Int_t, Int_t, Int_t)
voidfillNTuples(Int_t, Int_t, Int_t, Int_t)
voidfindMultiplePeaks(Int_t, Int_t, Int_t, Int_t)
Int_tfitHist(Int_t, Int_t, Int_t, Int_t)
Float_tgetstarttime()
voidinitArrays()
voidinitMemory()
voidinitVariables()
voidTObject::MakeZombie()
TDirectory*Mkdir(TDirectory*, const Char_t*, Int_t, Int_t p = 1)
ofstream*openAsciiFile()
voidprintStatus()
voidsetDefault()
Bool_ttestTimeCuts(Int_t s, Int_t m, Float_t t1, Float_t t2)
voidwriteAscii(ofstream&, Int_t, Int_t, Int_t, Int_t)
voidwriteHist(TFile*)
voidwriteHist_2D(Int_t s, Int_t m)

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:
HMdcCalParRaw*calparrawpointer to HMdcCalParRaw container
Int_tcleanThresholdthreshold to clean hinv : bins with less than the threshold will be set to 0
HCategory*clusCatpointer to the cluster data
floatcrosspointXx-value of the intersection point of the two linear fits->offset
Bool_tdebug! debug flag
Int_teventcounter
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
FILE*ferrorlogFile pointer to errorlog
Int_tfilenumbercounter for the read histogram files
Bool_tfillHistsOnlyswitch to fill hists only (no offset calculation)
Float_tfilterwindow1wide window arround mean to filter (perMBOafterSingle)
Float_tfilterwindow2narrow window arround mean to filter (perMBOafterSingle)
floatfitGaussMeanmean of the gaussian fit
floatfitGaussSigmasigma of the gaussian fit
Bool_tfitNoisefit noise or don't
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
Float_tfitslope1[6][4][16][96]
Float_tfitslope2[6][4][16][96]
TH1F*hintintegrated drift-time histograms
TH1F*hinvdrift-time histograms to hold collected data
HCategory*hitStartCatpointer to the cal data
int*hreverse[6][4][16][96][2048]array for the drift-time (Time1) to be filled in eventloop
TH2F*htime1_lay[6]2-D hist time1 vers cell
TH2F*htime1_lay_int[6]2-D hist integrated time1 vers cell
TH2F*htime1_lay_int_norm[6]2-D hist integrated time1 vers cell normalized to counts
TH2F*htime1_lay_inv_norm[6]2-D hist time1 vers cell normalized to counts
TH2F*htime1_mbo[16]2-D hist time1 vers tdc
TH1F*htime1temptemp drift-time histogram
Int_tintegral[6][4][16][96]
Bool_tHTask::isConnected
Bool_tHTask::isInitialised
Bool_tisPulserFileflag for a external calibration file (pulser)
HIterator*iteriterator on raw data
HIterator*iter_clusiterator on clus data.
HIterator*iter_startiterator on start cal data.
HLocationlocraw
HMdcLookupGeom*lookupgeompointer to HMdcLookupGeom container
HMdcLookupRaw*lookuprawpointer to HMdcLookupRaw container
Bool_tHTask::manual
Float_tmaxfitthresholdmaximum threshold for linear fit (y-range)
Float_tmeanhOffset
Float_tminfitthresholdminimum threshold for linear fit (y-range)
Float_tmyerror
Float_tmyoffset
Int_tnSkipEventsnumber of skipped events per file
Int_tnStepstep size for print events
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
Float_toffset1[6][4][16][96]
Float_toffsetErr[6][4][16][96]
TNtuple*offsetPulserTuplepointer to NTuple for multiple peaks of pulser files
TNtuple*offsetTuplepointer to NTuple for offset
Int_toffsetfitNoiseoffset of the fit range for the subtraction of the noise (start at yequalzero going to the left)
Float_toffsetpulser[6][4][16][96][5]
Float_toffsets[6][4][16][96]
HTask*HTask::owner
Bool_tperMBOswitch to calc offsets per MBO
Bool_tperMBOafterSingleswitch to calc offsets per MBO from single offsets
Int_trangeGaussfit range of the gaussian fit around calculated offset
HCategory*rawCatpointer to the raw data
Bool_treadHistsswitch to read hists from root file and than calculate offset
Float_tsignalspeed! speed of the signal on the wire [ns/mm]
HMdcSizesCells*sizescellspointer to HMdcSizesCells container
Int_tskipcounter
HMdcTimeCut*timecutpointer to HMdcTimeCut container
TF1*toffunc[4][6]TF1 fits for minimum tof
floattotalsigmasigma of the offset calculated from the sigmas of the two linear fits
Bool_tuseClustersswitch on/off clusters/raw
Bool_tuseTimeCutsswitch on/off time cuts usage
Bool_tuseTofswitch on/off substraction of minimum tof
Bool_tuseWireOffsetswitch on/off substraction of signal time on wire
Float_tvalidRangeallowed interval arround mean of offsets
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

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

void setUseTof(TString inp)
 Retrieves TF1's for min tof substraction from root file
 and switches the usesage of tof substraction kTRUE.
void setReadHists(TString inp, Bool_t print = kFALSE)
 Retrieves TF1's for min tof substraction from root file
 and switches the usesage of tof substraction kTRUE.
void printStatus()
Bool_t init(void)
  Inits HMdcOffset and the needed HMdcCalParRaw, if this container does not exists
Bool_t reinit(void)
void createHist(TFile* , Int_t , Int_t , Int_t , Int_t , Bool_t = kFALSE)
 Histograms for inverted Time1 and integrated Time1 per Tdc-Channel are created
 in a subdirectory structure.
void createHist_2D(Int_t , Int_t , Bool_t = kFALSE)
 Histograms for inverted Time1 and integrated Time1 per Tdc-Channel are created
 in a subdirectory structure.
void deleteHist()
 Created histograms are deleted
void deleteHist_2D()
 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
void fillHist_2D(Int_t , Int_t , Int_t , Int_t )
 Histograms for Time1 vers Tdc-Channel and cell 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 maximum.
 The mean and sigma of the fit is written to the ascii debugging output.
 The hist is checked for multiple peaks.The peaks which have been found are written to an array.
void findMultiplePeaks(Int_t , Int_t , Int_t , Int_t )
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.
void writeHist_2D(Int_t s, Int_t m)
ofstream * openAsciiFile()
 Opens the ascii debugging output and writes the headerline.
void fillNTuples(Int_t , Int_t , Int_t , Int_t )
 fill NTuples for offsets and multiple peaks
void fillArrays(TH1F* , Int_t , Int_t , Int_t , Int_t )
void fillCalParRaw(TH1F* , Int_t , Int_t , Int_t , Int_t )
 fills CalParRaw with offsets, offseterrors and Methods
 Checks if offset is in valid range arround mean value of offsets.
 If it is out of range the value is replaced by the mean value.
 Not connected channels are marked with -7.
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()
 Need some work for multiple hists in start detector
 Better select multiplicity 1 in start.
Int_t execute()
Int_t executeClus()
 Fired cells are take from the list of Cells inside one HMdcClus.
 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.
Int_t executeRaw()
 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 setSignalSpeed(Float_t speed)
{ signalspeed = speed; }
void setCounter(Int_t size)
{ nStep = size; }
void setPulserFile()
{ isPulserFile = kTRUE; }
void setNotUseStart(Bool_t nouse)
{ noStart = nouse; }
void setUseClusters(Bool_t use)
{ useClusters = use; }
void setUseWireOffset(Bool_t use)
{ useWireOffset = use; }
void setFillHistsOnly(Bool_t fill)
{ fillHistsOnly = fill; }
void setFillPerMBO(Bool_t fillPerMBO)
{ perMBO = fillPerMBO; }
void setFillPerMBOafterSingle(Bool_t fillPerMBO)
{ perMBOafterSingle = fillPerMBO; }
void setFilterWindow1(Float_t window)
{ filterwindow1 = window;}
void setFilterWindow2(Float_t window)
{ filterwindow2 = window;}
void setNSkipEvents(Int_t nskipevents)
{ nSkipEvents = nskipevents; }
void setValidOffsetRange(Float_t range)
{ validRange = range; }
void setUseTimeCuts(Bool_t cut)
{ useTimeCuts = cut; }
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 setFitNoise(Bool_t fit)
{ fitNoise = fit;}
void setThreshold(Float_t min, Float_t max)
{ minfitthreshold = min; maxfitthreshold = max; }
void setRangeGauss(Int_t i)
{ rangeGauss = i; }
void setDebug()
{ debug = kTRUE; }
void setCleanThreshold(Int_t thresh)
{ cleanThreshold = thresh; }
void initMemory()
void initArrays()
Bool_t testTimeCuts(Int_t s, Int_t m, Float_t t1, Float_t t2)

Last change: Sat May 22 13:03:02 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.