ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
DerivationFramework::JpsiPlusDsCascade Class Reference

#include <JpsiPlusDsCascade.h>

Inheritance diagram for DerivationFramework::JpsiPlusDsCascade:
Collaboration diagram for DerivationFramework::JpsiPlusDsCascade:

Public Member Functions

 JpsiPlusDsCascade (const std::string &t, const std::string &n, const IInterface *p)
 
 ~JpsiPlusDsCascade ()
 
virtual StatusCode initialize () override
 
StatusCode performSearch (std::vector< Trk::VxCascadeInfo * > *cascadeinfoContainer) const
 
virtual StatusCode addBranches () const override
 Pass the thinning service
More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

std::string m_vertexContainerKey
 
std::string m_vertexDxContainerKey
 
std::vector< std::string > m_cascadeOutputsKeys
 
std::string m_VxPrimaryCandidateName
 Name of primary vertex container. More...
 
double m_jpsiMassLower
 
double m_jpsiMassUpper
 
double m_DxMassLower
 
double m_DxMassUpper
 
double m_MassLower
 
double m_MassUpper
 
double m_vtx0MassHypo
 
double m_vtx1MassHypo
 
double m_vtx0Daug1MassHypo
 
double m_vtx0Daug2MassHypo
 
double m_vtx1Daug1MassHypo
 
double m_vtx1Daug2MassHypo
 
double m_vtx1Daug3MassHypo
 
double m_mass_jpsi
 
int m_Dx_pid
 
bool m_constrDx
 
bool m_constrJpsi
 
double m_chi2cut
 
SG::ReadHandleKey< xAOD::EventInfom_eventInfo_key {this, "EventInfo", "EventInfo", "Input event information"}
 
ToolHandle< Trk::TrkVKalVrtFitterm_iVertexFitter
 
ToolHandle< Analysis::PrimaryVertexRefitterm_pvRefitter
 
ToolHandle< Trk::V0Toolsm_V0Tools
 
ToolHandle< DerivationFramework::CascadeToolsm_CascadeTools
 
ServiceHandle< IPartPropSvc > m_partPropSvc {this, "PartPropSvc", "PartPropSvc"}
 
bool m_refitPV
 
std::string m_refPVContainerName
 
std::string m_hypoName
 name of the mass hypothesis. More...
 
int m_PV_max
 
int m_DoVertexType
 
size_t m_PV_minNTracks
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 36 of file JpsiPlusDsCascade.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ JpsiPlusDsCascade()

DerivationFramework::JpsiPlusDsCascade::JpsiPlusDsCascade ( const std::string &  t,
const std::string &  n,
const IInterface *  p 
)

Definition at line 405 of file JpsiPlusDsCascade.cxx.

405  : AthAlgTool(t,n,p),
408  m_cascadeOutputsKeys{ "JpsiPlusDsCascadeVtx1", "JpsiPlusDsCascadeVtx2" },
409  m_VxPrimaryCandidateName("PrimaryVertices"),
410  m_jpsiMassLower(0.0),
411  m_jpsiMassUpper(10000.0),
412  m_DxMassLower(0.0),
413  m_DxMassUpper(10000.0),
414  m_MassLower(0.0),
415  m_MassUpper(20000.0),
416  m_vtx0MassHypo(-1),
417  m_vtx1MassHypo(-1),
423  m_mass_jpsi(-1),
424  m_Dx_pid(431),
425  m_constrDx(true),
426  m_constrJpsi(true),
427  m_chi2cut(-1.0),
428  m_iVertexFitter("Trk::TrkVKalVrtFitter"),
429  m_pvRefitter("Analysis::PrimaryVertexRefitter"),
430  m_V0Tools("Trk::V0Tools"),
431  m_CascadeTools("DerivationFramework::CascadeTools")
432  {
433  declareProperty("JpsiVertices", m_vertexContainerKey);
435  declareProperty("VxPrimaryCandidateName", m_VxPrimaryCandidateName);
436  declareProperty("RefPVContainerName", m_refPVContainerName = "RefittedPrimaryVertices");
437  declareProperty("JpsiMassLowerCut", m_jpsiMassLower);
438  declareProperty("JpsiMassUpperCut", m_jpsiMassUpper);
439  declareProperty("DxMassLowerCut", m_DxMassLower);
440  declareProperty("DxMassUpperCut", m_DxMassUpper);
441  declareProperty("MassLowerCut", m_MassLower);
442  declareProperty("MassUpperCut", m_MassUpper);
443  declareProperty("HypothesisName", m_hypoName = "Bc");
444  declareProperty("Vtx0MassHypo", m_vtx0MassHypo);
445  declareProperty("Vtx1MassHypo", m_vtx1MassHypo);
446  declareProperty("Vtx0Daug1MassHypo", m_vtx0Daug1MassHypo);
447  declareProperty("Vtx0Daug2MassHypo", m_vtx0Daug2MassHypo);
448  declareProperty("Vtx1Daug1MassHypo", m_vtx1Daug1MassHypo);
449  declareProperty("Vtx1Daug2MassHypo", m_vtx1Daug2MassHypo);
450  declareProperty("Vtx1Daug3MassHypo", m_vtx1Daug3MassHypo);
451  declareProperty("JpsiMass", m_mass_jpsi);
452  declareProperty("DxHypothesis", m_Dx_pid);
453  declareProperty("ApplyDxMassConstraint", m_constrDx);
454  declareProperty("ApplyJpsiMassConstraint", m_constrJpsi);
455  declareProperty("Chi2Cut", m_chi2cut);
456  declareProperty("RefitPV", m_refitPV = true);
457  declareProperty("MaxnPV", m_PV_max = 999);
458  declareProperty("MinNTracksInPV", m_PV_minNTracks = 0);
459  declareProperty("DoVertexType", m_DoVertexType = 7);
460  declareProperty("TrkVertexFitterTool", m_iVertexFitter);
461  declareProperty("PVRefitter", m_pvRefitter);
462  declareProperty("V0Tools", m_V0Tools);
463  declareProperty("CascadeTools", m_CascadeTools);
464  declareProperty("CascadeVertexCollections", m_cascadeOutputsKeys);
465  }

◆ ~JpsiPlusDsCascade()

DerivationFramework::JpsiPlusDsCascade::~JpsiPlusDsCascade ( )

Definition at line 467 of file JpsiPlusDsCascade.cxx.

467 { }

Member Function Documentation

◆ addBranches()

StatusCode DerivationFramework::JpsiPlusDsCascade::addBranches ( ) const
overridevirtual

Pass the thinning service

Implements DerivationFramework::IAugmentationTool.

Definition at line 66 of file JpsiPlusDsCascade.cxx.

