33 ATH_MSG_DEBUG(
"Trigger already booked, removing from trigger list " << trigName);
41 return StatusCode::SUCCESS;
49 ATH_MSG_DEBUG(
"Executing TrigEgammaMonitorElectronAlgorithm");
53 return StatusCode::SUCCESS;
61 return StatusCode::SUCCESS;
70 ATH_MSG_DEBUG(
"Start Chain Analysis ============================= " << trigger <<
" " << info.trigger);
73 if (
executeNavigation( ctx, info.trigger,info.etthr,info.pidname, pairObjs).isFailure() )
76 return StatusCode::SUCCESS;
79 std::vector< std::pair<const xAOD::Egamma*, const TrigCompositeUtils::Decision*>> pairObjsRaw;
80 pairObjsRaw.reserve(pairObjs.size());
81 for (
const auto& itr : pairObjs) {
82 pairObjsRaw.emplace_back(itr.first.get(), itr.second);
90 ATH_MSG_DEBUG(
"End Chain Analysis ============================= " << trigger);
94 return StatusCode::SUCCESS;
104 const std::string& trigItem,
106 const std::string& pidName,
117 return StatusCode::FAILURE;
121 const std::string decorName=
"is"+pidName;
122 for(
const auto *
const eg : *offElectrons ){
126 if(!eg->trackParticle()){
130 if(!eg->caloCluster()){
136 if( !(
getEt(eg) > (etthr-5.)*1.e3) )
continue;
140 if ( (fabs(eg->eta())>1.37 && fabs(eg->eta())<1.52) || fabs(eg->eta())>2.47 )
continue;
160 const auto el = std::make_shared<const xAOD::Electron>(*eg);
162 decor(*el)=
static_cast<bool>(
true);
166 pairObjs.emplace_back(el, dec);
170 ATH_MSG_DEBUG(
"BaseToolMT::Electron TEs " << pairObjs.size() <<
" found.");
171 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
Helper class to provide constant type-safe access to aux data.
Handle class for reading a decoration on an object.
struct _triginfo TrigInfo
SG::ReadHandle< xAOD::EventInfo > GetEventInfo(const EventContext &) const
Return a ReadHandle for an EventInfo object (get run/event numbers, etc.)
Helper class to provide type-safe access to aux data.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
virtual StatusCode initialize() override
initialize
TrigEgammaMonitorAnalysisAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
void fillEfficiencies(const std::vector< std::pair< const xAOD::Egamma *, const TrigCompositeUtils::Decision * > > &, const TrigInfo &, const bool) const
void fillResolutions(const std::vector< std::pair< const xAOD::Egamma *, const TrigCompositeUtils::Decision * > > &pairObjs, const TrigInfo &info) const
*****************************************************************************************************...
void fillDistributions(const std::vector< std::pair< const xAOD::Egamma *, const TrigCompositeUtils::Decision * > > &, const TrigInfo &) const
const std::map< std::string, TrigInfo > & getTrigInfoMap()
Helper methods.
const ToolHandle< TrigEgammaMatchingToolMT > & match() const
Get the e/g match tool.
bool isHLTTruncated() const
float getEt(const xAOD::Electron *eg) const
bool ApplyElectronPid(const xAOD::Electron *eg, const std::string &) const
Get offline electron decision.
TrigInfo getTrigInfo(const std::string &) const
Get the trigger info parsed from the chain name (only single lepton triggers)
bool isIsolated(const xAOD::Electron *, const std::string &) const
Check if electron fulfils isolation criteria.
void setTrigInfo(const std::string &)
Set the trigger info parsed from the chain name.
virtual StatusCode initialize() override
initialize
Gaudi::Property< bool > m_rmCrack
Remove crack region for Probe default True.
TrigEgammaMonitorElectronAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
Gaudi::Property< bool > m_forceProbeIsolation
force probe isolation
Gaudi::Property< bool > m_forceVetoVeryLoose
StatusCode executeNavigation(const EventContext &ctx, const std::string &trigItem, float, const std::string &, std::vector< std::pair< std::shared_ptr< const xAOD::Egamma >, const TrigCompositeUtils::Decision * > > &) const
navigation method called by executeNavigation
SG::ReadDecorHandleKey< xAOD::ElectronContainer > m_electronIsolationKeyPtCone20
Ensure offline electron isolation decoration is retrieved after being created.
Gaudi::Property< bool > m_forceEtThr
SG::ReadHandleKey< xAOD::ElectronContainer > m_offElectronKey
Event Wise offline ElectronContainer Access and end iterator.
SG::ReadDecorHandleKey< xAOD::EventInfo > m_eventInfoDecorKey
Gaudi::Property< std::vector< std::string > > m_trigInputList
List of triggers from menu.
Gaudi::Property< bool > m_forcePidSelection
force pid and crack selection into electron navigation
std::vector< std::string > m_trigList
List of triggers to study.
virtual ~TrigEgammaMonitorElectronAlgorithm() override
Gaudi::Property< std::string > m_offProbeIsolation
Define isolation working point for Probe electron.
@ LAr
The LAr calorimeter.
int count(std::string s, const std::string ®x)
count how many occurances of a regx are in a string
std::vector< std::string > veto
these patterns are anded
xAOD::TrigComposite Decision
static const unsigned int includeFailedDecisions
Run3 synonym of alsoDeactivateTEs.
The common trigger namespace for trigger analysis tools.