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

#include <BPhysPVCascadeTools.h>

Inheritance diagram for DerivationFramework::BPhysPVCascadeTools:
Collaboration diagram for DerivationFramework::BPhysPVCascadeTools:

Public Member Functions

 BPhysPVCascadeTools (const CascadeTools *cascadeTools)
 
 BPhysPVCascadeTools (const CascadeTools *cascadeTools, const xAOD::EventInfo *)
 
void ProcessVertex (const std::vector< TLorentzVector > &mom, Amg::MatrixX cov, xAOD::BPhysHypoHelper &vtx, xAOD::BPhysHelper::pv_type pvtype, double mass) const
 
void FillBPhysHelper (const std::vector< TLorentzVector > &mom, Amg::MatrixX cov, xAOD::BPhysHelper &vtx, const xAOD::Vertex *refPV, const xAOD::VertexContainer *refPvContainer, xAOD::BPhysHelper::pv_type pvtype, int) const
 Fills the BPhysHelper object with the standard parameters. More...
 
size_t FindLowZIndex (const std::vector< TLorentzVector > &mom, const xAOD::BPhysHelper &Obj, const std::vector< const xAOD::Vertex * > &PVlist, const size_t PV_minNTracks=0) const
 Returns the index integer of the vertex with the lowest Z in relation to the given vertex. More...
 
size_t FindLowA0Index (const std::vector< TLorentzVector > &mom, const xAOD::BPhysHelper &Obj, const std::vector< const xAOD::Vertex * > &PVlist, const size_t PV_minNTracks=0) const
 Returns the index integer of the vertex with the lowest A0 in relation to the given vertex. More...
 
void SetMinNTracksInPV (size_t PV_minNTracks)
 Set the minimum number of tracks required for primary vertices to be considered for primary vertex association to a secondary vertex. More...
 
Amg::Vector3D GetBeamSpot () const
 Get the current beamspot position either from cache or from BeamCondSvc. More...
 
size_t FindLowZ0BAIndex (const std::vector< TLorentzVector > &mom, const xAOD::BPhysHelper &obj, const std::vector< const xAOD::Vertex * > &PVlist, const size_t PV_minNTracks=0) const
 Find the index for the PV with the lowest distance in z of the SV's DOCA point w.r.t. More...
 
double DistInZtoDOCA (const std::vector< TLorentzVector > &mom, const xAOD::BPhysHelper &obj, const xAOD::Vertex *vertex) const
 Calculate the distance along z axis between the PV and SV's DOCA point w.r.t. More...
 
Amg::Vector3D DocaExtrapToBeamSpot (const std::vector< TLorentzVector > &mom, const xAOD::BPhysHelper &obj) const
 Point of DOCA w.r.t. More...
 
StatusCode FillCandwithRefittedVertices (bool refitPV, const xAOD::VertexContainer *pvContainer, xAOD::VertexContainer *refPvContainer, const Analysis::PrimaryVertexRefitter *pvRefitter, size_t in_PV_max, int DoVertexType, Trk::VxCascadeInfo *casc, int index, double mass, xAOD::BPhysHypoHelper &vtx)
 
bool msgLvl (const MSG::Level lvl) const
 Test the output level. More...
 
MsgStream & msg () const
 The standard message stream. More...
 
MsgStream & msg (const MSG::Level lvl) const
 The standard message stream. More...
 
void setLevel (MSG::Level lvl)
 Change the current logging level. More...
 

Static Public Member Functions

template<size_t NTracks>
static bool VerticesMatchTracks (const xAOD::Vertex *v1, const xAOD::Vertex *v2)
 
template<size_t NTracks>
static const xAOD::VertexFindVertex (const xAOD::VertexContainer *c, const xAOD::Vertex *v)
 
static std::vector< const xAOD::Vertex * > GetGoodPV (const xAOD::VertexContainer *pvContainer)
 Static method call with DerivationFramework::BPhysDerHelpers::GetGoodPV Returns a std::vector containing only PVs of type 1 and 3 - HighPt and Pileup, which have at least PV_minNTracks tracks. More...
 
static void PrepareVertexLinks (Trk::VxCascadeInfo *result, const xAOD::TrackParticleContainer *importedTrackCollection)
 
static void PrepareVertexLinks (Trk::VxCascadeInfo *result, const std::vector< const xAOD::TrackParticleContainer * > &)
 
static std::vector< const xAOD::TrackParticle * > CollectAllChargedTracks (const std::vector< xAOD::Vertex * > &cascadeVertices)
 
static void SetVectorInfo (xAOD::BPhysHelper &, const Trk::VxCascadeInfo *)
 
static bool uniqueCollection (const std::vector< const xAOD::TrackParticle * > &)
 
static bool uniqueCollection (const std::vector< const xAOD::TrackParticle * > &, const std::vector< const xAOD::TrackParticle * > &)
 
static bool LinkVertices (SG::AuxElement::Decorator< VertexLinkVector > &decor, const std::vector< const xAOD::Vertex * > &vertices, const xAOD::VertexContainer *vertexContainer, const xAOD::Vertex *vert)
 
static double getParticleMass (const HepPDT::ParticleDataTable *pdt, int pdg)
 

Public Attributes

bool m_copyAllVertices
 

Private Types

typedef ElementLink< xAOD::VertexContainerVertexLink
 
typedef std::vector< VertexLinkVertexLinkVector
 

Private Member Functions

void initMessaging () const
 Initialize our message level and MessageSvc. More...
 

Private Attributes

const CascadeToolsm_cascadeTools
 
const xAOD::EventInfom_eventInfo
 
size_t m_PV_minNTracks
 minimum number of tracks required in PVs considered More...
 
std::string m_nm
 Message source name. More...
 
boost::thread_specific_ptr< MsgStream > m_msg_tls
 MsgStream instance (a std::cout like with print-out levels) More...
 
std::atomic< IMessageSvc * > m_imsg { nullptr }
 MessageSvc pointer. More...
 
std::atomic< MSG::Level > m_lvl { MSG::NIL }
 Current logging level. More...
 
std::atomic_flag m_initialized ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
 Messaging initialized (initMessaging) More...
 

Detailed Description

Definition at line 34 of file BPhysPVCascadeTools.h.

Member Typedef Documentation

◆ VertexLink

Definition at line 35 of file BPhysPVCascadeTools.h.

◆ VertexLinkVector

Definition at line 36 of file BPhysPVCascadeTools.h.

Constructor & Destructor Documentation

◆ BPhysPVCascadeTools() [1/2]

DerivationFramework::BPhysPVCascadeTools::BPhysPVCascadeTools ( const CascadeTools cascadeTools)

Definition at line 17 of file BPhysPVCascadeTools.cxx.

17  :
18  AthMessaging("BPhysPVCascadeTools"),
19  m_cascadeTools(cascadeTools), m_eventInfo(nullptr), m_PV_minNTracks(0),
20  m_copyAllVertices(true)
21 {
22 }

