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::JpsiPlusDs1Cascade Class Reference

#include <JpsiPlusDs1Cascade.h>

Inheritance diagram for DerivationFramework::JpsiPlusDs1Cascade:
Collaboration diagram for DerivationFramework::JpsiPlusDs1Cascade:

Public Member Functions

 JpsiPlusDs1Cascade (const std::string &t, const std::string &n, const IInterface *p)
 
 ~JpsiPlusDs1Cascade ()
 
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

double getParticleMass (int particlecode) const
 
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_vertexD0ContainerKey
 
std::string m_vertexK0ContainerKey
 
std::vector< std::string > m_cascadeOutputsKeys
 
std::string m_VxPrimaryCandidateName
 Name of primary vertex container. More...
 
double m_jpsiMassLower
 
double m_jpsiMassUpper
 
double m_jpsipiMassLower
 
double m_jpsipiMassUpper
 
double m_D0MassLower
 
double m_D0MassUpper
 
double m_K0MassLower
 
double m_K0MassUpper
 
double m_DstMassLower
 
double m_DstMassUpper
 
double m_MassLower
 
double m_MassUpper
 
double m_vtx0MassHypo
 
double m_vtx1MassHypo
 
double m_vtx2MassHypo
 
double m_vtx0Daug1MassHypo
 
double m_vtx0Daug2MassHypo
 
double m_vtx0Daug3MassHypo
 
double m_vtx1Daug1MassHypo
 
double m_vtx1Daug2MassHypo
 
double m_vtx2Daug1MassHypo
 
double m_vtx2Daug2MassHypo
 
const HepPDT::ParticleDataTable * m_particleDataTable
 
double m_mass_jpsi
 
int m_Dx_pid
 
bool m_constrD0
 
bool m_constrK0
 
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
 
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 39 of file JpsiPlusDs1Cascade.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

◆ JpsiPlusDs1Cascade()

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

Definition at line 506 of file JpsiPlusDs1Cascade.cxx.

506  : AthAlgTool(t,n,p),
510  m_cascadeOutputsKeys{ "JpsiPlusDs1CascadeVtx1", "JpsiPlusDs1CascadeVtx2", "JpsiPlusDs1CascadeVtx3" },
511  m_VxPrimaryCandidateName("PrimaryVertices"),
512  m_jpsiMassLower(0.0),
513  m_jpsiMassUpper(10000.0),
514  m_jpsipiMassLower(0.0),
515  m_jpsipiMassUpper(10000.0),
516  m_D0MassLower(0.0),
517  m_D0MassUpper(10000.0),
518  m_K0MassLower(0.0),
519  m_K0MassUpper(10000.0),
520  m_DstMassLower(0.0),
521  m_DstMassUpper(10000.0),
522  m_MassLower(0.0),
523  m_MassUpper(20000.0),
524  m_vtx0MassHypo(-1),
525  m_vtx1MassHypo(-1),
526  m_vtx2MassHypo(-1),
534  m_particleDataTable(nullptr),
535  m_mass_jpsi(-1),
536  m_Dx_pid(421),
537  m_constrD0(true),
538  m_constrK0(true),
539  m_constrJpsi(true),
540  m_chi2cut(-1.0),
541  m_iVertexFitter("Trk::TrkVKalVrtFitter"),
542  m_pvRefitter("Analysis::PrimaryVertexRefitter"),
543  m_V0Tools("Trk::V0Tools"),
544  m_CascadeTools("DerivationFramework::CascadeTools")
545  {
546  declareProperty("JpsipiVertices", m_vertexContainerKey);
549  declareProperty("VxPrimaryCandidateName", m_VxPrimaryCandidateName);
550  declareProperty("RefPVContainerName", m_refPVContainerName = "RefittedPrimaryVertices");
551  declareProperty("JpsiMassLowerCut", m_jpsiMassLower);
552  declareProperty("JpsiMassUpperCut", m_jpsiMassUpper);
553  declareProperty("JpsipiMassLowerCut", m_jpsipiMassLower);
554  declareProperty("JpsipiMassUpperCut", m_jpsipiMassUpper);
555  declareProperty("D0MassLowerCut", m_D0MassLower);
556  declareProperty("D0MassUpperCut", m_D0MassUpper);
557  declareProperty("K0MassLowerCut", m_K0MassLower);
558  declareProperty("K0MassUpperCut", m_K0MassUpper);
559  declareProperty("DstMassLowerCut", m_DstMassLower);
560  declareProperty("DstMassUpperCut", m_DstMassUpper);
561  declareProperty("MassLowerCut", m_MassLower);
562  declareProperty("MassUpperCut", m_MassUpper);
563  declareProperty("HypothesisName", m_hypoName = "Bc");
564  declareProperty("Vtx0MassHypo", m_vtx0MassHypo);
565  declareProperty("Vtx1MassHypo", m_vtx1MassHypo);
566  declareProperty("Vtx2MassHypo", m_vtx2MassHypo);
567  declareProperty("Vtx0Daug1MassHypo", m_vtx0Daug1MassHypo);
568  declareProperty("Vtx0Daug2MassHypo", m_vtx0Daug2MassHypo);
569  declareProperty("Vtx0Daug3MassHypo", m_vtx0Daug3MassHypo);
570  declareProperty("Vtx1Daug1MassHypo", m_vtx1Daug1MassHypo);
571  declareProperty("Vtx1Daug2MassHypo", m_vtx1Daug2MassHypo);
572  declareProperty("Vtx2Daug1MassHypo", m_vtx2Daug1MassHypo);
573  declareProperty("Vtx2Daug2MassHypo", m_vtx2Daug2MassHypo);
574  declareProperty("JpsiMass", m_mass_jpsi);
575  declareProperty("DxHypothesis", m_Dx_pid);
576  declareProperty("ApplyD0MassConstraint", m_constrD0);
577  declareProperty("ApplyK0MassConstraint", m_constrK0);
578  declareProperty("ApplyJpsiMassConstraint", m_constrJpsi);
579  declareProperty("Chi2Cut", m_chi2cut);
580  declareProperty("RefitPV", m_refitPV = true);
581  declareProperty("MaxnPV", m_PV_max = 999);
582  declareProperty("MinNTracksInPV", m_PV_minNTracks = 0);
583  declareProperty("DoVertexType", m_DoVertexType = 7);
584  declareProperty("TrkVertexFitterTool", m_iVertexFitter);
585  declareProperty("PVRefitter", m_pvRefitter);
586  declareProperty("V0Tools", m_V0Tools);
587  declareProperty("CascadeTools", m_CascadeTools);
588  declareProperty("CascadeVertexCollections", m_cascadeOutputsKeys);
589  }

◆ ~JpsiPlusDs1Cascade()

DerivationFramework::JpsiPlusDs1Cascade::~JpsiPlusDs1Cascade ( )

Definition at line 591 of file JpsiPlusDs1Cascade.cxx.

591 { }

Member Function Documentation

◆ addBranches()

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

Pass the thinning service

Implements DerivationFramework::IAugmentationTool.

Definition at line 69 of file JpsiPlusDs1Cascade.cxx.

