ROOT logo
AliRoot » TRD » AliTRDCalibraFit

class AliTRDCalibraFit: public TObject


 AliTRDCalibraFit

 This class is for the TRD calibration of the relative gain factor, the drift velocity,
 the time 0 and the pad response function. It fits the histos.
 The 2D histograms or vectors (first converted in 1D histos) will be fitted
 if they have enough entries, otherwise the (default) value of the choosen database
 will be put. For the relative gain calibration the resulted factors will be globally
 normalized to the gain factors of the choosen database. It unables to precise
 previous calibration procedure.
 The function SetDebug enables the user to see:
 _fDebug = 0: nothing, only the values are written in the tree if wanted
 _fDebug = 1: only the fit of the choosen calibration group fFitVoir (SetFitVoir)
 _fDebug = 2: a comparaison of the coefficients found and the default values
              in the choosen database.
              fCoef , histogram of the coefs as function of the calibration group number
              fDelta , histogram of the relative difference of the coef with the default
                        value in the database as function of the calibration group number
              fError , dirstribution of this relative difference
 _fDebug = 3: The coefficients in the choosen detector fDet (SetDet) as function of the
              pad row and col number
 _fDebug = 4; The coeffcicients in the choosen detector fDet (SetDet) like in the 3 but with
              also the comparaison histograms of the 1 for this detector


 Author:
   R. Bailhache (R.Bailhache@gsi.de)


Function Members (Methods)

