ROOT logo
HYDRA - THE HADES ANALYSIS PACKAGE » (UNKNOWN) » HKalInput

class HKalInput: public TObject

_HADES_CLASS_DESCRIPTION

    HKalInput is a helper class to fill a TObjArray of hits in sector
    coordinate system to be used in the Kalman filter. Input can be provided
    from HMdcTrkCand (real tracking) or HMdcTrkCandIdeal (ideal tracking from
    from GEANT hit points). It will fill 4 (2x2) hits from inner/outer segment.
    Errors for real tracking are taken from HMdcSeg, for ideal tracking 200/100 mu
    in x/y. The errors can be scaled by a factor. The geometrical transformations
    are performed via HMdcSizesCells, thus the container has to initialized
    before usage.


    HOWTO use the HKalMdcInput class::
    before Event loop:

    // assume Spectrometer setup + Hades creation is performed ....

    HKalDetCradle *pCradleHades = new HKalDetCradle();
    HKalMdcInput *input = new HKalMdcInput(refID, pCradleHades);   // fill the input hits
    input->setPrint(0);                       // debug print (off == 0)

    TObjArray allhits;                        // array of hits to be fed into kalman
    Int_t measDim = 2;                        // dimension of hit vector (default = 2)
    Double_t scaleErr = 1.;                   // scaling factor for errors (default = 1.)

    Inside eventloop:

        //-----------------------------------------------------------------------
        // Run Kalman filter on hits.
        Int_t nrHits = 0;
        input->resetIterMdcTrkCand();
	  	  while( (nrHits = input->nextMdcTrackCand(allhits, measDim, scaleErr)) )
        {
	       // ..... kalman

	      }


Function Members (Methods)

public:
HKalInput()
HKalInput(HKalDetCradle* detCradle)
HKalInput(const HKalInput&)
virtual~HKalInput()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static voidcalcSegPoints(const HMdcSeg* seg, Double_t& x1, Double_t& y1, Double_t& z1, Double_t& x2, Double_t& y2, Double_t& z2)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual voidclearCategories()
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) 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 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
virtual voidgetCategories()
virtual const HKalDetCradle*getDetectorCradle() const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual HGeantKine*getGeantKine(const HMdcTrkCand* cand)
virtual HGeantKine*getGeantKine(const HMdcTrkCandIdeal* cand)
virtual voidgetGeantMdcRawpoints(TObjArray& allhits, HGeantKine* kine, Bool_t midplane)
virtual HMdcTrackGFieldPar*getGFieldPar()
virtual const char*TObject::GetIconName() const
virtual HMagnetPar*getMagnetPar()
virtual voidgetMdcSegs(const HMdcTrkCand* cand, HMdcSeg** segs)
virtual voidgetMdcSegs(const HMdcTrkCandIdeal* cand, HMdcSegIdeal** segs)
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 voidgetPosAndDir(TVector3& pos, TVector3& dir, HGeantMdc* geantMdc, Bool_t sectorCoord)
virtual HMdcSizesCells*getSizesCells()
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 Bool_tinit(Int_t refID)
virtual Bool_tinitBField(Int_t refID)
virtual Bool_tinitSizesCells(Int_t refID)
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 HMdcTrkCand*nextMdcTrackCand(TObjArray& allhits, Int_t measDim = 2, Double_t scaleErr = 1.)
virtual HMdcTrkCand*nextWireTrack(TObjArray& allhits, Int_t minLayInSeg = 5, Int_t minLayOutSeg = 5)
virtual HMdcTrkCand*nextWireTrackNoComp(TObjArray& allhits, Int_t minLayInSeg = 5, Int_t minLayOutSeg = 5)
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)
HKalInput&operator=(const HKalInput&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidresetIterKine()
virtual voidresetIterMdcTrkCand()
virtual voidresetIterMdcTrkCandIdeal()
virtual voidresetIterMetaMatch()
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidsetDetectorCradle(HKalDetCradle* detCradle)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidsetPrint(Bool_t print)
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
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:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()

Data Members

private:
Bool_tbPrint! Debug prints.
HMdcSizesCells*fSizesCells!
HCategory*geantMdcCat!
HIterator*iterKine!
HIterator*iterMdcTrkCand!
HIterator*iterMdcTrkCandIdeal!
HIterator*iterMetaMatch!
HCategory*kineCat!
HCategory*mdcCal1Cat!
HMdcGetContainers*mdcGetContainers!
HCategory*mdcHitCat!
HCategory*mdcHitIdealCat!
HCategory*mdcSegCat!
HCategory*mdcSegIdealCat!
HCategory*mdcTrkCandCat!
HCategory*mdcTrkCandIdealCat!
HCategory*metaMatchCat!
HKalDetCradle*pCradleHades! Pointer to detector cradle.
HMdcTrackGFieldPar*pField!
HMagnetPar*pMagnet!

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

HKalInput()
 It is recommended to use the constructor
 HKalInput(Int_t refID, HKalDetCradle *detCradle)
 instead where the object will be initialized correctly.
 This empty constructor sets all pointers to NULL. To use the object
 the following still has to be done afterwards:
 Do spectrometer setup + Hades creation ....
 To set the pointer to detector cradle:
 setDetectorCradle(detCradle)  // set pointer to detector cradle
 To get pointer to categories, HMdcSizesCells, magnet and B-field
 parameters:
 init(refID)                   // gets categories
HKalInput(HKalDetCradle* detCradle)
 Assumes spectrometer setup + Hades creation have been performed ....
 This constructor sets all needed class members.
 refID:     runtime ID
 detCradle: pointer to Hades detector cradle
~HKalInput()
void calcSegPoints(const HMdcSeg* seg, Double_t& x1, Double_t& y1, Double_t& z1, Double_t& x2, Double_t& y2, Double_t& z2)
 calculates 2 coordinate points from segment.
void clearCategories()
 Clear the categories (for macros in MakeCode style).
void getCategories()
 Retries the pointer to needed input categories. Creates
 iterators.
Bool_t init(Int_t refID)
Bool_t initBField(Int_t refID)
 Initialize HMdcTrackGFieldPar and HMagnetPar for run refID.
 If the container already exists it will not
 be created a second time.
Bool_t initSizesCells(Int_t refID)
 Initialize HMdcSizesCells for run refID.
 If the container already exists it will not
 be created a second time.
HMdcSizesCells* getSizesCells()
HMdcTrkCand* nextMdcTrackCand(TObjArray& allhits, Int_t measDim = 2, Double_t scaleErr = 1.)
 Fills 4 hits in sector coordinates system to allhits array.
 Loops over HMdcTrkCand Category for the next for hits. The
 iterator for the category has to be reset by hand at the begin
 of each event. Return 0 if no next candidate has been found.
 The errors of the hits will be taken from HMdcSeg and can be scaled
 by scaleErr.

 allhits: array with HKalMdcHit objects (return value. Existing content of array will be deleted.)
 measDim: dimension of measurement vector
 scaleErr: scale errX and errY by this factor
HMdcTrkCand* nextWireTrack(TObjArray& allhits, Int_t minLayInSeg = 5, Int_t minLayOutSeg = 5)
 Fills drift chamber wire hits with the drift time as measurement vector
 to allhits array.
 Loops over HMdcTrkCandIdeal Category for the next four hits. The
 iterator for the category has to be reset by hand at the begin
 of each event. Return 0 if no next candidate has been found.

 output:
 allhits: array with HKalMdcHit objects (Existing content of array will be deleted!)
 input:
 minLayInSeg:   minimum number of layers in the inner segment needed to fill allhits
 minLayOutSeg:  minimum number of layers in the outer segment needed
HMdcTrkCand* nextWireTrackNoComp(TObjArray& allhits, Int_t minLayInSeg = 5, Int_t minLayOutSeg = 5)
 Fills drift chamber wire hits with the drift time as measurement vector
 to allhits array.
 If there are two competing hits in an MDC layer, only the one with the
 smaller drift time will be used.
 Loops over HMdcTrkCandIdeal Category for the next four hits. The
 iterator for the category has to be reset by hand at the begin
 of each event. Return 0 if no next candidate has been found.

 output:
 allhits: array with HKalMdcHit objects (Existing content of array will be deleted!)
 input:
 minLayInSeg:   minimum number of layers in the inner segment needed to fill allhits
 minLayOutSeg:  minimum number of layers in the outer segment needed
HGeantKine* getGeantKine(const HMdcTrkCand* cand)
HGeantKine* getGeantKine(const HMdcTrkCandIdeal* cand)
void getGeantMdcRawpoints(TObjArray& allhits, HGeantKine* kine, Bool_t midplane)
 Return TObjArray with pointer to HGeantMdc objects for the track.
 if midplane == kTRUE  fill only points for layer == 6.
 if midplane == KFALSE fill only points for layer < 6.
void getPosAndDir(TVector3& pos, TVector3& dir, HGeantMdc* geantMdc, Bool_t sectorCoord)
 Return pos and dir from HGeantMdc.
 if sectorCoord == kTRUE the points will be transformed
 to sector coordinate system.
void getMdcSegs(const HMdcTrkCand* cand, HMdcSeg** segs)
void getMdcSegs(const HMdcTrkCandIdeal* cand, HMdcSegIdeal** segs)
HKalInput()
void resetIterKine()
{ if(iterKine) iterKine->Reset(); }
void resetIterMdcTrkCand()
void resetIterMdcTrkCandIdeal()
void resetIterMetaMatch()
HMdcTrackGFieldPar* getGFieldPar()
{ return pField; }
HMagnetPar* getMagnetPar()
{ return pMagnet; }
void setDetectorCradle(HKalDetCradle* detCradle)
{ pCradleHades = detCradle; }
const HKalDetCradle* getDetectorCradle() const
{ return pCradleHades ; }
void setPrint(Bool_t print)
{ bPrint = print; }