diff --git a/Trigger/TrigSteer/ViewAlgs/src/EventViewCreatorAlgorithmWithMuons.cxx b/Trigger/TrigSteer/ViewAlgs/src/EventViewCreatorAlgorithmWithMuons.cxx index 0b1c7c738a7bdfbb41530ddf7cfe5d772156b3e8..2d5043fde42626d27766c258f7d48a5ad3cd8e0e 100644 --- a/Trigger/TrigSteer/ViewAlgs/src/EventViewCreatorAlgorithmWithMuons.cxx +++ b/Trigger/TrigSteer/ViewAlgs/src/EventViewCreatorAlgorithmWithMuons.cxx @@ -20,8 +20,6 @@ EventViewCreatorAlgorithmWithMuons::EventViewCreatorAlgorithmWithMuons( const st declareProperty("RoIEtaWidth", m_roiEtaWidth=0.1); declareProperty("RoIPhiWidth", m_roiPhiWidth=0.1); - declareProperty("LinkToParent", m_linkToParent=true); - declareProperty("CreateFSRoI", m_doFSRoI=false); } EventViewCreatorAlgorithmWithMuons::~EventViewCreatorAlgorithmWithMuons() {} @@ -65,63 +63,46 @@ StatusCode EventViewCreatorAlgorithmWithMuons::execute( const EventContext& cont } ATH_MSG_DEBUG( "Got output "<< outputHandle.key()<<" with " << outputHandle->size() << " elements" ); - if(m_doFSRoI){ - //create one RoI over full detector - auto roi = new TrigRoiDescriptor(true); - // make the view - ATH_MSG_DEBUG( "Making the View "<<name()<<"_view" ); - auto newView = ViewHelper::makeView( name()+"_view", viewCounter++, m_viewFallThrough ); //pointer to the view - viewVector->push_back( newView ); - contexts.emplace_back( context ); - contexts.back().setExtension( Atlas::ExtendedEventContext( viewVector->back(), conditionsRun, roi ) ); - ATH_CHECK( placeRoIInView( roi, viewVector->back(), contexts.back() ) ); - } // loop over output decisions in container of outputHandle, follow link to inputDecision for ( auto outputDecision : *outputHandle){ ElementLinkVector<DecisionContainer> inputLinks = getLinkToPrevious(outputDecision); - if(m_doFSRoI){ - // link decision to this view - outputDecision->setObjectLink( "view", ElementLink< ViewContainer >(m_viewsKey.key(), viewVector->size()-1 ));//adding view to TC - } - else{ - //create one RoI per muon - - // loop over input links as predecessors - for (auto input: inputLinks){ - const Decision* inputDecision = *input; - - // Retrieve muons ... - ATH_MSG_DEBUG( "Checking there are muons linked to decision object" ); - TrigCompositeUtils::LinkInfo< xAOD::MuonContainer > muonELInfo = TrigCompositeUtils::findLink< xAOD::MuonContainer >( inputDecision,m_muonsLink ); - ATH_CHECK( muonELInfo.isValid() ); - const xAOD::Muon *muon = *muonELInfo.link; - ATH_MSG_DEBUG( "Placing xAOD::MuonContainer " ); - ATH_MSG_DEBUG( " -- pt="<< muon->p4().Et() <<" eta="<< muon->eta() << " muon="<< muon->phi() ); + //create one RoI per muon + + // loop over input links as predecessors + for (auto input: inputLinks){ + const Decision* inputDecision = *input; + + // Retrieve muons ... + ATH_MSG_DEBUG( "Checking there are muons linked to decision object" ); + TrigCompositeUtils::LinkInfo< xAOD::MuonContainer > muonELInfo = TrigCompositeUtils::findLink< xAOD::MuonContainer >( inputDecision,m_muonsLink ); + ATH_CHECK( muonELInfo.isValid() ); + const xAOD::Muon *muon = *muonELInfo.link; + ATH_MSG_DEBUG( "Placing xAOD::MuonContainer " ); + ATH_MSG_DEBUG( " -- pt="<< muon->p4().Et() <<" eta="<< muon->eta() << " muon="<< muon->phi() ); - // create the RoI around muon - auto roi = new TrigRoiDescriptor(muon->eta(), muon->eta()-m_roiEtaWidth, muon->eta()+m_roiEtaWidth, muon->phi(), muon->phi()-m_roiPhiWidth, muon->phi()+m_roiPhiWidth); - ATH_MSG_DEBUG("Created roi around muon: "<<*roi); - // make the view - ATH_MSG_DEBUG( "Making the View "<<name()<<"_view" ); - auto newView = ViewHelper::makeView( name()+"_view", viewCounter++, m_viewFallThrough ); //pointer to the view - viewVector->push_back( newView ); - contexts.emplace_back( context ); - contexts.back().setExtension( Atlas::ExtendedEventContext( viewVector->back(), conditionsRun, roi ) ); - // link decision to this view - outputDecision->setObjectLink( "view", ElementLink< ViewContainer >(m_viewsKey.key(), viewVector->size()-1 ));//adding view to TC - outputDecision->setObjectLink( "muons", muonELInfo.link ); - ATH_MSG_DEBUG( "Adding new view to new decision; storing view in viewVector component " << viewVector->size()-1 ); - if(m_linkToParent) ATH_CHECK( linkViewToParent( inputDecision, viewVector->back() ) ); - ATH_CHECK( placeRoIInView( roi, viewVector->back(), contexts.back() ) ); - ATH_CHECK( placeMuonInView( muon, viewVector->back(), contexts.back() ) ); - }// loop over previous inputs - }//Not FS view + // create the RoI around muon + auto roi = new TrigRoiDescriptor(muon->eta(), muon->eta()-m_roiEtaWidth, muon->eta()+m_roiEtaWidth, muon->phi(), muon->phi()-m_roiPhiWidth, muon->phi()+m_roiPhiWidth); + ATH_MSG_DEBUG("Created roi around muon: "<<*roi); + // make the view + ATH_MSG_DEBUG( "Making the View "<<name()<<"_view" ); + auto newView = ViewHelper::makeView( name()+"_view", viewCounter++, m_viewFallThrough ); //pointer to the view + viewVector->push_back( newView ); + contexts.emplace_back( context ); + contexts.back().setExtension( Atlas::ExtendedEventContext( viewVector->back(), conditionsRun, roi ) ); + // link decision to this view + outputDecision->setObjectLink( "view", ElementLink< ViewContainer >(m_viewsKey.key(), viewVector->size()-1 ));//adding view to TC + outputDecision->setObjectLink( "muons", muonELInfo.link ); + ATH_MSG_DEBUG( "Adding new view to new decision; storing view in viewVector component " << viewVector->size()-1 ); + ATH_CHECK( linkViewToParent( inputDecision, viewVector->back() ) ); + ATH_CHECK( placeRoIInView( roi, viewVector->back(), contexts.back() ) ); + ATH_CHECK( placeMuonInView( muon, viewVector->back(), contexts.back() ) ); + }// loop over previous inputs } // loop over decisions }// loop over output keys - + ATH_MSG_DEBUG( "Launching execution in " << viewVector->size() << " views" ); ATH_CHECK( ViewHelper::ScheduleViews( viewVector, // Vector containing views m_viewNodeName, // CF node to attach views to diff --git a/Trigger/TrigSteer/ViewAlgs/src/EventViewCreatorAlgorithmWithMuons.h b/Trigger/TrigSteer/ViewAlgs/src/EventViewCreatorAlgorithmWithMuons.h index 2ae3ba0f03d3a48240f89ae41f8b107312cc38d7..13119fa2fe345bf405ff3fc0fb064a441523ea7a 100644 --- a/Trigger/TrigSteer/ViewAlgs/src/EventViewCreatorAlgorithmWithMuons.h +++ b/Trigger/TrigSteer/ViewAlgs/src/EventViewCreatorAlgorithmWithMuons.h @@ -38,8 +38,6 @@ class EventViewCreatorAlgorithmWithMuons : public EventViewCreatorAlgorithm { Gaudi::Property< std::string > m_muonsLink {this,"MuonsLink","Unspecified","Name of EL to Muon object linked to the decision"}; double m_roiEtaWidth; double m_roiPhiWidth; - bool m_linkToParent; - bool m_doFSRoI; }; #endif diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSequenceSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSequenceSetup.py index 67d6e1f8724e49510f8d31841332ce2715ae501f..9e68ed9a7b5a0af9718451f7c73621fd913c8c8f 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSequenceSetup.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSequenceSetup.py @@ -247,11 +247,9 @@ def muEFCBSequence(): ###################### def muEFSAFSAlgSequence(ConfigFlags): - from ViewAlgs.ViewAlgsConf import EventViewCreatorAlgorithmWithMuons - efsafsInputMaker = EventViewCreatorAlgorithmWithMuons("IMMuonFS", RoIsLink="initialRoI") + efsafsInputMaker = EventViewCreatorAlgorithm("IMMuonFS", RoIsLink="initialRoI") efsafsInputMaker.InViewRoIs = "MUFSRoIs" efsafsInputMaker.Views = "MUFSViewRoI" - efsafsInputMaker.CreateFSRoI=True efsafsInputMaker.ViewFallThrough=True ### get EF reco sequence ### @@ -377,7 +375,6 @@ def muEFIsoAlgSequence(ConfigFlags): efmuIsoViewsMaker.MuonsLink = "feature" efmuIsoViewsMaker.RoIEtaWidth=0.15 efmuIsoViewsMaker.RoIPhiWidth=0.15 - efmuIsoViewsMaker.LinkToParent=False efmuIsoViewsMaker.mergeOutputs = False ### get EF reco sequence ###