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

#include <PsiPlusPsiCascade.h>

Inheritance diagram for DerivationFramework::PsiPlusPsiCascade:
Collaboration diagram for DerivationFramework::PsiPlusPsiCascade:

Public Member Functions

 PsiPlusPsiCascade (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~PsiPlusPsiCascade ()=default
 
virtual StatusCode initialize () override
 
StatusCode performSearch (std::vector< Trk::VxCascadeInfo * > *cascadeinfoContainer, std::vector< Trk::VxCascadeInfo * > *cascadeinfoContainer_noConstr) 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

SG::ReadHandleKey< xAOD::VertexContainerm_vertexPsi1ContainerKey
 
SG::ReadHandleKey< xAOD::VertexContainerm_vertexPsi2ContainerKey
 
std::vector< std::string > m_vertexPsi1HypoNames
 
std::vector< std::string > m_vertexPsi2HypoNames
 
SG::WriteHandleKeyArray< xAOD::VertexContainerm_cascadeOutputsKeys
 
SG::ReadHandleKey< xAOD::VertexContainerm_VxPrimaryCandidateName
 Name of primary vertex container. More...
 
SG::ReadHandleKey< xAOD::TrackParticleContainerm_trackContainerName
 
SG::ReadHandleKey< xAOD::EventInfom_eventInfo_key
 
double m_jpsi1MassLower
 
double m_jpsi1MassUpper
 
double m_jpsi2MassLower
 
double m_jpsi2MassUpper
 
double m_diTrack1MassLower
 
double m_diTrack1MassUpper
 
double m_diTrack2MassLower
 
double m_diTrack2MassUpper
 
double m_psi1MassLower
 
double m_psi1MassUpper
 
double m_psi2MassLower
 
double m_psi2MassUpper
 
double m_MassLower
 
double m_MassUpper
 
int m_vtx1Daug_num
 
double m_vtx1Daug1MassHypo
 
double m_vtx1Daug2MassHypo
 
double m_vtx1Daug3MassHypo
 
double m_vtx1Daug4MassHypo
 
int m_vtx2Daug_num
 
double m_vtx2Daug1MassHypo
 
double m_vtx2Daug2MassHypo
 
double m_vtx2Daug3MassHypo
 
double m_vtx2Daug4MassHypo
 
double m_massPsi1
 
double m_massPsi2
 
double m_massJpsi1
 
double m_massJpsi2
 
double m_massDiTrk1
 
double m_massDiTrk2
 
bool m_constrPsi1
 
bool m_constrPsi2
 
bool m_constrJpsi1
 
bool m_constrJpsi2
 
bool m_constrDiTrk1
 
bool m_constrDiTrk2
 
double m_chi2cut_Psi1
 
double m_chi2cut_Psi2
 
double m_chi2cut
 
bool m_removeDuplicatePairs
 
unsigned int m_maxCandidates
 
ToolHandle< Trk::TrkVKalVrtFitterm_iVertexFitter
 
ToolHandle< Analysis::PrimaryVertexRefitterm_pvRefitter
 
ToolHandle< Trk::V0Toolsm_V0Tools
 
ToolHandle< DerivationFramework::CascadeToolsm_CascadeTools
 
ServiceHandle< IPartPropSvc > m_partPropSvc {this, "PartPropSvc", "PartPropSvc"}
 
bool m_refitPV
 
SG::WriteHandleKey< xAOD::VertexContainerm_refPVContainerName
 
std::string m_hypoName
 
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 33 of file PsiPlusPsiCascade.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

◆ PsiPlusPsiCascade()

DerivationFramework::PsiPlusPsiCascade::PsiPlusPsiCascade ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 258 of file PsiPlusPsiCascade.cxx.

261  m_cascadeOutputsKeys({"PsiPlusPsiCascadeVtx1", "PsiPlusPsiCascadeVtx2", "PsiPlusPsiCascadeVtx3"}),
262  m_VxPrimaryCandidateName("PrimaryVertices"),
263  m_trackContainerName("InDetTrackParticles"),
264  m_eventInfo_key("EventInfo"),
265  m_jpsi1MassLower(0.0),
266  m_jpsi1MassUpper(20000.0),
267  m_jpsi2MassLower(0.0),
268  m_jpsi2MassUpper(20000.0),
269  m_diTrack1MassLower(-1.0),
270  m_diTrack1MassUpper(-1.0),
271  m_diTrack2MassLower(-1.0),
272  m_diTrack2MassUpper(-1.0),
273  m_psi1MassLower(0.0),
274  m_psi1MassUpper(25000.0),
275  m_psi2MassLower(0.0),
276  m_psi2MassUpper(25000.0),
277  m_MassLower(0.0),
278  m_MassUpper(31000.0),
279  m_vtx1Daug_num(4),
284  m_vtx2Daug_num(4),
289  m_massPsi1(-1),
290  m_massPsi2(-1),
291  m_massJpsi1(-1),
292  m_massJpsi2(-1),
293  m_massDiTrk1(-1),
294  m_massDiTrk2(-1),
295  m_constrPsi1(false),
296  m_constrPsi2(false),
297  m_constrJpsi1(false),
298  m_constrJpsi2(false),
299  m_constrDiTrk1(false),
300  m_constrDiTrk2(false),
301  m_chi2cut_Psi1(-1.0),
302  m_chi2cut_Psi2(-1.0),
303  m_chi2cut(-1.0),
304  m_removeDuplicatePairs(false),
305  m_maxCandidates(0),
306  m_iVertexFitter("Trk::TrkVKalVrtFitter"),
307  m_pvRefitter("Analysis::PrimaryVertexRefitter", this),
308  m_V0Tools("Trk::V0Tools"),
309  m_CascadeTools("DerivationFramework::CascadeTools")
310  {
311  declareProperty("Psi1Vertices", m_vertexPsi1ContainerKey);
312  declareProperty("Psi2Vertices", m_vertexPsi2ContainerKey);
313  declareProperty("Psi1VtxHypoNames", m_vertexPsi1HypoNames);
314  declareProperty("Psi2VtxHypoNames", m_vertexPsi2HypoNames);
315  declareProperty("VxPrimaryCandidateName", m_VxPrimaryCandidateName);
316  declareProperty("TrackContainerName", m_trackContainerName);
317  declareProperty("RefPVContainerName", m_refPVContainerName = "RefittedPrimaryVertices");
318  declareProperty("Jpsi1MassLowerCut", m_jpsi1MassLower);
319  declareProperty("Jpsi1MassUpperCut", m_jpsi1MassUpper);
320  declareProperty("Jpsi2MassLowerCut", m_jpsi2MassLower);
321  declareProperty("Jpsi2MassUpperCut", m_jpsi2MassUpper);
322  declareProperty("DiTrack1MassLower", m_diTrack1MassLower); // only effective when m_vtx1Daug_num=4
323  declareProperty("DiTrack1MassUpper", m_diTrack1MassUpper); // only effective when m_vtx1Daug_num=4
324  declareProperty("DiTrack2MassLower", m_diTrack2MassLower); // only effective when m_vtx2Daug_num=4
325  declareProperty("DiTrack2MassUpper", m_diTrack2MassUpper); // only effective when m_vtx2Daug_num=4
326  declareProperty("Psi1MassLowerCut", m_psi1MassLower);
327  declareProperty("Psi1MassUpperCut", m_psi1MassUpper);
328  declareProperty("Psi2MassLowerCut", m_psi2MassLower);
329  declareProperty("Psi2MassUpperCut", m_psi2MassUpper);
330  declareProperty("MassLowerCut", m_MassLower);
331  declareProperty("MassUpperCut", m_MassUpper);
332  declareProperty("HypothesisName", m_hypoName = "TQ");
333  declareProperty("NumberOfPsi1Daughters", m_vtx1Daug_num); // 3 or 4 only
334  declareProperty("Vtx1Daug1MassHypo", m_vtx1Daug1MassHypo);
335  declareProperty("Vtx1Daug2MassHypo", m_vtx1Daug2MassHypo);
336  declareProperty("Vtx1Daug3MassHypo", m_vtx1Daug3MassHypo);
337  declareProperty("Vtx1Daug4MassHypo", m_vtx1Daug4MassHypo);
338  declareProperty("NumberOfPsi2Daughters", m_vtx2Daug_num); // 3 or 4 only
339  declareProperty("Vtx2Daug1MassHypo", m_vtx2Daug1MassHypo);
340  declareProperty("Vtx2Daug2MassHypo", m_vtx2Daug2MassHypo);
341  declareProperty("Vtx2Daug3MassHypo", m_vtx2Daug3MassHypo);
342  declareProperty("Vtx2Daug4MassHypo", m_vtx2Daug4MassHypo);
343  declareProperty("Jpsi1Mass", m_massJpsi1);
344  declareProperty("Jpsi2Mass", m_massJpsi2);
345  declareProperty("DiTrack1Mass", m_massDiTrk1);
346  declareProperty("DiTrack2Mass", m_massDiTrk2);
347  declareProperty("Psi1Mass", m_massPsi1);
348  declareProperty("Psi2Mass", m_massPsi2);
349  declareProperty("ApplyPsi1MassConstraint", m_constrPsi1);
350  declareProperty("ApplyPsi2MassConstraint", m_constrPsi2);
351  declareProperty("ApplyJpsi1MassConstraint", m_constrJpsi1);
352  declareProperty("ApplyJpsi2MassConstraint", m_constrJpsi2);
353  declareProperty("ApplyDiTrk1MassConstraint",m_constrDiTrk1); // only effective when m_vtx1Daug_num=4
354  declareProperty("ApplyDiTrk2MassConstraint",m_constrDiTrk2); // only effective when m_vtx2Daug_num=4
355  declareProperty("Chi2CutPsi1", m_chi2cut_Psi1);
356  declareProperty("Chi2CutPsi2", m_chi2cut_Psi2);
357  declareProperty("Chi2Cut", m_chi2cut);
358  declareProperty("RemoveDuplicatePairs", m_removeDuplicatePairs); // only effective when m_vertexPsi1ContainerKey == m_vertexPsi2ContainerKey
359  declareProperty("MaxCandidates", m_maxCandidates);
360  declareProperty("RefitPV", m_refitPV = true);
361  declareProperty("MaxnPV", m_PV_max = 1000);
362  declareProperty("MinNTracksInPV", m_PV_minNTracks = 0);
363  declareProperty("DoVertexType", m_DoVertexType = 7);
364  declareProperty("TrkVertexFitterTool", m_iVertexFitter);
365  declareProperty("PVRefitter", m_pvRefitter);
366  declareProperty("V0Tools", m_V0Tools);
367  declareProperty("CascadeTools", m_CascadeTools);
368  declareProperty("CascadeVertexCollections", m_cascadeOutputsKeys);
369  }

◆ ~PsiPlusPsiCascade()

virtual DerivationFramework::PsiPlusPsiCascade::~PsiPlusPsiCascade ( )
virtualdefault

Member Function Documentation

◆ addBranches()

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

Pass the thinning service

Implements DerivationFramework::IAugmentationTool.

Definition at line 66 of file PsiPlusPsiCascade.cxx.

66  {
67  if ((m_vtx1Daug_num != 3 && m_vtx1Daug_num != 4) || (m_vtx2Daug_num != 3 && m_vtx2Daug_num != 4)) {
68  ATH_MSG_FATAL("Incorrect number of Psi daughters (should be 3 or 4)");
69  return StatusCode::FAILURE;
70  }
71 
72  constexpr int topoN = 3;
73  if(m_cascadeOutputsKeys.size() != topoN) {
74  ATH_MSG_FATAL("Incorrect number of VtxContainers");
75  return StatusCode::FAILURE;
76  }
77  std::array<SG::WriteHandle<xAOD::VertexContainer>, topoN> VtxWriteHandles; int ikey(0);
79  VtxWriteHandles[ikey] = SG::WriteHandle<xAOD::VertexContainer>(key);
80  ATH_CHECK( VtxWriteHandles[ikey].record(std::make_unique<xAOD::VertexContainer>(), std::make_unique<xAOD::VertexAuxContainer>()) );
81  ikey++;
82  }
83 
84  //----------------------------------------------------
85  // retrieve primary vertices
86  //----------------------------------------------------
88  ATH_CHECK( pvContainer.isValid() );
89  if (pvContainer.cptr()->size()==0) {
90  ATH_MSG_WARNING("You have no primary vertices: " << pvContainer.cptr()->size());
91  return StatusCode::RECOVERABLE;
92  }
93 
94  //----------------------------------------------------
95  // Record refitted primary vertices
96  //----------------------------------------------------
98  if(m_refitPV) {
100  ATH_CHECK( refPvContainer.record(std::make_unique<xAOD::VertexContainer>(), std::make_unique<xAOD::VertexAuxContainer>()) );
101  }
102 
103  std::vector<Trk::VxCascadeInfo*> cascadeinfoContainer;
104  std::vector<Trk::VxCascadeInfo*> cascadeinfoContainer_noConstr;
105  ATH_CHECK(performSearch(&cascadeinfoContainer,&cascadeinfoContainer_noConstr));
106 
108  ATH_CHECK( evt.isValid() );
109  BPhysPVCascadeTools helper(&(*m_CascadeTools), evt.cptr());
110  helper.SetMinNTracksInPV(m_PV_minNTracks);
111 
112  // Decorators for the main vertex: chi2, ndf, pt and pt error, plus the V0 vertex variables
113  SG::AuxElement::Decorator<VertexLinkVector> CascadeLinksDecor("CascadeVertexLinks");
114  SG::AuxElement::Decorator<VertexLinkVector> Psi1LinksDecor("Psi1VertexLinks");
115  SG::AuxElement::Decorator<VertexLinkVector> Psi2LinksDecor("Psi2VertexLinks");
116  SG::AuxElement::Decorator<float> chi2_decor("ChiSquared");
117  SG::AuxElement::Decorator<int> ndof_decor("nDoF");
118  SG::AuxElement::Decorator<float> chi2_nc_decor("ChiSquared_nc");
119  SG::AuxElement::Decorator<int> ndof_nc_decor("nDoF_nc");
120  SG::AuxElement::Decorator<float> Pt_decor("Pt");
121  SG::AuxElement::Decorator<float> PtErr_decor("PtErr");
122  SG::AuxElement::Decorator<float> chi2_SV1_decor("ChiSquared_SV1");
123  SG::AuxElement::Decorator<float> chi2_nc_SV1_decor("ChiSquared_nc_SV1");
124  SG::AuxElement::Decorator<float> chi2_V1_decor("ChiSquared_V1");
125  SG::AuxElement::Decorator<int> ndof_V1_decor("nDoF_V1");
126  SG::AuxElement::Decorator<float> lxy_SV1_decor("lxy_SV1");
127  SG::AuxElement::Decorator<float> lxyErr_SV1_decor("lxyErr_SV1");
128  SG::AuxElement::Decorator<float> a0xy_SV1_decor("a0xy_SV1");
129  SG::AuxElement::Decorator<float> a0xyErr_SV1_decor("a0xyErr_SV1");
130  SG::AuxElement::Decorator<float> a0z_SV1_decor("a0z_SV1");
131  SG::AuxElement::Decorator<float> a0zErr_SV1_decor("a0zErr_SV1");
132  SG::AuxElement::Decorator<float> chi2_SV2_decor("ChiSquared_SV2");
133  SG::AuxElement::Decorator<float> chi2_nc_SV2_decor("ChiSquared_nc_SV2");
134  SG::AuxElement::Decorator<float> chi2_V2_decor("ChiSquared_V2");
135  SG::AuxElement::Decorator<int> ndof_V2_decor("nDoF_V2");
136  SG::AuxElement::Decorator<float> lxy_SV2_decor("lxy_SV2");
137  SG::AuxElement::Decorator<float> lxyErr_SV2_decor("lxyErr_SV2");
138  SG::AuxElement::Decorator<float> a0xy_SV2_decor("a0xy_SV2");
139  SG::AuxElement::Decorator<float> a0xyErr_SV2_decor("a0xyErr_SV2");
140  SG::AuxElement::Decorator<float> a0z_SV2_decor("a0z_SV2");
141  SG::AuxElement::Decorator<float> a0zErr_SV2_decor("a0zErr_SV2");
142 
143  // Get the container and identify the input Psi's
145  ATH_CHECK( psi1Container.isValid() );
147  ATH_CHECK( psi2Container.isValid() );
148 
149  for(size_t ic=0; ic<cascadeinfoContainer.size(); ic++) {
150  Trk::VxCascadeInfo* cascade_info = cascadeinfoContainer[ic];
151  if(cascade_info==nullptr) {
152  ATH_MSG_ERROR("CascadeInfo is null");
153  continue;
154  }
155 
156  Trk::VxCascadeInfo* cascade_info_noConstr = cascadeinfoContainer_noConstr[ic];
157 
158  const std::vector<xAOD::Vertex*> &cascadeVertices = cascade_info->vertices();
159  if(cascadeVertices.size() != topoN) ATH_MSG_ERROR("Incorrect number of vertices");
160  if(cascadeVertices[0]==nullptr || cascadeVertices[1]==nullptr || cascadeVertices[2]==nullptr) ATH_MSG_ERROR("Error null vertex");
161  // Keep vertices
162  for(int i=0; i<topoN; i++) VtxWriteHandles[i].ptr()->push_back(cascadeVertices[i]);
163 
164  cascade_info->setSVOwnership(false); // Prevent Container from deleting vertices
165  const auto mainVertex = cascadeVertices[2]; // this is the mother vertex
166  const std::vector< std::vector<TLorentzVector> > &moms = cascade_info->getParticleMoms();
167 
168  // Set links to cascade vertices
169  std::vector<VertexLink> precedingVertexLinks;
170  VertexLink vertexLink1;
171  vertexLink1.setElement(cascadeVertices[0]);
172  vertexLink1.setStorableObject(*VtxWriteHandles[0].ptr());
173  if( vertexLink1.isValid() ) precedingVertexLinks.push_back( vertexLink1 );
174  VertexLink vertexLink2;
175  vertexLink2.setElement(cascadeVertices[1]);
176  vertexLink2.setStorableObject(*VtxWriteHandles[1].ptr());
177  if( vertexLink2.isValid() ) precedingVertexLinks.push_back( vertexLink2 );
178  CascadeLinksDecor(*mainVertex) = precedingVertexLinks;
179 
180  // Identify the input Psi2
181  const xAOD::Vertex* psi2Vertex(0);
182  if(m_vtx2Daug_num==4) psi2Vertex = BPhysPVCascadeTools::FindVertex<4>(psi2Container.cptr(), cascadeVertices[1]);
183  else psi2Vertex = BPhysPVCascadeTools::FindVertex<3>(psi2Container.cptr(), cascadeVertices[1]);
184  // Identify the input Psi1
185  const xAOD::Vertex* psi1Vertex(0);
186  if(m_vtx1Daug_num==4) psi1Vertex = BPhysPVCascadeTools::FindVertex<4>(psi1Container.cptr(), cascadeVertices[0]);
187  else psi1Vertex = BPhysPVCascadeTools::FindVertex<3>(psi1Container.cptr(), cascadeVertices[0]);
188 
189  // Set links to input vertices
190  std::vector<const xAOD::Vertex*> psi2VerticestoLink;
191  if(psi2Vertex) psi2VerticestoLink.push_back(psi2Vertex);
192  else ATH_MSG_WARNING("Could not find linking Jpsi");
193  if(!BPhysPVCascadeTools::LinkVertices(Psi2LinksDecor, psi2VerticestoLink, psi2Container.cptr(), mainVertex)) ATH_MSG_ERROR("Error decorating with Psi2 vertex");
194 
195  std::vector<const xAOD::Vertex*> psi1VerticestoLink;
196  if(psi1Vertex) psi1VerticestoLink.push_back(psi1Vertex);
197  else ATH_MSG_WARNING("Could not find linking Psi1");
198  if(!BPhysPVCascadeTools::LinkVertices(Psi1LinksDecor, psi1VerticestoLink, psi1Container.cptr(), mainVertex)) ATH_MSG_ERROR("Error decorating with Psi1 vertex");
199 
200  xAOD::BPhysHypoHelper vtx(m_hypoName, mainVertex);
201 
202  // Get refitted track momenta from all vertices, charged tracks only
203  BPhysPVCascadeTools::SetVectorInfo(vtx, cascade_info);
204  vtx.setPass(true);
205 
206  //
207  // Decorate main vertex
208  //
209  // mass, mass error
210  // https://gitlab.cern.ch/atlas/athena/-/blob/21.2/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/VxCascadeInfo.h
211  BPHYS_CHECK( vtx.setMass(m_CascadeTools->invariantMass(moms[2])) );
212  BPHYS_CHECK( vtx.setMassErr(m_CascadeTools->invariantMassError(moms[2],cascade_info->getCovariance()[1])) );
213  // pt and pT error (the default pt of mainVertex is != the pt of the full cascade fit!)
214  Pt_decor(*mainVertex) = m_CascadeTools->pT(moms[2]);
215  PtErr_decor(*mainVertex) = m_CascadeTools->pTError(moms[2],cascade_info->getCovariance()[1]);
216  // chi2 and ndof (the default chi2 of mainVertex is != the chi2 of the full cascade fit!)
217  chi2_decor(*mainVertex) = cascade_info->fitChi2();
218  ndof_decor(*mainVertex) = cascade_info->nDoF();
219  chi2_nc_decor(*mainVertex) = cascade_info_noConstr ? cascade_info_noConstr->fitChi2() : -999999.;
220  ndof_nc_decor(*mainVertex) = cascade_info_noConstr ? cascade_info_noConstr->nDoF() : -1;
221 
222  // decorate the Psi1 vertex
223  chi2_SV1_decor(*cascadeVertices[0]) = m_V0Tools->chisq(cascadeVertices[0]);
224  chi2_nc_SV1_decor(*cascadeVertices[0]) = cascade_info_noConstr ? m_V0Tools->chisq(cascade_info_noConstr->vertices()[0]) : -999999.;
225  chi2_V1_decor(*cascadeVertices[0]) = m_V0Tools->chisq(psi1Vertex);
226  ndof_V1_decor(*cascadeVertices[0]) = m_V0Tools->ndof(psi1Vertex);
227  lxy_SV1_decor(*cascadeVertices[0]) = m_CascadeTools->lxy(moms[0],cascadeVertices[0],mainVertex);
228  lxyErr_SV1_decor(*cascadeVertices[0]) = m_CascadeTools->lxyError(moms[0],cascade_info->getCovariance()[0],cascadeVertices[0],mainVertex);
229  a0z_SV1_decor(*cascadeVertices[0]) = m_CascadeTools->a0z(moms[0],cascadeVertices[0],mainVertex);
230  a0zErr_SV1_decor(*cascadeVertices[0]) = m_CascadeTools->a0zError(moms[0],cascade_info->getCovariance()[0],cascadeVertices[0],mainVertex);
231  a0xy_SV1_decor(*cascadeVertices[0]) = m_CascadeTools->a0xy(moms[0],cascadeVertices[0],mainVertex);
232  a0xyErr_SV1_decor(*cascadeVertices[0]) = m_CascadeTools->a0xyError(moms[0],cascade_info->getCovariance()[0],cascadeVertices[0],mainVertex);
233 
234  // decorate the Psi2 vertex
235  chi2_SV2_decor(*cascadeVertices[1]) = m_V0Tools->chisq(cascadeVertices[1]);
236  chi2_nc_SV2_decor(*cascadeVertices[1]) = cascade_info_noConstr ? m_V0Tools->chisq(cascade_info_noConstr->vertices()[1]) : -999999.;
237  chi2_V2_decor(*cascadeVertices[1]) = m_V0Tools->chisq(psi2Vertex);
238  ndof_V2_decor(*cascadeVertices[1]) = m_V0Tools->ndof(psi2Vertex);
239  lxy_SV2_decor(*cascadeVertices[1]) = m_CascadeTools->lxy(moms[1],cascadeVertices[1],mainVertex);
240  lxyErr_SV2_decor(*cascadeVertices[1]) = m_CascadeTools->lxyError(moms[1],cascade_info->getCovariance()[1],cascadeVertices[1],mainVertex);
241  a0z_SV2_decor(*cascadeVertices[1]) = m_CascadeTools->a0z(moms[1],cascadeVertices[1],mainVertex);
242  a0zErr_SV2_decor(*cascadeVertices[1]) = m_CascadeTools->a0zError(moms[1],cascade_info->getCovariance()[1],cascadeVertices[1],mainVertex);
243  a0xy_SV2_decor(*cascadeVertices[1]) = m_CascadeTools->a0xy(moms[1],cascadeVertices[1],mainVertex);
244  a0xyErr_SV2_decor(*cascadeVertices[1]) = m_CascadeTools->a0xyError(moms[1],cascade_info->getCovariance()[1],cascadeVertices[1],mainVertex);
245 
246  double Mass_Moth = m_CascadeTools->invariantMass(moms[2]); // size=2
247  ATH_CHECK(helper.FillCandwithRefittedVertices(m_refitPV, pvContainer.cptr(), m_refitPV ? refPvContainer.ptr() : 0, &(*m_pvRefitter), m_PV_max, m_DoVertexType, cascade_info, 2, Mass_Moth, vtx));
248  } // loop over cascadeinfoContainer
249 
250  // Deleting cascadeinfo since this won't be stored.
251  // Vertices have been kept in m_cascadeOutputs and should be owned by their container
252  for (auto cascade_info : cascadeinfoContainer) delete cascade_info;
253  for (auto cascade_info_noConstr : cascadeinfoContainer_noConstr) delete cascade_info_noConstr;
254 
255  return StatusCode::SUCCESS;
256  }

◆ 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::PsiPlusPsiCascade::initialize ( )
overridevirtual

Definition at line 23 of file PsiPlusPsiCascade.cxx.

23  {
24  // retrieving vertex Fitter
25  ATH_CHECK( m_iVertexFitter.retrieve() );
26 
27  // retrieve PV refitter
28  ATH_CHECK( m_pvRefitter.retrieve() );
29 
30  // retrieving the V0 tools
31  ATH_CHECK( m_V0Tools.retrieve() );
32 
33  // retrieving the Cascade tools
34  ATH_CHECK( m_CascadeTools.retrieve() );
35 
36  ATH_CHECK( m_vertexPsi1ContainerKey.initialize() );
37  ATH_CHECK( m_vertexPsi2ContainerKey.initialize() );
38  ATH_CHECK( m_VxPrimaryCandidateName.initialize() );
40  ATH_CHECK( m_refPVContainerName.initialize() );
41  ATH_CHECK( m_cascadeOutputsKeys.initialize() );
43 
44  ATH_CHECK( m_partPropSvc.retrieve() );
45  auto pdt = m_partPropSvc->PDT();
46 
47  // retrieve particle masses
48  // https://gitlab.cern.ch/atlas/athena/-/blob/main/Generators/TruthUtils/TruthUtils/AtlasPID.h
53 
62 
63  return StatusCode::SUCCESS;
64  }

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