67  {
68  std::vector<Trk::VxCascadeInfo*> cascadeinfoContainer;
69  constexpr int topoN = 2;
70  std::array<xAOD::VertexContainer*, topoN> Vtxwritehandles;
71  std::array<xAOD::VertexAuxContainer*, topoN> Vtxwritehandlesaux;
72  if(m_cascadeOutputsKeys.size() !=topoN) { ATH_MSG_FATAL("Incorrect number of VtxContainers"); return StatusCode::FAILURE; }
73 
74  for(int i =0; i<topoN;i++){
75  Vtxwritehandles[i] = new xAOD::VertexContainer();
76  Vtxwritehandlesaux[i] = new xAOD::VertexAuxContainer();
77  Vtxwritehandles[i]->setStore(Vtxwritehandlesaux[i]);
78  ATH_CHECK(evtStore()->record(Vtxwritehandles[i] , m_cascadeOutputsKeys[i] ));
79  ATH_CHECK(evtStore()->record(Vtxwritehandlesaux[i], m_cascadeOutputsKeys[i] + "Aux."));
80  }
81 
82  //----------------------------------------------------
83  // retrieve primary vertices
84  //----------------------------------------------------
85  const xAOD::Vertex * primaryVertex(nullptr);
86  const xAOD::VertexContainer *pvContainer(nullptr);
88  ATH_MSG_DEBUG("Found " << m_VxPrimaryCandidateName << " in StoreGate!");
89 
90  if (pvContainer->size()==0){
91  ATH_MSG_WARNING("You have no primary vertices: " << pvContainer->size());
92  return StatusCode::RECOVERABLE;
93  } else {
94  primaryVertex = (*pvContainer)[0];
95  }
96 
97  //----------------------------------------------------
98  // Try to retrieve refitted primary vertices
99  //----------------------------------------------------
100  xAOD::VertexContainer* refPvContainer = nullptr;
101  xAOD::VertexAuxContainer* refPvAuxContainer = nullptr;
102  if (m_refitPV) {
103  if (evtStore()->contains<xAOD::VertexContainer>(m_refPVContainerName)) {
104  // refitted PV container exists. Get it from the store gate
105  ATH_CHECK(evtStore()->retrieve(refPvContainer , m_refPVContainerName ));
106  ATH_CHECK(evtStore()->retrieve(refPvAuxContainer, m_refPVContainerName + "Aux."));
107  } else {
108  // refitted PV container does not exist. Create a new one.
109  refPvContainer = new xAOD::VertexContainer;
110  refPvAuxContainer = new xAOD::VertexAuxContainer;
111  refPvContainer->setStore(refPvAuxContainer);
112  ATH_CHECK(evtStore()->record(refPvContainer , m_refPVContainerName));
113  ATH_CHECK(evtStore()->record(refPvAuxContainer, m_refPVContainerName+"Aux."));
114  }
115  }
116 
117  ATH_CHECK(performSearch(&cascadeinfoContainer));
118 
120  if(not evt.isValid()) ATH_MSG_ERROR("Cannot Retrieve " << m_eventInfo_key.key() );
121  BPhysPVCascadeTools helper(&(*m_CascadeTools), evt.cptr());
122  helper.SetMinNTracksInPV(m_PV_minNTracks);
123 
124  // Decorators for the main vertex: chi2, ndf, pt and pt error, plus the V0 vertex variables
125  SG::AuxElement::Decorator<VertexLinkVector> CascadeLinksDecor("CascadeVertexLinks");
126  SG::AuxElement::Decorator<VertexLinkVector> JpsiLinksDecor("JpsiVertexLinks");
127  SG::AuxElement::Decorator<VertexLinkVector> DxLinksDecor("DxVertexLinks");
128  SG::AuxElement::Decorator<float> chi2_decor("ChiSquared");
129  SG::AuxElement::Decorator<float> ndof_decor("NumberDoF");
130  SG::AuxElement::Decorator<float> Pt_decor("Pt");
131  SG::AuxElement::Decorator<float> PtErr_decor("PtErr");
132  SG::AuxElement::Decorator<float> Mass_svdecor("Dx_mass");
133  SG::AuxElement::Decorator<float> MassErr_svdecor("Dx_massErr");
134  SG::AuxElement::Decorator<float> Pt_svdecor("Dx_Pt");
135  SG::AuxElement::Decorator<float> PtErr_svdecor("Dx_PtErr");
136  SG::AuxElement::Decorator<float> Lxy_svdecor("Dx_Lxy");
137  SG::AuxElement::Decorator<float> LxyErr_svdecor("Dx_LxyErr");
138  SG::AuxElement::Decorator<float> Tau_svdecor("Dx_Tau");
139  SG::AuxElement::Decorator<float> TauErr_svdecor("Dx_TauErr");
140 
141  SG::AuxElement::Decorator<float> MassMumu_decor("Mumu_mass");
142  SG::AuxElement::Decorator<float> MassKX_svdecor("KX_mass");
143  SG::AuxElement::Decorator<float> MassKXpi_svdecor("KXpi_mass");
144 
145  ATH_MSG_DEBUG("cascadeinfoContainer size " << cascadeinfoContainer.size());
146 
147  // Get Jpsi container and identify the input Jpsi
148  const xAOD::VertexContainer *jpsiContainer(nullptr);
149  ATH_CHECK(evtStore()->retrieve(jpsiContainer , m_vertexContainerKey ));
150  const xAOD::VertexContainer *dxContainer(nullptr);
152 
153  for (Trk::VxCascadeInfo* x : cascadeinfoContainer) {
154  if(x==nullptr) {
155  ATH_MSG_ERROR("cascadeinfoContainer is null");
156  //x is dereferenced if we pass this
157  return StatusCode::FAILURE;
158  }
159 
160  // the cascade fitter returns:
161  // std::vector<xAOD::Vertex*>, each xAOD::Vertex contains the refitted track parameters (perigee at the vertex position)
162  // vertices[iv] the links to the original TPs and a covariance of size 3+5*NTRK; the chi2 of the total fit
163  // is split between the cascade vertices as per track contribution
164  // std::vector< std::vector<TLorentzVector> >, each std::vector<TLorentzVector> contains the refitted momenta (TLorentzVector)
165  // momenta[iv][...] of all tracks in the corresponding vertex, including any pseudotracks (from cascade vertices)
166  // originating in this vertex; the masses are as assigned in the cascade fit
167  // std::vector<Amg::MatrixX>, the corresponding covariance matrices in momentum space
168  // covariance[iv]
169  // int nDoF, double Chi2
170  //
171  // the invariant mass, pt, lifetime etc. errors should be calculated using the covariance matrices in momentum space as these
172  // take into account the full track-track and track-vertex correlations
173  //
174  // in the case of Jpsi+V0: vertices[0] is the V0 vertex, vertices[1] is the B/Lambda_b(bar) vertex, containing the 2 Jpsi tracks.
175  // The covariance terms between the two vertices are not stored. In momentum space momenta[0] contains the 2 V0 tracks,
176  // their momenta add up to the momentum of the 3rd track in momenta[1], the first two being the Jpsi tracks
177 
178  const std::vector<xAOD::Vertex*> &cascadeVertices = x->vertices();
179  if(cascadeVertices.size()!=topoN)
180  ATH_MSG_ERROR("Incorrect number of vertices");
181  if(cascadeVertices[0] == nullptr || cascadeVertices[1] == nullptr) ATH_MSG_ERROR("Error null vertex");
182  // Keep vertices (bear in mind that they come in reverse order!)
183  for(int i =0;i<topoN;i++) Vtxwritehandles[i]->push_back(cascadeVertices[i]);
184 
185  x->setSVOwnership(false); // Prevent Container from deleting vertices
186  const auto mainVertex = cascadeVertices[1]; // this is the B_c+/- vertex
187  const std::vector< std::vector<TLorentzVector> > &moms = x->getParticleMoms();
188 
189  // Set links to cascade vertices
190  std::vector<const xAOD::Vertex*> verticestoLink;
191  verticestoLink.push_back(cascadeVertices[0]);
192  if(Vtxwritehandles[1] == nullptr) ATH_MSG_ERROR("Vtxwritehandles[1] is null");
193  if(!BPhysPVCascadeTools::LinkVertices(CascadeLinksDecor, verticestoLink, Vtxwritehandles[0], cascadeVertices[1]))
194  ATH_MSG_ERROR("Error decorating with cascade vertices");
195 
196  // Identify the input Jpsi
197  const xAOD::Vertex* jpsiVertex = BPhysPVCascadeTools::FindVertex<2>(jpsiContainer, cascadeVertices[1]);
198  ATH_MSG_DEBUG("1 pt Jpsi tracks " << cascadeVertices[1]->trackParticle(0)->pt() << ", " << cascadeVertices[1]->trackParticle(1)->pt());
199  if (jpsiVertex) ATH_MSG_DEBUG("2 pt Jpsi tracks " << jpsiVertex->trackParticle(0)->pt() << ", " << jpsiVertex->trackParticle(1)->pt());
200 
201  // Identify the input D_(s)+
202  const xAOD::Vertex* dxVertex = BPhysPVCascadeTools::FindVertex<3>(dxContainer, cascadeVertices[0]);;
203  ATH_MSG_DEBUG("1 pt D_(s)+ tracks " << cascadeVertices[0]->trackParticle(0)->pt() << ", " << cascadeVertices[0]->trackParticle(1)->pt() << ", " << cascadeVertices[0]->trackParticle(2)->pt());
204  if (dxVertex) ATH_MSG_DEBUG("2 pt D_(s)+ tracks " << dxVertex->trackParticle(0)->pt() << ", " << dxVertex->trackParticle(1)->pt() << ", " << dxVertex->trackParticle(2)->pt());
205 
206  // Set links to input vertices
207  std::vector<const xAOD::Vertex*> jpsiVerticestoLink;
208  if (jpsiVertex) jpsiVerticestoLink.push_back(jpsiVertex);
209  else ATH_MSG_WARNING("Could not find linking Jpsi");
210  if(!BPhysPVCascadeTools::LinkVertices(JpsiLinksDecor, jpsiVerticestoLink, jpsiContainer, cascadeVertices[1]))
211  ATH_MSG_ERROR("Error decorating with Jpsi vertices");
212 
213  std::vector<const xAOD::Vertex*> dxVerticestoLink;
214  if (dxVertex) dxVerticestoLink.push_back(dxVertex);
215  else ATH_MSG_WARNING("Could not find linking D_(s)+");
216  if(!BPhysPVCascadeTools::LinkVertices(DxLinksDecor, dxVerticestoLink, dxContainer, cascadeVertices[1]))
217  ATH_MSG_ERROR("Error decorating with D_(s)+ vertices");
218 
219  bool tagDp(true);
220  if (dxVertex) {
221  if(abs(m_Dx_pid)==411 && (dxVertex->trackParticle(2)->charge()==-1)) tagDp = false;
222  }
223 
224  double mass_b = m_vtx0MassHypo;
225  double mass_d = m_vtx1MassHypo;
226  std::vector<double> massesJpsi;
227  massesJpsi.push_back(m_vtx0Daug1MassHypo);
228  massesJpsi.push_back(m_vtx0Daug2MassHypo);
229  std::vector<double> massesDx;
230  if(tagDp){
231  massesDx.push_back(m_vtx1Daug1MassHypo);
232  massesDx.push_back(m_vtx1Daug2MassHypo);
233  }else{ // Change the order for D-
234  massesDx.push_back(m_vtx1Daug2MassHypo);
235  massesDx.push_back(m_vtx1Daug1MassHypo);
236  }
237  massesDx.push_back(m_vtx1Daug3MassHypo);
238  std::vector<double> Masses;
239  Masses.push_back(m_vtx0Daug1MassHypo);
240  Masses.push_back(m_vtx0Daug2MassHypo);
241  Masses.push_back(m_vtx1MassHypo);
242 
243  // loop over candidates -- Don't apply PV_minNTracks requirement here
244  // because it may result in exclusion of the high-pt PV.
245  // get good PVs
246 
247 
248  xAOD::BPhysHypoHelper vtx(m_hypoName, mainVertex);
249 
250  // Get refitted track momenta from all vertices, charged tracks only
252 
253  // Decorate main vertex
254  //
255  // 1.a) mass, mass error
256  BPHYS_CHECK( vtx.setMass(m_CascadeTools->invariantMass(moms[1])) );
257  BPHYS_CHECK( vtx.setMassErr(m_CascadeTools->invariantMassError(moms[1],x->getCovariance()[1])) );
258  // 1.b) pt and pT error (the default pt of mainVertex is != the pt of the full cascade fit!)
259  Pt_decor(*mainVertex) = m_CascadeTools->pT(moms[1]);
260  PtErr_decor(*mainVertex) = m_CascadeTools->pTError(moms[1],x->getCovariance()[1]);
261  // 1.c) chi2 and ndof (the default chi2 of mainVertex is != the chi2 of the full cascade fit!)
262  chi2_decor(*mainVertex) = x->fitChi2();
263  ndof_decor(*mainVertex) = x->nDoF();
264 
265  float massMumu = 0.;
266  if (jpsiVertex) {
267  TLorentzVector p4_mu1, p4_mu2;
268  p4_mu1.SetPtEtaPhiM(jpsiVertex->trackParticle(0)->pt(),
269  jpsiVertex->trackParticle(0)->eta(),
270  jpsiVertex->trackParticle(0)->phi(), m_vtx0Daug1MassHypo);
271  p4_mu2.SetPtEtaPhiM(jpsiVertex->trackParticle(1)->pt(),
272  jpsiVertex->trackParticle(1)->eta(),
273  jpsiVertex->trackParticle(1)->phi(), m_vtx0Daug2MassHypo);
274  massMumu = (p4_mu1 + p4_mu2).M();
275  }
276  MassMumu_decor(*mainVertex) = massMumu;
277 
278  float massKX = 0., massKXpi = 0.;
279  if (dxVertex) {
280  TLorentzVector p4_h1, p4_h2, p4_h3;
281  if(tagDp){
282  p4_h1.SetPtEtaPhiM(dxVertex->trackParticle(0)->pt(),
283  dxVertex->trackParticle(0)->eta(),
284  dxVertex->trackParticle(0)->phi(), m_vtx1Daug1MassHypo);
285  p4_h2.SetPtEtaPhiM(dxVertex->trackParticle(1)->pt(),
286  dxVertex->trackParticle(1)->eta(),
287  dxVertex->trackParticle(1)->phi(), m_vtx1Daug2MassHypo);
288  }else{ // Change the order for D-
289  p4_h1.SetPtEtaPhiM(dxVertex->trackParticle(0)->pt(),
290  dxVertex->trackParticle(0)->eta(),
291  dxVertex->trackParticle(0)->phi(), m_vtx1Daug2MassHypo);
292  p4_h2.SetPtEtaPhiM(dxVertex->trackParticle(1)->pt(),
293  dxVertex->trackParticle(1)->eta(),
294  dxVertex->trackParticle(1)->phi(), m_vtx1Daug1MassHypo);
295  }
296  p4_h3.SetPtEtaPhiM(dxVertex->trackParticle(2)->pt(),
297  dxVertex->trackParticle(2)->eta(),
298  dxVertex->trackParticle(2)->phi(), m_vtx1Daug3MassHypo);
299  massKX = (p4_h1 + p4_h2).M();
300  massKXpi = (p4_h1 + p4_h2 + p4_h3).M();
301  }
302  MassKX_svdecor(*mainVertex) = massKX;
303  MassKXpi_svdecor(*mainVertex) = massKXpi;
304 
305  ATH_CHECK(helper.FillCandwithRefittedVertices(m_refitPV, pvContainer,
306  refPvContainer, &(*m_pvRefitter), m_PV_max, m_DoVertexType, x, 1, mass_b, vtx));
307 
308 
309  // 4) decorate the main vertex with V0 vertex mass, pt, lifetime and lxy values (plus errors)
310  // V0 points to the main vertex, so lifetime and lxy are w.r.t the main vertex
311  Mass_svdecor(*mainVertex) = m_CascadeTools->invariantMass(moms[0]);
312  MassErr_svdecor(*mainVertex) = m_CascadeTools->invariantMassError(moms[0],x->getCovariance()[0]);
313  Pt_svdecor(*mainVertex) = m_CascadeTools->pT(moms[0]);
314  PtErr_svdecor(*mainVertex) = m_CascadeTools->pTError(moms[0],x->getCovariance()[0]);
315  Lxy_svdecor(*mainVertex) = m_CascadeTools->lxy(moms[0],cascadeVertices[0],cascadeVertices[1]);
316  LxyErr_svdecor(*mainVertex) = m_CascadeTools->lxyError(moms[0],x->getCovariance()[0],cascadeVertices[0],cascadeVertices[1]);
317  Tau_svdecor(*mainVertex) = m_CascadeTools->tau(moms[0],cascadeVertices[0],cascadeVertices[1]);
318  TauErr_svdecor(*mainVertex) = m_CascadeTools->tauError(moms[0],x->getCovariance()[0],cascadeVertices[0],cascadeVertices[1]);
319 
320  // Some checks in DEBUG mode
321  ATH_MSG_DEBUG("chi2 " << x->fitChi2()
322  << " chi2_1 " << m_V0Tools->chisq(cascadeVertices[0])
323  << " chi2_2 " << m_V0Tools->chisq(cascadeVertices[1])
324  << " vprob " << m_CascadeTools->vertexProbability(x->nDoF(),x->fitChi2()));
325  ATH_MSG_DEBUG("ndf " << x->nDoF() << " ndf_1 " << m_V0Tools->ndof(cascadeVertices[0]) << " ndf_2 " << m_V0Tools->ndof(cascadeVertices[1]));
326  ATH_MSG_DEBUG("V0Tools mass_d " << m_V0Tools->invariantMass(cascadeVertices[0],massesDx)
327  << " error " << m_V0Tools->invariantMassError(cascadeVertices[0],massesDx)
328  << " mass_J " << m_V0Tools->invariantMass(cascadeVertices[1],massesJpsi)
329  << " error " << m_V0Tools->invariantMassError(cascadeVertices[1],massesJpsi));
330  // masses and errors, using track masses assigned in the fit
331  double Mass_B = m_CascadeTools->invariantMass(moms[1]);
332  double Mass_D = m_CascadeTools->invariantMass(moms[0]);
333  double Mass_B_err = m_CascadeTools->invariantMassError(moms[1],x->getCovariance()[1]);
334  double Mass_D_err = m_CascadeTools->invariantMassError(moms[0],x->getCovariance()[0]);
335  ATH_MSG_DEBUG("Mass_B " << Mass_B << " Mass_D " << Mass_D);
336  ATH_MSG_DEBUG("Mass_B_err " << Mass_B_err << " Mass_D_err " << Mass_D_err);
337  double mprob_B = m_CascadeTools->massProbability(mass_b,Mass_B,Mass_B_err);
338  double mprob_D = m_CascadeTools->massProbability(mass_d,Mass_D,Mass_D_err);
339  ATH_MSG_DEBUG("mprob_B " << mprob_B << " mprob_D " << mprob_D);
340  // masses and errors, assigning user defined track masses
341  ATH_MSG_DEBUG("Mass_b " << m_CascadeTools->invariantMass(moms[1],Masses)
342  << " Mass_d " << m_CascadeTools->invariantMass(moms[0],massesDx));
343  ATH_MSG_DEBUG("Mass_b_err " << m_CascadeTools->invariantMassError(moms[1],x->getCovariance()[1],Masses)
344  << " Mass_d_err " << m_CascadeTools->invariantMassError(moms[0],x->getCovariance()[0],massesDx));
345  ATH_MSG_DEBUG("pt_b " << m_CascadeTools->pT(moms[1])
346  << " pt_d " << m_CascadeTools->pT(moms[0])
347  << " pt_dp " << m_V0Tools->pT(cascadeVertices[0]));
348  ATH_MSG_DEBUG("ptErr_b " << m_CascadeTools->pTError(moms[1],x->getCovariance()[1])
349  << " ptErr_d " << m_CascadeTools->pTError(moms[0],x->getCovariance()[0])
350  << " ptErr_dp " << m_V0Tools->pTError(cascadeVertices[0]));
351  ATH_MSG_DEBUG("lxy_B " << m_V0Tools->lxy(cascadeVertices[1],primaryVertex) << " lxy_D " << m_V0Tools->lxy(cascadeVertices[0],cascadeVertices[1]));
352  ATH_MSG_DEBUG("lxy_b " << m_CascadeTools->lxy(moms[1],cascadeVertices[1],primaryVertex) << " lxy_d " << m_CascadeTools->lxy(moms[0],cascadeVertices[0],cascadeVertices[1]));
353  ATH_MSG_DEBUG("lxyErr_b " << m_CascadeTools->lxyError(moms[1],x->getCovariance()[1],cascadeVertices[1],primaryVertex)
354  << " lxyErr_d " << m_CascadeTools->lxyError(moms[0],x->getCovariance()[0],cascadeVertices[0],cascadeVertices[1])
355  << " lxyErr_dp " << m_V0Tools->lxyError(cascadeVertices[0],cascadeVertices[1]));
356  ATH_MSG_DEBUG("tau_B " << m_CascadeTools->tau(moms[1],cascadeVertices[1],primaryVertex,mass_b)
357  << " tau_dp " << m_V0Tools->tau(cascadeVertices[0],cascadeVertices[1],massesDx));
358  ATH_MSG_DEBUG("tau_b " << m_CascadeTools->tau(moms[1],cascadeVertices[1],primaryVertex)
359  << " tau_d " << m_CascadeTools->tau(moms[0],cascadeVertices[0],cascadeVertices[1])
360  << " tau_D " << m_CascadeTools->tau(moms[0],cascadeVertices[0],cascadeVertices[1],mass_d));
361  ATH_MSG_DEBUG("tauErr_b " << m_CascadeTools->tauError(moms[1],x->getCovariance()[1],cascadeVertices[1],primaryVertex)
362  << " tauErr_d " << m_CascadeTools->tauError(moms[0],x->getCovariance()[0],cascadeVertices[0],cascadeVertices[1])
363  << " tauErr_dp " << m_V0Tools->tauError(cascadeVertices[0],cascadeVertices[1],massesDx));
364  ATH_MSG_DEBUG("TauErr_b " << m_CascadeTools->tauError(moms[1],x->getCovariance()[1],cascadeVertices[1],primaryVertex,mass_b)
365  << " TauErr_d " << m_CascadeTools->tauError(moms[0],x->getCovariance()[0],cascadeVertices[0],cascadeVertices[1],mass_d)
366  << " TauErr_dp " << m_V0Tools->tauError(cascadeVertices[0],cascadeVertices[1],massesDx,mass_d));
367 
368  ATH_MSG_DEBUG("CascadeTools main vert wrt PV " << " CascadeTools SV " << " V0Tools SV");
369  ATH_MSG_DEBUG("a0z " << m_CascadeTools->a0z(moms[1],cascadeVertices[1],primaryVertex)
370  << ", " << m_CascadeTools->a0z(moms[0],cascadeVertices[0],cascadeVertices[1])
371  << ", " << m_V0Tools->a0z(cascadeVertices[0],cascadeVertices[1]));
372  ATH_MSG_DEBUG("a0zErr " << m_CascadeTools->a0zError(moms[1],x->getCovariance()[1],cascadeVertices[1],primaryVertex)
373  << ", " << m_CascadeTools->a0zError(moms[0],x->getCovariance()[0],cascadeVertices[0],cascadeVertices[1])
374  << ", " << m_V0Tools->a0zError(cascadeVertices[0],cascadeVertices[1]));
375  ATH_MSG_DEBUG("a0xy " << m_CascadeTools->a0xy(moms[1],cascadeVertices[1],primaryVertex)
376  << ", " << m_CascadeTools->a0xy(moms[0],cascadeVertices[0],cascadeVertices[1])
377  << ", " << m_V0Tools->a0xy(cascadeVertices[0],cascadeVertices[1]));
378  ATH_MSG_DEBUG("a0xyErr " << m_CascadeTools->a0xyError(moms[1],x->getCovariance()[1],cascadeVertices[1],primaryVertex)
379  << ", " << m_CascadeTools->a0xyError(moms[0],x->getCovariance()[0],cascadeVertices[0],cascadeVertices[1])
380  << ", " << m_V0Tools->a0xyError(cascadeVertices[0],cascadeVertices[1]));
381  ATH_MSG_DEBUG("a0 " << m_CascadeTools->a0(moms[1],cascadeVertices[1],primaryVertex)
382  << ", " << m_CascadeTools->a0(moms[0],cascadeVertices[0],cascadeVertices[1])
383  << ", " << m_V0Tools->a0(cascadeVertices[0],cascadeVertices[1]));
384  ATH_MSG_DEBUG("a0Err " << m_CascadeTools->a0Error(moms[1],x->getCovariance()[1],cascadeVertices[1],primaryVertex)
385  << ", " << m_CascadeTools->a0Error(moms[0],x->getCovariance()[0],cascadeVertices[0],cascadeVertices[1])
386  << ", " << m_V0Tools->a0Error(cascadeVertices[0],cascadeVertices[1]));
387  ATH_MSG_DEBUG("x0 " << m_V0Tools->vtx(cascadeVertices[0]).x() << " y0 " << m_V0Tools->vtx(cascadeVertices[0]).y() << " z0 " << m_V0Tools->vtx(cascadeVertices[0]).z());
388  ATH_MSG_DEBUG("x1 " << m_V0Tools->vtx(cascadeVertices[1]).x() << " y1 " << m_V0Tools->vtx(cascadeVertices[1]).y() << " z1 " << m_V0Tools->vtx(cascadeVertices[1]).z());
389  ATH_MSG_DEBUG("X0 " << primaryVertex->x() << " Y0 " << primaryVertex->y() << " Z0 " << primaryVertex->z());
390  ATH_MSG_DEBUG("rxy0 " << m_V0Tools->rxy(cascadeVertices[0]) << " rxyErr0 " << m_V0Tools->rxyError(cascadeVertices[0]));
391  ATH_MSG_DEBUG("rxy1 " << m_V0Tools->rxy(cascadeVertices[1]) << " rxyErr1 " << m_V0Tools->rxyError(cascadeVertices[1]));
392  ATH_MSG_DEBUG("Rxy0 wrt PV " << m_V0Tools->rxy(cascadeVertices[0],primaryVertex) << " RxyErr0 wrt PV " << m_V0Tools->rxyError(cascadeVertices[0],primaryVertex));
393  ATH_MSG_DEBUG("Rxy1 wrt PV " << m_V0Tools->rxy(cascadeVertices[1],primaryVertex) << " RxyErr1 wrt PV " << m_V0Tools->rxyError(cascadeVertices[1],primaryVertex));
394  ATH_MSG_DEBUG("number of covariance matrices " << (x->getCovariance()).size());
395  } // loop over cascadeinfoContainer
396 
397  // Deleting cascadeinfo since this won't be stored.
398  // Vertices have been kept in m_cascadeOutputs and should be owned by their container
399  for (auto x : cascadeinfoContainer) delete x;
400 
401  return StatusCode::SUCCESS;
402  }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ initialize()

