class HMdcGarCal2Maker: public TNamed

_HADES_CLASS_DESCRIPTION

 HMdcGarCal2Maker
 Reads Histograms for time1/time2 versus distance from wire from root file
 produced with HMdcGarSignalReader. The values for time1 and time2 and the
 corresponding errors are processed (spike removing, smoothing, cut at max
 value per mdc) for all MDC's and all impact angles for time1, time2,
 error of time1 and error of time2. A root file with the control hists is
 written and an ascii file containing the parameters of HMdcCal2ParSim is
 produced.

Function Members (Methods)

public:
HMdcGarCal2Maker(const HMdcGarCal2Maker&)
HMdcGarCal2Maker(const Char_t* name = "", const Char_t* title = "")
virtual~HMdcGarCal2Maker()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
voidcalcBounderies(Int_t, Int_t, Float_t*, Float_t*)
Bool_tcheck(Int_t, Int_t)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
Float_tcoefSavGol2(Int_t, Int_t, Int_t, Int_t, Int_t, Int_t)
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidTNamed::Copy(TObject& named) const
voidcopyToArray(TH1F*, Int_t, Int_t, Int_t)
voidcopyToHist(TH1F*, Int_t, Int_t, Int_t)
voidcreateGraph(Int_t, Int_t, Int_t)
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
voiddo2dSavitzkyGolayFiltering(Float_t*, Int_t, Int_t, Bool_t)
virtual voidTObject::Draw(Option_t* option = "")
voiddrawBorders(Int_t, Int_t, Int_t)
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 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
voidfillArrays(TH1F*, TH1F*, Int_t, Int_t)
virtual voidTNamed::FillBuffer(char*& buffer)
voidfillControl1D(Int_t, Int_t, TString = "")
voidfillControl2D(Int_t, Int_t, TString = "")
voidfindMax(Int_t)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
voidfitHist(TH1F* h, Int_t, Int_t, Int_t)
Int_tgetBatchMode()
Float_tgetCutMax(Int_t i)
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
Int_tgetHists_1D(Int_t i)
Int_tgetHists_2D(Int_t i)
virtual const char*TObject::GetIconName() const
Int_tgetLevelColors(Int_t i)
Int_tgetMakeMdc(Int_t i)
Int_tgetMakeType(Int_t i)
Int_tgetMaxBinNumber(Int_t i)
Int_tgetMaxCopy()
Float_tgetMaxErrTime1()
Float_tgetMaxErrTime2()
Int_tgetMinCopy()
virtual const char*TNamed::GetName() const
Int_tgetNBin1D_Dist()
Int_tgetNBin2D_Angle()
Int_tgetNBin2D_Dist()
Int_tgetNTimes(Int_t i)
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
Int_tgetPrintMode()
Float_tgetSlope()
Float_tgetSpikeThreshold1()
Float_tgetSpikeThreshold2()
Int_tgetSpikeTypes(Int_t i)
Int_tgetStepSize()
Int_tgetThreshold()
virtual const char*TNamed::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
Int_tgetVersion()
Int_tgetVoltage(Int_t i)
Bool_tgetWriteAscii()
Bool_tgetWriteHists()
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 voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTNamed::ls(Option_t* option = "") const
voidmake()
voidTObject::MayNotUse(const char* method) const
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)
HMdcGarCal2Maker&operator=(const HMdcGarCal2Maker&)
virtual voidTObject::Paint(Option_t* option = "")
voidplotOverlay(Int_t, Int_t)
virtual voidTObject::Pop()
virtual voidTNamed::Print(Option_t* option = "") const
voidprintStatus()
virtual Int_tTObject::Read(const char* name)
voidreadInput()
virtual voidTObject::RecursiveRemove(TObject* obj)
voidremoveSpikes(Int_t)
voidreplaceBins(TH1F*, Int_t, Int_t, Int_t)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
voidsetBatchMode(Bool_t mode)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
voidsetCutMax(Float_t c0, Float_t c1, Float_t c2, Float_t c3)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidsetFileNameIn(TString)
voidsetFileNameOut(TString)
voidsetHists_1D(Int_t i, Int_t j, Int_t k, Int_t l)
voidsetHists_2D(Int_t i, Int_t j, Int_t k, Int_t l)
voidsetLevelColors(Int_t i, Int_t j, Int_t k)
voidsetMakeMdc(Int_t i, Int_t j, Int_t k, Int_t l)
voidsetMakeType(Int_t i, Int_t j, Int_t k, Int_t l)
voidsetMaxBinNumber(Int_t* array)
voidsetMaxCopy(Int_t b)
voidsetMaxErrTime1(Float_t e)
voidsetMaxErrTime2(Float_t e)
voidsetMinCopy(Int_t b)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
voidsetNBin1D_Dist(Int_t b)
voidsetNBin2D_Angle(Int_t b)
voidsetNBin2D_Dist(Int_t b)
voidsetNTimes(Int_t s0, Int_t s1, Int_t s2, Int_t s3)
static voidTObject::SetObjectStat(Bool_t stat)
voidsetPrintMode(Bool_t mode)
voidsetSlope(Float_t s0)
voidsetSpikeThresholds(Float_t t1, Float_t t2)
voidsetSpikeTypes(Int_t s0, Int_t s1, Int_t s2, Int_t s3)
voidsetStepSize(Int_t size)
voidsetThreshold(Int_t thresh)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
voidsetVersion(Int_t vers)
voidsetVoltage(Int_t s0, Int_t s1, Int_t s2, Int_t s3)
voidsetWriteAscii(Bool_t write)
voidsetWriteHists(Bool_t write)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual Int_tTNamed::Sizeof() const
voidsmoothHist(TH1F*, Int_t)
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
voidwriteAscii()
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidinitArrays()
voidinitVariables()
voidTObject::MakeZombie()

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:
Int_tactiveHists_1D[4]!
Int_tactiveHists_2D[4]!
static Float_tcutMax[4]! cut at max drift time
TStringTNamed::fNameobject identifier
TStringfNameAsciiOut! file name of ascii output file
TStringfNameRootIn! file name of root input file
TStringTNamed::fTitleobject title
TGraph*g[4][18][4][3]!
TH1F*htime1! hist pointer for time1
TH1F*htime2! hist pointer for time2
TFile*inputRoot! root file pointer
Bool_tisBatch! switch batch/no batch mode
Int_tlastvalidBin[4][18]! counter of non empty bins
Int_tlevelColors[4]!
Int_tmakeMdc[4]!
Int_tmakeType[4]!
Float_tmax1[4][18]! max 1
Int_tmax1bin[4][18]! bin max 1
Float_tmax2[4][18]! max 2
Int_tmax2bin[4][18]! bin max 2
Int_tmaxCopy!
Float_tmaxErrTime1!
Float_tmaxErrTime2!
static Int_tmaxbinNumber[72]max number of bins/hist
Int_tminCopy!
Float_tmtime1[4][18][100]! array of time1
Float_tmtime1_corr[4][18][100]! array of corrected time1
Float_tmtime1_err[4][18][100]! array of error of time1
Float_tmtime1_err_corr[4][18][100]! array of corrected error of time1
Float_tmtime2[4][18][100]! array of time2
Float_tmtime2_corr[4][18][100]! array of corrected time2
Float_tmtime2_err[4][18][100]! array of error of time2
Float_tmtime2_err_corr[4][18][100]! array of corrected error of time2
Int_tnBin1D_dist!
Int_tnBin2D_angle!
Int_tnBin2D_dist!
Int_tnTimes[4]! number of smooth's per type
FILE*output! file pointer to out put
TFile*outputHists! root file pointer
Bool_tprintSpikes! switch print spikes or not
Int_tremoveSpike[4]! switch for removing spike types
Float_tslope! slope of drift time/bin
Int_tstepsize! %/step
Int_tthreshold! threshold value (*stepsize=%)
Float_tthreshold1! threshold for spike removing
Float_tthreshold2! threshold for spike removing
Int_tversion! old/new (1/2) file format
Int_tvoltage[4]! HV voltage for mdc types
Bool_twriteHists! switch write Hists to cal2maker.root or not
Bool_twriteascii! switch for write/don't write asciie output

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