Definition at line 36 of file PsiPlusPsiCascade.h.

36 { return IID_PsiPlusPsiCascade;}

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

Definition at line 371 of file PsiPlusPsiCascade.cxx.

371  {
372  ATH_MSG_DEBUG( "PsiPlusPsiCascade::performSearch" );
373  assert(cascadeinfoContainer!=nullptr && cascadeinfoContainer_noConstr!=nullptr);
374 
375  // Get TrackParticle container (for setting links to the original tracks)
377  ATH_CHECK( trackContainer.isValid() );
378 
379  std::vector<const xAOD::TrackParticle*> tracksJpsi1;
380  std::vector<const xAOD::TrackParticle*> tracksJpsi2;
381  std::vector<const xAOD::TrackParticle*> tracksDiTrk1;
382  std::vector<const xAOD::TrackParticle*> tracksDiTrk2;
383  std::vector<const xAOD::TrackParticle*> tracksPsi1;
384  std::vector<const xAOD::TrackParticle*> tracksPsi2;
385  std::vector<double> massesPsi1;
386  massesPsi1.push_back(m_vtx1Daug1MassHypo);
387  massesPsi1.push_back(m_vtx1Daug2MassHypo);
388  massesPsi1.push_back(m_vtx1Daug3MassHypo);
389  if(m_vtx1Daug_num==4) massesPsi1.push_back(m_vtx1Daug4MassHypo);
390  std::vector<double> massesPsi2;
391  massesPsi2.push_back(m_vtx2Daug1MassHypo);
392  massesPsi2.push_back(m_vtx2Daug2MassHypo);
393  massesPsi2.push_back(m_vtx2Daug3MassHypo);
394  if(m_vtx2Daug_num==4) massesPsi2.push_back(m_vtx2Daug4MassHypo);
395 
396  // Get Psi1 container
398  ATH_CHECK( psi1Container.isValid() );
399 
400  // Get Psi2 container
402  ATH_CHECK( psi2Container.isValid() );
403 
404  // Select the Psi2 candidates before calling cascade fit
405  std::vector<const xAOD::Vertex*> selectedPsi2Candidates;
406  for(auto vxcItr=psi2Container.cptr()->cbegin(); vxcItr!=psi2Container.cptr()->cend(); ++vxcItr) {
407  // Check the passed flag first
408  const xAOD::Vertex* vtx = *vxcItr;
409  bool passed = false;
410  for(size_t i=0; i<m_vertexPsi2HypoNames.size(); i++) {
412  if(flagAcc.isAvailable(*vtx) && flagAcc(*vtx)) {
413  passed |= 1;
414  }
415  }
416  if(m_vertexPsi2HypoNames.size() && !passed) continue;
417 
418  // Check Psi2 candidate invariant mass and skip if need be
419  double mass_psi2 = m_V0Tools->invariantMass(*vxcItr, massesPsi2);
420  if (mass_psi2 < m_psi2MassLower || mass_psi2 > m_psi2MassUpper) continue;
421 
422  // Add loose cut on Jpsi2 mass from Psi2 -> Jpsi2 pi+ pi-, or on phi mass from Ds+ -> phi pi+
423  TLorentzVector p4_mu1, p4_mu2;
424  p4_mu1.SetPtEtaPhiM( (*vxcItr)->trackParticle(0)->pt(),
425  (*vxcItr)->trackParticle(0)->eta(),
426  (*vxcItr)->trackParticle(0)->phi(), m_vtx2Daug1MassHypo);
427  p4_mu2.SetPtEtaPhiM( (*vxcItr)->trackParticle(1)->pt(),
428  (*vxcItr)->trackParticle(1)->eta(),
429  (*vxcItr)->trackParticle(1)->phi(), m_vtx2Daug2MassHypo);
430  double mass_jpsi2 = (p4_mu1 + p4_mu2).M();
431  if (mass_jpsi2 < m_jpsi2MassLower || mass_jpsi2 > m_jpsi2MassUpper) continue;
432 
434  TLorentzVector p4_trk1, p4_trk2;
435  p4_trk1.SetPtEtaPhiM( (*vxcItr)->trackParticle(2)->pt(),
436  (*vxcItr)->trackParticle(2)->eta(),
437  (*vxcItr)->trackParticle(2)->phi(), m_vtx2Daug3MassHypo);
438  p4_trk2.SetPtEtaPhiM( (*vxcItr)->trackParticle(3)->pt(),
439  (*vxcItr)->trackParticle(3)->eta(),
440  (*vxcItr)->trackParticle(3)->phi(), m_vtx2Daug4MassHypo);
441  double mass_diTrk2 = (p4_trk1 + p4_trk2).M();
442  if (mass_diTrk2 < m_diTrack2MassLower || mass_diTrk2 > m_diTrack2MassUpper) continue;
443  }
444 
445  double chi2DOF = (*vxcItr)->chiSquared()/(*vxcItr)->numberDoF();
446  if(m_chi2cut_Psi2>0 && chi2DOF>m_chi2cut_Psi2) continue;
447 
448  selectedPsi2Candidates.push_back(*vxcItr);
449  }
450  if(selectedPsi2Candidates.size()==0) return StatusCode::SUCCESS;
451 
452  // Select the Psi1 candidates before calling cascade fit
453  std::vector<const xAOD::Vertex*> selectedPsi1Candidates;
454  for(auto vxcItr=psi1Container.cptr()->cbegin(); vxcItr!=psi1Container.cptr()->cend(); ++vxcItr) {
455  // Check the passed flag first
456  const xAOD::Vertex* vtx = *vxcItr;
457  bool passed = false;
458  for(size_t i=0; i<m_vertexPsi1HypoNames.size(); i++) {
460  if(flagAcc.isAvailable(*vtx) && flagAcc(*vtx)) {
461  passed |= 1;
462  }
463  }
464  if(m_vertexPsi1HypoNames.size() && !passed) continue;
465 
466  // Check Psi candidate invariant mass and skip if need be
467  double mass_psi1 = m_V0Tools->invariantMass(*vxcItr,massesPsi1);
468  if(mass_psi1 < m_psi1MassLower || mass_psi1 > m_psi1MassUpper) continue;
469 
470  // Add loose cut on Jpsi1 mass from Psi1 -> Jpsi1 pi+ pi-, or on phi mass from Ds+ -> phi pi+
471  TLorentzVector p4_mu1, p4_mu2;
472  p4_mu1.SetPtEtaPhiM( (*vxcItr)->trackParticle(0)->pt(),
473  (*vxcItr)->trackParticle(0)->eta(),
474  (*vxcItr)->trackParticle(0)->phi(), m_vtx1Daug1MassHypo);
475  p4_mu2.SetPtEtaPhiM( (*vxcItr)->trackParticle(1)->pt(),
476  (*vxcItr)->trackParticle(1)->eta(),
477  (*vxcItr)->trackParticle(1)->phi(), m_vtx1Daug2MassHypo);
478  double mass_jpsi1 = (p4_mu1 + p4_mu2).M();
479  if (mass_jpsi1 < m_jpsi1MassLower || mass_jpsi1 > m_jpsi1MassUpper) continue;
480 
482  TLorentzVector p4_trk1, p4_trk2;
483  p4_trk1.SetPtEtaPhiM( (*vxcItr)->trackParticle(2)->pt(),
484  (*vxcItr)->trackParticle(2)->eta(),
485  (*vxcItr)->trackParticle(2)->phi(), m_vtx1Daug3MassHypo);
486  p4_trk2.SetPtEtaPhiM( (*vxcItr)->trackParticle(3)->pt(),
487  (*vxcItr)->trackParticle(3)->eta(),
488  (*vxcItr)->trackParticle(3)->phi(), m_vtx1Daug4MassHypo);
489  double mass_diTrk1 = (p4_trk1 + p4_trk2).M();
490  if (mass_diTrk1 < m_diTrack1MassLower || mass_diTrk1 > m_diTrack1MassUpper) continue;
491  }
492 
493  double chi2DOF = (*vxcItr)->chiSquared()/(*vxcItr)->numberDoF();
494  if(m_chi2cut_Psi1>0 && chi2DOF>m_chi2cut_Psi1) continue;
495 
496  selectedPsi1Candidates.push_back(*vxcItr);
497  }
498  if(selectedPsi1Candidates.size()==0) return StatusCode::SUCCESS;
499 
500  std::vector<std::pair<const xAOD::Vertex*, const xAOD::Vertex*> > candidatePairs;
501  for(auto psi1Itr=selectedPsi1Candidates.cbegin(); psi1Itr!=selectedPsi1Candidates.cend(); ++psi1Itr) {
502  tracksPsi1.clear();
503  for(size_t i=0; i<(*psi1Itr)->nTrackParticles(); i++) tracksPsi1.push_back((*psi1Itr)->trackParticle(i));
504  for(auto psi2Itr=selectedPsi2Candidates.cbegin(); psi2Itr!=selectedPsi2Candidates.cend(); ++psi2Itr) {
505  bool skip = false;
506  for(size_t j=0; j<(*psi2Itr)->nTrackParticles(); j++) {
507  if(std::find(tracksPsi1.cbegin(), tracksPsi1.cend(), (*psi2Itr)->trackParticle(j)) != tracksPsi1.cend()) { skip = true; break; }
508  }
509  if(skip) continue;
511  for(size_t ic=0; ic<candidatePairs.size(); ic++) {
512  const xAOD::Vertex* psi1Vertex = candidatePairs[ic].first;
513  const xAOD::Vertex* psi2Vertex = candidatePairs[ic].second;
514  if((psi1Vertex == *psi1Itr && psi2Vertex == *psi2Itr) || (psi1Vertex == *psi2Itr && psi2Vertex == *psi1Itr)) { skip = true; break; }
515  }
516  }
517  if(skip) continue;
518  candidatePairs.push_back(std::pair<const xAOD::Vertex*, const xAOD::Vertex*>(*psi1Itr,*psi2Itr));
519  }
520  }
521 
522  std::sort( candidatePairs.begin(), candidatePairs.end(), [](std::pair<const xAOD::Vertex*, const xAOD::Vertex*> a, std::pair<const xAOD::Vertex*, const xAOD::Vertex*> b) { return a.first->chiSquared()/a.first->numberDoF()+a.second->chiSquared()/a.second->numberDoF() < b.first->chiSquared()/b.first->numberDoF()+b.second->chiSquared()/b.second->numberDoF(); } );
523  if(m_maxCandidates>0 && candidatePairs.size()>m_maxCandidates) {
524  candidatePairs.erase(candidatePairs.begin()+m_maxCandidates, candidatePairs.end());
525  }
526 
527  for(size_t ic=0; ic<candidatePairs.size(); ic++) {
528  const xAOD::Vertex* psi1Vertex = candidatePairs[ic].first;
529  const xAOD::Vertex* psi2Vertex = candidatePairs[ic].second;
530 
531  tracksPsi1.clear();
532  for(size_t it=0; it<psi1Vertex->nTrackParticles(); it++) tracksPsi1.push_back(psi1Vertex->trackParticle(it));
533  if (tracksPsi1.size() != massesPsi1.size()) {
534  ATH_MSG_ERROR("Problems with Psi1 input: number of tracks or track mass inputs is not correct!");
535  }
536  tracksPsi2.clear();
537  for(size_t it=0; it<psi2Vertex->nTrackParticles(); it++) tracksPsi2.push_back(psi2Vertex->trackParticle(it));
538  if (tracksPsi2.size() != massesPsi2.size()) {
539  ATH_MSG_ERROR("Problems with Psi2 input: number of tracks or track mass inputs is not correct!");
540  }
541 
542  tracksJpsi1.clear();
543  tracksJpsi1.push_back(psi1Vertex->trackParticle(0));
544  tracksJpsi1.push_back(psi1Vertex->trackParticle(1));
545  tracksDiTrk1.clear();
546  if(m_vtx1Daug_num==4) {
547  tracksDiTrk1.push_back(psi1Vertex->trackParticle(2));
548  tracksDiTrk1.push_back(psi1Vertex->trackParticle(3));
549  }
550  tracksJpsi2.clear();
551  tracksJpsi2.push_back(psi2Vertex->trackParticle(0));
552  tracksJpsi2.push_back(psi2Vertex->trackParticle(1));
553  tracksDiTrk2.clear();
554  if(m_vtx2Daug_num==4) {
555  tracksDiTrk2.push_back(psi2Vertex->trackParticle(2));
556  tracksDiTrk2.push_back(psi2Vertex->trackParticle(3));
557  }
558 
559  TLorentzVector p4_moth;
560  TLorentzVector tmp;
561  for(size_t it=0; it<psi1Vertex->nTrackParticles(); it++) {
562  tmp.SetPtEtaPhiM(psi1Vertex->trackParticle(it)->pt(),psi1Vertex->trackParticle(it)->eta(),psi1Vertex->trackParticle(it)->phi(),massesPsi1[it]);
563  p4_moth += tmp;
564  }
565  for(size_t it=0; it<psi2Vertex->nTrackParticles(); it++) {
566  tmp.SetPtEtaPhiM(psi2Vertex->trackParticle(it)->pt(),psi2Vertex->trackParticle(it)->eta(),psi2Vertex->trackParticle(it)->phi(),massesPsi2[it]);
567  p4_moth += tmp;
568  }
569  if (p4_moth.M() < m_MassLower || p4_moth.M() > m_MassUpper) continue;
570 
571  // Apply the user's settings to the fitter
572  std::unique_ptr<Trk::IVKalState> state = m_iVertexFitter->makeState();
573  // Robustness: http://cdsweb.cern.ch/record/685551
574  int robustness = 0;
575  m_iVertexFitter->setRobustness(robustness, *state);
576  // Build up the topology
577  // Vertex list
578  std::vector<Trk::VertexID> vrtList;
579  // Psi1 vertex
580  Trk::VertexID vID1;
581  // https://gitlab.cern.ch/atlas/athena/-/blob/21.2/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/IVertexCascadeFitter.h
582  if (m_constrPsi1) {
583  vID1 = m_iVertexFitter->startVertex(tracksPsi1,massesPsi1,*state,m_massPsi1);
584  } else {
585  vID1 = m_iVertexFitter->startVertex(tracksPsi1,massesPsi1,*state);
586  }
587  vrtList.push_back(vID1);
588  // Psi2 vertex
589  Trk::VertexID vID2;
590  if (m_constrPsi2) {
591  vID2 = m_iVertexFitter->nextVertex(tracksPsi2,massesPsi2,*state,m_massPsi2);
592  } else {
593  vID2 = m_iVertexFitter->nextVertex(tracksPsi2,massesPsi2,*state);
594  }
595  vrtList.push_back(vID2);
596  // Mother vertex including Psi1 and Psi2
597  std::vector<const xAOD::TrackParticle*> tp; tp.clear();
598  std::vector<double> tp_masses; tp_masses.clear();
599  m_iVertexFitter->nextVertex(tp,tp_masses,vrtList,*state);
600  if (m_constrJpsi1) {
601  std::vector<Trk::VertexID> cnstV; cnstV.clear();
602  if ( !m_iVertexFitter->addMassConstraint(vID1,tracksJpsi1,cnstV,*state,m_massJpsi1).isSuccess() ) {
603  ATH_MSG_WARNING("addMassConstraint for Jpsi1 failed");
604  }
605  }
606  if (m_constrDiTrk1 && m_vtx1Daug_num==4 && m_massDiTrk1>0) {
607  std::vector<Trk::VertexID> cnstV; cnstV.clear();
608  if ( !m_iVertexFitter->addMassConstraint(vID1,tracksDiTrk1,cnstV,*state,m_massDiTrk1).isSuccess() ) {
609  ATH_MSG_WARNING("addMassConstraint for DiTrk1 failed");
610  }
611  }
612  if (m_constrJpsi2) {
613  std::vector<Trk::VertexID> cnstV; cnstV.clear();
614  if ( !m_iVertexFitter->addMassConstraint(vID2,tracksJpsi2,cnstV,*state,m_massJpsi2).isSuccess() ) {
615  ATH_MSG_WARNING("addMassConstraint for Jpsi2 failed");
616  }
617  }
618  if (m_constrDiTrk2 && m_vtx2Daug_num==4 && m_massDiTrk2>0) {
619  std::vector<Trk::VertexID> cnstV; cnstV.clear();
620  if ( !m_iVertexFitter->addMassConstraint(vID2,tracksDiTrk2,cnstV,*state,m_massDiTrk2).isSuccess() ) {
621  ATH_MSG_WARNING("addMassConstraint for DiTrk2 failed");
622  }
623  }
624  // Do the work
625  std::unique_ptr<Trk::VxCascadeInfo> result(m_iVertexFitter->fitCascade(*state));
626 
627  bool pass = false;
628  if (result != nullptr) {
629  for(auto v : result->vertices()) {
630  if(v->nTrackParticles()==0) {
631  std::vector<ElementLink<xAOD::TrackParticleContainer> > nullLinkVector;
632  v->setTrackParticleLinks(nullLinkVector);
633  }
634  }
635  // reset links to original tracks
636  BPhysPVCascadeTools::PrepareVertexLinks(result.get(), trackContainer.cptr());
637 
638  // necessary to prevent memory leak
639  result->setSVOwnership(true);
640 
641  // Chi2/DOF cut
642  double chi2DOF = result->fitChi2()/result->nDoF();
643  bool chi2CutPassed = (m_chi2cut <= 0.0 || chi2DOF < m_chi2cut);
644 
645  if(chi2CutPassed) {
646  cascadeinfoContainer->push_back(result.release());
647  pass = true;
648  }
649  }
650 
651  // do cascade fit again without any mass constraints
652  if(pass) {
654  std::unique_ptr<Trk::IVKalState> state (m_iVertexFitter->makeState());
655  m_iVertexFitter->setRobustness(robustness, *state);
656  std::vector<Trk::VertexID> vrtList_nc;
657  // Psi1 vertex
658  Trk::VertexID vID1_nc = m_iVertexFitter->startVertex(tracksPsi1,massesPsi1,*state);
659  vrtList_nc.push_back(vID1_nc);
660  // Psi2 vertex
661  Trk::VertexID vID2_nc = m_iVertexFitter->nextVertex(tracksPsi2,massesPsi2,*state);
662  vrtList_nc.push_back(vID2_nc);
663  // Mother vertex including Psi1 and Psi2
664  std::vector<const xAOD::TrackParticle*> tp; tp.clear();
665  std::vector<double> tp_masses; tp_masses.clear();
666  m_iVertexFitter->nextVertex(tp,tp_masses,vrtList_nc,*state);
667  // Do the work
668  std::unique_ptr<Trk::VxCascadeInfo> result_nc(m_iVertexFitter->fitCascade(*state));
669 
670  if (result_nc != nullptr) {
671  for(auto v : result_nc->vertices()) {
672  if(v->nTrackParticles()==0) {
673  std::vector<ElementLink<xAOD::TrackParticleContainer> > nullLinkVector;
674  v->setTrackParticleLinks(nullLinkVector);
675  }
676  }
677  // reset links to original tracks
678  BPhysPVCascadeTools::PrepareVertexLinks(result_nc.get(), trackContainer.cptr());
679 
680  // necessary to prevent memory leak
681  result_nc->setSVOwnership(true);
682  cascadeinfoContainer_noConstr->push_back(result_nc.release());
683  }
684  else cascadeinfoContainer_noConstr->push_back(0);
685  }
686  else cascadeinfoContainer_noConstr->push_back(0);
687  }
688  } //Iterate over candidatePairs
689 
690  return StatusCode::SUCCESS;
691  }

◆ 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

SG::WriteHandleKeyArray<xAOD::VertexContainer> DerivationFramework::PsiPlusPsiCascade::m_cascadeOutputsKeys
private

Definition at line 48 of file PsiPlusPsiCascade.h.

◆ m_CascadeTools

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

Definition at line 99 of file PsiPlusPsiCascade.h.

◆ m_chi2cut

double DerivationFramework::PsiPlusPsiCascade::m_chi2cut
private

Definition at line 92 of file PsiPlusPsiCascade.h.

◆ m_chi2cut_Psi1

double DerivationFramework::PsiPlusPsiCascade::m_chi2cut_Psi1
private

Definition at line 90 of file PsiPlusPsiCascade.h.

◆ m_chi2cut_Psi2

double DerivationFramework::PsiPlusPsiCascade::m_chi2cut_Psi2
private

Definition at line 91 of file PsiPlusPsiCascade.h.

◆ m_constrDiTrk1

bool DerivationFramework::PsiPlusPsiCascade::m_constrDiTrk1
private

Definition at line 88 of file PsiPlusPsiCascade.h.

◆ m_constrDiTrk2

bool DerivationFramework::PsiPlusPsiCascade::m_constrDiTrk2
private

Definition at line 89 of file PsiPlusPsiCascade.h.

