class HMdcMetaAligner: public HReconstructor

_HADES_CLASS_DESCRIPTION


 HMdcMetaAligner   (ongoing work)

 Performs the TOF/SHOWER software alignment (first part).

 First, a set of Hits from MDCs is used to follow the tracks
 up to the SHOWER/TOF. The Hit selection repeates the scheme
 from hmdcalignernew.cc. Then the differences in X, Y
 gives information about the position


Function Members (Methods)

public:
HMdcMetaAligner()
HMdcMetaAligner(Int_t sector, Int_t modA, Int_t modB)
HMdcMetaAligner(const Text_t* name, const Text_t* title, Int_t sector, Int_t modA)
HMdcMetaAligner(const Text_t* name, const Text_t* title, Int_t sector, Int_t modA, Int_t modB, Int_t modC = -1, Int_t modD = -1)
virtual~HMdcMetaAligner()
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)
voidexecute1()
voidexecute2()
voidexecute3()
voidexecute4()
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)
voidfillHistograms(Int_t index, Int_t select = 0)
voidfillMetaHistograms(Int_t Mindex, Int_t select = 0)
voidfillMetaRotMatrix(Int_t ind, Float_t prim, Float_t segu, Float_t terc)
voidfillMetaTranslation(Int_t ind, Float_t x, Float_t y, Float_t z)
voidfillRotMatrix(Int_t ind, Float_t prim, Float_t segu, Float_t terc)
voidfillTranslation(Int_t ind, Float_t x, Float_t y, Float_t z)
virtual Bool_tfinalize()
HGeomVectorfindEulerAngles(HGeomRotation rot)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
HGeomVectorfindProjMetaPoint(HMdcHit* pHitA, HGeomRotation rotM, HGeomVector traM)
HGeomVectorfindProjMetaPoint(HMdcHit* pHitA, HMdcHit* pHitB, HGeomRotation rot, HGeomVector tra, HGeomRotation rotM, HGeomVector traM)
HGeomVectorfindProjPoint(HMdcHit* pHit, HGeomRotation rot, HGeomVector tra, Float_t* slopes)
voidfitHistograms(Int_t index)
voidfitMetaHistograms(Int_t index)
virtual HTask*HReconstructor::getComposite()
virtual voidHReconstructor::getConnections()
Int_tgetDetector()
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
HMdcMetaHit*getHits()
virtual const char*TObject::GetIconName() const
virtual const char*TNamed::GetName() const
Int_tgetNumMods()
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()
Int_tgetRelParams(HGeomVector*& ang, HGeomVector*& tra, HGeomVector*& ang2, HGeomVector*& tra2, HGeomVector*& ang3, HGeomVector*& tra3)
HGeomRotationgetRotMatrix()
TObjArrayHReconstructor::getTable()
virtual HTask*HReconstructor::getTask(const Char_t* name)
virtual const char*TNamed::GetTitle() const
HGeomVectorgetTranslation()
TTree*getTree()
virtual UInt_tTObject::GetUniqueID() const
Bool_tgetUseUnitErrors()
Float_t*getWeights()
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()
voidinitDefaults()
voidinitMinimization()
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
Int_tisInsideMetaWindow(Int_t sector, HTofHit* pHitT, HGeomVector proj, HGeomVector* vec)
Int_tisInsideMetaWindow(Int_t sector, HShowerHit* pHitS, HGeomVector proj, HGeomVector* vec)
Bool_tisInsideWindow(Int_t plot, HMdcHit* pHit, HGeomVector point, Float_t* slope)
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
HMdcHit*mergeHits(HMdcHit* hitB, HMdcHit* hitA, HGeomRotation rot, HGeomVector tra)
voidminfit(Int_t fix, HGeomVector fE, HGeomVector fT)
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)
virtual Bool_tHTask::setConnections()
voidsetControlHistoOff()
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidsetEulerAngles(Int_t ind, Float_t f, Float_t s, Float_t t)
voidsetFix(Int_t fix)
voidsetGeomAuxPar()
voidsetGeomAuxParSim(Int_t ind = 0, Float_t eu1 = 0, Float_t eu2 = 0, Float_t eu3 = 0, Float_t tr1 = 0, Float_t tr2 = 0, Float_t tr3 = 0)
voidsetGeomParAutoOn()
voidsetHistograms()
voidsetIterCriteria(Float_t criteria)
voidsetLimits(Float_t l0, Float_t l1, Float_t l2, Float_t l3, Float_t l4, Float_t l5)
voidHTask::setManual()
voidsetMetaEulerAngles(Int_t ind, Float_t f, Float_t s, Float_t t)
voidsetMetaGeomAuxParSim(Int_t ind = 0, Float_t eu1 = 0, Float_t eu2 = 0, Float_t eu3 = 0, Float_t tr1 = 0, Float_t tr2 = 0, Float_t tr3 = 0)
voidsetMetaGeomParAutoOn()
voidsetMinimization(Int_t select = 1)
voidsetMinimizationOff()
voidsetModstoAlign(Int_t sector, Int_t modA, Int_t modB)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
voidsetNoCut()
static voidTObject::SetObjectStat(Bool_t stat)
voidsetOutputAscii(TString name)
voidsetOutputRoot(TString name)
virtual voidHTask::setOwner(HTask* atask)
voidsetParContainers()
voidsetSearchLimits(Float_t x, Float_t y)
voidsetSigmas(Float_t XSigmas, Float_t YSigmas, Float_t S0Sigmas, Float_t S1Sigmas)
voidsetSlopeCut(Float_t SlopeCut = 0.1)
voidsetSteps(Float_t s0, Float_t s1, Float_t s2, Float_t s3, Float_t s4, Float_t s5)
voidsetTargetOn(HGeomVector target)
virtual voidTNamed::SetTitle(const char* title = "")MENU
voidsetTree()
virtual voidTObject::SetUniqueID(UInt_t uid)
voidsetUniqueRSInTof(Int_t det)
voidsetUnitErrors()
voidsetWeights(Float_t w0, Float_t w1, Float_t w2, Float_t w3)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual Int_tTNamed::Sizeof() const
voidstoreInFile()
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
voidtransfEuler(HGeomRotation eulrot, HGeomVector eulvec, HGeomVector oldV, HGeomVector newV)
voidtransfEulerInv(HGeomRotation eulrot, HGeomVector eulvec, HGeomVector oldV, HGeomVector newV)
Float_t*transformToSlopes(HMdcHit* pHit)
HGeomVectortranslationFinder(Int_t module)
HGeomVectortransUniqueFinder()
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:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
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
};
public:
TH1F**AvsBinBCS_X!
TH1F**AvsBinBCS_XSlope!
TH1F**AvsBinBCS_Y!
TH1F**AvsBinBCS_YSlope!
TH1F**AvsCinCCS_X!
TH1F**AvsCinCCS_XSlope!
TH1F**AvsCinCCS_Y!
TH1F**AvsCinCCS_YSlope!
TH1F**AvsDinDCS_X!
TH1F**AvsDinDCS_XSlope!
TH1F**AvsDinDCS_Y!
TH1F**AvsDinDCS_YSlope!
TH1F**BvsAinACS_X!
TH1F**BvsAinACS_XSlope!
TH1F**BvsAinACS_Y!
TH1F**BvsAinACS_YSlope!
TH1F**BvsCinCCS_X!
TH1F**BvsCinCCS_XSlope!
TH1F**BvsCinCCS_Y!
TH1F**BvsCinCCS_YSlope!
TH1F**BvsDinDCS_X! projected on MDC D coordinate system
TH1F**BvsDinDCS_XSlope!
TH1F**BvsDinDCS_Y! (that is inDCS ;-)
TH1F**BvsDinDCS_YSlope!
TH1F**CvsAinACS_X!
TH1F**CvsAinACS_XSlope!
TH1F**CvsAinACS_Y!
TH1F**CvsAinACS_YSlope!
TH1F**CvsBinBCS_X!
TH1F**CvsBinBCS_XSlope!
TH1F**CvsBinBCS_Y!
TH1F**CvsBinBCS_YSlope!
TH1F**CvsDinDCS_X! Histograms for studying residuals in projections
TH1F**CvsDinDCS_XSlope! the X position of a Hit in MDC D minus
TH1F**CvsDinDCS_Y! Key: CvsDinDCS_X means that the plot is
TH1F**CvsDinDCS_YSlope! the X position of a Hit in MDC C
TH1F**DvsAinACS_X!
TH1F**DvsAinACS_XSlope!
TH1F**DvsAinACS_Y!
TH1F**DvsAinACS_YSlope!
TH1F**DvsBinBCS_X!
TH1F**DvsBinBCS_XSlope!
TH1F**DvsBinBCS_Y!
TH1F**DvsBinBCS_YSlope!
TH1F**DvsCinCCS_X!
TH1F**DvsCinCCS_XSlope!
TH1F**DvsCinCCS_Y!
TH1F**DvsCinCCS_YSlope!
TH2F*ShowerPlaneProj!
TH1F**SqrDist! Sum of square distances
TH1F**SqrDistToA! square distance from fitted str.line to A
TH1F**SqrDistToB! square distance from fitted str.line to B
TH1F**SqrDistToC! square distance from fitted str.line to C
TH1F**SqrDistToD! square distance from fitted str.line to D
TH1F**TotalChi2! sum of chi2 from both fits
TH1F**XChi2Hist! chi2 from XZ plane fit
TH1F**YChi2Hist! chi2 from YZ plane fit
TTree*fAlignMeta! all data from hits in module pairs
TTree*fAlignMetaCut! data after cuts
TH1F*fAllResShowerX!
TH1F*fAllResShowerY!
TH1F**fAllResTofX!
TH1F**fAllResTofY!
Float_t*fLimits! Limits for minimization
static TFile*fOutRoot! Output file
static Int_tfRecCount! Number of reconstructors
TH1F*fResS0! All residual combinations S0
TH1F*fResS1! All residual combinations S1
TH1F**fResShowerX!
TH1F**fResShowerY!
TH1F**fResTofX!
TH1F**fResTofY!
TH1F*fResX! All residual combinations X
TH1F*fResY! All residual combinations Y
Float_t*fSteps! Step for minimization
TH1F*fUniqueAllResTofX!
TH1F*fUniqueAllResTofY!
TH1F**fUniqueResTofX!
TH1F**fUniqueResTofY!
Float_t*fWeights! Weights in the minimization fcn
protected:
Bool_tHReconstructor::fActiveActive flag
Bool_tfAuto! Automatical input on flag
Bool_tfAutoMeta! Automatical input on flag
Int_tfCount! Valid matched hit set for alignment
Int_tfCountCut! Valid matched hit set after cuts
Int_tfDetector! Meta detector number: 0..7 TOF , 8 SHOWER
Int_t*fDiscart! Discarted hits
Double_t*fError! Errors in tranformation
HGeomVector*fEuler! Euler angles
Int_tfFix! Fixing parameters in minimization
Int_tfHistNum! Number of histograms
Bool_tfHistoOff! Control histograms on flag
TList*HReconstructor::fHistogramsList of histograms generated by this reconstructor.
HCategory*fHitCat! category of Hits in the MDCs
HMdcMetaHit*fHits! Hits matched
Int_t*fHitsFoundAndUnique! Number of unique matches in the window
Int_tfHitsFoundInShowerAndUnique!
Int_tfHitsFoundInShowerWindow!
Int_t*fHitsFoundInTofAndUnique!
Int_t*fHitsFoundInTofWindow!
Int_t*fHitsFoundInWindow! Number of matches in the window
Int_t*fHitsMdc! Hits in MDC
Bool_tHTask::fIsTimedtimer flag
HIterator*fIter1! Iterator on the category
HIterator*fIter2! Iterator on the category
HIterator*fIter3! Iterator on the category
HIterator*fIter4! Iterator on the category
HIterator*fIter5! Iterator on the category
HIterator*fIter6! Iterator on the category
Float_tfIterCriteria! Iteration criteria in minimization
HLocationfLoc! MDC location (sector,modules)
HGeomVector*fMEuler! Euler angles
HGeomRotation*fMRotMat! rotation matrix (MDCB)=(matrix)*(MDCA)+(T)
HGeomRotation*fMRotTofRel! rotation (Tof[i])=(matrix)*(Tof[4])+(T)
HGeomVector*fMTransTofRel! translation (Tof[i])=(matrix)*(Tof[4])+(T)
HGeomVector*fMTranslation! Internal translation
Bool_tfManual! Manual input on flag
HMdcGeomPar*fMdcGeomPar! geometrical MDC parameters
Int_tfMetaHistNum! Number of Meta histograms
Int_tfMin! Control minimization
Int_tfNEntries! Number of events
TStringTNamed::fNameobject identifier
TStringfNameAscii! file name
TStringfNameRoot! file name
Int_tfNumMods! Number of modules to align
TObjArrayHReconstructor::fOutputs
HGeomRotation*fRotMat! rotation matrix (MDCB)=(matrix)*(MDCA)+(T)
Float_tfS0Sigmas! Number of sigmas for the S0 residual cut
Float_tfS1Sigmas! Number of sigmas for the S1 residual cut
Int_tfSCount! Valid matched hit set for alignment
Int_tfSDiscart! Discarted hits
HShowerGeometry*fShowerGeometry! geometrical SHOWER parameters
HCategory*fShowerHitCat! category of Hits in the MDCs
Float_tfSlopeCut! Cut parameter for perp incidence in MDC
Int_tfTCount! Valid matched hit set for alignment
Int_t*fTDiscart! Discarted hits
HGeomVectorfTargetPos! Target position
TStopwatchHReconstructor::fTimerTask timer
TStringTNamed::fTitleobject title
HTofGeomPar*fTofGeomPar! geometrical TOF parameters
HCategory*fTofHitCat! category of Hits in the MDCs
HGeomVector*fTranslation! Internal translation
Int_tfUniqueTofDet! Reference TOF detector
Bool_tfUseCut! Cut in N sigmas
Bool_tfUseSlopeCut! Cut perp incidence in MDC
Bool_tfUseTarget! Use target instead of hit slopes
Bool_tfUseUniqueRSInTof! Use unique coord. system for all TOF pads
Bool_tfUseUnitErrors! Sets unit errors for all point in the fit
Float_tfXArea! Window dimension
Float_tfXSigmas! Number of sigmas for the X residual cut
Float_tfYArea! Window dimension
Float_tfYSigmas! Number of sigmas for the Y residual cut
Bool_tHTask::isConnected
Bool_tHTask::isInitialised
Bool_tHTask::manual
HTask*HTask::owner

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