70  {
71  std::vector<Trk::VxCascadeInfo*> cascadeinfoContainer;
72  constexpr int topoN = 3;
73  std::array<xAOD::VertexContainer*, topoN> Vtxwritehandles;
74  std::array<xAOD::VertexAuxContainer*, topoN> Vtxwritehandlesaux;
75  if(m_cascadeOutputsKeys.size() !=topoN) { ATH_MSG_FATAL("Incorrect number of VtxContainers"); return StatusCode::FAILURE; }
76 
77  for(int i =0; i<topoN;i++){
78  Vtxwritehandles[i] = new xAOD::VertexContainer();
79  Vtxwritehandlesaux[i] = new xAOD::VertexAuxContainer();
80  Vtxwritehandles[i]->setStore(Vtxwritehandlesaux[i]);
81  ATH_CHECK(evtStore()->record(Vtxwritehandles[i] , m_cascadeOutputsKeys[i] ));
82  ATH_CHECK(evtStore()->record(Vtxwritehandlesaux[i], m_cascadeOutputsKeys[i] + "Aux."));
83  }
84 
85  //----------------------------------------------------
86  // retrieve primary vertices
87  //----------------------------------------------------
88  const xAOD::Vertex * primaryVertex(nullptr);
89  const xAOD::VertexContainer *pvContainer(nullptr);
91  ATH_MSG_DEBUG("Found " << m_VxPrimaryCandidateName << " in StoreGate!");
92 
93  if (pvContainer->size()==0){
94  ATH_MSG_WARNING("You have no primary vertices: " << pvContainer->size());
95  return StatusCode::RECOVERABLE;
96  } else {
97  primaryVertex = (*pvContainer)[0];
98  }
99 
100  //----------------------------------------------------
101  // Try to retrieve refitted primary vertices
102  //----------------------------------------------------
103  xAOD::VertexContainer* refPvContainer = nullptr;
104  xAOD::VertexAuxContainer* refPvAuxContainer = nullptr;
105  if (m_refitPV) {
106  if (evtStore()->contains<xAOD::VertexContainer>(m_refPVContainerName)) {
107  // refitted PV container exists. Get it from the store gate
108  ATH_CHECK(evtStore()->retrieve(refPvContainer , m_refPVContainerName ));
109  ATH_CHECK(evtStore()->retrieve(refPvAuxContainer, m_refPVContainerName + "Aux."));
110  } else {
111  // refitted PV container does not exist. Create a new one.
112  refPvContainer = new xAOD::VertexContainer;
113  refPvAuxContainer = new xAOD::VertexAuxContainer;
114  refPvContainer->setStore(refPvAuxContainer);
115  ATH_CHECK(evtStore()->record(refPvContainer , m_refPVContainerName));
116  ATH_CHECK(evtStore()->record(refPvAuxContainer, m_refPVContainerName+"Aux."));
117  }
118  }
119 
120  ATH_CHECK(performSearch(&cascadeinfoContainer));
121 
123  if(not evt.isValid()) ATH_MSG_ERROR("Cannot Retrieve " << m_eventInfo_key.key() );
124  BPhysPVCascadeTools helper(&(*m_CascadeTools), evt.cptr());
125  helper.SetMinNTracksInPV(m_PV_minNTracks);
126 
127  // Decorators for the main vertex: chi2, ndf, pt and pt error, plus the D0, K0 vertex variables
128  SG::AuxElement::Decorator<VertexLinkVector> CascadeV1LinksDecor("CascadeVertex1Links");
129  SG::AuxElement::Decorator<VertexLinkVector> CascadeV2LinksDecor("CascadeVertex2Links");
130  SG::AuxElement::Decorator<VertexLinkVector> JpsipiLinksDecor("JpsipiVertexLinks");
131  SG::AuxElement::Decorator<VertexLinkVector> D0LinksDecor("D0VertexLinks");
132  SG::AuxElement::Decorator<VertexLinkVector> K0LinksDecor("K0VertexLinks");
133  SG::AuxElement::Decorator<float> chi2_decor("ChiSquared");
134  SG::AuxElement::Decorator<float> ndof_decor("NumberDoF");
135  SG::AuxElement::Decorator<float> Pt_decor("Pt");
136  SG::AuxElement::Decorator<float> PtErr_decor("PtErr");
137  SG::AuxElement::Decorator<float> Mass_svdecor("D0_mass");
138  SG::AuxElement::Decorator<float> MassErr_svdecor("D0_massErr");
139  SG::AuxElement::Decorator<float> Pt_svdecor("D0_Pt");
140  SG::AuxElement::Decorator<float> PtErr_svdecor("D0_PtErr");
141  SG::AuxElement::Decorator<float> Lxy_svdecor("D0_Lxy");
142  SG::AuxElement::Decorator<float> LxyErr_svdecor("D0_LxyErr");
143  SG::AuxElement::Decorator<float> Tau_svdecor("D0_Tau");
144  SG::AuxElement::Decorator<float> TauErr_svdecor("D0_TauErr");
145 
146  SG::AuxElement::Decorator<float> Mass_sv2decor("K0_mass");
147  SG::AuxElement::Decorator<float> MassErr_sv2decor("K0_massErr");
148  SG::AuxElement::Decorator<float> Pt_sv2decor("K0_Pt");
149  SG::AuxElement::Decorator<float> PtErr_sv2decor("K0_PtErr");
150  SG::AuxElement::Decorator<float> Lxy_sv2decor("K0_Lxy");
151  SG::AuxElement::Decorator<float> LxyErr_sv2decor("K0_LxyErr");
152  SG::AuxElement::Decorator<float> Tau_sv2decor("K0_Tau");
153  SG::AuxElement::Decorator<float> TauErr_sv2decor("K0_TauErr");
154 
155  SG::AuxElement::Decorator<float> MassJpsi_decor("Jpsi_mass");
156  SG::AuxElement::Decorator<float> MassPiD0_decor("PiD0_mass");
157  SG::AuxElement::Decorator<float> MassPiD0K0_decor("PiD0K0_mass");
158 
159  SG::AuxElement::Decorator<float> MassMumu_decor("Mumu_mass");
160  SG::AuxElement::Decorator<float> MassKpi_svdecor("Kpi_mass");
161  SG::AuxElement::Decorator<float> MassPipi_sv2decor("Pipi_mass");
162 
163  ATH_MSG_DEBUG("cascadeinfoContainer size " << cascadeinfoContainer.size());
164 
165  // Get Jpsi+pi container and identify the input Jpsi+pi
166  const xAOD::VertexContainer *jpsipiContainer(nullptr);
167  ATH_CHECK(evtStore()->retrieve(jpsipiContainer , m_vertexContainerKey ));
168  // Get D0 container and identify the input D0
169  const xAOD::VertexContainer *d0Container(nullptr);
171  // Get K0 container and identify the input K0
172  const xAOD::VertexContainer *k0Container(nullptr);
174 
175  for (Trk::VxCascadeInfo* x : cascadeinfoContainer) {
176  if(x==nullptr) {
177  ATH_MSG_ERROR("cascadeinfoContainer is null");
178  //x is dereferenced if we pass this
179  return StatusCode::FAILURE;
180  }
181 
182  // the cascade fitter returns:
183  // std::vector<xAOD::Vertex*>, each xAOD::Vertex contains the refitted track parameters (perigee at the vertex position)
184  // vertices[iv] the links to the original TPs and a covariance of size 3+5*NTRK; the chi2 of the total fit
185  // is split between the cascade vertices as per track contribution
186  // std::vector< std::vector<TLorentzVector> >, each std::vector<TLorentzVector> contains the refitted momenta (TLorentzVector)
187  // momenta[iv][...] of all tracks in the corresponding vertex, including any pseudotracks (from cascade vertices)
188  // originating in this vertex; the masses are as assigned in the cascade fit
189  // std::vector<Amg::MatrixX>, the corresponding covariance matrices in momentum space
190  // covariance[iv]
191  // int nDoF, double Chi2
192  //
193  // the invariant mass, pt, lifetime etc. errors should be calculated using the covariance matrices in momentum space as these
194  // take into account the full track-track and track-vertex correlations
195  //
196  // 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.
197  // The covariance terms between the two vertices are not stored. In momentum space momenta[0] contains the 2 V0 tracks,
198  // their momenta add up to the momentum of the 3rd track in momenta[1], the first two being the Jpsi tracks
199 
200  const std::vector<xAOD::Vertex*> &cascadeVertices = x->vertices();
201  if(cascadeVertices.size()!=topoN)
202  ATH_MSG_ERROR("Incorrect number of vertices");
203  if(cascadeVertices[0] == nullptr || cascadeVertices[1] == nullptr || cascadeVertices[2] == nullptr) ATH_MSG_ERROR("Error null vertex");
204  // Keep vertices (bear in mind that they come in reverse order!)
205  for(int i =0;i<topoN;i++) Vtxwritehandles[i]->push_back(cascadeVertices[i]);
206 
207  x->setSVOwnership(false); // Prevent Container from deleting vertices
208  const auto mainVertex = cascadeVertices[2]; // this is the B_c+/- vertex
209  const std::vector< std::vector<TLorentzVector> > &moms = x->getParticleMoms();
210 
211  // Set links to cascade vertices
212  std::vector<const xAOD::Vertex*> verticestoLink;
213  verticestoLink.push_back(cascadeVertices[0]);
214  //if(Vtxwritehandles[1] == nullptr) ATH_MSG_ERROR("Vtxwritehandles[1] is null");
215  if(Vtxwritehandles[2] == nullptr) ATH_MSG_ERROR("Vtxwritehandles[2] is null");
216  if(!BPhysPVCascadeTools::LinkVertices(CascadeV1LinksDecor, verticestoLink, Vtxwritehandles[0], cascadeVertices[2]))
217  ATH_MSG_ERROR("Error decorating with cascade vertices");
218 
219  verticestoLink.clear();
220  verticestoLink.push_back(cascadeVertices[1]);
221  if(!BPhysPVCascadeTools::LinkVertices(CascadeV2LinksDecor, verticestoLink, Vtxwritehandles[1], cascadeVertices[2]))
222  ATH_MSG_ERROR("Error decorating with cascade vertices");
223 
224  // Identify the input Jpsi+pi
225  const xAOD::Vertex* jpsipiVertex = BPhysPVCascadeTools::FindVertex<3>(jpsipiContainer, cascadeVertices[2]);
226  ATH_MSG_DEBUG("1 pt Jpsi+pi tracks " << cascadeVertices[2]->trackParticle(0)->pt() << ", " << cascadeVertices[2]->trackParticle(1)->pt() << ", " << cascadeVertices[2]->trackParticle(2)->pt());
227  if (jpsipiVertex) ATH_MSG_DEBUG("2 pt Jpsi+pi tracks " << jpsipiVertex->trackParticle(0)->pt() << ", " << jpsipiVertex->trackParticle(1)->pt() << ", " << jpsipiVertex->trackParticle(2)->pt());
228 
229  // Identify the input D0
230  const xAOD::Vertex* d0Vertex = BPhysPVCascadeTools::FindVertex<2>(d0Container, cascadeVertices[1]);;
231  ATH_MSG_DEBUG("1 pt D0 tracks " << cascadeVertices[1]->trackParticle(0)->pt() << ", " << cascadeVertices[1]->trackParticle(1)->pt());
232  if (d0Vertex) ATH_MSG_DEBUG("2 pt D0 tracks " << d0Vertex->trackParticle(0)->pt() << ", " << d0Vertex->trackParticle(1)->pt());
233 
234  // Identify the input K_S0
235  const xAOD::Vertex* k0Vertex = BPhysPVCascadeTools::FindVertex<2>(k0Container, cascadeVertices[0]);;
236  ATH_MSG_DEBUG("1 pt K_S0 tracks " << cascadeVertices[0]->trackParticle(0)->pt() << ", " << cascadeVertices[0]->trackParticle(1)->pt());
237  if (k0Vertex) ATH_MSG_DEBUG("2 pt K_S0 tracks " << k0Vertex->trackParticle(0)->pt() << ", " << k0Vertex->trackParticle(1)->pt());
238 
239  // Set links to input vertices
240  std::vector<const xAOD::Vertex*> jpsipiVerticestoLink;
241  if (jpsipiVertex) jpsipiVerticestoLink.push_back(jpsipiVertex);
242  else ATH_MSG_WARNING("Could not find linking Jpsi+pi");
243  if(!BPhysPVCascadeTools::LinkVertices(JpsipiLinksDecor, jpsipiVerticestoLink, jpsipiContainer, cascadeVertices[2]))
244  ATH_MSG_ERROR("Error decorating with Jpsi+pi vertices");
245 
246  std::vector<const xAOD::Vertex*> d0VerticestoLink;
247  if (d0Vertex) d0VerticestoLink.push_back(d0Vertex);
248  else ATH_MSG_WARNING("Could not find linking D0");
249  if(!BPhysPVCascadeTools::LinkVertices(D0LinksDecor, d0VerticestoLink, d0Container, cascadeVertices[2]))
250  ATH_MSG_ERROR("Error decorating with D0 vertices");
251 
252  std::vector<const xAOD::Vertex*> k0VerticestoLink;
253  if (k0Vertex) k0VerticestoLink.push_back(k0Vertex);
254  else ATH_MSG_WARNING("Could not find linking K_S0");
255  if(!BPhysPVCascadeTools::LinkVertices(K0LinksDecor, k0VerticestoLink, k0Container, cascadeVertices[2]))
256  ATH_MSG_ERROR("Error decorating with K_S0 vertices");
257 
258  bool tagD0(true);
259  if (jpsipiVertex){
260  if(abs(m_Dx_pid)==421 && (jpsipiVertex->trackParticle(2)->charge()==-1)) tagD0 = false;
261  }
262 
263  double mass_b = m_vtx0MassHypo;
264  double mass_d0 = m_vtx1MassHypo;
265  double mass_k0 = m_vtx2MassHypo;
266  std::vector<double> massesJpsipi;
267  massesJpsipi.push_back(m_vtx0Daug1MassHypo);
268  massesJpsipi.push_back(m_vtx0Daug2MassHypo);
269  massesJpsipi.push_back(m_vtx0Daug3MassHypo);
270  std::vector<double> massesD0;
271  if(tagD0){
272  massesD0.push_back(m_vtx1Daug1MassHypo);
273  massesD0.push_back(m_vtx1Daug2MassHypo);
274  }else{ // Change the oreder of masses for D*-->D0bar pi-, D0bar->K+pi-
275  massesD0.push_back(m_vtx1Daug2MassHypo);
276  massesD0.push_back(m_vtx1Daug1MassHypo);
277  }
278  std::vector<double> massesK0;
279  massesK0.push_back(m_vtx2Daug1MassHypo);
280  massesK0.push_back(m_vtx2Daug2MassHypo);
281  std::vector<double> Masses;
282  Masses.push_back(m_vtx0Daug1MassHypo);
283  Masses.push_back(m_vtx0Daug2MassHypo);
284  Masses.push_back(m_vtx0Daug3MassHypo);
285  Masses.push_back(m_vtx1MassHypo);
286  Masses.push_back(m_vtx2MassHypo);
287 
288  // loop over candidates -- Don't apply PV_minNTracks requirement here
289  // because it may result in exclusion of the high-pt PV.
290  // get good PVs
291 
292  xAOD::BPhysHypoHelper vtx(m_hypoName, mainVertex);
293 
295 
296  // Decorate main vertex
297  //
298  // 1.a) mass, mass error
299  BPHYS_CHECK( vtx.setMass(m_CascadeTools->invariantMass(moms[2])) );
300  BPHYS_CHECK( vtx.setMassErr(m_CascadeTools->invariantMassError(moms[2],x->getCovariance()[2])) );
301  // 1.b) pt and pT error (the default pt of mainVertex is != the pt of the full cascade fit!)
302  Pt_decor(*mainVertex) = m_CascadeTools->pT(moms[2]);
303  PtErr_decor(*mainVertex) = m_CascadeTools->pTError(moms[2],x->getCovariance()[2]);
304  // 1.c) chi2 and ndof (the default chi2 of mainVertex is != the chi2 of the full cascade fit!)
305  chi2_decor(*mainVertex) = x->fitChi2();
306  ndof_decor(*mainVertex) = x->nDoF();
307 
308  float massMumu = 0.;
309  if (jpsipiVertex) {
310  TLorentzVector p4_mu1, p4_mu2;
311  p4_mu1.SetPtEtaPhiM(jpsipiVertex->trackParticle(0)->pt(),
312  jpsipiVertex->trackParticle(0)->eta(),
313  jpsipiVertex->trackParticle(0)->phi(), m_vtx0Daug1MassHypo);
314  p4_mu2.SetPtEtaPhiM(jpsipiVertex->trackParticle(1)->pt(),
315  jpsipiVertex->trackParticle(1)->eta(),
316  jpsipiVertex->trackParticle(1)->phi(), m_vtx0Daug2MassHypo);
317  massMumu = (p4_mu1 + p4_mu2).M();
318  }
319  MassMumu_decor(*mainVertex) = massMumu;
320 
321  float massKpi = 0.;
322  if (d0Vertex) {
323  TLorentzVector p4_ka, p4_pi;
324  if(tagD0){
325  p4_pi.SetPtEtaPhiM(d0Vertex->trackParticle(0)->pt(),
326  d0Vertex->trackParticle(0)->eta(),
327  d0Vertex->trackParticle(0)->phi(), m_vtx1Daug1MassHypo);
328  p4_ka.SetPtEtaPhiM(d0Vertex->trackParticle(1)->pt(),
329  d0Vertex->trackParticle(1)->eta(),
330  d0Vertex->trackParticle(1)->phi(), m_vtx1Daug2MassHypo);
331  }else{ // Change the oreder of masses for D*-->D0bar pi-, D0bar->K+pi-
332  p4_pi.SetPtEtaPhiM(d0Vertex->trackParticle(1)->pt(),
333  d0Vertex->trackParticle(1)->eta(),
334  d0Vertex->trackParticle(1)->phi(), m_vtx1Daug1MassHypo);
335  p4_ka.SetPtEtaPhiM(d0Vertex->trackParticle(0)->pt(),
336  d0Vertex->trackParticle(0)->eta(),
337  d0Vertex->trackParticle(0)->phi(), m_vtx1Daug2MassHypo);
338  }
339  massKpi = (p4_ka + p4_pi).M();
340  }
341  MassKpi_svdecor(*mainVertex) = massKpi;
342 
343  float massPipi = 0.;
344  if (k0Vertex) {
345  TLorentzVector p4_pip, p4_pim;
346  p4_pip.SetPtEtaPhiM(k0Vertex->trackParticle(0)->pt(),
347  k0Vertex->trackParticle(0)->eta(),
348  k0Vertex->trackParticle(0)->phi(), m_vtx2Daug1MassHypo);
349  p4_pim.SetPtEtaPhiM(k0Vertex->trackParticle(1)->pt(),
350  k0Vertex->trackParticle(1)->eta(),
351  k0Vertex->trackParticle(1)->phi(), m_vtx2Daug2MassHypo);
352  massPipi = (p4_pip + p4_pim).M();
353  }
354  MassPipi_sv2decor(*mainVertex) = massPipi;
355 
356  MassJpsi_decor(*mainVertex) = (moms[2][0] + moms[2][1]).M();
357  MassPiD0_decor(*mainVertex) = (moms[2][2] + moms[2][4]).M();
358  MassPiD0K0_decor(*mainVertex) = (moms[2][2] + moms[2][4] + moms[2][3]).M();
359 
360  ATH_CHECK(helper.FillCandwithRefittedVertices(m_refitPV, pvContainer,
361  refPvContainer, &(*m_pvRefitter), m_PV_max, m_DoVertexType, x, 2, mass_b, vtx));
362 
363  // 4) decorate the main vertex with D0 vertex mass, pt, lifetime and lxy values (plus errors)
364  // D0 points to the main vertex, so lifetime and lxy are w.r.t the main vertex
365  Mass_svdecor(*mainVertex) = m_CascadeTools->invariantMass(moms[1]);
366  MassErr_svdecor(*mainVertex) = m_CascadeTools->invariantMassError(moms[1],x->getCovariance()[1]);
367  Pt_svdecor(*mainVertex) = m_CascadeTools->pT(moms[1]);
368  PtErr_svdecor(*mainVertex) = m_CascadeTools->pTError(moms[1],x->getCovariance()[1]);
369  Lxy_svdecor(*mainVertex) = m_CascadeTools->lxy(moms[1],cascadeVertices[1],cascadeVertices[2]);
370  LxyErr_svdecor(*mainVertex) = m_CascadeTools->lxyError(moms[1],x->getCovariance()[1],cascadeVertices[1],cascadeVertices[2]);
371  Tau_svdecor(*mainVertex) = m_CascadeTools->tau(moms[1],cascadeVertices[1],cascadeVertices[2]);
372  TauErr_svdecor(*mainVertex) = m_CascadeTools->tauError(moms[1],x->getCovariance()[1],cascadeVertices[1],cascadeVertices[2]);
373 
374  // 5) decorate the main vertex with K_S0 vertex mass, pt, lifetime and lxy values (plus errors)
375  // K_S0 points to the main vertex, so lifetime and lxy are w.r.t the main vertex
376  Mass_sv2decor(*mainVertex) = m_CascadeTools->invariantMass(moms[0]);
377  MassErr_sv2decor(*mainVertex) = m_CascadeTools->invariantMassError(moms[0],x->getCovariance()[0]);
378  Pt_sv2decor(*mainVertex) = m_CascadeTools->pT(moms[0]);
379  PtErr_sv2decor(*mainVertex) = m_CascadeTools->pTError(moms[0],x->getCovariance()[0]);
380  Lxy_sv2decor(*mainVertex) = m_CascadeTools->lxy(moms[0],cascadeVertices[0],cascadeVertices[2]);
381  LxyErr_sv2decor(*mainVertex) = m_CascadeTools->lxyError(moms[0],x->getCovariance()[0],cascadeVertices[0],cascadeVertices[2]);
382  Tau_sv2decor(*mainVertex) = m_CascadeTools->tau(moms[0],cascadeVertices[0],cascadeVertices[2]);
383  TauErr_sv2decor(*mainVertex) = m_CascadeTools->tauError(moms[0],x->getCovariance()[0],cascadeVertices[0],cascadeVertices[2]);
384 
385  // Some checks in DEBUG mode
386  ATH_MSG_DEBUG("chi2 " << x->fitChi2()
387  << " chi2_1 " << m_V0Tools->chisq(cascadeVertices[0])
388  << " chi2_2 " << m_V0Tools->chisq(cascadeVertices[1])
389  << " chi2_3 " << m_V0Tools->chisq(cascadeVertices[2])
390  << " vprob " << m_CascadeTools->vertexProbability(x->nDoF(),x->fitChi2()));
391  ATH_MSG_DEBUG("ndf " << x->nDoF() << " ndf_1 " << m_V0Tools->ndof(cascadeVertices[0]) << " ndf_2 " << m_V0Tools->ndof(cascadeVertices[1]) << " ndf_3 " << m_V0Tools->ndof(cascadeVertices[2]));
392  ATH_MSG_DEBUG("V0Tools mass_k0 " << m_V0Tools->invariantMass(cascadeVertices[0],massesK0)
393  << " error " << m_V0Tools->invariantMassError(cascadeVertices[0],massesK0)
394  << " mass_d0 " << m_V0Tools->invariantMass(cascadeVertices[1],massesD0)
395  << " error " << m_V0Tools->invariantMassError(cascadeVertices[1],massesD0)
396  << " mass_J " << m_V0Tools->invariantMass(cascadeVertices[2],massesJpsipi)
397  << " error " << m_V0Tools->invariantMassError(cascadeVertices[2],massesJpsipi));
398  // masses and errors, using track masses assigned in the fit
399  double Mass_B = m_CascadeTools->invariantMass(moms[2]);
400  double Mass_D0 = m_CascadeTools->invariantMass(moms[1]);
401  double Mass_K0 = m_CascadeTools->invariantMass(moms[0]);
402  double Mass_B_err = m_CascadeTools->invariantMassError(moms[2],x->getCovariance()[2]);
403  double Mass_D0_err = m_CascadeTools->invariantMassError(moms[1],x->getCovariance()[1]);
404  double Mass_K0_err = m_CascadeTools->invariantMassError(moms[0],x->getCovariance()[0]);
405  ATH_MSG_DEBUG("Mass_B " << Mass_B << " Mass_D0 " << Mass_D0 << " Mass_K0 " << Mass_K0);
406  ATH_MSG_DEBUG("Mass_B_err " << Mass_B_err << " Mass_D0_err " << Mass_D0_err << " Mass_K0_err " << Mass_K0_err);
407  double mprob_B = m_CascadeTools->massProbability(mass_b,Mass_B,Mass_B_err);
408  double mprob_D0 = m_CascadeTools->massProbability(mass_d0,Mass_D0,Mass_D0_err);
409  double mprob_K0 = m_CascadeTools->massProbability(mass_k0,Mass_K0,Mass_K0_err);
410  ATH_MSG_DEBUG("mprob_B " << mprob_B << " mprob_D0 " << mprob_D0 << " mprob_K0 " << mprob_K0);
411  // masses and errors, assigning user defined track masses
412  ATH_MSG_DEBUG("Mass_b " << m_CascadeTools->invariantMass(moms[2],Masses)
413  << " Mass_d0 " << m_CascadeTools->invariantMass(moms[1],massesD0)
414  << " Mass_k0 " << m_CascadeTools->invariantMass(moms[0],massesD0));
415  ATH_MSG_DEBUG("Mass_b_err " << m_CascadeTools->invariantMassError(moms[2],x->getCovariance()[2],Masses)
416  << " Mass_d0_err " << m_CascadeTools->invariantMassError(moms[1],x->getCovariance()[1],massesD0)
417  << " Mass_k0_err " << m_CascadeTools->invariantMassError(moms[0],x->getCovariance()[0],massesK0));
418  ATH_MSG_DEBUG("pt_b " << m_CascadeTools->pT(moms[2])
419  << " pt_d " << m_CascadeTools->pT(moms[1])
420  << " pt_d0 " << m_V0Tools->pT(cascadeVertices[1])
421  << " pt_k " << m_CascadeTools->pT(moms[0])
422  << " pt_k0 " << m_V0Tools->pT(cascadeVertices[0]));
423  ATH_MSG_DEBUG("ptErr_b " << m_CascadeTools->pTError(moms[2],x->getCovariance()[2])
424  << " ptErr_d " << m_CascadeTools->pTError(moms[1],x->getCovariance()[1])
425  << " ptErr_d0 " << m_V0Tools->pTError(cascadeVertices[1])
426  << " ptErr_k " << m_CascadeTools->pTError(moms[0],x->getCovariance()[0])
427  << " ptErr_k0 " << m_V0Tools->pTError(cascadeVertices[0]));
428  ATH_MSG_DEBUG("lxy_B " << m_V0Tools->lxy(cascadeVertices[2],primaryVertex) << " lxy_D " << m_V0Tools->lxy(cascadeVertices[1],cascadeVertices[2]) << " lxy_K " << m_V0Tools->lxy(cascadeVertices[0],cascadeVertices[2]));
429  ATH_MSG_DEBUG("lxy_b " << m_CascadeTools->lxy(moms[2],cascadeVertices[2],primaryVertex) << " lxy_d " << m_CascadeTools->lxy(moms[1],cascadeVertices[1],cascadeVertices[2]) << " lxy_k " << m_CascadeTools->lxy(moms[0],cascadeVertices[0],cascadeVertices[2]));
430  ATH_MSG_DEBUG("lxyErr_b " << m_CascadeTools->lxyError(moms[2],x->getCovariance()[2],cascadeVertices[2],primaryVertex)
431  << " lxyErr_d " << m_CascadeTools->lxyError(moms[1],x->getCovariance()[1],cascadeVertices[1],cascadeVertices[2])
432  << " lxyErr_d0 " << m_V0Tools->lxyError(cascadeVertices[1],cascadeVertices[2])
433  << " lxyErr_k " << m_CascadeTools->lxyError(moms[0],x->getCovariance()[0],cascadeVertices[0],cascadeVertices[2])
434  << " lxyErr_k0 " << m_V0Tools->lxyError(cascadeVertices[0],cascadeVertices[2]));
435  ATH_MSG_DEBUG("tau_B " << m_CascadeTools->tau(moms[2],cascadeVertices[2],primaryVertex,mass_b)
436  << " tau_d0 " << m_V0Tools->tau(cascadeVertices[1],cascadeVertices[2],massesD0)
437  << " tau_k0 " << m_V0Tools->tau(cascadeVertices[0],cascadeVertices[2],massesK0));
438  ATH_MSG_DEBUG("tau_b " << m_CascadeTools->tau(moms[2],cascadeVertices[2],primaryVertex)
439  << " tau_d " << m_CascadeTools->tau(moms[1],cascadeVertices[1],cascadeVertices[2])
440  << " tau_D " << m_CascadeTools->tau(moms[1],cascadeVertices[1],cascadeVertices[2],mass_d0)
441  << " tau_k " << m_CascadeTools->tau(moms[0],cascadeVertices[0],cascadeVertices[2])
442  << " tau_K " << m_CascadeTools->tau(moms[0],cascadeVertices[0],cascadeVertices[2],mass_k0));
443  ATH_MSG_DEBUG("tauErr_b " << m_CascadeTools->tauError(moms[2],x->getCovariance()[2],cascadeVertices[2],primaryVertex)
444  << " tauErr_d " << m_CascadeTools->tauError(moms[1],x->getCovariance()[1],cascadeVertices[1],cascadeVertices[2])
445  << " tauErr_d0 " << m_V0Tools->tauError(cascadeVertices[1],cascadeVertices[2],massesD0)
446  << " tauErr_k " << m_CascadeTools->tauError(moms[0],x->getCovariance()[0],cascadeVertices[0],cascadeVertices[2])
447  << " tauErr_k0 " << m_V0Tools->tauError(cascadeVertices[0],cascadeVertices[2],massesK0));
448  ATH_MSG_DEBUG("TauErr_b " << m_CascadeTools->tauError(moms[2],x->getCovariance()[2],cascadeVertices[2],primaryVertex,mass_b)
449  << " TauErr_d " << m_CascadeTools->tauError(moms[1],x->getCovariance()[1],cascadeVertices[1],cascadeVertices[2],mass_d0)
450  << " TauErr_d0 " << m_V0Tools->tauError(cascadeVertices[1],cascadeVertices[2],massesD0,mass_d0)
451  << " TauErr_k " << m_CascadeTools->tauError(moms[0],x->getCovariance()[0],cascadeVertices[0],cascadeVertices[2],mass_k0)
452  << " TauErr_k0 " << m_V0Tools->tauError(cascadeVertices[0],cascadeVertices[2],massesD0,mass_k0));
453 
454  ATH_MSG_DEBUG("CascadeTools main vert wrt PV " << " CascadeTools SV " << " V0Tools SV");
455  ATH_MSG_DEBUG("a0z " << m_CascadeTools->a0z(moms[2],cascadeVertices[2],primaryVertex)
456  << ", " << m_CascadeTools->a0z(moms[1],cascadeVertices[1],cascadeVertices[2])
457  << ", " << m_CascadeTools->a0z(moms[0],cascadeVertices[0],cascadeVertices[2])
458  << ", " << m_V0Tools->a0z(cascadeVertices[1],cascadeVertices[2])
459  << ", " << m_V0Tools->a0z(cascadeVertices[0],cascadeVertices[2]));
460  ATH_MSG_DEBUG("a0zErr " << m_CascadeTools->a0zError(moms[2],x->getCovariance()[2],cascadeVertices[2],primaryVertex)
461  << ", " << m_CascadeTools->a0zError(moms[1],x->getCovariance()[1],cascadeVertices[1],cascadeVertices[2])
462  << ", " << m_CascadeTools->a0zError(moms[0],x->getCovariance()[0],cascadeVertices[0],cascadeVertices[2])
463  << ", " << m_V0Tools->a0zError(cascadeVertices[1],cascadeVertices[2])
464  << ", " << m_V0Tools->a0zError(cascadeVertices[0],cascadeVertices[2]));
465  ATH_MSG_DEBUG("a0xy " << m_CascadeTools->a0xy(moms[2],cascadeVertices[2],primaryVertex)
466  << ", " << m_CascadeTools->a0xy(moms[1],cascadeVertices[1],cascadeVertices[2])
467  << ", " << m_CascadeTools->a0xy(moms[0],cascadeVertices[0],cascadeVertices[2])
468  << ", " << m_V0Tools->a0xy(cascadeVertices[1],cascadeVertices[2])
469  << ", " << m_V0Tools->a0xy(cascadeVertices[0],cascadeVertices[2]));
470  ATH_MSG_DEBUG("a0xyErr " << m_CascadeTools->a0xyError(moms[2],x->getCovariance()[2],cascadeVertices[2],primaryVertex)
471  << ", " << m_CascadeTools->a0xyError(moms[1],x->getCovariance()[1],cascadeVertices[1],cascadeVertices[2])
472  << ", " << m_CascadeTools->a0xyError(moms[0],x->getCovariance()[0],cascadeVertices[0],cascadeVertices[2])
473  << ", " << m_V0Tools->a0xyError(cascadeVertices[1],cascadeVertices[2])
474  << ", " << m_V0Tools->a0xyError(cascadeVertices[0],cascadeVertices[2]));
475  ATH_MSG_DEBUG("a0 " << m_CascadeTools->a0(moms[2],cascadeVertices[2],primaryVertex)
476  << ", " << m_CascadeTools->a0(moms[1],cascadeVertices[1],cascadeVertices[2])
477  << ", " << m_CascadeTools->a0(moms[0],cascadeVertices[0],cascadeVertices[2])
478  << ", " << m_V0Tools->a0(cascadeVertices[1],cascadeVertices[2])
479  << ", " << m_V0Tools->a0(cascadeVertices[0],cascadeVertices[2]));
480  ATH_MSG_DEBUG("a0Err " << m_CascadeTools->a0Error(moms[2],x->getCovariance()[2],cascadeVertices[2],primaryVertex)
481  << ", " << m_CascadeTools->a0Error(moms[1],x->getCovariance()[1],cascadeVertices[1],cascadeVertices[2])
482  << ", " << m_CascadeTools->a0Error(moms[0],x->getCovariance()[0],cascadeVertices[0],cascadeVertices[2])
483  << ", " << m_V0Tools->a0Error(cascadeVertices[1],cascadeVertices[2])
484  << ", " << m_V0Tools->a0Error(cascadeVertices[0],cascadeVertices[2]));
485  ATH_MSG_DEBUG("x0 " << m_V0Tools->vtx(cascadeVertices[0]).x() << " y0 " << m_V0Tools->vtx(cascadeVertices[0]).y() << " z0 " << m_V0Tools->vtx(cascadeVertices[0]).z());
486  ATH_MSG_DEBUG("x1 " << m_V0Tools->vtx(cascadeVertices[1]).x() << " y1 " << m_V0Tools->vtx(cascadeVertices[1]).y() << " z1 " << m_V0Tools->vtx(cascadeVertices[1]).z());
487  ATH_MSG_DEBUG("x2 " << m_V0Tools->vtx(cascadeVertices[2]).x() << " y2 " << m_V0Tools->vtx(cascadeVertices[2]).y() << " z2 " << m_V0Tools->vtx(cascadeVertices[2]).z());
488  ATH_MSG_DEBUG("X0 " << primaryVertex->x() << " Y0 " << primaryVertex->y() << " Z0 " << primaryVertex->z());
489  ATH_MSG_DEBUG("rxy0 " << m_V0Tools->rxy(cascadeVertices[0]) << " rxyErr0 " << m_V0Tools->rxyError(cascadeVertices[0]));
490  ATH_MSG_DEBUG("rxy1 " << m_V0Tools->rxy(cascadeVertices[1]) << " rxyErr1 " << m_V0Tools->rxyError(cascadeVertices[1]));
491  ATH_MSG_DEBUG("rxy2 " << m_V0Tools->rxy(cascadeVertices[2]) << " rxyErr2 " << m_V0Tools->rxyError(cascadeVertices[2]));
492  ATH_MSG_DEBUG("Rxy0 wrt PV " << m_V0Tools->rxy(cascadeVertices[0],primaryVertex) << " RxyErr0 wrt PV " << m_V0Tools->rxyError(cascadeVertices[0],primaryVertex));
493  ATH_MSG_DEBUG("Rxy1 wrt PV " << m_V0Tools->rxy(cascadeVertices[1],primaryVertex) << " RxyErr1 wrt PV " << m_V0Tools->rxyError(cascadeVertices[1],primaryVertex));
494  ATH_MSG_DEBUG("Rxy2 wrt PV " << m_V0Tools->rxy(cascadeVertices[2],primaryVertex) << " RxyErr2 wrt PV " << m_V0Tools->rxyError(cascadeVertices[2],primaryVertex));
495  ATH_MSG_DEBUG("number of covariance matrices " << (x->getCovariance()).size());
496  } // loop over cascadeinfoContainer
497 
498  // Deleting cascadeinfo since this won't be stored.
499  // Vertices have been kept in m_cascadeOutputs and should be owned by their container
500  for (auto x : cascadeinfoContainer) delete x;
501 
502  return StatusCode::SUCCESS;
503  }