◆ m_constrJpsi1

bool DerivationFramework::PsiPlusPsiCascade::m_constrJpsi1
private

Definition at line 86 of file PsiPlusPsiCascade.h.

◆ m_constrJpsi2

bool DerivationFramework::PsiPlusPsiCascade::m_constrJpsi2
private

Definition at line 87 of file PsiPlusPsiCascade.h.

◆ m_constrPsi1

bool DerivationFramework::PsiPlusPsiCascade::m_constrPsi1
private

Definition at line 84 of file PsiPlusPsiCascade.h.

◆ m_constrPsi2

bool DerivationFramework::PsiPlusPsiCascade::m_constrPsi2
private

Definition at line 85 of file PsiPlusPsiCascade.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_diTrack1MassLower

double DerivationFramework::PsiPlusPsiCascade::m_diTrack1MassLower
private

Definition at line 57 of file PsiPlusPsiCascade.h.

◆ m_diTrack1MassUpper

double DerivationFramework::PsiPlusPsiCascade::m_diTrack1MassUpper
private

Definition at line 58 of file PsiPlusPsiCascade.h.

◆ m_diTrack2MassLower

double DerivationFramework::PsiPlusPsiCascade::m_diTrack2MassLower
private

Definition at line 59 of file PsiPlusPsiCascade.h.