HMdcGarCal2Maker(const Char_t* name = "", const Char_t* title = "")
 constructor for HMdcGarCal2Maker
 The parameters are initialized with non valid values.
~HMdcGarCal2Maker()
 destructor of HMdcGarCal2Maker
void setFileNameOut(TString )
 Sets ascii output of HMdcGarCal2Maker
void setFileNameIn(TString )
 Sets root input of HMdcGarCal2Maker
void initVariables()
 inits all variables
void printStatus(void)
 prints the parameters to the screen
Bool_t check(Int_t , Int_t )
 Checks if the Mdc m and the type t (t1,t1err,t2,t2err)
 is active in the current setup
void calcBounderies(Int_t , Int_t , Float_t* , Float_t* )
 Calulates the bounderies of the different cell types of the MDC's underr
 certain impact angle "a". "cellEdge" is the max distances of a track with
 minimum distance at the cell border whereas "maxDist" is the max minimum
 distance of a track just hitting the cell.
void make()
 Main function to be called from the macro.
void fillArrays(TH1F* , TH1F* , Int_t , Int_t )
 Fills values for time1, time2 and the corresponding errors from the hists into
 working arrays.
void findMax(Int_t )
 finds maximum values inside the array of
 time1err and replacing values after max by
 a constant value.
void removeSpikes(Int_t )
 Removes spikes from time1err