StatusCode DerivationFramework::JpsiPlusDsCascade::initialize ( )
overridevirtual

Definition at line 27 of file JpsiPlusDsCascade.cxx.

27  {
28 
29  // retrieving vertex Fitter
30  ATH_CHECK( m_iVertexFitter.retrieve());
31 
32  // retrieving the V0 tools
33  ATH_CHECK( m_V0Tools.retrieve());
34 
35  // retrieving the Cascade tools
36  ATH_CHECK( m_CascadeTools.retrieve());
37 
38  // Get the beam spot service
40 
41  ATH_CHECK( m_partPropSvc.retrieve() );
42  auto pdt = m_partPropSvc->PDT();
43 
44  // retrieve particle masses
46  if(m_vtx0MassHypo < 0.)
48  if(m_vtx1MassHypo < 0.) {
49  if(abs(m_Dx_pid) == 411) m_vtx1MassHypo = BPhysPVCascadeTools::getParticleMass(pdt, MC::DPLUS);
51  }
52 
55  if(m_vtx1Daug1MassHypo < 0.) {
56  if(abs(m_Dx_pid) == 411) m_vtx1Daug1MassHypo = BPhysPVCascadeTools::getParticleMass(pdt, MC::PIPLUS);
58  }
61 
62  return StatusCode::SUCCESS;
63  }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

static const InterfaceID& DerivationFramework::JpsiPlusDsCascade::interfaceID ( )
inlinestatic

Definition at line 39 of file JpsiPlusDsCascade.h.

39 { return IID_JpsiPlusDsCascade;}

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ performSearch()

StatusCode DerivationFramework::JpsiPlusDsCascade::performSearch ( std::vector< Trk::VxCascadeInfo * > *  cascadeinfoContainer) const

Definition at line 469 of file JpsiPlusDsCascade.cxx.

470  {
471  ATH_MSG_DEBUG( "JpsiPlusDsCascade::performSearch" );
472  assert(cascadeinfoContainer!=nullptr);
473 
474  // Get TrackParticle container (for setting links to the original tracks)
475  const xAOD::TrackParticleContainer *trackContainer(nullptr);
476  ATH_CHECK(evtStore()->retrieve(trackContainer , "InDetTrackParticles" ));
477 
478  // Get Jpsi container
479  const xAOD::VertexContainer *jpsiContainer(nullptr);
480  ATH_CHECK(evtStore()->retrieve(jpsiContainer , m_vertexContainerKey ));
481 
482  // Get V0 container
483  const xAOD::VertexContainer *dxContainer(nullptr);
485 
486 
487 
488  double mass_d = m_vtx1MassHypo;
489  std::vector<const xAOD::TrackParticle*> tracksJpsi;
490  std::vector<const xAOD::TrackParticle*> tracksDx;
491  std::vector<const xAOD::TrackParticle*> tracksBc;
492  std::vector<double> massesJpsi;
493  massesJpsi.push_back(m_vtx0Daug1MassHypo);
494  massesJpsi.push_back(m_vtx0Daug2MassHypo);
495  std::vector<double> massesDx;
496  massesDx.push_back(m_vtx1Daug1MassHypo);
497  massesDx.push_back(m_vtx1Daug2MassHypo);
498  massesDx.push_back(m_vtx1Daug3MassHypo);
499  std::vector<double> massesDm; // Alter the order of masses for D-
500  massesDm.push_back(m_vtx1Daug2MassHypo);
501  massesDm.push_back(m_vtx1Daug1MassHypo);
502  massesDm.push_back(m_vtx1Daug3MassHypo);
503  std::vector<double> Masses;
504  Masses.push_back(m_vtx0Daug1MassHypo);
505  Masses.push_back(m_vtx0Daug2MassHypo);
506  Masses.push_back(m_vtx1MassHypo);
507 
508  // Select the J/psi candidates before calling cascade fit
509  std::vector<const xAOD::Vertex*> selectedJpsiCandidates;
510  for(auto vxcItr=jpsiContainer->cbegin(); vxcItr!=jpsiContainer->cend(); ++vxcItr) {
511 
512  // Check the passed flag first
513  const xAOD::Vertex* vtx = *vxcItr;
514  SG::AuxElement::Accessor<Char_t> flagAcc1("passed_Jpsi");
515  if(flagAcc1.isAvailable(*vtx)){
516  if(!flagAcc1(*vtx)) continue;
517  }
518 
519  // Check J/psi candidate invariant mass and skip if need be
520  double mass_Jpsi = m_V0Tools->invariantMass(*vxcItr, massesJpsi);
521  if (mass_Jpsi < m_jpsiMassLower || mass_Jpsi > m_jpsiMassUpper) {
522  ATH_MSG_DEBUG(" Original Jpsi candidate rejected by the mass cut: mass = "
523  << mass_Jpsi << " != (" << m_jpsiMassLower << ", " << m_jpsiMassUpper << ")" );
524  continue;
525  }
526  selectedJpsiCandidates.push_back(*vxcItr);
527  }
528  if(selectedJpsiCandidates.size()<1) return StatusCode::SUCCESS;
529 
530  // Select the D_s+/D+ candidates before calling cascade fit
531  std::vector<const xAOD::Vertex*> selectedDxCandidates;
532  for(auto vxcItr=dxContainer->cbegin(); vxcItr!=dxContainer->cend(); ++vxcItr) {
533 
534  // Check the passed flag first
535  const xAOD::Vertex* vtx = *vxcItr;
536  if(abs(m_Dx_pid)==431) { // D_s+/-
537  SG::AuxElement::Accessor<Char_t> flagAcc1("passed_Ds");
538  if(flagAcc1.isAvailable(*vtx)){
539  if(!flagAcc1(*vtx)) continue;
540  }
541  }
542 
543  if(abs(m_Dx_pid)==411) { // D+/-
544  SG::AuxElement::Accessor<Char_t> flagAcc1("passed_Dp");
545  SG::AuxElement::Accessor<Char_t> flagAcc2("passed_Dm");
546  bool isDp(true);
547  bool isDm(true);
548  if(flagAcc1.isAvailable(*vtx)){
549  if(!flagAcc1(*vtx)) isDp = false;
550  }
551  if(flagAcc2.isAvailable(*vtx)){
552  if(!flagAcc2(*vtx)) isDm = false;
553  }
554  if(!(isDp||isDm)) continue;
555  }
556 
557 
558  // Ensure the total charge is correct
559  if(abs((*vxcItr)->trackParticle(0)->charge()+(*vxcItr)->trackParticle(1)->charge()+(*vxcItr)->trackParticle(2)->charge()) != 1){
560  ATH_MSG_DEBUG(" Original D+ candidate rejected by the charge requirement: "
561  << (*vxcItr)->trackParticle(0)->charge() << ", " << (*vxcItr)->trackParticle(1)->charge() << ", " << (*vxcItr)->trackParticle(2)->charge() );
562  continue;
563  }
564 
565  // Check D_(s)+/- candidate invariant mass and skip if need be
566  double mass_D;
567  if(abs(m_Dx_pid)==411 && (*vxcItr)->trackParticle(2)->charge()<0) // D-
568  mass_D = m_V0Tools->invariantMass(*vxcItr,massesDm);
569  else // D+, D_s+/-
570  mass_D = m_V0Tools->invariantMass(*vxcItr,massesDx);
571  ATH_MSG_DEBUG("D_(s) mass " << mass_D);
572  if(mass_D < m_DxMassLower || mass_D > m_DxMassUpper) {
573  ATH_MSG_DEBUG(" Original D_(s) candidate rejected by the mass cut: mass = "
574  << mass_D << " != (" << m_DxMassLower << ", " << m_DxMassUpper << ")" );
575  continue;
576  }
577 
578  // Add loose cut on K+k- mass for D_s->phi pi
579  if(m_Dx_pid==431){
580  TLorentzVector p4Kp_in, p4Km_in;
581  p4Kp_in.SetPtEtaPhiM( (*vxcItr)->trackParticle(0)->pt(),
582  (*vxcItr)->trackParticle(0)->eta(),
583  (*vxcItr)->trackParticle(0)->phi(), m_vtx1Daug1MassHypo);
584  p4Km_in.SetPtEtaPhiM( (*vxcItr)->trackParticle(1)->pt(),
585  (*vxcItr)->trackParticle(1)->eta(),
586  (*vxcItr)->trackParticle(1)->phi(), m_vtx1Daug2MassHypo);
587  double mass_phi = (p4Kp_in + p4Km_in).M();
588  ATH_MSG_DEBUG("phi mass " << mass_phi);
589  if(mass_phi > 1200) {
590  ATH_MSG_DEBUG(" Original phi candidate rejected by the mass cut: mass = " << mass_phi );
591  continue;
592  }
593  }
594  selectedDxCandidates.push_back(*vxcItr);
595  }
596  if(selectedDxCandidates.size()<1) return StatusCode::SUCCESS;
597 
598  // Select J/psi D_(s)+ candidates
599  // Iterate over Jpsi vertices
600  for(auto jpsiItr=selectedJpsiCandidates.cbegin(); jpsiItr!=selectedJpsiCandidates.cend(); ++jpsiItr) {
601 
602  size_t jpsiTrkNum = (*jpsiItr)->nTrackParticles();
603  tracksJpsi.clear();
604  for( unsigned int it=0; it<jpsiTrkNum; it++) tracksJpsi.push_back((*jpsiItr)->trackParticle(it));
605 
606  if (tracksJpsi.size() != 2 || massesJpsi.size() != 2 ) {
607  ATH_MSG_INFO("problems with Jpsi input");
608  }
609 
610  // Iterate over D_(s)+/- vertices
611  for(auto dxItr=selectedDxCandidates.cbegin(); dxItr!=selectedDxCandidates.cend(); ++dxItr) {
612 
613  // Check identical tracks in input
614  if(std::find(tracksJpsi.cbegin(), tracksJpsi.cend(), (*dxItr)->trackParticle(0)) != tracksJpsi.cend()) continue;
615  if(std::find(tracksJpsi.cbegin(), tracksJpsi.cend(), (*dxItr)->trackParticle(1)) != tracksJpsi.cend()) continue;
616  if(std::find(tracksJpsi.cbegin(), tracksJpsi.cend(), (*dxItr)->trackParticle(2)) != tracksJpsi.cend()) continue;
617 
618  size_t dxTrkNum = (*dxItr)->nTrackParticles();
619  tracksDx.clear();
620  for( unsigned int it=0; it<dxTrkNum; it++) tracksDx.push_back((*dxItr)->trackParticle(it));
621  if (tracksDx.size() != 3 || massesDx.size() != 3 ) {
622  ATH_MSG_INFO("problems with D_(s) input");
623  }
624 
625  ATH_MSG_DEBUG("using tracks" << tracksJpsi[0] << ", " << tracksJpsi[1] << ", " << tracksDx[0] << ", " << tracksDx[1] << ", " << tracksDx[2]);
626  tracksBc.clear();
627  for( unsigned int it=0; it<jpsiTrkNum; it++) tracksBc.push_back((*jpsiItr)->trackParticle(it));
628  for( unsigned int it=0; it<dxTrkNum; it++) tracksBc.push_back((*dxItr)->trackParticle(it));
629 
630  // Apply the user's settings to the fitter
631  // Reset
632  std::unique_ptr<Trk::IVKalState> state (m_iVertexFitter->makeState());
633  // Robustness
634  int robustness = 0;
635  m_iVertexFitter->setRobustness(robustness, *state);
636  // Build up the topology
637  // Vertex list
638  std::vector<Trk::VertexID> vrtList;
639  // D_(s)+/- vertex
640  Trk::VertexID vID;
641  if (m_constrDx) {
642  if(abs(m_Dx_pid)==411 && (*dxItr)->trackParticle(2)->charge()<0) // D-
643  vID = m_iVertexFitter->startVertex(tracksDx,massesDm,*state,mass_d);
644  else // D+, D_s+/-
645  vID = m_iVertexFitter->startVertex(tracksDx,massesDx,*state,mass_d);
646  } else {
647  if(abs(m_Dx_pid)==411 && (*dxItr)->trackParticle(2)->charge()<0) // D-
648  vID = m_iVertexFitter->startVertex(tracksDx,massesDm,*state);
649  else // D+, D_s+/-
650  vID = m_iVertexFitter->startVertex(tracksDx,massesDx,*state);
651  }
652  vrtList.push_back(vID);
653  // B vertex including Jpsi
654  Trk::VertexID vID2 = m_iVertexFitter->nextVertex(tracksJpsi,massesJpsi,vrtList,*state);
655  if (m_constrJpsi) {
656  std::vector<Trk::VertexID> cnstV;
657  cnstV.clear();
658  if ( !m_iVertexFitter->addMassConstraint(vID2,tracksJpsi,cnstV,*state,m_mass_jpsi).isSuccess() ) {
659  ATH_MSG_WARNING("addMassConstraint failed");
660  //return StatusCode::FAILURE;
661  }
662  }
663  // Do the work
664  std::unique_ptr<Trk::VxCascadeInfo> result(m_iVertexFitter->fitCascade(*state));
665 
666  if (result != nullptr) {
667  // reset links to original tracks
668  BPhysPVCascadeTools::PrepareVertexLinks(result.get(), trackContainer);
669  ATH_MSG_DEBUG("storing tracks " << ((result->vertices())[0])->trackParticle(0) << ", "
670  << ((result->vertices())[0])->trackParticle(1) << ", "
671  << ((result->vertices())[0])->trackParticle(2) << ", "
672  << ((result->vertices())[1])->trackParticle(0) << ", "
673  << ((result->vertices())[1])->trackParticle(1));
674  // necessary to prevent memory leak
675  result->setSVOwnership(true);
676 
677  // Chi2/DOF cut
678  double bChi2DOF = result->fitChi2()/result->nDoF();
679  ATH_MSG_DEBUG("Candidate chi2/DOF is " << bChi2DOF);
680  bool chi2CutPassed = (m_chi2cut <= 0.0 || bChi2DOF < m_chi2cut);
681 
682  const std::vector< std::vector<TLorentzVector> > &moms = result->getParticleMoms();
683  double mass = m_CascadeTools->invariantMass(moms[1]);
684  if(chi2CutPassed) {
685  if (mass >= m_MassLower && mass <= m_MassUpper) {
686  cascadeinfoContainer->push_back(result.release());
687  } else {
688  ATH_MSG_DEBUG("Candidate rejected by the mass cut: mass = "
689  << mass << " != (" << m_MassLower << ", " << m_MassUpper << ")" );
690  }
691  }
692  }
693 
694  } //Iterate over D_(s)+ vertices
695 
696  } //Iterate over Jpsi vertices
697 
698  ATH_MSG_DEBUG("cascadeinfoContainer size " << cascadeinfoContainer->size());
699 
700  return StatusCode::SUCCESS;
701  }

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_cascadeOutputsKeys

std::vector<std::string> DerivationFramework::JpsiPlusDsCascade::m_cascadeOutputsKeys
private

Definition at line 49 of file JpsiPlusDsCascade.h.

◆ m_CascadeTools

ToolHandle< DerivationFramework::CascadeTools > DerivationFramework::JpsiPlusDsCascade::m_CascadeTools
private

Definition at line 77 of file JpsiPlusDsCascade.h.

◆ m_chi2cut

double DerivationFramework::JpsiPlusDsCascade::m_chi2cut
private

Definition at line 71 of file JpsiPlusDsCascade.h.

◆ m_constrDx

bool DerivationFramework::JpsiPlusDsCascade::m_constrDx
private

Definition at line 69 of file JpsiPlusDsCascade.h.

◆ m_constrJpsi

bool DerivationFramework::JpsiPlusDsCascade::m_constrJpsi
private

Definition at line 70 of file JpsiPlusDsCascade.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_DoVertexType

int DerivationFramework::JpsiPlusDsCascade::m_DoVertexType
private

Definition at line 86 of file JpsiPlusDsCascade.h.

◆ m_Dx_pid

int DerivationFramework::JpsiPlusDsCascade::m_Dx_pid
private

Definition at line 68 of file JpsiPlusDsCascade.h.

◆ m_DxMassLower