◆ m_diTrack2MassUpper

double DerivationFramework::PsiPlusPsiCascade::m_diTrack2MassUpper
private

Definition at line 60 of file PsiPlusPsiCascade.h.

◆ m_DoVertexType

int DerivationFramework::PsiPlusPsiCascade::m_DoVertexType
private

Definition at line 106 of file PsiPlusPsiCascade.h.

◆ m_eventInfo_key

SG::ReadHandleKey<xAOD::EventInfo> DerivationFramework::PsiPlusPsiCascade::m_eventInfo_key
private

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

Definition at line 104 of file PsiPlusPsiCascade.h.

◆ m_iVertexFitter

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

Definition at line 96 of file PsiPlusPsiCascade.h.

◆ m_jpsi1MassLower

double DerivationFramework::PsiPlusPsiCascade::m_jpsi1MassLower
private

Definition at line 53 of file PsiPlusPsiCascade.h.

◆ m_jpsi1MassUpper

double DerivationFramework::PsiPlusPsiCascade::m_jpsi1MassUpper
private

Definition at line 54 of file PsiPlusPsiCascade.h.

◆ m_jpsi2MassLower

double DerivationFramework::PsiPlusPsiCascade::m_jpsi2MassLower
private

Definition at line 55 of file PsiPlusPsiCascade.h.

◆ m_jpsi2MassUpper

double DerivationFramework::PsiPlusPsiCascade::m_jpsi2MassUpper
private

Definition at line 56 of file PsiPlusPsiCascade.h.

◆ m_massDiTrk1

double DerivationFramework::PsiPlusPsiCascade::m_massDiTrk1
private

Definition at line 82 of file PsiPlusPsiCascade.h.

◆ m_massDiTrk2

double DerivationFramework::PsiPlusPsiCascade::m_massDiTrk2
private

Definition at line 83 of file PsiPlusPsiCascade.h.

◆ m_massJpsi1

double DerivationFramework::PsiPlusPsiCascade::m_massJpsi1
private

Definition at line 80 of file PsiPlusPsiCascade.h.

◆ m_massJpsi2

double DerivationFramework::PsiPlusPsiCascade::m_massJpsi2
private

Definition at line 81 of file PsiPlusPsiCascade.h.

◆ m_MassLower

double DerivationFramework::PsiPlusPsiCascade::m_MassLower
private

Definition at line 65 of file PsiPlusPsiCascade.h.

◆ m_massPsi1

double DerivationFramework::PsiPlusPsiCascade::m_massPsi1
private

Definition at line 78 of file PsiPlusPsiCascade.h.

◆ m_massPsi2

double DerivationFramework::PsiPlusPsiCascade::m_massPsi2
private

Definition at line 79 of file PsiPlusPsiCascade.h.

◆ m_MassUpper

double DerivationFramework::PsiPlusPsiCascade::m_MassUpper
private

Definition at line 66 of file PsiPlusPsiCascade.h.

◆ m_maxCandidates

unsigned int DerivationFramework::PsiPlusPsiCascade::m_maxCandidates
private

Definition at line 94 of file PsiPlusPsiCascade.h.

◆ m_partPropSvc

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

Definition at line 100 of file PsiPlusPsiCascade.h.

◆ m_psi1MassLower

double DerivationFramework::PsiPlusPsiCascade::m_psi1MassLower
private

Definition at line 61 of file PsiPlusPsiCascade.h.

◆ m_psi1MassUpper

double DerivationFramework::PsiPlusPsiCascade::m_psi1MassUpper
private

Definition at line 62 of file PsiPlusPsiCascade.h.

◆ m_psi2MassLower

double DerivationFramework::PsiPlusPsiCascade::m_psi2MassLower
private

Definition at line 63 of file PsiPlusPsiCascade.h.

◆ m_psi2MassUpper

double DerivationFramework::PsiPlusPsiCascade::m_psi2MassUpper
private

Definition at line 64 of file PsiPlusPsiCascade.h.

◆ m_PV_max

int DerivationFramework::PsiPlusPsiCascade::m_PV_max
private

Definition at line 105 of file PsiPlusPsiCascade.h.

◆ m_PV_minNTracks

size_t DerivationFramework::PsiPlusPsiCascade::m_PV_minNTracks
private

