#ifndef _DMCThrownMatching_ #define _DMCThrownMatching_ #include #include #include "JANA/JObject.h" #include "TRACKING/DMCThrown.h" #include "PID/DChargedTrackHypothesis.h" #include "PID/DChargedTrack.h" #include "PID/DNeutralParticleHypothesis.h" #include "PID/DNeutralParticle.h" #include "PID/DNeutralShower.h" #include "TOF/DTOFPoint.h" #include "TOF/DTOFTruth.h" #include "BCAL/DBCALShower.h" #include "BCAL/DBCALTruthShower.h" #include "FCAL/DFCALShower.h" #include "FCAL/DFCALTruthShower.h" using namespace std; using namespace jana; class DMCThrownMatching : public JObject { //uses measured tracks for matching, not kinfit ones public: JOBJECT_PUBLIC(DMCThrownMatching); //GETTERS: INDIVIDUAL PARTICLES //the below two functions return the hypothesis with PID = MC PID. if not available, returns one with best PID FOM const DChargedTrackHypothesis* Get_MatchingChargedHypothesis(const DMCThrown* locInputMCThrown, double& locMatchFOM) const; const DNeutralParticleHypothesis* Get_MatchingNeutralHypothesis(const DMCThrown* locInputMCThrown, double& locMatchFOM) const; bool Get_MatchingChargedHypotheses(const DMCThrown* locInputMCThrown, deque& locMatchingChargedHypotheses, double& locMatchFOM) const; const DChargedTrack* Get_MatchingChargedTrack(const DMCThrown* locInputMCThrown, double& locMatchFOM) const; bool Get_MatchingNeutralHypotheses(const DMCThrown* locInputMCThrown, deque& locMatchingNeutralHypotheses, double& locMatchFOM) const; const DNeutralParticle* Get_MatchingNeutralParticle(const DMCThrown* locInputMCThrown, double& locMatchFOM) const; const DMCThrown* Get_MatchingMCThrown(const DChargedTrackHypothesis* locChargedTrackHypothesis, double& locMatchFOM) const; const DMCThrown* Get_MatchingMCThrown(const DChargedTrack* locChargedTrack, double& locMatchFOM) const; const DMCThrown* Get_MatchingMCThrown(const DNeutralParticleHypothesis* locNeutralParticleHypothesis, double& locMatchFOM) const; const DMCThrown* Get_MatchingMCThrown(const DNeutralParticle* locNeutralParticle, double& locMatchFOM) const; //GETTERS: INDIVIDUAL HITS const DTOFPoint* Get_MatchingTOFPoint(const DTOFTruth* locTOFTruth, double& locMatchFOM) const; const DTOFTruth* Get_MatchingTOFTruth(const DTOFPoint* locTOFPoint, double& locMatchFOM) const; const DBCALShower* Get_MatchingBCALShower(const DBCALTruthShower* locBCALTruthShower, double& locMatchFOM) const; const DBCALTruthShower* Get_MatchingBCALTruthShower(const DBCALShower* locBCALShower, double& locMatchFOM) const; const DFCALShower* Get_MatchingFCALShower(const DFCALTruthShower* locFCALTruthShower, double& locMatchFOM) const; const DFCALTruthShower* Get_MatchingFCALTruthShower(const DFCALShower* locFCALShower, double& locMatchFOM) const; //GETTERS: WHOLE MAPS inline void Get_ChargedHypoToThrownMap(map >& locChargedHypoToThrownMap) const{locChargedHypoToThrownMap = dChargedHypoToThrownMap;} inline void Get_ThrownToChargedHypoMap(map, double> >& locThrownToChargedHypoMap) const{locThrownToChargedHypoMap = dThrownToChargedHypoMap;} inline void Get_ChargedToThrownMap(map >& locChargedToThrownMap) const{locChargedToThrownMap = dChargedToThrownMap;} inline void Get_ThrownToChargedMap(map >& locThrownToChargedMap) const{locThrownToChargedMap = dThrownToChargedMap;} inline void Get_NeutralHypoToThrownMap(map >& locNeutralHypoToThrownMap) const{locNeutralHypoToThrownMap = dNeutralHypoToThrownMap;} inline void Get_ThrownToNeutralHypoMap(map, double> >& locThrownToNeutralHypoMap) const{locThrownToNeutralHypoMap = dThrownToNeutralHypoMap;} inline void Get_NeutralToThrownMap(map >& locNeutralToThrownMap) const{locNeutralToThrownMap = dNeutralToThrownMap;} inline void Get_ThrownToNeutralMap(map >& locThrownToNeutralMap) const{locThrownToNeutralMap = dThrownToNeutralMap;} inline void Get_TOFPointToTruthMap(map >& locTOFPointToTruthMap) const{locTOFPointToTruthMap = dTOFPointToTruthMap;} inline void Get_TOFTruthToPointMap(map >& locTOFTruthToPointMap) const{locTOFTruthToPointMap = dTOFTruthToPointMap;} inline void Get_BCALShowerToTruthMap(map >& locBCALShowerToTruthMap) const{locBCALShowerToTruthMap = dBCALShowerToTruthMap;} inline void Get_BCALTruthToShowerMap(map >& locBCALTruthToShowerMap) const{locBCALTruthToShowerMap = dBCALTruthToShowerMap;} inline void Get_FCALShowerToTruthMap(map >& locFCALShowerToTruthMap) const{locFCALShowerToTruthMap = dFCALShowerToTruthMap;} inline void Get_FCALTruthToShowerMap(map >& locFCALTruthToShowerMap) const{locFCALTruthToShowerMap = dFCALTruthToShowerMap;} //SETTERS inline void Set_ChargedHypoToThrownMap(const map >& locChargedHypoToThrownMap){dChargedHypoToThrownMap = locChargedHypoToThrownMap;} inline void Set_ThrownToChargedHypoMap(const map, double> >& locThrownToChargedHypoMap){dThrownToChargedHypoMap = locThrownToChargedHypoMap;} inline void Set_ChargedToThrownMap(const map >& locChargedToThrownMap){dChargedToThrownMap = locChargedToThrownMap;} inline void Set_ThrownToChargedMap(const map >& locThrownToChargedMap){dThrownToChargedMap = locThrownToChargedMap;} inline void Set_NeutralHypoToThrownMap(const map >& locNeutralHypoToThrownMap){dNeutralHypoToThrownMap = locNeutralHypoToThrownMap;} inline void Set_ThrownToNeutralHypoMap(const map, double> >& locThrownToNeutralHypoMap){dThrownToNeutralHypoMap = locThrownToNeutralHypoMap;} inline void Set_NeutralToThrownMap(const map >& locNeutralToThrownMap){dNeutralToThrownMap = locNeutralToThrownMap;} inline void Set_ThrownToNeutralMap(const map >& locThrownToNeutralMap){dThrownToNeutralMap = locThrownToNeutralMap;} inline void Set_TOFPointToTruthMap(const map >& locTOFPointToTruthMap){dTOFPointToTruthMap = locTOFPointToTruthMap;} inline void Set_TOFTruthToPointMap(const map >& locTOFTruthToPointMap){dTOFTruthToPointMap = locTOFTruthToPointMap;} inline void Set_BCALShowerToTruthMap(map >& locBCALShowerToTruthMap){dBCALShowerToTruthMap = locBCALShowerToTruthMap;} inline void Set_BCALTruthToShowerMap(map >& locBCALTruthToShowerMap){dBCALTruthToShowerMap = locBCALTruthToShowerMap;} inline void Set_FCALShowerToTruthMap(map >& locFCALShowerToTruthMap){dFCALShowerToTruthMap = locFCALShowerToTruthMap;} inline void Set_FCALTruthToShowerMap(map >& locFCALTruthToShowerMap){dFCALTruthToShowerMap = locFCALTruthToShowerMap;} private: //doubles are match FOM (for BCAL/FCAL/TOF: is match distance) map > dChargedHypoToThrownMap; map, double> > dThrownToChargedHypoMap; map > dChargedToThrownMap; map > dThrownToChargedMap; map > dNeutralHypoToThrownMap; map, double> > dThrownToNeutralHypoMap; map > dNeutralToThrownMap; map > dThrownToNeutralMap; map > dTOFPointToTruthMap; map > dTOFTruthToPointMap; map > dBCALShowerToTruthMap; map > dBCALTruthToShowerMap; map > dFCALShowerToTruthMap; map > dFCALTruthToShowerMap; }; #endif // _DMCThrownMatching_