public:
AliTRDCalibraFit(const AliTRDCalibraFit& c)
voidTObject::AbstractMethod(const char* method) const
Bool_tAnalyseCH(const TH2I* ch)
Bool_tAnalyseCH(AliTRDCalibraVector* calvect)
Double_tAnalyseCHAllTogether(const TH2I* ch)
Bool_tAnalyseExbAltFit(AliTRDCalibraExbAltFit* calivdli)
Bool_tAnalyseLinearFitters(AliTRDCalibraVdriftLinearFit* calivdli)
voidAnalyseLinearFittersAllTogether(AliTRDCalibraVdriftLinearFit* calivdli, Double_t& vdriftoverall, Double_t& exboverall)
Bool_tAnalysePH(const TProfile2D* ph)
Bool_tAnalysePH(AliTRDCalibraVector* calvect)
Double_tAnalysePHAllTogether(const TProfile2D* ph)
Bool_tAnalysePRF(const TProfile2D* prf)
Bool_tAnalysePRF(AliTRDCalibraVector* calvect)
Bool_tAnalysePRFMarianFit(const TProfile2D* prf)
Bool_tAnalysePRFMarianFit(AliTRDCalibraVector* calvect)
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
voidCalculPolynomeLagrange2(const Double_t* x, const Double_t* y, Double_t& c0, Double_t& c1, Double_t& c2, Double_t& c3, Double_t& c4) const
voidCalculPolynomeLagrange3(const Double_t* x, const Double_t* y, Double_t& c0, Double_t& c1, Double_t& c2, Double_t& c3, Double_t& c4) const
voidCalculPolynomeLagrange4(const Double_t* x, const Double_t* y, Double_t& c0, Double_t& c1, Double_t& c2, Double_t& c3, Double_t& c4) const
voidChooseMethod(Short_t method)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
AliTRDCalDet*CreateDetObjectExbAlt(const TObjArray* vectorFit)
AliTRDCalDet*CreateDetObjectGain(const TObjArray* vectorFit, Bool_t meanOtherBefore = kTRUE, Double_t scaleFitFactor = 0.02431, Bool_t perdetector = kTRUE)
AliTRDCalDet*CreateDetObjectLorentzAngle(const TObjArray* vectorFit)
AliTRDCalDet*CreateDetObjectT0(const TObjArray* vectorFit, Bool_t perdetector = kFALSE)
AliTRDCalDet*CreateDetObjectVdrift(const TObjArray* vectorFit, Bool_t perdetector = kFALSE)
TObject*CreatePadObjectGain(const TObjArray* vectorFit = 0, Double_t scaleFitFactor = 1.0, const AliTRDCalDet* detobject = 0)
TObject*CreatePadObjectPRF(const TObjArray* vectorFit)
TObject*CreatePadObjectT0(const TObjArray* vectorFit = 0, const AliTRDCalDet* detobject = 0)
TObject*CreatePadObjectVdrift(const TObjArray* vectorFit = 0, const AliTRDCalDet* detobject = 0)
virtual voidTObject::Delete(Option_t* option = "")MENU
static voidDestroy()
voidDestroyDebugStreamer()
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 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 TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
voidFitLagrangePoly(TH1* projPH)
Bool_tGetAccCDB() const
AliTRDCalibraMode*GetCalibraMode() const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
Float_tGetFitOutliersChargeHigh() const
Float_tGetFitOutliersChargeLow() const
virtual const char*TObject::GetIconName() const
Int_tGetMinEntries() const
virtual const char*TObject::GetName() const
Int_tGetNumberEnt() const
Int_tGetNumberFit() const
Int_tGetNumberFitSuccess() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
Int_tGetPeriodeFitPH() const
Float_tGetRangeFitPRF() const
Short_tGetRebin() const
Float_tGetScaleFactorGain() const
Double_tGetScaleFitFactor() const
Double_tGetStatisticMean() const
Float_tGetT0Shift0() const
Float_tGetT0Shift1() const
Bool_tGetTakeTheMaxPH() const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
TObjArrayGetVectorFit() const
TObjArrayGetVectorFit2() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::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
static AliTRDCalibraFit*Instance()
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_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
AliTRDCalDet*MakeOutliersStatDet(const TObjArray* vectorFit, const char* name, Double_t& mean)
TObject*MakeOutliersStatPad(const TObjArray* vectorFit, const char* name, Double_t& mean)
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
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)
AliTRDCalibraFit&operator=(const AliTRDCalibraFit&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
voidPutMeanValueOtherVectorFit(Int_t ofwhat = 1, Bool_t perdetector = kFALSE)
voidPutMeanValueOtherVectorFit2(Int_t ofwhat = 1, Bool_t perdetector = kFALSE)
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidRemoveOutliers(Int_t type, Bool_t perdetector = kFALSE)
voidRemoveOutliers2(Bool_t perdetector = kFALSE)
voidTObject::ResetBit(UInt_t f)
voidResetVectorFit()
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
voidSetAccCDB()
voidSetBeginFitCharge(Float_t beginFitCharge)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
voidSetCalDetVdriftExB(AliTRDCalDet* calDetVdriftUsed, AliTRDCalDet* calDetExBUsed)
voidSetDebugLevel(Short_t level)
voidSetDet(Int_t iLayer, Int_t iStack, Int_t iSector)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidSetFitOutliersChargeHigh(Float_t fitOutliersChargeHigh)
voidSetFitOutliersChargeLow(Float_t fitOutliersChargeLow)
voidSetFitVoir(Int_t fitVoir)
voidSetMagneticField(Float_t magneticfield)
voidSetMinEntries(Int_t minEntries)
Bool_tSetModeCalibration(TString name, Int_t i)
static voidTObject::SetObjectStat(Bool_t stat)
voidSetPeriodeFitPH(Int_t periodeFitPH)
voidSetRangeFitPRF(Float_t rangeFitPRF)
voidSetRebin(Short_t rebin)
voidSetT0Shift0(Float_t t0Shift0)
voidSetT0Shift1(Float_t t0Shift1)
voidSetTakeTheMaxPH()
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector&)
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
static voidTerminate()
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:
Bool_tCalculChargeCoefMean(Bool_t vrai)
voidCalculDect1Dect2(Int_t i)
voidCalculNumberOfBinsExpected(Int_t i)
Bool_tCalculPRFCoefMean()
Bool_tCalculT0CoefMean()
Bool_tCalculVdriftCoefMean()
Bool_tCalculVdriftLorentzCoef()
Bool_tCheckFitVoir()
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidFillFillCH(Int_t idect)
voidFillFillExbAlt()
voidFillFillLinearFitter()
voidFillFillPH(Int_t idect, Double_t nentries)
voidFillFillPRF(Int_t idect)
Bool_tFillInfosFitCH(Int_t idect)
Bool_tFillInfosFitExbAlt()
Bool_tFillInfosFitLinearFitter()
Bool_tFillInfosFitPH(Int_t idect, Double_t nentries)
Bool_tFillInfosFitPRF(Int_t idect)
Bool_tFillVectorFit()
Bool_tFillVectorFit2()
voidFitBisCH(TH1* projch, Double_t mean, Double_t nentries)
voidFitBisCHEx(TH1* projch, Double_t mean, Double_t nentries)
voidFitCH(TH1* projch, Double_t mean, Double_t nentries)
Double_tFitGausMI(Double_t* arraye, Double_t* arraym, Double_t* arrayme, Int_t nBins, Float_t xMin, Float_t xMax, TVectorD* param, Bool_t kError = kTRUE)
voidFitLandau(TH1* projch, Double_t mean, Double_t nentries)
voidFitMean(TH1* projch, Double_t nentries, Double_t mean)
voidFitMeanW(TH1* projch, Double_t nentries)
voidFitMeanWSm(TH1* projch, Float_t sumAll)
voidFitPente(TH1* projPH)
voidFitPH(TH1* projPH, Int_t idect)
voidFitPRF(TH1* projPRF)
Bool_tFitPRFGausMI(Double_t* arraye, Double_t* arraym, Double_t* arrayme, Int_t nBins, Float_t xMin, Float_t xMax)
voidFitTnpRange(Double_t* arraye, Double_t* arraym, Double_t* arrayme, Int_t nbg, Int_t nybins)
virtual Int_tGetLayer(Int_t d) const
Int_tGetNumberOfGroupsPRF(TString nametitle)
Float_tGetPRFDefault(Int_t layer) const
virtual Int_tGetSector(Int_t d) const
virtual Int_tGetStack(Int_t d) const
voidInitfCountDetAndfCount(Int_t i)
Bool_tInitFit(Int_t nbins, Int_t i)
Bool_tInitFitCH()
Bool_tInitFitExbAlt()
Bool_tInitFitLinearFitter()
Bool_tInitFitPH()
Bool_tInitFitPRF()
voidTObject::MakeZombie()
voidNormierungCharge()
Bool_tNotEnoughStatisticCH(Int_t idect)
Bool_tNotEnoughStatisticExbAlt()
Bool_tNotEnoughStatisticLinearFitter()
Bool_tNotEnoughStatisticPH(Int_t idect, Double_t nentries)
Bool_tNotEnoughStatisticPRF(Int_t idect)
TH1I*ReBin(const TH1I* hist) const
TH1F*ReBin(const TH1F* hist) const
voidReconstructFitRowMinRowMax(Int_t idect, Int_t i)
voidRmsPRF(TH1* projPRF)
voidSetCalROC(Int_t i)
Bool_tSetNrphiFromTObject(TString name, Int_t i)
Bool_tSetNzFromTObject(TString name, Int_t i)
voidUpdatefCountDetAndfCount(Int_t idect, Int_t i)
private:
AliTRDCalibraFit()
(unknown)()
static Double_tAsymmGauss(const Double_t* x, const Double_t* par)
static Double_tFuncLandauGaus(const Double_t* x, const Double_t* par)
TF1*LanGauFit(TH1* his, const Double_t* fitrange, const Double_t* startvalues, const Double_t* parlimitslo, const Double_t* parlimitshi, Double_t* fitparams, Double_t* fiterrors, Double_t* chiSqr, Int_t* ndf) const
TF1*LanGauFitEx(TH1* his, const Double_t* fitrange, const Double_t* startvalues, const Double_t* parlimitslo, const Double_t* parlimitshi, Double_t* fitparams, Double_t* fiterrors, Double_t* chiSqr, Int_t* ndf) const
static Double_tLanGauFun(const Double_t* x, const Double_t* par)
static Double_tLanGauFunEx(const Double_t* x, const Double_t* par)
static Double_tPH(const Double_t* x, const Double_t* par)