HMdcMetaAligner(void)
 Default constructor.

HMdcMetaAligner(Int_t sector, Int_t modA, Int_t modB)
 Constructor including module election. Alignment procedure
 proyects hits of modA and modB on META coordinate system and compares

HMdcMetaAligner(const Text_t* name, const Text_t* title, Int_t sector, Int_t modA, Int_t modB, Int_t modC = -1, Int_t modD = -1)
 Constructor including module election (and name and title, which
 seems to be very important). Alignment procedure
 proyects hits of modA and modB on META coordinate system and compares

HMdcMetaAligner(const Text_t* name, const Text_t* title, Int_t sector, Int_t modA)
 Constructor for only one MDC

void initDefaults(void)
 Inits common defaults

~HMdcMetaAligner(void)
 Destructor.

void initMinimization(void)
 Minimization defaults

void setOutputAscii(TString name)
 Sets ascii output for debugging.

void setOutputRoot(TString name)
 Sets ascii output for debugging.

void setSigmas(Float_t XSigmas, Float_t YSigmas, Float_t S0Sigmas, Float_t S1Sigmas)
 Sets number of sigmas in cuts.

void setHistograms(void)
 Inits histograms

void fitMetaHistograms(Int_t index)
Fits to a gaussian the two relevant histograms
(residuals in X and Y for Meta Histograms)
and obtains the fit parameters for further data selection

