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

#include <MuPlusDpstCascade.h>

Inheritance diagram for DerivationFramework::MuPlusDpstCascade:
Collaboration diagram for DerivationFramework::MuPlusDpstCascade:

Public Member Functions

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

Static Public Member Functions

static const InterfaceID & interfaceID ()
 

Protected Member Functions

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

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

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

Private Attributes

std::string m_vertexContainerKey
 
std::string m_vertexD0ContainerKey
 
std::vector< std::string > m_cascadeOutputsKeys
 
std::string m_VxPrimaryCandidateName
 Name of primary vertex container. More...
 
double m_MuPiMassLower
 
double m_MuPiMassUpper
 
double m_D0MassLower
 
double m_D0MassUpper
 
double m_DstMassLower
 
double m_DstMassUpper
 
double m_DstMassUpperAft
 
double m_MassLower
 
double m_MassUpper
 
double m_vtx0MassHypo
 
double m_vtx1MassHypo
 
double m_vtx0Daug1MassHypo
 
double m_vtx0Daug2MassHypo
 
double m_vtx1Daug1MassHypo
 
double m_vtx1Daug2MassHypo
 
int m_Dx_pid
 
bool m_constrD0
 
bool m_constrMuPi
 
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
 
std::unique_ptr< InDet::InDetTrackSelectionToolm_trackSelectionTools
 
ServiceHandle< IPartPropSvc > m_partPropSvc {this, "PartPropSvc", "PartPropSvc"}
 
bool m_refitPV
 
std::string m_refPVContainerName
 
std::string m_hypoName
 name of the mass hypothesis. More...
 
int m_PV_max
 
int m_DoVertexType
 
size_t m_PV_minNTracks
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 38 of file MuPlusDpstCascade.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

◆ MuPlusDpstCascade()

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

Definition at line 424 of file MuPlusDpstCascade.cxx.

424  : AthAlgTool(t,n,p),
427  m_cascadeOutputsKeys{ "MuPlusDpstCascadeVtx1", "MuPlusDpstCascadeVtx2" },
428  m_VxPrimaryCandidateName("PrimaryVertices"),
429  m_MuPiMassLower(0.0),
430  m_MuPiMassUpper(10000.0),
431  m_D0MassLower(0.0),
432  m_D0MassUpper(10000.0),
433  m_DstMassLower(0.0),
434  m_DstMassUpper(10000.0),
435  m_DstMassUpperAft(10000.0),
436  m_MassLower(0.0),
437  m_MassUpper(20000.0),
438  m_vtx0MassHypo(-1),
439  m_vtx1MassHypo(-1),
444  m_Dx_pid(421),
445  m_constrD0(true),
446  m_constrMuPi(false),
447  m_chi2cut(-1.0),
448  m_iVertexFitter("Trk::TrkVKalVrtFitter"),
449  m_pvRefitter("Analysis::PrimaryVertexRefitter", this),
450  m_V0Tools("Trk::V0Tools"),
451  m_CascadeTools("DerivationFramework::CascadeTools")
452  {
453  declareProperty("MuPiVertices", m_vertexContainerKey);
455  declareProperty("VxPrimaryCandidateName", m_VxPrimaryCandidateName);
456  declareProperty("RefPVContainerName", m_refPVContainerName = "RefittedPrimaryVertices");
457  declareProperty("MuPiMassLowerCut", m_MuPiMassLower);
458  declareProperty("MuPiMassUpperCut", m_MuPiMassUpper);
459  declareProperty("D0MassLowerCut", m_D0MassLower);
460  declareProperty("D0MassUpperCut", m_D0MassUpper);
461  declareProperty("DstMassLowerCut", m_DstMassLower);
462  declareProperty("DstMassUpperCut", m_DstMassUpper);
463  declareProperty("DstMassUpperCutAft", m_DstMassUpperAft); //mass cut after cascade fit
464  declareProperty("MassLowerCut", m_MassLower);
465  declareProperty("MassUpperCut", m_MassUpper);
466  declareProperty("HypothesisName", m_hypoName = "B");
467  declareProperty("Vtx0MassHypo", m_vtx0MassHypo);
468  declareProperty("Vtx1MassHypo", m_vtx1MassHypo);
469  declareProperty("Vtx0Daug1MassHypo", m_vtx0Daug1MassHypo);
470  declareProperty("Vtx0Daug2MassHypo", m_vtx0Daug2MassHypo);
471  declareProperty("Vtx0Daug3MassHypo", m_vtx0Daug2MassHypo);
472  declareProperty("Vtx1Daug1MassHypo", m_vtx1Daug1MassHypo);
473  declareProperty("Vtx1Daug2MassHypo", m_vtx1Daug2MassHypo);
474  declareProperty("DxHypothesis", m_Dx_pid);
475  declareProperty("ApplyD0MassConstraint", m_constrD0);
476  declareProperty("ApplyMuPiMassConstraint", m_constrMuPi);
477  declareProperty("Chi2Cut", m_chi2cut);
478  declareProperty("RefitPV", m_refitPV = true);
479  declareProperty("MaxnPV", m_PV_max = 999);
480  declareProperty("MinNTracksInPV", m_PV_minNTracks = 0);
481  declareProperty("DoVertexType", m_DoVertexType = 7);
482  declareProperty("TrkVertexFitterTool", m_iVertexFitter);
483  declareProperty("PVRefitter", m_pvRefitter);
484  declareProperty("V0Tools", m_V0Tools);
485  declareProperty("CascadeTools", m_CascadeTools);
486  declareProperty("CascadeVertexCollections", m_cascadeOutputsKeys);
487  }