Data Members

protected:
Bool_tfAccCDBIf there is a calibration database to be compared with....
Float_tfBeginFitChargeThe fit begins at mean/fBeginFitCharge for the gain calibration
AliTRDCalDet*fCalDetCurrent calib object
AliTRDCalDet*fCalDet2Current calib object
AliTRDCalDet*fCalDetExBUsedExB calibration
AliTRDCalDet*fCalDetVdriftUsedExB calibration
AliTRDCalROC*fCalROCCurrent calib object
AliTRDCalROC*fCalROC2Current calib object
AliTRDCalibraMode*fCalibraModeThe calibration mode
Int_tfCountWhen the next detector comes
Int_tfCountDetCurrent detector (or first in the group)
Float_tfCurrentCoef[2]Current coefs
Float_tfCurrentCoef2[2]Current coefs
Float_t*fCurrentCoefDetectorCurrent values for the detector
Float_t*fCurrentCoefDetector2Current values for the detector
Float_tfCurrentCoefECurrent coefs error
Float_tfCurrentCoefE2Current coefs error
Short_tfDebugLevelFlag for debugging
TTreeSRedirector*fDebugStreamer!Debug streamer
Int_tfDect1First calibration group that will be called to be maybe fitted
Int_tfDect2Last calibration group that will be called to be maybe fitted
Int_tfDet[3]Detector visualised (layer,stack,sector) si debugging == 3 or 4
Int_tfEntriesCurrentEntries in the current histo
Int_tfFitPHPeriodePeriode of the fit PH
Int_tfFitVoirFit visualised si debugging == 2
AliTRDgeometry*fGeo! The TRD geometry
Float_tfMagneticFieldMagnetic field lorentz angle
Short_tfMethodMethod
Int_tfMinEntriesMin Entries to fit the histo
Int_tfNbDetNumber of detector in the group
Int_tfNumberEntTo know how many pad groups have entries in the histo
Int_tfNumberFitTo know how many pad groups have been fitted
Int_tfNumberFitSuccessTo know how many pad groups have been fitted successfully
Int_tfNumberOfBinsExpectedNumber of bins expected
Float_tfOutliersFitChargeHighThe fit ends at fOutliersFitCharge procent number of entries
Float_tfOutliersFitChargeLowThe fit ends at fOutliersFitCharge procent number of entries
Float_tfPhd[3]Begin AR and DR
Float_tfRangeFitPRFThe fit range for the PRF is -fRangeFitPRF +fRangeFitPRF
Short_tfRebinIf you want to rebin the histo for the gain calibration
Double_tfScaleFitFactorScale factor of the fit results for the gain
Float_tfScaleGainScale Factor used to scale the gain
Double_tfStatisticMeanTo know the mean statistic of the histos
Float_tfT0Shift0T0 Shift with the maximum positive slope
Float_tfT0Shift1T0 Shift with the maximum of the amplification region
Bool_tfTakeTheMaxPHTake the Max for the T0 determination
TObjArrayfVectorFitVectors to fit
TObjArrayfVectorFit2Vectors to fit
static AliTRDCalibraFit*fgInstanceInstance
static Bool_tfgTerminatedIf terminated