void fitHistograms(Int_t index)
Fits to a gaussian the four relevant histograms
and obtains the fit parameters for further data selection

TTree* getTree(void)
 return a tree to the minimization functional.

void setTree(void)
 Inits TNtuple

Bool_t init(void)
 Inits hitaux category and calls setParContainers()

Bool_t reinit(void)
 Call the functions returning auxiliar geometrical parameters

void setGeomParAutoOn(void)
Turn on the automatic geometrical parameter input

void setMetaGeomParAutoOn(void)
Turn on the automatic geometrical parameter input

void setControlHistoOff(void)
 Disables control histograms output (saving memory)

void setMinimization(Int_t select = 1)
 Selects minimization strategy

 select = 0  Disables minimization
 select = 1  Angle reduction by minuit
 select = 2  Analytic translation minimization
 select = 3  (1+2) Angle reduction+analytic translation
 select = 4  Translation reduction by minuit
 select = 5  6 parameters reduction by minuit
 select = 100 (fcnalign34) Chi square sum in minimization
 select = 101 (fcnalign34) Distances line-hit
 select = 500 + (2) Iterative minimization
            version of the previously described algorithms
  in particular:
 select = 502 Iterative version

void setMinimizationOff(void)
 Disables minimization

void setUnitErrors(void)
 introduce unit errors in Hits