◆ ~MuPlusDpstCascade()

DerivationFramework::MuPlusDpstCascade::~MuPlusDpstCascade ( )

Definition at line 489 of file MuPlusDpstCascade.cxx.

489 { }

Member Function Documentation

◆ addBranches()

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

Pass the thinning service

Implements DerivationFramework::IAugmentationTool.

Definition at line 62 of file MuPlusDpstCascade.cxx.

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

◆ declareGaudiProperty() [1/4]

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

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

Definition at line 170 of file AthCommonDataStore.h.

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

◆ declareGaudiProperty() [2/4]

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

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

Definition at line 156 of file AthCommonDataStore.h.

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

◆ declareGaudiProperty() [3/4]

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

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

Definition at line 184 of file AthCommonDataStore.h.

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

◆ declareGaudiProperty() [4/4]

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

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

Definition at line 199 of file AthCommonDataStore.h.

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

◆ declareProperty() [1/6]

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

Declare a new Gaudi property.

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

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

Definition at line 245 of file AthCommonDataStore.h.

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

◆ declareProperty() [2/6]

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

Declare a new Gaudi property.

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

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

Definition at line 221 of file AthCommonDataStore.h.

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

◆ declareProperty() [3/6]

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

Definition at line 259 of file AthCommonDataStore.h.

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

◆ declareProperty() [4/6]

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

Declare a new Gaudi property.

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

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

Definition at line 333 of file AthCommonDataStore.h.

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

◆ declareProperty() [5/6]

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

Declare a new Gaudi property.

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

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

Definition at line 352 of file AthCommonDataStore.h.

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

◆ declareProperty() [6/6]

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

Definition at line 145 of file AthCommonDataStore.h.

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

◆ detStore()

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

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

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

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

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

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

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

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

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

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

Add StoreName to extra input/output deps as needed.

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

◆ initialize()

StatusCode DerivationFramework::MuPlusDpstCascade::initialize ( )
overridevirtual

Definition at line 28 of file MuPlusDpstCascade.cxx.

28  {
29  // retrieving vertex Fitter
30  ATH_CHECK( m_iVertexFitter.retrieve());
31 
32  // retrieving the V0 tools
33  ATH_CHECK( m_V0Tools.retrieve());
34 
35  // retrieving the Cascade tools
36  ATH_CHECK( m_CascadeTools.retrieve());
37 
39 
40  //======================== inDetTrack selection tool ==================
41  m_trackSelectionTools = std::make_unique<InDet::InDetTrackSelectionTool>("TrackSelector");
42  ANA_CHECK(m_trackSelectionTools->setProperty("CutLevel", "LoosePrimary"));
43  ANA_CHECK(m_trackSelectionTools->initialize() );
44  //=====================================================================
45 
46  ATH_CHECK( m_partPropSvc.retrieve() );
47  auto pdt = m_partPropSvc->PDT();
48 
49  // retrieve particle masses
52 
57 
58  return StatusCode::SUCCESS;
59  }

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

Definition at line 41 of file MuPlusDpstCascade.h.

41 { return IID_MuPlusDpstCascade;}

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

Definition at line 491 of file MuPlusDpstCascade.cxx.