◆ 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

◆ getParticleMass()

double DerivationFramework::JpsiPlusDs1Cascade::getParticleMass ( int  particlecode) const
private

Definition at line 28 of file JpsiPlusDs1Cascade.cxx.

28  {
29  auto ptr = m_particleDataTable->particle( pdgcode );
30  return ptr ? ptr->mass() : 0.;
31  }

◆ initialize()

StatusCode DerivationFramework::JpsiPlusDs1Cascade::initialize ( )
overridevirtual

Definition at line 33 of file JpsiPlusDs1Cascade.cxx.

33  {
34 
35  // retrieving vertex Fitter
36  ATH_CHECK( m_iVertexFitter.retrieve());
37 
38  // retrieving the V0 tools
39  ATH_CHECK( m_V0Tools.retrieve());
40 
41  // retrieving the Cascade tools
42  ATH_CHECK( m_CascadeTools.retrieve());
43 
44  // Get the beam spot service
46 
47  IPartPropSvc* partPropSvc = nullptr;
48  ATH_CHECK( service("PartPropSvc", partPropSvc, true) );
49  m_particleDataTable = partPropSvc->PDT();
50 
51  // retrieve particle masses
52  if(m_mass_jpsi < 0. ) m_mass_jpsi = getParticleMass(MC::JPSI);
53  if(m_vtx0MassHypo < 0.) m_vtx0MassHypo = getParticleMass(MC::BCPLUS);
55  if(m_vtx2MassHypo < 0.) m_vtx2MassHypo = getParticleMass(MC::K0S);
56 
64 
65  return StatusCode::SUCCESS;
66  }