Class Charts

Inheritance Chart:
TObject
AliTRDCalibraFit

Function documentation

AliTRDCalibraFit * Instance()
 Singleton implementation

void Terminate()
 Singleton implementation
 Deletes the instance of this class

AliTRDCalibraFit()
 Default constructor

AliTRDCalibraFit(const AliTRDCalibraFit& c)
 Copy constructor

void Destroy()
 Delete instance

void DestroyDebugStreamer()
 Delete DebugStreamer

Bool_t AnalyseCH(const TH2I* ch)
 Fit the 1D histos, projections of the 2D ch on the Xaxis, for each
 calibration group normalized the resulted coefficients (to 1 normally)

Bool_t AnalyseCH(AliTRDCalibraVector* calvect)
 Reconstruct a 1D histo from the vectorCH for each calibration group,
 fit the histo, normalized the resulted coefficients (to 1 normally)

Double_t AnalyseCHAllTogether(const TH2I* ch)
 Fit the 1D histos, projections of the 2D ch on the Xaxis, for each
 calibration group normalized the resulted coefficients (to 1 normally)

Double_t AnalysePHAllTogether(const TProfile2D* ph)
 Take the 1D profiles (average pulse height), projections of the 2D PH
 on the Xaxis, for each calibration group
 Reconstruct a drift velocity
 A first calibration of T0 is also made  using the same method

Bool_t AnalysePH(AliTRDCalibraVector* calvect)
 Reconstruct the average pulse height from the vectorPH for each
 calibration group
 Reconstruct a drift velocity
 A first calibration of T0 is also made  using the same method (slope method)

Bool_t AnalysePH(const TProfile2D* ph)
 Take the 1D profiles (average pulse height), projections of the 2D PH
 on the Xaxis, for each calibration group
 Reconstruct a drift velocity
 A first calibration of T0 is also made  using the same method

Bool_t AnalysePRF(const TProfile2D* prf)
 Take the 1D profiles (pad response function), projections of the 2D PRF
 on the Xaxis, for each calibration group
 Fit with a gaussian to reconstruct the sigma of the pad response function

Bool_t AnalysePRFMarianFit(const TProfile2D* prf)
 Take the 1D profiles (pad response function), projections of the 2D PRF
 on the Xaxis, for each calibration group
 Fit with a gaussian to reconstruct the sigma of the pad response function

Bool_t AnalysePRF(AliTRDCalibraVector* calvect)
 Reconstruct the 1D histo (pad response function) from the vectorPRD for
 each calibration group
 Fit with a gaussian to reconstruct the sigma of the pad response function

Bool_t AnalysePRFMarianFit(AliTRDCalibraVector* calvect)
 Reconstruct the 1D histo (pad response function) from the vectorPRD for
 each calibration group
 Fit with a gaussian to reconstruct the sigma of the pad response function

Bool_t AnalyseLinearFitters(AliTRDCalibraVdriftLinearFit* calivdli)
 The linear method

Bool_t AnalyseExbAltFit(AliTRDCalibraExbAltFit* calivdli)
 The linear method