void setUniqueRSInTof(Int_t det)
 Only one Reference System is used for all TOF in one
 sector

void setTargetOn(HGeomVector target)
 Target position is defined and used for
 the hit definition in
 (WARNING. Use only with one MDC)

void setFix(Int_t fix)
 Fix a parameter set in minimization


 20    fixes translations
 30    fixes rotations
 40    fixes Z traslations
 110   fixes all first and third angles
void setNoCut(void)
 Disables the cuts after fitting the histograms

void setSlopeCut(Float_t SlopeCut = 0.1)
 Enables the Slope cuts after fitting the histograms.
 This cut makes the sample near indep. of Z translations
 and results useful for X and Y minimization.
 The cut is effective only in MDCB, because fTranslation
 is represented in MDCB coordinates. Then, tracks passing
 the cut are almost parallel to Z direction
void setParContainers(void)
 Loads the parameter containers it uses later

void setGeomAuxPar(void)
 Defines the parameter containers it uses later

 The transformations are:  X = R X' + T
 in the geometrical parameters.
 To obtain relative transformations: X(B) = M X(A) + V
 we follow:
   X = R(A) X(A) + T(A)
   X = R(B) X(B) + T(B)

   X(B) = [R(B)]E-1 R(A) X(A) + [R(B)]E-1 [T(A)-T(B)]

   M = [R(B)]E-1 R(A)
   V = [R(B)]E-1 [T(A)-T(B)]

 From M it is easy to get the relative Euler angles

 CONVENTION: fRotMat[i] and fTranslation[i] store the
 matrix M and vector V of the transformations made like this:
 4 modules: [0]  X(D) = fRotMat[0] X(C) + fTranslation[0]
            [1]  X(D) = fRotMat[1] X(B) + fTranslation[1]
            [2]  X(D) = fRotMat[2] X(A) + fTranslation[2]

 3 modules: [0]  X(C) = fRotMat[0] X(B) + fTranslation[0]
            [1]  X(C) = fRotMat[1] X(A) + fTranslation[1]

 2 modules: [0]  X(B) = fRotMat[0] X(A) + fTranslation[0]