◆ 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::JpsiPlusDs1Cascade::interfaceID ( )
inlinestatic

Definition at line 42 of file JpsiPlusDs1Cascade.h.

42 { return IID_JpsiPlusDs1Cascade;}

◆ 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::JpsiPlusDs1Cascade::performSearch ( std::vector< Trk::VxCascadeInfo * > *  cascadeinfoContainer) const

Definition at line 593 of file JpsiPlusDs1Cascade.cxx.

594  {
595  ATH_MSG_DEBUG( "JpsiPlusDs1Cascade::performSearch" );
596  assert(cascadeinfoContainer!=nullptr);
597 
598  // Get TrackParticle container (for setting links to the original tracks)
599  const xAOD::TrackParticleContainer *trackContainer(nullptr);
600  ATH_CHECK(evtStore()->retrieve(trackContainer , "InDetTrackParticles" ));
601 
602  // Get Jpsi+pi container
603  const xAOD::VertexContainer *jpsipiContainer(nullptr);
604  ATH_CHECK(evtStore()->retrieve(jpsipiContainer , m_vertexContainerKey ));
605 
606  // Get D0 container
607  const xAOD::VertexContainer *d0Container(nullptr);
609 
610  // Get K_S0 container
611  const xAOD::VertexContainer *k0Container(nullptr);
613 
614  double mass_d0 = m_vtx1MassHypo;
615  double mass_k0 = m_vtx2MassHypo;
616  std::vector<const xAOD::TrackParticle*> tracksJpsipi;
617  std::vector<const xAOD::TrackParticle*> tracksJpsi;
618  std::vector<const xAOD::TrackParticle*> tracksD0;
619  std::vector<const xAOD::TrackParticle*> tracksK0;
620  std::vector<const xAOD::TrackParticle*> tracksBc;
621  std::vector<double> massesJpsipi;
622  massesJpsipi.push_back(m_vtx0Daug1MassHypo);
623  massesJpsipi.push_back(m_vtx0Daug2MassHypo);
624  massesJpsipi.push_back(m_vtx0Daug3MassHypo);
625  std::vector<double> massesD0;
626  massesD0.push_back(m_vtx1Daug1MassHypo);
627  massesD0.push_back(m_vtx1Daug2MassHypo);
628  std::vector<double> massesD0b; // Change the oreder of masses for D*-->D0bar pi-, D0bar->K+pi-
629  massesD0b.push_back(m_vtx1Daug2MassHypo);
630  massesD0b.push_back(m_vtx1Daug1MassHypo);
631  std::vector<double> massesK0;
632  massesK0.push_back(m_vtx2Daug1MassHypo);
633  massesK0.push_back(m_vtx2Daug2MassHypo);
634  std::vector<double> Masses;
635  Masses.push_back(m_vtx0Daug1MassHypo);
636  Masses.push_back(m_vtx0Daug2MassHypo);
637  Masses.push_back(m_vtx0Daug3MassHypo);
638  Masses.push_back(m_vtx1MassHypo);
639  Masses.push_back(m_vtx2MassHypo);
640 
641  // Select J/psi pi+ candidates before calling cascade fit
642  std::vector<const xAOD::Vertex*> selectedJpsipiCandidates;
643  for(auto vxcItr=jpsipiContainer->cbegin(); vxcItr!=jpsipiContainer->cend(); ++vxcItr) {
644 
645  // Check the passed flag first
646  const xAOD::Vertex* vtx = *vxcItr;
647  SG::AuxElement::Accessor<Char_t> flagAcc1("passed_Jpsipi");
648  if(flagAcc1.isAvailable(*vtx)){
649  if(!flagAcc1(*vtx)) continue;
650  }
651 
652  // Check J/psi candidate invariant mass and skip if need be
653  TLorentzVector p4Mup_in, p4Mum_in;
654  p4Mup_in.SetPtEtaPhiM((*vxcItr)->trackParticle(0)->pt(),
655  (*vxcItr)->trackParticle(0)->eta(),
656  (*vxcItr)->trackParticle(0)->phi(), m_vtx0Daug1MassHypo);
657  p4Mum_in.SetPtEtaPhiM((*vxcItr)->trackParticle(1)->pt(),
658  (*vxcItr)->trackParticle(1)->eta(),
659  (*vxcItr)->trackParticle(1)->phi(), m_vtx0Daug2MassHypo);
660  double mass_Jpsi = (p4Mup_in + p4Mum_in).M();
661  ATH_MSG_DEBUG("Jpsi mass " << mass_Jpsi);
662  if (mass_Jpsi < m_jpsiMassLower || mass_Jpsi > m_jpsiMassUpper) {
663  ATH_MSG_DEBUG(" Original Jpsi candidate rejected by the mass cut: mass = "
664  << mass_Jpsi << " != (" << m_jpsiMassLower << ", " << m_jpsiMassUpper << ")" );
665  continue;
666  }
667 
668  // Check J/psi pi+ candidate invariant mass and skip if need be
669  double mass_Jpsipi = m_V0Tools->invariantMass(*vxcItr, massesJpsipi);
670  ATH_MSG_DEBUG("Jpsipi mass " << mass_Jpsipi);
671  if (mass_Jpsipi < m_jpsipiMassLower || mass_Jpsipi > m_jpsipiMassUpper) {
672  ATH_MSG_DEBUG(" Original Jpsipi candidate rejected by the mass cut: mass = "
673  << mass_Jpsipi << " != (" << m_jpsipiMassLower << ", " << m_jpsipiMassUpper << ")" );
674  continue;
675  }
676 
677  selectedJpsipiCandidates.push_back(*vxcItr);
678  }
679  if(selectedJpsipiCandidates.size()<1) return StatusCode::SUCCESS;
680 
681  // Select the D0/D0b candidates before calling cascade fit
682  std::vector<const xAOD::Vertex*> selectedD0Candidates;
683  for(auto vxcItr=d0Container->cbegin(); vxcItr!=d0Container->cend(); ++vxcItr) {
684 
685  // Check the passed flag first
686  const xAOD::Vertex* vtx = *vxcItr;
687  SG::AuxElement::Accessor<Char_t> flagAcc1("passed_D0");
688  SG::AuxElement::Accessor<Char_t> flagAcc2("passed_D0b");
689  bool isD0(true);
690  bool isD0b(true);
691  if(flagAcc1.isAvailable(*vtx)){
692  if(!flagAcc1(*vtx)) isD0 = false;
693  }
694  if(flagAcc2.isAvailable(*vtx)){
695  if(!flagAcc2(*vtx)) isD0b = false;
696  }
697  if(!(isD0||isD0b)) continue;
698 
699  // Ensure the total charge is correct
700  if ((*vxcItr)->trackParticle(0)->charge() != 1 || (*vxcItr)->trackParticle(1)->charge() != -1) {
701  ATH_MSG_DEBUG(" Original D0/D0-bar candidate rejected by the charge requirement: "
702  << (*vxcItr)->trackParticle(0)->charge() << ", " << (*vxcItr)->trackParticle(1)->charge() );
703  continue;
704  }
705 
706  // Check D0/D0bar candidate invariant mass and skip if need be
707  double mass_D0 = m_V0Tools->invariantMass(*vxcItr,massesD0);
708  double mass_D0b = m_V0Tools->invariantMass(*vxcItr,massesD0b);
709  ATH_MSG_DEBUG("D0 mass " << mass_D0 << ", D0b mass "<<mass_D0b);
710  if ((mass_D0 < m_D0MassLower || mass_D0 > m_D0MassUpper) && (mass_D0b < m_D0MassLower || mass_D0b > m_D0MassUpper)) {
711  ATH_MSG_DEBUG(" Original D0 candidate rejected by the mass cut: mass = "
712  << mass_D0 << " != (" << m_D0MassLower << ", " << m_D0MassUpper << ") "
713  << mass_D0b << " != (" << m_D0MassLower << ", " << m_D0MassUpper << ") " );
714  continue;
715  }
716 
717  selectedD0Candidates.push_back(*vxcItr);
718  }
719  if(selectedD0Candidates.size()<1) return StatusCode::SUCCESS;
720 
721  // Select the D0/D0b candidates before calling cascade fit
722  std::vector<const xAOD::Vertex*> selectedK0Candidates;
723  for(auto vxcItr=k0Container->cbegin(); vxcItr!=k0Container->cend(); ++vxcItr) {
724 
725  // Check the passed flag first
726  const xAOD::Vertex* vtx = *vxcItr;
727  SG::AuxElement::Accessor<Char_t> flagAcc1("passed_K0");
728  if(flagAcc1.isAvailable(*vtx)){
729  if(!flagAcc1(*vtx)) continue;
730  }
731 
732  // Check K_S0 candidate invariant mass and skip if need be
733  double mass_K0 = m_V0Tools->invariantMass(*vxcItr, massesK0);
734  ATH_MSG_DEBUG("K_S0 mass " << mass_K0);
735  if (mass_K0 < m_K0MassLower || mass_K0 > m_K0MassUpper) {
736  ATH_MSG_DEBUG(" Original K_S0 candidate rejected by the mass cut: mass = "
737  << mass_K0 << " != (" << m_K0MassLower << ", " << m_K0MassUpper << ")" );
738  continue;
739  }
740 
741  selectedK0Candidates.push_back(*vxcItr);
742  }
743  if(selectedK0Candidates.size()<1) return StatusCode::SUCCESS;
744 
745  // Select J/psi D*+ candidates
746  // Iterate over Jpsi+pi vertices
747  for(auto jpsipiItr=selectedJpsipiCandidates.cbegin(); jpsipiItr!=selectedJpsipiCandidates.cend(); ++jpsipiItr) {
748 
749  size_t jpsipiTrkNum = (*jpsipiItr)->nTrackParticles();
750  tracksJpsipi.clear();
751  tracksJpsi.clear();
752  for( unsigned int it=0; it<jpsipiTrkNum; it++) tracksJpsipi.push_back((*jpsipiItr)->trackParticle(it));
753  for( unsigned int it=0; it<jpsipiTrkNum-1; it++) tracksJpsi.push_back((*jpsipiItr)->trackParticle(it));
754 
755  if (tracksJpsipi.size() != 3 || massesJpsipi.size() != 3 ) {
756  ATH_MSG_INFO("problems with Jpsi+pi input");
757  }
758 
759  bool tagD0(true);
760  if(abs(m_Dx_pid)==421 && (*jpsipiItr)->trackParticle(2)->charge()==-1) tagD0 = false;
761 
762  TLorentzVector p4_pi1; // Momentum of soft pion
763  p4_pi1.SetPtEtaPhiM((*jpsipiItr)->trackParticle(2)->pt(),
764  (*jpsipiItr)->trackParticle(2)->eta(),
765  (*jpsipiItr)->trackParticle(2)->phi(), m_vtx0Daug3MassHypo);
766 
767  // Iterate over D0/D0bar vertices
768  for(auto d0Itr=selectedD0Candidates.cbegin(); d0Itr!=selectedD0Candidates.cend(); ++d0Itr) {
769 
770  // Check identical tracks in input
771  if(std::find(tracksJpsipi.cbegin(), tracksJpsipi.cend(), (*d0Itr)->trackParticle(0)) != tracksJpsipi.cend()) continue;
772  if(std::find(tracksJpsipi.cbegin(), tracksJpsipi.cend(), (*d0Itr)->trackParticle(1)) != tracksJpsipi.cend()) continue;
773 
774  TLorentzVector p4_ka, p4_pi2;
775  if(tagD0){ // for D*+
776  p4_pi2.SetPtEtaPhiM((*d0Itr)->trackParticle(0)->pt(),
777  (*d0Itr)->trackParticle(0)->eta(),
778  (*d0Itr)->trackParticle(0)->phi(), m_vtx1Daug1MassHypo);
779  p4_ka.SetPtEtaPhiM( (*d0Itr)->trackParticle(1)->pt(),
780  (*d0Itr)->trackParticle(1)->eta(),
781  (*d0Itr)->trackParticle(1)->phi(), m_vtx1Daug2MassHypo);
782  }else{ // change the order in the case of D*-
783  p4_pi2.SetPtEtaPhiM((*d0Itr)->trackParticle(1)->pt(),
784  (*d0Itr)->trackParticle(1)->eta(),
785  (*d0Itr)->trackParticle(1)->phi(), m_vtx1Daug1MassHypo);
786  p4_ka.SetPtEtaPhiM( (*d0Itr)->trackParticle(0)->pt(),
787  (*d0Itr)->trackParticle(0)->eta(),
788  (*d0Itr)->trackParticle(0)->phi(), m_vtx1Daug2MassHypo);
789  }
790  // Check D*+/- candidate invariant mass and skip if need be
791  double mass_Dst= (p4_pi1 + p4_ka + p4_pi2).M();
792  ATH_MSG_DEBUG("D*+/- mass " << mass_Dst);
793  if (mass_Dst < m_DstMassLower || mass_Dst > m_DstMassUpper) {
794  ATH_MSG_DEBUG(" Original D*+/- candidate rejected by the mass cut: mass = "
795  << mass_Dst << " != (" << m_DstMassLower << ", " << m_DstMassUpper << ")" );
796  continue;
797  }
798 
799  size_t d0TrkNum = (*d0Itr)->nTrackParticles();
800  tracksD0.clear();
801  for( unsigned int it=0; it<d0TrkNum; it++) tracksD0.push_back((*d0Itr)->trackParticle(it));
802  if (tracksD0.size() != 2 || massesD0.size() != 2 ) {
803  ATH_MSG_INFO("problems with D0 input");
804  }
805 
806  // Iterate over K0 vertices
807  for(auto k0Itr=selectedK0Candidates.cbegin(); k0Itr!=selectedK0Candidates.cend(); ++k0Itr) {
808 
809  // Check identical tracks in input
810  if(std::find(tracksJpsipi.cbegin(), tracksJpsipi.cend(), (*k0Itr)->trackParticle(0)) != tracksJpsipi.cend()) continue;
811  if(std::find(tracksJpsipi.cbegin(), tracksJpsipi.cend(), (*k0Itr)->trackParticle(1)) != tracksJpsipi.cend()) continue;
812  if(std::find(tracksD0.cbegin(), tracksD0.cend(), (*k0Itr)->trackParticle(0)) != tracksD0.cend()) continue;
813  if(std::find(tracksD0.cbegin(), tracksD0.cend(), (*k0Itr)->trackParticle(1)) != tracksD0.cend()) continue;
814 
815  size_t k0TrkNum = (*k0Itr)->nTrackParticles();
816  tracksK0.clear();
817  for( unsigned int it=0; it<k0TrkNum; it++) tracksK0.push_back((*k0Itr)->trackParticle(it));
818  if (tracksK0.size() != 2 || massesK0.size() != 2 ) {
819  ATH_MSG_INFO("problems with K0 input");
820  }
821 
822  ATH_MSG_DEBUG("using tracks" << tracksJpsipi[0] << ", " << tracksJpsipi[1] << ", " << tracksJpsipi[2] << ", " << tracksD0[0] << ", " << tracksD0[1] << ", " << tracksK0[0] << ", " << tracksK0[1]);
823 
824  tracksBc.clear();
825  for( unsigned int it=0; it<jpsipiTrkNum; it++) tracksBc.push_back((*jpsipiItr)->trackParticle(it));
826  for( unsigned int it=0; it<d0TrkNum; it++) tracksBc.push_back((*d0Itr)->trackParticle(it));
827  for( unsigned int it=0; it<k0TrkNum; it++) tracksBc.push_back((*k0Itr)->trackParticle(it));
828 
829 
830  // Apply the user's settings to the fitter
831  // Reset
832  std::unique_ptr<Trk::IVKalState> state (m_iVertexFitter->makeState());
833  // Robustness
834  int robustness = 0;
835  m_iVertexFitter->setRobustness(robustness, *state);
836  // Build up the topology
837  // Vertex list
838  std::vector<Trk::VertexID> vrtList;
839  // K_S0 vertex
840  Trk::VertexID vK0ID;
841  if (m_constrK0) {
842  vK0ID = m_iVertexFitter->startVertex(tracksK0,massesK0, *state, mass_k0);
843  } else {
844  vK0ID = m_iVertexFitter->startVertex(tracksK0,massesK0, *state);
845  }
846  vrtList.push_back(vK0ID);
847  // D0 vertex
848  Trk::VertexID vD0ID;
849  if (m_constrD0) {
850  if(tagD0) vD0ID = m_iVertexFitter->nextVertex(tracksD0,massesD0, *state, mass_d0);
851  else vD0ID = m_iVertexFitter->nextVertex(tracksD0,massesD0b, *state, mass_d0);
852  } else {
853  if(tagD0) vD0ID = m_iVertexFitter->nextVertex(tracksD0,massesD0, *state);
854  else vD0ID = m_iVertexFitter->nextVertex(tracksD0,massesD0b, *state);
855  }
856  vrtList.push_back(vD0ID);
857  // B vertex including Jpsi+pi
858  Trk::VertexID vBcID = m_iVertexFitter->nextVertex(tracksJpsipi,massesJpsipi,vrtList, *state);
859  if (m_constrJpsi) {
860  std::vector<Trk::VertexID> cnstV;
861  cnstV.clear();
862  if ( !m_iVertexFitter->addMassConstraint(vBcID,tracksJpsi,cnstV, *state, m_mass_jpsi).isSuccess() ) {
863  ATH_MSG_WARNING("addMassConstraint failed");
864  //return StatusCode::FAILURE;
865  }
866  }
867  // Do the work
868  std::unique_ptr<Trk::VxCascadeInfo> result(m_iVertexFitter->fitCascade(*state));
869 
870  if (result != nullptr) {
871 
872  // reset links to original tracks
873  BPhysPVCascadeTools::PrepareVertexLinks(result.get(), trackContainer);
874  ATH_MSG_DEBUG("storing tracks " << ((result->vertices())[0])->trackParticle(0) << ", "
875  << ((result->vertices())[0])->trackParticle(1) << ", "
876  << ((result->vertices())[1])->trackParticle(0) << ", "
877  << ((result->vertices())[1])->trackParticle(1) << ", "
878  << ((result->vertices())[2])->trackParticle(0) << ", "
879  << ((result->vertices())[2])->trackParticle(1) << ", "
880  << ((result->vertices())[2])->trackParticle(2));
881  // necessary to prevent memory leak
882  result->setSVOwnership(true);
883 
884  // Chi2/DOF cut
885  double bChi2DOF = result->fitChi2()/result->nDoF();
886  ATH_MSG_DEBUG("Candidate chi2/DOF is " << bChi2DOF);
887  bool chi2CutPassed = (m_chi2cut <= 0.0 || bChi2DOF < m_chi2cut);
888 
889  const std::vector< std::vector<TLorentzVector> > &moms = result->getParticleMoms();
890  double mass = m_CascadeTools->invariantMass(moms[2]);
891  if(chi2CutPassed) {
892  if (mass >= m_MassLower && mass <= m_MassUpper) {
893  cascadeinfoContainer->push_back(result.release());
894  } else {
895  ATH_MSG_DEBUG("Candidate rejected by the mass cut: mass = "
896  << mass << " != (" << m_MassLower << ", " << m_MassUpper << ")" );
897  }
898  }
899  }
900 
901  } //Iterate over K0 vertices
902 
903  } //Iterate over D0 vertices
904 
905  } //Iterate over Jpsi+pi vertices
906 
907  ATH_MSG_DEBUG("cascadeinfoContainer size " << cascadeinfoContainer->size());
908 
909  return StatusCode::SUCCESS;
910  }

◆ 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::JpsiPlusDs1Cascade::m_cascadeOutputsKeys
private

Definition at line 53 of file JpsiPlusDs1Cascade.h.

◆ m_CascadeTools

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

Definition at line 92 of file JpsiPlusDs1Cascade.h.

◆ m_chi2cut

double DerivationFramework::JpsiPlusDs1Cascade::m_chi2cut
private

Definition at line 86 of file JpsiPlusDs1Cascade.h.

◆ m_constrD0

bool DerivationFramework::JpsiPlusDs1Cascade::m_constrD0
private

Definition at line 83 of file JpsiPlusDs1Cascade.h.

◆ m_constrJpsi

bool DerivationFramework::JpsiPlusDs1Cascade::m_constrJpsi
private

Definition at line 85 of file JpsiPlusDs1Cascade.h.

◆ m_constrK0

bool DerivationFramework::JpsiPlusDs1Cascade::m_constrK0
private

Definition at line 84 of file JpsiPlusDs1Cascade.h.

◆ m_D0MassLower

double DerivationFramework::JpsiPlusDs1Cascade::m_D0MassLower
private

Definition at line 61 of file JpsiPlusDs1Cascade.h.

◆ m_D0MassUpper

double DerivationFramework::JpsiPlusDs1Cascade::m_D0MassUpper
private