◆ BPhysPVCascadeTools() [2/2]

DerivationFramework::BPhysPVCascadeTools::BPhysPVCascadeTools ( const CascadeTools cascadeTools,
const xAOD::EventInfo eventinfo 
)

Definition at line 24 of file BPhysPVCascadeTools.cxx.

25  :
26  AthMessaging("BPhysPVCascadeTools"),
27  m_cascadeTools(cascadeTools), m_eventInfo(eventinfo), m_PV_minNTracks(0),
28  m_copyAllVertices(true)
29 {
30 }

Member Function Documentation

◆ CollectAllChargedTracks()

std::vector< const xAOD::TrackParticle * > DerivationFramework::BPhysPVCascadeTools::CollectAllChargedTracks ( const std::vector< xAOD::Vertex * > &  cascadeVertices)
static

Definition at line 246 of file BPhysPVCascadeTools.cxx.

247 {
248  std::vector<const xAOD::TrackParticle*> exclTrk;
249  for( size_t jt=0; jt<cascadeVertices.size(); jt++) {
250  for( size_t it=0; it<cascadeVertices[jt]->vxTrackAtVertex().size(); it++) {
251  if(cascadeVertices[jt]->trackParticle(it)->charge() != 0) exclTrk.push_back(cascadeVertices[jt]->trackParticle(it));
252  }
253  }
254  return exclTrk;
255 }

◆ DistInZtoDOCA()

double DerivationFramework::BPhysPVCascadeTools::DistInZtoDOCA ( const std::vector< TLorentzVector > &  mom,
const xAOD::BPhysHelper obj,
const xAOD::Vertex vertex 
) const

Calculate the distance along z axis between the PV and SV's DOCA point w.r.t.

the beamline.

Definition at line 174 of file BPhysPVCascadeTools.cxx.

174  {
175 
176  Amg::Vector3D pv = vertex->position();
178  Amg::Vector3D vec = pv - xDOCA;
179  return vec.z();
180 }

◆ DocaExtrapToBeamSpot()

Amg::Vector3D DerivationFramework::BPhysPVCascadeTools::DocaExtrapToBeamSpot ( const std::vector< TLorentzVector > &  mom,
const xAOD::BPhysHelper obj 
) const

Point of DOCA w.r.t.

the beamline backward extrapolated along the B candidate's momentum direction.

Definition at line 183 of file BPhysPVCascadeTools.cxx.

183  {
184 
185  Amg::Vector3D xDOCA(-99999., -99999., -99999.);
186  TLorentzVector totalMom;
187  unsigned int NTrk = mom.size();
188  for( unsigned int it=0; it<NTrk; it++) totalMom += mom[it];
189  TVector3 totP = totalMom.Vect();
190  Amg::Vector3D pSV(totP.X(), totP.Y(), totP.Z());
191  Amg::Vector3D pT(pSV.x(), pSV.y(), 0.);
192  if ( pT.mag2() > 0 ) {
193  Amg::Vector3D xBS = GetBeamSpot();
194  Amg::Vector3D xSV = obj.vtx()->position();
195  Amg::Vector3D xT(xSV.x()-xBS.x(), xSV.y()-xBS.y(), 0.);
196  xDOCA = xSV - pSV*pT.dot(xT)/pT.mag2();
197  } else {
198  std::cout << "BPhysPVCascadeTools::DocaExtrapToBeamSpot: WARNING pT == 0."
199  << std::endl;
200  }
201  return xDOCA;
202 }

◆ FillBPhysHelper()

void DerivationFramework::BPhysPVCascadeTools::FillBPhysHelper ( const std::vector< TLorentzVector > &  mom,
Amg::MatrixX  cov,
xAOD::BPhysHelper vtx,
const xAOD::Vertex refPV,
const xAOD::VertexContainer refPvContainer,
xAOD::BPhysHelper::pv_type  pvtype,
int  refitCode 
) const

Fills the BPhysHelper object with the standard parameters.

Definition at line 32 of file BPhysPVCascadeTools.cxx.

34  {
35 
36  BPHYS_CHECK( vtx.setPv ( PV, PvContainer, pvtype ) );
37 
38  // cout << "BPhysPVCascadeTools::FillBPhysHelper for pvtype = " << pvtype << endl;
39  // cout << "lxy " << m_cascadeTools->lxy(mom, vtx.vtx(), PV) << " error " << m_cascadeTools->lxyError(mom, cov, vtx.vtx(), PV) << endl;
40 
41  // set variables calculated from PV
42  BPHYS_CHECK( vtx.setLxy ( m_cascadeTools->lxy (mom, vtx.vtx(), PV), pvtype ) );
43  BPHYS_CHECK( vtx.setLxyErr ( m_cascadeTools->lxyError (mom, cov, vtx.vtx(), PV), pvtype ) );
44  BPHYS_CHECK( vtx.setA0 ( m_cascadeTools->a0 (mom, vtx.vtx(), PV), pvtype ) );
45  BPHYS_CHECK( vtx.setA0Err ( m_cascadeTools->a0Error (mom, cov, vtx.vtx(), PV), pvtype ) );
46  BPHYS_CHECK( vtx.setA0xy ( m_cascadeTools->a0xy (mom, vtx.vtx(), PV), pvtype ) );
47  BPHYS_CHECK( vtx.setA0xyErr( m_cascadeTools->a0xyError (mom, cov, vtx.vtx(), PV), pvtype ) );
48  BPHYS_CHECK( vtx.setZ0 ( m_cascadeTools->a0z (mom, vtx.vtx(), PV), pvtype ) );
49  BPHYS_CHECK( vtx.setZ0Err ( m_cascadeTools->a0zError (mom, cov, vtx.vtx(), PV), pvtype ) );
50  BPHYS_CHECK( vtx.setRefitPVStatus ( refitCode, pvtype ) );
51 
52 }

◆ FillCandwithRefittedVertices()

StatusCode DerivationFramework::BPhysPVCascadeTools::FillCandwithRefittedVertices ( bool  refitPV,
const xAOD::VertexContainer pvContainer,
xAOD::VertexContainer refPvContainer,
const Analysis::PrimaryVertexRefitter pvRefitter,
size_t  in_PV_max,
int  DoVertexType,
Trk::VxCascadeInfo casc,
int  index,
double  mass,
xAOD::BPhysHypoHelper vtx 
)

Definition at line 257 of file BPhysPVCascadeTools.cxx.

