// ------------------------------------------------------------------------- // ----- PndRhoFitProbPresorter header file ----- // ------------------------------------------------------------------------- #ifndef PNDRHOFITPROBPRESORTER_H_ #define PNDRHOFITPROBPRESORTER_H_ #include #include "RhoCandList.h" #include "PndKinFitter.h" #include "PndKinVtxFitter.h" class PndRhoFitProbPresorter { public: /** Default constructor **/ PndRhoFitProbPresorter(RhoCandList * particleList, float m0); /** Destructor **/ virtual ~PndRhoFitProbPresorter(); /** Set the limits for probability good/bad criterion **/ void SetVtxProbLimit(float limit) { fVtxProbLimit = limit; }; void SetMassProbLimit(float limit) { fMassProbLimit = limit; }; /** Generate the probability values for the vertex and mass fitter **/ void GenerateIndices(); /** Return best fit index for the fit results **/ int GetVtxBestFitIndex(int id); int GetMassBestFitIndex(int id); /** Return probability index for the fit results **/ int GetVtxProbIndex(int id); int GetVtxProbIndexUID(int uid) { return GetVtxProbIndex(fUidToCandId[uid]); }; int GetMassProbIndex(int id); int GetMassProbIndexUID(int uid) { return GetMassProbIndex(fUidToCandId[uid]); }; /** Return the best fit probability **/ float GetVtxBestProb() { return fvtx_bestFitProb; }; float GetMassBestProb() { return fmass_bestFitProb; }; /** Return ratio to best probability value **/ float GetVtxRatioToBestProb(int id); float GetMassRatioToBestProb(int id); float GetVtxRatioToBestProbUID(int uid) { return GetVtxRatioToBestProb(fUidToCandId[uid]); }; float GetMassRatioToBestProbUID(int uid) { return GetMassRatioToBestProb(fUidToCandId[uid]); }; float GetVtxRatio2ndToBestProb(); float GetMassRatio2ndToBestProb(); /** Accessor functions to the fit objects **/ PndKinVtxFitter* GetVtxFit(int id); PndKinFitter* GetMassFit(int id); private: // functions /** fill the sorted maps for chi2/probabilities **/ void _FillSortedMaps(); /** generate indices based on sorted maps **/ void _GenerateVtxFitIndices(); void _GenerateMassFitIndices(); /** candidates of combined particles **/ RhoCandList * fCandList; /** loopup table for UID to candidate number **/ std::map fUidToCandId; /** m0 of combined particles **/ float fm0; /** limits for the probability **/ float fVtxProbLimit, fMassProbLimit; /** map of fitter entries **/ std::map fVtxFit; std::map fMassFit; /** the maps to sort the chi2/prob **/ std::map fvtx_chi2ForIndex_good, fvtx_chi2ForIndex_bad, fvtx_probForIndex; std::map fmass_chi2ForIndex_good, fmass_chi2ForIndex_bad, fmass_probForIndex; /** the index maps giving the rank of chi2/prob for the fit **/ std::map fvtx_indexOfBestFit, fvtx_indexOfFitProb; std::map fmass_indexOfBestFit, fmass_indexOfFitProb; /** the best probability values of all candidates **/ float fvtx_bestFitProb, fmass_bestFitProb; float fvtx_2ndBestFitProb, fmass_2ndBestFitProb; }; #endif /* PNDRHOFITPROBPRESORTER_H_ */