Definition at line 62 of file JpsiPlusDs1Cascade.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::JpsiPlusDs1Cascade::m_DoVertexType
private

Definition at line 100 of file JpsiPlusDs1Cascade.h.

◆ m_DstMassLower

double DerivationFramework::JpsiPlusDs1Cascade::m_DstMassLower
private

Definition at line 65 of file JpsiPlusDs1Cascade.h.

◆ m_DstMassUpper

double DerivationFramework::JpsiPlusDs1Cascade::m_DstMassUpper
private

Definition at line 66 of file JpsiPlusDs1Cascade.h.

◆ m_Dx_pid

int DerivationFramework::JpsiPlusDs1Cascade::m_Dx_pid
private

Definition at line 82 of file JpsiPlusDs1Cascade.h.

◆ m_eventInfo_key

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

Definition at line 88 of file JpsiPlusDs1Cascade.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::JpsiPlusDs1Cascade::m_hypoName
private

name of the mass hypothesis.

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

Definition at line 96 of file JpsiPlusDs1Cascade.h.

◆ m_iVertexFitter

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

Definition at line 89 of file JpsiPlusDs1Cascade.h.

◆ m_jpsiMassLower

double DerivationFramework::JpsiPlusDs1Cascade::m_jpsiMassLower
private

Definition at line 57 of file JpsiPlusDs1Cascade.h.