Definition at line 107 of file PsiPlusPsiCascade.h.

◆ m_pvRefitter

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

Definition at line 97 of file PsiPlusPsiCascade.h.

◆ m_refitPV

bool DerivationFramework::PsiPlusPsiCascade::m_refitPV
private

Definition at line 102 of file PsiPlusPsiCascade.h.

◆ m_refPVContainerName

SG::WriteHandleKey<xAOD::VertexContainer> DerivationFramework::PsiPlusPsiCascade::m_refPVContainerName
private

Definition at line 103 of file PsiPlusPsiCascade.h.

◆ m_removeDuplicatePairs

bool DerivationFramework::PsiPlusPsiCascade::m_removeDuplicatePairs
private

Definition at line 93 of file PsiPlusPsiCascade.h.

◆ m_trackContainerName

SG::ReadHandleKey<xAOD::TrackParticleContainer> DerivationFramework::PsiPlusPsiCascade::m_trackContainerName
private

Definition at line 50 of file PsiPlusPsiCascade.h.

◆ m_V0Tools

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

Definition at line 98 of file PsiPlusPsiCascade.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vertexPsi1ContainerKey

SG::ReadHandleKey<xAOD::VertexContainer> DerivationFramework::PsiPlusPsiCascade::m_vertexPsi1ContainerKey
private

Definition at line 44 of file PsiPlusPsiCascade.h.

◆ m_vertexPsi1HypoNames

std::vector<std::string> DerivationFramework::PsiPlusPsiCascade::m_vertexPsi1HypoNames
private

Definition at line 46 of file PsiPlusPsiCascade.h.

◆ m_vertexPsi2ContainerKey

SG::ReadHandleKey<xAOD::VertexContainer> DerivationFramework::PsiPlusPsiCascade::m_vertexPsi2ContainerKey
private

Definition at line 45 of file PsiPlusPsiCascade.h.

◆ m_vertexPsi2HypoNames

std::vector<std::string> DerivationFramework::PsiPlusPsiCascade::m_vertexPsi2HypoNames
private

Definition at line 47 of file PsiPlusPsiCascade.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ m_vtx1Daug1MassHypo

double DerivationFramework::PsiPlusPsiCascade::m_vtx1Daug1MassHypo
private

Definition at line 68 of file PsiPlusPsiCascade.h.

◆ m_vtx1Daug2MassHypo

double DerivationFramework::PsiPlusPsiCascade::m_vtx1Daug2MassHypo
private

Definition at line 69 of file PsiPlusPsiCascade.h.

◆ m_vtx1Daug3MassHypo

double DerivationFramework::PsiPlusPsiCascade::m_vtx1Daug3MassHypo
private

Definition at line 70 of file PsiPlusPsiCascade.h.

◆ m_vtx1Daug4MassHypo

double DerivationFramework::PsiPlusPsiCascade::m_vtx1Daug4MassHypo
private

Definition at line 71 of file PsiPlusPsiCascade.h.

◆ m_vtx1Daug_num

int DerivationFramework::PsiPlusPsiCascade::m_vtx1Daug_num
private

Definition at line 67 of file PsiPlusPsiCascade.h.

◆ m_vtx2Daug1MassHypo

double DerivationFramework::PsiPlusPsiCascade::m_vtx2Daug1MassHypo
private

Definition at line 73 of file PsiPlusPsiCascade.h.

◆ m_vtx2Daug2MassHypo

double DerivationFramework::PsiPlusPsiCascade::m_vtx2Daug2MassHypo
private

Definition at line 74 of file PsiPlusPsiCascade.h.

◆ m_vtx2Daug3MassHypo

double DerivationFramework::PsiPlusPsiCascade::m_vtx2Daug3MassHypo
private

Definition at line 75 of file PsiPlusPsiCascade.h.

◆ m_vtx2Daug4MassHypo

double DerivationFramework::PsiPlusPsiCascade::m_vtx2Daug4MassHypo
private

Definition at line 76 of file PsiPlusPsiCascade.h.

◆ m_vtx2Daug_num

int DerivationFramework::PsiPlusPsiCascade::m_vtx2Daug_num
private

Definition at line 72 of file PsiPlusPsiCascade.h.

◆ m_VxPrimaryCandidateName

SG::ReadHandleKey<xAOD::VertexContainer> DerivationFramework::PsiPlusPsiCascade::m_VxPrimaryCandidateName
private

Name of primary vertex container.

Definition at line 49 of file PsiPlusPsiCascade.h.