492  {
493 
494  assert(cascadeinfoContainer!=nullptr);
495 
496  // Get TrackParticle container (for setting links to the original tracks)
497  const xAOD::TrackParticleContainer *trackContainer(nullptr);
498  ATH_CHECK(evtStore()->retrieve(trackContainer , "InDetTrackParticles" ));
499 
500  // Get mu+pi container
501  const xAOD::VertexContainer *MuPiContainer(nullptr);
502  ATH_CHECK(evtStore()->retrieve(MuPiContainer , m_vertexContainerKey ));
503 
504  // Get D0 container
505  const xAOD::VertexContainer *d0Container(nullptr);
506  ATH_CHECK(evtStore()->retrieve(d0Container , m_vertexD0ContainerKey )); //"D0Vertices"
507 
508  double mass_d0 = m_vtx1MassHypo;
509  std::vector<const xAOD::TrackParticle*> tracksMuPi;
510  std::vector<const xAOD::TrackParticle*> tracksD0;
511  std::vector<double> massesMuPi;
512  massesMuPi.push_back(m_vtx0Daug1MassHypo); //mass mu
513  massesMuPi.push_back(m_vtx0Daug2MassHypo); //mass pi
514  std::vector<double> massesD0;
515  massesD0.push_back(m_vtx1Daug1MassHypo); //mass pi
516  massesD0.push_back(m_vtx1Daug2MassHypo); //mass K
517  std::vector<double> massesD0b; // Change the oreder of masses for D*-->D0bar pi-, D0bar->K+pi-
518  massesD0b.push_back(m_vtx1Daug2MassHypo);
519  massesD0b.push_back(m_vtx1Daug1MassHypo);
520  std::vector<double> Masses;
521  Masses.push_back(m_vtx0Daug1MassHypo); //mu
522  Masses.push_back(m_vtx0Daug2MassHypo); //pi
523  Masses.push_back(m_vtx1MassHypo); //D0
524 
525 
526 
527  // Select mu+pi_soft candidates before calling cascade fit
528  std::vector<const xAOD::Vertex*> selectedMuPiCandidates;
529  for ( auto vxcItr : *MuPiContainer ){
530  // Check mu+pi_soft candidate invariant mass and skip if need be
531  TLorentzVector p4Mup_in, p4Mum_in;
532  p4Mup_in.SetPtEtaPhiM(vxcItr->trackParticle(0)->pt(),
533  vxcItr->trackParticle(0)->eta(),
534  vxcItr->trackParticle(0)->phi(), m_vtx0Daug1MassHypo);
535  p4Mum_in.SetPtEtaPhiM(vxcItr->trackParticle(1)->pt(),
536  vxcItr->trackParticle(1)->eta(),
537  vxcItr->trackParticle(1)->phi(), m_vtx0Daug2MassHypo);
538  double mass_MuPi = (p4Mup_in + p4Mum_in).M();
539  ATH_MSG_DEBUG("mu pi_soft mass " << mass_MuPi);
540  if (mass_MuPi < m_MuPiMassLower || mass_MuPi > m_MuPiMassUpper) {
541  ATH_MSG_DEBUG(" Original mu & pi_soft candidate rejected by the mass cut: mass = "
542  << mass_MuPi << " != (" << m_MuPiMassLower << ", " << m_MuPiMassUpper << ")" );
543  continue;
544  }
545 
546  // Track selection - Loose
547  // for soft pion wich is (2nd) in MuPi vertex
548  if ( !m_trackSelectionTools->accept(vxcItr->trackParticle(1)) ){
549  ATH_MSG_DEBUG(" Original mu & pi_soft candidate rejected by the track's cut level - loose");
550  continue;
551  }
552 
553  selectedMuPiCandidates.push_back(vxcItr);
554  } //for(auto vxcItr : *MuPiContainer)
555  if(selectedMuPiCandidates.size()<1) return StatusCode::SUCCESS;
556 
557  // Select the D0/D0b candidates before calling cascade fit
558  std::vector<const xAOD::Vertex*> selectedD0Candidates;
559  for(auto vxcItr : *d0Container){
560  // Check the passed flag first
561  const xAOD::Vertex* vtx = vxcItr;
562  SG::AuxElement::Accessor<Char_t> flagAcc1("passed_D0");
563  SG::AuxElement::Accessor<Char_t> flagAcc2("passed_D0b");
564  bool isD0(true);
565  bool isD0b(true);
566  if(flagAcc1.isAvailable(*vtx)){
567  if(!flagAcc1(*vtx)) isD0 = false;
568  }
569  if(flagAcc2.isAvailable(*vtx)){
570  if(!flagAcc2(*vtx)) isD0b = false;
571  }
572  if(!(isD0||isD0b)) continue;
573 
574  // Track selection - Loose
575  if ( !m_trackSelectionTools->accept(vxcItr->trackParticle(0)) ){
576  ATH_MSG_DEBUG(" Original D0/D0-bar candidate rejected by the track's cut level - loose ");
577  continue;
578  }
579  if ( !m_trackSelectionTools->accept(vxcItr->trackParticle(1)) ){
580  ATH_MSG_DEBUG(" Original D0/D0-bar candidate rejected by the track's cut level - loose ");
581  continue;
582  }
583 
584 
585  // Ensure the total charge is correct
586  if (vxcItr->trackParticle(0)->charge() != 1 || vxcItr->trackParticle(1)->charge() != -1) {
587  ATH_MSG_DEBUG(" Original D0/D0-bar candidate rejected by the charge requirement: "
588  << vxcItr->trackParticle(0)->charge() << ", " << vxcItr->trackParticle(1)->charge() );
589  continue;
590  }
591 
592  // Check D0/D0bar candidate invariant mass and skip if need be
593  double mass_D0 = m_V0Tools->invariantMass(vxcItr,massesD0);
594  double mass_D0b = m_V0Tools->invariantMass(vxcItr,massesD0b);
595  ATH_MSG_DEBUG("D0 mass " << mass_D0 << ", D0b mass "<<mass_D0b);
596  if ((mass_D0 < m_D0MassLower || mass_D0 > m_D0MassUpper) && (mass_D0b < m_D0MassLower || mass_D0b > m_D0MassUpper)) {
597  ATH_MSG_DEBUG(" Original D0/D0-bar candidate rejected by the mass cut: mass = "
598  << mass_D0 << " != (" << m_D0MassLower << ", " << m_D0MassUpper << ") "
599  << mass_D0b << " != (" << m_D0MassLower << ", " << m_D0MassUpper << ") " );
600  continue;
601  }
602 
603  selectedD0Candidates.push_back(vxcItr);
604  } //for(auto vxcItr : *d0Container)
605  if(selectedD0Candidates.size()<1) return StatusCode::SUCCESS;
606 
607  // Select mu D*+ candidates
608  // Iterate over mu+pi_soft vertices
609  for(auto MuPiItr:selectedMuPiCandidates){
610  size_t MuPiTrkNum = MuPiItr->nTrackParticles();
611 
612  tracksMuPi.clear();
613  for( unsigned int it=0; it<MuPiTrkNum; it++) tracksMuPi.push_back(MuPiItr->trackParticle(it));
614 
615  if (tracksMuPi.size() != 2 || massesMuPi.size() != 2 ) {
616  ATH_MSG_INFO("problems with mu+pi_soft input");
617  }
618 
619  bool tagD0(true);
620  if(std::abs(m_Dx_pid)==421 && MuPiItr->trackParticle(1)->charge()==-1) tagD0 = false;
621 
622  TLorentzVector p4_pi1; // Momentum of soft pion1 = our soft pion (1)
623  p4_pi1.SetPtEtaPhiM(MuPiItr->trackParticle(1)->pt(),
624  MuPiItr->trackParticle(1)->eta(),
625  MuPiItr->trackParticle(1)->phi(), m_vtx0Daug2MassHypo);
626  // Iterate over D0/D0bar vertices
627  for(auto d0Itr : selectedD0Candidates){
628 
629  // Check identical tracks in input
630  if(std::find(tracksMuPi.cbegin(), tracksMuPi.cend(), d0Itr->trackParticle(0)) != tracksMuPi.cend()) continue;
631  if(std::find(tracksMuPi.cbegin(), tracksMuPi.cend(), d0Itr->trackParticle(1)) != tracksMuPi.cend()) continue;
632 
633  TLorentzVector p4_ka, p4_pi2;
634  if(tagD0){ // for D*+
635  p4_pi2.SetPtEtaPhiM(d0Itr->trackParticle(0)->pt(),
636  d0Itr->trackParticle(0)->eta(),
637  d0Itr->trackParticle(0)->phi(), m_vtx1Daug1MassHypo);
638  p4_ka.SetPtEtaPhiM( d0Itr->trackParticle(1)->pt(),
639  d0Itr->trackParticle(1)->eta(),
640  d0Itr->trackParticle(1)->phi(), m_vtx1Daug2MassHypo);
641  }else{ // change the order in the case of D*-
642  p4_pi2.SetPtEtaPhiM(d0Itr->trackParticle(1)->pt(),
643  d0Itr->trackParticle(1)->eta(),
644  d0Itr->trackParticle(1)->phi(), m_vtx1Daug1MassHypo);
645  p4_ka.SetPtEtaPhiM( d0Itr->trackParticle(0)->pt(),
646  d0Itr->trackParticle(0)->eta(),
647  d0Itr->trackParticle(0)->phi(), m_vtx1Daug2MassHypo);
648  }
649  // Check D*+/- candidate invariant mass and skip if need be
650  double mass_Dst= (p4_pi1 + p4_ka + p4_pi2).M();
651  ATH_MSG_DEBUG("D*+/- mass " << mass_Dst);
652  if (mass_Dst < m_DstMassLower || mass_Dst > m_DstMassUpper) {
653  ATH_MSG_DEBUG(" Original D*+/- candidate rejected by the mass cut: mass = "
654  << mass_Dst << " != (" << m_DstMassLower << ", " << m_DstMassUpper << ")" );
655  continue;
656  }
657 
658  size_t d0TrkNum = d0Itr->nTrackParticles(); //2
659  tracksD0.clear();
660  for( unsigned int it=0; it<d0TrkNum; it++) tracksD0.push_back(d0Itr->trackParticle(it));
661  if (tracksD0.size() != 2 || massesD0.size() != 2 ) {
662  ATH_MSG_INFO("problems with D0 input");
663  }
664 
665  //Leaving for the possible mods in the future
666  //SG::AuxElement::Accessor<xAOD::Vertex_v1::TrackParticleLinks_t> trackAcc( "trackParticleLinks" );
667  //ATH_MSG_INFO("CUSTOM:: "<<*(trackAcc(*d0Itr)).at(0));
668  //ATH_MSG_INFO("CUSTOM2:: "<<tracksD0.at(0)); //-> gives the same result
669 
670  // Apply the user's settings to the fitter
671  // Reset
672  std::unique_ptr<Trk::IVKalState> state (m_iVertexFitter->makeState());
673  // Robustness
674  int robustness = 0;
675  m_iVertexFitter->setRobustness(robustness, *state);
676  // Build up the topology
677  // Vertex list
678  std::vector<Trk::VertexID> vrtList;
679  // D0 vertex
680  Trk::VertexID vID;
681  if (m_constrD0) { //ApplyD0MassConstraint = true
682  if(tagD0) vID = m_iVertexFitter->startVertex(tracksD0,massesD0, *state,mass_d0);
683  else vID = m_iVertexFitter->startVertex(tracksD0,massesD0b, *state,mass_d0);
684  } else {
685  if(tagD0) vID = m_iVertexFitter->startVertex(tracksD0, massesD0,*state);
686  else vID = m_iVertexFitter->startVertex(tracksD0, massesD0b, *state);
687  }
688  vrtList.push_back(vID);
689  // B vertex including mu+pi_soft
690  Trk::VertexID vID2 = m_iVertexFitter->nextVertex(tracksMuPi,massesMuPi,vrtList,*state);
691  if (m_constrMuPi) {
692  std::vector<Trk::VertexID> cnstV;
693  cnstV.clear();
694  if ( !m_iVertexFitter->addMassConstraint(vID2,tracksMuPi,cnstV,*state,m_vtx0MassHypo).isSuccess() ) {
695  ATH_MSG_WARNING("addMassConstraint failed");
696  //return StatusCode::FAILURE;
697  }
698  }
699 
700  // Do the work
701  std::unique_ptr<Trk::VxCascadeInfo> result(m_iVertexFitter->fitCascade(*state));
702 
703  if (result != nullptr) {
704  // reset links to original tracks
705  BPhysPVCascadeTools::PrepareVertexLinks(result.get(), trackContainer);
706  ATH_MSG_DEBUG("storing tracks " << ((result->vertices())[0])->trackParticle(0) << ", "
707  << ((result->vertices())[0])->trackParticle(1) << ", "
708  << ((result->vertices())[1])->trackParticle(0) << ", "
709  << ((result->vertices())[1])->trackParticle(1));
710  // necessary to prevent memory leak
711  result->setSVOwnership(true);
712 
713  // Chi2/DOF cut
714  double bChi2DOF = result->fitChi2()/result->nDoF();
715  ATH_MSG_DEBUG("Candidate chi2/DOF is " << bChi2DOF);
716  bool chi2CutPassed = (m_chi2cut <= 0.0 || bChi2DOF < m_chi2cut);
717 
718  const std::vector< std::vector<TLorentzVector> > &moms = result->getParticleMoms();
719  const std::vector<xAOD::Vertex*> &cascadeVertices = result->vertices();
720 
721  double mass = m_CascadeTools->invariantMass(moms[1]);
722  double DstMassAft = (moms[1][1] + moms[0][0] + moms[0][1]).M(); //pi_soft + D0
723 
724  if(chi2CutPassed) {
725  if (mass >= m_MassLower && mass <= m_MassUpper) {
726  if (m_CascadeTools->pT(moms[1]) > 9500){ //B_pT
727  if (m_CascadeTools->lxy(moms[0],cascadeVertices[0],cascadeVertices[1]) > 0){ //D0_Lxy>0
728  if (DstMassAft < m_DstMassUpperAft){
729 
730  cascadeinfoContainer->push_back(result.release());
731 
732  } //Dst_m < m_DstMassUpperAft
733  } //D0_Lxy>0
734  } //B_pT
735  } else {
736  ATH_MSG_DEBUG("Candidate rejected by the mass cut: mass = "
737  << mass << " != (" << m_MassLower << ", " << m_MassUpper << ")" );
738  } //mass Upper/Lower
739  } //chi2CutPassed
740  } //if (result != nullptr)
741 
742  } //Iterate over D0 vertices
743 
744  } //Iterate over mu+pi_soft vertices
745  ATH_MSG_DEBUG("cascadeinfoContainer size " << cascadeinfoContainer->size());
746  return StatusCode::SUCCESS;
747  }

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

Definition at line 51 of file MuPlusDpstCascade.h.

◆ m_CascadeTools

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

Definition at line 81 of file MuPlusDpstCascade.h.

◆ m_chi2cut

double DerivationFramework::MuPlusDpstCascade::m_chi2cut
private

Definition at line 75 of file MuPlusDpstCascade.h.

◆ m_constrD0

bool DerivationFramework::MuPlusDpstCascade::m_constrD0
private

Definition at line 73 of file MuPlusDpstCascade.h.

◆ m_constrMuPi

bool DerivationFramework::MuPlusDpstCascade::m_constrMuPi
private

Definition at line 74 of file MuPlusDpstCascade.h.

◆ m_D0MassLower

double DerivationFramework::MuPlusDpstCascade::m_D0MassLower
private

Definition at line 57 of file MuPlusDpstCascade.h.

◆ m_D0MassUpper

double DerivationFramework::MuPlusDpstCascade::m_D0MassUpper
private

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

Definition at line 91 of file MuPlusDpstCascade.h.

◆ m_DstMassLower

double DerivationFramework::MuPlusDpstCascade::m_DstMassLower
private

Definition at line 59 of file MuPlusDpstCascade.h.

◆ m_DstMassUpper

double DerivationFramework::MuPlusDpstCascade::m_DstMassUpper
private

Definition at line 60 of file MuPlusDpstCascade.h.

◆ m_DstMassUpperAft

double DerivationFramework::MuPlusDpstCascade::m_DstMassUpperAft
private

Definition at line 61 of file MuPlusDpstCascade.h.

◆ m_Dx_pid

int DerivationFramework::MuPlusDpstCascade::m_Dx_pid
private

Definition at line 72 of file MuPlusDpstCascade.h.

◆ m_eventInfo_key

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

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

name of the mass hypothesis.

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

Definition at line 87 of file MuPlusDpstCascade.h.

◆ m_iVertexFitter

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

Definition at line 78 of file MuPlusDpstCascade.h.

◆ m_MassLower

double DerivationFramework::MuPlusDpstCascade::m_MassLower
private

Definition at line 62 of file MuPlusDpstCascade.h.

◆ m_MassUpper

double DerivationFramework::MuPlusDpstCascade::m_MassUpper
private

Definition at line 63 of file MuPlusDpstCascade.h.

◆ m_MuPiMassLower

double DerivationFramework::MuPlusDpstCascade::m_MuPiMassLower
private

Definition at line 55 of file MuPlusDpstCascade.h.

◆ m_MuPiMassUpper

double DerivationFramework::MuPlusDpstCascade::m_MuPiMassUpper
private