HGeomVector findEulerAngles(HGeomRotation rot)
 From the relative rotation, get the euler angles (radians)

 From an Euler rotation (see Dahlinger paper for the convention)
 the euler angles are:
 euler[0] = atan2(rot(5)/sin(euler[1]),rot(2)/sin(euler[1]))
 euler[1] = acos (rot(8))    with possible change of sign
 euler[2] = atan2(rot(7)/sin(euler[1]),-rot(6)/sin(euler[1]))

void setGeomAuxParSim(Int_t ind = 0, Float_t eu1 = 0, Float_t eu2 = 0, Float_t eu3 = 0, Float_t tr1 = 0, Float_t tr2 = 0, Float_t tr3 = 0)
 Entering geometrical parameters.

 To be used introducing in the macro the parameters for
 testing, optimization ...

void setMetaGeomAuxParSim(Int_t ind = 0, Float_t eu1 = 0, Float_t eu2 = 0, Float_t eu3 = 0, Float_t tr1 = 0, Float_t tr2 = 0, Float_t tr3 = 0)
 Entering geometrical parameters.

 To be used introducing in the macro the parameters for
 testing, optimization ...

Int_t execute(void)
 Iteration in the hit category. Fills histograms
 and TTree and calculates relevant quantities

void execute4(void)
 New execute for four MDCs
 Find the projection of Hits in the most external MDCs
 on the inners (besides this can be modified, changing the
 order of the MDCs in the constructor). Then merge the hits
 and continue to find till the last MDC. If successfull,
 fills a TClonesArray of Hits in a TTree for further
 analysis and minimization

