Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
JpsiFinder.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 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"
18 #include "xAODMuon/MuonContainer.h"
19 #include "xAODMuon/Muon.h"
26 
28 
29 namespace Analysis {
30 
31  static const InterfaceID IID_JpsiFinder("JpsiFinder", 1, 0);
32 
33  // Struct and enum to associate muon pairs with track pairs
34  // and make the program flow more straightforward
35  enum PairType{ MUMU=0, MUTRK=1, TRKTRK=2};
36  enum MuonTypes{ CC=0, CT=1, TT=2};
38  {
41  const xAOD::Muon* muon1 = nullptr;
42  const xAOD::Muon* muon2 = nullptr;
47  };
48 
50  {
51  public:
52  JpsiFinder(const std::string& t, const std::string& n, const IInterface* p);
53  ~JpsiFinder();
54  virtual StatusCode initialize() override;
55 
56  static const InterfaceID& interfaceID() { return IID_JpsiFinder;}
57 
58  //-------------------------------------------------------------------------------------
59  //Doing Calculation and inline functions
60 
61  virtual StatusCode performSearch(const EventContext& ctx, xAOD::VertexContainer& vxContainer) const override;
62  std::vector<JpsiCandidate> getPairs(const std::vector<const xAOD::TrackParticle*>&) const;
63  std::vector<JpsiCandidate> getPairs(const std::vector<const xAOD::Muon*>&) const;
64  std::vector<JpsiCandidate> getPairs2Colls(const std::vector<const xAOD::TrackParticle*>&, const std::vector<const xAOD::Muon*>&, bool) const;
65  double getInvariantMass(const JpsiCandidate&, std::span<const double> ) const;
66  std::vector<JpsiCandidate> selectCharges(const std::vector<JpsiCandidate>&) const;
67  xAOD::Vertex* fit(const std::vector<const xAOD::TrackParticle*>&, const xAOD::TrackParticleContainer* importedTrackCollection) const;
68  bool passesMCPCuts(const xAOD::Muon*) const;
70  TVector3 trackMomentum(const xAOD::Vertex * vxCandidate, int trkIndex) const;
71  //-------------------------------------------------------------------------------------
72 
73  private:
74  bool m_mumu;
75  bool m_mutrk;
76  bool m_trktrk;
77  bool m_allMuons;
78  bool m_combOnly;
82  bool m_diMuons;
83  double m_trk1M;
84  double m_trk2M;
85  double m_thresholdPt;
86  double m_higherPt;
92  double m_Chi2Cut;
96  SG::ReadHandleKey<xAOD::MuonContainer> m_muonCollectionKey{this, "muonCollectionKey", "Muons"};
97  SG::ReadHandleKey<xAOD::TrackParticleContainer> m_TrkParticleCollection {this, "TrackParticleCollection", "InDetTrackParticles" };
99  PublicToolHandle < Trk::IVertexFitter > m_iVertexFitter{this, "TrkVertexFitterTool", "Trk::TrkVKalVrtFitter"};
100  PublicToolHandle < Trk::IVertexFitter > m_iV0VertexFitter{this, "V0VertexFitterTool", "Trk::V0VertexFitter"};
101  PublicToolHandle < Trk::ITrackSelectorTool > m_trkSelector{this, "TrackSelectorTool", "InDet::TrackSelectorTool"};
102  PublicToolHandle < InDet::VertexPointEstimator > m_vertexEstimator{this, "VertexPointEstimator", "InDet::VertexPointEstimator"};
103  ServiceHandle<IPartPropSvc> m_partPropSvc{this, "PartPropSvc", "PartPropSvc"};
104  bool m_mcpCuts;
107  };
108 } // end of namespace
109 #endif
110 
ReadHandleKeyArray.h
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
Analysis::JpsiFinder::m_invMassLower
double m_invMassLower
Definition: JpsiFinder.h:89
Analysis::JpsiCandidate::trackParticle1
const xAOD::TrackParticle * trackParticle1
Definition: JpsiFinder.h:39
Analysis::JpsiFinder::getPairs
std::vector< JpsiCandidate > getPairs(const std::vector< const xAOD::TrackParticle * > &) const
Definition: JpsiFinder.cxx:478
Analysis::JpsiFinder::performSearch
virtual StatusCode performSearch(const EventContext &ctx, xAOD::VertexContainer &vxContainer) const override
Definition: JpsiFinder.cxx:162
Analysis::JpsiFinder::m_Chi2Cut
double m_Chi2Cut
Definition: JpsiFinder.h:92
VertexPointEstimator.h
Analysis::JpsiFinder::m_collAngleTheta
double m_collAngleTheta
Definition: JpsiFinder.h:90
Analysis::JpsiFinder::m_trktrk
bool m_trktrk
Definition: JpsiFinder.h:76
Analysis::JpsiFinder::m_iVertexFitter
PublicToolHandle< Trk::IVertexFitter > m_iVertexFitter
Definition: JpsiFinder.h:99
Analysis::PairType
PairType
Definition: JpsiFinder.h:35
Muon.h
Analysis::JpsiFinder::m_allMuons
bool m_allMuons
Definition: JpsiFinder.h:77
Analysis::JpsiFinder::m_partPropSvc
ServiceHandle< IPartPropSvc > m_partPropSvc
Definition: JpsiFinder.h:103
ICandidateSearch.h
Analysis::JpsiFinder::m_collAnglePhi
double m_collAnglePhi
Definition: JpsiFinder.h:91
Analysis::JpsiFinder::passesMCPCuts
bool passesMCPCuts(const xAOD::Muon *) const
Definition: JpsiFinder.cxx:642
SG::HandleKeyArray
Definition: StoreGate/StoreGate/HandleKeyArray.h:38
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SG::ReadHandleKey< xAOD::MuonContainer >
Analysis::JpsiFinder::m_TrkParticleCollection
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_TrkParticleCollection
Definition: JpsiFinder.h:97
Analysis::CT
@ CT
Definition: JpsiFinder.h:36
Analysis::JpsiFinder::m_MuonTrackKeys
SG::ReadHandleKeyArray< xAOD::TrackParticleContainer > m_MuonTrackKeys
Definition: JpsiFinder.h:98
Analysis::TRKTRK
@ TRKTRK
Definition: JpsiFinder.h:35
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
Analysis::JpsiFinder::m_vertexEstimator
PublicToolHandle< InDet::VertexPointEstimator > m_vertexEstimator
Definition: JpsiFinder.h:102
Analysis::JpsiCandidate::muonTypes
MuonTypes muonTypes
Definition: JpsiFinder.h:46
Analysis::JpsiFinder::m_combOnly
bool m_combOnly
Definition: JpsiFinder.h:78
Analysis::JpsiFinder::isContainedIn
bool isContainedIn(const xAOD::TrackParticle *, const xAOD::TrackParticleContainer *) const
Definition: JpsiFinder.cxx:652
Analysis::JpsiFinder::selectCharges
std::vector< JpsiCandidate > selectCharges(const std::vector< JpsiCandidate > &) const
Definition: JpsiFinder.cxx:602
Analysis::JpsiFinder::trackMomentum
TVector3 trackMomentum(const xAOD::Vertex *vxCandidate, int trkIndex) const
Definition: JpsiFinder.cxx:660
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
Analysis::JpsiFinder::m_mumu
bool m_mumu
Definition: JpsiFinder.h:74
Analysis::JpsiCandidate::collection1
const xAOD::TrackParticleContainer * collection1
Definition: JpsiFinder.h:43
Analysis::JpsiFinder::m_sameChOnly
bool m_sameChOnly
Definition: JpsiFinder.h:94
Analysis::JpsiFinder::m_useCombMeasurement
bool m_useCombMeasurement
Definition: JpsiFinder.h:80
Analysis::MUTRK
@ MUTRK
Definition: JpsiFinder.h:35
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Analysis::JpsiFinder::m_allChCombs
bool m_allChCombs
Definition: JpsiFinder.h:95
Analysis::MuonTypes
MuonTypes
Definition: JpsiFinder.h:36
Analysis::JpsiFinder::getInvariantMass
double getInvariantMass(const JpsiCandidate &, std::span< const double >) const
Definition: JpsiFinder.cxx:582
AthAlgTool.h
Analysis::JpsiCandidate::collection2
const xAOD::TrackParticleContainer * collection2
Definition: JpsiFinder.h:44
Analysis::JpsiFinder::JpsiFinder
JpsiFinder(const std::string &t, const std::string &n, const IInterface *p)
Definition: JpsiFinder.cxx:101
Analysis::JpsiFinder::m_doTagAndProbe
bool m_doTagAndProbe
Definition: JpsiFinder.h:105
Analysis::JpsiFinder::m_useV0Fitter
bool m_useV0Fitter
Definition: JpsiFinder.h:81
Analysis::JpsiFinder::interfaceID
static const InterfaceID & interfaceID()
Definition: JpsiFinder.h:56
Analysis::JpsiCandidate::muon2
const xAOD::Muon * muon2
Definition: JpsiFinder.h:42
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
Analysis::JpsiFinder::m_muonCollectionKey
SG::ReadHandleKey< xAOD::MuonContainer > m_muonCollectionKey
Definition: JpsiFinder.h:96
Analysis::ICandidateSearch
Definition: ICandidateSearch.h:10
Analysis::JpsiFinder::m_trk1M
double m_trk1M
Definition: JpsiFinder.h:83
Analysis::JpsiFinder::m_mutrk
bool m_mutrk
Definition: JpsiFinder.h:75
Analysis::JpsiFinder::m_higherPt
double m_higherPt
Definition: JpsiFinder.h:86
Analysis
The namespace of all packages in PhysicsAnalysis/JetTagging.
Definition: BTaggingCnvAlg.h:20
Analysis::JpsiFinder::m_atLeastOneComb
bool m_atLeastOneComb
Definition: JpsiFinder.h:79
Analysis::JpsiFinder::m_oppChOnly
bool m_oppChOnly
Definition: JpsiFinder.h:93
Analysis::JpsiFinder::getPairs2Colls
std::vector< JpsiCandidate > getPairs2Colls(const std::vector< const xAOD::TrackParticle * > &, const std::vector< const xAOD::Muon * > &, bool) const
Definition: JpsiFinder.cxx:535
Analysis::JpsiFinder::m_trkSelector
PublicToolHandle< Trk::ITrackSelectorTool > m_trkSelector
Definition: JpsiFinder.h:101
Analysis::JpsiCandidate::trackParticle2
const xAOD::TrackParticle * trackParticle2
Definition: JpsiFinder.h:40
Analysis::JpsiFinder::~JpsiFinder
~JpsiFinder()
Definition: JpsiFinder.cxx:157
Analysis::JpsiCandidate::muon1
const xAOD::Muon * muon1
Definition: JpsiFinder.h:41
Analysis::JpsiFinder::m_iV0VertexFitter
PublicToolHandle< Trk::IVertexFitter > m_iV0VertexFitter
Definition: JpsiFinder.h:100
IVertexFitter.h
MuonContainer.h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
Analysis::JpsiFinder::initialize
virtual StatusCode initialize() override
Definition: JpsiFinder.cxx:28
Analysis::JpsiFinder::m_trkThresholdPt
double m_trkThresholdPt
Definition: JpsiFinder.h:87
Analysis::JpsiFinder::m_invMassUpper
double m_invMassUpper
Definition: JpsiFinder.h:88
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
Analysis::JpsiFinder::m_forceTagAndProbe
bool m_forceTagAndProbe
Definition: JpsiFinder.h:106
Analysis::JpsiCandidate::pairType
PairType pairType
Definition: JpsiFinder.h:45
Analysis::MUMU
@ MUMU
Definition: JpsiFinder.h:35
AthAlgTool
Definition: AthAlgTool.h:26
Analysis::TT
@ TT
Definition: JpsiFinder.h:36
ITrackSelectorTool.h
Analysis::JpsiCandidate
Definition: JpsiFinder.h:38
Analysis::JpsiFinder::m_thresholdPt
double m_thresholdPt
Definition: JpsiFinder.h:85
Analysis::JpsiFinder::m_trk2M
double m_trk2M
Definition: JpsiFinder.h:84
Analysis::JpsiFinder::m_diMuons
bool m_diMuons
Definition: JpsiFinder.h:82
Analysis::JpsiFinder::fit
xAOD::Vertex * fit(const std::vector< const xAOD::TrackParticle * > &, const xAOD::TrackParticleContainer *importedTrackCollection) const
Definition: JpsiFinder.cxx:410
Analysis::CC
@ CC
Definition: JpsiFinder.h:36
Analysis::JpsiFinder::m_mcpCuts
bool m_mcpCuts
Definition: JpsiFinder.h:104
Analysis::JpsiFinder
Definition: JpsiFinder.h:50
ServiceHandle< IPartPropSvc >