_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).
HMetaAligner(const HMetaAligner&) | |
HMetaAligner(const Char_t* pFileName, Int_t iSector, Int_t iSystem, const Char_t* pParamFile, Int_t iRunId) | |
virtual | ~HMetaAligner() |
void | TObject::AbstractMethod(const char* method) const |
virtual void | TObject::AppendPad(Option_t* option = "") |
virtual void | TObject::Browse(TBrowser* b) |
static TClass* | Class() |
virtual const char* | TObject::ClassName() const |
virtual void | TObject::Clear(Option_t* = "") |
virtual TObject* | TObject::Clone(const char* newname = "") const |
virtual Int_t | TObject::Compare(const TObject* obj) const |
virtual Bool_t | contFit(Bool_t bUseTukay = kTRUE, const Char_t* pOut = "out.root", Int_t iMethod = 0) |
virtual void | TObject::Copy(TObject& object) const |
void | copyResultsToStart() |
virtual void | TObject::Delete(Option_t* option = "")MENU |
virtual Int_t | TObject::DistancetoPrimitive(Int_t px, Int_t py) |
virtual void | TObject::Draw(Option_t* option = "") |
virtual void | TObject::DrawClass() constMENU |
virtual TObject* | TObject::DrawClone(Option_t* option = "") constMENU |
virtual void | TObject::Dump() constMENU |
virtual void | TObject::Error(const char* method, const char* msgfmt) const |
virtual void | TObject::Execute(const char* method, const char* params, Int_t* error = 0) |
virtual void | TObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0) |
virtual void | TObject::ExecuteEvent(Int_t event, Int_t px, Int_t py) |
virtual void | TObject::Fatal(const char* method, const char* msgfmt) const |
virtual TObject* | TObject::FindObject(const char* name) const |
virtual TObject* | TObject::FindObject(const TObject* obj) const |
void | fixAll() |
void | fixParam(Int_t iParam, Bool_t bFix = kTRUE) |
virtual Option_t* | TObject::GetDrawOption() const |
static Long_t | TObject::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_t | TObject::GetObjectStat() |
virtual Option_t* | TObject::GetOption() const |
virtual const char* | TObject::GetTitle() const |
virtual UInt_t | TObject::GetUniqueID() const |
virtual Bool_t | TObject::HandleTimer(TTimer* timer) |
virtual ULong_t | TObject::Hash() const |
virtual void | TObject::Info(const char* method, const char* msgfmt) const |
virtual Bool_t | TObject::InheritsFrom(const char* classname) const |
virtual Bool_t | TObject::InheritsFrom(const TClass* cl) const |
virtual void | TObject::Inspect() constMENU |
void | TObject::InvertBit(UInt_t f) |
virtual TClass* | IsA() const |
virtual Bool_t | TObject::IsEqual(const TObject* obj) const |
virtual Bool_t | TObject::IsFolder() const |
Bool_t | TObject::IsOnHeap() const |
virtual Bool_t | TObject::IsSortable() const |
Bool_t | TObject::IsZombie() const |
virtual void | TObject::ls(Option_t* option = "") const |
void | TObject::MayNotUse(const char* method) const |
virtual void | minAlign(Int_t& npar, Double_t* gin, Double_t& f, Double_t* par, Int_t iflag) |
virtual Bool_t | TObject::Notify() |
static void | TObject::operator delete(void* ptr) |
static void | TObject::operator delete(void* ptr, void* vp) |
static void | TObject::operator delete[](void* ptr) |
static void | TObject::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 void | TObject::Paint(Option_t* option = "") |
virtual void | TObject::Pop() |
void | print(const Char_t* pFileName = 0) const |
virtual void | TObject::Print(Option_t* option = "") const |
void | printHtmlRow(const Char_t* pFileName = 0) const |
void | printLine(const Char_t* pFileName = 0) const |
virtual Int_t | TObject::Read(const char* name) |
virtual void | TObject::RecursiveRemove(TObject* obj) |
void | releaseAll() |
void | releaseParam(Int_t iParam) |
void | TObject::ResetBit(UInt_t f) |
void | reversFixed() |
virtual Bool_t | runFit(Bool_t bUseTukay = kTRUE, const Char_t* pOut = "out.root", Int_t iMethod = 0) |
virtual void | TObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU |
virtual void | TObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "") |
void | TObject::SetBit(UInt_t f) |
void | TObject::SetBit(UInt_t f, Bool_t set) |
virtual void | TObject::SetDrawOption(Option_t* option = "")MENU |
static void | TObject::SetDtorOnly(void* obj) |
void | setEntries(Int_t i = 0) |
void | setError(Double_t d = 0.0001) |
void | setImprove(Bool_t bSet = kTRUE) |
void | setMigRad(Double_t d = 0.0001) |
void | setNormalize(Bool_t bSet = kTRUE) |
static void | TObject::SetObjectStat(Bool_t stat) |
void | setStep(Int_t iParam, Double_t dStep = 0.01) |
void | setTukayConst(Double_t d = 6.0) |
virtual void | TObject::SetUniqueID(UInt_t uid) |
void | setValue(Int_t iParam, Double_t dVal = 0.0f) |
virtual void | ShowMembers(TMemberInspector& insp, char* parent) |
virtual void | Streamer(TBuffer& b) |
void | StreamerNVirtual(TBuffer& b) |
virtual void | TObject::SysError(const char* method, const char* msgfmt) const |
Bool_t | TObject::TestBit(UInt_t f) const |
Int_t | TObject::TestBits(UInt_t f) const |
virtual void | TObject::UseCurrentStyle() |
virtual void | TObject::Warning(const char* method, const char* msgfmt) const |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const |
void | writeResults(const Char_t* pFileName) |
virtual void | TObject::DoError(int level, const char* location, const char* fmt, va_list va) const |
void | TObject::MakeZombie() |
virtual Double_t | funcResiduals(HGeomVector* pvDT, HGeomRotation* prDRot = 0) |
Bool_t | getShowerGeom(const Char_t* pParamFile, Int_t iRunId) |
Bool_t | getTofGeom(const Char_t* pParamFile, Int_t iRunId) |
void | init() |
Bool_t | loadParameters(const Char_t* pParamFileName, Int_t iRunId) |
Bool_t | openNTuple(const Char_t* pFileName) |
enum TObject::EStatusBits { | kCanDelete | |
kMustCleanup | ||
kObjInCanvas | ||
kIsReferenced | ||
kHasUUID | ||
kCannotPick | ||
kNoContextMenu | ||
kInvalidObject | ||
}; | ||
enum TObject::[unnamed] { | kIsOnHeap | |
kNotDeleted | ||
kZombie | ||
kBitMask | ||
kSingleKey | ||
kOverwrite | ||
kWriteDelete | ||
}; |
Bool_t | m_bChangeWeights | |
Bool_t | m_bEqualSigmas | set all sigmas to 11.0 |
Bool_t | m_bFixed[6] | if fixed |
Bool_t | m_bImprove | inprove the results |
Bool_t | m_bInitOK | |
Bool_t | m_bNormalize | normalize chi^2 to the entries |
Bool_t | m_bUseTukay | use weights |
Double_t | m_dChi2XSum | chi^2 for X distance |
Double_t | m_dChi2YSum | chi^2 for Y distance |
Double_t | m_dError | error value for MINUIT |
Double_t | m_dErrors[6] | calculated errors |
Double_t | m_dLastChi_2 | last value of chi^2 |
Double_t | m_dMigSteps | max. number of steps |
Double_t | m_dParams[6] | calculated values |
Double_t | m_dStartErrors[6] | start errors |
Double_t | m_dStartParams[6] | start parameters |
Double_t | m_dSteps[6] | step value of param |
Double_t | m_dTukayConst | const for weights |
Double_t | m_dTukayConst_2 | m_dTukayConst ^ 2 |
Double_t | m_dWeightChi2X | weight for chi^2 X |
Double_t | m_dWeightChi2Y | weight for chi^2 Y |
Int_t | m_iCalls | number of iterations |
Int_t | m_iEntries | entries to calculate |
Int_t | m_iHits | number of hits for the detector |
Int_t | m_iLastThrown | number of hits with weight = 0 |
Int_t | m_iMaxEntries | entries in the input file |
Int_t | m_iSector | |
Int_t | m_iStatus | status of the fit |
Int_t | m_iSystem | detector type: 0: shower, 1: tof |
Int_t | m_iVerbose | printing level |
HGeomRotation | m_arRI[8] | inv modules' matrices |
HGeomVector | m_avT[8] | translations vectors |
Double_t | m_dPrevSigma | params when weights const changes |
Double_t | m_dWeightsSum0 | |
Double_t | m_dWeightsSum1 | |
Float_t | m_fAlphaX | |
Float_t | m_fAlphaY | |
Float_t | m_fAlphaZ | |
Float_t | m_fMod | |
Float_t | m_fSec | |
Float_t | m_fSigXo | |
Float_t | m_fSigYo | |
Float_t | m_fSys | |
Float_t | m_fXc | data from NTuple |
Float_t | m_fXo | |
Float_t | m_fYc | |
Float_t | m_fYo | |
Float_t | m_fZc | |
Int_t | m_iMethod | MINUIT method id |
HRuntimeDb* | m_pRTDB | Runtime dB |
TNtuple* | m_pTuple | pointer to NTuple |
TFile* | m_pTupleFile | file with input data |
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
Initialize HADES & Runtime dB and load parameters for the specified detector
Set the start value for a parameter. iParam: 0: dX 1: dY 2: dZ 3: dRotX 4: dRotY 5: dRotZ
Normalize the chi^2 to the number of events taken into the account
Should MINUIT try to improve the results ? The calculations are twice longer.
Set the number of entries taken into the account (Not all from the input file). If i <= 0 then all events are taken.
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
Next iteration of the alignment procedure. Parameters as for runFit method.
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.
Calculates the chi^2 from a hit
Function called by MINUIT.
Function called to write results of the fit to an output file: pFileName