void execute3(void)
 New execute for more than two MDCs

void execute2(void)
 Adapting the old execute

void execute1(void)
 Only one MDC.

void transfEuler(HGeomRotation eulrot, HGeomVector eulvec, HGeomVector oldV, HGeomVector newV)
 Transformation from one coordinate system to a new one
     newV = eulrot * oldV + eulvec

void transfEulerInv(HGeomRotation eulrot, HGeomVector eulvec, HGeomVector oldV, HGeomVector newV)
 Transformation from one coordinate system to a new one
     newV = eulrot * (oldV - eulvec)

HGeomVector findProjMetaPoint(HMdcHit* pHitA, HGeomRotation rotM, HGeomVector traM)
 Find the projection point of a Hit on META plane
 Uses a Hit to project on the META plane
 defined by rotM and traM

 Two methods are defined. One suposes target at fTargetPos
 (fUseTarget =kTRUE) and the other uses the hit slopes.

HGeomVector findProjMetaPoint(HMdcHit* pHitA, HMdcHit* pHitB, HGeomRotation rot, HGeomVector tra, HGeomRotation rotM, HGeomVector traM)
 Find the projection point of a Hit pair on META plane

 Given a relative rotation and translation from MDC A to MDC B
 (see CONVENTION in HMdcMetaAligner::setGeomAuxPar())
  X(B) = rot X(A) + tra
 this function obtains the MDC A coordinates in
 MDC B coordinate system using rot and tra.
 Then uses both Hits to project on the META plane
 defined by rotM and traM

HGeomVector findProjPoint(HMdcHit* pHit, HGeomRotation rot, HGeomVector tra, Float_t* slopes)
 Find the projection point of a Hit on another MDC

 Given a relative rotation and translation from MDC A to MDC B
 (see CONVENTION in HMdcMetaAligner::setGeomAuxPar())
  X(B) = rot X(A) + tra
 this function obtains the projection in MDC B of a Hit in MDC A

 When the user wants to obtain the projection in MDC A of a Hit in
 MDC B, should provide the inverse transformations
 Example: X(A) = rot-1 * X(B) - rot-1 * tra
               = newrot * X(B) + newtra
 where:
    newrot = rot-1
    newtra = - (rot-1 * tra)
 The function returns also the slopes in the new coordinate system
Int_t isInsideMetaWindow(Int_t sector, HTofHit* pHitT, HGeomVector proj, HGeomVector* vec)
Check if the TOF hit is inside a window around proj  point
If it is, include in vec
montones de parametros que deberian estar en contenedores estan a mano!
Int_t isInsideMetaWindow(Int_t sector, HShowerHit* pHitS, HGeomVector proj, HGeomVector* vec)
Check if the SHOWER hit is inside a window around proj  point
If it is, include in vec
SHOWER
getting info from the address
Bool_t isInsideWindow(Int_t plot, HMdcHit* pHit, HGeomVector point, Float_t* slope)
Check if the hit is inside a window around point and slope