262 {
263  static const Trk::V0Tools* const dummy = nullptr;
264  static const DerivationFramework::BPhysPVTools pvtool(dummy);
265 
266  const std::vector<TLorentzVector> &mom = casc->getParticleMoms()[index];
267  const Amg::MatrixX &cov = casc->getCovariance()[index];
268  const std::vector<xAOD::Vertex*> &cascadeVertices = casc->vertices();
269  const bool doPt = (DoVertexType & 1) != 0;
270  const bool doA0 = (DoVertexType & 2) != 0;
271  const bool doZ0 = (DoVertexType & 4) != 0;
272  const bool doZ0BA = (DoVertexType & 8) != 0;
273 
274  // Collect the tracks that should be excluded from the PV
275  std::vector<const xAOD::TrackParticle*> exclTrk = CollectAllChargedTracks(cascadeVertices);
276 
277 
278  const std::vector<const xAOD::Vertex*> GoodPVs = GetGoodPV(pvContainer);
279  // 2) PV dependent variables
280  if (GoodPVs.empty() == false) {
281  if (refitPV) {
282  size_t pVmax =std::min((size_t)in_PV_max, GoodPVs.size());
283  std::vector<const xAOD::Vertex*> refPVvertexes;
284  std::vector<xAOD::Vertex*> refPVvertexes_toDelete;
285  std::vector<int> exitCode;
286  refPVvertexes.reserve(pVmax);
287  refPVvertexes_toDelete.reserve(pVmax);
288  exitCode.reserve(pVmax);
289 
290  // Refit the primary vertex and set the related decorations.
291 
292  for (size_t i =0; i < pVmax ; i++) {
293  const xAOD::Vertex* oldPV = GoodPVs.at(i);
294  // when set to false this will return null when a new vertex is not required
295 // ATH_MSG_DEBUG("old PV x " << oldPV->x() << " y " << oldPV->y() << " z " << oldPV->z());
296  int exitcode = 0;
297  xAOD::Vertex* refPV = pvRefitter->refitVertex(oldPV, exclTrk, m_copyAllVertices, &exitcode);
298 // if (refPV) ATH_MSG_DEBUG("ref PV x " << refPV->x() << " y " << refPV->y() << " z " << refPV->z());
299  exitCode.push_back(exitcode);
300  // we want positioning to match the goodPrimaryVertices
301  if (refPV == nullptr) {
302  refPVvertexes.push_back(oldPV);
303  refPVvertexes_toDelete.push_back(nullptr);
304  } else {
305  refPVvertexes.push_back(refPV);
306  refPVvertexes_toDelete.push_back(refPV);
307  }
308  }
309  boost::container::static_vector<size_t, 4> indexesUsed;
310  boost::container::static_vector<std::pair<size_t, xAOD::BPhysHelper::pv_type>, 4> indexestoProcess;
311 
312  if(doPt){
313  indexestoProcess.push_back(std::make_pair
314  (pvtool.FindHighPtIndex(refPVvertexes), xAOD::BPhysHelper::PV_MAX_SUM_PT2));
315  }
316  if(doA0) {
317  indexestoProcess.push_back(std::make_pair( FindLowA0Index(mom, vtx, refPVvertexes, m_PV_minNTracks),
319  }
320  if(doZ0) {
321  indexestoProcess.push_back(std::make_pair(FindLowZIndex(mom, vtx, refPVvertexes, m_PV_minNTracks),
323  }
324  if(doZ0BA) {
325  size_t lowZBA = FindLowZ0BAIndex(mom, vtx, refPVvertexes, m_PV_minNTracks);
326  if( lowZBA < pVmax ) {
327  indexestoProcess.push_back(std::make_pair(lowZBA, xAOD::BPhysHelper::PV_MIN_Z0_BA));
328  }
329  else pvtool.FillBPhysHelperNULL(vtx, pvContainer, xAOD::BPhysHelper::PV_MIN_Z0_BA);
330  }
331 
332  for(size_t i =0 ; i<indexestoProcess.size(); i++){
333  //if refitted add to refitted container
334  auto index = indexestoProcess[i].first;
335  auto pvtype = indexestoProcess[i].second;
336  const xAOD::VertexContainer* ParentContainer =
337  (refPVvertexes_toDelete.at(index)) ? refPvContainer : pvContainer;
338  if(ParentContainer == refPvContainer && std::find(indexesUsed.begin(),
339  indexesUsed.end(), index) == indexesUsed.end()) {
340  // store the new vertex
341  refPvContainer->push_back(refPVvertexes_toDelete.at(index));
342  indexesUsed.push_back(index);
343  }
344  FillBPhysHelper(mom, cov, vtx, refPVvertexes[index],
345  ParentContainer, pvtype, exitCode[index]);
346  vtx.setOrigPv(GoodPVs[index], pvContainer, pvtype);
347  }
348  //nullify ptrs we want to keep so these won't get deleted
349  //"delete null" is valid in C++ and does nothing so this is quicker than a lot of if statements
350  for(size_t x : indexesUsed) refPVvertexes_toDelete[x] = nullptr;
351  //Loop over toDELETE container, anything that is used or was not refitted is null
352  //This cleans up all extra vertices that were created and not used
353  for(const xAOD::Vertex* ptr : refPVvertexes_toDelete) delete ptr;
354  refPVvertexes.clear(); // Clear lists of now dangling ptrs
355  refPVvertexes_toDelete.clear();
356  exitCode.clear();
357 
358  } else {
359  // 2.a) the first PV with the largest sum pT.
360  if(doPt) {
361  size_t highPtindex = pvtool.FindHighPtIndex(GoodPVs); // Should be 0 in PV ordering
362  FillBPhysHelper(mom, cov, vtx, GoodPVs[highPtindex], pvContainer, xAOD::BPhysHelper::PV_MAX_SUM_PT2, 0);
363  }
364  // 2.b) the closest in 3D:
365  if(doA0) {
366  size_t lowA0 = FindLowA0Index(mom, vtx, GoodPVs, m_PV_minNTracks);
367  FillBPhysHelper(mom, cov, vtx, GoodPVs[lowA0], pvContainer, xAOD::BPhysHelper::PV_MIN_A0, 0);
368  }
369  // 2.c) the closest in Z:
370  if(doZ0) {
371  size_t lowZ = FindLowZIndex(mom, vtx, GoodPVs, m_PV_minNTracks);
372  FillBPhysHelper(mom, cov, vtx, GoodPVs[lowZ], pvContainer, xAOD::BPhysHelper::PV_MIN_Z0, 0);
373  }
374  // 2.d) the closest in Z (DOCA w.r.t. beam axis):
375  if(doZ0BA) {
376  size_t lowZBA = FindLowZ0BAIndex(mom, vtx, GoodPVs, m_PV_minNTracks);
377  if ( lowZBA < GoodPVs.size() ) { // safety against vector index out-of-bounds
378  FillBPhysHelper(mom, cov, vtx, GoodPVs[lowZBA], pvContainer, xAOD::BPhysHelper::PV_MIN_Z0_BA, 0);
379  } else {
380  // nothing found -- fill NULL
381  pvtool.FillBPhysHelperNULL(vtx, pvContainer, xAOD::BPhysHelper::PV_MIN_Z0_BA);
382  }
383  }
384  } // refitPV
385  } else {
386 
387  if(pvContainer->empty()) return StatusCode::FAILURE;
388  const xAOD::Vertex* Dummy = pvContainer->at(0);
389 
390  // 2.a) the first PV with the largest sum pT.
391  if(doPt) {
392  FillBPhysHelper(mom, cov, vtx, Dummy, pvContainer, xAOD::BPhysHelper::PV_MAX_SUM_PT2, 0);
393  if(refitPV) vtx.setOrigPv(Dummy, pvContainer, xAOD::BPhysHelper::PV_MAX_SUM_PT2);
394  }
395  // 2.b) the closest in 3D:
396  if(doA0) {
397  FillBPhysHelper(mom, cov, vtx, Dummy, pvContainer, xAOD::BPhysHelper::PV_MIN_A0, 0);
398  if(refitPV) vtx.setOrigPv(Dummy, pvContainer, xAOD::BPhysHelper::PV_MIN_A0);
399  }
400  // 2.c) the closest in Z:
401  if(doZ0) {
402  FillBPhysHelper(mom, cov, vtx, Dummy, pvContainer, xAOD::BPhysHelper::PV_MIN_Z0, 0);
403  if(refitPV) vtx.setOrigPv(Dummy, pvContainer, xAOD::BPhysHelper::PV_MIN_Z0);
404  }
405  // 2.d) the closest in Z (DOCA w.r.t. beam axis):
406  if(doZ0BA) {
407  FillBPhysHelper(mom, cov, vtx, Dummy, pvContainer, xAOD::BPhysHelper::PV_MIN_Z0_BA, 0);
408  if(refitPV) vtx.setOrigPv(Dummy, pvContainer, xAOD::BPhysHelper::PV_MIN_Z0_BA);
409  }
410  } // GoodPVs.empty()
411 
412  // 3) proper decay time and error:
413  // retrieve the refitted PV (or the original one, if the PV refitting was turned off)
418 
419  return StatusCode::SUCCESS;
420 }

◆ FindLowA0Index()

size_t DerivationFramework::BPhysPVCascadeTools::FindLowA0Index ( const std::vector< TLorentzVector > &  mom,
const xAOD::BPhysHelper Obj,
const std::vector< const xAOD::Vertex * > &  PVlist,
const size_t  PV_minNTracks = 0 
) const

Returns the index integer of the vertex with the lowest A0 in relation to the given vertex.

Definition at line 98 of file BPhysPVCascadeTools.cxx.

100  {
101  size_t lowA0 = 0;
102  if(PVlist.empty()) {
104  return lowA0;
105  }
106  size_t size = PVlist.size();
107  double lowA0calc = m_cascadeTools->a0(mom, Obj.vtx(), PVlist[0]);
108  for(size_t i =1; i<size; i++) {
109  if ( PVlist[i]->nTrackParticles() >= PV_minNTracks ) {
110  double a0 = m_cascadeTools->a0(mom, Obj.vtx(), PVlist[i]);
111  if(a0 < lowA0calc) {
112  lowA0calc = a0;
113  lowA0 =i;
114  }
115  }
116  }
117  return lowA0;
118 }

◆ FindLowZ0BAIndex()

size_t DerivationFramework::BPhysPVCascadeTools::FindLowZ0BAIndex ( const std::vector< TLorentzVector > &  mom,
const xAOD::BPhysHelper obj,
const std::vector< const xAOD::Vertex * > &  PVlist,
const size_t  PV_minNTracks = 0 
) const

Find the index for the PV with the lowest distance in z of the SV's DOCA point w.r.t.

the beamline and the PV.

Definition at line 155 of file BPhysPVCascadeTools.cxx.

157  {
158 
159  size_t ilowZ0BA = std::numeric_limits<std::size_t>::max();
160  double lowZ0BAcalc = std::numeric_limits<double>::max();
161  for (size_t i = 0; i<PVlist.size(); ++i) {
162  if ( PVlist[i]->nTrackParticles() >= PV_minNTracks ) {
163  double z0BA = m_cascadeTools->a0(mom, obj.vtx(), PVlist[i]);
164  if (z0BA < lowZ0BAcalc) {
165  lowZ0BAcalc = z0BA;
166  ilowZ0BA = i;
167  }
168  }
169  }
170  return ilowZ0BA;
171 }

◆ FindLowZIndex()

size_t DerivationFramework::BPhysPVCascadeTools::FindLowZIndex ( const std::vector< TLorentzVector > &  mom,
const xAOD::BPhysHelper Obj,
const std::vector< const xAOD::Vertex * > &  PVlist,
const size_t  PV_minNTracks = 0 
) const

Returns the index integer of the vertex with the lowest Z in relation to the given vertex.

Definition at line 76 of file BPhysPVCascadeTools.cxx.

78  {
79  size_t lowZ = 0;
80  if(PVlist.empty()) {
82  return lowZ;
83  }
84  size_t size = PVlist.size();
85  double lowA0zcalc = fabs(m_cascadeTools->a0z (mom, Obj.vtx(), PVlist[0]));
86  for(size_t i =1; i<size; i++) {
87  if ( PVlist[i]->nTrackParticles() >= PV_minNTracks ) {
88  double a0z = fabs(m_cascadeTools->a0z(mom, Obj.vtx(), PVlist[i]));
89  if(a0z < lowA0zcalc) {
90  lowA0zcalc = a0z;
91  lowZ =i;
92  }
93  }
94  }
95  return lowZ;
96 }

◆ FindVertex()

template<size_t NTracks>
const xAOD::Vertex * DerivationFramework::BPhysPVCascadeTools::FindVertex ( const xAOD::VertexContainer c,
const xAOD::Vertex v 
)
static

Definition at line 145 of file BPhysPVCascadeTools.h.

145  {
146  for (const xAOD::Vertex* a : *c){
147  if(VerticesMatchTracks<NTracks>(a,v)) return a;
148  }
149  return nullptr;
150 }

◆ GetBeamSpot()

Amg::Vector3D DerivationFramework::BPhysPVCascadeTools::GetBeamSpot ( ) const

Get the current beamspot position either from cache or from BeamCondSvc.

Before processing a new event, make sure to call GetBeamSpot();

Definition at line 146 of file BPhysPVCascadeTools.cxx.

146  {
148  else {
149  static const Amg::Vector3D defaultBS(-10000.,-10000.,-10000.);
150  return defaultBS;
151  }
152 }

◆ GetGoodPV()

std::vector< const xAOD::Vertex * > DerivationFramework::BPhysPVCascadeTools::GetGoodPV ( const xAOD::VertexContainer pvContainer)
static

Static method call with DerivationFramework::BPhysDerHelpers::GetGoodPV Returns a std::vector containing only PVs of type 1 and 3 - HighPt and Pileup, which have at least PV_minNTracks tracks.

Definition at line 120 of file BPhysPVCascadeTools.cxx.

120  {
123  VertexType Pileupvtx = xAOD::VxType::PileUp;
124  std::vector<const xAOD::Vertex*> goodPrimaryVertices;
125  goodPrimaryVertices.reserve(pvContainer->size());
126 
127  for (auto ptr = pvContainer->begin(); ptr!= pvContainer->end(); ++ptr) {
128  VertexType thistype = (*ptr)->vertexType();
129  if ( thistype == Pileupvtx || thistype == Pvtx ) {
130  goodPrimaryVertices.push_back(*ptr);
131  } else {
132 // cout << "vertex type " << thistype << endl;
133  }
134  }
135  return goodPrimaryVertices;
136 }

◆ getParticleMass()

double DerivationFramework::BPhysPVCascadeTools::getParticleMass ( const HepPDT::ParticleDataTable *  pdt,
int  pdg 
)
static

Definition at line 491 of file BPhysPVCascadeTools.cxx.

491  {
492  auto ptr = pdt->particle( pdgcode );
493  return ptr ? ptr->mass() : 0.;
494 }

◆ initMessaging()

void AthMessaging::initMessaging ( ) const
privateinherited

Initialize our message level and MessageSvc.

This method should only be called once.

Definition at line 39 of file AthMessaging.cxx.

40 {
42  m_lvl = m_imsg ?
43  static_cast<MSG::Level>( m_imsg.load()->outputLevel(m_nm) ) :
44  MSG::INFO;
45 }

◆ LinkVertices()

bool DerivationFramework::BPhysPVCascadeTools::LinkVertices ( SG::AuxElement::Decorator< VertexLinkVector > &  decor,
const std::vector< const xAOD::Vertex * > &  vertices,
const xAOD::VertexContainer vertexContainer,
const xAOD::Vertex vert 
)
static

Definition at line 460 of file BPhysPVCascadeTools.cxx.

461  {
462  // create tmp vector of preceding vertex links
463  VertexLinkVector precedingVertexLinks;
464 
465  // loop over input precedingVertices
466  auto precedingVerticesItr = vertices.begin();
467  for(; precedingVerticesItr!=vertices.end(); ++precedingVerticesItr) {
468  // sanity check 1: protect against null pointers
469  if( !(*precedingVerticesItr) )
470  return false;
471 
472  // create element link
473  VertexLink vertexLink;
474  vertexLink.setElement(*precedingVerticesItr);
475  vertexLink.setStorableObject(*vertexContainer);
476 
477  // sanity check 2: is the link valid?
478  if( !vertexLink.isValid() )
479  return false;
480 
481  // link is OK, store it in the tmp vector
482  precedingVertexLinks.push_back( vertexLink );
483 
484  } // end of loop over preceding vertices
485 
486  // all OK: store preceding vertex links in the aux store
487  decor(*vert) = precedingVertexLinks;
488  return true;
489 }

◆ msg() [1/2]

MsgStream & AthMessaging::msg ( ) const
inlineinherited

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 164 of file AthMessaging.h.

165 {
166  MsgStream* ms = m_msg_tls.get();
167  if (!ms) {
168  if (!m_initialized.test_and_set()) initMessaging();
169  ms = new MsgStream(m_imsg,m_nm);
170  m_msg_tls.reset( ms );
171  }
172 
173  ms->setLevel (m_lvl);
174  return *ms;
175 }

◆ msg() [2/2]

MsgStream & AthMessaging::msg ( const MSG::Level  lvl) const
inlineinherited

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 179 of file AthMessaging.h.

180 { return msg() << lvl; }

◆ msgLvl()

bool AthMessaging::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Test the output level.

Parameters
lvlThe message level to test against
Returns
boolean Indicating if messages at given level will be printed
Return values
trueMessages at level "lvl" will be printed

Definition at line 151 of file AthMessaging.h.

152 {
153  if (!m_initialized.test_and_set()) initMessaging();
154  if (m_lvl <= lvl) {
155  msg() << lvl;
156  return true;
157  } else {
158  return false;
159  }
160 }

◆ PrepareVertexLinks() [1/2]

void DerivationFramework::BPhysPVCascadeTools::PrepareVertexLinks ( Trk::VxCascadeInfo result,
const std::vector< const xAOD::TrackParticleContainer * > &  trackCols 
)
static

Definition at line 221 of file BPhysPVCascadeTools.cxx.

222 {
223  auto &collection = result->vertices();
224  for(auto v : collection) {
225  std::vector<ElementLink<DataVector<xAOD::TrackParticle> > > newLinkVector;
226  for(auto mylink : v->trackParticleLinks()) {
227  const xAOD::TrackParticle* myptr= *mylink;
228  const xAOD::TrackParticleContainer* foundcontainer = nullptr;
229  for(auto col : trackCols){
230  if(std::find(col->begin(), col->end(), myptr) != col->end()){
231  foundcontainer =col;
232  break;
233  }
234  }
235  if(foundcontainer == nullptr){
236  throw std::runtime_error("Could not find track in original containers");
237  }
238  mylink.setStorableObject(*foundcontainer, true);
239  newLinkVector.push_back( mylink );
240  }
241  v->clearTracks();
242  v->setTrackParticleLinks( newLinkVector );
243  }
244 }

◆ PrepareVertexLinks() [2/2]

void DerivationFramework::BPhysPVCascadeTools::PrepareVertexLinks ( Trk::VxCascadeInfo result,
const xAOD::TrackParticleContainer importedTrackCollection 
)
static

Definition at line 204 of file BPhysPVCascadeTools.cxx.

205 {
206  auto &collection = result->vertices();
207  for(auto v : collection)
208  {
209  std::vector<ElementLink<DataVector<xAOD::TrackParticle> > > newLinkVector;
210  for(unsigned int i=0; i< v->trackParticleLinks().size(); i++)
211  {
212  ElementLink<DataVector<xAOD::TrackParticle> > mylink=v->trackParticleLinks()[i]; // makes a copy (non-const)
213  mylink.setStorableObject(*importedTrackCollection, true);
214  newLinkVector.push_back( mylink );
215  }
216  v->clearTracks();
217  v->setTrackParticleLinks( newLinkVector );
218  }
219 }

◆ ProcessVertex()

void DerivationFramework::BPhysPVCascadeTools::ProcessVertex ( const std::vector< TLorentzVector > &  mom,
Amg::MatrixX  cov,
xAOD::BPhysHypoHelper vtx,
xAOD::BPhysHelper::pv_type  pvtype,
double  mass 
) const

Definition at line 54 of file BPhysPVCascadeTools.cxx.

55  {
56 
57  const xAOD::Vertex* pv = vtx.pv(pvtype);
58  if (pv) {
59  // decorate the vertex.
62  // Proper decay time assuming constant mass hypothesis
65  //enum pv_type {PV_MAX_SUM_PT2, PV_MIN_A0, PV_MIN_Z0, PV_MIN_Z0_BA};
66  } else {
67  const float errConst = -9999999.;
68  BPHYS_CHECK( vtx.setTau( errConst, pvtype, xAOD::BPhysHypoHelper::TAU_INV_MASS) );
72  }
73 
74 }

◆ setLevel()

void AthMessaging::setLevel ( MSG::Level  lvl)
inherited

Change the current logging level.

Use this rather than msg().setLevel() for proper operation with MT.

Definition at line 28 of file AthMessaging.cxx.

29 {
30  m_lvl = lvl;
31 }

◆ SetMinNTracksInPV()

void DerivationFramework::BPhysPVCascadeTools::SetMinNTracksInPV ( size_t  PV_minNTracks)

Set the minimum number of tracks required for primary vertices to be considered for primary vertex association to a secondary vertex.

Note that this requirement will not be applied for finding the vertex with the highest pT sum (FindHighPtIndex()) since it would possibly exclude this vertex which has been marked earlier in the tool chain.

Definition at line 139 of file BPhysPVCascadeTools.cxx.

140 {
141 
142  m_PV_minNTracks = PV_minNTracks;
143 }

◆ SetVectorInfo()

void DerivationFramework::BPhysPVCascadeTools::SetVectorInfo ( xAOD::BPhysHelper vtx,
const Trk::VxCascadeInfo casc 
)
static

Definition at line 424 of file BPhysPVCascadeTools.cxx.

424  {
425 
426  const std::vector< std::vector<TLorentzVector> > &moms = casc->getParticleMoms();
427  const std::vector<xAOD::Vertex*> &cascadeVertices = casc->vertices();
428  // Get refitted track momenta from all vertices, charged tracks only
429  std::vector<float> px;
430  std::vector<float> py;
431  std::vector<float> pz;
432  for( size_t jt=0; jt<moms.size(); jt++) {
433  for( size_t it=0; it<cascadeVertices[jt]->vxTrackAtVertex().size(); it++) {
434  px.push_back( moms[jt][it].Px() );
435  py.push_back( moms[jt][it].Py() );
436  pz.push_back( moms[jt][it].Pz() );
437  }
438  }
439  vtx.setRefTrks(std::move(px),std::move(py),std::move(pz));
440 
441 }

◆ uniqueCollection() [1/2]

bool DerivationFramework::BPhysPVCascadeTools::uniqueCollection ( const std::vector< const xAOD::TrackParticle * > &  col)
static

Definition at line 443 of file BPhysPVCascadeTools.cxx.

443  {
444  for(auto p : col){
445  if(std::count(col.begin(), col.end(), p) > 1) return false;
446  }
447  return true;
448 }

◆ uniqueCollection() [2/2]

bool DerivationFramework::BPhysPVCascadeTools::uniqueCollection ( const std::vector< const xAOD::TrackParticle * > &  col1,
const std::vector< const xAOD::TrackParticle * > &  col2 
)
static

Definition at line 450 of file BPhysPVCascadeTools.cxx.

450  {
451  for(auto p : col1){
452  if((std::count(col1.begin(), col1.end(), p) + std::count(col2.begin(), col2.end(), p)) > 1) return false;
453  }
454  for(auto p : col2){
455  if((std::count(col1.begin(), col1.end(), p) + std::count(col2.begin(), col2.end(), p)) > 1) return false;
456  }
457  return true;
458 }

◆ VerticesMatchTracks()

template<size_t NTracks>
bool DerivationFramework::BPhysPVCascadeTools::VerticesMatchTracks ( const xAOD::Vertex v1,
const xAOD::Vertex v2 
)
static

Definition at line 129 of file BPhysPVCascadeTools.h.

130 {
131  if(v1->nTrackParticles() != v2->nTrackParticles()) return false;
132  assert(v1->nTrackParticles() == NTracks);
133  std::array<const xAOD::TrackParticle*, NTracks> a1;
134  std::array<const xAOD::TrackParticle*, NTracks> a2;
135  for(size_t i=0;i<NTracks;i++){
136  a1[i] = v1->trackParticle(i);
137  a2[i] = v2->trackParticle(i);
138  }
139  std::sort(a1.begin(), a1.end());
140  std::sort(a2.begin(), a2.end());
141  return a1 == a2;
142 }

Member Data Documentation

◆ ATLAS_THREAD_SAFE

std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
mutableprivateinherited

Messaging initialized (initMessaging)

Definition at line 141 of file AthMessaging.h.

◆ m_cascadeTools

const CascadeTools* DerivationFramework::BPhysPVCascadeTools::m_cascadeTools
private

Definition at line 38 of file BPhysPVCascadeTools.h.

◆ m_copyAllVertices

bool DerivationFramework::BPhysPVCascadeTools::m_copyAllVertices

Definition at line 45 of file BPhysPVCascadeTools.h.

◆ m_eventInfo

const xAOD::EventInfo* DerivationFramework::BPhysPVCascadeTools::m_eventInfo
private

Definition at line 39 of file BPhysPVCascadeTools.h.

◆ m_imsg

std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr }
mutableprivateinherited

MessageSvc pointer.

Definition at line 135 of file AthMessaging.h.

◆ m_lvl

std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL }
mutableprivateinherited

Current logging level.

Definition at line 138 of file AthMessaging.h.

◆ m_msg_tls

boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls
mutableprivateinherited

MsgStream instance (a std::cout like with print-out levels)

Definition at line 132 of file AthMessaging.h.

◆ m_nm

std::string AthMessaging::m_nm
privateinherited

Message source name.

Definition at line 129 of file AthMessaging.h.

◆ m_PV_minNTracks

size_t DerivationFramework::BPhysPVCascadeTools::m_PV_minNTracks
private

minimum number of tracks required in PVs considered

Definition at line 42 of file BPhysPVCascadeTools.h.


The documentation for this class was generated from the following files:
AthMessaging::m_lvl
std::atomic< MSG::Level > m_lvl
Current logging level.
Definition: AthMessaging.h:138
DerivationFramework::CascadeTools::a0zError
double a0zError(const std::vector< TLorentzVector > &particleMom, const Amg::MatrixX &cov, const xAOD::Vertex *SV, const xAOD::Vertex *PV) const
Definition: CascadeTools.cxx:348
DerivationFramework::BPhysPVCascadeTools::ProcessVertex
void ProcessVertex(const std::vector< TLorentzVector > &mom, Amg::MatrixX cov, xAOD::BPhysHypoHelper &vtx, xAOD::BPhysHelper::pv_type pvtype, double mass) const
Definition: BPhysPVCascadeTools.cxx:54
CalculateHighPtTerm.pT
pT
Definition: ICHEP2016/CalculateHighPtTerm.py:57
xAOD::BPhysHelper::setA0xyErr
float setA0xyErr(const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0)
transverse impact parameter error
Definition: BPhysHelper.cxx:1056
DerivationFramework::CascadeTools::tauError
double tauError(const std::vector< TLorentzVector > &particleMom, const Amg::MatrixX &cov, const xAOD::Vertex *SV, const xAOD::Vertex *PV) const
Definition: CascadeTools.cxx:205
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:29
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
test_pyathena.px
px
Definition: test_pyathena.py:18
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
max
#define max(a, b)
Definition: cfImp.cxx:41
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
DerivationFramework::CascadeTools::a0xyError
double a0xyError(const std::vector< TLorentzVector > &particleMom, const Amg::MatrixX &cov, const xAOD::Vertex *SV, const xAOD::Vertex *PV) const
Definition: CascadeTools.cxx:404
xAOD::BPhysHypoHelper::setTauErr
bool setTauErr(const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0, const tau_type tauType=BPhysHypoHelper::TAU_CONST_MASS)
proper decay time error
Definition: BPhysHypoHelper.cxx:176
xAOD::BPhysHelper::setRefitPVStatus
bool setRefitPVStatus(int code, const pv_type vertexType=BPhysHelper::PV_MIN_A0)
Set the exitCode of the refitter for vertex of type pv_type.
Definition: BPhysHelper.cxx:844
index
Definition: index.py:1
Trk::VxSecVertexInfo::vertices
const std::vector< xAOD::Vertex * > & vertices() const
Definition: VxSecVertexInfo.cxx:100
DerivationFramework::CascadeTools::lxy
double lxy(const std::vector< TLorentzVector > &particleMom, const xAOD::Vertex *SV, const xAOD::Vertex *PV) const
Definition: CascadeTools.cxx:142
skel.it
it
Definition: skel.GENtoEVGEN.py:423
plotBeamSpotVxVal.cov
cov
Definition: plotBeamSpotVxVal.py:201
DerivationFramework::BPhysPVCascadeTools::FillBPhysHelper
void FillBPhysHelper(const std::vector< TLorentzVector > &mom, Amg::MatrixX cov, xAOD::BPhysHelper &vtx, const xAOD::Vertex *refPV, const xAOD::VertexContainer *refPvContainer, xAOD::BPhysHelper::pv_type pvtype, int) const
Fills the BPhysHelper object with the standard parameters.
Definition: BPhysPVCascadeTools.cxx:32
DerivationFramework::BPhysPVTools
Definition: BPhysPVTools.h:25
DerivationFramework::BPhysPVCascadeTools::m_eventInfo
const xAOD::EventInfo * m_eventInfo
Definition: BPhysPVCascadeTools.h:39
DerivationFramework::CascadeTools::a0Error
double a0Error(const std::vector< TLorentzVector > &particleMom, const Amg::MatrixX &cov, const xAOD::Vertex *SV, const xAOD::Vertex *PV) const
Definition: CascadeTools.cxx:457
DerivationFramework::CascadeTools::a0xy
double a0xy(const std::vector< TLorentzVector > &particleMom, const xAOD::Vertex *SV, const xAOD::Vertex *PV) const
Definition: CascadeTools.cxx:396
xAOD::BPhysHelper::PV_MIN_Z0
@ PV_MIN_Z0
Definition: BPhysHelper.h:475
athena.exitcode
int exitcode
Definition: athena.py:159
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
Trk::VxCascadeInfo::getCovariance
const std::vector< Amg::MatrixX > & getCovariance() const
Definition: VxCascadeInfo.h:132
DerivationFramework::BPhysPVCascadeTools::GetBeamSpot
Amg::Vector3D GetBeamSpot() const
Get the current beamspot position either from cache or from BeamCondSvc.
Definition: BPhysPVCascadeTools.cxx:146
AthMessaging::m_imsg
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
Definition: AthMessaging.h:135
x
#define x
python.SystemOfUnits.ms
int ms
Definition: SystemOfUnits.py:132
xAOD::EventInfo_v1::beamPosX
float beamPosX() const
X coordinate of the beam spot position.
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
dqt_zlumi_pandas.mass
mass
Definition: dqt_zlumi_pandas.py:170
xAOD::BPhysHypoHelper::TAU_INV_MASS
@ TAU_INV_MASS
Definition: BPhysHypoHelper.h:137
XMLtoHeader.count
count
Definition: XMLtoHeader.py:85
VertexLinkVector
std::vector< VertexLink > VertexLinkVector
Definition: BPhysHelper.cxx:20
DerivationFramework::BPhysPVCascadeTools::m_cascadeTools
const CascadeTools * m_cascadeTools
Definition: BPhysPVCascadeTools.h:38
Analysis::PrimaryVertexRefitter::refitVertex
xAOD::Vertex * refitVertex(const xAOD::Vertex *vertex, const xAOD::Vertex *excludeVertex, bool ReturnCopy=true, int *exitcode=nullptr) const
Definition: PrimaryVertexRefitter.cxx:40
xAOD::VxType::VertexType
VertexType
Vertex types.
Definition: TrackingPrimitives.h:569
DerivationFramework::CascadeTools::tau
double tau(const std::vector< TLorentzVector > &particleMom, const xAOD::Vertex *SV, const xAOD::Vertex *PV) const
Definition: CascadeTools.cxx:196
DerivationFramework::BPhysPVCascadeTools::CollectAllChargedTracks
static std::vector< const xAOD::TrackParticle * > CollectAllChargedTracks(const std::vector< xAOD::Vertex * > &cascadeVertices)
Definition: BPhysPVCascadeTools.cxx:246
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
DerivationFramework::BPhysPVCascadeTools::GetGoodPV
static std::vector< const xAOD::Vertex * > GetGoodPV(const xAOD::VertexContainer *pvContainer)
Static method call with DerivationFramework::BPhysDerHelpers::GetGoodPV Returns a std::vector contain...
Definition: BPhysPVCascadeTools.cxx:120
AthMessaging::AthMessaging
AthMessaging()
Default constructor:
xAOD::EventInfo_v1::beamPosY
float beamPosY() const
Y coordinate of the beam spot position.
BPHYS_CHECK
#define BPHYS_CHECK(EXP)
Useful CHECK macro.
Definition: BPhysHelper.h:738
ParticleGun_EoverP_Config.mom
mom
Definition: ParticleGun_EoverP_Config.py:63
TrigConf::MSGTC::Level
Level
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:21
xAOD::BPhysHelper::setA0xy
float setA0xy(const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0)
transverse impact parameter
Definition: BPhysHelper.cxx:1045
lumiFormat.i
int i
Definition: lumiFormat.py:92
DerivationFramework::CascadeTools::a0
double a0(const std::vector< TLorentzVector > &particleMom, const xAOD::Vertex *SV, const xAOD::Vertex *PV) const
Definition: CascadeTools.cxx:449
DerivationFramework::BPhysPVCascadeTools::FindLowZIndex
size_t FindLowZIndex(const std::vector< TLorentzVector > &mom, const xAOD::BPhysHelper &Obj, const std::vector< const xAOD::Vertex * > &PVlist, const size_t PV_minNTracks=0) const
Returns the index integer of the vertex with the lowest Z in relation to the given vertex.
Definition: BPhysPVCascadeTools.cxx:76
xAOD::BPhysHelper::setZ0Err
float setZ0Err(const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0)
longitudinal impact parameter error
Definition: BPhysHelper.cxx:1078
xAOD::VxType::PriVtx
@ PriVtx
Primary vertex.
Definition: TrackingPrimitives.h:571
Amg::pz
@ pz
Definition: GeoPrimitives.h:40
xAOD::BPhysHelper::PV_MIN_A0
@ PV_MIN_A0
Definition: BPhysHelper.h:475
python.xAODType.dummy
dummy
Definition: xAODType.py:4
DerivationFramework::BPhysPVCascadeTools::FindLowZ0BAIndex
size_t FindLowZ0BAIndex(const std::vector< TLorentzVector > &mom, const xAOD::BPhysHelper &obj, const std::vector< const xAOD::Vertex * > &PVlist, const size_t PV_minNTracks=0) const
Find the index for the PV with the lowest distance in z of the SV's DOCA point w.r....
Definition: BPhysPVCascadeTools.cxx:155
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
xAOD::BPhysHelper::setA0Err
float setA0Err(const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0)
3D impact parameter error
Definition: BPhysHelper.cxx:1034
xAOD::BPhysHypoHelper::TAU_CONST_MASS
@ TAU_CONST_MASS
Definition: BPhysHypoHelper.h:137
a0
double a0
Definition: globals.cxx:27
DerivationFramework::BPhysPVCascadeTools::m_copyAllVertices
bool m_copyAllVertices
Definition: BPhysPVCascadeTools.h:45
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
AthMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AthMessaging.h:164
xAOD::BPhysHelper::setLxy
bool setLxy(const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0)
Set the transverse decay distance and its error measured between the refitted primary vertex of type ...
Definition: BPhysHelper.cxx:888
min
#define min(a, b)
Definition: cfImp.cxx:40
xAOD::BPhysHelper::setPv
bool setPv(const xAOD::Vertex *pv, const xAOD::VertexContainer *vertexContainer, const pv_type vertexType=BPhysHelper::PV_MIN_A0)
Set the refitted collision vertex of type pv_type.
Definition: BPhysHelper.cxx:831
xAOD::VxType::PileUp
@ PileUp
Pile-up vertex.
Definition: TrackingPrimitives.h:573
Amg::py
@ py
Definition: GeoPrimitives.h:39
xAOD::EventInfo_v1::beamPosZ
float beamPosZ() const
Z coordinate of the beam spot position.
Py
Definition: PyDataStore.h:24
xAOD::BPhysHelper::vtx
const xAOD::Vertex * vtx() const
Getter method for the cached xAOD::Vertex.
Definition: BPhysHelper.h:108
charge
double charge(const T &p)
Definition: AtlasPID.h:494
xAOD::BPhysHelper::PV_MAX_SUM_PT2
@ PV_MAX_SUM_PT2
Definition: BPhysHelper.h:475
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::VxCascadeInfo::getParticleMoms
const std::vector< std::vector< TLorentzVector > > & getParticleMoms() const
Definition: VxCascadeInfo.h:131
query_example.col
col
Definition: query_example.py:7
xAOD::BPhysHelper::setLxyErr
bool setLxyErr(const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0)
its error
Definition: BPhysHelper.cxx:899
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
ReadCellNoiseFromCoolCompare.v2
v2
Definition: ReadCellNoiseFromCoolCompare.py:364
python.PyAthena.v
v
Definition: PyAthena.py:157
xAOD::BPhysHelper::setOrigPv
bool setOrigPv(const xAOD::Vertex *pv, const xAOD::VertexContainer *vertexContainer, const pv_type vertexType=BPhysHelper::PV_MIN_A0)
Set the original collision vertex of type pv_type.
Definition: BPhysHelper.cxx:818
xAOD::BPhysHelper::setRefTrks
bool setRefTrks(std::vector< float > px, std::vector< float > py, std::vector< float > pz)
Sets refitted track momenta.
Definition: BPhysHelper.cxx:286
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
DeMoScan.index
string index
Definition: DeMoScan.py:362
a
TList * a
Definition: liststreamerinfos.cxx:10
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
Trk::V0Tools
Definition: V0Tools.h:36
DerivationFramework::CascadeTools::a0z
double a0z(const std::vector< TLorentzVector > &particleMom, const xAOD::Vertex *SV, const xAOD::Vertex *PV) const
Definition: CascadeTools.cxx:339
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
DerivationFramework::BPhysPVCascadeTools::m_PV_minNTracks
size_t m_PV_minNTracks
minimum number of tracks required in PVs considered
Definition: BPhysPVCascadeTools.h:42
AthMessaging::m_nm
std::string m_nm
Message source name.
Definition: AthMessaging.h:129
DerivationFramework::BPhysPVCascadeTools::FindLowA0Index
size_t FindLowA0Index(const std::vector< TLorentzVector > &mom, const xAOD::BPhysHelper &Obj, const std::vector< const xAOD::Vertex * > &PVlist, const size_t PV_minNTracks=0) const
Returns the index integer of the vertex with the lowest A0 in relation to the given vertex.
Definition: BPhysPVCascadeTools.cxx:98
python.changerun.pv
pv
Definition: changerun.py:81
xAOD::BPhysHelper::pv
const xAOD::Vertex * pv(const pv_type vertexType=BPhysHelper::PV_MIN_A0)
Get the refitted collision vertex of type pv_type.
Definition: BPhysHelper.cxx:796
DerivationFramework::CascadeTools::lxyError
double lxyError(const std::vector< TLorentzVector > &particleMom, const Amg::MatrixX &cov, const xAOD::Vertex *SV, const xAOD::Vertex *PV) const
Definition: CascadeTools.cxx:153
xAOD::BPhysHelper::setA0
float setA0(const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0)
Set the 3D and transverse impact parameters and their error.
Definition: BPhysHelper.cxx:1023
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
DataVector::at
const T * at(size_type n) const
Access an element, as an rvalue.
xAOD::BPhysHelper::setZ0
float setZ0(const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0)
longitudinal impact parameter
Definition: BPhysHelper.cxx:1067
AthMessaging::initMessaging
void initMessaging() const
Initialize our message level and MessageSvc.
Definition: AthMessaging.cxx:39
AthMessaging::m_msg_tls
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
Definition: AthMessaging.h:132
python.PyAthena.obj
obj
Definition: PyAthena.py:135
xAOD::BPhysHypoHelper::setTau
bool setTau(const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0, const tau_type tauType=BPhysHypoHelper::TAU_CONST_MASS)
: Set the proper decay time and error.
Definition: BPhysHypoHelper.cxx:140
python.compressB64.c
def c
Definition: compressB64.py:93
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
DataVector::empty
bool empty() const noexcept
Returns true if the collection is empty.
DerivationFramework::BPhysPVCascadeTools::DocaExtrapToBeamSpot
Amg::Vector3D DocaExtrapToBeamSpot(const std::vector< TLorentzVector > &mom, const xAOD::BPhysHelper &obj) const
Point of DOCA w.r.t.
Definition: BPhysPVCascadeTools.cxx:183
xAOD::BPhysHelper::PV_MIN_Z0_BA
@ PV_MIN_Z0_BA
Definition: BPhysHelper.h:475
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.