ATLAS Offline Software
JpsiPlusV0Cascade.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
5 // JpsiPlusV0Cascade.cxx, (c) ATLAS Detector software
11 #include "GaudiKernel/IPartPropSvc.h"
17 #include <algorithm>
19 #include "HepPDT/ParticleDataTable.hh"
22 
23 namespace DerivationFramework {
25  typedef std::vector<VertexLink> VertexLinkVector;
26  typedef std::vector<const xAOD::TrackParticle*> TrackBag;
27 
28 
30 
31  // retrieving vertex Fitter
32  if ( m_iVertexFitter.retrieve().isFailure() ) {
33  ATH_MSG_FATAL("Failed to retrieve tool " << m_iVertexFitter);
34  return StatusCode::FAILURE;
35  } else {
36  ATH_MSG_DEBUG("Retrieved tool " << m_iVertexFitter);
37  }
38 
39  // retrieving the V0 tools
40  if ( m_V0Tools.retrieve().isFailure() ) {
41  ATH_MSG_FATAL("Failed to retrieve tool " << m_V0Tools);
42  return StatusCode::FAILURE;
43  } else {
44  ATH_MSG_INFO("Retrieved tool " << m_V0Tools);
45  }
46 
47  // retrieving the Cascade tools
48  if ( m_CascadeTools.retrieve().isFailure() ) {
49  ATH_MSG_FATAL("Failed to retrieve tool " << m_CascadeTools);
50  return StatusCode::FAILURE;
51  } else {
52  ATH_MSG_INFO("Retrieved tool " << m_CascadeTools);
53  }
54 
56  IPartPropSvc* partPropSvc = 0;
57  StatusCode sc = service("PartPropSvc", partPropSvc, true);
58  if (sc.isFailure()) {
59  msg(MSG::ERROR) << "Could not initialize Particle Properties Service" << endmsg;
60  return StatusCode::FAILURE;
61  }
62  const HepPDT::ParticleDataTable* pdt = partPropSvc->PDT();
63 
64  // retrieve particle masses
74  ATH_CHECK(m_RelinkContainers.initialize());
75 
76  return StatusCode::SUCCESS;
77  }
78 
79 
81  {
82  std::vector<Trk::VxCascadeInfo*> cascadeinfoContainer;
83  constexpr int topoN = 2;
84  std::array<xAOD::VertexContainer*, topoN> Vtxwritehandles;
85  std::array<xAOD::VertexAuxContainer*, topoN> Vtxwritehandlesaux;
86  if(m_cascadeOutputsKeys.size() !=topoN) { ATH_MSG_FATAL("Incorrect number of VtxContainers"); return StatusCode::FAILURE; }
87 
88  for(int i =0; i<topoN;i++){
89  Vtxwritehandles[i] = new xAOD::VertexContainer();
90  Vtxwritehandlesaux[i] = new xAOD::VertexAuxContainer();
91  Vtxwritehandles[i]->setStore(Vtxwritehandlesaux[i]);
92  CHECK(evtStore()->record(Vtxwritehandles[i] , m_cascadeOutputsKeys[i] ));
93  CHECK(evtStore()->record(Vtxwritehandlesaux[i], m_cascadeOutputsKeys[i] + "Aux."));
94  }
95 
96  //----------------------------------------------------
97  // retrieve primary vertices
98  //----------------------------------------------------
99  const xAOD::Vertex * primaryVertex(nullptr);
100  const xAOD::VertexContainer *pvContainer(nullptr);
102  ATH_MSG_DEBUG("Found " << m_VxPrimaryCandidateName << " in StoreGate!");
103 
104  if (pvContainer->size()==0){
105  ATH_MSG_WARNING("You have no primary vertices: " << pvContainer->size());
106  return StatusCode::RECOVERABLE;
107  } else {
108  primaryVertex = (*pvContainer)[0];
109  }
110 
111  //----------------------------------------------------
112  // Try to retrieve refitted primary vertices
113  //----------------------------------------------------
114  xAOD::VertexContainer* refPvContainer = NULL;
115  xAOD::VertexAuxContainer* refPvAuxContainer = NULL;
116  if (m_refitPV) {
117  // refitted PV container does not exist. Create a new one.
118  refPvContainer = new xAOD::VertexContainer;
119  refPvAuxContainer = new xAOD::VertexAuxContainer;
120  refPvContainer->setStore(refPvAuxContainer);
121  CHECK(evtStore()->record(refPvContainer , m_refPVContainerName ));
122  CHECK(evtStore()->record(refPvAuxContainer, m_refPVContainerName + "Aux."));
123  }
124 
125  ATH_CHECK(performSearch(&cascadeinfoContainer));
126 
128  if(not evt.isValid()) ATH_MSG_ERROR("Cannot Retrieve " << m_eventInfo_key.key() );
130  helper.SetMinNTracksInPV(m_PV_minNTracks);
131 
132  // Decorators for the main vertex: chi2, ndf, pt and pt error, plus the V0 vertex variables
133  SG::AuxElement::Decorator<VertexLinkVector> CascadeLinksDecor("CascadeVertexLinks");
134  SG::AuxElement::Decorator<VertexLinkVector> JpsiLinksDecor("JpsiVertexLinks");
135  SG::AuxElement::Decorator<VertexLinkVector> V0LinksDecor("V0VertexLinks");
136  SG::AuxElement::Decorator<float> chi2_decor("ChiSquared");
137  SG::AuxElement::Decorator<float> ndof_decor("NumberDoF");
138  SG::AuxElement::Decorator<float> Pt_decor("Pt");
139  SG::AuxElement::Decorator<float> PtErr_decor("PtErr");
140  SG::AuxElement::Decorator<float> Mass_svdecor("V0_mass");
141  SG::AuxElement::Decorator<float> MassErr_svdecor("V0_massErr");
142  SG::AuxElement::Decorator<float> Pt_svdecor("V0_Pt");
143  SG::AuxElement::Decorator<float> PtErr_svdecor("V0_PtErr");
144  SG::AuxElement::Decorator<float> Lxy_svdecor("V0_Lxy");
145  SG::AuxElement::Decorator<float> LxyErr_svdecor("V0_LxyErr");
146  SG::AuxElement::Decorator<float> Tau_svdecor("V0_Tau");
147  SG::AuxElement::Decorator<float> TauErr_svdecor("V0_TauErr");
148 
149  ATH_MSG_DEBUG("cascadeinfoContainer size " << cascadeinfoContainer.size());
150 
151  // Get Jpsi container and identify the input Jpsi
152  const xAOD::VertexContainer *jpsiContainer(nullptr);
153  CHECK(evtStore()->retrieve(jpsiContainer , m_vertexContainerKey ));
154  const xAOD::VertexContainer *v0Container(nullptr);
155  CHECK(evtStore()->retrieve(v0Container , m_vertexV0ContainerKey ));
156 
157  for (Trk::VxCascadeInfo* x : cascadeinfoContainer) {
158  if(x==nullptr) {
159  ATH_MSG_ERROR("cascadeinfoContainer is null");
160  //x is dereferenced if we pass this
161  return StatusCode::FAILURE;
162  }
163 
164  // the cascade fitter returns:
165  // std::vector<xAOD::Vertex*>, each xAOD::Vertex contains the refitted track parameters (perigee at the vertex position)
166  // vertices[iv] the links to the original TPs and a covariance of size 3+5*NTRK; the chi2 of the total fit
167  // is split between the cascade vertices as per track contribution
168  // std::vector< std::vector<TLorentzVector> >, each std::vector<TLorentzVector> contains the refitted momenta (TLorentzVector)
169  // momenta[iv][...] of all tracks in the corresponding vertex, including any pseudotracks (from cascade vertices)
170  // originating in this vertex; the masses are as assigned in the cascade fit
171  // std::vector<Amg::MatrixX>, the corresponding covariance matrices in momentum space
172  // covariance[iv]
173  // int nDoF, double Chi2
174  //
175  // the invariant mass, pt, lifetime etc. errors should be calculated using the covariance matrices in momentum space as these
176  // take into account the full track-track and track-vertex correlations
177  //
178  // 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.
179  // The covariance terms between the two vertices are not stored. In momentum space momenta[0] contains the 2 V0 tracks,
180  // their momenta add up to the momentum of the 3rd track in momenta[1], the first two being the Jpsi tracks
181 
182  const std::vector<xAOD::Vertex*> &cascadeVertices = x->vertices();
183  if(cascadeVertices.size()!=topoN)
184  ATH_MSG_ERROR("Incorrect number of vertices");
185  if(cascadeVertices[0] == nullptr || cascadeVertices[1] == nullptr) ATH_MSG_ERROR("Error null vertex");
186  // Keep vertices (bear in mind that they come in reverse order!)
187  for(int i =0;i<topoN;i++) Vtxwritehandles[i]->push_back(cascadeVertices[i]);
188 
189  x->setSVOwnership(false); // Prevent Container from deleting vertices
190  const auto mainVertex = cascadeVertices[1]; // this is the Bd (Bd, Lambda_b, Lambda_bbar) vertex
191  //const auto v0Vertex = cascadeVertices[0]; // this is the V0 (Kshort, Lambda, Lambdabar) vertex
192  const std::vector< std::vector<TLorentzVector> > &moms = x->getParticleMoms();
193 
194  // Set links to cascade vertices
195  std::vector<const xAOD::Vertex*> verticestoLink;
196  verticestoLink.push_back(cascadeVertices[0]);
197  if(Vtxwritehandles[1] == nullptr) ATH_MSG_ERROR("Vtxwritehandles[1] is null");
198  if(!BPhysPVCascadeTools::LinkVertices(CascadeLinksDecor, verticestoLink, Vtxwritehandles[0], cascadeVertices[1]))
199  ATH_MSG_ERROR("Error decorating with cascade vertices");
200 
201  // Identify the input Jpsi
202  const xAOD::Vertex* jpsiVertex = BPhysPVCascadeTools::FindVertex<2>(jpsiContainer, cascadeVertices[1]);
203  ATH_MSG_DEBUG("1 pt Jpsi tracks " << cascadeVertices[1]->trackParticle(0)->pt() << ", " << cascadeVertices[1]->trackParticle(1)->pt());
204  if (jpsiVertex) ATH_MSG_DEBUG("2 pt Jpsi tracks " << jpsiVertex->trackParticle(0)->pt() << ", " << jpsiVertex->trackParticle(1)->pt());
205 
206  // Identify the input V0
207  const xAOD::Vertex* v0Vertex = BPhysPVCascadeTools::FindVertex<2>(v0Container, cascadeVertices[0]);;
208  ATH_MSG_DEBUG("1 pt V0 tracks " << cascadeVertices[0]->trackParticle(0)->pt() << ", " << cascadeVertices[0]->trackParticle(1)->pt());
209  if (v0Vertex) ATH_MSG_DEBUG("2 pt V0 tracks " << v0Vertex->trackParticle(0)->pt() << ", " << v0Vertex->trackParticle(1)->pt());
210 
211  // Set links to input vertices
212  std::vector<const xAOD::Vertex*> jpsiVerticestoLink;
213  if (jpsiVertex) jpsiVerticestoLink.push_back(jpsiVertex);
214  else ATH_MSG_WARNING("Could not find linking Jpsi");
215  if(!BPhysPVCascadeTools::LinkVertices(JpsiLinksDecor, jpsiVerticestoLink, jpsiContainer, cascadeVertices[1]))
216  ATH_MSG_ERROR("Error decorating with Jpsi vertices");
217 
218  std::vector<const xAOD::Vertex*> v0VerticestoLink;
219  if (v0Vertex) v0VerticestoLink.push_back(v0Vertex);
220  else ATH_MSG_WARNING("Could not find linking V0");
221  if(!BPhysPVCascadeTools::LinkVertices(V0LinksDecor, v0VerticestoLink, v0Container, cascadeVertices[1]))
222  ATH_MSG_ERROR("Error decorating with V0 vertices");
223 
224  double mass_v0 = m_mass_ks;
225  double mass_b = m_mass_b0;
226  double mass_track = m_jpsi_trk_pdg == 11 ? m_mass_electron : m_mass_muon;
227  std::vector<double> massesJpsi(2, mass_track);
228  std::vector<double> massesV0;
229  std::vector<double> Masses(2, mass_track);
230  if (m_v0_pid == 310) {
231  massesV0.push_back(m_mass_pion);
232  massesV0.push_back(m_mass_pion);
233  Masses.push_back(m_mass_ks);
234  } else if (m_v0_pid == 3122) {
235  massesV0.push_back(m_mass_proton);
236  massesV0.push_back(m_mass_pion);
237  Masses.push_back(m_mass_lambda);
238  mass_v0 = m_mass_lambda;
240  } else if (m_v0_pid == -3122) {
241  massesV0.push_back(m_mass_pion);
242  massesV0.push_back(m_mass_proton);
243  Masses.push_back(m_mass_lambda);
244  mass_v0 = m_mass_lambda;
246  }
247 
248  // loop over candidates -- Don't apply PV_minNTracks requirement here
249  // because it may result in exclusion of the high-pt PV.
250  // get good PVs
251 
252  xAOD::BPhysHypoHelper vtx(m_hypoName, mainVertex);
253 
255 
256 
257  // Decorate main vertex
258  //
259  // 1.a) mass, mass error
260  BPHYS_CHECK( vtx.setMass(m_CascadeTools->invariantMass(moms[1])) );
261  BPHYS_CHECK( vtx.setMassErr(m_CascadeTools->invariantMassError(moms[1],x->getCovariance()[1])) );
262  // 1.b) pt and pT error (the default pt of mainVertex is != the pt of the full cascade fit!)
263  Pt_decor(*mainVertex) = m_CascadeTools->pT(moms[1]);
264  PtErr_decor(*mainVertex) = m_CascadeTools->pTError(moms[1],x->getCovariance()[1]);
265  // 1.c) chi2 and ndof (the default chi2 of mainVertex is != the chi2 of the full cascade fit!)
266  chi2_decor(*mainVertex) = x->fitChi2();
267  ndof_decor(*mainVertex) = x->nDoF();
268 
269  ATH_CHECK(helper.FillCandwithRefittedVertices(m_refitPV, pvContainer,
270  refPvContainer, &(*m_pvRefitter), m_PV_max, m_DoVertexType, x, 1, mass_b, vtx));
271 
272  // 4) decorate the main vertex with V0 vertex mass, pt, lifetime and lxy values (plus errors)
273  // V0 points to the main vertex, so lifetime and lxy are w.r.t the main vertex
274  Mass_svdecor(*mainVertex) = m_CascadeTools->invariantMass(moms[0]);
275  MassErr_svdecor(*mainVertex) = m_CascadeTools->invariantMassError(moms[0],x->getCovariance()[0]);
276  Pt_svdecor(*mainVertex) = m_CascadeTools->pT(moms[0]);
277  PtErr_svdecor(*mainVertex) = m_CascadeTools->pTError(moms[0],x->getCovariance()[0]);
278  Lxy_svdecor(*mainVertex) = m_CascadeTools->lxy(moms[0],cascadeVertices[0],cascadeVertices[1]);
279  LxyErr_svdecor(*mainVertex) = m_CascadeTools->lxyError(moms[0],x->getCovariance()[0],cascadeVertices[0],cascadeVertices[1]);
280  Tau_svdecor(*mainVertex) = m_CascadeTools->tau(moms[0],cascadeVertices[0],cascadeVertices[1]);
281  TauErr_svdecor(*mainVertex) = m_CascadeTools->tauError(moms[0],x->getCovariance()[0],cascadeVertices[0],cascadeVertices[1]);
282 
283  // Some checks in DEBUG mode
284  ATH_MSG_DEBUG("chi2 " << x->fitChi2()
285  << " chi2_1 " << m_V0Tools->chisq(cascadeVertices[0])
286  << " chi2_2 " << m_V0Tools->chisq(cascadeVertices[1])
287  << " vprob " << m_CascadeTools->vertexProbability(x->nDoF(),x->fitChi2()));
288  ATH_MSG_DEBUG("ndf " << x->nDoF() << " ndf_1 " << m_V0Tools->ndof(cascadeVertices[0]) << " ndf_2 " << m_V0Tools->ndof(cascadeVertices[1]));
289  ATH_MSG_DEBUG("V0Tools mass_v0 " << m_V0Tools->invariantMass(cascadeVertices[0],massesV0)
290  << " error " << m_V0Tools->invariantMassError(cascadeVertices[0],massesV0)
291  << " mass_J " << m_V0Tools->invariantMass(cascadeVertices[1],massesJpsi)
292  << " error " << m_V0Tools->invariantMassError(cascadeVertices[1],massesJpsi));
293  // masses and errors, using track masses assigned in the fit
294  double Mass_B = m_CascadeTools->invariantMass(moms[1]);
295  double Mass_V0 = m_CascadeTools->invariantMass(moms[0]);
296  double Mass_B_err = m_CascadeTools->invariantMassError(moms[1],x->getCovariance()[1]);
297  double Mass_V0_err = m_CascadeTools->invariantMassError(moms[0],x->getCovariance()[0]);
298  ATH_MSG_DEBUG("Mass_B " << Mass_B << " Mass_V0 " << Mass_V0);
299  ATH_MSG_DEBUG("Mass_B_err " << Mass_B_err << " Mass_V0_err " << Mass_V0_err);
300  double mprob_B = m_CascadeTools->massProbability(mass_b,Mass_B,Mass_B_err);
301  double mprob_V0 = m_CascadeTools->massProbability(mass_v0,Mass_V0,Mass_V0_err);
302  ATH_MSG_DEBUG("mprob_B " << mprob_B << " mprob_V0 " << mprob_V0);
303  // masses and errors, assigning user defined track masses
304  ATH_MSG_DEBUG("Mass_b " << m_CascadeTools->invariantMass(moms[1],Masses)
305  << " Mass_v0 " << m_CascadeTools->invariantMass(moms[0],massesV0));
306  ATH_MSG_DEBUG("Mass_b_err " << m_CascadeTools->invariantMassError(moms[1],x->getCovariance()[1],Masses)
307  << " Mass_v0_err " << m_CascadeTools->invariantMassError(moms[0],x->getCovariance()[0],massesV0));
308  ATH_MSG_DEBUG("pt_b " << m_CascadeTools->pT(moms[1])
309  << " pt_v " << m_CascadeTools->pT(moms[0])
310  << " pt_v0 " << m_V0Tools->pT(cascadeVertices[0]));
311  ATH_MSG_DEBUG("ptErr_b " << m_CascadeTools->pTError(moms[1],x->getCovariance()[1])
312  << " ptErr_v " << m_CascadeTools->pTError(moms[0],x->getCovariance()[0])
313  << " ptErr_v0 " << m_V0Tools->pTError(cascadeVertices[0]));
314  ATH_MSG_DEBUG("lxy_B " << m_V0Tools->lxy(cascadeVertices[1],primaryVertex) << " lxy_V " << m_V0Tools->lxy(cascadeVertices[0],cascadeVertices[1]));
315  ATH_MSG_DEBUG("lxy_b " << m_CascadeTools->lxy(moms[1],cascadeVertices[1],primaryVertex) << " lxy_v " << m_CascadeTools->lxy(moms[0],cascadeVertices[0],cascadeVertices[1]));
316  ATH_MSG_DEBUG("lxyErr_b " << m_CascadeTools->lxyError(moms[1],x->getCovariance()[1],cascadeVertices[1],primaryVertex)
317  << " lxyErr_v " << m_CascadeTools->lxyError(moms[0],x->getCovariance()[0],cascadeVertices[0],cascadeVertices[1])
318  << " lxyErr_v0 " << m_V0Tools->lxyError(cascadeVertices[0],cascadeVertices[1]));
319  ATH_MSG_DEBUG("tau_B " << m_CascadeTools->tau(moms[1],cascadeVertices[1],primaryVertex,mass_b)
320  << " tau_v0 " << m_V0Tools->tau(cascadeVertices[0],cascadeVertices[1],massesV0));
321  ATH_MSG_DEBUG("tau_b " << m_CascadeTools->tau(moms[1],cascadeVertices[1],primaryVertex)
322  << " tau_v " << m_CascadeTools->tau(moms[0],cascadeVertices[0],cascadeVertices[1])
323  << " tau_V " << m_CascadeTools->tau(moms[0],cascadeVertices[0],cascadeVertices[1],mass_v0));
324  ATH_MSG_DEBUG("tauErr_b " << m_CascadeTools->tauError(moms[1],x->getCovariance()[1],cascadeVertices[1],primaryVertex)
325  << " tauErr_v " << m_CascadeTools->tauError(moms[0],x->getCovariance()[0],cascadeVertices[0],cascadeVertices[1])
326  << " tauErr_v0 " << m_V0Tools->tauError(cascadeVertices[0],cascadeVertices[1],massesV0));
327  ATH_MSG_DEBUG("TauErr_b " << m_CascadeTools->tauError(moms[1],x->getCovariance()[1],cascadeVertices[1],primaryVertex,mass_b)
328  << " TauErr_v " << m_CascadeTools->tauError(moms[0],x->getCovariance()[0],cascadeVertices[0],cascadeVertices[1],mass_v0)
329  << " TauErr_v0 " << m_V0Tools->tauError(cascadeVertices[0],cascadeVertices[1],massesV0,mass_v0));
330 
331  ATH_MSG_DEBUG("CascadeTools main vert wrt PV " << " CascadeTools SV " << " V0Tools SV");
332  ATH_MSG_DEBUG("a0z " << m_CascadeTools->a0z(moms[1],cascadeVertices[1],primaryVertex)
333  << ", " << m_CascadeTools->a0z(moms[0],cascadeVertices[0],cascadeVertices[1])
334  << ", " << m_V0Tools->a0z(cascadeVertices[0],cascadeVertices[1]));
335  ATH_MSG_DEBUG("a0zErr " << m_CascadeTools->a0zError(moms[1],x->getCovariance()[1],cascadeVertices[1],primaryVertex)
336  << ", " << m_CascadeTools->a0zError(moms[0],x->getCovariance()[0],cascadeVertices[0],cascadeVertices[1])
337  << ", " << m_V0Tools->a0zError(cascadeVertices[0],cascadeVertices[1]));
338  ATH_MSG_DEBUG("a0xy " << m_CascadeTools->a0xy(moms[1],cascadeVertices[1],primaryVertex)
339  << ", " << m_CascadeTools->a0xy(moms[0],cascadeVertices[0],cascadeVertices[1])
340  << ", " << m_V0Tools->a0xy(cascadeVertices[0],cascadeVertices[1]));
341  ATH_MSG_DEBUG("a0xyErr " << m_CascadeTools->a0xyError(moms[1],x->getCovariance()[1],cascadeVertices[1],primaryVertex)
342  << ", " << m_CascadeTools->a0xyError(moms[0],x->getCovariance()[0],cascadeVertices[0],cascadeVertices[1])
343  << ", " << m_V0Tools->a0xyError(cascadeVertices[0],cascadeVertices[1]));
344  ATH_MSG_DEBUG("a0 " << m_CascadeTools->a0(moms[1],cascadeVertices[1],primaryVertex)
345  << ", " << m_CascadeTools->a0(moms[0],cascadeVertices[0],cascadeVertices[1])
346  << ", " << m_V0Tools->a0(cascadeVertices[0],cascadeVertices[1]));
347  ATH_MSG_DEBUG("a0Err " << m_CascadeTools->a0Error(moms[1],x->getCovariance()[1],cascadeVertices[1],primaryVertex)
348  << ", " << m_CascadeTools->a0Error(moms[0],x->getCovariance()[0],cascadeVertices[0],cascadeVertices[1])
349  << ", " << m_V0Tools->a0Error(cascadeVertices[0],cascadeVertices[1]));
350  ATH_MSG_DEBUG("x0 " << m_V0Tools->vtx(cascadeVertices[0]).x() << " y0 " << m_V0Tools->vtx(cascadeVertices[0]).y() << " z0 " << m_V0Tools->vtx(cascadeVertices[0]).z());
351  ATH_MSG_DEBUG("x1 " << m_V0Tools->vtx(cascadeVertices[1]).x() << " y1 " << m_V0Tools->vtx(cascadeVertices[1]).y() << " z1 " << m_V0Tools->vtx(cascadeVertices[1]).z());
352  ATH_MSG_DEBUG("X0 " << primaryVertex->x() << " Y0 " << primaryVertex->y() << " Z0 " << primaryVertex->z());
353  ATH_MSG_DEBUG("rxy0 " << m_V0Tools->rxy(cascadeVertices[0]) << " rxyErr0 " << m_V0Tools->rxyError(cascadeVertices[0]));
354  ATH_MSG_DEBUG("rxy1 " << m_V0Tools->rxy(cascadeVertices[1]) << " rxyErr1 " << m_V0Tools->rxyError(cascadeVertices[1]));
355  ATH_MSG_DEBUG("Rxy0 wrt PV " << m_V0Tools->rxy(cascadeVertices[0],primaryVertex) << " RxyErr0 wrt PV " << m_V0Tools->rxyError(cascadeVertices[0],primaryVertex));
356  ATH_MSG_DEBUG("Rxy1 wrt PV " << m_V0Tools->rxy(cascadeVertices[1],primaryVertex) << " RxyErr1 wrt PV " << m_V0Tools->rxyError(cascadeVertices[1],primaryVertex));
357  ATH_MSG_DEBUG("number of covariance matrices " << (x->getCovariance()).size());
358  //const Amg::MatrixX& cov30 = (cascadeVertices[0])->covariancePosition();
359  //const Amg::MatrixX& cov31 = (cascadeVertices[1])->covariancePosition();
360  //ATH_MSG_DEBUG("cov30 " << cov30);
361  //ATH_MSG_DEBUG("cov31 " << cov31);
362 
363 
364  } // loop over cascadeinfoContainer
365 
366  // Deleting cascadeinfo since this won't be stored.
367  // Vertices have been kept in m_cascadeOutputs and should be owned by their container
368  for (auto x : cascadeinfoContainer) delete x;
369 
370  return StatusCode::SUCCESS;
371  }
372 
373 
374  JpsiPlusV0Cascade::JpsiPlusV0Cascade(const std::string& t, const std::string& n, const IInterface* p) : AthAlgTool(t,n,p),
375  m_vertexContainerKey(""),
376  m_vertexV0ContainerKey(""),
377  m_cascadeOutputsKeys{ "JpsiPlusV0CascadeVtx1", "JpsiPlusV0CascadeVtx2" },
378  m_VxPrimaryCandidateName("PrimaryVertices"),
379  m_jpsiMassLower(0.0),
380  m_jpsiMassUpper(10000.0),
381  m_V0MassLower(0.0),
382  m_V0MassUpper(10000.0),
383  m_MassLower(0.0),
384  m_MassUpper(20000.0),
385  m_mass_electron( 0 ),
386  m_mass_muon ( 0 ),
387  m_mass_pion ( 0 ),
388  m_mass_proton ( 0 ),
389  m_mass_lambda ( 0 ),
390  m_mass_ks ( 0 ),
391  m_mass_jpsi ( 0 ),
392  m_mass_b0 ( 0 ),
393  m_mass_lambdaB( 0 ),
394  m_v0_pid(310),
395  m_constrV0(true),
396  m_constrJpsi(true),
397  m_iVertexFitter("Trk::TrkVKalVrtFitter"),
398  m_pvRefitter("Analysis::PrimaryVertexRefitter", this),
399  m_V0Tools("Trk::V0Tools"),
400  m_CascadeTools("DerivationFramework::CascadeTools")
401  {
402  declareProperty("JpsiVertices", m_vertexContainerKey);
403  declareProperty("V0Vertices", m_vertexV0ContainerKey);
404  declareProperty("VxPrimaryCandidateName", m_VxPrimaryCandidateName);
405  declareProperty("RefPVContainerName", m_refPVContainerName = "RefittedPrimaryVertices");
406  declareProperty("JpsiTrackContainerName", m_jpsiTrackContainerName = "InDetTrackParticles");
407  declareProperty("V0TrackContainerName", m_v0TrackContainerName = "InDetTrackParticles");
408  declareProperty("JpsiMassLowerCut", m_jpsiMassLower);
409  declareProperty("JpsiMassUpperCut", m_jpsiMassUpper);
410  declareProperty("V0MassLowerCut", m_V0MassLower);
411  declareProperty("V0MassUpperCut", m_V0MassUpper);
412  declareProperty("MassLowerCut", m_MassLower);
413  declareProperty("MassUpperCut", m_MassUpper);
414  declareProperty("HypothesisName", m_hypoName = "Bd");
415  declareProperty("V0Hypothesis", m_v0_pid);
416  declareProperty("ApplyV0MassConstraint", m_constrV0);
417  declareProperty("ApplyJpsiMassConstraint", m_constrJpsi);
418  declareProperty("JpsiTrackPDGID", m_jpsi_trk_pdg = 13);
419  declareProperty("RefitPV", m_refitPV = true);
420  declareProperty("MaxnPV", m_PV_max = 999);
421  declareProperty("MinNTracksInPV", m_PV_minNTracks = 0);
422  declareProperty("DoVertexType", m_DoVertexType = 7);
423  declareProperty("TrkVertexFitterTool", m_iVertexFitter);
424  declareProperty("PVRefitter", m_pvRefitter);
425  declareProperty("V0Tools", m_V0Tools);
426  declareProperty("CascadeTools", m_CascadeTools);
427  declareProperty("CascadeVertexCollections", m_cascadeOutputsKeys);
428  }
429 
431 
432  StatusCode JpsiPlusV0Cascade::performSearch(std::vector<Trk::VxCascadeInfo*> *cascadeinfoContainer) const
433  {
434  ATH_MSG_DEBUG( "JpsiPlusV0Cascade::performSearch" );
435  assert(cascadeinfoContainer!=nullptr);
436 
437  // Get TrackParticle containers (for setting links to the original tracks)
438  const xAOD::TrackParticleContainer *jpsiTrackContainer(nullptr);
439  CHECK(evtStore()->retrieve(jpsiTrackContainer , m_jpsiTrackContainerName ));
440  const xAOD::TrackParticleContainer *v0TrackContainer(nullptr);
441  CHECK(evtStore()->retrieve(v0TrackContainer , m_v0TrackContainerName ));
442 
443  // Get Jpsi container
444  const xAOD::VertexContainer *jpsiContainer(nullptr);
445  CHECK(evtStore()->retrieve(jpsiContainer , m_vertexContainerKey ));
446 
447  // Get V0 container
448  const xAOD::VertexContainer *v0Container(nullptr);
449  CHECK(evtStore()->retrieve(v0Container , m_vertexV0ContainerKey ));
450 
451  double mass_v0 = m_mass_ks;
452  double mass_tracks = m_jpsi_trk_pdg == 11 ? m_mass_electron : m_mass_muon;
453  std::vector<const xAOD::TrackParticle*> tracksJpsi;
454  std::vector<const xAOD::TrackParticle*> tracksV0;
455  std::vector<double> massesJpsi(2, mass_tracks);
456  std::vector<double> massesV0;
457  std::vector<double> Masses(2, mass_tracks);
458  if (m_v0_pid == 310) {
459  massesV0.push_back(m_mass_pion);
460  massesV0.push_back(m_mass_pion);
461  Masses.push_back(m_mass_ks);
462  } else if (m_v0_pid == 3122) {
463  massesV0.push_back(m_mass_proton);
464  massesV0.push_back(m_mass_pion);
465  mass_v0 = m_mass_lambda;
466  Masses.push_back(m_mass_lambda);
467  } else if (m_v0_pid == -3122) {
468  massesV0.push_back(m_mass_pion);
469  massesV0.push_back(m_mass_proton);
470  mass_v0 = m_mass_lambda;
471  Masses.push_back(m_mass_lambda);
472  }
473  const EventContext& ctx = Gaudi::Hive::currentContext();
474  std::vector<const xAOD::TrackParticleContainer*> trackCols;
475  for(const auto &str : m_RelinkContainers){
477  trackCols.push_back(handle.cptr());
478  }
479 
480 
481  for(auto jpsi : *jpsiContainer) { //Iterate over Jpsi vertices
482 
483  size_t jpsiTrkNum = jpsi->nTrackParticles();
484  tracksJpsi.clear();
485  for( unsigned int it=0; it<jpsiTrkNum; it++) tracksJpsi.push_back(jpsi->trackParticle(it));
486 
487  if (tracksJpsi.size() != 2 || massesJpsi.size() != 2 ) {
488  ATH_MSG_INFO("problems with Jpsi input");
489  }
490  double mass_Jpsi = m_V0Tools->invariantMass(jpsi,massesJpsi);
491  ATH_MSG_DEBUG("Jpsi mass " << mass_Jpsi);
492  if (mass_Jpsi < m_jpsiMassLower || mass_Jpsi > m_jpsiMassUpper) {
493  ATH_MSG_DEBUG(" Original Jpsi candidate rejected by the mass cut: mass = "
494  << mass_Jpsi << " != (" << m_jpsiMassLower << ", " << m_jpsiMassUpper << ")" );
495  continue;
496  }
497 
498  for(auto v0 : *v0Container) { //Iterate over V0 vertices
499 
500  size_t v0TrkNum = v0->nTrackParticles();
501  tracksV0.clear();
502  for( unsigned int it=0; it<v0TrkNum; it++) tracksV0.push_back(v0->trackParticle(it));
503  if (tracksV0.size() != 2 || massesV0.size() != 2 ) {
504  ATH_MSG_INFO("problems with V0 input");
505  }
506  double mass_V0 = m_V0Tools->invariantMass(v0,massesV0);
507  ATH_MSG_DEBUG("V0 mass " << mass_V0);
508  if (mass_V0 < m_V0MassLower || mass_V0 > m_V0MassUpper) {
509  ATH_MSG_DEBUG(" Original V0 candidate rejected by the mass cut: mass = "
510  << mass_V0 << " != (" << m_V0MassLower << ", " << m_V0MassUpper << ")" );
511  continue;
512  }
513  ATH_MSG_DEBUG("using tracks" << tracksJpsi[0] << ", " << tracksJpsi[1] << ", " << tracksV0[0] << ", " << tracksV0[1]);
514  if(!BPhysPVCascadeTools::uniqueCollection(tracksJpsi, tracksV0)) continue;
515 
516 
517  //if (std::find(trackContainer->begin(), trackContainer->end(), tracksJpsi[0]) == trackContainer->end()) {
518  // ATH_MSG_ERROR("Track is not in standard container");
519  //} else {
520  // ATH_MSG_DEBUG("Track " << tracksJpsi[0] << " is at position " << std::distance(trackContainer->begin(), std::find(trackContainer->begin(), trackContainer->end(), tracksJpsi[0])) );
521  //}
522  //ATH_MSG_DEBUG("using tracks " << tracksJpsi[0] << ", " << tracksJpsi[1] << ", " << tracksV0[0] << ", " << tracksV0[1]);
523 
524  // Apply the user's settings to the fitter
525  // Reset
526  std::unique_ptr<Trk::IVKalState> state = m_iVertexFitter->makeState();
527  // Robustness
528  int robustness = 0;
529  m_iVertexFitter->setRobustness(robustness, *state);
530  // Build up the topology
531  // Vertex list
532  std::vector<Trk::VertexID> vrtList;
533  // V0 vertex
534  Trk::VertexID vID;
535  if (m_constrV0) {
536  vID = m_iVertexFitter->startVertex(tracksV0,massesV0,*state, mass_v0);
537  } else {
538  vID = m_iVertexFitter->startVertex(tracksV0,massesV0, *state);
539  }
540  vrtList.push_back(vID);
541  // B vertex including Jpsi
542  Trk::VertexID vID2 = m_iVertexFitter->nextVertex(tracksJpsi,massesJpsi,vrtList, *state);
543  if (m_constrJpsi) {
544  std::vector<Trk::VertexID> cnstV;
545  cnstV.clear();
546  if ( !m_iVertexFitter->addMassConstraint(vID2,tracksJpsi,cnstV,*state, m_mass_jpsi).isSuccess() ) {
547  ATH_MSG_WARNING("addMassConstraint failed");
548  //return StatusCode::FAILURE;
549  }
550  }
551  // Do the work
552  std::unique_ptr<Trk::VxCascadeInfo> result(m_iVertexFitter->fitCascade(*state));
553 
554  if (result != NULL) {
555  // reset links to original tracks
556  if(trackCols.empty()) BPhysPVCascadeTools::PrepareVertexLinks(result.get(), v0TrackContainer);
557  else BPhysPVCascadeTools::PrepareVertexLinks(result.get(), trackCols);
558 
559  ATH_MSG_DEBUG("storing tracks " << ((result->vertices())[0])->trackParticle(0) << ", "
560  << ((result->vertices())[0])->trackParticle(1) << ", "
561  << ((result->vertices())[1])->trackParticle(0) << ", "
562  << ((result->vertices())[1])->trackParticle(1));
563 
564  // necessary to prevent memory leak
565  result->setSVOwnership(true);
566  const std::vector< std::vector<TLorentzVector> > &moms = result->getParticleMoms();
567  if(moms.size() < 2){
568  ATH_MSG_FATAL("Incorrect size " << __FILE__ << __LINE__ );
569  return StatusCode::FAILURE;
570  }
571  double mass = m_CascadeTools->invariantMass(moms[1]);
572  if (mass >= m_MassLower && mass <= m_MassUpper) {
573 
574  cascadeinfoContainer->push_back(result.release());
575  } else {
576  ATH_MSG_DEBUG("Candidate rejected by the mass cut: mass = "
577  << mass << " != (" << m_MassLower << ", " << m_MassUpper << ")" );
578  }
579  }
580 
581  } //Iterate over V0 vertices
582 
583  } //Iterate over Jpsi vertices
584 
585  ATH_MSG_DEBUG("cascadeinfoContainer size " << cascadeinfoContainer->size());
586 
587  return StatusCode::SUCCESS;
588  }
589 
590 
591 
592 }
593 
594 
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
xAOD::BPhysHypoHelper::setMass
bool setMass(const float val)
Set given invariant mass and its error.
Definition: BPhysHypoHelper.cxx:49
xAOD::TrackParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TrackParticle_v1.cxx:73
xAOD::Vertex_v1::x
float x() const
Returns the x position.
V0Tools.h
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
DerivationFramework::JpsiPlusV0Cascade::~JpsiPlusV0Cascade
~JpsiPlusV0Cascade()
Definition: JpsiPlusV0Cascade.cxx:430
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
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
Trk::VxCascadeInfo
Definition: VxCascadeInfo.h:75
Trk::VertexID
int VertexID
Definition: IVertexCascadeFitter.h:23
DerivationFramework::JpsiPlusV0Cascade::m_jpsiMassLower
double m_jpsiMassLower
Definition: JpsiPlusV0Cascade.h:48
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
DerivationFramework::JpsiPlusV0Cascade::m_iVertexFitter
ToolHandle< Trk::TrkVKalVrtFitter > m_iVertexFitter
Definition: JpsiPlusV0Cascade.h:69
SG::ReadHandle::cptr
const_pointer_type cptr()
Dereference the pointer.
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
DerivationFramework::JpsiPlusV0Cascade::m_PV_minNTracks
size_t m_PV_minNTracks
Definition: JpsiPlusV0Cascade.h:84
DerivationFramework::JpsiPlusV0Cascade::m_MassLower
double m_MassLower
Definition: JpsiPlusV0Cascade.h:52
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
DerivationFramework::JpsiPlusV0Cascade::m_mass_lambda
double m_mass_lambda
Definition: JpsiPlusV0Cascade.h:59
DerivationFramework::BPhysPVCascadeTools::getParticleMass
static double getParticleMass(const HepPDT::ParticleDataTable *pdt, int pdg)
Definition: BPhysPVCascadeTools.cxx:491
DerivationFramework::JpsiPlusV0Cascade::m_PV_max
int m_PV_max
Definition: JpsiPlusV0Cascade.h:82
skel.it
it
Definition: skel.GENtoEVGEN.py:423
test_pyathena.pt
pt
Definition: test_pyathena.py:11
DerivationFramework::JpsiPlusV0Cascade::m_v0_pid
int m_v0_pid
Definition: JpsiPlusV0Cascade.h:64
DerivationFramework::JpsiPlusV0Cascade::m_mass_lambdaB
double m_mass_lambdaB
Definition: JpsiPlusV0Cascade.h:63
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
DerivationFramework::JpsiPlusV0Cascade::m_mass_ks
double m_mass_ks
Definition: JpsiPlusV0Cascade.h:60
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::JpsiPlusV0Cascade::m_constrV0
bool m_constrV0
Definition: JpsiPlusV0Cascade.h:65
xAOD::VertexContainer
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
Definition: VertexContainer.h:14
x
#define x
DerivationFramework::JpsiPlusV0Cascade::m_DoVertexType
int m_DoVertexType
Definition: JpsiPlusV0Cascade.h:83
DerivationFramework::JpsiPlusV0Cascade::m_cascadeOutputsKeys
std::vector< std::string > m_cascadeOutputsKeys
Definition: JpsiPlusV0Cascade.h:44
dqt_zlumi_pandas.mass
mass
Definition: dqt_zlumi_pandas.py:170
DerivationFramework::JpsiPlusV0Cascade::m_CascadeTools
ToolHandle< DerivationFramework::CascadeTools > m_CascadeTools
Definition: JpsiPlusV0Cascade.h:72
TrkVKalVrtFitter.h
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
DerivationFramework::JpsiPlusV0Cascade::m_mass_pion
double m_mass_pion
Definition: JpsiPlusV0Cascade.h:57
DerivationFramework::JpsiPlusV0Cascade::m_jpsi_trk_pdg
int m_jpsi_trk_pdg
Definition: JpsiPlusV0Cascade.h:74
DerivationFramework::JpsiPlusV0Cascade::m_mass_muon
double m_mass_muon
Definition: JpsiPlusV0Cascade.h:56
DerivationFramework::JpsiPlusV0Cascade::initialize
StatusCode initialize() override
Definition: JpsiPlusV0Cascade.cxx:29
runBeamSpotCalibration.helper
helper
Definition: runBeamSpotCalibration.py:112
DerivationFramework::JpsiPlusV0Cascade::m_constrJpsi
bool m_constrJpsi
Definition: JpsiPlusV0Cascade.h:66
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
JpsiPlusV0Cascade.h
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
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
DerivationFramework::JpsiPlusV0Cascade::m_mass_jpsi
double m_mass_jpsi
Definition: JpsiPlusV0Cascade.h:61
SG::Decorator
Helper class to provide type-safe access to aux data.
Definition: Decorator.h:58
xAOD::VertexAuxContainer
VertexAuxContainer_v1 VertexAuxContainer
Definition of the current jet auxiliary container.
Definition: VertexAuxContainer.h:19
parseMapping.v0
def v0
Definition: parseMapping.py:149
lumiFormat.i
int i
Definition: lumiFormat.py:92
DerivationFramework::JpsiPlusV0Cascade::m_VxPrimaryCandidateName
std::string m_VxPrimaryCandidateName
Name of primary vertex container.
Definition: JpsiPlusV0Cascade.h:46
beamspotman.n
n
Definition: beamspotman.py:731
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
BPhysHypoHelper.h
: B-physcis xAOD helpers.
DerivationFramework::JpsiPlusV0Cascade::m_v0TrackContainerName
Gaudi::Property< std::string > m_v0TrackContainerName
Definition: JpsiPlusV0Cascade.h:78
DerivationFramework::BPhysPVCascadeTools::PrepareVertexLinks
static void PrepareVertexLinks(Trk::VxCascadeInfo *result, const xAOD::TrackParticleContainer *importedTrackCollection)
Definition: BPhysPVCascadeTools.cxx:204
MUON
xAOD::Muon MUON
D3PD INCLUDES.
Definition: TileCellFillerTool.h:37
DerivationFramework::JpsiPlusV0Cascade::addBranches
virtual StatusCode addBranches() const override
Pass the thinning service
Definition: JpsiPlusV0Cascade.cxx:80
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
DerivationFramework::JpsiPlusV0Cascade::m_refitPV
bool m_refitPV
Definition: JpsiPlusV0Cascade.h:75
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
DerivationFramework::BPhysPVCascadeTools::uniqueCollection
static bool uniqueCollection(const std::vector< const xAOD::TrackParticle * > &)
Definition: BPhysPVCascadeTools.cxx:443
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
DerivationFramework::TrackBag
std::vector< const xAOD::TrackParticle * > TrackBag
Definition: BPhysAddMuonBasedInvMass.h:32
xAOD::Vertex_v1::z
float z() const
Returns the z position.
DerivationFramework
THE reconstruction tool.
Definition: ParticleSortingAlg.h:24
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
DerivationFramework::VertexLink
ElementLink< xAOD::VertexContainer > VertexLink
Definition: Cascade3Plus1.cxx:23
DerivationFramework::JpsiPlusV0Cascade::m_jpsiTrackContainerName
Gaudi::Property< std::string > m_jpsiTrackContainerName
Definition: JpsiPlusV0Cascade.h:77
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
BPhysPVCascadeTools.h
DerivationFramework::JpsiPlusV0Cascade::m_vertexContainerKey
std::string m_vertexContainerKey
Definition: JpsiPlusV0Cascade.h:42
DerivationFramework::JpsiPlusV0Cascade::m_V0Tools
ToolHandle< Trk::V0Tools > m_V0Tools
Definition: JpsiPlusV0Cascade.h:71
DerivationFramework::JpsiPlusV0Cascade::m_pvRefitter
ToolHandle< Analysis::PrimaryVertexRefitter > m_pvRefitter
Definition: JpsiPlusV0Cascade.h:70
DerivationFramework::JpsiPlusV0Cascade::m_V0MassUpper
double m_V0MassUpper
Definition: JpsiPlusV0Cascade.h:51
DerivationFramework::JpsiPlusV0Cascade::m_eventInfo_key
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfo_key
Definition: JpsiPlusV0Cascade.h:68
DerivationFramework::JpsiPlusV0Cascade::m_mass_proton
double m_mass_proton
Definition: JpsiPlusV0Cascade.h:58
DerivationFramework::JpsiPlusV0Cascade::m_MassUpper
double m_MassUpper
Definition: JpsiPlusV0Cascade.h:53
DerivationFramework::BPhysPVCascadeTools
Definition: BPhysPVCascadeTools.h:34
DerivationFramework::JpsiPlusV0Cascade::m_mass_b0
double m_mass_b0
Definition: JpsiPlusV0Cascade.h:62
CascadeTools.h
DerivationFramework::JpsiPlusV0Cascade::m_mass_electron
double m_mass_electron
Definition: JpsiPlusV0Cascade.h:55
IVertexFitter.h
EventInfo.h
VxCascadeInfo.h
mc.mass_b
mass_b
Definition: mc.PhPy8EG_A14NNPDF23_gg4l_example.py:21
DerivationFramework::VertexLinkVector
std::vector< VertexLink > VertexLinkVector
Definition: Cascade3Plus1.cxx:24
VertexContainer.h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
DerivationFramework::JpsiPlusV0Cascade::m_RelinkContainers
SG::ReadHandleKeyArray< xAOD::TrackParticleContainer > m_RelinkContainers
Definition: JpsiPlusV0Cascade.h:93
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
DerivationFramework::JpsiPlusV0Cascade::m_hypoName
std::string m_hypoName
name of the mass hypothesis.
Definition: JpsiPlusV0Cascade.h:79
DerivationFramework::JpsiPlusV0Cascade::performSearch
StatusCode performSearch(std::vector< Trk::VxCascadeInfo * > *cascadeinfoContainer) const
Definition: JpsiPlusV0Cascade.cxx:432
DerivationFramework::JpsiPlusV0Cascade::m_V0MassLower
double m_V0MassLower
Definition: JpsiPlusV0Cascade.h:50
xAOD::Vertex_v1::y
float y() const
Returns the y position.
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
DerivationFramework::JpsiPlusV0Cascade::m_vertexV0ContainerKey
std::string m_vertexV0ContainerKey
Definition: JpsiPlusV0Cascade.h:43
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
str
Definition: BTagTrackIpAccessor.cxx:11
DerivationFramework::JpsiPlusV0Cascade::JpsiPlusV0Cascade
JpsiPlusV0Cascade(const std::string &t, const std::string &n, const IInterface *p)
Definition: JpsiPlusV0Cascade.cxx:374
AthAlgTool
Definition: AthAlgTool.h:26
DerivationFramework::JpsiPlusV0Cascade::m_refPVContainerName
Gaudi::Property< std::string > m_refPVContainerName
Definition: JpsiPlusV0Cascade.h:76
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
HepMCHelpers.h
xAOD::BPhysHypoHelper::setMassErr
bool setMassErr(const float val)
invariant mass error
Definition: BPhysHypoHelper.cxx:54
VertexAuxContainer.h
DerivationFramework::JpsiPlusV0Cascade::m_jpsiMassUpper
double m_jpsiMassUpper
Definition: JpsiPlusV0Cascade.h:49