Skip to content
Snippets Groups Projects
Commit e1dba885 authored by Edward Moyse's avatar Edward Moyse
Browse files

Merge branch 'muonEFFS' into 'master'

Full scan muon trigger updates

See merge request atlas/athena!21872
parents 9ece1f52 e3b880ed
No related branches found
No related tags found
No related merge requests found
Showing
with 319 additions and 84 deletions
......@@ -609,6 +609,10 @@ class TrigFastTrackFinder_Muon(TrigFastTrackFinderBase):
def __init__(self, name = "TrigFastTrackFinder_Muon"):
TrigFastTrackFinderBase.__init__(self, "TrigFastTrackFinder_Muon","Muon")
class TrigFastTrackFinder_MuonFS(TrigFastTrackFinderBase):
def __init__(self, name = "TrigFastTrackFinder_MuonFS"):
TrigFastTrackFinderBase.__init__(self, "TrigFastTrackFinder_MuonFS","Muon")
class TrigFastTrackFinder_eGamma(TrigFastTrackFinderBase):
def __init__(self, name = "TrigFastTrackFinder_eGamma"):
TrigFastTrackFinderBase.__init__(self, "TrigFastTrackFinder_eGamma","eGamma")
......
......@@ -95,28 +95,29 @@ StatusCode TrigMuonEFCombinerHypoAlg::execute( const EventContext& context ) con
// It is posisble that no muons are found, in this case we go to the next decision
if(muonHandle->size()==0) continue;
// this code only gets muon 0. The EF algorithms can potentially make more than 1 muon, so may need to revisit this
auto muonEL = ViewHelper::makeLink( *viewEL, muonHandle, 0 );
ATH_CHECK( muonEL.isValid() );
//loop over muons (more than one muon can be found by EF algos)
for(uint i=0; i<muonHandle->size(); i++){
auto muonEL = ViewHelper::makeLink( *viewEL, muonHandle, i );
ATH_CHECK( muonEL.isValid() );
const xAOD::Muon* muon = *muonEL;
// create new decisions
auto newd = newDecisionIn( decisions );
// pussh_back to toolInput
toolInput.emplace_back( newd, roi, muon, previousDecision );
newd -> setObjectLink( "feature", muonEL );
newd -> setObjectLink( "roi", roiEL );
newd -> setObjectLink( "view", viewEL );
TrigCompositeUtils::linkToPrevious( newd, previousDecision );
ATH_MSG_DEBUG("REGTEST: " << m_muonKey.key() << " pT = " << (*muonEL)->pt() << " GeV");
ATH_MSG_DEBUG("REGTEST: " << m_muonKey.key() << " eta/phi = " << (*muonEL)->eta() << "/" << (*muonEL)->phi());
ATH_MSG_DEBUG("REGTEST: RoI = eta/phi = " << (*roiEL)->eta() << "/" << (*roiEL)->phi());
ATH_MSG_DEBUG("Added view, roi, feature, previous decision to new decision "<<counter <<" for view "<<(*viewEL)->name() );
const xAOD::Muon* muon = *muonEL;
// create new decisions
auto newd = newDecisionIn( decisions );
// pussh_back to toolInput
toolInput.emplace_back( newd, roi, muon, previousDecision );
newd -> setObjectLink( "feature", muonEL );
newd -> setObjectLink( "roi", roiEL );
newd -> setObjectLink( "view", viewEL );
TrigCompositeUtils::linkToPrevious( newd, previousDecision );
ATH_MSG_DEBUG("REGTEST: " << m_muonKey.key() << " pT = " << (*muonEL)->pt() << " GeV");
ATH_MSG_DEBUG("REGTEST: " << m_muonKey.key() << " eta/phi = " << (*muonEL)->eta() << "/" << (*muonEL)->phi());
ATH_MSG_DEBUG("REGTEST: RoI = eta/phi = " << (*roiEL)->eta() << "/" << (*roiEL)->phi());
ATH_MSG_DEBUG("Added view, roi, feature, previous decision to new decision "<<counter <<" for view "<<(*viewEL)->name() );
}
counter++;
}
......
......@@ -73,7 +73,6 @@ StatusCode TrigMuonEFMSonlyHypoAlg::execute( const EventContext& context ) const
std::vector<TrigMuonEFMSonlyHypoTool::MuonEFInfo> toolInput;
size_t counter = 0; // view counter
// loop over previous decisions
for (const auto previousDecision: *previousDecisionsHandle ) {
// get RoIs
......@@ -95,29 +94,30 @@ StatusCode TrigMuonEFMSonlyHypoAlg::execute( const EventContext& context ) const
// It is posisble that no muons are found, in this case we go to the next decision
if(muonHandle->size()==0) continue;
// this code only gets muon 0. The EF algorithms can potentially make more than 1 muon, so may need to revisit this
auto muonEL = ViewHelper::makeLink( *viewEL, muonHandle, 0 );
ATH_CHECK( muonEL.isValid() );
const xAOD::Muon* muon = *muonEL;
//loop over muons (more than one muon can be found by EF algos)
for(uint i=0; i<muonHandle->size(); i++){
auto muonEL = ViewHelper::makeLink( *viewEL, muonHandle, i );
ATH_CHECK( muonEL.isValid() );
// create new decisions
auto newd = newDecisionIn( decisions );
const xAOD::Muon* muon = *muonEL;
// pussh_back to toolInput
toolInput.emplace_back( newd, roi, muon, previousDecision );
// create new decisions
auto newd = newDecisionIn( decisions );
newd -> setObjectLink( "feature", muonEL );
newd -> setObjectLink( "roi", roiEL );
newd -> setObjectLink( "view", viewEL );
TrigCompositeUtils::linkToPrevious( newd, previousDecision );
// pussh_back to toolInput
toolInput.emplace_back( newd, roi, muon, previousDecision );
newd -> setObjectLink( "feature", muonEL );
newd -> setObjectLink( "roi", roiEL );
newd -> setObjectLink( "view", viewEL );
TrigCompositeUtils::linkToPrevious( newd, previousDecision );
ATH_MSG_DEBUG("REGTEST: " << m_muonKey.key() << " pT = " << (*muonEL)->pt() << " GeV");
ATH_MSG_DEBUG("REGTEST: " << m_muonKey.key() << " eta/phi = " << (*muonEL)->eta() << "/" << (*muonEL)->phi());
ATH_MSG_DEBUG("REGTEST: RoI = eta/phi = " << (*roiEL)->eta() << "/" << (*roiEL)->phi());
ATH_MSG_DEBUG("Added view, roi, feature, previous decision to new decision "<<counter <<" for view "<<(*viewEL)->name() );
counter++;
ATH_MSG_DEBUG("REGTEST: " << m_muonKey.key() << " pT = " << (*muonEL)->pt() << " GeV");
ATH_MSG_DEBUG("REGTEST: " << m_muonKey.key() << " eta/phi = " << (*muonEL)->eta() << "/" << (*muonEL)->phi());
ATH_MSG_DEBUG("REGTEST: RoI = eta/phi = " << (*roiEL)->eta() << "/" << (*roiEL)->phi());
ATH_MSG_DEBUG("Added view, roi, feature, previous decision to new decision "<<counter <<" for view "<<(*viewEL)->name() );
}
counter++;
}
ATH_MSG_DEBUG("Found "<<toolInput.size()<<" inputs to tools");
......
......@@ -14,6 +14,7 @@ atlas_depends_on_subdirs( PUBLIC
Event/xAOD/xAODTrigCalo
Event/xAOD/xAODTrigEgamma
Event/xAOD/xAODJet
Event/xAOD/xAODMuon
PRIVATE
Control/AthViews
Control/StoreGate
......@@ -27,7 +28,7 @@ atlas_depends_on_subdirs( PUBLIC
atlas_add_library( ViewAlgsLib
src/*.cxx
PUBLIC_HEADERS ViewAlgs
LINK_LIBRARIES xAODTrigger GaudiKernel AthViews xAODTrigCalo xAODTrigEgamma xAODJet
LINK_LIBRARIES xAODTrigger GaudiKernel AthViews xAODTrigCalo xAODTrigEgamma xAODJet xAODMuon
PRIVATE_LINK_LIBRARIES AthenaBaseComps CxxUtils TrigConfHLTData TrigSteeringEvent DecisionHandlingLib )
atlas_add_component( ViewAlgs
......
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
*/
///
/// General-purpose view creation algorithm <bwynne@cern.ch>
///
#include "EventViewCreatorAlgorithmWithMuons.h"
#include "AthLinks/ElementLink.h"
#include "AthViews/ViewHelper.h"
#include "AthViews/View.h"
#include "DecisionHandling/TrigCompositeUtils.h"
#include "DecisionHandling/HLTIdentifier.h"
using namespace TrigCompositeUtils;
EventViewCreatorAlgorithmWithMuons::EventViewCreatorAlgorithmWithMuons( const std::string& name, ISvcLocator* pSvcLocator )
: EventViewCreatorAlgorithm( name, pSvcLocator ) {
declareProperty("RoIEtaWidth", m_roiEtaWidth=0.1);
declareProperty("RoIPhiWidth", m_roiPhiWidth=0.1);
}
EventViewCreatorAlgorithmWithMuons::~EventViewCreatorAlgorithmWithMuons() {}
StatusCode EventViewCreatorAlgorithmWithMuons::initialize() {
EventViewCreatorAlgorithm::initialize();
ATH_CHECK( m_inViewMuons.initialize() );
return StatusCode::SUCCESS;
}
StatusCode EventViewCreatorAlgorithmWithMuons::execute( const EventContext& context ) const {
// create the output decisions, similar to inputs (copy basic links)
std::vector< SG::WriteHandle<TrigCompositeUtils::DecisionContainer> > outputHandles;
ATH_CHECK (decisionInputToOutput(context, outputHandles));
// make the views
auto viewsHandle = SG::makeHandle( m_viewsKey );
auto viewVector1 = std::make_unique< ViewContainer >();
ATH_CHECK( viewsHandle.record( std::move( viewVector1 ) ) );
auto viewVector = viewsHandle.ptr();
auto contexts = std::vector<EventContext>( );
unsigned int viewCounter = 0;
unsigned int conditionsRun = context.getExtension<Atlas::ExtendedEventContext>().conditionsRun();
//map all RoIs that are stored
std::vector <ElementLink<TrigRoiDescriptorCollection> > RoIsFromDecision;
for (auto outputHandle: outputHandles) {
if( not outputHandle.isValid() ) {
ATH_MSG_DEBUG( "Got no decisions from output "<< outputHandle.key() << " because handle not valid");
continue;
}
if( outputHandle->size() == 0){ // input filtered out
ATH_MSG_ERROR( "Got no decisions from output "<< outputHandle.key()<<": handle is valid but container is empty. Is this expected?");
return StatusCode::FAILURE;
}
ATH_MSG_DEBUG( "Got output "<< outputHandle.key()<<" with " << outputHandle->size() << " elements" );
// loop over output decisions in container of outputHandle, follow link to inputDecision
for ( auto outputDecision : *outputHandle){
ElementLinkVector<DecisionContainer> inputLinks = getLinkToPrevious(outputDecision);
// 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 );
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
context, // Source context
m_scheduler.get() ) );
ATH_CHECK( debugPrintOut(context, outputHandles) );
return StatusCode::SUCCESS;
}
StatusCode EventViewCreatorAlgorithmWithMuons::placeMuonInView( const xAOD::Muon* theObject, SG::View* view, const EventContext& context ) const {
// fill the Muon output collection
ATH_MSG_DEBUG( "Adding Muon To View : " << m_inViewMuons.key() );
auto oneObjectCollection = std::make_unique< ConstDataVector< xAOD::MuonContainer > >();
oneObjectCollection->clear( SG::VIEW_ELEMENTS );
oneObjectCollection->push_back( theObject );
//store in the view
auto handle = SG::makeHandle( m_inViewMuons,context );
ATH_CHECK( handle.setProxyDict( view ) );
ATH_CHECK( handle.record( std::move( oneObjectCollection ) ) );
return StatusCode::SUCCESS;
}
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
*/
#ifndef ViewAlgs_EventViewCreatorAlgorithmWithMuons_h
#define ViewAlgs_EventViewCreatorAlgorithmWithMuons_h
#include "EventViewCreatorAlgorithm.h"
#include "xAODMuon/MuonContainer.h"
#include "xAODMuon/MuonAuxContainer.h"
/**
* @class EventViewCreatorAlgorithmWithMuons
* @brief Used at the start of a sequence to create the EventViews: retrieves filtered collection via menu decision from previous step and writes it out directly so it can be used as input by the reco alg that follows in sequence.
**/
class EventViewCreatorAlgorithmWithMuons : public EventViewCreatorAlgorithm {
public:
EventViewCreatorAlgorithmWithMuons( const std::string& name, ISvcLocator* pSvcLocator );
virtual ~EventViewCreatorAlgorithmWithMuons();
virtual StatusCode initialize() override;
virtual StatusCode execute(const EventContext&) const override;
private:
StatusCode placeMuonInView( const xAOD::Muon* theObject,
SG::View* view,
const EventContext& context ) const;
EventViewCreatorAlgorithmWithMuons();
SG::WriteHandleKey< ConstDataVector<xAOD::MuonContainer> > m_inViewMuons {this,"InViewMuons","Unspecified","Name with which the Muons should be inserted into the views"};
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;
};
#endif
......@@ -2,11 +2,13 @@
#include "../EventViewCreatorAlgorithm.h"
#include "../EventViewCreatorAlgorithmWithJets.h"
#include "../EventViewCreatorAlgorithmWithMuons.h"
#include "../MergeViews.h"
DECLARE_COMPONENT( EventViewCreatorAlgorithm )
DECLARE_COMPONENT( EventViewCreatorAlgorithmWithJets )
DECLARE_COMPONENT( EventViewCreatorAlgorithmWithMuons )
DECLARE_COMPONENT( MergeViews )
......@@ -564,7 +564,7 @@ def muEFSARecoSequence( RoIs, name, OutputLevel=INFO ):
def muEFCBRecoSequence( RoIs, OutputLevel=INFO ):
def muEFCBRecoSequence( RoIs, name, OutputLevel=INFO ):
from MuonRecExample.MuonRecFlags import muonRecFlags
from AthenaCommon.DetFlags import DetFlags
......@@ -578,10 +578,34 @@ def muEFCBRecoSequence( RoIs, OutputLevel=INFO ):
from AthenaCommon.CFElements import parOR, seqAND, seqOR, stepSeq
efAlgs = []
muEFCBRecoSequence = parOR("efcbViewNode")
muEFCBRecoSequence = parOR("efcbViewNode_"+name)
#Need ID tracking related objects and MS tracks from previous steps
ViewVerifyTrk = CfgMgr.AthViews__ViewDataVerifier("muonCBViewDataVerifier")
ViewVerifyTrk.DataObjects = [( 'xAOD::TrackParticleContainer' , 'StoreGateSvc+xAODTracks' ),( 'SCT_FlaggedCondData' , 'StoreGateSvc+SCT_FlaggedCondData' ), ( 'InDetBSErrContainer' , 'StoreGateSvc+SCT_ByteStreamErrs' ), ( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' ),( 'xAOD::IParticleContainer' , 'StoreGateSvc+xAODTracks' ),( 'SCT_ByteStreamFractionContainer' , 'StoreGateSvc+SCT_ByteStreamFrac' ),( 'Muon::CscStripPrepDataContainer' , 'StoreGateSvc+CSC_Measurements' ), ( 'Muon::MdtPrepDataContainer' , 'StoreGateSvc+MDT_DriftCircles' ), ( 'xAOD::TrackParticleContainer' , 'StoreGateSvc+MuonSpectrometerTrackParticles' ) ]
ViewVerifyTrk.DataObjects = [( 'Muon::CscStripPrepDataContainer' , 'StoreGateSvc+CSC_Measurements' ), ( 'Muon::MdtPrepDataContainer' , 'StoreGateSvc+MDT_DriftCircles' ), ( 'xAOD::TrackParticleContainer' , 'StoreGateSvc+MuonSpectrometerTrackParticles' ) ]
eventAlgs=[]
if "FS" in name:
#Need to run tracking for full scan chains
from TriggerMenuMT.HLTMenuConfig.CommonSequences.InDetSetup import makeInDetAlgs
(viewAlgs, eventAlgs) = makeInDetAlgs("MuonFS")
from TrigFastTrackFinder.TrigFastTrackFinder_Config import TrigFastTrackFinder_MuonFS
theFTF_Muon = TrigFastTrackFinder_MuonFS()
theFTF_Muon.OutputLevel = OutputLevel
theFTF_Muon.isRoI_Seeded = True
viewAlgs.append(theFTF_Muon)
#TrackParticlesName = ""
for viewAlg in viewAlgs:
muEFCBRecoSequence += viewAlg
viewAlg.OutputLevel = OutputLevel
if viewAlg.properties().has_key("RoIs"):
viewAlg.RoIs = RoIs
if viewAlg.properties().has_key("roiCollectionName"):
viewAlg.roiCollectionName = RoIs
if viewAlg.name() == "InDetTrigTrackParticleCreatorAlg":
TrackParticlesName = viewAlg.TrackParticlesName
else:
ViewVerifyTrk.DataObjects += [( 'xAOD::TrackParticleContainer' , 'StoreGateSvc+xAODTracks' ),( 'SCT_FlaggedCondData' , 'StoreGateSvc+SCT_FlaggedCondData' ), ( 'InDetBSErrContainer' , 'StoreGateSvc+SCT_ByteStreamErrs' ), ( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' ),( 'xAOD::IParticleContainer' , 'StoreGateSvc+xAODTracks' ),( 'SCT_ByteStreamFractionContainer' , 'StoreGateSvc+SCT_ByteStreamFrac' ) ]
muEFCBRecoSequence += ViewVerifyTrk
......@@ -594,7 +618,10 @@ def muEFCBRecoSequence( RoIs, OutputLevel=INFO ):
#When run in a different view than FTF some data dependencies needs to be loaded through verifier
#Pass verifier as an argument and it will automatically append necessary DataObjects
#@NOTE: Don't provide any verifier if loaded in the same view as FTF
PTTracks, PTTrackParticles, PTAlgs = makeInDetPrecisionTracking( "muons", ViewVerifyTrk )
if 'FS' in name:
PTTracks, PTTrackParticles, PTAlgs = makeInDetPrecisionTracking( "muonsFS" )
else:
PTTracks, PTTrackParticles, PTAlgs = makeInDetPrecisionTracking( "muons", ViewVerifyTrk )
#Get last tracks from the list as input for other alg
......@@ -609,46 +636,46 @@ def muEFCBRecoSequence( RoIs, OutputLevel=INFO ):
trackParticles = PTTrackParticles[-1]
#Make InDetCandidates
theIndetCandidateAlg = CfgMgr.MuonCombinedInDetCandidateAlg("TrigMuonCombinedInDetCandidateAlg",TrackSelector=getPublicTool("MuonCombinedInDetDetailedTrackSelectorTool"),TrackParticleLocation = [ trackParticles ],ForwardParticleLocation=trackParticles,OutputLevel=DEBUG)
theIndetCandidateAlg = CfgMgr.MuonCombinedInDetCandidateAlg("TrigMuonCombinedInDetCandidateAlg_"+name,TrackSelector=getPublicTool("MuonCombinedInDetDetailedTrackSelectorTool"),TrackParticleLocation = [trackParticles],ForwardParticleLocation=trackParticles,OutputLevel=DEBUG)
#MuonCombinedCandidates
theCaloMeasTool = getPublicToolClone("TrigCaloMeasTool", "MuidCaloEnergyMeas", CaloNoiseTool="", UseCaloNoiseTool=False,CellContainerLocation="")
theCaloEnergyTool = getPublicToolClone("TrigCaloEnergyTool", "MuidCaloEnergyTool", CaloMeasTool = theCaloMeasTool, EnergyLossMeasurement=False, MopParametrization=True, TrackIsolation=False)
theCaloMeasTool = getPublicToolClone("TrigCaloMeasTool_"+name, "MuidCaloEnergyMeas", CaloNoiseTool="", UseCaloNoiseTool=False,CellContainerLocation="")
theCaloEnergyTool = getPublicToolClone("TrigCaloEnergyTool_"+name, "MuidCaloEnergyTool", CaloMeasTool = theCaloMeasTool, EnergyLossMeasurement=False, MopParametrization=True, TrackIsolation=False)
from TrkExRungeKuttaIntersector.TrkExRungeKuttaIntersectorConf import Trk__IntersectorWrapper as Propagator
TrigMuonPropagator = Propagator(name = 'TrigMuonPropagator')
ToolSvc += TrigMuonPropagator
theCaloTSOS = getPublicToolClone("TrigCaloTrackStateOnSurface", "MuidCaloTrackStateOnSurface", CaloEnergyDeposit=theCaloEnergyTool, CaloEnergyParam=theCaloEnergyTool, Propagator =TrigMuonPropagator, MinRemainingEnergy= 200, ParamPtCut= 3000)
theCaloTSOS = getPublicToolClone("TrigCaloTrackStateOnSurface_"+name, "MuidCaloTrackStateOnSurface", CaloEnergyDeposit=theCaloEnergyTool, CaloEnergyParam=theCaloEnergyTool, Propagator =TrigMuonPropagator, MinRemainingEnergy= 200, ParamPtCut= 3000)
from MuidCaloScatteringTools.MuidCaloScatteringToolsConf import Rec__MuidMaterialEffectsOnTrackProvider
Rec__MuidMaterialEffectsOnTrackProvider.TSOSTool=theCaloTSOS
theErrorOptimiser = getPublicToolClone("TrigMuonErrorOptimiser", "MuonErrorOptimisationTool", PrepareForFit=False, RecreateStartingParameters=False,RefitTool=getPublicToolClone("TrigMuidRefitTool", "MuonRefitTool", AlignmentErrors = False, Fitter = CfgGetter.getPublicTool("iPatFitter")))
theErrorOptimiser = getPublicToolClone("TrigMuonErrorOptimiser_"+name, "MuonErrorOptimisationTool", PrepareForFit=False, RecreateStartingParameters=False,RefitTool=getPublicToolClone("TrigMuidRefitTool_"+name, "MuonRefitTool", AlignmentErrors = False, Fitter = CfgGetter.getPublicTool("iPatFitter")))
theTrackCleaner = getPublicToolClone("TrigMuonTrackCleaner", "MuonTrackCleaner", Fitter='TMEF_iPatFitter', SLFitter='TMEF_iPatFitter')
theTrackCleaner = getPublicToolClone("TrigMuonTrackCleaner_"+name, "MuonTrackCleaner", Fitter='TMEF_iPatFitter', SLFitter='TMEF_iPatFitter')
theTrackBuilderTool = getPublicToolClone("TrigCombinedMuonTrackBuilder","CombinedMuonTrackBuilder", UseCaloTG = True, CaloTSOS=theCaloTSOS, CaloMaterialProvider='TMEF_TrkMaterialProviderTool', MuonHoleRecovery="",OutputLevel=DEBUG,CaloEnergyParam=theCaloEnergyTool,MuonErrorOptimizer=theErrorOptimiser, Fitter='TMEF_iPatFitter', MaterialAllocator="TMEF_MaterialAllocator", Propagator=TrigMuonPropagator, LargeMomentumError=0.5, PerigeeAtSpectrometerEntrance=True, ReallocateMaterial=False, TrackSummaryTool=getPublicTool("CombinedMuonTrackSummary"), Cleaner=theTrackCleaner)
theTrackQuery = getPublicToolClone("TrigMuonTrackQuery", "MuonTrackQuery", Fitter=theTrackBuilderTool)
theTrackBuilderTool = getPublicToolClone("TrigCombinedMuonTrackBuilder_"+name,"CombinedMuonTrackBuilder", UseCaloTG = True, CaloTSOS=theCaloTSOS, CaloMaterialProvider='TMEF_TrkMaterialProviderTool', MuonHoleRecovery="",OutputLevel=DEBUG,CaloEnergyParam=theCaloEnergyTool,MuonErrorOptimizer=theErrorOptimiser, Fitter='TMEF_iPatFitter', MaterialAllocator="TMEF_MaterialAllocator", Propagator=TrigMuonPropagator, LargeMomentumError=0.5, PerigeeAtSpectrometerEntrance=True, ReallocateMaterial=False, TrackSummaryTool=getPublicTool("CombinedMuonTrackSummary"), Cleaner=theTrackCleaner)
theTrackQuery = getPublicToolClone("TrigMuonTrackQuery_"+name, "MuonTrackQuery", Fitter=theTrackBuilderTool)
theCandidateToolCB = getPublicToolClone("TrigMuonCandidateTool_CB", "MuonCandidateTool", TrackBuilder=theTrackBuilderTool,OutputLevel=DEBUG)
theMuonCombinedCandidateAlg = CfgMgr.MuonCombinedMuonCandidateAlg("TrigMuonCombinedMuonCandidateAlg",MuonCandidateTool=theCandidateToolCB,MuonCandidateLocation="CombinedMuonCandidates", OutputLevel=DEBUG)
theCandidateToolCB = getPublicToolClone("TrigMuonCandidateTool_CB_"+name, "MuonCandidateTool", TrackBuilder=theTrackBuilderTool,OutputLevel=DEBUG)
theMuonCombinedCandidateAlg = CfgMgr.MuonCombinedMuonCandidateAlg("TrigMuonCombinedMuonCandidateAlg_"+name,MuonCandidateTool=theCandidateToolCB,MuonCandidateLocation="CombinedMuonCandidates", OutputLevel=DEBUG)
#MS ID combination
theMuonCombinedFitTagTool = getPublicToolClone("TrigMuonCombinedFitTagTool", "MuonCombinedFitTagTool",TrackBuilder=theTrackBuilderTool,MuonRecovery=getPublicToolClone("TrigMuonRecovery","MuidMuonRecovery", TrackBuilder=theTrackBuilderTool),OutputLevel=DEBUG, TrackQuery=theTrackQuery, MatchQuality = getPublicToolClone("TrigMuonMatchQuality", "MuonMatchQuality", TrackQuery=theTrackQuery))
theMuonCombinedFitTagTool = getPublicToolClone("TrigMuonCombinedFitTagTool_"+name, "MuonCombinedFitTagTool",TrackBuilder=theTrackBuilderTool,MuonRecovery=getPublicToolClone("TrigMuonRecovery_"+name,"MuidMuonRecovery", TrackBuilder=theTrackBuilderTool),OutputLevel=DEBUG, TrackQuery=theTrackQuery, MatchQuality = getPublicToolClone("TrigMuonMatchQuality_"+name, "MuonMatchQuality", TrackQuery=theTrackQuery))
tools=[]
tools.append(theMuonCombinedFitTagTool)
theMuonCombinedTool = getPublicToolClone("TrigMuonCombinedToolCB", "MuonCombinedTool", MuonCombinedTagTools=tools, OutputLevel=DEBUG)
theMuonCombinedAlg = CfgMgr.MuonCombinedAlg("TrigMuonCombinedAlg", MuonCandidateLocation="CombinedMuonCandidates", MuonCombinedTool=theMuonCombinedTool, CombinedTagMaps=["muidcoTagMap"], OutputLevel=DEBUG)
theMuonCombinedTool = getPublicToolClone("TrigMuonCombinedToolCB_"+name, "MuonCombinedTool", MuonCombinedTagTools=tools, OutputLevel=DEBUG)
theMuonCombinedAlg = CfgMgr.MuonCombinedAlg("TrigMuonCombinedAlg_"+name, MuonCandidateLocation="CombinedMuonCandidates", MuonCombinedTool=theMuonCombinedTool, CombinedTagMaps=["muidcoTagMap"], OutputLevel=DEBUG)
#Build muon candidates
theCandidateToolCB = getPublicToolClone("MuonCandidateTool_CB", "MuonCandidateTool", TrackBuilder=theTrackBuilderTool)
theMuonCandidateAlgCB=CfgMgr.MuonCombinedMuonCandidateAlg("MuonCandidateAlgCB",MuonCandidateTool=theCandidateToolCB,MuonCandidateLocation="MuonCandidates", MSOnlyExtrapolatedTrackLocation="MSOnlyMuonTracksForCB")
theCandidateToolCB = getPublicToolClone("MuonCandidateTool_CB_"+name, "MuonCandidateTool", TrackBuilder=theTrackBuilderTool)
theMuonCandidateAlgCB=CfgMgr.MuonCombinedMuonCandidateAlg("MuonCandidateAlgCB_"+name,MuonCandidateTool=theCandidateToolCB,MuonCandidateLocation="MuonCandidates", MSOnlyExtrapolatedTrackLocation="MSOnlyMuonTracksForCB")
#Create xAOD Muons
thecreatortoolCB= getPublicToolClone("MuonCreatorTool_triggerCB", "MuonCreatorTool", ScatteringAngleTool="", CaloMaterialProvider='TMEF_TrkMaterialProviderTool', MuonSelectionTool="", FillTimingInformation=False, OutputLevel=DEBUG, DoCaloNoiseCut=False, UseCaloCells=False)
thecreatortoolCB= getPublicToolClone("MuonCreatorTool_triggerCB_"+name, "MuonCreatorTool", ScatteringAngleTool="", CaloMaterialProvider='TMEF_TrkMaterialProviderTool', MuonSelectionTool="", FillTimingInformation=False, OutputLevel=DEBUG, DoCaloNoiseCut=False, UseCaloCells=False)
themuoncbcreatoralg = CfgMgr.MuonCreatorAlg("MuonCreatorAlgCB", OutputLevel=DEBUG, MuonCandidateLocation="CombinedMuonCandidates")
themuoncbcreatoralg = CfgMgr.MuonCreatorAlg("MuonCreatorAlgCB_"+name, OutputLevel=DEBUG, MuonCandidateLocation="CombinedMuonCandidates")
themuoncbcreatoralg.MuonCreatorTool=thecreatortoolCB
themuoncbcreatoralg.MakeClusters=False
themuoncbcreatoralg.ClusterContainerName=""
......@@ -672,6 +699,6 @@ def muEFCBRecoSequence( RoIs, OutputLevel=INFO ):
sequenceOut = themuoncbcreatoralg.MuonContainerLocation
return muEFCBRecoSequence, sequenceOut
return muEFCBRecoSequence, eventAlgs, sequenceOut
......@@ -52,7 +52,7 @@ muonCombinedRecFlags.doCaloTrkMuId = False
muonCombinedRecFlags.printSummary = False
from RecExConfig.RecFlags import rec
from AthenaCommon.AlgSequence import AthSequencer
from ViewAlgs.ViewAlgsConf import EventViewCreatorAlgorithm
from ViewAlgs.ViewAlgsConf import EventViewCreatorAlgorithm, EventViewCreatorAlgorithmWithMuons
ServiceMgr.ToolSvc.TrigDataAccess.ApplyOffsetCorrection = False
......@@ -202,7 +202,7 @@ def muEFCBStep():
### get EF reco sequence ###
from TrigUpgradeTest.MuonSetup import muEFCBRecoSequence
muEFCBRecoSequence, sequenceOut = muEFCBRecoSequence( efcbViewsMaker.InViewRoIs, OutputLevel=DEBUG )
muEFCBRecoSequence, eventAlgs, sequenceOut = muEFCBRecoSequence( efcbViewsMaker.InViewRoIs, "RoI", OutputLevel=DEBUG )
efcbViewsMaker.ViewNodeName = muEFCBRecoSequence.name()
......@@ -252,6 +252,39 @@ def muEFSAFSStep():
Hypo = trigMuonEFSAFSHypo,
HypoToolGen = TrigMuonEFMSonlyHypoToolFromDict )
### EF CB full scan ###
def muEFCBFSStep():
efcbfsInputMaker = EventViewCreatorAlgorithmWithMuons("EFCBFSInputMaker")
efcbfsInputMaker.ViewFallThrough = True
efcbfsInputMaker.ViewPerRoI = True
efcbfsInputMaker.Views = "MUCBFSViews"
efcbfsInputMaker.InViewRoIs = "MUCBFSRoIs"
efcbfsInputMaker.RoIsLink = "roi"
efcbfsInputMaker.InViewMuons = "InViewMuons"
efcbfsInputMaker.MuonsLink = "feature"
from TrigUpgradeTest.MuonSetup import muEFCBRecoSequence
muEFCBFSRecoSequence, eventAlgs, sequenceOut = muEFCBRecoSequence( efcbfsInputMaker.InViewRoIs, "FS", OutputLevel=DEBUG )
efcbfsInputMaker.ViewNodeName = muEFCBFSRecoSequence.name()
# setup EFCB hypo
from TrigMuonHypoMT.TrigMuonHypoMTConfig import TrigMuonEFCombinerHypoAlg
trigMuonEFCBFSHypo = TrigMuonEFCombinerHypoAlg( "TrigMuonEFFSCombinerHypoAlg" )
trigMuonEFCBFSHypo.OutputLevel = DEBUG
trigMuonEFCBFSHypo.MuonDecisions = sequenceOut
muonEFCBFSSequence = seqAND( "muonEFFSCBSequence", eventAlgs + [efcbfsInputMaker, muEFCBFSRecoSequence] )
from TrigMuonHypoMT.TrigMuonHypoMTConfig import TrigMuonEFCombinerHypoToolFromDict
return MenuSequence( Sequence = muonEFCBFSSequence,
Maker = efcbfsInputMaker,
Hypo = trigMuonEFCBFSHypo,
HypoToolGen = TrigMuonEFCombinerHypoToolFromDict )
### l2Muiso step ###
def muIsoStep():
......
......@@ -39,7 +39,7 @@ if TriggerFlags.doMuon==True:
##########################################
from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import Chain, ChainStep
from TrigUpgradeTest.muMenuDefs import muFastStep, muCombStep, muEFMSStep, muEFSAStep, muIsoStep, muEFCBStep, muEFSAFSStep, inDetSetup
from TrigUpgradeTest.muMenuDefs import muFastStep, muCombStep, muEFMSStep, muEFSAStep, muIsoStep, muEFCBStep, muEFSAFSStep, muEFCBFSStep, inDetSetup
inDetSetup()
......@@ -57,6 +57,8 @@ if TriggerFlags.doMuon==True:
step4muEFCB=ChainStep("Step4_muEFCB", [ muEFCBStep() ])
# Full scan MS tracking step
stepFSmuEFSA=ChainStep("Step_FSmuEFSA", [muEFSAFSStep()])
stepFSmuEFCB=ChainStep("Step_FSmuEFCB", [muEFCBFSStep()])
## single muon trigger
MenuChains += [Chain(name='HLT_mu6fast', Seed="L1_MU6", ChainSteps=[ step1mufast ])]
......@@ -70,7 +72,7 @@ if TriggerFlags.doMuon==True:
MenuChains += [Chain(name='HLT_2mu6', Seed="L1_MU6", ChainSteps=[ step1mufast, step2muComb, step3muEFSA, step4muEFCB ])]
#FS Muon trigger
MenuChains += [Chain(name='HLT_mu6nol1', Seed="L1_MU6", ChainSteps=[stepFSmuEFSA])]
MenuChains += [Chain(name='HLT_mu6nol1', Seed="L1_MU6", ChainSteps=[stepFSmuEFSA, stepFSmuEFCB])]
#################################
......
......@@ -304,7 +304,7 @@ if TriggerFlags.doMuon:
### get EF reco sequence ###
from TrigUpgradeTest.MuonSetup import muEFCBRecoSequence
muEFCBRecoSequence, muEFCBSequenceOut = muEFCBRecoSequence( efCBMuViewsMaker.InViewRoIs, OutputLevel=DEBUG )
muEFCBRecoSequence, eventAlgs, muEFCBSequenceOut = muEFCBRecoSequence( efCBMuViewsMaker.InViewRoIs, "RoI", OutputLevel=DEBUG )
efCBMuViewsMaker.ViewNodeName = muEFCBRecoSequence.name()
......@@ -323,7 +323,7 @@ if TriggerFlags.doMuon:
muonEFCBDecisionsDumper = DumpDecisions("muonEFCBDecisionsDumper", OutputLevel=DEBUG, Decisions = trigMuonEFCBHypo.HypoOutputDecisions )
### make sequence ###
muEFCBSequence = seqAND("muEFCBSequence", [efCBMuViewsMaker, muEFCBRecoSequence, trigMuonEFCBHypo])
muEFCBSequence = seqAND("muEFCBSequence", eventAlgs+[efCBMuViewsMaker, muEFCBRecoSequence, trigMuonEFCBHypo])
### make step ###
muonEFCBStep = stepSeq("muonEFCBStep", filterEFCBAlg, [muEFCBSequence, muonEFCBDecisionsDumper])
......
......@@ -18,19 +18,17 @@ TriggerSummaryStep2 6 0 DEBUG +++ HLT_mu6 ID#16721627
TriggerSummaryStep2 6 0 DEBUG +++ HLT_2mu6Comb ID#2762422737
TriggerSummaryStep2 6 0 DEBUG +++ HLT_2mu6 ID#3347104206
TriggerSummaryStep3 6 0 DEBUG +++ HLT_mu6 ID#1672162766
TriggerSummaryStep3 6 0 DEBUG +++ HLT_2mu6 ID#3347104206
TriggerSummaryStep4 6 0 DEBUG +++ HLT_mu6 ID#1672162766
TrigSignatureMoniMT INFO HLT_2mu6 10 10 1 1 1 0 0
TrigSignatureMoniMT INFO HLT_2mu6 decisions 2 2 2 0
TrigSignatureMoniMT INFO HLT_2mu6 10 10 1 1 0 0 0
TrigSignatureMoniMT INFO HLT_2mu6 decisions 2 2 0 0
TrigSignatureMoniMT INFO HLT_2mu6Comb 10 10 1 1 0 0 1
TrigSignatureMoniMT INFO HLT_2mu6Comb decisions 2 2 0 0
TrigSignatureMoniMT INFO HLT_mu20_ivar 10 10 1 1 1 0 1
TrigSignatureMoniMT INFO HLT_mu20_ivar decisions 1 1 1 0
TrigSignatureMoniMT INFO HLT_mu6 10 10 2 2 1 1 1
TrigSignatureMoniMT INFO HLT_mu6 decisions 3 3 2 1
TrigSignatureMoniMT INFO HLT_mu6 10 10 2 2 1 0 0
TrigSignatureMoniMT INFO HLT_mu6 decisions 3 3 4 0
TrigSignatureMoniMT INFO HLT_mu6Comb 10 10 2 2 0 0 2
TrigSignatureMoniMT INFO HLT_mu6Comb decisions 3 3 0 0
TrigSignatureMoniMT INFO HLT_mu6fast 10 10 2 0 0 0 2
TrigSignatureMoniMT INFO HLT_mu6fast decisions 3 0 0 0
TrigSignatureMoniMT INFO HLT_mu6nol1 10 10 2 0 0 0 2
TrigSignatureMoniMT INFO HLT_mu6nol1 decisions 3 0 0 0
TrigSignatureMoniMT INFO HLT_mu6nol1 10 10 2 0 0 0 0
TrigSignatureMoniMT INFO HLT_mu6nol1 decisions 5 0 0 0
......@@ -15,12 +15,12 @@ def makeInDetAlgs( whichSignature='' ):
#Create IdentifiableCaches
from InDetPrepRawDataFormation.InDetPrepRawDataFormationConf import InDet__CacheCreator
InDetCacheCreatorTrigViews = InDet__CacheCreator(name = "InDetCacheCreatorTrigViews" + signature,
Pixel_ClusterKey = "PixelTrigClustersCache",
SCT_ClusterKey = "SCT_ClustersCache",
SpacePointCachePix = "PixelSpacePointCache",
SpacePointCacheSCT = "SctSpacePointCache",
SCTRDOCacheKey = "SctRDOCache",
PixRDOCacheKey = "PixRDOCache",)
Pixel_ClusterKey = "PixelTrigClustersCache" + signature,
SCT_ClusterKey = "SCT_ClustersCache" + signature,
SpacePointCachePix = "PixelSpacePointCache" + signature,
SpacePointCacheSCT = "SctSpacePointCache" + signature,
SCTRDOCacheKey = "SctRDOCache" + signature,
PixRDOCacheKey = "PixRDOCache" + signature)
#OutputLevel=DEBUG)
eventAlgs.append(InDetCacheCreatorTrigViews)
......@@ -245,7 +245,7 @@ def makeInDetAlgs( whichSignature='' ):
if not hasattr(condSeq, "InDetSiElementPropertiesTableCondAlg"):
# Setup alignment folders and conditions algorithms
from SiSpacePointFormation.SiSpacePointFormationConf import InDet__SiElementPropertiesTableCondAlg
condSeq += InDet__SiElementPropertiesTableCondAlg(name = "InDetSiElementPropertiesTableCondAlg" + signature)
condSeq += InDet__SiElementPropertiesTableCondAlg(name = "InDetSiElementPropertiesTableCondAlg")
from TrigInDetConf.TrigInDetPostTools import InDetTrigParticleCreatorToolFTF
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment