diff --git a/Trigger/TrigHypothesis/TrigBjetHypo/python/TrigBjetEtHypoTool.py b/Trigger/TrigHypothesis/TrigBjetHypo/python/TrigBjetEtHypoTool.py index 8eb3ca4b66f4cf4e970eb6e90514c995c5b2514a..9137873f13def36591d7e9c1b5a39d373d61e326 100644 --- a/Trigger/TrigHypothesis/TrigBjetHypo/python/TrigBjetEtHypoTool.py +++ b/Trigger/TrigHypothesis/TrigBjetHypo/python/TrigBjetEtHypoTool.py @@ -31,7 +31,6 @@ def TrigBjetEtHypoToolFromName_j( name, conf ): tool = TrigBjetEtHypoTool( name ) tool.OutputLevel = DEBUG tool.AcceptAll = False - tool.Multeplicity = int( conf_dict['multiplicity'] ) tool.EtThreshold = float(conf_dict['threshold']) * GeV print "TrigBjetEtHypoToolFromName_j: name = %s, cut_j = %s "%(name,tool.EtThreshold) @@ -59,7 +58,6 @@ def TrigBjetEtHypoToolFromName_gsc( name, conf ): tool = TrigBjetEtHypoTool( name ) tool.OutputLevel = DEBUG tool.AcceptAll = False - tool.Multeplicity = int( conf_dict['multiplicity'] ) tool.EtThreshold = float(conf_dict['gscThreshold']) * GeV print "TrigBjetEtHypoToolFromName_gsc: name = %s, cut_j = %s "%(name,tool.EtThreshold) diff --git a/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetEtHypoAlgMT.cxx b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetEtHypoAlgMT.cxx index d083718397719868fd2543b1a8bab2cae062c381..14ea573e2f6507c212adc1090fec0107f05dac8e 100644 --- a/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetEtHypoAlgMT.cxx +++ b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetEtHypoAlgMT.cxx @@ -18,10 +18,9 @@ StatusCode TrigBjetEtHypoAlgMT::initialize() ATH_MSG_INFO ( "Initializing " << name() << "..." ); ATH_MSG_DEBUG( "declareProperty review:" ); - ATH_MSG_DEBUG( " " << m_useView ); + ATH_MSG_DEBUG( " " << m_readFromView ); ATH_MSG_DEBUG( " " << m_roiLink ); ATH_MSG_DEBUG( " " << m_jetLink ); - ATH_MSG_DEBUG( " " << m_multipleDecisions ); ATH_MSG_DEBUG( "Initializing Tools" ); ATH_CHECK( m_hypoTools.retrieve() ); @@ -29,11 +28,9 @@ StatusCode TrigBjetEtHypoAlgMT::initialize() ATH_MSG_DEBUG( "Initializing HandleKeys" ); CHECK( m_inputJetsKey.initialize() ); CHECK( m_inputRoIKey.initialize() ); - CHECK( m_inputPrimaryVertexKey.initialize() ); - // Deal with what is stored into View - if ( m_useView ) - renounce( m_inputJetsKey ); + if ( m_readFromView ) + renounce( m_inputJetsKey ); return StatusCode::SUCCESS; } @@ -49,9 +46,7 @@ StatusCode TrigBjetEtHypoAlgMT::execute( const EventContext& context ) const { // ** Retrieve Ingredients // ========================================================================================================================== - // Taken from Jet code // Read in previous Decisions made before running this Hypo Alg. - // The container should have only one such Decision in case we are cutting on 'j' threshold (for L1) ATH_MSG_DEBUG( "Retrieving Previous Decision" ); SG::ReadHandle< TrigCompositeUtils::DecisionContainer > prevDecisionHandle = SG::makeHandle( decisionInput(),context ); CHECK( prevDecisionHandle.isValid() ); @@ -61,7 +56,7 @@ StatusCode TrigBjetEtHypoAlgMT::execute( const EventContext& context ) const { // Retrieve Jets const xAOD::JetContainer *jetCollection = nullptr; - if ( not m_useView ) CHECK( retrieveJetsFromStoreGate( context,jetCollection ) ); + if ( not m_readFromView ) CHECK( retrieveJetsFromStoreGate( context,jetCollection ) ); else CHECK( retrieveJetsFromEventView( context,jetCollection,prevDecisionHandle ) ); ATH_MSG_DEBUG( "Found " << jetCollection->size()<< " jets." ); @@ -70,7 +65,7 @@ StatusCode TrigBjetEtHypoAlgMT::execute( const EventContext& context ) const { // Retrieve RoI to be linked to the output decision const TrigRoiDescriptorCollection *roiContainer = nullptr; - if ( not m_useView ) { + if ( not m_readFromView ) { ATH_MSG_DEBUG( "Retrieving input TrigRoiDescriptorCollection with key: " << m_inputRoIKey ); SG::ReadHandle< TrigRoiDescriptorCollection > roiContainerHandle = SG::makeHandle( m_inputRoIKey,context ); CHECK( roiContainerHandle.isValid() ); @@ -81,74 +76,85 @@ StatusCode TrigBjetEtHypoAlgMT::execute( const EventContext& context ) const { ATH_MSG_DEBUG( " ** eta="<< roi->eta() << " phi=" << roi->phi() ); } - // Retrieve Primary Vertex - const xAOD::VertexContainer *vertexContainer = nullptr; - CHECK( retrievePrimaryVertexFromStoreGate( context,vertexContainer ) ); - - ATH_MSG_DEBUG( "Found " << vertexContainer->size() << " vertices." ); - for ( const xAOD::Vertex *primVertex : *vertexContainer ) - ATH_MSG_DEBUG( " ** vertex = " - << primVertex->x() << "," - << primVertex->y() << "," - << primVertex->z() ); - // ========================================================================================================================== // ** Prepare Outputs // ========================================================================================================================== // Decisions - SG::WriteHandle<TrigCompositeUtils::DecisionContainer> handle = TrigCompositeUtils::createAndStore( decisionOutput(), context ); - auto outputDecisions = handle.ptr(); + SG::WriteHandle< TrigCompositeUtils::DecisionContainer > handle = TrigCompositeUtils::createAndStore( decisionOutput(), context ); + TrigCompositeUtils::DecisionContainer *outputDecisions = handle.ptr(); // ========================================================================================================================== // ** Compute Decisions // ========================================================================================================================== - const unsigned int nDecisions = m_multipleDecisions ? jetCollection->size() : 1; - - unsigned int counter = 0; - for ( const ToolHandle< TrigBjetEtHypoTool >& tool : m_hypoTools ) { - const HLT::Identifier decisionId = tool->getId(); - - ATH_MSG_DEBUG( "Creating " << nDecisions << " output decision" ); - std::vector< TrigCompositeUtils::Decision* > newDecisions; - for ( unsigned int index(0); index<nDecisions; index++ ) { - // const std::string decisionName = name()+"_roi_"+std::to_string(index); - // ATH_MSG_DEBUG( " ** " << decisionName ); - newDecisions.push_back( TrigCompositeUtils::newDecisionIn( outputDecisions ) );//,decisionName ) ); + // We need nDecisions (one per RoI if we run on Event Views). Each decision having m chains ( m=m_hypoTools.size() ) + const unsigned int nDecisions = jetCollection->size(); + + // Create output decisions + ATH_MSG_DEBUG("Creating Output Decisions and Linking Stuff to it"); + std::vector< TrigCompositeUtils::Decision* > newDecisions; + for ( unsigned int index(0); index<nDecisions; index++ ) + newDecisions.push_back( TrigCompositeUtils::newDecisionIn( outputDecisions ) ); + + // Adding Links + for ( unsigned int index(0); index<nDecisions; index++ ) { + // We want multiple output decision (one per RoI/Jet) + + // A little bit tricky here, we may need to revise this in the future + // In case what we want to link lives inside a view we have to do a few additional things + // in order to be able to link it to the output decision + if ( not m_readFromView ) { // TMP + newDecisions.at( index )->setObjectLink( m_roiLink.value(),ElementLink< TrigRoiDescriptorCollection >( m_inputRoIKey.key(),index ) ); + newDecisions.at( index )->setObjectLink( m_jetLink.value(),ElementLink< xAOD::JetContainer >( m_inputJetsKey.key(),index ) ); + } else { + // No need to link RoIs, they are already stored in the previous decisions + // I need to take the view from the previous decision, make the link, and then make the link in the output decision + ElementLink< ViewContainer > viewEL = prevDecisionContainer->at(index)->objectLink< ViewContainer >( "view" ); + ATH_CHECK( viewEL.isValid() ); + + SG::ReadHandle< xAOD::JetContainer > calJetHandle = ViewHelper::makeHandle( *viewEL, m_inputJetsKey, context ); + ATH_CHECK( calJetHandle.isValid() ); + + ElementLink< xAOD::JetContainer > jetEL = ViewHelper::makeLink( *viewEL, calJetHandle, 0 ); + ATH_CHECK( jetEL.isValid() ); + + newDecisions.at( index )->setObjectLink( m_jetLink.value(),jetEL); } - bool pass = false; - CHECK( tool->decide( jetCollection,pass ) ); - if ( pass ) { - for( unsigned int index(0); index<nDecisions; index++ ) - TrigCompositeUtils::addDecisionID( decisionId,newDecisions.at(index) ); - } + } + ATH_MSG_DEBUG(" ** Added object links to output decision"); + + ATH_MSG_DEBUG("Ready to Link Output Decision to Input Decision"); + // Link To previous decision + // *** If we are NOT reading from event views it means we are in step1, + // Thus, we may have one or more output decision, but only one input decision (1-to-many correspondance) + // *** If we are reading from event views it means we are are in step2, + // Thus, we have out output decision for each input decision (1-to-1 correspendance) + for ( unsigned int index(0); index<nDecisions; index++ ) { + if ( m_readFromView ) TrigCompositeUtils::linkToPrevious( newDecisions.at( index ),decisionInput().key(),index ); + else TrigCompositeUtils::linkToPrevious( newDecisions.at( index ),decisionInput().key(),0 ); + } + ATH_MSG_DEBUG(" ** Done with Linking Output Decision to Input Decision"); - // ========================================================================================================================== - // ** Linking objects to decision (inside Hypo Tool loop) - // ========================================================================================================================== - - if ( not m_useView ) { - for( unsigned int index(0); index<nDecisions; index++ ) - newDecisions.at(index)->setObjectLink( m_roiLink.value(),ElementLink< TrigRoiDescriptorCollection >( m_inputRoIKey.key(),index ) ); - ATH_MSG_DEBUG( "Linking RoIs `" << m_roiLink.value() << "` to output decision." ); - - for( unsigned int index(0); index<nDecisions; index++ ) - newDecisions.at(index)->setObjectLink( m_jetLink.value(),ElementLink< xAOD::JetContainer >( m_inputJetsKey.key(),index ) ); - ATH_MSG_DEBUG( "Linking Jets `" << m_jetLink.value() << "` to output decision." ); - } - - for( unsigned int index(0); index<nDecisions; index++ ){ - TrigCompositeUtils::linkToPrevious( newDecisions.at(index),decisionInput().key(),0 ); - } - counter++; - } + // Run on Trigger Chains + for ( const ToolHandle< TrigBjetEtHypoTool >& tool : m_hypoTools ) { + const HLT::Identifier decisionId = tool->getId(); - // ========================================================================================================================== - // ** Store Output - // ========================================================================================================================== + // At this point the JetCollection size is equal to the number of jets reconstructed in the entire event + // independently of the stage (stage1 or stage2) of b-jet chains. + // In case we are reading from Event Views, the jets are retrieved and merged together inside the + // `retrieveJetsFromEventView` method. In this way I can require multeplicity requirements inside the 'decide method.' + + // Since we have one jet per decision, we run on nDecisions and compute the decide outcome + for( unsigned int index(0); index<nDecisions; index++ ) { + bool pass = false; + CHECK( tool->decide( jetCollection->at(index),pass ) ); + if ( pass ) TrigCompositeUtils::addDecisionID( decisionId,newDecisions.at(index) ); + } + } + ATH_MSG_DEBUG( "Exiting with " << handle->size() << " decisions" ); return StatusCode::SUCCESS; @@ -163,15 +169,6 @@ StatusCode TrigBjetEtHypoAlgMT::retrieveJetsFromStoreGate( const EventContext& c return StatusCode::SUCCESS; } -StatusCode TrigBjetEtHypoAlgMT::retrievePrimaryVertexFromStoreGate( const EventContext& context, - const xAOD::VertexContainer*& vertexContainer ) const { - SG::ReadHandle< xAOD::VertexContainer > vertexContainerHandle = SG::makeHandle( m_inputPrimaryVertexKey,context ); - ATH_MSG_DEBUG( "Retrieved primary vertex from : " << m_inputPrimaryVertexKey.key() ); - CHECK( vertexContainerHandle.isValid() ); - vertexContainer = vertexContainerHandle.get(); - return StatusCode::SUCCESS; -} - StatusCode TrigBjetEtHypoAlgMT::retrieveJetsFromEventView( const EventContext& context, const xAOD::JetContainer*& jetCollection, SG::ReadHandle< TrigCompositeUtils::DecisionContainer >& prevDecisionHandle ) const { @@ -179,24 +176,12 @@ StatusCode TrigBjetEtHypoAlgMT::retrieveJetsFromEventView( const EventContext& c std::unique_ptr< xAOD::JetAuxContainer > outputAux( new xAOD::JetAuxContainer() ); output->setStore( outputAux.release() ); - std::map< const TrigRoiDescriptor*,int > mapRoIs; - for ( auto previousDecision: *prevDecisionHandle ) { - //get RoI - auto roiEL = previousDecision->objectLink<TrigRoiDescriptorCollection>( "initialRoI" ); - ATH_CHECK( roiEL.isValid() ); - const TrigRoiDescriptor* roi = *roiEL; - ATH_MSG_DEBUG( "Retrieved RoI from previous decision " ); - ATH_MSG_DEBUG( " ** eta=" << roi->eta() <<" phi="<< roi->phi() ); - - // Check the jet has not been already retrieved - if ( mapRoIs.find( roi ) != mapRoIs.end() ) continue; - mapRoIs[ roi ] = 1; - // get View - auto viewEL = previousDecision->objectLink< ViewContainer >( "view" ); + ElementLink< ViewContainer > viewEL = previousDecision->objectLink< ViewContainer >( "view" ); ATH_CHECK( viewEL.isValid() ); ATH_MSG_DEBUG( "Retrieved View" ); + SG::ReadHandle< xAOD::JetContainer > jetContainerHandle = ViewHelper::makeHandle( *viewEL, m_inputJetsKey, context); ATH_CHECK( jetContainerHandle.isValid() ); ATH_MSG_DEBUG ( "jet container handle size: " << jetContainerHandle->size() << "..." ); diff --git a/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetEtHypoAlgMT.h b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetEtHypoAlgMT.h index fa57097df4b891a19c70375aef732c52ebbd777d..d4558f18293e00fdc8def6a4a357dd658b6baec6 100644 --- a/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetEtHypoAlgMT.h +++ b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetEtHypoAlgMT.h @@ -41,8 +41,6 @@ class TrigBjetEtHypoAlgMT : public ::HypoBase { TrigBjetEtHypoAlgMT(); StatusCode retrieveJetsFromStoreGate( const EventContext& context,const xAOD::JetContainer*& ) const; - StatusCode retrievePrimaryVertexFromStoreGate( const EventContext& context,const xAOD::VertexContainer*& ) const; - StatusCode retrieveJetsFromEventView( const EventContext& context, const xAOD::JetContainer*&, SG::ReadHandle< TrigCompositeUtils::DecisionContainer >& ) const; @@ -51,14 +49,12 @@ class TrigBjetEtHypoAlgMT : public ::HypoBase { ToolHandleArray< TrigBjetEtHypoTool > m_hypoTools {this,"HypoTools",{},"Hypo Tools"}; private: - Gaudi::Property< bool > m_useView {this,"UseView",false,"Use configuration that supports Event View"}; - Gaudi::Property< bool > m_multipleDecisions {this,"MultipleDecisions",false,"Create multiple decisions, one per input RoI"}; + Gaudi::Property< bool > m_readFromView {this,"ReadFromView",false,"Use configuration that supports Event View"}; Gaudi::Property< std::string > m_roiLink {this,"RoILink","roi","RoI link to attach to the output decision"}; Gaudi::Property< std::string > m_jetLink {this,"JetLink","jets","Jets link to attach to the output decision"}; SG::ReadHandleKey< xAOD::JetContainer > m_inputJetsKey {this,"Jets","Undefined","Input Jet Container Key"}; SG::ReadHandleKey< TrigRoiDescriptorCollection > m_inputRoIKey {this,"RoIs","Undefined","Input RoIs that will be linked to the output decision"}; - SG::ReadHandleKey< xAOD::VertexContainer > m_inputPrimaryVertexKey {this,"PrimaryVertex","Undefined","Input Primary Vertex that will be linked to the output decision"}; }; #endif //> !TRIGBJETHYPO_TRIGBJETETHYPOALG_H diff --git a/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetEtHypoTool.cxx b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetEtHypoTool.cxx index b062b265640a485b6fd02c994a910329af2bf0be..0764ade8b20131c1e4aaf14446febc38a59f25ad 100755 --- a/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetEtHypoTool.cxx +++ b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetEtHypoTool.cxx @@ -31,7 +31,6 @@ StatusCode TrigBjetEtHypoTool::initialize() { ATH_MSG_DEBUG( "declareProperty review:" ); ATH_MSG_DEBUG( " " << m_acceptAll ); - ATH_MSG_DEBUG( " " << m_multeplicity ); ATH_MSG_DEBUG( " " << m_etThreshold ); ATH_MSG_DEBUG( "Tool configured for chain/id: " << m_id ); @@ -41,15 +40,15 @@ StatusCode TrigBjetEtHypoTool::initialize() { // ----------------------------------------------------------------------------------------------------------------- -StatusCode TrigBjetEtHypoTool::decide( const xAOD::JetContainer* jetCollection,bool &pass ) const { - // Right now only considering single b-jet chains. - // Will be revised with higher multeplicity - +StatusCode TrigBjetEtHypoTool::decide( const xAOD::Jet *jet,bool &pass ) const { ATH_MSG_DEBUG( "Executing "<< name() ); - ATH_MSG_DEBUG( "Evaluating 'decide' on " << jetCollection->size() << " input jets " ); + + ATH_MSG_DEBUG( "Evaluating 'decide' on jet input jets " ); + ATH_MSG_DEBUG( " ** pt = " << jet->p4().Et() ); + ATH_MSG_DEBUG( " ** eta = " << jet->eta() ); + ATH_MSG_DEBUG( " ** phi = " << jet->phi() ); pass = false; - int nJets = 0; if ( m_acceptAll ) { ATH_MSG_DEBUG( "REGTEST: AcceptAll property is set: taking all events" ); @@ -61,20 +60,15 @@ StatusCode TrigBjetEtHypoTool::decide( const xAOD::JetContainer* jetCollection,b ATH_MSG_DEBUG( "REGTEST: AcceptAll property not set: applying the selection" ); // Run on Jet Collection - for ( const xAOD::Jet* jet : *jetCollection ) { - ATH_MSG_DEBUG( "EtHypo on Jet " << jet->p4().Et() ); - ATH_MSG_DEBUG( " Et Threshold " << m_etThreshold ); + ATH_MSG_DEBUG( "EtHypo on Jet " << jet->p4().Et() ); + ATH_MSG_DEBUG( " Et Threshold " << m_etThreshold ); - float et = jet->p4().Et(); + float et = jet->p4().Et(); - ATH_MSG_DEBUG( "REGTEST: EF jet with et = " << et ); - ATH_MSG_DEBUG( "REGTEST: Requiring EF jets to satisfy 'j' Et > " << m_etThreshold ); + ATH_MSG_DEBUG( "REGTEST: EF jet with et = " << et ); + ATH_MSG_DEBUG( "REGTEST: Requiring EF jets to satisfy 'j' Et > " << m_etThreshold ); - if ( et >= m_etThreshold ) - nJets++; - } - - if ( nJets >= m_multeplicity ) + if ( et >= m_etThreshold ) pass = true; if ( pass ) { diff --git a/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetEtHypoTool.h b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetEtHypoTool.h index 2a871cc3360a141fb96d385cd22568bcb8ffa617..8a37d9af62b29c04aae296076383f38136fed1ff 100755 --- a/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetEtHypoTool.h +++ b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetEtHypoTool.h @@ -50,15 +50,13 @@ class TrigBjetEtHypoTool : virtual public ::AthAlgTool { return m_id; } - StatusCode decide( const xAOD::JetContainer*,bool& ) const; + StatusCode decide( const xAOD::Jet*,bool& ) const; private: HLT::Identifier m_id; /** @brief DeclareProperty: if acceptAll flag is set to true, every event is taken. */ Gaudi::Property< bool > m_acceptAll {this,"AcceptAll",false,"if acceptAll flag is set to true, every event is taken"}; - /** @brief DeclareProperty: Multeplicity requirement. */ - Gaudi::Property< int > m_multeplicity {this,"Multeplicity",1,"Multeplicity requirement"}; /** @brief DeclareProperty: Et threshold cut. */ Gaudi::Property< float > m_etThreshold {this,"EtThreshold",0.0,"Et threshold cut"}; }; diff --git a/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigGSCFexMT.cxx b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigGSCFexMT.cxx index e202896b774dde26fa263e4fe0c5b49488704291..c4374758624496829c99c460d2f85318a5b95ffa 100644 --- a/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigGSCFexMT.cxx +++ b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigGSCFexMT.cxx @@ -199,9 +199,10 @@ StatusCode TrigGSCFexMT::execute() { // ** Store Output // ============================================================================================================================== + ATH_MSG_DEBUG( "Storing calibrated jets as " << m_jetOutputKey.key() ); SG::WriteHandle< xAOD::JetContainer > outputJetContainerHandle = SG::makeHandle( m_jetOutputKey,ctx ); ATH_CHECK( outputJetContainerHandle.record( std::move(calibrateJets),std::move(calibratedJetsAux) ) ); - + ATH_MSG_DEBUG( "Exiting" ); return StatusCode::SUCCESS; } diff --git a/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt b/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt index 898dc0d56740f4c090ca720cd39d3cfebbce779d..9c99a525b2e1eb36491d347c440737dea18e2226 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt +++ b/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt @@ -176,6 +176,14 @@ atlas_add_test( bJetMenu PROPERTIES WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_bJetMenu ) +file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_bJetMenuALLTE ) +atlas_add_test( bJetMenuALLTE + SCRIPT test/test_bjet_menuALLTE.sh + PROPERTIES TIMEOUT 1000 + EXTRA_PATTERNS "-s TrigSignatureMoniMT.*HLT_.*" + PROPERTIES WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_bJetMenuALLTE + ) + file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_met ) atlas_add_test( met diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/bjetMenuDefs.py b/Trigger/TrigValidation/TrigUpgradeTest/python/bjetMenuDefs.py index 1e9b7244cdf691c6578150e91f964b643a837e7c..e6201785dd50f52116a92e2a825e555c06a10706 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/python/bjetMenuDefs.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/bjetMenuDefs.py @@ -104,10 +104,8 @@ def bJetStep1Sequence(): hypo.OutputLevel = DEBUG hypo.Jets = jetSplitter.OutputJets hypo.RoIs = jetSplitter.OutputRoi - hypo.PrimaryVertex = jetSplitter.OutputVertex - hypo.RoILink = "initialRoI" # To be used in following step EventView + hypo.RoILink = "step1RoI" # To be used in following step EventView hypo.JetLink = "jets" # To be used in following step with EventView - hypo.MultipleDecisions = True # For creating multiple decisions in the next step # Sequence BjetAthSequence = seqAND("BjetAthSequence_step1",eventAlgs + [InputMakerAlg,recoSequence,bJetEtSequence]) @@ -176,10 +174,8 @@ def bJetStep1SequenceALLTE(): hypo.OutputLevel = DEBUG hypo.Jets = jetSplitter.OutputJets hypo.RoIs = jetSplitter.OutputRoi - hypo.PrimaryVertex = jetSplitter.OutputVertex hypo.RoILink = "initialRoI" # To be used in following step EventView hypo.JetLink = "jets" # To be used in following step with EventView - hypo.MultipleDecisions = False # For creating multiple decisions in the next step # Sequence BjetAthSequence = seqAND("BjetAthSequence_step1_ALLTE",eventAlgs + [InputMakerAlg,recoSequence,bJetEtSequence]) @@ -209,7 +205,7 @@ def bJetStep2Sequence(): InputMakerAlg.Views = "BJetViews" # Name of output view # RoIs InputMakerAlg.InViewRoIs = "InViewRoIs" # Name RoIs are inserted in the view - InputMakerAlg.RoIsLink = "initialRoI" # RoIs linked to previous decision + InputMakerAlg.RoIsLink = "step1RoI" # RoIs linked to previous decision # Jets InputMakerAlg.InViewJets = "InViewJets" # Name Jets are inserted in the view InputMakerAlg.JetsLink = "jets" # Jets linked to previous decision @@ -233,12 +229,11 @@ def bJetStep2Sequence(): from TrigBjetHypo.TrigBjetEtHypoTool import TrigBjetEtHypoToolFromName_gsc hypo = TrigBjetEtHypoAlgMT("TrigBjetEtHypoAlg_step2") hypo.OutputLevel = DEBUG - hypo.RoIs = "initialRoI" #InputMakerAlg.InViewRoIs + hypo.RoIs = "step1RoI" hypo.Jets = theGSC.JetOutputKey - hypo.PrimaryVertex = "PrimaryVertex" hypo.RoILink = InputMakerAlg.RoIsLink # To be used in following step EventView hypo.JetLink = InputMakerAlg.JetsLink # To be used in following step with EventView - hypo.UseView = True + hypo.ReadFromView = True # Sequence BjetAthSequence = seqAND("BjetAthSequence_step2",[InputMakerAlg,step2Sequence]) @@ -259,7 +254,7 @@ def bJetStep2SequenceALLTE(): InputMakerAlg = InputMakerForRoI("BJetInputMaker_step2_ALLTE") InputMakerAlg.OutputLevel = DEBUG InputMakerAlg.LinkName="initialRoI" - InputMakerAlg.RoIs="SplitJets" +# InputMakerAlg.RoIs="SplitJets" # TMP commenting # gsc correction from TrigBjetHypo.TrigGSCFexMTConfig import getGSCFexSplitInstance @@ -275,8 +270,7 @@ def bJetStep2SequenceALLTE(): hypo = TrigBjetEtHypoAlgMT("TrigBjetEtHypoAlg_step2ALLTE") hypo.OutputLevel = DEBUG hypo.Jets = theGSC.JetOutputKey - hypo.RoIs = InputMakerAlg.RoIs - hypo.PrimaryVertex = "PrimaryVertex" + hypo.RoIs = "SplitJets" hypo.RoILink = "initialRoI" hypo.JetLink = "jets" diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/bJetMenu.ref b/Trigger/TrigValidation/TrigUpgradeTest/share/bJetMenu.ref index 476ac3bc5b02bde324d59450174c5d07570f9678..bf716b4bc559821984a2cfa5718aef8d52a1b301 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/bJetMenu.ref +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/bJetMenu.ref @@ -1,6 +1,6 @@ TrigSignatureMoniMT INFO HLT_j35_gsc45_bmv2c1070 100 100 30 24 24 -TrigSignatureMoniMT INFO HLT_j35_gsc45_bmv2c1070 decisions 1052 24 +TrigSignatureMoniMT INFO HLT_j35_gsc45_bmv2c1070 decisions 237 97 TrigSignatureMoniMT INFO HLT_j35_gsc45_bmv2c1070_split 100 100 30 24 24 -TrigSignatureMoniMT INFO HLT_j35_gsc45_bmv2c1070_split decisions 1052 24 +TrigSignatureMoniMT INFO HLT_j35_gsc45_bmv2c1070_split decisions 237 97 TrigSignatureMoniMT INFO HLT_j35_gsc45_boffperf_split 100 100 30 24 24 -TrigSignatureMoniMT INFO HLT_j35_gsc45_boffperf_split decisions 1052 24 +TrigSignatureMoniMT INFO HLT_j35_gsc45_boffperf_split decisions 237 97 diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/bJetMenuALLTE.ref b/Trigger/TrigValidation/TrigUpgradeTest/share/bJetMenuALLTE.ref new file mode 100644 index 0000000000000000000000000000000000000000..bf716b4bc559821984a2cfa5718aef8d52a1b301 --- /dev/null +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/bJetMenuALLTE.ref @@ -0,0 +1,6 @@ +TrigSignatureMoniMT INFO HLT_j35_gsc45_bmv2c1070 100 100 30 24 24 +TrigSignatureMoniMT INFO HLT_j35_gsc45_bmv2c1070 decisions 237 97 +TrigSignatureMoniMT INFO HLT_j35_gsc45_bmv2c1070_split 100 100 30 24 24 +TrigSignatureMoniMT INFO HLT_j35_gsc45_bmv2c1070_split decisions 237 97 +TrigSignatureMoniMT INFO HLT_j35_gsc45_boffperf_split 100 100 30 24 24 +TrigSignatureMoniMT INFO HLT_j35_gsc45_boffperf_split decisions 237 97 diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/bjet.menu.ALLTE.py b/Trigger/TrigValidation/TrigUpgradeTest/share/bjet.menu.ALLTE.py new file mode 100644 index 0000000000000000000000000000000000000000..c523e665edaf25c8df79725b6ae796df814099f0 --- /dev/null +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/bjet.menu.ALLTE.py @@ -0,0 +1,52 @@ +# +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# + +# import flags +include("TrigUpgradeTest/testHLT_MT.py") + +########################################## +# menu +########################################## +from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import Chain, ChainStep + +# We should retrieve all the steps here +from TrigUpgradeTest.bjetMenuDefs import getBJetSequence +step1 = ChainStep("Step1ALLTE_bjet", [getBJetSequence('jALLTE')]) +step2 = ChainStep("Step2ALLTE_bjet", [getBJetSequence('gscALLTE')]) + +testChains = [ + Chain(name='HLT_j35_gsc45_boffperf_split' , Seed="L1_J20", ChainSteps=[step1,step2] ), + Chain(name='HLT_j35_gsc45_bmv2c1070_split', Seed="L1_J20", ChainSteps=[step1,step2] ), + Chain(name='HLT_j35_gsc45_bmv2c1070' , Seed="L1_J20", ChainSteps=[step1,step2] ) + ] + +################################# +# Configure L1Decoder +################################# + + + +# this is a temporary hack to include new test chains +EnabledChainNamesToCTP = dict([ (c.name, c.seed) for c in testChains]) +topSequence.L1DecoderTest.ChainToCTPMapping = EnabledChainNamesToCTP + +################################# + +topSequence.L1DecoderTest.prescaler.Prescales = ["HLT_j35_gsc45_boffperf_split:1", + "HLT_j35_gsc45_bmv2c1070_split:1", + "HLT_j35_gsc45_bmv2c1070:1"] + + +##### Make all HLT ####### +from TriggerMenuMT.HLTMenuConfig.Menu.HLTCFConfig import makeHLTTree +makeHLTTree(testChains) + +########################################## +# Some debug +########################################## +from AthenaCommon.AlgSequence import dumpSequence +dumpSequence(topSequence) + + + diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/bjet.menu.py b/Trigger/TrigValidation/TrigUpgradeTest/share/bjet.menu.py index 99f779fb72ed55bf1653273b6c46ac02468f4abf..2e3f865e3b6642ab613b17632f8d13165db6da0c 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/bjet.menu.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/bjet.menu.py @@ -12,8 +12,6 @@ from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import Chain, ChainStep # We should retrieve all the steps here from TrigUpgradeTest.bjetMenuDefs import getBJetSequence -step1ALLTE = ChainStep("Step1ALLTE_bjet", [getBJetSequence('jALLTE')]) -step2ALLTE = ChainStep("Step2ALLTE_bjet", [getBJetSequence('gscALLTE')]) step1 = ChainStep("Step1_bjet", [getBJetSequence('j')]) step2 = ChainStep("Step2_bjet", [getBJetSequence('gsc')]) diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_bjet_menuALLTE.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_bjet_menuALLTE.sh new file mode 100755 index 0000000000000000000000000000000000000000..f2f71432d370afd831e1ad957d2e6fbb33e8fdc7 --- /dev/null +++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_bjet_menuALLTE.sh @@ -0,0 +1,5 @@ +#!/bin/sh +# art-type: build +# art-include: master/Athena + +athena --threads=1 --skipEvents=0 --evtMax=100 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" TrigUpgradeTest/bjet.menu.ALLTE.py