ATLAS Offline Software
TrigBphysMonitorAlgorithm.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRIGBPHYSMONITORING_TRIGBPHYSMONITORALGORITHM_H
6 #define TRIGBPHYSMONITORING_TRIGBPHYSMONITORALGORITHM_H
7 
10 
13 
17 
19 public:
20  TrigBphysMonitorAlgorithm( const std::string& name, ISvcLocator* pSvcLocator );
22  virtual StatusCode initialize() override;
23  virtual StatusCode fillHistograms( const EventContext& ctx ) const override;
24 
25 
26 private:
28 
29  SG::ReadHandleKey<xAOD::MuonContainer> m_offlineMuonCollectionKey{this, "offlineMuonCollectionKey", "Muons"};
30  SG::ReadHandleKey<xAOD::TrackParticleContainer> m_offlineIDTrackCollectionKey{this, "offlineIDTrackCollectionKey", "InDetTrackParticles"};
31  SG::ReadHandleKey<xAOD::VertexContainer> m_offlinePvCollectionKey {this,"offlinePvCollectionKey","PrimaryVertices"};
32 
33  Gaudi::Property<std::vector<std::string>> m_ContainerNames{this, "ContainerNames", {}};
34 
35  Gaudi::Property<std::vector<std::string>> m_ChainNames_MuMu{this, "ChainNames_MuMu", {}};
36  Gaudi::Property<std::vector<std::string>> m_ChainNames_MuMuX{this, "ChainNames_MuMuX", {}};
37  Gaudi::Property<std::vector<std::string>> m_ChainNames_ElEl{this, "ChainNames_ElEl", {}};
38 
39  Gaudi::Property<bool> m_requireExplicitESDecision{this, "requireExplicitESDecision", false};
40 
41  Gaudi::Property<double> m_dimuMassLower_prefit{this, "dimuMassLower_prefit", 0.};
42  Gaudi::Property<double> m_dimuMassUpper_prefit{this, "dimuMassUpper_prefit", 16000.};
43  Gaudi::Property<double> m_dimuMassLower_postfit{this, "dimuMassLower_postfit", 0.};
44  Gaudi::Property<double> m_dimuMassUpper_postfit{this, "dimuMassUpper_postfit", 15000.};
45  Gaudi::Property<double> m_dimuChi2Cut{this, "dimuChi2Cut", 20.};
46 
47  Gaudi::Property<double> m_deltaRMatchingThreshold{this, "deltaRMatchingThreshold", 0.05};
48 
49  ToolHandle<InDet::VertexPointEstimator> m_vertexPointEstimator {this, "VertexPointEstimator", "", "tool to find starting point for the vertex fitter"};
50  ToolHandle<Trk::TrkVKalVrtFitter> m_vertexFitter {this, "VertexFitter", "", "VKalVrtFitter tool to fit tracks into the common vertex"};
51  ToolHandle<Trk::V0Tools> m_v0Tools {this, "V0Tools", "", "V0 tools to calculate things like Lxy"};
52 
53  StatusCode fillContainers(const EventContext& ctx) const;
54  StatusCode fillContainerHists(const EventContext& ctx, const SG::ReadHandleKey<xAOD::TrigBphysContainer>& trigBphysContainerKey) const;
55 
56  StatusCode fillChains(const EventContext& ctx) const;
57  StatusCode fillDimuonChainHists(const EventContext& ctx, const std::string& chainName) const;
58  StatusCode fillBmumuxChainHists(const EventContext& ctx, const std::string& chainName) const;
59  StatusCode fillDielectronChainHists(const EventContext& ctx, const std::string& chainName) const;
60  StatusCode fillChainGenericHists(const EventContext& /*ctx*/, const ToolHandle<GenericMonitoringTool>& currentMonGroup, const std::string& chainName) const;
61  StatusCode fillBphysObjectHists(const ToolHandle<GenericMonitoringTool>& currentMonGroup, const ElementLink<xAOD::TrigBphysContainer>& bphysLink, const std::string& objStr) const;
62  StatusCode fillTrigLeptonHists(const ToolHandle<GenericMonitoringTool>& currentMonGroup, const ElementLink<xAOD::TrigBphysContainer>& bphysLink, const std::string& name_prefix) const;
63  StatusCode fillTrigBmumuxTrkHists(const ToolHandle<GenericMonitoringTool>& currentMonGroup, const ElementLink<xAOD::TrigBphysContainer>& bphysLink, UInt_t tracksStartFrom = 2) const;
64  StatusCode fillDiTracksHists(const ToolHandle<GenericMonitoringTool>& currentMonGroup,
65  const std::vector<ElementLink<xAOD::TrackParticleContainer> >& tpLinkVector,
66  const std::string& name_prefix) const;
67  StatusCode fillTracksHists(const ToolHandle<GenericMonitoringTool>& currentMonGroup,
68  const std::vector<ElementLink<xAOD::TrackParticleContainer> >& tpLinkVector,
69  const std::string& prefix,
70  bool separateHists = false,
71  UInt_t offsetIndex = 0) const;
72  StatusCode fillTrkHists(const ToolHandle<GenericMonitoringTool>& currentMonGroup, const xAOD::TrackParticle* trk, const std::string& name_prefix) const;
73 
74  StatusCode fillOfflineDimuons(const EventContext& ctx, const std::vector<std::unique_ptr<xAOD::Vertex>>& dimuonContainer) const;
75  StatusCode fillOfflineDimuonHists(const EventContext& /*ctx*/, const std::string& dimuonMonGroupName, const std::vector<std::unique_ptr<xAOD::Vertex>>& dimuonContainer) const;
76  StatusCode fillVertexHists(const ToolHandle<GenericMonitoringTool>& currentMonGroup, const xAOD::Vertex* vertex, const std::string& objStr) const;
77 
78  bool isChainPassed(const std::string& chain) const;
79 
80  StatusCode buildDimuons(const EventContext& ctx, std::vector<std::unique_ptr<xAOD::Vertex>>& vxContainer) const;
81  std::unique_ptr<xAOD::Vertex> dimuonFit(const xAOD::TrackParticle* mu1, const xAOD::TrackParticle* mu2) const;
82  double dimuonMass(const xAOD::TrackParticle* mu1, const xAOD::TrackParticle* mu2) const;
83  std::vector<const xAOD::Vertex*> GetGoodPVs(const xAOD::VertexContainer* pvContainer) const;
84  const xAOD::Vertex* getPvForDimuon_lowestA0(const xAOD::Vertex* vtx, const std::vector<const xAOD::Vertex*>& PVs) const;
85 
86  bool matchDimuon(const xAOD::Vertex* dimuonVertex, const std::string& chainName) const;
87  bool matchDimuon(const xAOD::Vertex* dimuonVertex, const ElementLink<xAOD::TrigBphysContainer>& bphysLink) const;
88  bool matchTrackParticles(const xAOD::TrackParticle* trk1, const xAOD::TrackParticle* trk2) const;
89 
90 };
91 #endif
V0Tools.h
TrigBphysMonitorAlgorithm::m_dimuChi2Cut
Gaudi::Property< double > m_dimuChi2Cut
Definition: TrigBphysMonitorAlgorithm.h:45
TrigBphysMonitorAlgorithm::dimuonMass
double dimuonMass(const xAOD::TrackParticle *mu1, const xAOD::TrackParticle *mu2) const
Definition: TrigBphysMonitorAlgorithm.cxx:583
runLayerRecalibration.chain
chain
Definition: runLayerRecalibration.py:175
VertexPointEstimator.h
TrigBphysMonitorAlgorithm::matchDimuon
bool matchDimuon(const xAOD::Vertex *dimuonVertex, const std::string &chainName) const
Definition: TrigBphysMonitorAlgorithm.cxx:532
TrigBphysMonitorAlgorithm::fillDiTracksHists
StatusCode fillDiTracksHists(const ToolHandle< GenericMonitoringTool > &currentMonGroup, const std::vector< ElementLink< xAOD::TrackParticleContainer > > &tpLinkVector, const std::string &name_prefix) const
Definition: TrigBphysMonitorAlgorithm.cxx:306
TrigBphysMonitorAlgorithm::m_dimuMassUpper_postfit
Gaudi::Property< double > m_dimuMassUpper_postfit
Definition: TrigBphysMonitorAlgorithm.h:44
SG::HandleKeyArray
Definition: StoreGate/StoreGate/HandleKeyArray.h:38
TrigBphysMonitorAlgorithm::fillTrkHists
StatusCode fillTrkHists(const ToolHandle< GenericMonitoringTool > &currentMonGroup, const xAOD::TrackParticle *trk, const std::string &name_prefix) const
Definition: TrigBphysMonitorAlgorithm.cxx:333
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
TrigBphysMonitorAlgorithm::getPvForDimuon_lowestA0
const xAOD::Vertex * getPvForDimuon_lowestA0(const xAOD::Vertex *vtx, const std::vector< const xAOD::Vertex * > &PVs) const
Definition: TrigBphysMonitorAlgorithm.cxx:605
TrkVKalVrtFitter.h
TrigBphysMonitorAlgorithm::initialize
virtual StatusCode initialize() override
initialize
Definition: TrigBphysMonitorAlgorithm.cxx:23
AthMonitorAlgorithm
Base class for Athena Monitoring Algorithms.
Definition: AthMonitorAlgorithm.h:36
TrigBphysMonitorAlgorithm::m_dimuMassUpper_prefit
Gaudi::Property< double > m_dimuMassUpper_prefit
Definition: TrigBphysMonitorAlgorithm.h:42
TrigBphysMonitorAlgorithm::m_vertexPointEstimator
ToolHandle< InDet::VertexPointEstimator > m_vertexPointEstimator
Definition: TrigBphysMonitorAlgorithm.h:49
TrigBphysMonitorAlgorithm::fillChainGenericHists
StatusCode fillChainGenericHists(const EventContext &, const ToolHandle< GenericMonitoringTool > &currentMonGroup, const std::string &chainName) const
Definition: TrigBphysMonitorAlgorithm.cxx:221
TrigBphysMonitorAlgorithm::fillDielectronChainHists
StatusCode fillDielectronChainHists(const EventContext &ctx, const std::string &chainName) const
Definition: TrigBphysMonitorAlgorithm.cxx:195
TrigBphysMonitorAlgorithm::m_offlineMuonCollectionKey
SG::ReadHandleKey< xAOD::MuonContainer > m_offlineMuonCollectionKey
Definition: TrigBphysMonitorAlgorithm.h:29
TrigBphysMonitorAlgorithm::matchTrackParticles
bool matchTrackParticles(const xAOD::TrackParticle *trk1, const xAOD::TrackParticle *trk2) const
Definition: TrigBphysMonitorAlgorithm.cxx:575
TrigBphysMonitorAlgorithm::m_ChainNames_MuMu
Gaudi::Property< std::vector< std::string > > m_ChainNames_MuMu
Definition: TrigBphysMonitorAlgorithm.h:35
TrigBphysMonitorAlgorithm::fillBmumuxChainHists
StatusCode fillBmumuxChainHists(const EventContext &ctx, const std::string &chainName) const
Definition: TrigBphysMonitorAlgorithm.cxx:161
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TrigBphys.h
AthMonitorAlgorithm.h
TrigBphysMonitorAlgorithm
Definition: TrigBphysMonitorAlgorithm.py:1
TrigBphysMonitorAlgorithm::fillContainerHists
StatusCode fillContainerHists(const EventContext &ctx, const SG::ReadHandleKey< xAOD::TrigBphysContainer > &trigBphysContainerKey) const
Definition: TrigBphysMonitorAlgorithm.cxx:76
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
TrigBphysMonitorAlgorithm::TrigBphysMonitorAlgorithm
TrigBphysMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Definition: TrigBphysMonitorAlgorithm.cxx:15
TrigBphysMonitorAlgorithm::fillOfflineDimuonHists
StatusCode fillOfflineDimuonHists(const EventContext &, const std::string &dimuonMonGroupName, const std::vector< std::unique_ptr< xAOD::Vertex >> &dimuonContainer) const
Definition: TrigBphysMonitorAlgorithm.cxx:374
TrigBphysMonitorAlgorithm::fillChains
StatusCode fillChains(const EventContext &ctx) const
Definition: TrigBphysMonitorAlgorithm.cxx:98
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
Monitored.h
Header file to be included by clients of the Monitored infrastructure.
TrigBphysMonitorAlgorithm::fillTrigBmumuxTrkHists
StatusCode fillTrigBmumuxTrkHists(const ToolHandle< GenericMonitoringTool > &currentMonGroup, const ElementLink< xAOD::TrigBphysContainer > &bphysLink, UInt_t tracksStartFrom=2) const
Definition: TrigBphysMonitorAlgorithm.cxx:272
TrigBphysMonitorAlgorithm::buildDimuons
StatusCode buildDimuons(const EventContext &ctx, std::vector< std::unique_ptr< xAOD::Vertex >> &vxContainer) const
Definition: TrigBphysMonitorAlgorithm.cxx:449
TrigBphysMonitorAlgorithm::m_offlineIDTrackCollectionKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_offlineIDTrackCollectionKey
Definition: TrigBphysMonitorAlgorithm.h:30
TrigBphysMonitorAlgorithm::fillVertexHists
StatusCode fillVertexHists(const ToolHandle< GenericMonitoringTool > &currentMonGroup, const xAOD::Vertex *vertex, const std::string &objStr) const
Definition: TrigBphysMonitorAlgorithm.cxx:408
TrigBphysMonitorAlgorithm::m_ChainNames_ElEl
Gaudi::Property< std::vector< std::string > > m_ChainNames_ElEl
Definition: TrigBphysMonitorAlgorithm.h:37
TrigBphysMonitorAlgorithm::dimuonFit
std::unique_ptr< xAOD::Vertex > dimuonFit(const xAOD::TrackParticle *mu1, const xAOD::TrackParticle *mu2) const
Definition: TrigBphysMonitorAlgorithm.cxx:519
TrigBphysMonitorAlgorithm::m_dimuMassLower_prefit
Gaudi::Property< double > m_dimuMassLower_prefit
Definition: TrigBphysMonitorAlgorithm.h:41
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
TrigBphysMonitorAlgorithm::GetGoodPVs
std::vector< const xAOD::Vertex * > GetGoodPVs(const xAOD::VertexContainer *pvContainer) const
Definition: TrigBphysMonitorAlgorithm.cxx:593
TrigBphysMonitorAlgorithm::m_TrigBphysContainerKeys
SG::ReadHandleKeyArray< xAOD::TrigBphysContainer > m_TrigBphysContainerKeys
Definition: TrigBphysMonitorAlgorithm.h:27
TrigBphysMonitorAlgorithm::m_v0Tools
ToolHandle< Trk::V0Tools > m_v0Tools
Definition: TrigBphysMonitorAlgorithm.h:51
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
TrigBphysMonitorAlgorithm::m_dimuMassLower_postfit
Gaudi::Property< double > m_dimuMassLower_postfit
Definition: TrigBphysMonitorAlgorithm.h:43
TrigBphysMonitorAlgorithm::fillTracksHists
StatusCode fillTracksHists(const ToolHandle< GenericMonitoringTool > &currentMonGroup, const std::vector< ElementLink< xAOD::TrackParticleContainer > > &tpLinkVector, const std::string &prefix, bool separateHists=false, UInt_t offsetIndex=0) const
Definition: TrigBphysMonitorAlgorithm.cxx:288
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
python.TriggerAPI.TriggerAPISession.chainName
chainName
Definition: TriggerAPISession.py:426
TrigBphysMonitorAlgorithm::fillDimuonChainHists
StatusCode fillDimuonChainHists(const EventContext &ctx, const std::string &chainName) const
Definition: TrigBphysMonitorAlgorithm.cxx:136
TrigBphysMonitorAlgorithm::m_deltaRMatchingThreshold
Gaudi::Property< double > m_deltaRMatchingThreshold
Definition: TrigBphysMonitorAlgorithm.h:47
TrigBphysMonitorAlgorithm::fillTrigLeptonHists
StatusCode fillTrigLeptonHists(const ToolHandle< GenericMonitoringTool > &currentMonGroup, const ElementLink< xAOD::TrigBphysContainer > &bphysLink, const std::string &name_prefix) const
Definition: TrigBphysMonitorAlgorithm.cxx:255
TrigBphysMonitorAlgorithm::fillContainers
StatusCode fillContainers(const EventContext &ctx) const
For lxy etc.
Definition: TrigBphysMonitorAlgorithm.cxx:64
TrigBphysMonitorAlgorithm::fillBphysObjectHists
StatusCode fillBphysObjectHists(const ToolHandle< GenericMonitoringTool > &currentMonGroup, const ElementLink< xAOD::TrigBphysContainer > &bphysLink, const std::string &objStr) const
Definition: TrigBphysMonitorAlgorithm.cxx:234
TrigBphysMonitorAlgorithm::~TrigBphysMonitorAlgorithm
virtual ~TrigBphysMonitorAlgorithm()
Definition: TrigBphysMonitorAlgorithm.cxx:20
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
TrigBphysMonitorAlgorithm::m_offlinePvCollectionKey
SG::ReadHandleKey< xAOD::VertexContainer > m_offlinePvCollectionKey
Definition: TrigBphysMonitorAlgorithm.h:31
TrigBphysContainer.h
TrigBphysMonitorAlgorithm::m_ChainNames_MuMuX
Gaudi::Property< std::vector< std::string > > m_ChainNames_MuMuX
Definition: TrigBphysMonitorAlgorithm.h:36
TrigBphysMonitorAlgorithm::m_vertexFitter
ToolHandle< Trk::TrkVKalVrtFitter > m_vertexFitter
Definition: TrigBphysMonitorAlgorithm.h:50
TrigBphysMonitorAlgorithm::fillOfflineDimuons
StatusCode fillOfflineDimuons(const EventContext &ctx, const std::vector< std::unique_ptr< xAOD::Vertex >> &dimuonContainer) const
Definition: TrigBphysMonitorAlgorithm.cxx:351
TrigBphysMonitorAlgorithm::m_requireExplicitESDecision
Gaudi::Property< bool > m_requireExplicitESDecision
Definition: TrigBphysMonitorAlgorithm.h:39
TrigBphysMonitorAlgorithm::m_ContainerNames
Gaudi::Property< std::vector< std::string > > m_ContainerNames
Definition: TrigBphysMonitorAlgorithm.h:33
TrigBphysMonitorAlgorithm::isChainPassed
bool isChainPassed(const std::string &chain) const
Definition: TrigBphysMonitorAlgorithm.cxx:438
TrigBphysMonitorAlgorithm::fillHistograms
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
Definition: TrigBphysMonitorAlgorithm.cxx:42