double DerivationFramework::JpsiPlusDsCascade::m_DxMassLower
private

Definition at line 55 of file JpsiPlusDsCascade.h.

◆ m_DxMassUpper

double DerivationFramework::JpsiPlusDsCascade::m_DxMassUpper
private

Definition at line 56 of file JpsiPlusDsCascade.h.

◆ m_eventInfo_key

SG::ReadHandleKey<xAOD::EventInfo> DerivationFramework::JpsiPlusDsCascade::m_eventInfo_key {this, "EventInfo", "EventInfo", "Input event information"}
private

Definition at line 73 of file JpsiPlusDsCascade.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_hypoName

std::string DerivationFramework::JpsiPlusDsCascade::m_hypoName
private

name of the mass hypothesis.

E.g. Jpis, Upsi, etc. Will be used as a prefix for decorations

Definition at line 82 of file JpsiPlusDsCascade.h.

◆ m_iVertexFitter

ToolHandle< Trk::TrkVKalVrtFitter > DerivationFramework::JpsiPlusDsCascade::m_iVertexFitter
private

Definition at line 74 of file JpsiPlusDsCascade.h.

◆ m_jpsiMassLower

double DerivationFramework::JpsiPlusDsCascade::m_jpsiMassLower
private

Definition at line 53 of file JpsiPlusDsCascade.h.