void AnalyseLinearFittersAllTogether(AliTRDCalibraVdriftLinearFit* calivdli, Double_t& vdriftoverall, Double_t& exboverall)
 The linear method

Int_t GetNumberOfGroupsPRF(TString nametitle)
 Get numberofgroupsprf

Bool_t SetModeCalibration(TString name, Int_t i)
 Set fNz[i] and fNrphi[i] of the AliTRDCalibraFit::Instance()
 corresponding to the given name

Bool_t SetNrphiFromTObject(TString name, Int_t i)
 Set fNrphi[i] of the AliTRDCalibraFit::Instance()
 corresponding to the given TObject

Bool_t SetNzFromTObject(TString name, Int_t i)
 Set fNz[i] of the AliTRDCalibraFit::Instance()
 corresponding to the given TObject

void RemoveOutliers(Int_t type, Bool_t perdetector = kFALSE)
 Remove the results too far from the mean value and rms
 type: 0 gain, 1 vdrift
 perdetector

void RemoveOutliers2(Bool_t perdetector = kFALSE)
 Remove the results too far from the mean and rms
 perdetector

void PutMeanValueOtherVectorFit(Int_t ofwhat = 1, Bool_t perdetector = kFALSE)
 ofwhat is equaled to 0: mean value of all passing detectors
 ofwhat is equaled to 1: mean value of the detector, otherwise supermodule, otherwise all

void PutMeanValueOtherVectorFit2(Int_t ofwhat = 1, Bool_t perdetector = kFALSE)
 ofwhat is equaled to 0: mean value of all passing detectors
 ofwhat is equaled to 1: mean value of the detector, otherwise supermodule, otherwise all

AliTRDCalDet * CreateDetObjectVdrift(const TObjArray* vectorFit, Bool_t perdetector = kFALSE)
 It creates the AliTRDCalDet object from the AliTRDFitInfo
 It takes the mean value of the coefficients per detector
 This object has to be written in the database

AliTRDCalDet * CreateDetObjectGain(const TObjArray* vectorFit, Bool_t meanOtherBefore = kTRUE, Double_t scaleFitFactor = 0.02431, Bool_t perdetector = kTRUE)
 It creates the AliTRDCalDet object from the AliTRDFitInfo
 It takes the mean value of the coefficients per detector
 This object has to be written in the database

AliTRDCalDet * CreateDetObjectT0(const TObjArray* vectorFit, Bool_t perdetector = kFALSE)
 It creates the AliTRDCalDet object from the AliTRDFitInfo2
 It takes the min value of the coefficients per detector
 This object has to be written in the database

AliTRDCalDet * CreateDetObjectLorentzAngle(const TObjArray* vectorFit)
 It creates the AliTRDCalDet object from the AliTRDFitInfo2
 It takes the min value of the coefficients per detector
 This object has to be written in the database

AliTRDCalDet * CreateDetObjectExbAlt(const TObjArray* vectorFit)
 It creates the AliTRDCalDet object from the AliTRDFitInfo2
 It takes the min value of the coefficients per detector
 This object has to be written in the database

TObject * CreatePadObjectGain(const TObjArray* vectorFit = 0, Double_t scaleFitFactor = 1.0, const AliTRDCalDet* detobject = 0)
 It Creates the AliTRDCalPad object from AliTRDFitInfo
 You need first to create the object for the detectors,
 where the mean value is put.
 This object has to be written in the database

TObject * CreatePadObjectVdrift(const TObjArray* vectorFit = 0, const AliTRDCalDet* detobject = 0)
 It Creates the AliTRDCalPad object from AliTRDFitInfo
 You need first to create the object for the detectors,
 where the mean value is put.
 This object has to be written in the database

TObject * CreatePadObjectT0(const TObjArray* vectorFit = 0, const AliTRDCalDet* detobject = 0)
 It Creates the AliTRDCalPad object from AliTRDFitInfo2
 You need first to create the object for the detectors,
 where the mean value is put.
 This object has to be written in the database

TObject * CreatePadObjectPRF(const TObjArray* vectorFit)
 It Creates the AliTRDCalPad object from AliTRDFitInfo
 This object has to be written in the database

AliTRDCalDet * MakeOutliersStatDet(const TObjArray* vectorFit, const char* name, Double_t& mean)
 It Creates the AliTRDCalDet object from AliTRDFitInfo
 0 successful fit 1 not successful fit
 mean is the mean value over the successful fit
 do not use it for t0: no meaning

TObject * MakeOutliersStatPad(const TObjArray* vectorFit, const char* name, Double_t& mean)
 It Creates the AliTRDCalPad object from AliTRDFitInfo
 0 not successful fit 1 successful fit
 mean mean value over the successful fit