The documentation for this class was generated from the following files:
xAOD::TrackParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TrackParticle_v1.cxx:73
DerivationFramework::PsiPlusPsiCascade::m_psi1MassUpper
double m_psi1MassUpper
Definition: PsiPlusPsiCascade.h:62
Trk::VxSecVertexInfo::setSVOwnership
void setSVOwnership(bool Ownership)
Definition: VxSecVertexInfo.h:118
DerivationFramework::PsiPlusPsiCascade::m_PV_minNTracks
size_t m_PV_minNTracks
Definition: PsiPlusPsiCascade.h:107
DerivationFramework::PsiPlusPsiCascade::m_MassUpper
double m_MassUpper
Definition: PsiPlusPsiCascade.h:66
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
DerivationFramework::PsiPlusPsiCascade::m_refitPV
bool m_refitPV
Definition: PsiPlusPsiCascade.h:102
DerivationFramework::PsiPlusPsiCascade::m_constrDiTrk2
bool m_constrDiTrk2
Definition: PsiPlusPsiCascade.h:89
DerivationFramework::PsiPlusPsiCascade::m_massDiTrk2
double m_massDiTrk2
Definition: PsiPlusPsiCascade.h:83
get_generator_info.result
result
Definition: get_generator_info.py:21
xAOD::Vertex_v1::nTrackParticles
size_t nTrackParticles() const
Get the number of tracks associated with this vertex.
Definition: Vertex_v1.cxx:270
Trk::VxCascadeInfo
Definition: VxCascadeInfo.h:75
Trk::VertexID
int VertexID
Definition: IVertexCascadeFitter.h:23
TrigCompositeUtils::passed
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
Definition: TrigCompositeUtilsRoot.cxx:117
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
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:68
DerivationFramework::PsiPlusPsiCascade::m_vtx1Daug_num
int m_vtx1Daug_num
Definition: PsiPlusPsiCascade.h:67
DerivationFramework::PsiPlusPsiCascade::m_jpsi1MassUpper
double m_jpsi1MassUpper
Definition: PsiPlusPsiCascade.h:54
DerivationFramework::PsiPlusPsiCascade::m_vertexPsi2ContainerKey
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexPsi2ContainerKey
Definition: PsiPlusPsiCascade.h:45
DerivationFramework::PsiPlusPsiCascade::m_eventInfo_key
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfo_key
Definition: PsiPlusPsiCascade.h:51
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::PsiPlusPsiCascade::m_constrPsi2
bool m_constrPsi2
Definition: PsiPlusPsiCascade.h:85
DerivationFramework::BPhysPVCascadeTools::getParticleMass
static double getParticleMass(const HepPDT::ParticleDataTable *pdt, int pdg)
Definition: BPhysPVCascadeTools.cxx:491
Trk::VxSecVertexInfo::vertices
const std::vector< xAOD::Vertex * > & vertices() const
Definition: VxSecVertexInfo.cxx:100
DerivationFramework::PsiPlusPsiCascade::m_vtx2Daug3MassHypo
double m_vtx2Daug3MassHypo
Definition: PsiPlusPsiCascade.h:75
skel.it
it
Definition: skel.GENtoEVGEN.py:396
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
ParticleTest.tp
tp
Definition: ParticleTest.py:25
DerivationFramework::PsiPlusPsiCascade::m_chi2cut
double m_chi2cut
Definition: PsiPlusPsiCascade.h:92
DerivationFramework::PsiPlusPsiCascade::m_trackContainerName
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackContainerName
Definition: PsiPlusPsiCascade.h:50
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
DerivationFramework::PsiPlusPsiCascade::m_jpsi2MassLower
double m_jpsi2MassLower
Definition: PsiPlusPsiCascade.h:55
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
Trk::VxCascadeInfo::nDoF
int nDoF() const
Definition: VxCascadeInfo.h:133
Trk::VxCascadeInfo::getCovariance
const std::vector< Amg::MatrixX > & getCovariance() const
Definition: VxCascadeInfo.h:132
DerivationFramework::PsiPlusPsiCascade::m_constrJpsi1
bool m_constrJpsi1
Definition: PsiPlusPsiCascade.h:86
DerivationFramework::PsiPlusPsiCascade::m_massPsi1
double m_massPsi1
Definition: PsiPlusPsiCascade.h:78
DerivationFramework::PsiPlusPsiCascade::m_vertexPsi1ContainerKey
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexPsi1ContainerKey
Definition: PsiPlusPsiCascade.h:44
DerivationFramework::PsiPlusPsiCascade::m_vertexPsi1HypoNames
std::vector< std::string > m_vertexPsi1HypoNames
Definition: PsiPlusPsiCascade.h:46
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
runBeamSpotCalibration.helper
helper
Definition: runBeamSpotCalibration.py:112
DerivationFramework::PsiPlusPsiCascade::m_massDiTrk1
double m_massDiTrk1
Definition: PsiPlusPsiCascade.h:82
DerivationFramework::PsiPlusPsiCascade::m_DoVertexType
int m_DoVertexType
Definition: PsiPlusPsiCascade.h:106
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
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
DerivationFramework::PsiPlusPsiCascade::m_jpsi2MassUpper
double m_jpsi2MassUpper
Definition: PsiPlusPsiCascade.h:56
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
SG::Decorator
Helper class to provide type-safe access to aux data.
Definition: Decorator.h:59
DerivationFramework::PsiPlusPsiCascade::m_partPropSvc
ServiceHandle< IPartPropSvc > m_partPropSvc
Definition: PsiPlusPsiCascade.h:100
lumiFormat.i
int i
Definition: lumiFormat.py:85
DerivationFramework::PsiPlusPsiCascade::m_vtx2Daug4MassHypo
double m_vtx2Daug4MassHypo
Definition: PsiPlusPsiCascade.h:76
SG::WriteHandle::ptr
pointer_type ptr()
Dereference the pointer.
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
DerivationFramework::PsiPlusPsiCascade::m_vtx1Daug4MassHypo
double m_vtx1Daug4MassHypo
Definition: PsiPlusPsiCascade.h:71
Trk::VxCascadeInfo::fitChi2
double fitChi2() const
Definition: VxCascadeInfo.h:134
test_pyathena.parent
parent
Definition: test_pyathena.py:15
DerivationFramework::BPhysPVCascadeTools::PrepareVertexLinks
static void PrepareVertexLinks(Trk::VxCascadeInfo *result, const xAOD::TrackParticleContainer *importedTrackCollection)
Definition: BPhysPVCascadeTools.cxx:204
DerivationFramework::PsiPlusPsiCascade::m_psi2MassUpper
double m_psi2MassUpper
Definition: PsiPlusPsiCascade.h:64
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
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
DerivationFramework::PsiPlusPsiCascade::m_chi2cut_Psi1
double m_chi2cut_Psi1
Definition: PsiPlusPsiCascade.h:90
DerivationFramework::PsiPlusPsiCascade::m_vtx2Daug1MassHypo
double m_vtx2Daug1MassHypo
Definition: PsiPlusPsiCascade.h:73
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
DerivationFramework::PsiPlusPsiCascade::performSearch
StatusCode performSearch(std::vector< Trk::VxCascadeInfo * > *cascadeinfoContainer, std::vector< Trk::VxCascadeInfo * > *cascadeinfoContainer_noConstr) const
Definition: PsiPlusPsiCascade.cxx:371
DerivationFramework::PsiPlusPsiCascade::m_VxPrimaryCandidateName
SG::ReadHandleKey< xAOD::VertexContainer > m_VxPrimaryCandidateName
Name of primary vertex container.
Definition: PsiPlusPsiCascade.h:49
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
grepfile.ic
int ic
Definition: grepfile.py:33
DerivationFramework::PsiPlusPsiCascade::m_diTrack1MassUpper
double m_diTrack1MassUpper
Definition: PsiPlusPsiCascade.h:58
DerivationFramework::PsiPlusPsiCascade::m_diTrack1MassLower
double m_diTrack1MassLower
Definition: PsiPlusPsiCascade.h:57
DerivationFramework::PsiPlusPsiCascade::m_jpsi1MassLower
double m_jpsi1MassLower
Definition: PsiPlusPsiCascade.h:53
DerivationFramework::PsiPlusPsiCascade::m_vtx2Daug_num
int m_vtx2Daug_num
Definition: PsiPlusPsiCascade.h:72
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
DerivationFramework::PsiPlusPsiCascade::m_iVertexFitter
ToolHandle< Trk::TrkVKalVrtFitter > m_iVertexFitter
Definition: PsiPlusPsiCascade.h:96
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
DerivationFramework::PsiPlusPsiCascade::m_massJpsi1
double m_massJpsi1
Definition: PsiPlusPsiCascade.h:80
DerivationFramework::PsiPlusPsiCascade::m_refPVContainerName
SG::WriteHandleKey< xAOD::VertexContainer > m_refPVContainerName
Definition: PsiPlusPsiCascade.h:103
DerivationFramework::PsiPlusPsiCascade::m_massJpsi2
double m_massJpsi2
Definition: PsiPlusPsiCascade.h:81
DerivationFramework::PsiPlusPsiCascade::m_MassLower
double m_MassLower
Definition: PsiPlusPsiCascade.h:65
DerivationFramework::PsiPlusPsiCascade::m_maxCandidates
unsigned int m_maxCandidates
Definition: PsiPlusPsiCascade.h:94
Trk::VxCascadeInfo::getParticleMoms
const std::vector< std::vector< TLorentzVector > > & getParticleMoms() const
Definition: VxCascadeInfo.h:131
DerivationFramework::PsiPlusPsiCascade::m_psi2MassLower
double m_psi2MassLower
Definition: PsiPlusPsiCascade.h:63
DerivationFramework::PsiPlusPsiCascade::m_V0Tools
ToolHandle< Trk::V0Tools > m_V0Tools
Definition: PsiPlusPsiCascade.h:98
python.PyAthena.v
v
Definition: PyAthena.py:154
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
DerivationFramework::PsiPlusPsiCascade::m_constrPsi1
bool m_constrPsi1
Definition: PsiPlusPsiCascade.h:84
a
TList * a
Definition: liststreamerinfos.cxx:10
DerivationFramework::PsiPlusPsiCascade::m_CascadeTools
ToolHandle< DerivationFramework::CascadeTools > m_CascadeTools
Definition: PsiPlusPsiCascade.h:99
h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
SG::WriteHandle::record
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
DerivationFramework::PsiPlusPsiCascade::m_constrDiTrk1
bool m_constrDiTrk1
Definition: PsiPlusPsiCascade.h:88
std::sort
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:623
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
DerivationFramework::PsiPlusPsiCascade::m_diTrack2MassUpper
double m_diTrack2MassUpper
Definition: PsiPlusPsiCascade.h:60
DerivationFramework::PsiPlusPsiCascade::m_massPsi2
double m_massPsi2
Definition: PsiPlusPsiCascade.h:79
DerivationFramework::PsiPlusPsiCascade::m_vtx1Daug2MassHypo
double m_vtx1Daug2MassHypo
Definition: PsiPlusPsiCascade.h:69
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
DerivationFramework::PsiPlusPsiCascade::m_vertexPsi2HypoNames
std::vector< std::string > m_vertexPsi2HypoNames
Definition: PsiPlusPsiCascade.h:47
DerivationFramework::PsiPlusPsiCascade::m_vtx1Daug3MassHypo
double m_vtx1Daug3MassHypo
Definition: PsiPlusPsiCascade.h:70
DerivationFramework::PsiPlusPsiCascade::m_diTrack2MassLower
double m_diTrack2MassLower
Definition: PsiPlusPsiCascade.h:59
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
DerivationFramework::PsiPlusPsiCascade::m_constrJpsi2
bool m_constrJpsi2
Definition: PsiPlusPsiCascade.h:87
skip
bool skip
Definition: TrigGlobEffCorrValidation.cxx:190
DerivationFramework::PsiPlusPsiCascade::m_vtx1Daug1MassHypo
double m_vtx1Daug1MassHypo
Definition: PsiPlusPsiCascade.h:68
DerivationFramework::PsiPlusPsiCascade::m_removeDuplicatePairs
bool m_removeDuplicatePairs
Definition: PsiPlusPsiCascade.h:93
DerivationFramework::PsiPlusPsiCascade::m_psi1MassLower
double m_psi1MassLower
Definition: PsiPlusPsiCascade.h:61
DerivationFramework::PsiPlusPsiCascade::m_PV_max
int m_PV_max
Definition: PsiPlusPsiCascade.h:105
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::PsiPlusPsiCascade::m_vtx2Daug2MassHypo
double m_vtx2Daug2MassHypo
Definition: PsiPlusPsiCascade.h:74
DerivationFramework::PsiPlusPsiCascade::m_chi2cut_Psi2
double m_chi2cut_Psi2
Definition: PsiPlusPsiCascade.h:91
DerivationFramework::PsiPlusPsiCascade::m_hypoName
std::string m_hypoName
Definition: PsiPlusPsiCascade.h:104
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
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
DerivationFramework::PsiPlusPsiCascade::m_cascadeOutputsKeys
SG::WriteHandleKeyArray< xAOD::VertexContainer > m_cascadeOutputsKeys
Definition: PsiPlusPsiCascade.h:48
DerivationFramework::PsiPlusPsiCascade::m_pvRefitter
ToolHandle< Analysis::PrimaryVertexRefitter > m_pvRefitter
Definition: PsiPlusPsiCascade.h:97