diff --git a/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigMufastHypoTool.cxx b/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigMufastHypoTool.cxx index c24297f1189bd1d682b3c29ab3877fffbf8f2874..29052165706ade9622d07a2b1cdcc555db938149 100644 --- a/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigMufastHypoTool.cxx +++ b/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigMufastHypoTool.cxx @@ -413,12 +413,12 @@ StatusCode TrigMufastHypoTool::applyOverlapRemoval(std::vector<TrigMufastHypoToo ATH_MSG_DEBUG("Running Overlap Removal for muFast"); - std::vector<TrigMufastHypoTool::MuonClusterInfo> input; + std::vector<TrigMufastHypoTool::MuonClusterInfo*> input; for ( auto& i: toolInput ) { // If muon event has difference DecisionID, it shouldn't apply. if ( TrigCompositeUtils::passed( m_decisionId.numeric(), i.previousDecisionIDs ) ) { - input.emplace_back(i); + input.emplace_back(&i); } } @@ -447,7 +447,7 @@ StatusCode TrigMufastHypoTool::applyOverlapRemoval(std::vector<TrigMufastHypoToo auto mufastNrAllEVs = Monitored::Scalar("NrAllEVs", -9999.); auto monitorIt = Monitored::Group(m_monTool, mufastNrAllEVs); mufastNrAllEVs = numMuon; - ATH_CHECK(checkOverlap(toolInput)); + ATH_CHECK(checkOverlap(input)); return StatusCode::SUCCESS; } @@ -458,7 +458,7 @@ StatusCode TrigMufastHypoTool::applyOverlapRemoval(std::vector<TrigMufastHypoToo // -------------------------------------------------------------------------------- // -------------------------------------------------------------------------------- -StatusCode TrigMufastHypoTool::checkOverlap(std::vector<TrigMufastHypoTool::MuonClusterInfo>& input) const { +StatusCode TrigMufastHypoTool::checkOverlap(std::vector<TrigMufastHypoTool::MuonClusterInfo*>& input) const { size_t numMuon = input.size(); unsigned int i,j; @@ -470,7 +470,7 @@ StatusCode TrigMufastHypoTool::checkOverlap(std::vector<TrigMufastHypoTool::Muon for(i=0; i<numMuon-1; i++){ for(j=i+1; j<numMuon; j++){ ATH_MSG_DEBUG("++ i=" << i << " vs j=" << j); - bool overlapped = isOverlap(input[i].muFast, input[j].muFast); + bool overlapped = isOverlap((*input[i]).muFast, (*input[j]).muFast); if( ! overlapped ){ // judged as different ATH_MSG_DEBUG(" judged as: different objects"); if( mufastResult[i] == mufastResult[j] ) { // but marked as same by someone @@ -534,7 +534,6 @@ StatusCode TrigMufastHypoTool::checkOverlap(std::vector<TrigMufastHypoTool::Muon auto mufastNrActiveEVs = Monitored::Scalar("NrActiveEVs", -9999.); auto monitorIt = Monitored::Group(m_monTool, mufastNrActiveEVs); mufastNrActiveEVs = n_uniqueMuon; - // for(i=0; i<numMuon; i++) uniqueMuon.emplace_back(input[i]); } return StatusCode::SUCCESS; @@ -711,7 +710,7 @@ double TrigMufastHypoTool::invMass(double m1, double pt1, double eta1, double ph // -------------------------------------------------------------------------------- // -------------------------------------------------------------------------------- -StatusCode TrigMufastHypoTool::chooseBestMuon(std::vector<TrigMufastHypoTool::MuonClusterInfo>& input, std::vector<unsigned int> mufastResult) const +StatusCode TrigMufastHypoTool::chooseBestMuon(std::vector<TrigMufastHypoTool::MuonClusterInfo*>& input, std::vector<unsigned int> mufastResult) const { size_t numMuon = input.size(); unsigned int i,j,k; @@ -731,7 +730,7 @@ StatusCode TrigMufastHypoTool::chooseBestMuon(std::vector<TrigMufastHypoTool::Mu if( mufastResult[i] != i ) { ATH_MSG_DEBUG( " overlap to some one. skip." ); - input[i].passOR = false; + (*input[i]).passOR = false; continue; } @@ -753,7 +752,7 @@ StatusCode TrigMufastHypoTool::chooseBestMuon(std::vector<TrigMufastHypoTool::Mu j=others[k]; // const LVL1::RecMuonRoI* muonRoI = input[j].RecRoI; // float ptRoI = muonRoI->getThresholdValue(); - const xAOD::L2StandAloneMuon* mf = input[j].muFast; + const xAOD::L2StandAloneMuon* mf = (*input[j]).muFast; float ptMf = fabs(mf->pt()); float ptRoI = mf->roiThreshold(); ATH_MSG_DEBUG(" ev/PtRoI/ptMf="<< j << "/" << ptRoI << "/" << ptMf); @@ -777,10 +776,10 @@ StatusCode TrigMufastHypoTool::chooseBestMuon(std::vector<TrigMufastHypoTool::Mu if( j != best_ev ) { ATH_MSG_DEBUG( " EventView( j=" << j << " ) is not active" ); - input[j].passOR = false; + (*input[j]).passOR = false; // monitoring - const xAOD::L2StandAloneMuon* mf = input[j].muFast; + const xAOD::L2StandAloneMuon* mf = (*input[j]).muFast; mufastNrOverlapped++; mufastOverlappedPt = mf->pt(); mufastOverlappedEta = mf->etaMS(); diff --git a/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigMufastHypoTool.h b/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigMufastHypoTool.h index 89ffd28efe3018cb1f2ba141ccdc0d6843727329..8f66ded78f107a5d714479f68fded6ee239b29a2 100644 --- a/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigMufastHypoTool.h +++ b/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigMufastHypoTool.h @@ -77,12 +77,12 @@ class TrigMufastHypoTool: public ::AthAlgTool { StatusCode multiplicitySelection(std::vector<TrigMufastHypoTool::MuonClusterInfo>& toolInput) const; StatusCode applyOverlapRemoval(std::vector<TrigMufastHypoTool::MuonClusterInfo>& toolInput) const; - StatusCode checkOverlap(std::vector<TrigMufastHypoTool::MuonClusterInfo>& input) const; + StatusCode checkOverlap(std::vector<TrigMufastHypoTool::MuonClusterInfo*>& input) const; bool isOverlap(const xAOD::L2StandAloneMuon *mf1, const xAOD::L2StandAloneMuon *mf2) const; double dR(double eta1, double phi1, double eta2, double phi2) const; double invMass(double m1, double pt1, double eta1, double phi1, double m2, double pt2, double eta2, double phi2) const; - StatusCode chooseBestMuon(std::vector<TrigMufastHypoTool::MuonClusterInfo>& input, std::vector<unsigned int> mufastResult) const; + StatusCode chooseBestMuon(std::vector<TrigMufastHypoTool::MuonClusterInfo*>& input, std::vector<unsigned int> mufastResult) const; float getLocalPhi(float, float, float) const; //TrigMufastHypoToolConsts::ECRegions whichECRegion(const float eta, const float phi) const; diff --git a/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigmuCombHypoTool.cxx b/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigmuCombHypoTool.cxx index 5576199a33de53951f9c983789c0a76328810db6..c02e011bbb38d84a90657bb21c2b50f0da6747d5 100644 --- a/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigmuCombHypoTool.cxx +++ b/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigmuCombHypoTool.cxx @@ -340,11 +340,11 @@ StatusCode TrigmuCombHypoTool::applyOverlapRemoval(std::vector<TrigmuCombHypoToo ATH_MSG_DEBUG("Running Overlap Removal for muComb"); - std::vector<TrigmuCombHypoTool::CombinedMuonInfo> input; + std::vector<TrigmuCombHypoTool::CombinedMuonInfo*> input; for ( auto& i: toolInput ) { if ( TrigCompositeUtils::passed( m_decisionId.numeric(), i.previousDecisionIDs) ){ - input.emplace_back(i); + input.emplace_back(&i); } } @@ -373,7 +373,7 @@ StatusCode TrigmuCombHypoTool::applyOverlapRemoval(std::vector<TrigmuCombHypoToo auto mucombNrAllEVs = Monitored::Scalar("NrAllEVs", -9999.); auto monitorIt = Monitored::Group(m_monTool, mucombNrAllEVs); mucombNrAllEVs = numMuon; - ATH_CHECK(checkOverlap(toolInput)); + ATH_CHECK(checkOverlap(input)); return StatusCode::SUCCESS; } @@ -383,7 +383,7 @@ StatusCode TrigmuCombHypoTool::applyOverlapRemoval(std::vector<TrigmuCombHypoToo // -------------------------------------------------------------------------------- // -------------------------------------------------------------------------------- -StatusCode TrigmuCombHypoTool::checkOverlap(std::vector<TrigmuCombHypoTool::CombinedMuonInfo>& input) const { +StatusCode TrigmuCombHypoTool::checkOverlap(std::vector<TrigmuCombHypoTool::CombinedMuonInfo*>& input) const { size_t numMuon = input.size(); unsigned int i,j; @@ -395,7 +395,7 @@ StatusCode TrigmuCombHypoTool::checkOverlap(std::vector<TrigmuCombHypoTool::Comb for(i=0; i<numMuon-1; i++){ for(j=i+1; j<numMuon; j++){ ATH_MSG_DEBUG("++ i=" << i << " vs j=" << j); - bool overlapped = isOverlap(input[i].muComb, input[j].muComb); + bool overlapped = isOverlap((*input[i]).muComb, (*input[j]).muComb); if( ! overlapped ){ // judged as different ATH_MSG_DEBUG(" judged as: differenr objects"); if( mucombResult[i] == mucombResult[j] ) { // but marked as same by someone @@ -461,14 +461,6 @@ StatusCode TrigmuCombHypoTool::checkOverlap(std::vector<TrigmuCombHypoTool::Comb mucombNrActiveEVs = n_uniqueMuon; } - // if(n_uniqueMuon >= m_multiplicity){ - // for(i=0; i<n_uniqueMuon; i++){ - // ATH_MSG_DEBUG("Muon event pass through Chain/ID " << m_decisionId ); - // TrigCompositeUtils::addDecisionID( m_decisionId, uniqueMuon[i].decision ); - // } - // } - // else ATH_MSG_DEBUG("No muon event passed through selection " << m_decisionId << " because not meet the required number of muons"); - return StatusCode::SUCCESS; } @@ -646,7 +638,7 @@ double TrigmuCombHypoTool::invMass(double m1, double pt1, double eta1, double ph // -------------------------------------------------------------------------------- // -------------------------------------------------------------------------------- -StatusCode TrigmuCombHypoTool::chooseBestMuon(std::vector<TrigmuCombHypoTool::CombinedMuonInfo>& input, std::vector<unsigned int> mucombResult) const +StatusCode TrigmuCombHypoTool::chooseBestMuon(std::vector<TrigmuCombHypoTool::CombinedMuonInfo*>& input, std::vector<unsigned int> mucombResult) const { size_t numMuon = input.size(); unsigned int i,j,k; @@ -666,7 +658,7 @@ StatusCode TrigmuCombHypoTool::chooseBestMuon(std::vector<TrigmuCombHypoTool::Co if( mucombResult[i] != i ) { ATH_MSG_DEBUG( " overlap to some one. skip." ); - input[i].passOR = false; + (*input[i]).passOR = false; continue; } @@ -686,7 +678,7 @@ StatusCode TrigmuCombHypoTool::chooseBestMuon(std::vector<TrigmuCombHypoTool::Co j=others[k]; float ptCombMf = 0.; - const xAOD::L2CombinedMuon* combMf = input[j].muComb; + const xAOD::L2CombinedMuon* combMf = (*input[j]).muComb; ptCombMf = fabs(combMf->pt()/CLHEP::GeV); ATH_MSG_DEBUG(" j="<< j << " , ptCombMf=" << ptCombMf); if( ptCombMf > maxPtCombMf ) { @@ -701,10 +693,10 @@ StatusCode TrigmuCombHypoTool::chooseBestMuon(std::vector<TrigmuCombHypoTool::Co if( j != best_ev ) { ATH_MSG_DEBUG( " EventView( j=" << j << " ) is not active" ); - input[j].passOR = false; + (*input[j]).passOR = false; // monitoring - const xAOD::L2CombinedMuon* CombMf = input[j].muComb; + const xAOD::L2CombinedMuon* CombMf = (*input[j]).muComb; mucombNrOverlapped++; mucombOverlappedPt = CombMf->pt()* CombMf->charge() /CLHEP::GeV; mucombOverlappedEta = CombMf->eta(); diff --git a/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigmuCombHypoTool.h b/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigmuCombHypoTool.h index 2f2cee1cae1a41c23950c316f66e951f56105a4a..763ab27e6c4411e1f9222f6f39bc2c3fdf4f6ebd 100644 --- a/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigmuCombHypoTool.h +++ b/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigmuCombHypoTool.h @@ -71,12 +71,12 @@ class TrigmuCombHypoTool: public ::AthAlgTool { StatusCode multiplicitySelection(std::vector<TrigmuCombHypoTool::CombinedMuonInfo>& input) const; StatusCode applyOverlapRemoval(std::vector<TrigmuCombHypoTool::CombinedMuonInfo>& toolInput) const; - StatusCode checkOverlap(std::vector<TrigmuCombHypoTool::CombinedMuonInfo>& input) const; + StatusCode checkOverlap(std::vector<TrigmuCombHypoTool::CombinedMuonInfo*>& input) const; bool isOverlap(const xAOD::L2CombinedMuon *mf1, const xAOD::L2CombinedMuon *mf2) const; double dR(double eta1, double phi1, double eta2, double phi2) const; double invMass(double m1, double pt1, double eta1, double phi1, double m2, double pt2, double eta2, double phi2) const; - StatusCode chooseBestMuon(std::vector<TrigmuCombHypoTool::CombinedMuonInfo>& input, std::vector<unsigned int> mucombResult) const; + StatusCode chooseBestMuon(std::vector<TrigmuCombHypoTool::CombinedMuonInfo*>& input, std::vector<unsigned int> mucombResult) const; HLT::Identifier m_decisionId;