diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMuonEFExtrapolatorHypo.h b/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMuonEFExtrapolatorHypo.h index 203e0e8b98a3bb582f3e26aa95b06f5c7f6c91ea..4509bad5b601a02053adba1604ccfcb76caf2641 100644 --- a/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMuonEFExtrapolatorHypo.h +++ b/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMuonEFExtrapolatorHypo.h @@ -27,6 +27,7 @@ class TrigMuonEFExtrapolatorHypo: public HLT::HypoAlgo { std::vector<float> m_ptBins; std::vector<float> m_ptThresholds; BooleanProperty m_acceptAll; + BooleanProperty m_msonlyCut; // Other members: StoreGateSvc* m_storeGate; diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/python/TrigMuonHypoConfig.py b/Trigger/TrigHypothesis/TrigMuonHypo/python/TrigMuonHypoConfig.py index 841a073e54b954a2c782417f8d0138f7fc1a7eea..178620c75b4ed5e5caaf65ac59cb7100862c0878 100755 --- a/Trigger/TrigHypothesis/TrigMuonHypo/python/TrigMuonHypoConfig.py +++ b/Trigger/TrigHypothesis/TrigMuonHypo/python/TrigMuonHypoConfig.py @@ -39,6 +39,7 @@ trigMuonEFSAThresholds = { '50GeV_barrelOnly' : [ [0,1.05,1.5,2.0,9.9], [ 45.0,1000.0,1000.0,1000.0]], '60GeV' : [ [0,1.05,1.5,2.0,9.9], [ 54.0, 54.0, 54.0, 54.0] ], '60GeV_barrelOnly' : [ [0,1.05,1.5,2.0,9.9], [ 54.0,1000.0,1000.0,1000.0]], + '60GeV_msonlyCut' : [ [0,1.05,1.5,2.0,9.9], [ 54.0, 54.0, 54.0, 54.0] ], '70GeV' : [ [0,1.05,1.5,2.0,9.9], [ 63.0, 63.0, 63.0, 63.0] ], '80GeV' : [ [0,1.05,1.5,2.0,9.9], [ 72.0, 72.0, 72.0, 72.0] ], '100GeV' : [ [0,1.05,1.5,2.0,9.9], [ 90.0, 90.0, 90.0, 90.0] ], @@ -806,6 +807,9 @@ class TrigMuonEFExtrapolatorHypoConfig(TrigMuonEFExtrapolatorHypo) : threshold = args[1] + if "msonlyCut" in threshold: + self.MSonlyCut = True + try: values = trigMuonEFSAThresholds[threshold] self.PtBins = values[0] diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMuonEFExtrapolatorHypo.cxx b/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMuonEFExtrapolatorHypo.cxx index 8e47a6a2dcdd08960d6607a9333453fcdbcef879..19960460baea7d7b511c0b1e2ce438ad5deefeb7 100644 --- a/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMuonEFExtrapolatorHypo.cxx +++ b/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMuonEFExtrapolatorHypo.cxx @@ -17,6 +17,7 @@ class ISvcLocator; TrigMuonEFExtrapolatorHypo::TrigMuonEFExtrapolatorHypo(const std::string & name, ISvcLocator* pSvcLocator): HLT::HypoAlgo(name, pSvcLocator){ declareProperty("AcceptAll", m_acceptAll=true); + declareProperty("MSonlyCut", m_msonlyCut=false); std::vector<float> def_bins; def_bins.push_back(0); def_bins.push_back(9.9); @@ -40,36 +41,37 @@ HLT::ErrorCode TrigMuonEFExtrapolatorHypo::hltInitialize(){ if(m_acceptAll) { - msg() << MSG::INFO - << "Accepting all the events with not cut!" - << endreq; + ATH_MSG_INFO("Accepting all the events with not cut!"); } else { m_bins = m_ptBins.size() - 1; if (m_bins != m_ptThresholds.size()) { - msg() << MSG::INFO << "bad thresholds setup .... exiting!" << endreq; + ATH_MSG_INFO("bad thresholds setup .... exiting!"); return HLT::BAD_JOB_SETUP; // msg() << MSG::INFO // << "current hypo implementation is dummy" << endreq; } for (std::vector<float>::size_type i=0; i<m_bins;++i) { - msg() << MSG::INFO - << "bin " << m_ptBins[i] << " - " << m_ptBins[i+1] - << " with Pt Threshold of " << (m_ptThresholds[i])/CLHEP::GeV - << " GeV" << endreq; + ATH_MSG_INFO("bin " << m_ptBins[i] << " - " << m_ptBins[i+1] + << " with Pt Threshold of " << (m_ptThresholds[i])/CLHEP::GeV + << " CLHEP::GeV"); } } - msg() << MSG::INFO - << "Initialization completed successfully" - << endreq; + if(m_msonlyCut) { + if(msgLvl() <= MSG::DEBUG) { + ATH_MSG_DEBUG("Apply GoodPrecisonLayers cut in MS-only triggers"); + } + } + + ATH_MSG_INFO("Initialization completed successfully"); return HLT::OK; } HLT::ErrorCode TrigMuonEFExtrapolatorHypo::hltFinalize() { - msg() << MSG::INFO << "in finalize()" << endreq; + ATH_MSG_INFO("in finalize()"); return HLT::OK; } @@ -79,7 +81,8 @@ HLT::ErrorCode TrigMuonEFExtrapolatorHypo::hltExecute(const HLT::TriggerElement* m_storeGate = store(); - if(msgLvl() <= MSG::DEBUG) msg() << MSG::DEBUG << "in execute()" << endreq; + if(msgLvl() <= MSG::DEBUG) + ATH_MSG_DEBUG("in execute()"); //resetting the monitoring variables m_fex_pt.clear(); @@ -89,9 +92,7 @@ HLT::ErrorCode TrigMuonEFExtrapolatorHypo::hltExecute(const HLT::TriggerElement* if(m_acceptAll) { pass = true; if(msgLvl() <= MSG::DEBUG) { - msg() << MSG::DEBUG - << "Accept property is set: taking all the events" - << endreq; + ATH_MSG_DEBUG("Accept property is set: taking all the events"); } return HLT::OK; } @@ -102,7 +103,7 @@ HLT::ErrorCode TrigMuonEFExtrapolatorHypo::hltExecute(const HLT::TriggerElement* bool debug = msgLvl() <= MSG::DEBUG; // Some debug output: - if(msgLvl() <= MSG::DEBUG) msg() << MSG::DEBUG << "outputTE->ID(): " << outputTE->getId() << endreq; + if(msgLvl() <= MSG::DEBUG) ATH_MSG_DEBUG("outputTE->ID(): " << outputTE->getId()); // will do hypo cuts here @@ -110,14 +111,14 @@ HLT::ErrorCode TrigMuonEFExtrapolatorHypo::hltExecute(const HLT::TriggerElement* const xAOD::MuonContainer* muonContainer(0); if(getFeature(outputTE, muonContainer)!=HLT::OK) { - if (debug) msg() << MSG::DEBUG << "no xAOD::MuonContainer Feature found" << endreq; + if (debug) ATH_MSG_DEBUG("no xAOD::MuonContainer Feature found"); return HLT::MISSING_FEATURE; } else { if (!muonContainer) { - if (debug) msg() << MSG::DEBUG << "null xAOD::MuonContainer Feature found" << endreq; + if (debug) ATH_MSG_DEBUG("null xAOD::MuonContainer Feature found"); return HLT::MISSING_FEATURE; } - if (debug) msg() << MSG::DEBUG << "vector of xAOD::MuonContainer found with size " << muonContainer->size() << endreq; + if (debug) ATH_MSG_DEBUG("vector of xAOD::MuonContainer found with size " << muonContainer->size()); } for (unsigned int i=0; i<muonContainer->size(); i++){ @@ -126,7 +127,7 @@ HLT::ErrorCode TrigMuonEFExtrapolatorHypo::hltExecute(const HLT::TriggerElement* const xAOD::Muon* muon = muonContainer->at(i); if (!muon) { - if (debug) msg() << MSG::DEBUG << "No xAOD::Muon found." << endreq; + if (debug) ATH_MSG_DEBUG("No xAOD::Muon found."); continue; } else { @@ -138,19 +139,27 @@ HLT::ErrorCode TrigMuonEFExtrapolatorHypo::hltExecute(const HLT::TriggerElement* if (!tr) { - if (debug) msg() << MSG::DEBUG << "No ExtrapolatedMuonSpectrometerTrackParticle found." << endreq; + if (debug) ATH_MSG_DEBUG("No ExtrapolatedMuonSpectrometerTrackParticle found."); continue; } else { - if (debug) msg() << MSG::DEBUG - << "Retrieved ExtrapolatedMuonSpectrometerTrack track with abs pt " - << (*tr).pt()/CLHEP::GeV << " GeV " << endreq; - + if (debug) + ATH_MSG_DEBUG("Retrieved ExtrapolatedMuonSpectrometerTrack track with abs pt " + << (*tr).pt()/CLHEP::GeV << " GeV"); + m_fex_pt.push_back(tr->pt()/CLHEP::GeV); float eta = tr->eta(); m_fex_eta.push_back(eta); m_fex_phi.push_back(tr->phi()); float absEta = fabs(eta); + if (m_msonlyCut) { + uint8_t nGoodPrcLayers(0); + if (!muon->summaryValue(nGoodPrcLayers, xAOD::numberOfGoodPrecisionLayers)){ + if (debug) ATH_MSG_DEBUG("No numberOfGoodPrecisionLayers variable foud."); + continue; + } + if(absEta > 1.05 && nGoodPrcLayers < 3) continue; + } float threshold = 0; for (std::vector<float>::size_type k=0; k<m_bins; ++k) { if (absEta > m_ptBins[k] && absEta <= m_ptBins[k+1]) threshold = m_ptThresholds[k]; @@ -158,10 +167,11 @@ HLT::ErrorCode TrigMuonEFExtrapolatorHypo::hltExecute(const HLT::TriggerElement* if (fabs(tr->pt())/CLHEP::GeV > (threshold/CLHEP::GeV)){ result = true; } - if(debug) msg() << MSG::DEBUG << " REGTEST muon pt is " << tr->pt()/CLHEP::GeV << " GeV " - << " with Charge " << tr->charge() - << " and threshold cut is " << threshold/CLHEP::GeV << " GeV" - << " so hypothesis is " << (result?"true":"false") << endreq; + if(debug) + ATH_MSG_DEBUG(" REGTEST muon pt is " << tr->pt()/CLHEP::GeV << " GeV " + << " with Charge " << tr->charge() + << " and threshold cut is " << threshold/CLHEP::GeV << " GeV" + << " so hypothesis is " << (result?"true":"false")); } } diff --git a/Trigger/TriggerCommon/TriggerMenu/python/menu/MC_pp_v7.py b/Trigger/TriggerCommon/TriggerMenu/python/menu/MC_pp_v7.py index 34a3566ee5e0fe3d47aa7a7692fcf2be7a32d76d..51feca80b5273116f93133384d6c09d3d9d7577d 100644 --- a/Trigger/TriggerCommon/TriggerMenu/python/menu/MC_pp_v7.py +++ b/Trigger/TriggerCommon/TriggerMenu/python/menu/MC_pp_v7.py @@ -58,6 +58,8 @@ def setupMenu(): ['mu40_ivarmedium', 'L1_MU20MU21', ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1], ['mu50_ivarmedium', 'L1_MU20MU21', ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1], + ['mu60_msonly_3layersEC', 'L1_MU20MU21', ['L1_MU20'], [PhysicsStream], ['Primary:20000','RATE:SingleMuon', 'BW:Muon'], -1], + ['mu20_r1extr', 'L1_MU20MU21', ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1], ['mu10_r1extr', 'L1_MU10', [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1], ['mu4_r1extr', 'L1_MU4', [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1], diff --git a/Trigger/TriggerCommon/TriggerMenu/python/menu/SignatureDicts.py b/Trigger/TriggerCommon/TriggerMenu/python/menu/SignatureDicts.py index 6f16d419a870129a9e0f1fb5bb1b6d851190d84d..9d1f0a4d40cc79f4c5f2aae41584592718dbf269 100644 --- a/Trigger/TriggerCommon/TriggerMenu/python/menu/SignatureDicts.py +++ b/Trigger/TriggerCommon/TriggerMenu/python/menu/SignatureDicts.py @@ -201,7 +201,7 @@ MuonChainParts = { 'trigType' : ['mu'], 'etaRange' : ['0eta105', '0eta250','0eta010','0eta500'], 'threshold' : '', - 'extra' : ['noL1'], + 'extra' : ['noL1', '3layersEC'], 'IDinfo' : [], 'isoInfo' : ['iloose', 'imedium', 'itight', 'ivarloose', 'ivarmedium','icalo','iloosecalo','imediumcalo','iloosems', 'ivarloosecalo', 'ivarmediumcalo', 'ivartight', 'ivarverytight'], 'reccalibInfo' : ['msonly', 'l2msonly', 'l2idonly', 'nomucomb', 'idperf','muoncalib', 'mucombTag','muL2', 'mgonly'], diff --git a/Trigger/TriggerCommon/TriggerMenu/python/muon/MuonDef.py b/Trigger/TriggerCommon/TriggerMenu/python/muon/MuonDef.py index 95876bffccf4e79db13194610917c3631f1ca120..9d4d748e7521aedbc96dd54b7dd28f76cb02ed52 100755 --- a/Trigger/TriggerCommon/TriggerMenu/python/muon/MuonDef.py +++ b/Trigger/TriggerCommon/TriggerMenu/python/muon/MuonDef.py @@ -247,6 +247,8 @@ class L2EFChain_mu(L2EFChainDef): EFExtrapolatorThresh = "passthrough" elif "0eta105" in self.chainPart['etaRange']: EFExtrapolatorThresh = str(self.chainPart['threshold'])+ "GeV" + "_barrelOnly" + elif "3layersEC" in self.chainName: + EFExtrapolatorThresh = str(self.chainPart['threshold'])+ "GeV" + "_msonlyCut" else: EFExtrapolatorThresh = str(self.chainPart['threshold'])+ "GeV" return EFExtrapolatorThresh