old check. Implement new one PLEASE!
New one base on equiprobability elipse (Beatriz paper)
HMdcHit* mergeHits(HMdcHit* hitB, HMdcHit* hitA, HGeomRotation rot, HGeomVector tra)
 Propagates hitA in hitB coordinate system and merges
 the information in a new hit in hitB coordinate system
 The rot and tra verifies the CONVENTION
 (see HMdcMetaAligner::setGeomAuxPar()), that is:
     X(B) = rot X(A) + tra
 Normally B is reference MDC, which is farther from target
HMdcHit* pHit = new HMdcHit();
Now, only mean values. Later, propagate the covariance and add the
multiple scattering effect on hitA

      pHit->setX(,);
      pHit->setY(,);
      pHit->setXDir(,);
      pHit->setYDir(,);

      return pHit;

Only for test purposes, return hitB
Float_t* transformToSlopes(HMdcHit* pHit)
Transform hit angular components in slopes

Bool_t finalize(void)
 Statistical information and Minimization procedure

void fillMetaHistograms(Int_t Mindex, Int_t select = 0)
 Performs the graphical output from obtained parameters

void fillHistograms(Int_t index, Int_t select = 0)
 Performs the graphical output from obtained parameters

void storeInFile(void)
 Stores all histos and tree in the Root file

void fillMetaRotMatrix(Int_t ind, Float_t prim, Float_t segu, Float_t terc)
 Fill a matrix using the Euler angles of the relative transformation

OLD
      fRotMat[0][0]=(cos(prim) * cos(segu) * cos(terc)) - (sin(prim) * sin(terc));
      fRotMat[1][0]=( - cos(prim) * cos(segu) * sin(terc)) - (sin(prim) * cos(terc));
      fRotMat[2][0]=(cos(prim) * sin(segu));
      fRotMat[0][1]=(sin(prim) * cos(segu) * cos(terc)) + (cos(prim) * sin(terc));
      fRotMat[1][1]=( - sin(prim) * cos(segu) * sin(terc)) + (cos(prim) * cos(terc));
      fRotMat[2][1]=(sin(prim) * sin(segu));
      fRotMat[0][2]=( - sin(segu) * cos(terc));
      fRotMat[1][2]=(sin(segu) * sin(terc));
      fRotMat[2][2]=(cos(segu));

ATT! Correspondencia entre HGeomRotation y la antigua transf. arriba

  rot(0) rot(1) rot(2)     fRotMat[0][0] fRotMat[1][0] fRotMat[2][0]
  rot(3) rot(4) rot(5)  =  fRotMat[0][1] fRotMat[1][1] fRotMat[2][1]
  rot(6) rot(7) rot(8)     fRotMat[0][2] fRotMat[1][2] fRotMat[2][2]
void fillMetaTranslation(Int_t ind, Float_t x, Float_t y, Float_t z)
 Translation from META to MDC

TOF Unique CS (all modules refer to [fUniqueTofDet])
void fillRotMatrix(Int_t ind, Float_t prim, Float_t segu, Float_t terc)
 Fill a matrix using the Euler angles of the relative transformation

OLD
      fRotMat[0][0]=(cos(prim) * cos(segu) * cos(terc)) - (sin(prim) * sin(terc));
      fRotMat[1][0]=( - cos(prim) * cos(segu) * sin(terc)) - (sin(prim) * cos(terc));
      fRotMat[2][0]=(cos(prim) * sin(segu));
      fRotMat[0][1]=(sin(prim) * cos(segu) * cos(terc)) + (cos(prim) * sin(terc));
      fRotMat[1][1]=( - sin(prim) * cos(segu) * sin(terc)) + (cos(prim) * cos(terc));
      fRotMat[2][1]=(sin(prim) * sin(segu));
      fRotMat[0][2]=( - sin(segu) * cos(terc));
      fRotMat[1][2]=(sin(segu) * sin(terc));
      fRotMat[2][2]=(cos(segu));