void SetPeriodeFitPH(Int_t periodeFitPH)
 Set FitPH if 1 then each detector will be fitted

void SetBeginFitCharge(Float_t beginFitCharge)
 The fit of the deposited charge distribution begins at
 histo->Mean()/beginFitCharge
 You can here set beginFitCharge

void SetT0Shift0(Float_t t0Shift0)
 The t0 calculated with the maximum positif slope is shift from t0Shift0
 You can here set t0Shift0

void SetT0Shift1(Float_t t0Shift1)
 The t0 calculated with the maximum of the amplification region is shift from t0Shift1
 You can here set t0Shift1

void SetRangeFitPRF(Float_t rangeFitPRF)
 The fit of the PRF is from -rangeFitPRF to rangeFitPRF
 You can here set rangeFitPRF

void SetMinEntries(Int_t minEntries)
 Minimum entries for fitting

void SetRebin(Short_t rebin)
 Rebin with rebin time less bins the Ch histo
 You can set here rebin that should divide the number of bins of CH histo

Bool_t FillVectorFit()
 For the Fit functions fill the vector Fit

Bool_t FillVectorFit2()
 For the Fit functions fill the vector Fit

Bool_t InitFit(Int_t nbins, Int_t i)
 Init the number of expected bins and fDect1[i] fDect2[i]

Bool_t InitFitCH()
 Init the fVectorFitCH for normalisation
 Init the histo for debugging

Bool_t InitFitPH()
 Init the arrays of results
 Init the histos for debugging

Bool_t InitFitPRF()
 Init the calibration mode (Nz, Nrphi), the histograms for
 debugging the fit methods if fDebug > 0,

Bool_t InitFitLinearFitter()
Bool_t InitFitExbAlt()
void InitfCountDetAndfCount(Int_t i)
 Init the current detector where we are fCountDet and the
 next fCount for the functions Fit...

void CalculNumberOfBinsExpected(Int_t i)
 Calculate the number of bins expected (calibration groups)

void CalculDect1Dect2(Int_t i)
 Calculate the range of fits

Bool_t CheckFitVoir()
 Check if fFitVoir is in the range

void UpdatefCountDetAndfCount(Int_t idect, Int_t i)
 See if we are in a new detector and update the
 variables fNfragZ and fNfragRphi if yes
 Will never happen for only one detector (3 and 4)
 Doesn't matter for 2

void ReconstructFitRowMinRowMax(Int_t idect, Int_t i)
 Reconstruct the min pad row, max pad row, min pad col and
 max pad col of the calibration group for the Fit functions
 idect is the calibration group inside the detector

Bool_t NotEnoughStatisticCH(Int_t idect)
 For the case where there are not enough entries in the histograms
 of the calibration group, the value present in the choosen database
 will be put. A negativ sign enables to know that a fit was not possible.

Bool_t NotEnoughStatisticPH(Int_t idect, Double_t nentries)
 For the case where there are not enough entries in the histograms
 of the calibration group, the value present in the choosen database
 will be put. A negativ sign enables to know that a fit was not possible.

Bool_t NotEnoughStatisticPRF(Int_t idect)
 For the case where there are not enough entries in the histograms
 of the calibration group, the value present in the choosen database
 will be put. A negativ sign enables to know that a fit was not possible.

Bool_t NotEnoughStatisticLinearFitter()
 For the case where there are not enough entries in the histograms
 of the calibration group, the value present in the choosen database
 will be put. A negativ sign enables to know that a fit was not possible.

Bool_t NotEnoughStatisticExbAlt()
 For the case where there are not enough entries in the histograms
 of the calibration group, the value present in the choosen database
 will be put. A negativ sign enables to know that a fit was not possible.

Bool_t FillInfosFitCH(Int_t idect)
 Fill the coefficients found with the fits or other
 methods from the Fit functions

Bool_t FillInfosFitPH(Int_t idect, Double_t nentries)
 Fill the coefficients found with the fits or other
 methods from the Fit functions

Bool_t FillInfosFitPRF(Int_t idect)
 Fill the coefficients found with the fits or other
 methods from the Fit functions

Bool_t FillInfosFitLinearFitter()
 Fill the coefficients found with the fits or other
 methods from the Fit functions

Bool_t FillInfosFitExbAlt()
 Fill the coefficients found with the fits or other
 methods from the Fit functions

void FillFillCH(Int_t idect)
 DebugStream and fVectorFit

void FillFillPH(Int_t idect, Double_t nentries)
 DebugStream and fVectorFit and fVectorFit2

void FillFillPRF(Int_t idect)
 DebugStream and fVectorFit