◆ m_jpsiMassUpper

double DerivationFramework::JpsiPlusDsCascade::m_jpsiMassUpper
private

Definition at line 54 of file JpsiPlusDsCascade.h.

◆ m_mass_jpsi

double DerivationFramework::JpsiPlusDsCascade::m_mass_jpsi
private

Definition at line 67 of file JpsiPlusDsCascade.h.

◆ m_MassLower

double DerivationFramework::JpsiPlusDsCascade::m_MassLower
private

Definition at line 57 of file JpsiPlusDsCascade.h.

◆ m_MassUpper

double DerivationFramework::JpsiPlusDsCascade::m_MassUpper
private

Definition at line 58 of file JpsiPlusDsCascade.h.

◆ m_partPropSvc

ServiceHandle<IPartPropSvc> DerivationFramework::JpsiPlusDsCascade::m_partPropSvc {this, "PartPropSvc", "PartPropSvc"}
private

Definition at line 78 of file JpsiPlusDsCascade.h.

◆ m_PV_max

int DerivationFramework::JpsiPlusDsCascade::m_PV_max
private

Definition at line 85 of file JpsiPlusDsCascade.h.

◆ m_PV_minNTracks

size_t DerivationFramework::JpsiPlusDsCascade::m_PV_minNTracks
private

Definition at line 87 of file JpsiPlusDsCascade.h.

◆ m_pvRefitter

ToolHandle< Analysis::PrimaryVertexRefitter > DerivationFramework::JpsiPlusDsCascade::m_pvRefitter
private

Definition at line 75 of file JpsiPlusDsCascade.h.

◆ m_refitPV

bool DerivationFramework::JpsiPlusDsCascade::m_refitPV
private

Definition at line 80 of file JpsiPlusDsCascade.h.

◆ m_refPVContainerName

std::string DerivationFramework::JpsiPlusDsCascade::m_refPVContainerName
private

Definition at line 81 of file JpsiPlusDsCascade.h.

◆ m_V0Tools

ToolHandle< Trk::V0Tools > DerivationFramework::JpsiPlusDsCascade::m_V0Tools
private

Definition at line 76 of file JpsiPlusDsCascade.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vertexContainerKey

std::string DerivationFramework::JpsiPlusDsCascade::m_vertexContainerKey
private

Definition at line 47 of file JpsiPlusDsCascade.h.

◆ m_vertexDxContainerKey

std::string DerivationFramework::JpsiPlusDsCascade::m_vertexDxContainerKey
private

Definition at line 48 of file JpsiPlusDsCascade.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_vtx0Daug1MassHypo

double DerivationFramework::JpsiPlusDsCascade::m_vtx0Daug1MassHypo
private

Definition at line 61 of file JpsiPlusDsCascade.h.

◆ m_vtx0Daug2MassHypo

double DerivationFramework::JpsiPlusDsCascade::m_vtx0Daug2MassHypo
private

Definition at line 62 of file JpsiPlusDsCascade.h.

◆ m_vtx0MassHypo

double DerivationFramework::JpsiPlusDsCascade::m_vtx0MassHypo
private

Definition at line 59 of file JpsiPlusDsCascade.h.

◆ m_vtx1Daug1MassHypo

double DerivationFramework::JpsiPlusDsCascade::m_vtx1Daug1MassHypo
private

Definition at line 63 of file JpsiPlusDsCascade.h.

◆ m_vtx1Daug2MassHypo

double DerivationFramework::JpsiPlusDsCascade::m_vtx1Daug2MassHypo
private

Definition at line 64 of file JpsiPlusDsCascade.h.

◆ m_vtx1Daug3MassHypo

double DerivationFramework::JpsiPlusDsCascade::m_vtx1Daug3MassHypo
private

Definition at line 65 of file JpsiPlusDsCascade.h.

◆ m_vtx1MassHypo

double DerivationFramework::JpsiPlusDsCascade::m_vtx1MassHypo
private

Definition at line 60 of file JpsiPlusDsCascade.h.

◆ m_VxPrimaryCandidateName

std::string DerivationFramework::JpsiPlusDsCascade::m_VxPrimaryCandidateName
private

Name of primary vertex container.