Definition at line 56 of file MuPlusDpstCascade.h.

◆ m_partPropSvc

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

Definition at line 83 of file MuPlusDpstCascade.h.

◆ m_PV_max

int DerivationFramework::MuPlusDpstCascade::m_PV_max
private

Definition at line 90 of file MuPlusDpstCascade.h.

◆ m_PV_minNTracks

size_t DerivationFramework::MuPlusDpstCascade::m_PV_minNTracks
private

Definition at line 92 of file MuPlusDpstCascade.h.

◆ m_pvRefitter

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

Definition at line 79 of file MuPlusDpstCascade.h.

◆ m_refitPV

bool DerivationFramework::MuPlusDpstCascade::m_refitPV
private

Definition at line 85 of file MuPlusDpstCascade.h.

◆ m_refPVContainerName

std::string DerivationFramework::MuPlusDpstCascade::m_refPVContainerName
private

Definition at line 86 of file MuPlusDpstCascade.h.

◆ m_trackSelectionTools

std::unique_ptr<InDet::InDetTrackSelectionTool> DerivationFramework::MuPlusDpstCascade::m_trackSelectionTools
private

Definition at line 82 of file MuPlusDpstCascade.h.

◆ m_V0Tools

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

Definition at line 80 of file MuPlusDpstCascade.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vertexContainerKey

std::string DerivationFramework::MuPlusDpstCascade::m_vertexContainerKey
private

Definition at line 49 of file MuPlusDpstCascade.h.

◆ m_vertexD0ContainerKey

std::string DerivationFramework::MuPlusDpstCascade::m_vertexD0ContainerKey
private

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

Definition at line 66 of file MuPlusDpstCascade.h.

◆ m_vtx0Daug2MassHypo

double DerivationFramework::MuPlusDpstCascade::m_vtx0Daug2MassHypo
private

Definition at line 67 of file MuPlusDpstCascade.h.

◆ m_vtx0MassHypo

double DerivationFramework::MuPlusDpstCascade::m_vtx0MassHypo
private

Definition at line 64 of file MuPlusDpstCascade.h.

◆ m_vtx1Daug1MassHypo

double DerivationFramework::MuPlusDpstCascade::m_vtx1Daug1MassHypo
private

Definition at line 68 of file MuPlusDpstCascade.h.

◆ m_vtx1Daug2MassHypo

double DerivationFramework::MuPlusDpstCascade::m_vtx1Daug2MassHypo
private

Definition at line 69 of file MuPlusDpstCascade.h.

◆ m_vtx1MassHypo

double DerivationFramework::MuPlusDpstCascade::m_vtx1MassHypo
private

Definition at line 65 of file MuPlusDpstCascade.h.

◆ m_VxPrimaryCandidateName

std::string DerivationFramework::MuPlusDpstCascade::m_VxPrimaryCandidateName
private

Name of primary vertex container.

Definition at line 53 of file MuPlusDpstCascade.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
DerivationFramework::MuPlusDpstCascade::m_D0MassUpper
double m_D0MassUpper
Definition: MuPlusDpstCascade.h:58
xAOD::TrackParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TrackParticle_v1.cxx:73
DerivationFramework::MuPlusDpstCascade::m_vtx0Daug1MassHypo
double m_vtx0Daug1MassHypo
Definition: MuPlusDpstCascade.h:66
DerivationFramework::MuPlusDpstCascade::m_vtx1Daug2MassHypo
double m_vtx1Daug2MassHypo
Definition: MuPlusDpstCascade.h:69
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
DerivationFramework::MuPlusDpstCascade::m_PV_max
int m_PV_max
Definition: MuPlusDpstCascade.h:90
DerivationFramework::MuPlusDpstCascade::m_refitPV
bool m_refitPV
Definition: MuPlusDpstCascade.h:85
Trk::VxCascadeInfo
Definition: VxCascadeInfo.h:75
DerivationFramework::MuPlusDpstCascade::m_eventInfo_key
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfo_key
Definition: MuPlusDpstCascade.h:77
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::MuPlusDpstCascade::m_DstMassUpperAft
double m_DstMassUpperAft
Definition: MuPlusDpstCascade.h:61
DerivationFramework::BPhysPVCascadeTools::LinkVertices
static bool LinkVertices(SG::AuxElement::Decorator< VertexLinkVector > &decor, const std::vector< const xAOD::Vertex * > &vertices, const xAOD::VertexContainer *vertexContainer, const xAOD::Vertex *vert)
Definition: BPhysPVCascadeTools.cxx:460
Base_Fragment.mass
mass
Definition: Sherpa_i/share/common/Base_Fragment.py:59
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:68
xAOD::TrackParticle_v1::charge
float charge() const
Returns the charge.
Definition: TrackParticle_v1.cxx:150
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
xAOD::TrackParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: TrackParticle_v1.cxx:77
DerivationFramework::BPhysPVCascadeTools::getParticleMass
static double getParticleMass(const HepPDT::ParticleDataTable *pdt, int pdg)
Definition: BPhysPVCascadeTools.cxx:491
DerivationFramework::MuPlusDpstCascade::m_VxPrimaryCandidateName
std::string m_VxPrimaryCandidateName
Name of primary vertex container.
Definition: MuPlusDpstCascade.h:53
DerivationFramework::MuPlusDpstCascade::m_trackSelectionTools
std::unique_ptr< InDet::InDetTrackSelectionTool > m_trackSelectionTools
Definition: MuPlusDpstCascade.h:82
skel.it
it
Definition: skel.GENtoEVGEN.py:396
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::MuPlusDpstCascade::m_constrD0
bool m_constrD0
Definition: MuPlusDpstCascade.h:73
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition: Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:324
DerivationFramework::MuPlusDpstCascade::m_MassUpper
double m_MassUpper
Definition: MuPlusDpstCascade.h:63
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
DerivationFramework::MuPlusDpstCascade::m_iVertexFitter
ToolHandle< Trk::TrkVKalVrtFitter > m_iVertexFitter
Definition: MuPlusDpstCascade.h:78
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
xAOD::VertexContainer
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
Definition: VertexContainer.h:14
x
#define x
DerivationFramework::MuPlusDpstCascade::m_refPVContainerName
std::string m_refPVContainerName
Definition: MuPlusDpstCascade.h:86
DerivationFramework::MuPlusDpstCascade::m_vtx1Daug1MassHypo
double m_vtx1Daug1MassHypo
Definition: MuPlusDpstCascade.h:68
DerivationFramework::MuPlusDpstCascade::m_vtx1MassHypo
double m_vtx1MassHypo
Definition: MuPlusDpstCascade.h:65
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
runBeamSpotCalibration.helper
helper
Definition: runBeamSpotCalibration.py:112
DerivationFramework::MuPlusDpstCascade::performSearch
StatusCode performSearch(std::vector< Trk::VxCascadeInfo * > *cascadeinfoContainer) const
Definition: MuPlusDpstCascade.cxx:491
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::MuPlusDpstCascade::m_partPropSvc
ServiceHandle< IPartPropSvc > m_partPropSvc
Definition: MuPlusDpstCascade.h:83
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
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
DerivationFramework::MuPlusDpstCascade::m_CascadeTools
ToolHandle< DerivationFramework::CascadeTools > m_CascadeTools
Definition: MuPlusDpstCascade.h:81
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
SG::Decorator
Helper class to provide type-safe access to aux data.
Definition: Decorator.h:59
xAOD::VertexAuxContainer
VertexAuxContainer_v1 VertexAuxContainer
Definition of the current jet auxiliary container.
Definition: VertexAuxContainer.h:19
lumiFormat.i
int i
Definition: lumiFormat.py:85
beamspotman.n
n
Definition: beamspotman.py:731
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
DerivationFramework::MuPlusDpstCascade::m_chi2cut
double m_chi2cut
Definition: MuPlusDpstCascade.h:75
DerivationFramework::BPhysPVCascadeTools::PrepareVertexLinks
static void PrepareVertexLinks(Trk::VxCascadeInfo *result, const xAOD::TrackParticleContainer *importedTrackCollection)
Definition: BPhysPVCascadeTools.cxx:204
DerivationFramework::MuPlusDpstCascade::m_pvRefitter
ToolHandle< Analysis::PrimaryVertexRefitter > m_pvRefitter
Definition: MuPlusDpstCascade.h:79
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
xAOD::Vertex_v1::trackParticle
const TrackParticle * trackParticle(size_t i) const
Get the pointer to a given track that was used in vertex reco.
Definition: Vertex_v1.cxx:249
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
DerivationFramework::MuPlusDpstCascade::m_Dx_pid
int m_Dx_pid
Definition: MuPlusDpstCascade.h:72
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
DerivationFramework::MuPlusDpstCascade::m_vertexD0ContainerKey
std::string m_vertexD0ContainerKey
Definition: MuPlusDpstCascade.h:50
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
DerivationFramework::MuPlusDpstCascade::m_PV_minNTracks
size_t m_PV_minNTracks
Definition: MuPlusDpstCascade.h:92
DerivationFramework::MuPlusDpstCascade::m_MuPiMassLower
double m_MuPiMassLower
Definition: MuPlusDpstCascade.h:55
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
DerivationFramework::MuPlusDpstCascade::m_vtx0MassHypo
double m_vtx0MassHypo
Definition: MuPlusDpstCascade.h:64
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
DerivationFramework::MuPlusDpstCascade::m_vertexContainerKey
std::string m_vertexContainerKey
Definition: MuPlusDpstCascade.h:49
DerivationFramework::MuPlusDpstCascade::m_DstMassUpper
double m_DstMassUpper
Definition: MuPlusDpstCascade.h:60
DerivationFramework::MuPlusDpstCascade::m_vtx0Daug2MassHypo
double m_vtx0Daug2MassHypo
Definition: MuPlusDpstCascade.h:67
mc.mass_b
mass_b
Definition: mc.PhPy8EG_A14NNPDF23_gg4l_example.py:21
a
TList * a
Definition: liststreamerinfos.cxx:10
h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
DerivationFramework::MuPlusDpstCascade::m_DstMassLower
double m_DstMassLower
Definition: MuPlusDpstCascade.h:59
DerivationFramework::MuPlusDpstCascade::m_V0Tools
ToolHandle< Trk::V0Tools > m_V0Tools
Definition: MuPlusDpstCascade.h:80
DerivationFramework::MuPlusDpstCascade::m_MuPiMassUpper
double m_MuPiMassUpper
Definition: MuPlusDpstCascade.h:56
DerivationFramework::MuPlusDpstCascade::m_MassLower
double m_MassLower
Definition: MuPlusDpstCascade.h:62
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
DerivationFramework::MuPlusDpstCascade::m_DoVertexType
int m_DoVertexType
Definition: MuPlusDpstCascade.h:91
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
DerivationFramework::MuPlusDpstCascade::m_cascadeOutputsKeys
std::vector< std::string > m_cascadeOutputsKeys
Definition: MuPlusDpstCascade.h:51
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::MuPlusDpstCascade::m_hypoName
std::string m_hypoName
name of the mass hypothesis.
Definition: MuPlusDpstCascade.h:87
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
DerivationFramework::MuPlusDpstCascade::m_D0MassLower
double m_D0MassLower
Definition: MuPlusDpstCascade.h:57
DerivationFramework::MuPlusDpstCascade::m_constrMuPi
bool m_constrMuPi
Definition: MuPlusDpstCascade.h:74