Skip to content
Snippets Groups Projects
Commit 42fe5247 authored by Debottam Bakshi Gupta's avatar Debottam Bakshi Gupta
Browse files

introducing trigger photon with deltaPhi selection

parent 01cd7237
No related branches found
No related tags found
6 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!36230introducing HLT_2g15_tight_dPhi15 for low mass Higgs group
/*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
/**************************************************************************
**
** File: Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDiphotonDPhiHypoTool.h
**
** Description: - Hypothesis Tool: search for photon pairs with
** deltaPhi more than a threshold value; intended for H->gg
**
** Author: D. BakshiGupta <debottam.bakshigupta@cern.ch>
**
**************************************************************************/
#include "TrigEgammaDiphotonDPhiHypoTool.h"
#include <cmath>
using namespace TrigCompositeUtils;
TrigEgammaDiphotonDPhiHypoTool::TrigEgammaDiphotonDPhiHypoTool(const std::string& type, const std::string& name, const IInterface* parent)
: ComboHypoToolBase(type, name, parent) {}
StatusCode TrigEgammaDiphotonDPhiHypoTool::initialize()
{
ATH_MSG_DEBUG("AcceptAll = " << m_acceptAll );
ATH_MSG_DEBUG("ThresholdDPhiCut = " << m_thresholdDPhiCut );
if ( not m_monTool.name().empty() ) {
ATH_CHECK( m_monTool.retrieve() );
ATH_MSG_DEBUG("m_monTool name: " << m_monTool);
}
ATH_MSG_DEBUG("Initialization completed successfully");
return StatusCode::SUCCESS;
}
bool TrigEgammaDiphotonDPhiHypoTool::executeAlg(std::vector<LegDecision> &combination) const {
//retrieve the electrons
std::vector<ElementLink<xAOD::PhotonContainer>> selected_photons;
for (auto el: combination){
auto EL= el.second;
auto photonLink = TrigCompositeUtils::findLink<xAOD::PhotonContainer>( *EL, featureString() ).link;
selected_photons.push_back(photonLink);
}
auto photonLink1=selected_photons[0];
auto photonLink2=selected_photons[1];
TLorentzVector hlv1 = (*photonLink1)->p4();
TLorentzVector hlv2 = (*photonLink2)->p4();
double dPhi = hlv1.DeltaPhi(hlv2);
ATH_MSG_DEBUG("Found two Photons with deltaPhi " <<dPhi);
// apply the cut
bool pass=true;
if (dPhi<m_thresholdDPhiCut){
ATH_MSG_DEBUG("Combination failed deltaPhi cut: " << dPhi << " not in " << m_thresholdDPhiCut);
pass=false;
}
if (pass)
ATH_MSG_DEBUG( " deltaPhi " << dPhi << " is above the threshold "<<m_thresholdDPhiCut<<" This seleciton passed! ");
return pass;
}
/*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
#ifndef TRIGEGAMMAHYPO_TRIGEGAMMADIPHOTONDPHIHYPOTOOL_H
#define TRIGEGAMMAHYPO_TRIGEGAMMADIPHOTONDPHIHYPOTOOL_H
/**************************************************************************
**
** File: Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDiphotonDPhiHypoTool.h
**
** Description: - Hypothesis Tool: search for photon pairs with
** deltaPhi more than a threshold value; intended for H->gg
**
** Author: D. BakshiGupta <debottam.bakshigupta@cern.ch>
**
**************************************************************************/
#include <string>
#include <vector>
#include "DecisionHandling/ComboHypoToolBase.h"
#include "xAODTracking/TrackParticleContainer.h"
#include "xAODTrigEgamma/TrigPhoton.h"
#include "xAODEgamma/PhotonContainer.h"
#include "TrigCompositeUtils/HLTIdentifier.h"
#include "TrigCompositeUtils/TrigCompositeUtils.h"
#include "AthenaMonitoringKernel/Monitored.h"
#include "AthenaMonitoringKernel/GenericMonitoringTool.h"
/**
* \class TrigEgammaDiphotonDPhiHypoTool
* \brief TrigEgammaDiphotonDPhiHypoTool is a ComboHypoTool that calculates the deltaPhi distance
* Apply the threshold cut and accepts the event if condition is
* satisfied
*
*/
class TrigEgammaDiphotonDPhiHypoTool: public ComboHypoToolBase {
public:
TrigEgammaDiphotonDPhiHypoTool(const std::string& type,
const std::string& name,
const IInterface* parent);
virtual ~TrigEgammaDiphotonDPhiHypoTool() {};
virtual StatusCode initialize() override;
private:
virtual bool executeAlg(std::vector<LegDecision>& thecomb) const override;
// flags
Gaudi::Property< bool > m_acceptAll {this, "AcceptAll", false, "Ignore selection" };
// cuts
Gaudi::Property<float> m_thresholdDPhiCut {this,"ThresholdDPhiCut", 1.5, "minimum deltaPhi required between two photons"};
// monitoring
ToolHandle<GenericMonitoringTool> m_monTool { this, "MonTool", "", "Monitoring tool" };
}; // TRIGEGAMMAHYPO_TRIGEGAMMADIPHOTONDPHIHYPOTOOL_H
#endif
......@@ -31,6 +31,7 @@
#include "../TrigEgammaPrecisionPhotonHypoToolMult.h"
#include "../TrigEgammaPrecisionElectronHypoToolMult.h"
#include "../TrigEgammaDielectronMassHypoTool.h"
#include "../TrigEgammaDiphotonDPhiHypoTool.h"
DECLARE_COMPONENT( TrigL2CaloHypo )
DECLARE_COMPONENT( TrigL2ElectronFex )
......@@ -65,4 +66,4 @@ DECLARE_COMPONENT( TrigEgammaPrecisionElectronHypoAlgMT )
DECLARE_COMPONENT( TrigEgammaPrecisionPhotonHypoToolMult )
DECLARE_COMPONENT( TrigEgammaPrecisionElectronHypoToolMult )
DECLARE_COMPONENT( TrigEgammaDielectronMassHypoTool )
DECLARE_COMPONENT( TrigEgammaDiphotonDPhiHypoTool )
......@@ -2,6 +2,8 @@
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
#
from AthenaCommon.Constants import DEBUG
from AthenaCommon.Logging import logging
logging.getLogger().info("Importing %s",__name__)
log = logging.getLogger("TriggerMenuMT.HLTMenuConfig.Egamma.PhotonDef")
......@@ -30,6 +32,14 @@ def precisionPhotonCaloSequenceCfg( flags ):
def precisionPhotonSequenceCfg( flags ):
return precisionPhotonMenuSequence('Photon')
def diphotonDPhiHypoToolFromDict(chainDict):
from TrigEgammaHypo.TrigEgammaHypoConf import TrigEgammaDiphotonDPhiHypoTool
name = chainDict['chainName']
tool= TrigEgammaDiphotonDPhiHypoTool(name)
tool.ThresholdDPhiCut = 1.5
tool.OutputLevel = DEBUG
return tool
#----------------------------------------------------------------
# Class to configure chain
#----------------------------------------------------------------
......@@ -95,5 +105,9 @@ class PhotonChainConfiguration(ChainConfigurationBase):
return self.getStep(3,stepName,[ precisionPhotonCaloSequenceCfg])
def getPrecisionPhoton(self):
stepName = "PhotonPrecision"
return self.getStep(4,stepName,[ precisionPhotonSequenceCfg])
if "dPhi15" in self.chainName:
stepName = "precision_topophoton"
return self.getStep(4,stepName,sequenceCfgArray=[precisionPhotonSequenceCfg], comboTools=[diphotonDPhiHypoToolFromDict])
else:
stepName = "precision_photon"
return self.getStep(4,stepName,[ precisionPhotonSequenceCfg])
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
from AthenaCommon.Constants import DEBUG
# menu components
from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import MenuSequence, RecoFragmentsPool
from AthenaCommon.CFElements import parOR, seqAND
......@@ -101,6 +103,7 @@ def precisionPhotonMenuSequence(name):
thePrecisionPhotonHypo = TrigEgammaPrecisionPhotonHypoAlgMT(name+"precisionPhotonHypo")
thePrecisionPhotonHypo.Photons = sequenceOut
thePrecisionPhotonHypo.OutputLevel = DEBUG
return MenuSequence( Sequence = sequence,
Maker = precisionPhotonViewsMaker,
......
......@@ -155,6 +155,9 @@ def setupMenu():
# for moving to PhysicsP1, ATR-21242
ChainProp(name='HLT_g140_etcut_L1EM22VHI', groups=SinglePhotonGroup),
#ATR-21882
ChainProp(name='HLT_2g15_tight_dPhi15_L12EM3', groups=MultiPhotonGroup),
]
TriggerFlags.METSlice.signatures = TriggerFlags.METSlice.signatures() + [
......
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