class HMetaAligner: public TObject

_HADES_CLASS_DESCRIPTION

 HMetaAligner

 A class for aligning the META detectors respective to the straight lines
 defined from the target and MDC positions or the Santiago tracking.

 The input is a Ntuples file which defines:
   - lines parameters
   - position of the corresponding hits on a META detector
   - resolutions of the positions

 The alignment procedure tries to minimize chi^2 defined as the sum of
 squares distances between the line and the hit on the detector normalized
 by the resolutions of the detectors.

 The class allows to fix/release translations and rotations of the detectors.
 The translations are defined as additional offsets in the lab system
 from the position defined in the parameters file (RunTime dB).
 The rotations are defined in the local co-ordinate system
 around X, Y, Z axes - in this order.

 Tukay's bi-squered weights may be use to improve the results, as well as
 an improved method which changes the weights on flight (it doesn't work well
 yet).
 The method calculates a weight of each chi^2 taken into the account.
 If the chi^2 > Tc then the point is not taken. Otherwise it is taken with
 a weight = (1 - (chi^2/Ct^2))^2
 When the improved method is used then the Ct changes from iteration
 to iteration (as it was written above this doesn't work well).

Function Members (Methods)

public:
HMetaAligner(const HMetaAligner&)
HMetaAligner(const Char_t* pFileName, Int_t iSector, Int_t iSystem, const Char_t* pParamFile, Int_t iRunId)
virtual~HMetaAligner()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
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 Bool_tcontFit(Bool_t bUseTukay = kTRUE, const Char_t* pOut = "out.root", Int_t iMethod = 0)
virtual voidTObject::Copy(TObject& object) const
voidcopyResultsToStart()
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 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
voidfixAll()
voidfixParam(Int_t iParam, Bool_t bFix = kTRUE)
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
virtual const char*TObject::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() 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
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
voidTObject::MayNotUse(const char* method) const
virtual voidminAlign(Int_t& npar, Double_t* gin, Double_t& f, Double_t* par, Int_t iflag)
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)
HMetaAligner&operator=(const HMetaAligner&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
voidprint(const Char_t* pFileName = 0) const
virtual voidTObject::Print(Option_t* option = "") const
voidprintHtmlRow(const Char_t* pFileName = 0) const
voidprintLine(const Char_t* pFileName = 0) const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidreleaseAll()
voidreleaseParam(Int_t iParam)
voidTObject::ResetBit(UInt_t f)
voidreversFixed()
virtual Bool_trunFit(Bool_t bUseTukay = kTRUE, const Char_t* pOut = "out.root", Int_t iMethod = 0)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidsetEntries(Int_t i = 0)
voidsetError(Double_t d = 0.0001)
voidsetImprove(Bool_t bSet = kTRUE)
voidsetMigRad(Double_t d = 0.0001)
voidsetNormalize(Bool_t bSet = kTRUE)
static voidTObject::SetObjectStat(Bool_t stat)
voidsetStep(Int_t iParam, Double_t dStep = 0.01)
voidsetTukayConst(Double_t d = 6.0)
virtual voidTObject::SetUniqueID(UInt_t uid)
voidsetValue(Int_t iParam, Double_t dVal = 0.0f)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
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
voidwriteResults(const Char_t* pFileName)
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
private:
virtual Double_tfuncResiduals(HGeomVector* pvDT, HGeomRotation* prDRot = 0)
Bool_tgetShowerGeom(const Char_t* pParamFile, Int_t iRunId)
Bool_tgetTofGeom(const Char_t* pParamFile, Int_t iRunId)
voidinit()
Bool_tloadParameters(const Char_t* pParamFileName, Int_t iRunId)
Bool_topenNTuple(const Char_t* pFileName)

Data Members

public:
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
public:
Bool_tm_bChangeWeights
Bool_tm_bEqualSigmasset all sigmas to 11.0
Bool_tm_bFixed[6]if fixed
Bool_tm_bImproveinprove the results
Bool_tm_bInitOK
Bool_tm_bNormalizenormalize chi^2 to the entries
Bool_tm_bUseTukayuse weights
Double_tm_dChi2XSumchi^2 for X distance
Double_tm_dChi2YSumchi^2 for Y distance
Double_tm_dErrorerror value for MINUIT
Double_tm_dErrors[6]calculated errors
Double_tm_dLastChi_2last value of chi^2
Double_tm_dMigStepsmax. number of steps
Double_tm_dParams[6]calculated values
Double_tm_dStartErrors[6]start errors
Double_tm_dStartParams[6]start parameters
Double_tm_dSteps[6]step value of param
Double_tm_dTukayConstconst for weights
Double_tm_dTukayConst_2m_dTukayConst ^ 2
Double_tm_dWeightChi2Xweight for chi^2 X
Double_tm_dWeightChi2Yweight for chi^2 Y
Int_tm_iCallsnumber of iterations
Int_tm_iEntriesentries to calculate
Int_tm_iHitsnumber of hits for the detector
Int_tm_iLastThrownnumber of hits with weight = 0
Int_tm_iMaxEntriesentries in the input file
Int_tm_iSector
Int_tm_iStatusstatus of the fit
Int_tm_iSystemdetector type: 0: shower, 1: tof
Int_tm_iVerboseprinting level
protected:
HGeomRotationm_arRI[8]inv modules' matrices
HGeomVectorm_avT[8]translations vectors
Double_tm_dPrevSigmaparams when weights const changes
Double_tm_dWeightsSum0
Double_tm_dWeightsSum1
Float_tm_fAlphaX
Float_tm_fAlphaY
Float_tm_fAlphaZ
Float_tm_fMod
Float_tm_fSec
Float_tm_fSigXo
Float_tm_fSigYo
Float_tm_fSys
Float_tm_fXcdata from NTuple
Float_tm_fXo
Float_tm_fYc
Float_tm_fYo
Float_tm_fZc
Int_tm_iMethodMINUIT method id
HRuntimeDb*m_pRTDBRuntime dB
TNtuple*m_pTuplepointer to NTuple
TFile*m_pTupleFilefile with input data
private:
Double_tm_dChi2
Double_tm_dChi2W
Double_tm_dChi2X
Double_tm_dChi2Y
Double_tm_dDX
Double_tm_dDY

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

void init(void)
 Called in the constructors to clear the variables
HMetaAligner(const Char_t* pFileName, Int_t iSector, Int_t iSystem, const Char_t* pParamFile, Int_t iRunId)
 Initialize the class.
 pFileName - is a name of an input file which consists of Ntuples
 iSector and iSystem define the detector. iSystem == 0: Shower, 1: Tof
 pParamFile and iRunId defines setup with parameters
~HMetaAligner(void)
Bool_t loadParameters(const Char_t* pParamFileName, Int_t iRunId)
 Initialize HADES & Runtime dB and load parameters for the specified detector
Bool_t getShowerGeom(const Char_t* pParamFile, Int_t iRunId)
 Initailize PreShower geom parameters
Bool_t getTofGeom(const Char_t* pParamFile, Int_t iRunId)
 Initailize Tof geom parameters
Bool_t openNTuple(const Char_t* pFileName)
 Open the file with the NTuple
void setValue(Int_t iParam, Double_t dVal = 0.0f)
 Set the start value for a parameter.
 iParam:
 0: dX
 1: dY
 2: dZ
 3: dRotX
 4: dRotY
 5: dRotZ
void setStep(Int_t iParam, Double_t dStep = 0.01)
 Set start steps for the parameters
void fixParam(Int_t iParam, Bool_t bFix = kTRUE)
 Fix the parameter
void releaseParam(Int_t iParam)
 Release the parameters
void releaseAll(void)
 Release all the parameters
void fixAll(void)
 Fix all the parameters
void reversFixed(void)
 Revers the fix flag for all parameters
void setError(Double_t d = 0.0001)
 Set the MINUIT error value
void setMigRad(Double_t d = 0.0001)
 Set the maximum number of iteration for MINUIT
void setTukayConst(Double_t d = 6.0)
 Set the Tukay's constans.
void setNormalize(Bool_t bSet = kTRUE)
 Normalize the chi^2 to the number of events taken into the account
void setImprove(Bool_t bSet = kTRUE)
 Should MINUIT try to improve the results ? The calculations are twice longer.
void setEntries(Int_t i = 0)
 Set the number of entries taken into the account (Not all from the input
 file). If i <= 0 then all events are taken.
void copyResultsToStart(void)
 Copy the results from the previous iteration to the input parameters.
Bool_t runFit(Bool_t bUseTukay = kTRUE, const Char_t* pOut = "out.root", Int_t iMethod = 0)
 Run the alignment procedure.
 bUseTukay defines if the Tukay's weights should be used.
 pOut defines a file with the output NTuples. pOut == NULL - no output file.
 iMethod: MINUIT minimize method:
 0 - MINImize
 1 - MIGrad
 2 - SIMplex
Bool_t contFit(Bool_t bUseTukay = kTRUE, const Char_t* pOut = "out.root", Int_t iMethod = 0)
 Next iteration of the alignment procedure.
 Parameters as for runFit method.
void print(const Char_t* pFileName = 0) const
 Print a table with all the results of the alignment procedure.
 If pFileName != NULL the output is redirected to the pFileName file,
 otherwise it is send to stdout.
 When (I) appears after the method name the minimization was improved.
 (Chw) after the Tukay's const. value means that the weight was changing.
 (N) after FCN means that FCN was normalized and (eS) means that
 all detectors resolutions was equal 11.
void printLine(const Char_t* pFileName = 0) const
 Print the alignment results in a line.
 pFileName as for print method.
void printHtmlRow(const Char_t* pFileName = 0) const
 Print the results as a HTML table's row.
 The order of the output: detector name, dX, dY, dZ, rotX, rotY, rotZ,
 number of hits not taken into the account / total number of hits, FCN.
 pFileName as for print method.
Double_t funcResiduals(HGeomVector* pvDT, HGeomRotation* prDRot = 0)
 Calculates the chi^2 from a hit
void minAlign(Int_t& npar, Double_t* gin, Double_t& f, Double_t* par, Int_t iflag)
 Function called by MINUIT.
void writeResults(const Char_t* pFileName)
 Function called to write results of the fit to an output file: pFileName
HMetaAligner(const Char_t* pFileName, Int_t iSector, Int_t iSystem, const Char_t* pParamFile, Int_t iRunId)

Last change: Sat May 22 13:04:33 2010
Last generated: 2010-05-22 13:04

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.