void FillFillLinearFitter()
 DebugStream and fVectorFit

void FillFillExbAlt()
 DebugStream and fVectorFit

Bool_t CalculT0CoefMean()
 For the detector Dect calcul the mean time 0
 for the calibration group idect from the choosen database

Bool_t CalculChargeCoefMean(Bool_t vrai)
 For the detector Dect calcul the mean gain factor
 for the calibration group idect from the choosen database

Bool_t CalculPRFCoefMean()
 For the detector Dect calcul the mean sigma of pad response
 function for the calibration group idect from the choosen database

Bool_t CalculVdriftCoefMean()
 For the detector dect calcul the mean drift velocity for the
 calibration group idect from the choosen database

Bool_t CalculVdriftLorentzCoef()
 For the detector fCountDet, mean drift velocity and tan lorentzangle

Float_t GetPRFDefault(Int_t layer) const
 Default width of the PRF if there is no database as reference

void SetCalROC(Int_t i)
 Set the calib object for fCountDet

void FitPente(TH1* projPH)
 Slope methode for the drift velocity

void FitLagrangePoly(TH1* projPH)
 Slope methode but with polynomes de Lagrange

void FitPH(TH1* projPH, Int_t idect)
 Fit methode for the drift velocity

Bool_t FitPRFGausMI(Double_t* arraye, Double_t* arraym, Double_t* arrayme, Int_t nBins, Float_t xMin, Float_t xMax)
 Fit methode for the sigma of the pad response function

Double_t FitGausMI(Double_t* arraye, Double_t* arraym, Double_t* arrayme, Int_t nBins, Float_t xMin, Float_t xMax, TVectorD* param, Bool_t kError = kTRUE)
 Fit methode for the sigma of the pad response function

void FitPRF(TH1* projPRF)
 Fit methode for the sigma of the pad response function

void RmsPRF(TH1* projPRF)
 Fit methode for the sigma of the pad response function

void FitTnpRange(Double_t* arraye, Double_t* arraym, Double_t* arrayme, Int_t nbg, Int_t nybins)
 Fit methode for the sigma of the pad response function with 2*nbg tan bins

void FitMean(TH1* projch, Double_t nentries, Double_t mean)
 Only mean methode for the gain factor

void FitMeanW(TH1* projch, Double_t nentries)
 mean w methode for the gain factor

void FitMeanWSm(TH1* projch, Float_t sumAll)
 mean w methode for the gain factor

void FitLandau(TH1* projch, Double_t mean, Double_t nentries)
 Fit methode for the gain factor

void FitCH(TH1* projch, Double_t mean, Double_t nentries)
 Fit methode for the gain factor

void FitBisCH(TH1* projch, Double_t mean, Double_t nentries)
 Fit methode for the gain factor more time consuming

void FitBisCHEx(TH1* projch, Double_t mean, Double_t nentries)
 Fit methode for the gain factor more time consuming

void CalculPolynomeLagrange2(const Double_t* x, const Double_t* y, Double_t& c0, Double_t& c1, Double_t& c2, Double_t& c3, Double_t& c4) const
 Calcul the coefficients of the polynome passant par ces trois points de degre 2

void CalculPolynomeLagrange3(const Double_t* x, const Double_t* y, Double_t& c0, Double_t& c1, Double_t& c2, Double_t& c3, Double_t& c4) const
 Calcul the coefficients of the polynome passant par ces quatre points de degre 3

void CalculPolynomeLagrange4(const Double_t* x, const Double_t* y, Double_t& c0, Double_t& c1, Double_t& c2, Double_t& c3, Double_t& c4) const
 Calcul the coefficients of the polynome passant par ces cinqs points de degre 4

void NormierungCharge()
 Normalisation of the gain factor resulting for the fits

TH1I * ReBin(const TH1I* hist) const
 Rebin of the 1D histo for the gain calibration if needed.
 you have to choose fRebin, divider of fNumberBinCharge

TH1F * ReBin(const TH1F* hist) const
 Rebin of the 1D histo for the gain calibration if needed
 you have to choose fRebin divider of fNumberBinCharge

Int_t GetLayer(Int_t d) const
 Reconstruct the plane number from the detector number

Int_t GetStack(Int_t d) const
 Reconstruct the stack number from the detector number

Int_t GetSector(Int_t d) const
 Reconstruct the sector number from the detector number

void ResetVectorFit()
 Reset the VectorFits

Double_t PH(const Double_t* x, const Double_t* par)
 Function for the fit

Double_t AsymmGauss(const Double_t* x, const Double_t* par)
 Function for the fit