◆ m_jpsiMassUpper

double DerivationFramework::JpsiPlusDs1Cascade::m_jpsiMassUpper
private

Definition at line 58 of file JpsiPlusDs1Cascade.h.

◆ m_jpsipiMassLower

double DerivationFramework::JpsiPlusDs1Cascade::m_jpsipiMassLower
private

Definition at line 59 of file JpsiPlusDs1Cascade.h.

◆ m_jpsipiMassUpper

double DerivationFramework::JpsiPlusDs1Cascade::m_jpsipiMassUpper
private

Definition at line 60 of file JpsiPlusDs1Cascade.h.

◆ m_K0MassLower

double DerivationFramework::JpsiPlusDs1Cascade::m_K0MassLower
private

Definition at line 63 of file JpsiPlusDs1Cascade.h.

◆ m_K0MassUpper

double DerivationFramework::JpsiPlusDs1Cascade::m_K0MassUpper
private

Definition at line 64 of file JpsiPlusDs1Cascade.h.

◆ m_mass_jpsi

double DerivationFramework::JpsiPlusDs1Cascade::m_mass_jpsi
private

Definition at line 81 of file JpsiPlusDs1Cascade.h.

◆ m_MassLower

double DerivationFramework::JpsiPlusDs1Cascade::m_MassLower
private

Definition at line 67 of file JpsiPlusDs1Cascade.h.

◆ m_MassUpper

double DerivationFramework::JpsiPlusDs1Cascade::m_MassUpper
private

Definition at line 68 of file JpsiPlusDs1Cascade.h.

◆ m_particleDataTable

const HepPDT::ParticleDataTable* DerivationFramework::JpsiPlusDs1Cascade::m_particleDataTable
private

Definition at line 80 of file JpsiPlusDs1Cascade.h.

◆ m_PV_max

int DerivationFramework::JpsiPlusDs1Cascade::m_PV_max
private

Definition at line 99 of file JpsiPlusDs1Cascade.h.

◆ m_PV_minNTracks

size_t DerivationFramework::JpsiPlusDs1Cascade::m_PV_minNTracks
private

Definition at line 101 of file JpsiPlusDs1Cascade.h.

◆ m_pvRefitter

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

Definition at line 90 of file JpsiPlusDs1Cascade.h.

◆ m_refitPV

bool DerivationFramework::JpsiPlusDs1Cascade::m_refitPV
private

Definition at line 94 of file JpsiPlusDs1Cascade.h.

◆ m_refPVContainerName

std::string DerivationFramework::JpsiPlusDs1Cascade::m_refPVContainerName
private

Definition at line 95 of file JpsiPlusDs1Cascade.h.

◆ m_V0Tools

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

Definition at line 91 of file JpsiPlusDs1Cascade.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vertexContainerKey

std::string DerivationFramework::JpsiPlusDs1Cascade::m_vertexContainerKey
private

Definition at line 50 of file JpsiPlusDs1Cascade.h.

◆ m_vertexD0ContainerKey

std::string DerivationFramework::JpsiPlusDs1Cascade::m_vertexD0ContainerKey
private

Definition at line 51 of file JpsiPlusDs1Cascade.h.

◆ m_vertexK0ContainerKey

std::string DerivationFramework::JpsiPlusDs1Cascade::m_vertexK0ContainerKey
private

Definition at line 52 of file JpsiPlusDs1Cascade.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::JpsiPlusDs1Cascade::m_vtx0Daug1MassHypo
private

Definition at line 72 of file JpsiPlusDs1Cascade.h.

◆ m_vtx0Daug2MassHypo

double DerivationFramework::JpsiPlusDs1Cascade::m_vtx0Daug2MassHypo
private

Definition at line 73 of file JpsiPlusDs1Cascade.h.

◆ m_vtx0Daug3MassHypo

double DerivationFramework::JpsiPlusDs1Cascade::m_vtx0Daug3MassHypo
private

Definition at line 74 of file JpsiPlusDs1Cascade.h.

◆ m_vtx0MassHypo

double DerivationFramework::JpsiPlusDs1Cascade::m_vtx0MassHypo
private

Definition at line 69 of file JpsiPlusDs1Cascade.h.

◆ m_vtx1Daug1MassHypo

double DerivationFramework::JpsiPlusDs1Cascade::m_vtx1Daug1MassHypo
private

Definition at line 75 of file JpsiPlusDs1Cascade.h.

◆ m_vtx1Daug2MassHypo

double DerivationFramework::JpsiPlusDs1Cascade::m_vtx1Daug2MassHypo
private

