class HPidTrackSorter: public TNamed

_HADES_CLASS_DESCRIPTION



 HPidTrackSorter

 This Class loops over the HPidTRackCand category and
 analyze the objects. Purpose of the procedure is to categorize
 the objects in the case of multiple usage of the single detector
 hits (RICH, InnerMDC, OuterMDC, META) as Double_t hit and to provide
 a hint which of the candidates is the best with respect to certain
 criteria (described by the bit flags below). If a HPidTrackCand
 object has been marked before by an other task with HPidTrackCand::kIsUsed it
 will be ignored by the sort process and stay unchanged. For the description
 of the differnt set/get functions of the HPidTrackCand objects see the
 documentation.
 To use HPidTrackSorter without changing the flags of the HPidTrackCand objects
 (non persitent way inside a macro or reconstructor) one can call the
 backupFlags() function before and modification of the flags and
 restore the flags by calling restoreFlags() after the privat work has been
 done.

 For debugging purpose one cand set screen printouts to check the sorting
 (setDebug() + setPrintLevel(Int_t level)(level = 1-3)).

 The analysis of the HPidTrackCand objects is done in several steps:

 1. Create the HPidTrackSorter object and call the HPidTrackSorter::Init()
    To initialze the sorter object with category pointers etc ...
 2. The internal structures are filled per event from the HPidTrackCand
    category by calling the
    Int_t HPidTrackSorter::fill(Bool_t (*function)(HPidTrackCand* ))
    function which expects a function pointer to a function taking an
    HPidTrackCand pointer as argument and returning a Bool_t if the conditions on
    the HPidTrackCand object are fullfilled (like for example in
    Bool_t HPidTrackSorter::selectHadrons(HPidTrackCand* pcand). For objects
    failing the test the kIsRejected bit is set. The user can provide
    his own selection functions to replace the build in selectLeptons(.....)
    and selectHadrons(....) select functions.
    The function pointer can be a pointer to a global function or member function
    of an Object for example:

    Bool_t select(HPidTrackCand* cand){             // global function
             if ( put all selection criteria here ) return kTRUE;
             else                                   return kFALSE;
    } or

    static Bool_t dummy::select(HPidTrackCand* cand){ // member function of object dummy
                                                      // needs to be declared static !
             if ( put all selection criteria here ) return kTRUE;
             else                                   return kFALSE;
    }
    would be called in the code like

    dummy d;
    HPidTrackCand* p= new HPidTrackCand() // just to get an object
    HPidTrackSorter sorter;               // create the sorter object
    // now we have 3 possibilities to call the
    // test function
    1. sorter.fill(select)        // global function
    2. sorter.fill(dummy::select) // member function of object dummy (static call without object creation)
    3. sorter.fill(d.select)      // member function of real object dummy
 3. For all accepted objects the quality criteria and Double_t hit flags are
    evaluated in within the selected sample and flagged to the HPidTrackCand objects.
    The objects which fullfill the given minimum criteria the kIsAcceptedXXX bit is
    flagged. For the RICH, InnerMDC, OuterMDC and META the kIsDoubleHitXXX bit are set
    if the same detector hit index has been used more than once in the sample.
 4. With the call of
    Int_t HPidTrackSorter::selectBest(HPidTrackSorter::ESwitch byQuality, Int_t byParticle)
    the final selection on the objects is performed. The by the fill() procedure
    selected objects are sorted by the selected quality criteria. Starting from the
    best object one goes down the list and marks all objects with the kIsUsed and
    kIsBestXXX bit if they do not reuse an already used detector hit index
    (Double_t hit rejection).
    For leptons the kIsLepton bit is flagged in addition. Individual detector hits
    can be ignored in the selection procedure with the setIgnoreXXX(kTRUE) functions
    (by default all hits are taken into account).
    HPidTrackSorter::ESwitch byQuality can be used as quality criteria switch for

          kIsBestHitRich          (by number of pads)
          kIsBestHitInnerMdc      (by chi2, non fitted segments last)
	    kIsBestHitOuterMdc      (by chi2, non fitted segments last)
	    kIsBestHitMeta          (by metamatch quality)
          kIsBestRKMeta           (by RK metamatch quality)
          kIsBestRKRICH           (by RK RICH match quality)
          kIsBestRK               (by RK chi2, none fitted outer segments with lower priority)
          kIsBestSPLINE           (by chi2)
          kIsBestKICK             (by pull)
          kIsBestRKRKMETA         (by RK chi2 * RK META match quality)
          kIsBestRKRKRICH         (by RK chi2 * RK RICH match quality)
          kIsBestRKMETAQA         (by RK chi2 * META match quality)

 5. The scheme allows for multiple selection following each other as
    the already used objects are excluded from the next steps (for example first
    select leptons and in the second iteration hadrons). The detector hit indicies
    of the previous selection of kIsUsed marked objects are added to list of used
    indicies by default not allowing to use a detector hit twice. To skip that
    memory one can set setIgnorePreviousIndex(kTRUE).
 6. After the analysis call HPidTrackSorter::finalize(). After the selection
    the user has to take into account only HPidTrackCand objects which  have
    been flagged with kIsUsed. The objects slected by the Lepton selection will
    be marked in addition with kIsLepton to identify them easily.
 7. For lepton selections the internal selectLepton() function cand be manipulated.
    With setRICHMatching(HPidTrackSorter::EMatch ,Float_t window) the matching between
    inner MDC and RICH hit can be selected (default: HPidTrackSorter::kUseRKRICHWindow,4 degree ).

    A selection of unique lepton and hadron tracks could look like
    the following example :

 void myMacro(Int_t nEvents,TString inputDir, TString inFile)
 {
    Hades* myHades = new Hades;
    gHades->setQuietMode(2);

    HRootSource* source = new HRootSource();
    source->setDirectory(((Text_t *)inputDir.Data()));
    source->addFile((Text_t *)inFile.Data());

    myHades->setDataSource(source);

    if(!myHades->init()){
	cout<<"Hades Init() failed!"<<endl;
	exit(1);
    }


    //------------------------------------------------------------------------
    // get category ointers and iterators
    HCategory* pidCat  = (HCategory*)gHades->getCurrentEvent()->getCategory(catPidTrackCand);
    HIterator* iter    = NULL;
    if(pidCat)
    {
         iter = (HIterator *)pidCat->MakeIterator("native");
    } else {
        cout<<"Category Pointer is NULL!"<<endl;
	exit(1);
    }
    //------------------------------------------------------------------------


    //--------------------------CONFIGURATION---------------------------------------------------
    //At begin of the program (outside the event loop)
    HPidTrackSorter sorter;
    //sorter.setOutputFile("testpidcleaner.root");                  // for debug ntuple output
    //sorter.setDebug();                                            // for debug
    //sorter.setPrintLevel(3);                                      // max prints
    //sorter.setRICHMatching(HPidTrackSorter::kUseRKRICHWindow,4.); // select matching RICH-MDC for selectLeptons() function
    //sorter.setIgnoreInnerMDC();                                   // do not reject Double_t inner MDC hits
    //sorter.setIgnoreOuterMDC();                                   // do not reject Double_t outer MDC hits
    //sorter.setIgnoreMETA();                                       // do not reject Double_t META hits
    //sorter.setIgnorePreviousIndex();                              // do not reject indices from previous selctions
    sorter.init();                                                  // get catgegory pointers etc...



    //------------------------------------------------------------------------
    // Event loop
    for(Int_t i = 1;i < nEvents; i ++)
    {
        //----------break if last event is reached-------------
        if(!gHades->eventLoop(1)) break;

        //------------------------------------------------------------------------
        // run your selection and set all flags

        // if you do not want to modify the flags
        // for the following tasks etc (needs call of
        // restoreFlags() at the end of the eventloop)
        //sorter.backupFlags();

        sorter.resetFlags(kTRUE,kTRUE,kTRUE,kTRUE);     // reset all flags for flags (0-28) ,reject,used,lepton
        Int_t nCandLep     = sorter.fill(HPidTrackSorter::selectLeptons);   // fill only good leptons
        Int_t nCandLepBest = sorter.selectBest(HPidTrackSorter::kIsBestRKRKMETA,HPidTrackSorter::kIsLepton);
        Int_t nCandHad     = sorter.fill(HPidTrackSorter::selectHadrons);   // fill only good hadrons (already marked good leptons will be skipped)
        Int_t nCandHadBest = sorter.selectBest(HPidTrackSorter::kIsBestRKRKMETA,HPidTrackSorter::kIsHadron);
        //------------------------------------------------------------------------

        //------------------------------------------------------------------------
        // analylize marked tracks (kIsUsed) ....
    	  iter->Reset();
        HPidTrackCand* pcand;
        while((pcand = (HPidTrackCandSim*)iter->Next()) != NULL)
	  {
           // accept only objects marked as good
	     if(!pcand->isFlagBit(HPidTrackCand::kIsUsed) ) continue;

           // do other selection......
        }
        //------------------------------------------------------------------------

        // if you do not want to modify the flags
        // for the following tasks etc (needs call of
        // backupFlags() at the beginning of the eventloop)
        // sorter.restoreFlags();


        //------------------------------------------------------------------------
        // celan vectors and index arrays
        sorter.cleanUp();
        //------------------------------------------------------------------------
    }
    //------------------------------------------------------------------------
    //At the end of program
    sorter.finalize();
 }

Function Members (Methods)

public:
HPidTrackSorter()
HPidTrackSorter(const HPidTrackSorter&)
HPidTrackSorter(TString name, TString title)
virtual~HPidTrackSorter()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
voidbackupFlags()
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
voidcleanUp(Bool_t final = kTRUE)
virtual voidTNamed::Clear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
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 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
Int_tfill(Bool_t (*)(HPidTrackCand*) function)
virtual voidTNamed::FillBuffer(char*& buffer)
voidfillNtuple()
Bool_tfinalize()
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
virtual const char*TNamed::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*TNamed::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
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
Bool_tinit()
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_tTNamed::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
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)
HPidTrackSorter&operator=(const HPidTrackSorter&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTNamed::Print(Option_t* option = "") const
voidprintEvent(TString comment)
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
voidresetFlags(Bool_t flag = kTRUE, Bool_t reject = kTRUE, Bool_t used = kTRUE, Bool_t lepton = kTRUE)
Bool_trestoreFlags()
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
Int_tselectBest(HPidTrackSorter::ESwitch byQuality, Int_t byParticle)
static Bool_tselectHadrons(HPidTrackCand* pcand = 0)
static Bool_tselectLeptons(HPidTrackCand* pcand = 0)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
static voidsetDebug(Bool_t debug = kTRUE)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
static voidsetIgnoreInnerMDC(Bool_t ignore = kTRUE)
static voidsetIgnoreMETA(Bool_t ignore = kTRUE)
static voidsetIgnoreOuterMDC(Bool_t ignore = kTRUE)
static voidsetIgnorePreviousIndex(Bool_t ignore = kTRUE)
static voidsetIgnoreRICH(Bool_t ignore = kTRUE)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
voidsetOutputFile(TString filename = "")
static voidsetPrintLevel(Int_t level)
static voidsetRICHMatching(HPidTrackSorter::ERichMatch match, Float_t window = 4.)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual Int_tTNamed::Sizeof() const
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
protected:
voidclear()
Int_tclearVector(vector<candidate*>&)
static Bool_tcmpIndex(HPidTrackSorter::candidate*, HPidTrackSorter::candidate*)
static Bool_tcmpQuality(HPidTrackSorter::candidate*, HPidTrackSorter::candidate*)
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
Int_tfillAndSetFlags()
Int_tfillInput(vector<candidate*>&)
Int_tflagAccepted(vector<candidate*>&, HPidTrackSorter::ESwitch)
Int_tflagDouble(vector<candidate*>&, HPidTrackSorter::ESwitch)
voidTObject::MakeZombie()
voidprintCand(HPidTrackSorter::candidate*, Int_t, TString spacer = " ")
Bool_trejectIndex(HPidTrackSorter::candidate*, HPidTrackSorter::ESwitch, Int_t&)
Bool_trejectQuality(HPidTrackSorter::candidate*, HPidTrackSorter::ESwitch)
voidselection(Bool_t (*)(HPidTrackCand*) function)
Int_tsetFlagsDouble(vector<candidate*>&, HPidTrackSorter::ESwitch)

Data Members

public:
enum ERichMatch { kUseRICHIndex
kUseRKRICHCorrelation
kUseRKRICHWindow
};
enum ESelect { kIsLepton
kIsHadron
};
enum ESwitch { kIsIndexRICH
kIsIndexInnerMDC
kIsIndexOuterMDC
kIsIndexTOF
kIsIndexSHOWER
kIsIndexRPC
kIsIndexMETA
kIsBestHitRICH
kIsBestHitInnerMDC
kIsBestHitOuterMDC
kIsBestHitMETA
kIsBestRKMETA
kIsBestRKRICH
kIsBestRK
kIsBestSPLINE
kIsBestKICK
kIsBestRKRKMETA
kIsBestRKRKRICH
kIsBestRKMETAQA
};
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
protected:
vector<candidate*>all_candidates!
Int_tcurrentEvent! find new event
TStringTNamed::fNameobject identifier
static Float_tfRICHMDCWindow! matching window RICH/MDC in phi/theta (symmetric, degree)
Float_tfRICHMDCWindowBackup! matching window RICH/MDC in phi/theta (symmetric, degree)
TStringTNamed::fTitleobject title
Int_tfill_Iteration! remember the number of fill() calls
TFile*fout!
vector<Int_t>index_InnerMDC!
vector<Int_t>index_OuterMDC!
vector<Int_t>index_RICH!
vector<Int_t>index_RPC!
vector<Int_t>index_SHOWER!
vector<Int_t>index_TOF!
Bool_tisSimulation!
HIterator*iterPidTrackCandCat! iterator on HPidTrackCand
static Bool_tkDebug
static Bool_tkIgnoreInnerMDC! switch to ignore InnerMDC hits for Double_t hit counting
Bool_tkIgnoreInnerMDCBackup! switch to ignore InnerMDC hits for Double_t hit counting
static Bool_tkIgnoreMETA! switch to ignore META hits for Double_t hit counting
Bool_tkIgnoreMETABackup! switch to ignore META hits for Double_t hit counting
static Bool_tkIgnoreOuterMDC! switch to ignore OuterMDC hits for Double_t hit counting
Bool_tkIgnoreOuterMDCBackup! switch to ignore OuterMDC hits for Double_t hit counting
static Bool_tkIgnorePreviousIndex! switch to ignore indices from previoius marked ued objects
Bool_tkIgnorePreviousIndexBackup! switch to ignore indices from previoius marked ued objects
static Bool_tkIgnoreRICH! switch to ignore RICH hits for Double_t hit counting
Bool_tkIgnoreRICHBackup! switch to ignore RICH hits for Double_t hit counting
static Int_tkSwitchIndex! switch to select sort by index
static Int_tkSwitchParticle! switch to select leptons/hadrons
static Int_tkSwitchQuality! switch to select sort by quality algorithms
static Int_tkSwitchRICHMatching! switch to select RICH/MDC matching in lepton selection
Int_tkSwitchRICHMatchingBackup! switch to select RICH/MDC matching in lepton selection
TString*nameIndex!
TString*nameQuality!
TNtuple*nt!
vector<Int_t>old_flags! remember the old flags of HPidTrackCand for restoring
HCategory*pPidTrackCandCat! HPidTrackCand category
static Int_tprintLevel! higher -> more prints (1,2,3)
Int_tselectBest_Iteration! remember the number of selectBest() calls

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

HPidTrackSorter(const HPidTrackSorter& )
HPidTrackSorter(TString name, TString title)
~HPidTrackSorter(void)
void clear()
 initialize the member variables
Bool_t init(void)
 get the pointer to the HPidTrackCand categegory and create the
 corresponding iterator.
Bool_t finalize(void)
 clean up the memory and
 write ntuple to file (if it exist)
Int_t clearVector(vector<candidate*>& )
 delete all candidate structs in vector
 from heap and call the clear function of
 vector afterwards.
Bool_t cmpIndex(HPidTrackSorter::candidate* , HPidTrackSorter::candidate* )
 sorts the candidate list ascending by the index
 of the detector hit of interest.
Bool_t cmpQuality(HPidTrackSorter::candidate* , HPidTrackSorter::candidate* )
 sorts the candidate list by the quality critera
 of interest (ascending or decending depending on
 the quantity). The best object is always the first.
Bool_t rejectIndex(HPidTrackSorter::candidate* , HPidTrackSorter::ESwitch , Int_t& )
 if function return kTRUE the Object will be rejected
 rejects candidates from the actual list, where the
 detector hit of interest is not defined.
Bool_t rejectQuality(HPidTrackSorter::candidate* , HPidTrackSorter::ESwitch )
 if function return kTRUE the Object will be rejected
 rejects the candidates from the actual list if the quality
 of interest does not match the mimnum requirement.
Int_t flagAccepted(vector<candidate*>& , HPidTrackSorter::ESwitch )
 flag all candidates which does satisfy the quality
 criteria from input with kIsAcceptedXXX bit. If kDebug
 is set and printLevel >=2 the statistics for the accepted
 objects is printed.
Int_t flagDouble(vector<candidate*>& , HPidTrackSorter::ESwitch )
 sort vector in ascending order by the particular index byindex. Loops
 over the vector and extract objects with same detetector index and marks them
 as Double_t hits in HPidTrackCand (kIsDoubleHitXXX bit). Non valid detecor
 hits (index -1) are not taken into account. If kDebug
 is set and printLevel >=2 the statistics for the accepted
 objects is printed.
Int_t setFlagsDouble(vector<candidate*>& , HPidTrackSorter::ESwitch )
 flag the HPidTrackCand objects with the rank of the Double_t hit criteria as output
 form the sorting algorithms. Expects as input a vector of candidates with the
 same hit index.
Int_t fillInput(vector<candidate*>& )
 loop over HPidTrackCand category and fill a vector of temporary objects
 which will be used for sorting and flagging of the objects in the end.
 The candidate objects are initialzied with values of interest in a well
 defined way, which makes the sorting and rejecting of objects later on easier.
void printCand(HPidTrackSorter::candidate* , Int_t , TString spacer = " ")
 print one candidate object and the flags which have been
 already set to HPidTrackCand
void printEvent(TString comment)
void setOutputFile(TString filename = "")
 create output root file filename if filename not empty,
 otherwise pidtrackcleaner.root in local directory
 exit the program if file cannot be created.
void fillNtuple()
 fill debugging ntuple
void resetFlags(Bool_t flag = kTRUE, Bool_t reject = kTRUE, Bool_t used = kTRUE, Bool_t lepton = kTRUE)
 reset all flags of HPidTrackCand by looping over the
 HPidTrackCand category. The flags kIsRejected, kIsUsed
 and kIsLepton are special for selection and handles independend
 from the other flags. The lower flags of objects marked
 with kIsUsed cand be only reste if used == kRTUE.
void selection(Bool_t (*)(HPidTrackCand*) function)
 loops over the HPidTrackCand category and marks all objects
 which does not fullfill the selection criteria with the reject flag.
 Objects marked as kIsUsed are skipped.
void cleanUp(Bool_t final = kTRUE)
 delete temporary candidate objects from
 heap and clear the candidate vector. clear
 all index vectors.
Int_t fillAndSetFlags()
 clean up the memory and index vectors and fill the
 candidate vector new. Flag the kIsAcceptedXXX criteria
 and kIsDoubleHitXXX criteria of the HPidTrackCand objects of
 the selection (skipp objects which are marked kIsUsed and
 kIsRejected) returns the number of candidates.
void backupFlags()
 backup the flags of HPidTrackCand objects. The flags cand be
 restored to the objects by calling restoreFlags. The flags
 which have been stored previously will be cleared.
Bool_t restoreFlags()
 restore the flags of HPidTrackCand objects since the last call of
 backupFlags(). Returns kFALSE if size of vector old_flags does
 not match the number of objects in HPidTrackCand category
Int_t fill(Bool_t (*)(HPidTrackCand*) function)
 fill the input candidate vector. The kIsRejected flag and
 lower flags (below kIsLepton) is reseted for all objects
 not marked as kIsUsed. The filling is done twice once for
 all objects and second after the application of the user
 provide test function. Returns the number of candidates after
 the selection. If kDebug is set and printLevel >= 1 the number
 of candidates before and after selection will be printed.
Int_t selectBest(HPidTrackSorter::ESwitch byQuality, Int_t byParticle)
 perfomes the selection of the best tracks (with respect to the chosen quality
 criteria), which makes shure, that each detector hit is used only once. If
 In case Int_t byParticle == kIsLepton the RICH index
 is taken into account, otherwise not. For leptons the kIsLepton bit is flagged
 in addition. Individual detector hits can be ignored in the selection procedure with
 the setIgnoreXXX(kTRUE) functions (by default all hits are taken into account).
 Returns the number of selected best HPidTrackCand objects.
 if kDebug is set and  printLevel >= 1 the number of sected objects and
 the statistics of the rejection on Double_t hits i the snhgle detectors is printed.
 if printLevel >=3 the properties of the candidates (accepted and rejected) are
 printed.
void setRICHMatching(HPidTrackSorter::ERichMatch match, Float_t window = 4.)
 switch between the matching cut RICH-MDC inside the selectLeptons() function. The method
 is selected by the options defined in HPidTrackSorter::ERichMatch.
Bool_t selectLeptons(HPidTrackCand* pcand = 0)
 build in selection function for lepton candidates.
 Requires besides an RICH hit, RK + META and fitted innerMDC
 segment. The RICH-MDC matching cut depends on the
 settings of the matching method and window (set by
 HPidTrackSorter::setRICHMatching . default is
 kUseRKRICHWindow, window = 4. degree)
Bool_t selectHadrons(HPidTrackCand* pcand = 0)
 build in selection function for hadron candidates.
 Requires besides RK + META and fitted innerMDC.
HPidTrackSorter(const HPidTrackSorter& )
void setDebug(Bool_t debug = kTRUE)
 setup selections
{ kDebug = debug;}
void setIgnoreRICH(Bool_t ignore = kTRUE)
{ kIgnoreRICH = ignore;}
void setIgnoreInnerMDC(Bool_t ignore = kTRUE)
{ kIgnoreInnerMDC = ignore;}
void setIgnoreOuterMDC(Bool_t ignore = kTRUE)
{ kIgnoreOuterMDC = ignore;}
void setIgnoreMETA(Bool_t ignore = kTRUE)
{ kIgnoreMETA = ignore;}
void setIgnorePreviousIndex(Bool_t ignore = kTRUE)
{ kIgnorePreviousIndex = ignore;}
void setPrintLevel(Int_t level)
{ printLevel = level;}

Author: Jochen Markert 18.07.2007
Last change: Sat May 22 13:07:38 2010
Last generated: 2010-05-22 13:07

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.