void copyToHist(TH1F* , Int_t , Int_t , Int_t )
 Copys workings arrays to hists
void copyToArray(TH1F* , Int_t , Int_t , Int_t )
 Copy working hists to arrays
Float_t coefSavGol2(Int_t , Int_t , Int_t , Int_t , Int_t , Int_t )
 Compute 2nd order Savitzky-Golay polynomial coefficient c=c(i,j,k,ni,nj,nk)

void do2dSavitzkyGolayFiltering(Float_t* , Int_t , Int_t , Bool_t )
 Do a 2dim symmetric second-order Savitzky-Golay noise filtering on data

   - 2dim, because data=data(i,j)
   - symmetric, because nR = nL = n
   - second-order, because m=2

void smoothHist(TH1F* , Int_t )
 Smooth working hists by number of cycles defined
void fitHist(TH1F* h, Int_t , Int_t , Int_t )
 Smooth time1 errors by fit function
void replaceBins(TH1F* , Int_t , Int_t , Int_t )
 Replace the first bins and the bins after the maximum bin of the
 workings hists after smoothing by the original bins of the working arrays.
void createGraph(Int_t , Int_t , Int_t )
 Create Graphs , fill them with the working array and write
 them to disk
void fillControl2D(Int_t , Int_t , TString = "")
 Fills a 2D Control hist from the working arrays and writes the hist to disk.
void fillControl1D(Int_t , Int_t , TString = "")
 Fills 1D Control hists (for each impact angle) and writes the hists to disk.
void plotOverlay(Int_t , Int_t )
 Plots overlay of Graphs after the differrent working steps
 (raw, spike remove, smooth and replacement of bins).
void drawBorders(Int_t , Int_t , Int_t )
 Draw lines for max value of Celledge / max distance
void writeAscii()
 Writes the created parameters form the working arrays to an ascii file.
void readInput()
 Reads input file to get the hists for time1 and time2 produced by
 HMdcGarSignalReader.
