ATLAS Offline Software
TrigBjetBtagHypoAlg.h
Go to the documentation of this file.
1 
2 /*
3  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
4 */
5 
6 #ifndef TRIGBJETHYPO_TRIGBJETBTAGHYPOALG_H
7 #define TRIGBJETHYPO_TRIGBJETBTAGHYPOALG_H 1
8 
9 #include "TrigBjetHypoAlgBase.h"
10 #include "TrigBjetBtagHypoTool.h"
11 
12 #include <string>
13 
15 
16 #include "xAODJet/JetContainer.h"
18 
21 
25 
26 
27 #define MONITOR_BTAG_AUX_TRACK_VAR(VAR_NAME, VAR_TYPE ) \
28  auto monitor_for_##VAR_NAME = Monitored::Collection( #VAR_NAME, \
29  SG::ConstAccessor< std::vector<VAR_TYPE> acc( #VAR_NAME )(**bTagLink));
30 
31 #define MONITOR_BTAG_AUX_VAR(VAR_NAME, VAR_TYPE, CONTAINER ) \
32  auto monitor_for_##VAR_NAME = Monitored::Collection( #VAR_NAME, CONTAINER, \
33  [](const ElementLink< xAOD::BTaggingContainer >& bTagLink) { \
34  return SG::ConstAccessor<VAR_TYPE>( #VAR_NAME )(**bTagLink); \
35  } \
36  );
37 
38 
40  public:
41  TrigBjetBtagHypoAlg( const std::string& name, ISvcLocator* pSvcLocator );
42 
43  virtual StatusCode initialize();
44  virtual StatusCode execute( const EventContext& context ) const;
45 
46  private:
48 
49  // online monitoring
50  virtual StatusCode monitor_jets( const ElementLinkVector<xAOD::JetContainer >& jetELs, const ElementLinkVector<xAOD::JetContainer >& all_bTaggedJetELs ) const ;
51  virtual StatusCode monitor_tracks( const EventContext& context, const TrigCompositeUtils::DecisionContainer* prevDecisionContainer ) const;
52  virtual StatusCode monitor_primary_vertex( const ElementLink< xAOD::VertexContainer >& primVertexEL ) const;
53  virtual StatusCode monitor_flavor_probabilities( const ElementLinkVector< xAOD::BTaggingContainer >& bTaggingEL, const std::string& var_name) const;
54  virtual StatusCode monitor_flavor_bb_probabilities( const ElementLinkVector< xAOD::BTaggingContainer >& bTaggingEL, const std::string& var_name) const;
56  const ElementLinkVector< xAOD::BTaggingContainer >& bTaggingEL, std::string tagger ) const;
58 
59  private:
60  ToolHandleArray< TrigBjetBtagHypoTool > m_hypoTools {this,"HypoTools",{},"Hypo Tools"};
61  ToolHandle<GenericMonitoringTool> m_monTool{this,"MonTool","","Monitoring tool"};
62 
63  SG::ReadHandleKey< xAOD::JetContainer > m_bTaggedJetKey {this,"BTaggedJetKey","","Key for b-tagged jets"};
64  SG::ReadHandleKey< xAOD::BTaggingContainer> m_bTagKey {this,"BTaggingKey","","Key for BTagging"};
65  SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackKey {this,"TracksKey","","Key for precision tracks"};
66  SG::ReadHandleKey< xAOD::VertexContainer > m_inputPrmVtx {this,"PrmVtxKey","","Key for Primary vertex collection for monitoring"};
67 
68  Gaudi::Property< std::string > m_bTaggingLink {this,"BTaggingLink","Unspecified","b-Tagging Link name in navigation (output)"};
69  Gaudi::Property< std::string > m_prmVtxLink {this,"PrmVtxLink","Unspecified","Vertex Link name in navigation (input)"};
70  Gaudi::Property<std::string> m_btaggingLinkName{this, "BtaggingLinkName", "btag"}; // TM 2021-10-30
71 
73  "BeamSpotKey", "BeamSpotData", "SG key for beam spot" };
74 
75 };
76 
77 #endif
78 
TrigBjetBtagHypoAlg::monitor_flavor_bb_probabilities
virtual StatusCode monitor_flavor_bb_probabilities(const ElementLinkVector< xAOD::BTaggingContainer > &bTaggingEL, const std::string &var_name) const
Definition: TrigBjetBtagHypoAlg.cxx:366
TrigBjetBtagHypoAlg::initialize
virtual StatusCode initialize()
Definition: TrigBjetBtagHypoAlg.cxx:15
TrigBjetBtagHypoAlg::m_bTaggedJetKey
SG::ReadHandleKey< xAOD::JetContainer > m_bTaggedJetKey
Definition: TrigBjetBtagHypoAlg.h:63
TrigBjetBtagHypoAlg::monitor_btagging
virtual StatusCode monitor_btagging(const ElementLinkVector< xAOD::BTaggingContainer > &bTaggingEL) const
Definition: TrigBjetBtagHypoAlg.cxx:412
TrigCompositeUtils.h
CheckAppliedSFs.var_name
var_name
Definition: CheckAppliedSFs.py:241
TrigBjetHypoAlgBase.h
TrigBjetBtagHypoAlg::m_trackKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackKey
Definition: TrigBjetBtagHypoAlg.h:65
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
TrigBjetBtagHypoAlg::collect_valid_links
virtual ElementLinkVector< xAOD::BTaggingContainer > collect_valid_links(const ElementLinkVector< xAOD::BTaggingContainer > &bTaggingEL, std::string tagger) const
Definition: TrigBjetBtagHypoAlg.cxx:400
TrigBjetBtagHypoAlg::m_bTaggingLink
Gaudi::Property< std::string > m_bTaggingLink
Definition: TrigBjetBtagHypoAlg.h:68
TrigBjetBtagHypoAlg::m_bTagKey
SG::ReadHandleKey< xAOD::BTaggingContainer > m_bTagKey
Definition: TrigBjetBtagHypoAlg.h:64
GenericMonitoringTool.h
TrigBjetBtagHypoAlg::m_prmVtxLink
Gaudi::Property< std::string > m_prmVtxLink
Definition: TrigBjetBtagHypoAlg.h:69
TrigBjetBtagHypoTool.h
BTaggingAuxContainer.h
TrigBjetBtagHypoAlg::monitor_primary_vertex
virtual StatusCode monitor_primary_vertex(const ElementLink< xAOD::VertexContainer > &primVertexEL) const
Definition: TrigBjetBtagHypoAlg.cxx:390
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TrigBjetBtagHypoAlg
Definition: TrigBjetBtagHypoAlg.h:39
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
TrigBjetBtagHypoAlg::monitor_flavor_probabilities
virtual StatusCode monitor_flavor_probabilities(const ElementLinkVector< xAOD::BTaggingContainer > &bTaggingEL, const std::string &var_name) const
Definition: TrigBjetBtagHypoAlg.cxx:332
Monitored.h
Header file to be included by clients of the Monitored infrastructure.
TrigBjetHypoAlgBase
Definition: TrigBjetHypoAlgBase.h:18
ElementLinkVector
ElementLinkVector implementation for standalone ROOT.
Definition: AthLinks/ElementLinkVector.h:27
TrigBjetBtagHypoAlg::monitor_tracks
virtual StatusCode monitor_tracks(const EventContext &context, const TrigCompositeUtils::DecisionContainer *prevDecisionContainer) const
Definition: TrigBjetBtagHypoAlg.cxx:253
BTaggingContainer.h
TrigBjetBtagHypoAlg::m_inputPrmVtx
SG::ReadHandleKey< xAOD::VertexContainer > m_inputPrmVtx
Definition: TrigBjetBtagHypoAlg.h:66
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
TrigBjetBtagHypoAlg::monitor_jets
virtual StatusCode monitor_jets(const ElementLinkVector< xAOD::JetContainer > &jetELs, const ElementLinkVector< xAOD::JetContainer > &all_bTaggedJetELs) const
Definition: TrigBjetBtagHypoAlg.cxx:217
SG::ReadCondHandleKey< InDet::BeamSpotData >
TrigBjetBtagHypoAlg::m_btaggingLinkName
Gaudi::Property< std::string > m_btaggingLinkName
Definition: TrigBjetBtagHypoAlg.h:70
TrigBjetBtagHypoAlg::TrigBjetBtagHypoAlg
TrigBjetBtagHypoAlg()
TrigBjetBtagHypoAlg::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Definition: TrigBjetBtagHypoAlg.h:61
JetContainer.h
TrigBjetBtagHypoAlg::m_hypoTools
ToolHandleArray< TrigBjetBtagHypoTool > m_hypoTools
Definition: TrigBjetBtagHypoAlg.h:60
JetAuxContainer.h
TrigBjetBtagHypoAlg::m_beamSpotKey
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
Definition: TrigBjetBtagHypoAlg.h:72
ConstAccessor.h
Helper class to provide constant type-safe access to aux data.
TrigBjetBtagHypoAlg::execute
virtual StatusCode execute(const EventContext &context) const
Definition: TrigBjetBtagHypoAlg.cxx:36