ATLAS Offline Software
JpsiXPlus2V0.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3  Contact: Xin Chen <xin.chen@cern.ch>
4 */
5 #ifndef JPSIXPLUS2V0_H
6 #define JPSIXPLUS2V0_H
7 
9 #include "GaudiKernel/ToolHandle.h"
10 #include "GaudiKernel/IPartPropSvc.h"
21 #include <vector>
22 
23 namespace Trk {
24  class IVertexFitter;
25  class TrkVKalVrtFitter;
26  class IVertexCascadeFitter;
27  class VxCascadeInfo;
28  class V0Tools;
29  class IExtrapolator;
30 }
31 namespace InDet { class VertexPointEstimator; }
32 namespace DerivationFramework {
33  class CascadeTools;
34 }
35 
36 namespace DerivationFramework {
37 
38  static const InterfaceID IID_JpsiXPlus2V0("JpsiXPlus2V0", 1, 0);
39 
40  class JpsiXPlus2V0 : virtual public AthAlgTool, public IAugmentationTool
41  {
42  enum V0Enum{ UNKNOWN=0, LAMBDA=1, LAMBDABAR=2, KS=3 };
43 
44  public:
45  static const InterfaceID& interfaceID() { return IID_JpsiXPlus2V0; }
46  JpsiXPlus2V0(const std::string& type, const std::string& name, const IInterface* parent);
47  virtual ~JpsiXPlus2V0() = default;
48  virtual StatusCode initialize() override;
49  StatusCode performSearch(std::vector<Trk::VxCascadeInfo*>& cascadeinfoContainer, const std::vector<std::pair<const xAOD::Vertex*,V0Enum> >& selectedV0Candidates) const;
50  virtual StatusCode addBranches() const override;
51 
52  private:
55  std::vector<std::string> m_vertexJXHypoNames;
63  std::string m_hypoName;
64 
65  double m_jxMassLower;
66  double m_jxMassUpper;
71  std::string m_V01Hypothesis;
74  double m_lxyV01_cut;
75  std::string m_V02Hypothesis;
78  double m_lxyV02_cut;
83  double m_MassLower;
84  double m_MassUpper;
86  double m_jxDaug1MassHypo; // mass hypothesis of 1st daughter from vertex JX
87  double m_jxDaug2MassHypo; // mass hypothesis of 2nd daughter from vertex JX
88  double m_jxDaug3MassHypo; // mass hypothesis of 3rd daughter from vertex JX
89  double m_jxDaug4MassHypo; // mass hypothesis of 4th daughter from vertex JX
90  double m_massJX;
91  double m_massJpsi;
92  double m_massX;
93  double m_massV01;
94  double m_massV02;
95  double m_massJXV02;
96  double m_massMainV;
97  bool m_constrJX;
99  bool m_constrX;
106  double m_chi2cut_JX;
107  double m_chi2cut_V0;
108  double m_chi2cut;
109  bool m_useTRT;
110  double m_ptTRT;
111  double m_d0_cut;
112  unsigned int m_maxJXCandidates;
113  unsigned int m_maxV0Candidates;
114  unsigned int m_maxMainVCandidates;
115 
116  ToolHandle < Trk::TrkVKalVrtFitter > m_iVertexFitter;
117  ToolHandle < Trk::TrkV0VertexFitter > m_iV0Fitter;
118  ToolHandle < Trk::IVertexFitter > m_iGammaFitter;
119  ToolHandle < Analysis::PrimaryVertexRefitter > m_pvRefitter;
120  ToolHandle < Trk::V0Tools > m_V0Tools;
121  ToolHandle < Reco::ITrackToVertex > m_trackToVertexTool;
122  ToolHandle < Trk::ITrackSelectorTool > m_v0TrkSelector;
123  ToolHandle < DerivationFramework::CascadeTools > m_CascadeTools;
124  ToolHandle < InDet::VertexPointEstimator > m_vertexEstimator;
125  ToolHandle < Trk::IExtrapolator > m_extrapolator;
126  ServiceHandle<IPartPropSvc> m_partPropSvc{this, "PartPropSvc", "PartPropSvc"};
127 
128  bool m_refitPV;
129  int m_PV_max;
132 
133  double m_mass_e;
134  double m_mass_mu;
135  double m_mass_pion;
139  double m_mass_Ks;
140  double m_mass_Bpm;
141 
142  std::vector<double> m_massesV0_ppi;
143  std::vector<double> m_massesV0_pip;
144  std::vector<double> m_massesV0_pipi;
145 
146  bool d0Pass(const xAOD::TrackParticle* track, const xAOD::Vertex* PV) const;
147  Trk::VxCascadeInfo* fitMainVtx(const xAOD::Vertex* JXvtx, std::vector<double>& massesJX, const xAOD::Vertex* V01vtx, const V0Enum V01, const xAOD::Vertex* V02vtx, const V0Enum V02, const std::vector<const xAOD::TrackParticleContainer*>& trackCols) const;
148  void fitV0Container(xAOD::VertexContainer* V0ContainerNew, const std::vector<const xAOD::TrackParticle*>& selectedTracks, const std::vector<const xAOD::TrackParticleContainer*>& trackCols) const;
149  template<size_t NTracks> const xAOD::Vertex* FindVertex(const xAOD::VertexContainer* cont, const xAOD::Vertex* v) const;
150  };
151 }
152 
153 #endif
ReadHandleKeyArray.h
DerivationFramework::JpsiXPlus2V0::V0Enum
V0Enum
Definition: JpsiXPlus2V0.h:42
DerivationFramework::JpsiXPlus2V0::UNKNOWN
@ UNKNOWN
Definition: JpsiXPlus2V0.h:42
DerivationFramework::JpsiXPlus2V0::m_constrMainV
bool m_constrMainV
Definition: JpsiXPlus2V0.h:103
DerivationFramework::JpsiXPlus2V0::m_jpsiMassLower
double m_jpsiMassLower
Definition: JpsiXPlus2V0.h:67
DerivationFramework::JpsiXPlus2V0::m_diTrackMassLower
double m_diTrackMassLower
Definition: JpsiXPlus2V0.h:69
DerivationFramework::JpsiXPlus2V0::m_VxPrimaryCandidateName
SG::ReadHandleKey< xAOD::VertexContainer > m_VxPrimaryCandidateName
Definition: JpsiXPlus2V0.h:59
DerivationFramework::JpsiXPlus2V0::m_V02MassUpper
double m_V02MassUpper
Definition: JpsiXPlus2V0.h:77
DerivationFramework::JpsiXPlus2V0::m_constrJX
bool m_constrJX
Definition: JpsiXPlus2V0.h:97
DerivationFramework::JpsiXPlus2V0::m_massV02
double m_massV02
Definition: JpsiXPlus2V0.h:94
Trk::VxCascadeInfo
Definition: VxCascadeInfo.h:75
DerivationFramework::JpsiXPlus2V0::m_cascadeOutputKeys
SG::WriteHandleKeyArray< xAOD::VertexContainer > m_cascadeOutputKeys
Definition: JpsiXPlus2V0.h:56
DerivationFramework::JpsiXPlus2V0::LAMBDA
@ LAMBDA
Definition: JpsiXPlus2V0.h:42
DerivationFramework::JpsiXPlus2V0::m_chi2cut_gamma
double m_chi2cut_gamma
Definition: JpsiXPlus2V0.h:80
DerivationFramework::JpsiXPlus2V0::m_refitPV
bool m_refitPV
Definition: JpsiXPlus2V0.h:128
DerivationFramework::JpsiXPlus2V0::m_constrV01
bool m_constrV01
Definition: JpsiXPlus2V0.h:100
VertexPointEstimator.h
DerivationFramework::JpsiXPlus2V0::m_iV0Fitter
ToolHandle< Trk::TrkV0VertexFitter > m_iV0Fitter
Definition: JpsiXPlus2V0.h:117
DerivationFramework::JpsiXPlus2V0::fitMainVtx
Trk::VxCascadeInfo * fitMainVtx(const xAOD::Vertex *JXvtx, std::vector< double > &massesJX, const xAOD::Vertex *V01vtx, const V0Enum V01, const xAOD::Vertex *V02vtx, const V0Enum V02, const std::vector< const xAOD::TrackParticleContainer * > &trackCols) const
Definition: JpsiXPlus2V0.cxx:698
DerivationFramework::JpsiXPlus2V0::m_mass_Bpm
double m_mass_Bpm
Definition: JpsiXPlus2V0.h:140
DerivationFramework::JpsiXPlus2V0::m_pvRefitter
ToolHandle< Analysis::PrimaryVertexRefitter > m_pvRefitter
Definition: JpsiXPlus2V0.h:119
IAugmentationTool.h
DerivationFramework::JpsiXPlus2V0::m_MassUpper
double m_MassUpper
Definition: JpsiXPlus2V0.h:84
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
DerivationFramework::JpsiXPlus2V0::m_massV01
double m_massV01
Definition: JpsiXPlus2V0.h:93
DerivationFramework::JpsiXPlus2V0::m_V01Hypothesis
std::string m_V01Hypothesis
Definition: JpsiXPlus2V0.h:71
DerivationFramework::JpsiXPlus2V0::m_massesV0_pip
std::vector< double > m_massesV0_pip
Definition: JpsiXPlus2V0.h:143
DerivationFramework::JpsiXPlus2V0::m_TrkParticleCollection
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_TrkParticleCollection
Definition: JpsiXPlus2V0.h:58
DerivationFramework::JpsiXPlus2V0::m_chi2cut_V0
double m_chi2cut_V0
Definition: JpsiXPlus2V0.h:107
DerivationFramework::JpsiXPlus2V0::interfaceID
static const InterfaceID & interfaceID()
Definition: JpsiXPlus2V0.h:45
DerivationFramework::JpsiXPlus2V0::m_jpsiMassUpper
double m_jpsiMassUpper
Definition: JpsiXPlus2V0.h:68
DerivationFramework::JpsiXPlus2V0::m_PV_minNTracks
size_t m_PV_minNTracks
Definition: JpsiXPlus2V0.h:130
DerivationFramework::JpsiXPlus2V0::KS
@ KS
Definition: JpsiXPlus2V0.h:42
SG::HandleKeyArray
Definition: StoreGate/StoreGate/HandleKeyArray.h:38
DerivationFramework::JpsiXPlus2V0::m_iVertexFitter
ToolHandle< Trk::TrkVKalVrtFitter > m_iVertexFitter
Definition: JpsiXPlus2V0.h:116
DerivationFramework::JpsiXPlus2V0
Definition: JpsiXPlus2V0.h:41
DerivationFramework::JpsiXPlus2V0::m_V02Hypothesis
std::string m_V02Hypothesis
Definition: JpsiXPlus2V0.h:75
DerivationFramework::JpsiXPlus2V0::m_PV_max
int m_PV_max
Definition: JpsiXPlus2V0.h:129
PrimaryVertexRefitter.h
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
DerivationFramework::JpsiXPlus2V0::m_chi2cut
double m_chi2cut
Definition: JpsiXPlus2V0.h:108
DerivationFramework::JpsiXPlus2V0::m_jxDaug2MassHypo
double m_jxDaug2MassHypo
Definition: JpsiXPlus2V0.h:87
DerivationFramework::JpsiXPlus2V0::m_jxDaug_num
int m_jxDaug_num
Definition: JpsiXPlus2V0.h:85
DerivationFramework::JpsiXPlus2V0::m_jxDaug3MassHypo
double m_jxDaug3MassHypo
Definition: JpsiXPlus2V0.h:88
DerivationFramework::JpsiXPlus2V0::m_mass_e
double m_mass_e
Definition: JpsiXPlus2V0.h:133
DerivationFramework::IAugmentationTool
Definition: IAugmentationTool.h:24
DerivationFramework::JpsiXPlus2V0::m_v0TrkSelector
ToolHandle< Trk::ITrackSelectorTool > m_v0TrkSelector
Definition: JpsiXPlus2V0.h:122
DerivationFramework::JpsiXPlus2V0::m_trackToVertexTool
ToolHandle< Reco::ITrackToVertex > m_trackToVertexTool
Definition: JpsiXPlus2V0.h:121
DerivationFramework::JpsiXPlus2V0::m_lxyV02_cut
double m_lxyV02_cut
Definition: JpsiXPlus2V0.h:78
DerivationFramework::JpsiXPlus2V0::m_d0_cut
double m_d0_cut
Definition: JpsiXPlus2V0.h:111
DerivationFramework::JpsiXPlus2V0::m_massX
double m_massX
Definition: JpsiXPlus2V0.h:92
DerivationFramework::JpsiXPlus2V0::m_iGammaFitter
ToolHandle< Trk::IVertexFitter > m_iGammaFitter
Definition: JpsiXPlus2V0.h:118
DerivationFramework::JpsiXPlus2V0::m_useTRT
bool m_useTRT
Definition: JpsiXPlus2V0.h:109
DerivationFramework::JpsiXPlus2V0::m_V01MassLower
double m_V01MassLower
Definition: JpsiXPlus2V0.h:72
DerivationFramework::JpsiXPlus2V0::m_constrV02
bool m_constrV02
Definition: JpsiXPlus2V0.h:101
DerivationFramework::JpsiXPlus2V0::m_refPVContainerName
SG::WriteHandleKey< xAOD::VertexContainer > m_refPVContainerName
Definition: JpsiXPlus2V0.h:60
DerivationFramework::JpsiXPlus2V0::m_mass_mu
double m_mass_mu
Definition: JpsiXPlus2V0.h:134
DerivationFramework::JpsiXPlus2V0::d0Pass
bool d0Pass(const xAOD::TrackParticle *track, const xAOD::Vertex *PV) const
Definition: JpsiXPlus2V0.cxx:687
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
DerivationFramework::JpsiXPlus2V0::m_mass_Ks
double m_mass_Ks
Definition: JpsiXPlus2V0.h:139
DerivationFramework::JpsiXPlus2V0::fitV0Container
void fitV0Container(xAOD::VertexContainer *V0ContainerNew, const std::vector< const xAOD::TrackParticle * > &selectedTracks, const std::vector< const xAOD::TrackParticleContainer * > &trackCols) const
Definition: JpsiXPlus2V0.cxx:963
DerivationFramework::JpsiXPlus2V0::m_CascadeTools
ToolHandle< DerivationFramework::CascadeTools > m_CascadeTools
Definition: JpsiXPlus2V0.h:123
DerivationFramework::JpsiXPlus2V0::m_minMass_gamma
double m_minMass_gamma
Definition: JpsiXPlus2V0.h:79
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
DerivationFramework::JpsiXPlus2V0::~JpsiXPlus2V0
virtual ~JpsiXPlus2V0()=default
DerivationFramework::JpsiXPlus2V0::m_massesV0_ppi
std::vector< double > m_massesV0_ppi
Definition: JpsiXPlus2V0.h:142
AthAlgTool.h
DerivationFramework::JpsiXPlus2V0::m_JXSubVtx
bool m_JXSubVtx
Definition: JpsiXPlus2V0.h:104
DerivationFramework::JpsiXPlus2V0::m_massMainV
double m_massMainV
Definition: JpsiXPlus2V0.h:96
DerivationFramework::JpsiXPlus2V0::m_vertexV0ContainerKey
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexV0ContainerKey
Definition: JpsiXPlus2V0.h:54
test_pyathena.parent
parent
Definition: test_pyathena.py:15
DerivationFramework::JpsiXPlus2V0::m_constrX
bool m_constrX
Definition: JpsiXPlus2V0.h:99
DerivationFramework::JpsiXPlus2V0::m_ptTRT
double m_ptTRT
Definition: JpsiXPlus2V0.h:110
DerivationFramework::JpsiXPlus2V0::m_constrJXV02
bool m_constrJXV02
Definition: JpsiXPlus2V0.h:102
DerivationFramework::JpsiXPlus2V0::m_lxyV01_cut
double m_lxyV01_cut
Definition: JpsiXPlus2V0.h:74
DerivationFramework::JpsiXPlus2V0::m_V01MassUpper
double m_V01MassUpper
Definition: JpsiXPlus2V0.h:73
DerivationFramework::JpsiXPlus2V0::m_hypoName
std::string m_hypoName
Definition: JpsiXPlus2V0.h:63
DerivationFramework::JpsiXPlus2V0::JpsiXPlus2V0
JpsiXPlus2V0(const std::string &type, const std::string &name, const IInterface *parent)
Definition: JpsiXPlus2V0.cxx:29
DerivationFramework::JpsiXPlus2V0::LAMBDABAR
@ LAMBDABAR
Definition: JpsiXPlus2V0.h:42
DerivationFramework
THE reconstruction tool.
Definition: ParticleSortingAlg.h:24
DerivationFramework::JpsiXPlus2V0::m_massJXV02
double m_massJXV02
Definition: JpsiXPlus2V0.h:95
DerivationFramework::JpsiXPlus2V0::m_JXV02MassUpper
double m_JXV02MassUpper
Definition: JpsiXPlus2V0.h:82
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
DerivationFramework::JpsiXPlus2V0::m_jxMassLower
double m_jxMassLower
Definition: JpsiXPlus2V0.h:65
DerivationFramework::JpsiXPlus2V0::m_V02MassLower
double m_V02MassLower
Definition: JpsiXPlus2V0.h:76
ITrackToVertex.h
DerivationFramework::JpsiXPlus2V0::m_massJpsi
double m_massJpsi
Definition: JpsiXPlus2V0.h:91
DerivationFramework::JpsiXPlus2V0::m_diTrackMassUpper
double m_diTrackMassUpper
Definition: JpsiXPlus2V0.h:70
DerivationFramework::JpsiXPlus2V0::m_vertexJXHypoNames
std::vector< std::string > m_vertexJXHypoNames
Definition: JpsiXPlus2V0.h:55
DerivationFramework::JpsiXPlus2V0::m_maxV0Candidates
unsigned int m_maxV0Candidates
Definition: JpsiXPlus2V0.h:113
DerivationFramework::JpsiXPlus2V0::m_RelinkContainers
SG::ReadHandleKeyArray< xAOD::TrackParticleContainer > m_RelinkContainers
Definition: JpsiXPlus2V0.h:62
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
DerivationFramework::JpsiXPlus2V0::m_vertexJXContainerKey
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexJXContainerKey
Definition: JpsiXPlus2V0.h:53
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
DerivationFramework::JpsiXPlus2V0::initialize
virtual StatusCode initialize() override
Definition: JpsiXPlus2V0.cxx:177
DerivationFramework::JpsiXPlus2V0::m_vertexEstimator
ToolHandle< InDet::VertexPointEstimator > m_vertexEstimator
Definition: JpsiXPlus2V0.h:124
DerivationFramework::JpsiXPlus2V0::m_DoVertexType
int m_DoVertexType
Definition: JpsiXPlus2V0.h:131
V0Tools
DerivationFramework::JpsiXPlus2V0::m_partPropSvc
ServiceHandle< IPartPropSvc > m_partPropSvc
Definition: JpsiXPlus2V0.h:126
EventInfo.h
DerivationFramework::JpsiXPlus2V0::m_JXV02SubVtx
bool m_JXV02SubVtx
Definition: JpsiXPlus2V0.h:105
TrkV0VertexFitter.h
DerivationFramework::JpsiXPlus2V0::m_jxMassUpper
double m_jxMassUpper
Definition: JpsiXPlus2V0.h:66
python.PyAthena.v
v
Definition: PyAthena.py:154
DerivationFramework::JpsiXPlus2V0::m_extrapolator
ToolHandle< Trk::IExtrapolator > m_extrapolator
Definition: JpsiXPlus2V0.h:125
DerivationFramework::JpsiXPlus2V0::FindVertex
const xAOD::Vertex * FindVertex(const xAOD::VertexContainer *cont, const xAOD::Vertex *v) const
Definition: JpsiXPlus2V0.cxx:1080
VertexContainer.h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
DerivationFramework::JpsiXPlus2V0::m_maxJXCandidates
unsigned int m_maxJXCandidates
Definition: JpsiXPlus2V0.h:112
DerivationFramework::JpsiXPlus2V0::performSearch
StatusCode performSearch(std::vector< Trk::VxCascadeInfo * > &cascadeinfoContainer, const std::vector< std::pair< const xAOD::Vertex *, V0Enum > > &selectedV0Candidates) const
Definition: JpsiXPlus2V0.cxx:269
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
DerivationFramework::JpsiXPlus2V0::m_mass_proton
double m_mass_proton
Definition: JpsiXPlus2V0.h:136
DerivationFramework::JpsiXPlus2V0::m_massJX
double m_massJX
Definition: JpsiXPlus2V0.h:90
DerivationFramework::JpsiXPlus2V0::m_v0VtxOutputKey
SG::WriteHandleKey< xAOD::VertexContainer > m_v0VtxOutputKey
Definition: JpsiXPlus2V0.h:57
DerivationFramework::JpsiXPlus2V0::m_JXV02MassLower
double m_JXV02MassLower
Definition: JpsiXPlus2V0.h:81
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
AthAlgTool
Definition: AthAlgTool.h:26
DerivationFramework::JpsiXPlus2V0::m_jxDaug1MassHypo
double m_jxDaug1MassHypo
Definition: JpsiXPlus2V0.h:86
DerivationFramework::JpsiXPlus2V0::m_MassLower
double m_MassLower
Definition: JpsiXPlus2V0.h:83
ITrackSelectorTool.h
DerivationFramework::JpsiXPlus2V0::m_massesV0_pipi
std::vector< double > m_massesV0_pipi
Definition: JpsiXPlus2V0.h:144
DerivationFramework::JpsiXPlus2V0::addBranches
virtual StatusCode addBranches() const override
Pass the thinning service
Definition: JpsiXPlus2V0.cxx:353
ReadDecorHandleKeyArray.h
DerivationFramework::JpsiXPlus2V0::m_mass_Lambda_b
double m_mass_Lambda_b
Definition: JpsiXPlus2V0.h:138
DerivationFramework::JpsiXPlus2V0::m_eventInfo_key
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfo_key
Definition: JpsiXPlus2V0.h:61
DerivationFramework::JpsiXPlus2V0::m_V0Tools
ToolHandle< Trk::V0Tools > m_V0Tools
Definition: JpsiXPlus2V0.h:120
DerivationFramework::JpsiXPlus2V0::m_constrJpsi
bool m_constrJpsi
Definition: JpsiXPlus2V0.h:98
DerivationFramework::JpsiXPlus2V0::m_maxMainVCandidates
unsigned int m_maxMainVCandidates
Definition: JpsiXPlus2V0.h:114
DerivationFramework::JpsiXPlus2V0::m_mass_Lambda
double m_mass_Lambda
Definition: JpsiXPlus2V0.h:137
DerivationFramework::JpsiXPlus2V0::m_mass_pion
double m_mass_pion
Definition: JpsiXPlus2V0.h:135
DerivationFramework::JpsiXPlus2V0::m_chi2cut_JX
double m_chi2cut_JX
Definition: JpsiXPlus2V0.h:106
DerivationFramework::JpsiXPlus2V0::m_jxDaug4MassHypo
double m_jxDaug4MassHypo
Definition: JpsiXPlus2V0.h:89
ServiceHandle< IPartPropSvc >