diff --git a/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauRecConfigMT.py b/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauRecConfigMT.py index fa826a5d182109a09dcefa3eebec679a65b6d5b3..851e4b54c34a42e719eb806c725bc500118961c4 100644 --- a/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauRecConfigMT.py +++ b/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauRecConfigMT.py @@ -138,7 +138,7 @@ class TrigTauRecMerged_TauPreselection (TrigTauRecMergedMT) : from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig time = TrigTimeHistToolConfig("Time") - self.AthenaMonTools = [ time, validation, online ] + #self.AthenaMonTools = [ time, validation, online ] import TrigTauRec.TrigTauAlgorithmsHolder as taualgs tools = [] diff --git a/Trigger/TrigHypothesis/TrigTauHypo/src/TrigTauCaloHypoAlgMT.cxx b/Trigger/TrigHypothesis/TrigTauHypo/src/TrigTauCaloHypoAlgMT.cxx index b7086e9a6fdb08a07931bf69f81ebd2e525686b1..8587fc66e80db1fc06d994ffa1789800886edefb 100644 --- a/Trigger/TrigHypothesis/TrigTauHypo/src/TrigTauCaloHypoAlgMT.cxx +++ b/Trigger/TrigHypothesis/TrigTauHypo/src/TrigTauCaloHypoAlgMT.cxx @@ -23,7 +23,7 @@ StatusCode TrigTauCaloHypoAlgMT::initialize() { ATH_CHECK( m_hypoTools.retrieve() ); std::cout << "After m_hypoTools.retrieve() " << std::endl; ATH_CHECK( m_tauJetKey.initialize() ); - std::cout << "After m_clusterKey.initialize() " << std::endl; + std::cout << "After m_tauJetKey.initialize() " << std::endl; renounce( m_tauJetKey );// clusters are made in views, so they are not in the EvtStore: hide them return StatusCode::SUCCESS; diff --git a/Trigger/TrigHypothesis/TrigTauHypo/src/TrigTauGenericHypoMT.cxx b/Trigger/TrigHypothesis/TrigTauHypo/src/TrigTauGenericHypoMT.cxx index da7827c29c7fe7f55baca6727af34d90b6b7eb68..10c9f25c65dd62279e48ad0e157b5a851cae488b 100755 --- a/Trigger/TrigHypothesis/TrigTauHypo/src/TrigTauGenericHypoMT.cxx +++ b/Trigger/TrigHypothesis/TrigTauHypo/src/TrigTauGenericHypoMT.cxx @@ -60,16 +60,6 @@ TrigTauGenericHypoMT::TrigTauGenericHypoMT( const std::string& type, declareProperty("Formulas", m_formula); } -/* -TrigTauGenericHypoMT::TrigTauGenericHypoMT(const std::string& name, - ISvcLocator* pSvcLocator): - HLT::HypoAlgo(name, pSvcLocator) -{ - declareProperty("Details", m_member); - declareProperty("Formulas", m_formula); -} -*/ - TrigTauGenericHypoMT::~TrigTauGenericHypoMT() {} @@ -119,9 +109,9 @@ bool TrigTauGenericHypoMT::decide( const ITrigTauGenericHypoTool::ClusterInfo& i pass = false; ATH_MSG_DEBUG( "AcceptAll property not set: applying selection" ); } - auto roiDescriptor = input.roi; + //auto roiDescriptor = input.roi; - if ( fabs( roiDescriptor->eta() ) > 2.6 ) { + /*if ( fabs( roiDescriptor->eta() ) > 2.6 ) { ATH_MSG_DEBUG( "REJECT The cluster had eta coordinates beyond the EM fiducial volume : " << roiDescriptor->eta() << "; stop the chain now" ); pass=false; // special case return pass; @@ -130,12 +120,14 @@ bool TrigTauGenericHypoMT::decide( const ITrigTauGenericHypoTool::ClusterInfo& i ATH_MSG_DEBUG( "; RoI ID = " << roiDescriptor->roiId() << ": Eta = " << roiDescriptor->eta() << ", Phi = " << roiDescriptor->phi() ); + // fill local variables for RoI reference position double etaRef = roiDescriptor->eta(); double phiRef = roiDescriptor->phi(); // correct phi the to right range ( probably not needed anymore ) if ( fabs( phiRef ) > M_PI ) phiRef -= 2*M_PI; // correct phi if outside range + */ // get tau collection auto pTauCont = input.taucontainer; diff --git a/Trigger/TrigHypothesis/TrigTauHypo/src/TrigTauMVHypoTool.cxx b/Trigger/TrigHypothesis/TrigTauHypo/src/TrigTauMVHypoTool.cxx new file mode 100644 index 0000000000000000000000000000000000000000..3672b3a5b2eea451d641b9cffcdae0428575a4c6 --- /dev/null +++ b/Trigger/TrigHypothesis/TrigTauHypo/src/TrigTauMVHypoTool.cxx @@ -0,0 +1,383 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +/******************************************************************** + * + * NAME: EFTauMVHypo.h + * PACKAGE: Trigger/TrigHypothesis/TrigTauHypo + * + * AUTHOR: M. Morgenstern based on EFTauInvHypo + * CREATED: Jun 20, 2011 + * + *********************************************************************/ + +#include <list> +#include <iterator> +#include <sstream> +// +#include "GaudiKernel/StatusCode.h" +#include "GaudiKernel/ListItem.h" +// +#include "TrigTauHypo/EFTauMVHypo.h" +// +#include "xAODTau/TauJetContainer.h" + +#include "TFile.h" + +#include "TrigSteeringEvent/TrigRoiDescriptor.h" +#include <PathResolver/PathResolver.h> +class ISvcLocator; + +///////////////////////////////////////////////////////////////////// +// CONSTRUCTOR: +///////////////////////////////////////////////////////////////////// +// +EFTauMVHypo::EFTauMVHypo(const std::string& name, + ISvcLocator* pSvcLocator): + HLT::HypoAlgo(name, pSvcLocator) +{ +// set unreasonable values to make sure that initialization is performed from outside +// however we assume if one parameter is set from outside then they all set ok. + declareProperty("NTrackMin", m_numTrackMin = -999); + declareProperty("NTrackMax", m_numTrackMax = 0); + declareProperty("NWideTrackMax", m_numWideTrackMax = 999); + declareProperty("EtCalibMin", m_EtCalibMin = -10000.); + declareProperty("Level", m_level = -1); + declareProperty("Method", m_method = 0); + declareProperty("Highpt", m_highpt = true); + declareProperty("HighptTrkThr", m_highpttrkthr = 200000.); + declareProperty("HighptIDThr", m_highptidthr = 330000.); + declareProperty("HighptJetThr", m_highptjetthr = 410000.); + declareProperty("ApplyIDon0p", m_applyIDon0p = true); + + declareMonitoredVariable("CutCounter",m_cutCounter=0); + declareMonitoredVariable("NTrack",m_mon_nTrackAccepted=0); + declareMonitoredVariable("NWideTrack",m_mon_nWideTrackAccepted=0); + declareMonitoredVariable("EtCalib",m_mon_ptAccepted=-10.); + declareMonitoredVariable("NInputTaus",m_inputTaus=-1.); + + m_numTrack = -100; + m_numWideTrack = -100; + m_LLHScore = -1111.; + m_BDTScore = -1111.; + m_OneProngGraph=0; + m_MultiProngGraph=0; +} + +///////////////////////////////////////////////////////////////////// +// DESTRUCTOR: +///////////////////////////////////////////////////////////////////// +// +EFTauMVHypo::~EFTauMVHypo() +{ + delete m_OneProngGraph; + delete m_MultiProngGraph; +} + +///////////////////////////////////////////////////////////////////// +// INITIALIZE: +///////////////////////////////////////////////////////////////////// +// + +// ---------------------------------------------------------------------- +HLT::ErrorCode EFTauMVHypo::hltInitialize() + // ---------------------------------------------------------------------- +{ + + msg() << MSG::INFO << "in initialize()" << endmsg; + + msg() << MSG::INFO << " REGTEST: EFTauMVHypo will cut on "<<endmsg; + msg() << MSG::INFO << " REGTEST: param NTrackMin " << m_numTrackMin <<endmsg; + msg() << MSG::INFO << " REGTEST: param NTrackMax " << m_numTrackMax <<endmsg; + msg() << MSG::INFO << " REGTEST: param NWideTrackMax " << m_numWideTrackMax <<endmsg; + msg() << MSG::INFO << " REGTEST: param EtCalib " << m_EtCalibMin <<endmsg; + msg() << MSG::INFO << " REGTEST: param Level " << m_level <<endmsg; + msg() << MSG::INFO << " REGTEST: param Method " << m_method <<endmsg; + msg() << MSG::INFO << " REGTEST: param Highpt with thrs " << m_highpt << " " << m_highpttrkthr << " " << m_highptidthr << " " << m_highptjetthr <<endmsg; + msg() << MSG::INFO << " REGTEST: param ApplyIDon0p " << m_applyIDon0p <<endmsg; + msg() << MSG::INFO << " REGTEST: ------ "<<endmsg; + + if( (m_numTrackMin > m_numTrackMax) || m_level == -1 || (m_highptidthr > m_highptjetthr)) + { + msg() << MSG::ERROR << "EFTauMVHypo is uninitialized! " << endmsg; + return HLT::BAD_JOB_SETUP; + } + + std::string s_llh_cuts_file = PathResolverFindCalibFile("TrigTauRec/00-11-01/LMTCutsLLHTrigger.root"); + msg() << MSG::DEBUG << "Try to open root file containing cuts: " << s_llh_cuts_file << endmsg; + + TFile* llhcuts = TFile::Open(s_llh_cuts_file.c_str()); + + if(!llhcuts) + { + msg() << MSG::ERROR << "Could not find file containing cut values. EFTauMVHypo is uninitialized! " << endmsg; + return HLT::BAD_JOB_SETUP; + } + + if (m_level == 1) + { + m_cut_level = "medium"; + m_OneProngGraph = (TGraph*)((llhcuts->Get("1prong/medium"))->Clone()); + m_MultiProngGraph = (TGraph*)((llhcuts->Get("3prong/medium"))->Clone()); + } + else if (m_level == 2) + { + m_cut_level = "medium1"; + m_OneProngGraph = (TGraph*)((llhcuts->Get("1prong/medium1"))->Clone()); + m_MultiProngGraph = (TGraph*)((llhcuts->Get("3prong/medium1"))->Clone()); + } + else if (m_level == 3) + { + m_cut_level = "tight"; + m_OneProngGraph = (TGraph*)((llhcuts->Get("1prong/tight"))->Clone()); + m_MultiProngGraph = (TGraph*)((llhcuts->Get("3prong/tight"))->Clone()); + } + else if (m_level == -1111) + { + m_cut_level = "none"; + } + else + { + msg() << MSG::ERROR << "Did not configure valid level. EFTauMVHypo is uninitialized! " << endmsg; + return HLT::BAD_JOB_SETUP; + } + + msg() << MSG::INFO + << "Initialization of EFTauMVHypo completed successfully" + << endmsg; + + if (llhcuts) + { + llhcuts->Close(); + delete llhcuts; + } + return HLT::OK; +} + +// ---------------------------------------------------------------------- +HLT::ErrorCode EFTauMVHypo::hltFinalize(){ + // ---------------------------------------------------------------------- + + msg() << MSG::INFO << "in finalize()" << endmsg; + return HLT::OK; +} + + +// ---------------------------------------------------------------------- +HLT::ErrorCode EFTauMVHypo::hltExecute(const HLT::TriggerElement* outputTE, bool& pass){ + // ---------------------------------------------------------------------- + + // Get the messaging service, print where you are + + if( msgLvl() <= MSG::DEBUG ) msg() << MSG::DEBUG <<"REGTEST:"<< name() << ": in execute()" << endmsg; + + // general reset + pass=false; + + m_cutCounter = 0; + m_numTrack = -100; + m_numWideTrack = -100; + m_LLHScore = -1111.; + m_BDTScore = -1111.; + + m_mon_ptAccepted = -10.; + m_mon_nTrackAccepted = -1; + m_mon_nWideTrackAccepted = -1; + + // get the trigger element and extract the RoI information + //--------------------------------------------------------- + + const TrigRoiDescriptor* roiDescriptor = 0; + HLT::ErrorCode status = getFeature(outputTE, roiDescriptor); + + if ( roiDescriptor ) + { + if( msgLvl() <= MSG::DEBUG ) + msg() << MSG::DEBUG << "REGTEST: RoI id " << roiDescriptor->roiId() + << " located at phi = " << roiDescriptor->phi() + << ", eta = " << roiDescriptor->eta() << endmsg; + } + else + { + if( msgLvl() <= MSG::DEBUG ) + msg() << MSG::DEBUG << "Failed to find RoiDescriptor " << endmsg; + } + + // get tau objects from the trigger element: + //-------------------------------------------------- + + std::vector<const xAOD::TauJetContainer*> vectorTauContainers; + + status = getFeatures(outputTE, vectorTauContainers); + + if(status!=HLT::OK) + { + msg() << MSG::INFO + << " REGTEST: Failed to get tauContainer's from the trigger element" + << endmsg; + return HLT::OK; + } + + if( msgLvl() <= MSG::DEBUG ) + msg() << MSG::DEBUG << " Got " << vectorTauContainers.size() + << " tauContainers's associated to the TE " << endmsg; + + if(vectorTauContainers.size() == 0) + { + if( msgLvl() <= MSG::DEBUG ) + msg() << MSG::DEBUG << " REGTEST: Received 0 taucontainers " + << "This algorithm is designed to work with one tau container per TE." + << endmsg; + return HLT::OK; + } + + const xAOD::TauJetContainer *TauContainer = vectorTauContainers.back(); + + msg() << MSG::DEBUG << " REGTEST: number of tau in container "<< TauContainer->size() << endmsg; + m_inputTaus = TauContainer->size(); + + for(xAOD::TauJetContainer::const_iterator tauIt = TauContainer->begin(); + tauIt != TauContainer->end(); tauIt++){ + + if( msgLvl() <= MSG::DEBUG ) + msg() << MSG::DEBUG << " tauRec candidate "<<endmsg; + + m_cutCounter++; + + double EFet = (*tauIt)->pt()*1e-3; + + if( msgLvl() <= MSG::DEBUG ) + msg() << MSG::DEBUG << " REGTEST: Et Calib "<<EFet<<endmsg; + + if(!( EFet > m_EtCalibMin*1e-3)) continue; + m_cutCounter++; + m_mon_ptAccepted = EFet; + + m_numTrack = (*tauIt)->nTracks(); + #ifndef XAODTAU_VERSIONS_TAUJET_V3_H + m_numWideTrack = (*tauIt)->nWideTracks(); + #else + m_numWideTrack = (*tauIt)->nTracksIsolation(); + #endif + + + if( msgLvl() <= MSG::DEBUG ){ + msg() << MSG::DEBUG << " REGTEST: Track size "<<m_numTrack <<endmsg; + msg() << MSG::DEBUG << " REGTEST: Wide Track size "<<m_numWideTrack <<endmsg; + } + + // turn off track selection at highpt + bool applyTrkSel(true); + bool applyMaxTrkSel(true); + if(m_highpt && (EFet > m_highpttrkthr*1e-3) ) applyTrkSel = false; + if(m_highpt && (EFet > m_highptjetthr*1e-3) ) applyMaxTrkSel = false; + + if(applyMaxTrkSel) if( !(m_numTrack <= m_numTrackMax) ) continue; + if(applyTrkSel) if( !(m_numTrack >= m_numTrackMin) ) continue; + if(applyTrkSel) if( !(m_numWideTrack <= m_numWideTrackMax) ) continue; + + m_cutCounter++; + m_mon_nTrackAccepted = m_numTrack; + m_mon_nWideTrackAccepted = m_numWideTrack; + + auto local_level = m_level; + //loosen and turn off ID cut at highpt + if(m_highpt && (EFet > m_highptidthr*1e-3) && m_level>1) local_level = 1; //works only for BDT, not llh + if(m_highpt && (EFet > m_highptjetthr*1e-3) ) local_level = -1111; + if(!m_applyIDon0p && m_numTrack==0) local_level = -1111; + + if(m_method == 1 || m_method == 0) + { + double llh_cut = 11111.; + std::string prong; + m_numTrack==1 ? prong = "1P" : prong = "3P"; + + if(local_level == -1111){ //noCut, accept this TE + pass = true; + m_cutCounter++; + continue; + } + + std::string s_cut_llh = "llh_" + m_cut_level +"_" + prong; + msg() << MSG::DEBUG << "REGTEST: cut string: " << s_cut_llh << endmsg; + + if(m_numTrack == 1) + { + llh_cut=m_OneProngGraph->Eval(EFet); + } + else + { + llh_cut=m_MultiProngGraph->Eval(EFet); + } + + msg() << MSG::DEBUG<<" REGTEST: will cut on llh score at "<< llh_cut <<endmsg; + + m_LLHScore = (*tauIt)->discriminant(xAOD::TauJetParameters::Likelihood); + + msg() << MSG::DEBUG<<" REGTEST: LLHScore "<<m_LLHScore<<endmsg; + + if (m_LLHScore < llh_cut) continue; + + m_cutCounter++; + } + + else if(m_method == 2 || m_method == 0) + { + m_BDTScore = (*tauIt)->discriminant(xAOD::TauJetParameters::BDTJetScore); + + msg() << MSG::DEBUG<<" REGTEST: BDTScore "<<m_BDTScore<<endmsg; + + if(local_level == -1111) + { //noCut, accept this TE + pass = true; + m_cutCounter++; + continue; + } + + if (local_level == 1 && (*tauIt)->isTau(xAOD::TauJetParameters::JetBDTSigLoose) == 0) + continue; + else if (local_level == 2 && (*tauIt)->isTau(xAOD::TauJetParameters::JetBDTSigMedium) == 0) + continue; + else if (local_level == 3 && (*tauIt)->isTau(xAOD::TauJetParameters::JetBDTSigTight) == 0) + continue; + + m_cutCounter++; + } + else + { + msg() << MSG::ERROR << " no valid method defined "<<endmsg; + continue; + } + + //------------------------------------------------- + // At least one Tau matching passed all cuts. + // Accept the event! + //------------------------------------------------- + + pass=true; + + if( msgLvl() <= MSG::DEBUG ) + msg() << MSG::DEBUG << " REGTEST: pass taurec is "<<pass<<endmsg; + + } // end of loop in tau objects. + + if(pass) + { + if( msgLvl() <= MSG::DEBUG ) + msg() << MSG::DEBUG + << " REGTEST: TE accepted !! " + << endmsg; + // activate Trigger Element. + } + else + { + if( msgLvl() <= MSG::DEBUG ) + msg() << MSG::DEBUG + << " REGTEST: No good tau found !! TE rejected " + << endmsg; + } + + return HLT::OK; + +} diff --git a/Trigger/TrigHypothesis/TrigTauHypo/src/TrigTauMVHypoTool.h b/Trigger/TrigHypothesis/TrigTauHypo/src/TrigTauMVHypoTool.h new file mode 100644 index 0000000000000000000000000000000000000000..a00360f4e0d293285a2b97a99559a714f89da914 --- /dev/null +++ b/Trigger/TrigHypothesis/TrigTauHypo/src/TrigTauMVHypoTool.h @@ -0,0 +1,85 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +/******************************************************************** + * + * NAME: EFTauMVHypo.h + * PACKAGE: Trigger/TrigHypothesis/TrigTauHypo + * + * AUTHOR: m. Morgenstern based on EFTauInvHypo + * CREATED: Jun 20, 2011 + * + *********************************************************************/ +#ifndef TRIGEFTAUMVHYPO_H +#define TRIGEFTAUMVHYPO_H + +#include "TrigInterfaces/HypoAlgo.h" +#include "TGraph.h" + +class StoreGateSvc; +namespace HLT { + class TriggerElement; +} + +class EFTauMVHypo : public HLT::HypoAlgo { + + public: + + /** constructor of EF tauRec hypo algo */ + EFTauMVHypo(const std::string& name, ISvcLocator* pSvcLocator); + /** destructor */ + ~EFTauMVHypo(); + + /** HLT method for initialize */ + HLT::ErrorCode hltInitialize(); + + /** HLT method for finalize */ + HLT::ErrorCode hltFinalize(); + + /** HLT method for execute Hypo on a TE. + input is TE, output is pass=True or False */ + HLT::ErrorCode hltExecute(const HLT::TriggerElement* outputTE, bool& pass); + + private: + + /** Cuts to be applied */ + + /** min numTrack cut **/ + int m_numTrackMin; + int m_numTrackMax; + int m_numWideTrackMax; + + double m_EtCalibMin; + + int m_level; + int m_method; + + bool m_highpt; + double m_highpttrkthr; + double m_highptidthr; + double m_highptjetthr; + bool m_applyIDon0p; + /** min BDTScore cut **/ + //double m_BDTScoreMin; + + /** variables used for cuts in hypo algorithm */ + int m_numTrack; + int m_numWideTrack; + + double m_LLHScore; + double m_BDTScore; + + /** for monitoring */ + int m_cutCounter; + double m_mon_ptAccepted; + int m_mon_nTrackAccepted; + int m_mon_nWideTrackAccepted; + int m_inputTaus; + + std::string m_cut_level; + std::map<std::string,TGraph> m_cuts; + TGraph *m_OneProngGraph,*m_MultiProngGraph; +}; +#endif + diff --git a/Trigger/TrigHypothesis/TrigTauHypo/src/TrigTrackPreSelHypoTool.cxx b/Trigger/TrigHypothesis/TrigTauHypo/src/TrigTrackPreSelHypoTool.cxx index 4b220f8031c2682d188b0418ec183210848dc3a0..cded9e4783f96c8dd9e1e7fbc3f73a795d8c262e 100755 --- a/Trigger/TrigHypothesis/TrigTauHypo/src/TrigTrackPreSelHypoTool.cxx +++ b/Trigger/TrigHypothesis/TrigTauHypo/src/TrigTrackPreSelHypoTool.cxx @@ -142,6 +142,8 @@ bool TrigTrackPreSelHypoTool::decide( const ITrigTrackPreSelHypoTool::ClusterInf float roIEta = roiDescriptor->eta(); float roIPhi = roiDescriptor->phi(); + + ATH_MSG_DEBUG( "Input RoI eta: " << roIEta << " Input RoI phi: " << roIPhi ); //look at fast-tracks //std::vector<const TrackCollection*> vectorFoundTracks; diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/tauMenuDefs.py b/Trigger/TrigValidation/TrigUpgradeTest/python/tauMenuDefs.py index 9b884d4af3f42931c20e52452c4a915281795539..ae5bb627bd021e452e4b2cbeba231135fd49aa5d 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/python/tauMenuDefs.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/tauMenuDefs.py @@ -152,18 +152,47 @@ def tauTrackSequence(): Hypo = fastTrkHypo, HypoToolGen = TrigTauTrackHypoProvider ) -#Generic Hypo implementation (Keep this lines for the future) -#from TrigUpgradeTest.TrigUpgradeTestConf import HLTTest__TestHypoAlg -#from TrigUpgradeTest.TrigUpgradeTestConf import HLTTest__TestHypoTool +(viewAlgs2, eventAlgs) = makeInDetAlgs() +from TrigFastTrackFinder.TrigFastTrackFinder_Config import TrigFastTrackFinder_TauIso +theFTFIso = TrigFastTrackFinder_TauIso() +theFTFIso.isRoI_Seeded = True +viewAlgs2.append(theFTFIso) + +from TrigTauRec.TrigTauRecConfigMT import TrigTauRecMerged_TauPreselection +tauPreSel = TrigTauRecMerged_TauPreselection() +tauPreSel.OutputLevel = DEBUG +tauPreSel.RoIInputKey = "RoiForTau" +tauPreSel.L1RoIKey = "TAUCaloRoIs" +tauPreSel.clustersKey = "caloclusters" +tauPreSel.TrigTauRecOutputKey = "taujets" + +l2TauIsoViewsMaker = EventViewCreatorAlgorithm("l2TauIsoViewsMaker", OutputLevel=DEBUG) +l2TauIsoViewsMaker.RoIsLink = "roi" # -||- +l2TauIsoViewsMaker.InViewRoIs = "EMIDRoIs" # contract with the fastCalo +l2TauIsoViewsMaker.Views = "TAUIDViews" +l2TauIsoViewsMaker.ViewFallThrough = True + +for viewAlg in viewAlgs2: + if viewAlg.properties().has_key("RoIs"): + viewAlg.RoIs = l2TauIsoViewsMaker.InViewRoIs + if viewAlg.properties().has_key("roiCollectionName"): + viewAlg.roiCollectionName = l2TauIsoViewsMaker.InViewRoIs -#def genCaloHypoToolTau( name, conf ): -# return HLTTest__TestHypoTool("name") +tauInViewAlgs2 = parOR("tauInViewAlgs2", viewAlgs2 + [ tauPreSel ]) -#def tauTrackSequence(): -# return MenuSequence( Maker = l2TauViewsMaker, -# Sequence = tauTrkAthSequence, -# Hypo = HLTTest__TestHypoAlg("DummyTauCaloHypo", Input=""), -# HypoToolGen = genCaloHypoToolTau ) +tauTrkIsoAthSequence = seqAND("tauTrkIsoAthSequence", eventAlgs + [l2TauIsoViewsMaker, tauInViewAlgs2 ] ) + +from TrigUpgradeTest.TrigUpgradeTestConf import HLTTest__TestHypoAlg +from TrigUpgradeTest.TrigUpgradeTestConf import HLTTest__TestHypoTool + +def genTrackHypoToolTau( name, conf ): + return HLTTest__TestHypoTool("name") + +def tauTrackIsoSequence(): + return MenuSequence( Maker = l2TauViewsMaker, + Sequence = tauTrkIsoAthSequence, + Hypo = HLTTest__TestHypoAlg("DummyTauTrackHypo", Input=""), + HypoToolGen = genTrackHypoToolTau ) #Generic Hypo implementation (Keep these lines for future tests) #from TrigUpgradeTest.TrigUpgradeTestConf import HLTTest__TestHypoAlg diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/tau.menu.py b/Trigger/TrigValidation/TrigUpgradeTest/share/tau.menu.py index 5ab769b95d6b9f3986e5ba79df9b3074c1aa1919..52045da80852c751dc3234f3bbb0da8579f185e5 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/tau.menu.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/tau.menu.py @@ -23,16 +23,16 @@ from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import Chain, ChainStep # Chain(name='HLT_e7_etcut', Seed="L1_EM3", ChainSteps=[step1, step2] ) # ] -from TrigUpgradeTest.tauMenuDefs import tauCaloSequence, tauTrackSequence +from TrigUpgradeTest.tauMenuDefs import tauCaloSequence, tauTrackSequence, tauTrackIsoSequence step1=ChainStep("Step1_tau", [tauCaloSequence()]) step2=ChainStep("Step2_tautrack", [tauTrackSequence()]) - +step3=ChainStep("Step3_tautrackiso", [tauTrackIsoSequence()]) testChains = [ - Chain(name='HLT_tau0_perf_ptonly_L1TAU12', Seed="L1_TAU12", ChainSteps=[step1,step2] ), - Chain(name='HLT_tau25_medium1_tracktwo', Seed="L1_TAU12IM", ChainSteps=[step1,step2] ), + Chain(name='HLT_tau0_perf_ptonly_L1TAU12', Seed="L1_TAU12", ChainSteps=[step1,step2,step3] ), + Chain(name='HLT_tau25_medium1_tracktwo', Seed="L1_TAU12IM", ChainSteps=[step1,step2,step3] ), ]