void initArrays()
HMdcGarCal2Maker(const Char_t* name = "", const Char_t* title = "")
void setCutMax(Float_t c0, Float_t c1, Float_t c2, Float_t c3)
Int_t getVersion()
{return version;}
void setVersion(Int_t vers)
{version=vers;}
Float_t getCutMax(Int_t i)
{return cutMax[i];}
void setSlope(Float_t s0)
{slope=s0;}
Float_t getSlope()
{return slope;}
void setThreshold(Int_t thresh)
{threshold=thresh;}
Int_t getThreshold()
{return threshold;}
void setStepSize(Int_t size)
{stepsize=size;}
Int_t getStepSize()
{return stepsize;}
void setBatchMode(Bool_t mode)
{isBatch=mode;}
Int_t getBatchMode()
{return isBatch;}
void setPrintMode(Bool_t mode)
{printSpikes=mode;}
Int_t getPrintMode()
{return printSpikes;}
void setWriteHists(Bool_t write)
{writeHists=write;}
Bool_t getWriteHists()
{return writeHists;}
void setWriteAscii(Bool_t write)
{writeascii=write;}
Bool_t getWriteAscii()
{return writeascii;}
void setMaxErrTime1(Float_t e)
{maxErrTime1=e;}
Float_t getMaxErrTime1()
{return maxErrTime1;}
void setMaxErrTime2(Float_t e)
{maxErrTime2=e;}
Float_t getMaxErrTime2()
{return maxErrTime2;}
void setSpikeTypes(Int_t s0, Int_t s1, Int_t s2, Int_t s3)
Int_t getSpikeTypes(Int_t i)
{return removeSpike[i];}
void setSpikeThresholds(Float_t t1, Float_t t2)
Float_t getSpikeThreshold1()
{return threshold1;}
Float_t getSpikeThreshold2()
{return threshold2;}
void setNTimes(Int_t s0, Int_t s1, Int_t s2, Int_t s3)
Int_t getNTimes(Int_t i)
{return nTimes[i];}
void setNBin1D_Dist(Int_t b)
{nBin1D_dist=b;}
Int_t getNBin1D_Dist()
{return nBin1D_dist;}
void setNBin2D_Dist(Int_t b)
{nBin2D_dist=b;}
Int_t getNBin2D_Dist()
{return nBin2D_dist;}
void setNBin2D_Angle(Int_t b)
{nBin2D_angle=b;}
Int_t getNBin2D_Angle()
{return nBin2D_angle;}
void setMinCopy(Int_t b)
{minCopy=b;}
Int_t getMinCopy()
{return minCopy;}
void setMaxCopy(Int_t b)
{maxCopy=b;}
Int_t getMaxCopy()
{return maxCopy;}
void setHists_1D(Int_t i, Int_t j, Int_t k, Int_t l)
Int_t getHists_1D(Int_t i)
{return activeHists_1D[i];}
void setHists_2D(Int_t i, Int_t j, Int_t k, Int_t l)
Int_t getHists_2D(Int_t i)
{return activeHists_2D[i];}
void setMakeMdc(Int_t i, Int_t j, Int_t k, Int_t l)
Int_t getMakeMdc(Int_t i)
{return makeMdc[i];}
void setMakeType(Int_t i, Int_t j, Int_t k, Int_t l)
Int_t getMakeType(Int_t i)
{return makeType[i];}
void setLevelColors(Int_t i, Int_t j, Int_t k)
Int_t getLevelColors(Int_t i)
{return levelColors[i];}
void setVoltage(Int_t s0, Int_t s1, Int_t s2, Int_t s3)
Int_t getVoltage(Int_t i)
{return voltage[i];}
void setMaxBinNumber(Int_t* array)
Int_t getMaxBinNumber(Int_t i)
{return maxbinNumber[i];}

Last change: Sat May 22 13:01:56 2010
Last generated: 2010-05-22 13:01

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.