Definition at line 76 of file JpsiPlusDs1Cascade.h.

◆ m_vtx1MassHypo

double DerivationFramework::JpsiPlusDs1Cascade::m_vtx1MassHypo
private

Definition at line 70 of file JpsiPlusDs1Cascade.h.

◆ m_vtx2Daug1MassHypo

double DerivationFramework::JpsiPlusDs1Cascade::m_vtx2Daug1MassHypo
private

Definition at line 77 of file JpsiPlusDs1Cascade.h.

◆ m_vtx2Daug2MassHypo

double DerivationFramework::JpsiPlusDs1Cascade::m_vtx2Daug2MassHypo
private

Definition at line 78 of file JpsiPlusDs1Cascade.h.

◆ m_vtx2MassHypo

double DerivationFramework::JpsiPlusDs1Cascade::m_vtx2MassHypo
private

Definition at line 71 of file JpsiPlusDs1Cascade.h.

◆ m_VxPrimaryCandidateName

std::string DerivationFramework::JpsiPlusDs1Cascade::m_VxPrimaryCandidateName
private

Name of primary vertex container.

Definition at line 55 of file JpsiPlusDs1Cascade.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::JpsiPlusDs1Cascade::m_vtx0Daug2MassHypo
double m_vtx0Daug2MassHypo
Definition: JpsiPlusDs1Cascade.h:73
DerivationFramework::JpsiPlusDs1Cascade::m_eventInfo_key
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfo_key
Definition: JpsiPlusDs1Cascade.h:88
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
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
Trk::VxCascadeInfo
Definition: VxCascadeInfo.h:75
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::JpsiPlusDs1Cascade::m_vtx2Daug1MassHypo
double m_vtx2Daug1MassHypo
Definition: JpsiPlusDs1Cascade.h:77
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
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:66
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
DerivationFramework::JpsiPlusDs1Cascade::m_CascadeTools
ToolHandle< DerivationFramework::CascadeTools > m_CascadeTools
Definition: JpsiPlusDs1Cascade.h:92
xAOD::TrackParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: TrackParticle_v1.cxx:77
DerivationFramework::JpsiPlusDs1Cascade::m_PV_minNTracks
size_t m_PV_minNTracks
Definition: JpsiPlusDs1Cascade.h:101
DerivationFramework::JpsiPlusDs1Cascade::m_vtx0Daug3MassHypo
double m_vtx0Daug3MassHypo
Definition: JpsiPlusDs1Cascade.h:74
DerivationFramework::JpsiPlusDs1Cascade::m_constrJpsi
bool m_constrJpsi
Definition: JpsiPlusDs1Cascade.h:85
skel.it
it
Definition: skel.GENtoEVGEN.py:423
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::JpsiPlusDs1Cascade::m_vtx1MassHypo
double m_vtx1MassHypo
Definition: JpsiPlusDs1Cascade.h:70
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::JpsiPlusDs1Cascade::getParticleMass
double getParticleMass(int particlecode) const
Definition: JpsiPlusDs1Cascade.cxx:28
xAOD::VertexContainer
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
Definition: VertexContainer.h:14
x
#define x
DerivationFramework::JpsiPlusDs1Cascade::m_VxPrimaryCandidateName
std::string m_VxPrimaryCandidateName
Name of primary vertex container.
Definition: JpsiPlusDs1Cascade.h:55
dqt_zlumi_pandas.mass
mass
Definition: dqt_zlumi_pandas.py:170
DerivationFramework::JpsiPlusDs1Cascade::m_refitPV
bool m_refitPV
Definition: JpsiPlusDs1Cascade.h:94
DerivationFramework::JpsiPlusDs1Cascade::m_hypoName
std::string m_hypoName
name of the mass hypothesis.
Definition: JpsiPlusDs1Cascade.h:96
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
runBeamSpotCalibration.helper
helper
Definition: runBeamSpotCalibration.py:112
DerivationFramework::JpsiPlusDs1Cascade::m_jpsiMassUpper
double m_jpsiMassUpper
Definition: JpsiPlusDs1Cascade.h:58
DerivationFramework::JpsiPlusDs1Cascade::m_vertexContainerKey
std::string m_vertexContainerKey
Definition: JpsiPlusDs1Cascade.h:50
DerivationFramework::JpsiPlusDs1Cascade::m_D0MassUpper
double m_D0MassUpper
Definition: JpsiPlusDs1Cascade.h:62
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
DerivationFramework::JpsiPlusDs1Cascade::m_V0Tools
ToolHandle< Trk::V0Tools > m_V0Tools
Definition: JpsiPlusDs1Cascade.h:91
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::JpsiPlusDs1Cascade::m_constrK0
bool m_constrK0
Definition: JpsiPlusDs1Cascade.h:84
DerivationFramework::JpsiPlusDs1Cascade::performSearch
StatusCode performSearch(std::vector< Trk::VxCascadeInfo * > *cascadeinfoContainer) const
Definition: JpsiPlusDs1Cascade.cxx:593
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
DerivationFramework::JpsiPlusDs1Cascade::m_vtx2Daug2MassHypo
double m_vtx2Daug2MassHypo
Definition: JpsiPlusDs1Cascade.h:78
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
DerivationFramework::JpsiPlusDs1Cascade::m_refPVContainerName
std::string m_refPVContainerName
Definition: JpsiPlusDs1Cascade.h:95
lumiFormat.i
int i
Definition: lumiFormat.py:92
beamspotman.n
n
Definition: beamspotman.py:731
DerivationFramework::JpsiPlusDs1Cascade::m_vtx1Daug2MassHypo
double m_vtx1Daug2MassHypo
Definition: JpsiPlusDs1Cascade.h:76
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
DerivationFramework::JpsiPlusDs1Cascade::m_MassLower
double m_MassLower
Definition: JpsiPlusDs1Cascade.h:67
DerivationFramework::JpsiPlusDs1Cascade::m_cascadeOutputsKeys
std::vector< std::string > m_cascadeOutputsKeys
Definition: JpsiPlusDs1Cascade.h:53
DerivationFramework::JpsiPlusDs1Cascade::m_jpsiMassLower
double m_jpsiMassLower
Definition: JpsiPlusDs1Cascade.h:57
DerivationFramework::JpsiPlusDs1Cascade::m_DoVertexType
int m_DoVertexType
Definition: JpsiPlusDs1Cascade.h:100
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::JpsiPlusDs1Cascade::m_jpsipiMassLower
double m_jpsipiMassLower
Definition: JpsiPlusDs1Cascade.h:59
DerivationFramework::JpsiPlusDs1Cascade::m_chi2cut
double m_chi2cut
Definition: JpsiPlusDs1Cascade.h:86
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
DerivationFramework::JpsiPlusDs1Cascade::m_DstMassLower
double m_DstMassLower
Definition: JpsiPlusDs1Cascade.h:65
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:192
DerivationFramework::JpsiPlusDs1Cascade::m_vertexK0ContainerKey
std::string m_vertexK0ContainerKey
Definition: JpsiPlusDs1Cascade.h:52
DerivationFramework::JpsiPlusDs1Cascade::m_K0MassLower
double m_K0MassLower
Definition: JpsiPlusDs1Cascade.h:63
DerivationFramework::JpsiPlusDs1Cascade::m_PV_max
int m_PV_max
Definition: JpsiPlusDs1Cascade.h:99
DerivationFramework::JpsiPlusDs1Cascade::m_vtx0MassHypo
double m_vtx0MassHypo
Definition: JpsiPlusDs1Cascade.h:69
DerivationFramework::JpsiPlusDs1Cascade::m_particleDataTable
const HepPDT::ParticleDataTable * m_particleDataTable
Definition: JpsiPlusDs1Cascade.h:80
mc.mass_b
mass_b
Definition: mc.PhPy8EG_A14NNPDF23_gg4l_example.py:21
DerivationFramework::JpsiPlusDs1Cascade::m_vtx1Daug1MassHypo
double m_vtx1Daug1MassHypo
Definition: JpsiPlusDs1Cascade.h:75
a
TList * a
Definition: liststreamerinfos.cxx:10
DerivationFramework::JpsiPlusDs1Cascade::m_pvRefitter
ToolHandle< Analysis::PrimaryVertexRefitter > m_pvRefitter
Definition: JpsiPlusDs1Cascade.h:90
h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
DerivationFramework::JpsiPlusDs1Cascade::m_MassUpper
double m_MassUpper
Definition: JpsiPlusDs1Cascade.h:68
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
DerivationFramework::JpsiPlusDs1Cascade::m_vertexD0ContainerKey
std::string m_vertexD0ContainerKey
Definition: JpsiPlusDs1Cascade.h:51
DerivationFramework::JpsiPlusDs1Cascade::m_Dx_pid
int m_Dx_pid
Definition: JpsiPlusDs1Cascade.h:82
DerivationFramework::JpsiPlusDs1Cascade::m_vtx2MassHypo
double m_vtx2MassHypo
Definition: JpsiPlusDs1Cascade.h:71
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
DerivationFramework::JpsiPlusDs1Cascade::m_D0MassLower
double m_D0MassLower
Definition: JpsiPlusDs1Cascade.h:61
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
DerivationFramework::JpsiPlusDs1Cascade::m_iVertexFitter
ToolHandle< Trk::TrkVKalVrtFitter > m_iVertexFitter
Definition: JpsiPlusDs1Cascade.h:89
DerivationFramework::JpsiPlusDs1Cascade::m_mass_jpsi
double m_mass_jpsi
Definition: JpsiPlusDs1Cascade.h:81
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
DerivationFramework::JpsiPlusDs1Cascade::m_vtx0Daug1MassHypo
double m_vtx0Daug1MassHypo
Definition: JpsiPlusDs1Cascade.h:72
DerivationFramework::JpsiPlusDs1Cascade::m_jpsipiMassUpper
double m_jpsipiMassUpper
Definition: JpsiPlusDs1Cascade.h:60
DerivationFramework::JpsiPlusDs1Cascade::m_K0MassUpper
double m_K0MassUpper
Definition: JpsiPlusDs1Cascade.h:64
DerivationFramework::JpsiPlusDs1Cascade::m_constrD0
bool m_constrD0
Definition: JpsiPlusDs1Cascade.h:83
DerivationFramework::JpsiPlusDs1Cascade::m_DstMassUpper
double m_DstMassUpper
Definition: JpsiPlusDs1Cascade.h:66
xAOD::TrackParticle_v1::phi
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)
fitman.k
k
Definition: fitman.py:528