Commit 931c6600 authored by Justin Griffiths's avatar Justin Griffiths Committed by Graeme Stewart
Browse files

r21 tag (TrigTauRec-00-11-00)

	* r21 updates
	* TrigTauRec-00-11-00

2016-04-18 Daniele Zanzi
        * 2016 TES (ATR-12213)
	* TrigTauRec-00-10-11

2016-04-18 Daniele Zanzi
	* Reverting TES to 2015 TES
	* TrigTauRec-00-10-10
parent c95440cc
################################################################################
# Package: TrigTauRec
################################################################################
# Declare the package name:
atlas_subdir( TrigTauRec )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
GaudiKernel
InnerDetector/InDetConditions/InDetBeamSpotService
LumiBlock/LumiBlockComps
Reconstruction/tauRecTools
Trigger/TrigEvent/TrigParticle
Trigger/TrigEvent/TrigSteeringEvent
Trigger/TrigSteer/TrigInterfaces
Trigger/TrigTools/TrigTimeAlgs
PRIVATE
Calorimeter/CaloEvent
Event/EventKernel
Event/NavFourMom
Event/xAOD/xAODJet
Event/xAOD/xAODTau
Event/xAOD/xAODTracking
Reconstruction/Particle
Tracking/TrkEvent/VxVertex
Trigger/TrigT1/TrigT1Interfaces )
# Component(s) in the package:
atlas_add_library( TrigTauRecLib
src/*.cxx
PUBLIC_HEADERS TrigTauRec
LINK_LIBRARIES GaudiKernel TrigParticle TrigSteeringEvent LumiBlockCompsLib tauRecToolsLib TrigInterfacesLib TrigTimeAlgsLib
PRIVATE_LINK_LIBRARIES CaloEvent EventKernel NavFourMom xAODJet xAODTau xAODTracking Particle VxVertex TrigT1Interfaces )
atlas_add_component( TrigTauRec
src/components/*.cxx
LINK_LIBRARIES GaudiKernel LumiBlockCompsLib tauRecToolsLib TrigParticle TrigSteeringEvent TrigInterfacesLib TrigTimeAlgsLib CaloEvent EventKernel NavFourMom xAODJet xAODTau xAODTracking Particle VxVertex TrigT1Interfaces TrigTauRecLib )
# Install files from the package:
atlas_install_python_modules( python/*.py )
atlas_install_joboptions( share/*.py )
atlas_install_runtime( share/*.root )
......@@ -523,6 +523,31 @@ def getTauShotFinder():
#########################################################################
def getInDetTrackSelectionToolForTJVA():
_name = sPrefix + 'InDetTrackSelectionToolForTJVA'
if _name in cached_instances:
return cached_instances[_name]
#Configures tau track selector tool (should eventually check whether an existing one is available)
from InDetTrackSelectionTool.InDetTrackSelectionToolConf import InDet__InDetTrackSelectionTool
InDetTrackSelectionToolForTJVA = InDet__InDetTrackSelectionTool(name = _name,
minPt = 1000.,
maxD0 = 9999.*mm,
maxZ0 = 9999.*mm,
minNPixelHits = 2, # PixelHits + PixelDeadSensors
minNSctHits = 0, # SCTHits + SCTDeadSensors
minNSiHits = 7, # PixelHits + SCTHits + PixelDeadSensors + SCTDeadSensors
minNTrtHits = 0)
#fitChi2OnNdfMax = 99999,
#TrackSummaryTool = None,
#Extrapolator = getAtlasExtrapolator())
from AthenaCommon.AppMgr import ToolSvc
ToolSvc += InDetTrackSelectionToolForTJVA
cached_instances[_name] = InDetTrackSelectionToolForTJVA
return InDetTrackSelectionToolForTJVA
#########################################################################
......@@ -625,7 +650,8 @@ def getTauVertexFinder(doUseTJVA=False):
UseTJVA = doUseTJVA,
PrimaryVertexContainer = _DefaultVertexContainer,
AssociatedTracks="GhostTrack", # OK??
TrackVertexAssociation=sPrefix+"JetTrackVtxAssoc_forTaus"
TrackVertexAssociation=sPrefix+"JetTrackVtxAssoc_forTaus",
InDetTrackSelectionToolForTJVA = getInDetTrackSelectionToolForTJVA()
)
cached_instances[_name] = TauVertexFinder
......
......@@ -39,6 +39,8 @@
#include "xAODTau/TauJetContainer.h"
#include "xAODTau/TauJetAuxContainer.h"
#include "xAODTau/TauDefs.h"
#include "xAODTau/TauTrackContainer.h"
#include "xAODTau/TauTrackAuxContainer.h"
#include "LumiBlockComps/ILumiBlockMuTool.h"
......@@ -661,9 +663,16 @@ HLT::ErrorCode TrigTauRecMerged::hltExecute(const HLT::TriggerElement* inputTE,
xAOD::TauJetContainer *pContainer = new xAOD::TauJetContainer();
xAOD::TauJetAuxContainer pAuxContainer;
xAOD::TauTrackContainer *pTrackContainer = new xAOD::TauTrackContainer();
xAOD::TauTrackAuxContainer pTrackAuxContainer;
// Set the store: eventually, we want to use a dedicated trigger version
pContainer->setStore(&pAuxContainer);
// Set the store: eventually, we want to use a dedicated trigger version
pTrackContainer->setStore(&pTrackAuxContainer);
m_tauEventData.setObject("TauTrackContainer", pTrackContainer);
// set TauCandidate properties (xAOD style)
m_tauEventData.xAODTauContainer = pContainer;
......@@ -766,6 +775,10 @@ HLT::ErrorCode TrigTauRecMerged::hltExecute(const HLT::TriggerElement* inputTE,
// for(; tool != firstTool; ++tool ) (*tool)->cleanup( &m_tauEventData );
// (*tool)->cleanup( &m_tauEventData );
xAOD::TauJet* bad_tau = pContainer->back();
ATH_MSG_DEBUG("Deleting " << bad_tau->nAllTracks() << "Tracks associated with tau: ");
pTrackContainer->erase(pTrackContainer->end()-bad_tau->nAllTracks(), pTrackContainer->end());
pContainer->pop_back();
if( msgLvl() <= MSG::DEBUG ) msg() << MSG::DEBUG << "clean up done after jet seed" << endreq;
......@@ -812,7 +825,7 @@ HLT::ErrorCode TrigTauRecMerged::hltExecute(const HLT::TriggerElement* inputTE,
// get tau detail variables for Monitoring
m_numTrack = p_tau->nTracks();
m_nWideTrk = p_tau->nWideTracks();
m_nWideTrk = p_tau->nTracksIsolation();
p_tau->detail(xAOD::TauJetParameters::trkAvgDist, m_trkAvgDist);
p_tau->detail(xAOD::TauJetParameters::etOverPtLeadTrk, m_etovPtLead);
p_tau->detail(xAOD::TauJetParameters::EMRadius, m_emRadius);
......@@ -907,8 +920,8 @@ HLT::ErrorCode TrigTauRecMerged::hltExecute(const HLT::TriggerElement* inputTE,
// Set NUMVERTICES Aux variable
//
static SG::AuxElement::Accessor<int> acc_nVertex("NUMVERTICES");
acc_nVertex(*p_tau) = avg_mu;
// static SG::AuxElement::Accessor<int> acc_nVertex("NUMVERTICES");
// acc_nVertex(*p_tau) = avg_mu;
......@@ -920,6 +933,9 @@ HLT::ErrorCode TrigTauRecMerged::hltExecute(const HLT::TriggerElement* inputTE,
++m_Ncand;
}
else {
xAOD::TauJet* bad_tau = pContainer->back();
ATH_MSG_DEBUG("Deleting " << bad_tau->nAllTracks() << "Tracks associated with tau: ");
pTrackContainer->erase(pTrackContainer->end()-bad_tau->nAllTracks(), pTrackContainer->end());
pContainer->pop_back();
if( msgLvl() <= MSG::DEBUG ) msg() << MSG::DEBUG << "deleted tau done after jet seed" << endreq;
......@@ -942,6 +958,7 @@ HLT::ErrorCode TrigTauRecMerged::hltExecute(const HLT::TriggerElement* inputTE,
tauKey = "";
hltStatus=recordAndAttachFeature(outputTE, pContainer,tauKey,m_outputName);
hltStatus=recordAndAttachFeature(outputTE, pTrackContainer,tauKey,m_outputName+"Tracks");
if (hltStatus!=HLT::OK ) {
msg() << MSG::ERROR << "Unable to record tau Container in TDS" << endreq;
m_calo_errors.push_back(NoHLTtauAttach);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment