Commit c4f6cc52 authored by Tomasz Bold's avatar Tomasz Bold Committed by Graeme Stewart
Browse files

added GapHypos (TrigHIHypo-00-00-82)

	* added GapHypos
	* TrigHIHypo-00-00-82

2016-09-12 Tomasz Bold
	* brought HF to menu implementability
	* added perf configuration for assymetric Vn
	* TrigHIHypo-00-00-81

2016-09-09 Tomasz Bold
	* update to Vn triggers
	* TrigHIHypo-00-00-80

2016-09-07 Soumya Mohapatra
        * Added first version of the HFMuonHypo

2016-09-03 Tomasz Bold
	* extened UltraCentral to have configurable eta range
parent d0fcc5b0
......@@ -15,11 +15,14 @@ atlas_depends_on_subdirs( PUBLIC
Calorimeter/CaloInterface
Control/AthenaBaseComps
Event/xAOD/xAODHIEvent
Event/xAOD/xAODMuon
Event/xAOD/xAODTracking
GaudiKernel
Reconstruction/HeavyIonRec/HIGlobal
Reconstruction/Particle
Tracking/TrkEvent/TrkParameters
Trigger/TrigEvent/TrigMissingEtEvent
Trigger/TrigEvent/TrigMuonEvent
Trigger/TrigEvent/TrigParticle
Trigger/TrigSteer/TrigInterfaces
Trigger/TrigT1/TrigT1Interfaces )
......@@ -32,7 +35,7 @@ atlas_add_component( TrigHIHypo
src/*.cxx
src/components/*.cxx
INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
LINK_LIBRARIES ${CLHEP_LIBRARIES} TrigCaloEvent TrigInDetEvent TrigSteeringEvent CaloEvent AthenaBaseComps xAODHIEvent GaudiKernel Particle TrkParameters TrigMissingEtEvent TrigParticle TrigInterfacesLib TrigT1Interfaces )
LINK_LIBRARIES ${CLHEP_LIBRARIES} TrigCaloEvent TrigInDetEvent TrigSteeringEvent CaloEvent AthenaBaseComps xAODHIEvent xAODMuon xAODTracking GaudiKernel Particle TrkParameters TrigMissingEtEvent TrigMuonEvent TrigParticle TrigInterfacesLib TrigT1Interfaces )
# Install files from the package:
atlas_install_python_modules( python/*.py )
......
......@@ -22,6 +22,7 @@ use AtlasCLHEP AtlasCLHEP-* External
use GaudiInterface GaudiInterface-* External
use TrigInterfaces TrigInterfaces-* Trigger/TrigSteer
use TrigMissingEtEvent TrigMissingEtEvent-* Trigger/TrigEvent
use TrigMuonEvent TrigMuonEvent-* Trigger/TrigEvent
use TrigT1Interfaces TrigT1Interfaces-* Trigger/TrigT1
use Particle Particle-* Reconstruction
use TrigParticle TrigParticle-* Trigger/TrigEvent
......@@ -31,6 +32,8 @@ use CaloInterface CaloInterface-* Calorimeter
use HIGlobal HIGlobal-* Reconstruction/HeavyIonRec
use AthenaBaseComps AthenaBaseComps-* Control
use xAODHIEvent xAODHIEvent-* Event/xAOD
use xAODMuon xAODMuon-* Event/xAOD
use xAODTracking xAODTracking-* Event/xAOD
#use CaloGeoHelpers CaloGeoHelpers-* Calorimeter
#use TestTools TestTools-* AtlasTest
......
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
from TrigHIHypo.TrigHIHypoConf import UltraCentralHypo
# a side gaps
from AthenaCommon.SystemOfUnits import GeV
from TrigMonitorBase.TrigGenericMonitoringToolConfig import defineHistogram, TrigGenericMonitoringToolConfig
class GapHypoMonitoring(TrigGenericMonitoringToolConfig):
def __init__ (self, name="UltraCentralMonitoring"):
super(GapHypoMonitoring, self).__init__(name)
self.defineTarget(['Online', 'Validation'])
self.Histograms += [ defineHistogram('FCalTotalEt',
type='TH1F',
title="Total ET in FCal; ET [MeV]",
xbins = 50, xmin=-10*GeV, xmax=10*GeV)]
self.Histograms += [ defineHistogram('FCalTotalEtPassing',
type='TH1F',
title="Total ET in FCal for passing events; ET [MeV]",
xbins = 50, xmin=-10*GeV, xmax=10*GeV)]
ttFgapA = UltraCentralHypo("TTFgapA", EtaMin=3.2, EtaMax=5., FcalEtUpperBound=2*GeV)
ttFgapA.AthenaMonTools += [ GapHypoMonitoring(name="GapHypoMonitoring")]
ttFgapC = UltraCentralHypo("TTFgapC", EtaMin=-5, EtaMax=-3.2, FcalEtUpperBound=2*GeV)
ttFgapC.AthenaMonTools += [ GapHypoMonitoring(name="GapHypoMonitoring")]
cellFgapA = UltraCentralHypo("CellsFgapA", EtaMin=3.2, EtaMax=5., FcalEtUpperBound=2*GeV)
cellFgapA.AthenaMonTools += [ GapHypoMonitoring(name="GapHypoMonitoring")]
cellFgapC = UltraCentralHypo("CellsFgapC", EtaMin=-5, EtaMax=-3.2, FcalEtUpperBound=2*GeV)
cellFgapC.AthenaMonTools += [ GapHypoMonitoring(name="GapHypoMonitoring")]
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
from TrigHIHypo.TrigHIHypoConf import HFMuonHypo
hiHFMuonHypos = { 'hf': HFMuonHypo('HFMuonHypo_nominal'),
'hfperf': HFMuonHypo('HFMuonHypo_perf', ElossCut=0.02) }
......@@ -60,7 +60,7 @@ class QZeroMonitoring(TrigGenericMonitoringToolConfig):
_EtCuts_v2=[ x*1e-3 for x in reversed(range(300, 6050, 50)) ] # equidistant bins
_EtCuts_v3=[ x*1e-3 for x in reversed(range(400, 6050, 50)) ]
_EtCuts_v2_assym = [ x*1e-3 for x in reversed(range(400, 2050, 50))]
_EtCuts_v2_assym = [ x*1e-3 for x in reversed(range(100, 300, 50))]
########################################################################################
# V2
......@@ -89,6 +89,8 @@ V2_th16.QyShifts=[q2yshift]
def generateVnThresholds(a,b,c, etbins):
return [ a - b*et +c*pow(et, 2) for et in etbins]
def generateAssymVnThresholds(a,b,c,d, etbins):
return [ a + b*et +c*pow(et, 2) +d for et in etbins]
# thresholds mappint
# %v2 %v3
#15 2.5 2.5
......@@ -159,6 +161,41 @@ V2A_th3.QThresholds = generateVnThresholds(0,0,0, _EtCuts_v2_assym)
V2A_thresholds = {1: V2A_th1, 2: V2A_th2, 3: V2A_th3}
V2A_th0p = V2HypoAssym("V2A_th0p", "A")
V2A_th0p.QThresholds = generateAssymVnThresholds( 10, 0, 0, 0, _EtCuts_v2_assym)
V2A_th005p = V2HypoAssym("V2A_th005p", "A")
V2A_th005p.QThresholds = generateAssymVnThresholds( 0.671805, -0.00848271, 5.1144e-05, -1.03468e-07, _EtCuts_v2_assym)
V2A_th01p = V2HypoAssym("V2A_th01p", "A")
V2A_th01p.QThresholds = generateAssymVnThresholds( 0.5051, -0.00547545, 3.18733e-05, -6.31319e-08, _EtCuts_v2_assym)
V2A_th025p = V2HypoAssym("V2A_th025p", "A")
V2A_th025p.QThresholds = generateAssymVnThresholds( 0.355451, -0.0030147, 1.65811e-05, -3.19174e-08, _EtCuts_v2_assym)
V2A_th05p = V2HypoAssym("V2A_th05p", "A")
V2A_th05p.QThresholds = generateAssymVnThresholds( 0.333727, -0.00299038, 1.67039e-05, -3.23019e-08, _EtCuts_v2_assym)
V2A_th10p = V2HypoAssym("V2A_th10p", "A")
V2A_th10p.QThresholds = generateAssymVnThresholds( 0.28111, -0.00239508, 1.3197e-05, -2.53084e-08, _EtCuts_v2_assym)
V2A_th15p = V2HypoAssym("V2A_th15p", "A")
V2A_th15p.QThresholds = generateAssymVnThresholds( 0.241106, -0.00189997, 1.02592e-05, -1.94606e-08, _EtCuts_v2_assym)
V2A_th20p = V2HypoAssym("V2A_th20p", "A")
V2A_th20p.QThresholds = generateAssymVnThresholds( 0.222785, -0.00177955, 9.73365e-06, -1.86627e-08, _EtCuts_v2_assym)
V2A_thresholds = {"1": V2A_th1, "2": V2A_th2, "3": V2A_th3,
"0p": V2A_th0p,
"005p": V2A_th005p, "01p": V2A_th01p,
"025p": V2A_th025p, "05p": V2A_th05p,
"10p": V2A_th10p, "15p": V2A_th15p,
"20p": V2A_th20p}
V2C_th1 = V2HypoAssym("V2C_th1", "C")
V2C_th1.QThresholds = generateVnThresholds(0,0,0, _EtCuts_v2_assym)
......@@ -168,9 +205,37 @@ V2C_th2.QThresholds = generateVnThresholds(0,0,0, _EtCuts_v2_assym)
V2C_th3 = V2HypoAssym("V2C_th3", "C")
V2C_th3.QThresholds = generateVnThresholds(0,0,0, _EtCuts_v2_assym)
V2C_thresholds = {1: V2C_th1, 2: V2C_th2, 3: V2C_th3}
V2C_th0p = V2HypoAssym("V2C_th0p", "C")
V2C_th0p.QThresholds = generateAssymVnThresholds( 10, 0, 0, 0, _EtCuts_v2_assym)
V2C_th005p = V2HypoAssym("V2C_th005p", "C")
V2C_th005p.QThresholds = generateAssymVnThresholds( 0.628789, -0.00758789, 4.56162e-05, -9.31571e-08, _EtCuts_v2_assym)
V2C_th01p = V2HypoAssym("V2C_th01p", "C")
V2C_th01p.QThresholds = generateAssymVnThresholds( 0.452976, -0.00440765, 2.51445e-05, -5.00672e-08, _EtCuts_v2_assym)
V2C_th025p = V2HypoAssym("V2C_th025p", "C")
V2C_th025p.QThresholds = generateAssymVnThresholds( 0.304252, -0.00197356, 1.00126e-05, -1.89781e-08, _EtCuts_v2_assym)
V2C_th05p = V2HypoAssym("V2C_th05p", "C")
V2C_th05p.QThresholds = generateAssymVnThresholds( 0.224585, -0.000791821, 2.58771e-06, -3.27433e-09, _EtCuts_v2_assym)
V2C_th10p = V2HypoAssym("V2C_th10p", "C")
V2C_th10p.QThresholds = generateAssymVnThresholds( 0.172777, -0.000209044, -9.24903e-07, 3.99128e-09, _EtCuts_v2_assym)
V2C_th15p = V2HypoAssym("V2C_th15p", "C")
V2C_th15p.QThresholds = generateAssymVnThresholds( 0.164259, -0.000349901, 2.53182e-07, 1.26982e-09, _EtCuts_v2_assym)
V2C_th20p = V2HypoAssym("V2C_th20p", "C")
V2C_th20p.QThresholds = generateAssymVnThresholds( 0.139387, -9.5269e-05, -1.15158e-06, 3.88736e-09, _EtCuts_v2_assym)
V2C_thresholds = {"1": V2C_th1, "2": V2C_th2, "3": V2C_th3,
"0p": V2C_th0p,
"005p": V2C_th005p, "01p": V2C_th01p,
"025p": V2C_th025p, "05p": V2C_th05p,
"10p": V2C_th10p, "15p": V2C_th15p,
"20p": V2C_th20p}
def V2Assym(threshold, side):
if side == "A":
......
......@@ -4,5 +4,6 @@ __all__ = ['MinBias.py',
'TrigHIHypoConfig.py',
'TrigHIHypoMonitoring.py',
'UE.py',
'VnHypos.py'
'VnHypos.py',
'GapHypos.py'
]
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#include <xAODMuon/Muon.h>
#include <xAODMuon/MuonContainer.h>
#include "xAODTracking/VertexContainer.h"
#include "xAODTracking/Vertex.h"
#include "HFMuonHypo.h"
//Useful links
//http://acode-browser.usatlas.bnl.gov/lxr/source/atlas/Event/xAOD/xAODMuon/xAODMuon/versions/Muon_v1.h
//http://acode-browser2.usatlas.bnl.gov/lxr-rel20/source/atlas/InnerDetector/InDetTrigRecAlgs/InDetTrigVxSecondary/src/TrigVxSecondary.cxx
HFMuonHypo::HFMuonHypo(const std::string& name, ISvcLocator* pSvcLocator)
: HLT::HypoAlgo(name, pSvcLocator){
declareMonitoredVariable("eloss_all" , m_eloss_all , -1.);
declareMonitoredVariable("eloss_passing" , m_eloss_passing , -1.);
declareProperty("ElossCut", m_eloss_cut=0.1, "Cut on momentum imbalance");
}
HLT::ErrorCode HFMuonHypo::hltInitialize() {
return HLT::OK;
}
HFMuonHypo::~HFMuonHypo() {
}
HLT::ErrorCode HFMuonHypo::hltFinalize( ) { return HLT::OK; }
HLT::ErrorCode HFMuonHypo::hltExecute(const HLT::TriggerElement* outputTE, bool& pass) {
pass = false;
//Get Muon Container
const xAOD::MuonContainer* m_muons=nullptr;
HLT::ErrorCode statusMuons;
statusMuons=getFeature(outputTE,m_muons);
if(statusMuons== HLT::OK && m_muons!=nullptr){
ATH_MSG_DEBUG("Got MuonContainer object successfully");
}
else {
ATH_MSG_DEBUG("The MuonContainer object is inaccessible");
return HLT::ErrorCode(HLT::Action::ABORT_CHAIN, HLT::Reason::MISSING_FEATURE);
}
//Get primary vertex collection an then the primary vertex
const xAOD::VertexContainer* prmVtxColl=nullptr;
if(getFeature(outputTE,prmVtxColl)==HLT::OK && prmVtxColl!=nullptr){
ATH_MSG_DEBUG("Got PrimaryVertexCollection successfully");
}
else {
ATH_MSG_DEBUG("The PrimaryVertexCollection is inaccessible");
return HLT::ErrorCode(HLT::Action::ABORT_CHAIN, HLT::Reason::MISSING_FEATURE);
}
const xAOD::Vertex* priVtx = *(prmVtxColl->cbegin());
if (priVtx->vertexType() != xAOD::VxType::PriVtx) {
ATH_MSG_WARNING( "First vertex is not of type \"Primary Vertex\"." );
return HLT::OK;
}
//Get TrackParticle Collection
const xAOD::TrackParticleContainer* tracks=nullptr;
if(getFeature(outputTE,tracks)==HLT::OK || tracks==nullptr) {
ATH_MSG_DEBUG("Got TrackParticleContainer successfully");
}
else {
ATH_MSG_DEBUG("The TrackParticleContainer is inaccessible");
return HLT::ErrorCode(HLT::Action::ABORT_CHAIN, HLT::Reason::MISSING_FEATURE);
}
//loop over all muons asd check if one of them meets the criteria
//to pass the trigger
for(auto Muon : *m_muons){
//User only combined muons
if(Muon->muonType() !=xAOD::Muon::MuonType::Combined) continue;
//Quality
if(!(Muon->quality()==xAOD::Muon::Medium || Muon->quality()==xAOD::Muon::Tight)) continue;
//Determine Eloss, now cutting on it as well
const xAOD::TrackParticle*msTrk= Muon->trackParticle( xAOD::Muon::MuonSpectrometerTrackParticle);//MS Only Track
const xAOD::TrackParticle*idTrk= Muon->trackParticle( xAOD::Muon::InnerDetectorTrackParticle);//ID Track
float eloss_parameterized;//paramaterized eloss
if(!(Muon->parameter(eloss_parameterized,xAOD::Muon::ParamEnergyLoss))){
ATH_MSG_DEBUG("The parameter xAOD::Muon::ParamEnergyLoss is inaccessible");
return HLT::ErrorCode(HLT::Action::ABORT_CHAIN, HLT::Reason::MISSING_FEATURE);
}
double eloss=(idTrk->p4().P() - msTrk->p4().P() - eloss_parameterized)/idTrk->p4().P();
if(eloss>m_eloss_cut) continue;
//Insert code to match with tracks and see
//if it is seperated from the primary vertex
pass=true;
}
if(pass==true) ATH_MSG_DEBUG("Accepting Event");
else ATH_MSG_DEBUG("Rejecting Event");
return HLT::OK;
}
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#include "TrigInterfaces/HypoAlgo.h"
namespace HLT{
class TriggerElement;
}
class HFMuonHypo : public HLT::HypoAlgo {
public:
HFMuonHypo(const std::string& name, ISvcLocator* pSvcLocator);
~HFMuonHypo();
HLT::ErrorCode hltInitialize();
HLT::ErrorCode hltFinalize();
HLT::ErrorCode hltExecute(const HLT::TriggerElement* outputTE, bool& pass);
private:
// monitoring
int m_eloss_all;
int m_eloss_passing;
//Configuration
float m_eloss_cut;
};
......@@ -15,6 +15,8 @@ UltraCentralHypo::UltraCentralHypo(const std::string& name, ISvcLocator* pSvcLoc
declareProperty("FcalEtUpperBound", m_FcalEt_max=1.e10, "Upper bound of passing values, negative means +inf.");
declareProperty("FcalEtLowerBound", m_FcalEt_min=-1.e10, "Lower bound of passing values, negative means -inf.");
declareProperty("EtaMin", m_Eta_min=-3.25, "Lower bound of slice taken into calculation");
declareProperty("EtaMax", m_Eta_max=3.25, "Upper bound of slice taken into calculation");
}
......@@ -52,8 +54,10 @@ HLT::ErrorCode UltraCentralHypo::hltExecute(const HLT::TriggerElement* outputTE,
float Et = sh->et();
if(Et==0) continue;
float eta=(sh->etaMin()+sh->etaMax())/2.0;
if(fabs(eta)<3.2) continue;//FCal Only
if ( sh->etaMin() < m_Eta_min ) continue;
if ( sh->etaMax() > m_Eta_max ) continue;
// float eta=(sh->etaMin()+sh->etaMax())/2.0;
// if(fabs(eta)<3.2) continue;//FCal Only
m_Tot_Et+=Et;
}
......
......@@ -24,4 +24,6 @@ private:
// Configuration
float m_FcalEt_min;
float m_FcalEt_max;
float m_Eta_min;
float m_Eta_max;
};
......@@ -96,7 +96,7 @@ HLT::ErrorCode VnHypo::hltExecute(const HLT::TriggerElement* outputTE, bool& pas
}
m_icent=m_helper.getCentBin(m_Tot_Et);
if(m_icent==-1) return HLT::OK;
if(m_icent == -1) return HLT::OK;
m_qnx /= m_Tot_Et;
m_qny /= m_Tot_Et;
......
......@@ -4,6 +4,7 @@
#include "../TrigHIL2VtxMultHypo.h"
#include "../TrigEstimateUE.h"
#include "../VnHypo.h"
#include "../HFMuonHypo.h"
#include "../UltraCentralHypo.h"
#include "../CreateHIUEEstimate.h"
#include "../HICaloCellCorectionTool.h"
......@@ -16,6 +17,7 @@ DECLARE_ALGORITHM_FACTORY( TrigHIEFTrackHypo )
DECLARE_ALGORITHM_FACTORY( ETSumHypo )
DECLARE_ALGORITHM_FACTORY( TrigHIL2VtxMultHypo )
DECLARE_ALGORITHM_FACTORY( TrigEstimateUE )
DECLARE_ALGORITHM_FACTORY( HFMuonHypo )
DECLARE_ALGORITHM_FACTORY( VnHypo )
DECLARE_ALGORITHM_FACTORY( UltraCentralHypo )
DECLARE_ALGORITHM_FACTORY( CreateHIUEEstimate )
......@@ -29,6 +31,7 @@ DECLARE_FACTORY_ENTRIES( TrigHIHypo ) {
DECLARE_ALGORITHM( TrigHIL2VtxMultHypo )
DECLARE_ALGORITHM( TrigEstimateUE )
DECLARE_ALGORITHM( VnHypo )
DECLARE_ALGORITHM( HFMuonHypo )
DECLARE_ALGORITHM( UltraCentralHypo )
DECLARE_ALGORITHM( CreateHIUEEstimate )
DECLARE_ALGORITHM( ElectronUEMonitoring )
......
Markdown is supported
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