Definition at line 51 of file JpsiPlusDsCascade.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
xAOD::TrackParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TrackParticle_v1.cxx:73
DerivationFramework::JpsiPlusDsCascade::m_vtx0Daug1MassHypo
double m_vtx0Daug1MassHypo
Definition: JpsiPlusDsCascade.h:61
DerivationFramework::JpsiPlusDsCascade::m_vtx1MassHypo
double m_vtx1MassHypo
Definition: JpsiPlusDsCascade.h:60
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
get_generator_info.result
result
Definition: get_generator_info.py:21
xAOD::VertexAuxContainer_v1
Temporary container used until we have I/O for AuxStoreInternal.
Definition: VertexAuxContainer_v1.h:32
Trk::VxCascadeInfo
Definition: VxCascadeInfo.h:75
DerivationFramework::JpsiPlusDsCascade::m_MassLower
double m_MassLower
Definition: JpsiPlusDsCascade.h:57
Trk::VertexID
int VertexID
Definition: IVertexCascadeFitter.h:23
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
DerivationFramework::JpsiPlusDsCascade::m_DxMassUpper
double m_DxMassUpper
Definition: JpsiPlusDsCascade.h:56
DerivationFramework::BPhysPVCascadeTools::LinkVertices
static bool LinkVertices(SG::AuxElement::Decorator< VertexLinkVector > &decor, const std::vector< const xAOD::Vertex * > &vertices, const xAOD::VertexContainer *vertexContainer, const xAOD::Vertex *vert)
Definition: BPhysPVCascadeTools.cxx:460
Base_Fragment.mass
mass
Definition: Sherpa_i/share/common/Base_Fragment.py:59
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:68
DerivationFramework::JpsiPlusDsCascade::m_chi2cut
double m_chi2cut
Definition: JpsiPlusDsCascade.h:71
xAOD::TrackParticle_v1::charge
float charge() const
Returns the charge.
Definition: TrackParticle_v1.cxx:150
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
xAOD::TrackParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: TrackParticle_v1.cxx:77
DerivationFramework::JpsiPlusDsCascade::m_PV_minNTracks
size_t m_PV_minNTracks
Definition: JpsiPlusDsCascade.h:87
DerivationFramework::BPhysPVCascadeTools::getParticleMass
static double getParticleMass(const HepPDT::ParticleDataTable *pdt, int pdg)
Definition: BPhysPVCascadeTools.cxx:491
DerivationFramework::JpsiPlusDsCascade::m_constrJpsi
bool m_constrJpsi
Definition: JpsiPlusDsCascade.h:70
DerivationFramework::JpsiPlusDsCascade::m_constrDx
bool m_constrDx
Definition: JpsiPlusDsCascade.h:69
skel.it
it
Definition: skel.GENtoEVGEN.py:396
DerivationFramework::JpsiPlusDsCascade::performSearch
StatusCode performSearch(std::vector< Trk::VxCascadeInfo * > *cascadeinfoContainer) const
Definition: JpsiPlusDsCascade.cxx:469
DerivationFramework::JpsiPlusDsCascade::m_CascadeTools
ToolHandle< DerivationFramework::CascadeTools > m_CascadeTools
Definition: JpsiPlusDsCascade.h:77
test_pyathena.pt
pt
Definition: test_pyathena.py:11
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
DerivationFramework::JpsiPlusDsCascade::m_jpsiMassLower
double m_jpsiMassLower
Definition: JpsiPlusDsCascade.h:53
DerivationFramework::JpsiPlusDsCascade::m_V0Tools
ToolHandle< Trk::V0Tools > m_V0Tools
Definition: JpsiPlusDsCascade.h:76
DerivationFramework::JpsiPlusDsCascade::m_vtx1Daug3MassHypo
double m_vtx1Daug3MassHypo
Definition: JpsiPlusDsCascade.h:65
DerivationFramework::JpsiPlusDsCascade::m_PV_max
int m_PV_max
Definition: JpsiPlusDsCascade.h:85
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
DerivationFramework::JpsiPlusDsCascade::m_vertexContainerKey
std::string m_vertexContainerKey
Definition: JpsiPlusDsCascade.h:47
xAOD::VertexContainer
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
Definition: VertexContainer.h:14
x
#define x
DerivationFramework::JpsiPlusDsCascade::m_pvRefitter
ToolHandle< Analysis::PrimaryVertexRefitter > m_pvRefitter
Definition: JpsiPlusDsCascade.h:75
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
runBeamSpotCalibration.helper
helper
Definition: runBeamSpotCalibration.py:112
DerivationFramework::JpsiPlusDsCascade::m_MassUpper
double m_MassUpper
Definition: JpsiPlusDsCascade.h:58
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
xAOD::BPhysHypoHelper
Definition: BPhysHypoHelper.h:73
DerivationFramework::BPhysPVCascadeTools::SetVectorInfo
static void SetVectorInfo(xAOD::BPhysHelper &, const Trk::VxCascadeInfo *)
Definition: BPhysPVCascadeTools.cxx:424
BPHYS_CHECK
#define BPHYS_CHECK(EXP)
Useful CHECK macro.
Definition: BPhysHelper.h:738
DerivationFramework::JpsiPlusDsCascade::m_Dx_pid
int m_Dx_pid
Definition: JpsiPlusDsCascade.h:68
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
SG::Decorator
Helper class to provide type-safe access to aux data.
Definition: Decorator.h:59
xAOD::VertexAuxContainer
VertexAuxContainer_v1 VertexAuxContainer
Definition of the current jet auxiliary container.
Definition: VertexAuxContainer.h:19
lumiFormat.i
int i
Definition: lumiFormat.py:85
beamspotman.n
n
Definition: beamspotman.py:731
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
DerivationFramework::JpsiPlusDsCascade::m_VxPrimaryCandidateName
std::string m_VxPrimaryCandidateName
Name of primary vertex container.
Definition: JpsiPlusDsCascade.h:51
DerivationFramework::JpsiPlusDsCascade::m_iVertexFitter
ToolHandle< Trk::TrkVKalVrtFitter > m_iVertexFitter
Definition: JpsiPlusDsCascade.h:74
DerivationFramework::JpsiPlusDsCascade::m_vertexDxContainerKey
std::string m_vertexDxContainerKey
Definition: JpsiPlusDsCascade.h:48
DerivationFramework::JpsiPlusDsCascade::m_partPropSvc
ServiceHandle< IPartPropSvc > m_partPropSvc
Definition: JpsiPlusDsCascade.h:78
DerivationFramework::BPhysPVCascadeTools::PrepareVertexLinks
static void PrepareVertexLinks(Trk::VxCascadeInfo *result, const xAOD::TrackParticleContainer *importedTrackCollection)
Definition: BPhysPVCascadeTools.cxx:204
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
xAOD::Vertex_v1::trackParticle
const TrackParticle * trackParticle(size_t i) const
Get the pointer to a given track that was used in vertex reco.
Definition: Vertex_v1.cxx:249
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
DerivationFramework::JpsiPlusDsCascade::m_refPVContainerName
std::string m_refPVContainerName
Definition: JpsiPlusDsCascade.h:81
DerivationFramework::JpsiPlusDsCascade::m_vtx0Daug2MassHypo
double m_vtx0Daug2MassHypo
Definition: JpsiPlusDsCascade.h:62
DerivationFramework::JpsiPlusDsCascade::m_vtx1Daug2MassHypo
double m_vtx1Daug2MassHypo
Definition: JpsiPlusDsCascade.h:64
DerivationFramework::JpsiPlusDsCascade::m_refitPV
bool m_refitPV
Definition: JpsiPlusDsCascade.h:80
DerivationFramework::JpsiPlusDsCascade::m_DoVertexType
int m_DoVertexType
Definition: JpsiPlusDsCascade.h:86
mc.mass_b
mass_b
Definition: mc.PhPy8EG_A14NNPDF23_gg4l_example.py:21
a
TList * a
Definition: liststreamerinfos.cxx:10
h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
DerivationFramework::JpsiPlusDsCascade::m_mass_jpsi
double m_mass_jpsi
Definition: JpsiPlusDsCascade.h:67
DerivationFramework::JpsiPlusDsCascade::m_cascadeOutputsKeys
std::vector< std::string > m_cascadeOutputsKeys
Definition: JpsiPlusDsCascade.h:49
DerivationFramework::JpsiPlusDsCascade::m_vtx1Daug1MassHypo
double m_vtx1Daug1MassHypo
Definition: JpsiPlusDsCascade.h:63
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
DerivationFramework::JpsiPlusDsCascade::m_jpsiMassUpper
double m_jpsiMassUpper
Definition: JpsiPlusDsCascade.h:54
DerivationFramework::JpsiPlusDsCascade::m_vtx0MassHypo
double m_vtx0MassHypo
Definition: JpsiPlusDsCascade.h:59
DerivationFramework::JpsiPlusDsCascade::m_eventInfo_key
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfo_key
Definition: JpsiPlusDsCascade.h:73
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
xAOD::TrackParticle_v1::phi
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)
DerivationFramework::JpsiPlusDsCascade::m_DxMassLower
double m_DxMassLower
Definition: JpsiPlusDsCascade.h:55
fitman.k
k
Definition: fitman.py:528
DerivationFramework::JpsiPlusDsCascade::m_hypoName
std::string m_hypoName
name of the mass hypothesis.
Definition: JpsiPlusDsCascade.h:82