Double_t FuncLandauGaus(const Double_t* x, const Double_t* par)
 Sum Landau + Gaus with identical mean

Double_t LanGauFun(const Double_t* x, const Double_t* par)
 Function for the fit

 Fit parameters:
 par[0]=Width (scale) parameter of Landau density
 par[1]=Most Probable (MP, location) parameter of Landau density
 par[2]=Total area (integral -inf to inf, normalization constant)
 par[3]=Width (sigma) of convoluted Gaussian function

 In the Landau distribution (represented by the CERNLIB approximation),
 the maximum is located at x=-0.22278298 with the location parameter=0.
 This shift is corrected within this function, so that the actual
 maximum is identical to the MP parameter.

Double_t LanGauFunEx(const Double_t* x, const Double_t* par)
 Function for the fit

 Fit parameters:
 par[0]=Width (scale) parameter of Landau density
 par[1]=Most Probable (MP, location) parameter of Landau density
 par[2]=Total area (integral -inf to inf, normalization constant)
 par[3]=Width (sigma) of convoluted Gaussian function
 par[4]=Exponential Slope Parameter

 In the Landau distribution (represented by the CERNLIB approximation),
 the maximum is located at x=-0.22278298 with the location parameter=0.
 This shift is corrected within this function, so that the actual
 maximum is identical to the MP parameter.

TF1 * LanGauFit(TH1* his, const Double_t* fitrange, const Double_t* startvalues, const Double_t* parlimitslo, const Double_t* parlimitshi, Double_t* fitparams, Double_t* fiterrors, Double_t* chiSqr, Int_t* ndf) const
 Function for the fit

TF1 * LanGauFitEx(TH1* his, const Double_t* fitrange, const Double_t* startvalues, const Double_t* parlimitslo, const Double_t* parlimitshi, Double_t* fitparams, Double_t* fiterrors, Double_t* chiSqr, Int_t* ndf) const
 Function for the fit

AliTRDCalibraFit & operator=(const AliTRDCalibraFit& )
{ return *this; }
void SetCalDetVdriftExB(AliTRDCalDet* calDetVdriftUsed, AliTRDCalDet* calDetExBUsed)
 ExB calibration
{fCalDetVdriftUsed = calDetVdriftUsed; fCalDetExBUsed = calDetExBUsed;}
void ChooseMethod(Short_t method)
 Set or Get the variables

 Fit
{ fMethod = method; }
void SetFitOutliersChargeLow(Float_t fitOutliersChargeLow)
{ fOutliersFitChargeLow = fitOutliersChargeLow; }
void SetFitOutliersChargeHigh(Float_t fitOutliersChargeHigh)
{ fOutliersFitChargeHigh = fitOutliersChargeHigh; }
void SetTakeTheMaxPH()
void SetAccCDB()
{ fAccCDB = kTRUE; }
Int_t GetPeriodeFitPH() const
{ return fFitPHPeriode; }
Float_t GetFitOutliersChargeLow() const
Float_t GetFitOutliersChargeHigh() const
Bool_t GetTakeTheMaxPH() const
{ return fTakeTheMaxPH; }
Float_t GetT0Shift0() const
{ return fT0Shift0; }
Float_t GetT0Shift1() const
{ return fT0Shift1; }
Float_t GetRangeFitPRF() const
{ return fRangeFitPRF; }
Bool_t GetAccCDB() const
{ return fAccCDB; }
Int_t GetMinEntries() const
{ return fMinEntries; }
Short_t GetRebin() const
{ return fRebin; }
Float_t GetScaleFactorGain() const
{ return fScaleGain; }
Int_t GetNumberFit() const
 Statistics
{ return fNumberFit; }
Int_t GetNumberFitSuccess() const
{ return fNumberFitSuccess; }
Int_t GetNumberEnt() const
{ return fNumberEnt; }
Double_t GetStatisticMean() const
{ return fStatisticMean; }
void SetDebugLevel(Short_t level)
 Debug
{ fDebugLevel = level; }
void SetDet(Int_t iLayer, Int_t iStack, Int_t iSector)
void SetFitVoir(Int_t fitVoir)
 Magnetic field
{ fFitVoir = fitVoir; }
void SetMagneticField(Float_t magneticfield)
{ fMagneticField = magneticfield; }
Double_t GetScaleFitFactor() const
 Get the scale factor
{ return fScaleFitFactor; }
TObjArray GetVectorFit() const
 Vector Fit getter
{ return fVectorFit; }
TObjArray GetVectorFit2() const
{ return fVectorFit2; }
AliTRDCalibraMode * GetCalibraMode() const
{ return fCalibraMode; }