ATT! Correspondencia entre HGeomRotation y la antigua transf. arriba

  rot(0) rot(1) rot(2)     fRotMat[0][0] fRotMat[1][0] fRotMat[2][0]
  rot(3) rot(4) rot(5)  =  fRotMat[0][1] fRotMat[1][1] fRotMat[2][1]
  rot(6) rot(7) rot(8)     fRotMat[0][2] fRotMat[1][2] fRotMat[2][2]
void fillTranslation(Int_t ind, Float_t x, Float_t y, Float_t z)
 Translation from MDC A to MDC B

void setMetaEulerAngles(Int_t ind, Float_t f, Float_t s, Float_t t)
 Euler angles in transformation MDC B - META

void setEulerAngles(Int_t ind, Float_t f, Float_t s, Float_t t)
 Euler angles in transformation from MDC A to MDC B

void setSearchLimits(Float_t x, Float_t y)
 Limits of the square defined in the search procedure

void setIterCriteria(Float_t criteria)
 Set the criteria for iteration in the minimization (see finalize())

void setWeights(Float_t w0, Float_t w1, Float_t w2, Float_t w3)
 Set the weights in the fcn()

void setSteps(Float_t s0, Float_t s1, Float_t s2, Float_t s3, Float_t s4, Float_t s5)
 Set the steps in the minimization

void setLimits(Float_t l0, Float_t l1, Float_t l2, Float_t l3, Float_t l4, Float_t l5)
 Set the criteria for iteration in the minimization (see finalize())

HGeomVector translationFinder(Int_t module)
 Analytical minimization of the function
 X and Y residuals
 Results are the relative translation
 vector components
 (WARNING: Use it here just with one MDC and target)

 Matrix:

    a 0 c      translation[0]     f
    0 b d   *  translation[1]  =  g
    c d e      translation[2]     h

 results in

 translation[0] = (fbe+gdc-bch-fdd)/(abe-bcc-add)
 translation[1] = (age+fdc-gcc-dha)/(abe-bcc-add)
 translation[2] = (abh-fbc-gda)/(abe-bcc-add)

HGeomVector transUniqueFinder(void)
 Analytical minimization of the function
 X and Y residuals fot Unique Reference System in TOF
 Results are the relative translation
 vector components for Reference TOF System
 (WARNING: Use it here just with one MDC and target)

 Matrix:

    a b c      translation[0]     j
    b e f   *  translation[1]  =  k
    c f i      translation[2]     l

 results in

 translation[0] = (jei+bfl+kfc-cel-bki-ffj)/(aei+2fcb-cce-bbi-ffa)
 translation[1] = (aki+jfc+cbl-cck-jbi-lfa)/(aei+2fcb-cce-bbi-ffa)
 translation[2] = (ael+bkc+fbj-jec-bbl-kfa)/(aei+2fcb-cce-bbi-ffa)

void minfit(Int_t fix, HGeomVector fE, HGeomVector fT)
 Minuit menu
 Put first argument to 1 to fix angular values
 Put first argument to 2 to fix translation values
 Other arguments are init values for the parameters!

void setModstoAlign(Int_t sector, Int_t modA, Int_t modB)
{;}
HMdcMetaHit* getHits(void)
{return fHits;}
Float_t* getWeights(void)
{return fWeights;}
Int_t getNumMods(void)
{return fNumMods;}
HGeomRotation getRotMatrix(void)
{return fRotMat[0];}
HGeomVector getTranslation(void)
{return fTranslation[0];}
Int_t getDetector(void)
{return fDetector;}
Bool_t getUseUnitErrors(void)
{return fUseUnitErrors;}
Int_t getRelParams(HGeomVector*& ang, HGeomVector*& tra, HGeomVector*& ang2, HGeomVector*& tra2, HGeomVector*& ang3, HGeomVector*& tra3)

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

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.