ATLAS Offline Software
Loading...
Searching...
No Matches
JpsiFinder.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5// ****************************************************************************
6// ----------------------------------------------------------------------------
7// JpsiFinder header file
8//
9// James Catmore <James.Catmore@cern.ch>
10
11// ----------------------------------------------------------------------------
12// ****************************************************************************
13#ifndef JPSIFINDER_H
14#define JPSIFINDER_H
16#include "GaudiKernel/ToolHandle.h"
17#include "GaudiKernel/IPartPropSvc.h"
19#include "xAODMuon/Muon.h"
26
28
29namespace Analysis {
30
31 // Struct and enum to associate muon pairs with track pairs
32 // and make the program flow more straightforward
33 enum PairType{ MUMU=0, MUTRK=1, TRKTRK=2};
34 enum MuonTypes{ CC=0, CT=1, TT=2};
46
47 class JpsiFinder: public extends<AthAlgTool, Analysis::ICandidateSearch>
48 {
49 public:
50 JpsiFinder(const std::string& t, const std::string& n, const IInterface* p);
52 virtual StatusCode initialize() override;
53
54 //-------------------------------------------------------------------------------------
55 //Doing Calculation and inline functions
56
57 virtual StatusCode performSearch(const EventContext& ctx, xAOD::VertexContainer& vxContainer) const override;
58 std::vector<JpsiCandidate> getPairs(const std::vector<const xAOD::TrackParticle*>&) const;
59 std::vector<JpsiCandidate> getPairs(const std::vector<const xAOD::Muon*>&) const;
60 std::vector<JpsiCandidate> getPairs2Colls(const std::vector<const xAOD::TrackParticle*>&, const std::vector<const xAOD::Muon*>&, bool) const;
61 double getInvariantMass(const JpsiCandidate&, std::span<const double> ) const;
62 std::vector<JpsiCandidate> selectCharges(const std::vector<JpsiCandidate>&) const;
63 xAOD::Vertex* fit(const std::vector<const xAOD::TrackParticle*>&, const xAOD::TrackParticleContainer* importedTrackCollection) const;
64 bool passesMCPCuts(const xAOD::Muon*) const;
66 TVector3 trackMomentum(const xAOD::Vertex * vxCandidate, int trkIndex) const;
67 //-------------------------------------------------------------------------------------
68
69 private:
70 bool m_mumu;
71 bool m_mutrk;
79 double m_trk1M;
80 double m_trk2M;
82 double m_higherPt;
88 double m_Chi2Cut;
93 SG::ReadHandleKey<xAOD::TrackParticleContainer> m_TrkParticleCollection {this, "TrackParticleCollection", "InDetTrackParticles" };
95 PublicToolHandle < Trk::IVertexFitter > m_iVertexFitter{this, "TrkVertexFitterTool", "Trk::TrkVKalVrtFitter"};
96 PublicToolHandle < Trk::IVertexFitter > m_iV0VertexFitter{this, "V0VertexFitterTool", "Trk::V0VertexFitter"};
97 PublicToolHandle < Trk::ITrackSelectorTool > m_trkSelector{this, "TrackSelectorTool", "InDet::TrackSelectorTool"};
98 PublicToolHandle < InDet::VertexPointEstimator > m_vertexEstimator{this, "VertexPointEstimator", "InDet::VertexPointEstimator"};
99 ServiceHandle<IPartPropSvc> m_partPropSvc{this, "PartPropSvc", "PartPropSvc"};
103 };
104} // end of namespace
105#endif
106
Property holding a SG store/key/clid from which a ReadHandle is made.
xAOD::Vertex * fit(const std::vector< const xAOD::TrackParticle * > &, const xAOD::TrackParticleContainer *importedTrackCollection) const
SG::ReadHandleKeyArray< xAOD::TrackParticleContainer > m_MuonTrackKeys
Definition JpsiFinder.h:94
PublicToolHandle< InDet::VertexPointEstimator > m_vertexEstimator
Definition JpsiFinder.h:98
TVector3 trackMomentum(const xAOD::Vertex *vxCandidate, int trkIndex) const
std::vector< JpsiCandidate > getPairs(const std::vector< const xAOD::TrackParticle * > &) const
std::vector< JpsiCandidate > getPairs2Colls(const std::vector< const xAOD::TrackParticle * > &, const std::vector< const xAOD::Muon * > &, bool) const
PublicToolHandle< Trk::IVertexFitter > m_iV0VertexFitter
Definition JpsiFinder.h:96
PublicToolHandle< Trk::ITrackSelectorTool > m_trkSelector
Definition JpsiFinder.h:97
bool passesMCPCuts(const xAOD::Muon *) const
std::vector< JpsiCandidate > selectCharges(const std::vector< JpsiCandidate > &) const
JpsiFinder(const std::string &t, const std::string &n, const IInterface *p)
virtual StatusCode performSearch(const EventContext &ctx, xAOD::VertexContainer &vxContainer) const override
virtual StatusCode initialize() override
bool isContainedIn(const xAOD::TrackParticle *, const xAOD::TrackParticleContainer *) const
SG::ReadHandleKey< xAOD::MuonContainer > m_muonCollectionKey
Definition JpsiFinder.h:92
PublicToolHandle< Trk::IVertexFitter > m_iVertexFitter
Definition JpsiFinder.h:95
ServiceHandle< IPartPropSvc > m_partPropSvc
Definition JpsiFinder.h:99
double getInvariantMass(const JpsiCandidate &, std::span< const double >) const
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_TrkParticleCollection
Definition JpsiFinder.h:93
std::vector< JpsiCandidate > getPairs(const std::vector< const xAOD::Muon * > &) const
Property holding a SG store/key/clid from which a ReadHandle is made.
The namespace of all packages in PhysicsAnalysis/JetTagging.
HandleKeyArray< ReadHandle< T >, ReadHandleKey< T >, Gaudi::DataHandle::Reader > ReadHandleKeyArray
TrackParticle_v1 TrackParticle
Reference the current persistent version:
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
Vertex_v1 Vertex
Define the latest version of the vertex class.
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
Muon_v1 Muon
Reference the current persistent version:
const xAOD::TrackParticle * trackParticle1
Definition JpsiFinder.h:37
const xAOD::Muon * muon2
Definition JpsiFinder.h:40
const xAOD::TrackParticleContainer * collection2
Definition JpsiFinder.h:42
const xAOD::TrackParticleContainer * collection1
Definition JpsiFinder.h:41
const xAOD::TrackParticle * trackParticle2
Definition JpsiFinder.h:38
const xAOD::Muon * muon1
Definition JpsiFinder.h:39