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

#include <BPhysPVTools.h>

Inheritance diagram for DerivationFramework::BPhysPVTools:
Collaboration diagram for DerivationFramework::BPhysPVTools:

Public Member Functions

 BPhysPVTools (const Trk::V0Tools *v0Tools)
 
 BPhysPVTools (const Trk::V0Tools *v0Tools, const xAOD::EventInfo *)
 
void SetSave3d (bool v)
 
StatusCode FillCandExistingVertices (xAOD::VertexContainer *vtxContainer, const xAOD::VertexContainer *pvContainer, int DoVertexType)
 
void FillBPhysHelperNULL (xAOD::BPhysHelper &vtx, const xAOD::VertexContainer *PvContainer, xAOD::BPhysHelper::pv_type pvtype, bool do3d=false) const
 
StatusCode FillCandwithRefittedVertices (xAOD::VertexContainer *vtxContainer, const xAOD::VertexContainer *pvContainer, xAOD::VertexContainer *refPvContainer, const Analysis::PrimaryVertexRefitter *, size_t in_PV_max, int DoVertexType)
 
void DecorateWithNULL (xAOD::VertexContainer *vtxContainer, const xAOD::VertexContainer *pvContainer, int DoVertexType) const
 
void DecorateWithDummyVertex (xAOD::VertexContainer *vtxContainer, const xAOD::VertexContainer *pvContainer, const xAOD::Vertex *Dummy, int DoVertexType, bool SetOrignal) const
 
void FillBPhysHelper (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 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 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...
 
size_t FindHighPtIndex (const std::vector< const xAOD::Vertex * > &PVlist) const
 
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 (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 (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 (xAOD::BPhysHelper &obj) const
 Point of DOCA w.r.t. More...
 
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

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 (xAOD::Vertex *theResult, const xAOD::TrackParticleContainer *importedTrackCollection)
 

Private Member Functions

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

Private Attributes

const Trk::V0Toolsm_v0Tools
 
const xAOD::EventInfom_EvtData
 
size_t m_PV_minNTracks
 minimum number of tracks required in PVs considered More...
 
bool m_3dCalc
 
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 25 of file BPhysPVTools.h.

Constructor & Destructor Documentation

◆ BPhysPVTools() [1/2]

DerivationFramework::BPhysPVTools::BPhysPVTools ( const Trk::V0Tools v0Tools)

Definition at line 18 of file BPhysPVTools.cxx.

18  :
19  AthMessaging("BPhysPVTools"),
20  m_v0Tools(v0Tools), m_EvtData(nullptr), m_PV_minNTracks(0),
21  m_3dCalc(false)
22 {
23 }

◆ BPhysPVTools() [2/2]

DerivationFramework::BPhysPVTools::BPhysPVTools ( const Trk::V0Tools v0Tools,
const xAOD::EventInfo eventInfo 
)

Definition at line 25 of file BPhysPVTools.cxx.

25  :
26  AthMessaging("BPhysPVTools"),
27  m_v0Tools(v0Tools), m_EvtData(eventInfo), m_PV_minNTracks(0),
28  m_3dCalc(false)
29 {
30 }

Member Function Documentation

◆ DecorateWithDummyVertex()

void DerivationFramework::BPhysPVTools::DecorateWithDummyVertex ( xAOD::VertexContainer vtxContainer,
const xAOD::VertexContainer pvContainer,
const xAOD::Vertex Dummy,
int  DoVertexType,
bool  SetOrignal 
) const

Definition at line 102 of file BPhysPVTools.cxx.

104  {
105  const bool doPt = (DoVertexType & 1) != 0;
106  const bool doA0 = (DoVertexType & 2) != 0;
107  const bool doZ0 = (DoVertexType & 4) != 0;
108  const bool doZ0BA = (DoVertexType & 8) != 0;
109 
110  xAOD::VertexContainer::iterator vtxItr = vtxContainer->begin();
111  for(; vtxItr!=vtxContainer->end(); ++vtxItr) {
112  xAOD::BPhysHelper vtx(*vtxItr);
113 
114  // 1) pT error
115  double ptErr = m_v0Tools->pTError( vtx.vtx() );
116  BPHYS_CHECK( vtx.setPtErr(ptErr) );
117  if(doPt) {
118  // 2.a) the first PV with the largest sum pT.
119  FillBPhysHelper(vtx, Dummy, pvContainer, xAOD::BPhysHelper::PV_MAX_SUM_PT2, 0);
120  if(SetOrignal) vtx.setOrigPv(Dummy, pvContainer, xAOD::BPhysHelper::PV_MAX_SUM_PT2);
121  }
122 
123  if(doA0) {
124  // 2.b) the closest in 3D:
125  FillBPhysHelper(vtx, Dummy, pvContainer, xAOD::BPhysHelper::PV_MIN_A0, 0);
126  if(SetOrignal) vtx.setOrigPv(Dummy, pvContainer, xAOD::BPhysHelper::PV_MIN_A0);
127  }
128 
129  if(doZ0) {
130  FillBPhysHelper(vtx, Dummy, pvContainer, xAOD::BPhysHelper::PV_MIN_Z0, 0);
131  if(SetOrignal) vtx.setOrigPv(Dummy, pvContainer, xAOD::BPhysHelper::PV_MIN_Z0);
132  }
133 
134  if(doZ0BA) {
135  FillBPhysHelper(vtx, Dummy, pvContainer, xAOD::BPhysHelper::PV_MIN_Z0_BA, 0);
136  if(SetOrignal) vtx.setOrigPv(Dummy, pvContainer, xAOD::BPhysHelper::PV_MIN_Z0_BA);
137  }
138  }
139 }

◆ DecorateWithNULL()

void DerivationFramework::BPhysPVTools::DecorateWithNULL ( xAOD::VertexContainer vtxContainer,
const xAOD::VertexContainer pvContainer,
int  DoVertexType 
) const

Definition at line 141 of file BPhysPVTools.cxx.

142  {
143  const bool doPt = (DoVertexType & 1) != 0;
144  const bool doA0 = (DoVertexType & 2) != 0;
145  const bool doZ0 = (DoVertexType & 4) != 0;
146  const bool doZ0BA = (DoVertexType & 8) != 0;
147  xAOD::VertexContainer::iterator vtxItr = vtxContainer->begin();
148  for(; vtxItr!=vtxContainer->end(); ++vtxItr) {
149  xAOD::BPhysHelper vtx(*vtxItr);
150 
151  // 1) pT error
152  double ptErr = m_v0Tools->pTError( vtx.vtx() );
153  BPHYS_CHECK( vtx.setPtErr(ptErr) );
154  if(doPt) {
155  // 2.a) the first PV with the largest sum pT.
157  }
158 
159  if(doA0) {
160  // 2.b) the closest in 3D:
162  }
163 
164  if(doZ0) {
166  }
167  if(doZ0BA) {
169  }
170  }
171 }

◆ DistInZtoDOCA()

double DerivationFramework::BPhysPVTools::DistInZtoDOCA ( 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 503 of file BPhysPVTools.cxx.

503  {
504 
505  Amg::Vector3D pv = vertex->position();
507  Amg::Vector3D vec = pv - xDOCA;
508  return vec.z();
509 }

◆ DocaExtrapToBeamSpot()

Amg::Vector3D DerivationFramework::BPhysPVTools::DocaExtrapToBeamSpot ( xAOD::BPhysHelper obj) const

Point of DOCA w.r.t.

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

Definition at line 513 of file BPhysPVTools.cxx.

513  {
514 
515  Amg::Vector3D xDOCA(-99999., -99999., -99999.);
516  TVector3 totP(obj.totalP());
517  Amg::Vector3D pSV(totP.X(), totP.Y(), totP.Z());
518  Amg::Vector3D pT(pSV.x(), pSV.y(), 0.);
519  if ( pT.mag2() > 0 ) {
520  Amg::Vector3D xBS = GetBeamSpot();
521  Amg::Vector3D xSV = m_v0Tools->vtx(obj.vtx());
522  Amg::Vector3D xT(xSV.x()-xBS.x(), xSV.y()-xBS.y(), 0.);
523  xDOCA = xSV - pSV*pT.dot(xT)/pT.mag2();
524  } else {
525  ATH_MSG_WARNING("DocaExtrapToBeamSpot: pT == 0.");
526  }
527  return xDOCA;
528 }

◆ FillBPhysHelper()

void DerivationFramework::BPhysPVTools::FillBPhysHelper ( 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 BPhysPVTools.cxx.

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

◆ FillBPhysHelperNULL()

void DerivationFramework::BPhysPVTools::FillBPhysHelperNULL ( xAOD::BPhysHelper vtx,
const xAOD::VertexContainer PvContainer,
xAOD::BPhysHelper::pv_type  pvtype,
bool  do3d = false 
) const

Definition at line 57 of file BPhysPVTools.cxx.

59  {
60 
61  const xAOD::Vertex* PV = nullptr;
62  BPHYS_CHECK( vtx.setPv ( PV, PvContainer, pvtype ) );
63  constexpr float errConst = std::numeric_limits<float>::lowest();
64  // set variables claculated from PV
65  if(do3d){
66  BPHYS_CHECK( vtx.setLxyz ( errConst, pvtype ) );
67  BPHYS_CHECK( vtx.setLxyzErr ( errConst, pvtype ) );
68  }
69  BPHYS_CHECK( vtx.setLxy ( errConst, pvtype ) );
70  BPHYS_CHECK( vtx.setLxyErr ( errConst, pvtype ) );
71  BPHYS_CHECK( vtx.setA0 ( errConst, pvtype ) );
72  BPHYS_CHECK( vtx.setA0Err ( errConst, pvtype ) );
73  BPHYS_CHECK( vtx.setA0xy ( errConst, pvtype ) );
74  BPHYS_CHECK( vtx.setA0xyErr( errConst, pvtype ) );
75  BPHYS_CHECK( vtx.setZ0 ( errConst, pvtype ) );
76  BPHYS_CHECK( vtx.setZ0Err ( errConst, pvtype ) );
77  BPHYS_CHECK( vtx.setRefitPVStatus ( 0, pvtype ) );
78 }

◆ FillCandExistingVertices()

StatusCode DerivationFramework::BPhysPVTools::FillCandExistingVertices ( xAOD::VertexContainer vtxContainer,
const xAOD::VertexContainer pvContainer,
int  DoVertexType 
)

Definition at line 173 of file BPhysPVTools.cxx.

174  {
175 
176 
177 
178  //----------------------------------------------------
179  // decorate the vertex
180  //----------------------------------------------------
181  // loop over candidates -- Don't apply PV_minNTracks requirement here
182  // because it may result in exclusion of the high-pt PV.
183  const std::vector<const xAOD::Vertex*> GoodPVs = GetGoodPV(pvContainer);
184 
185 
186  if(GoodPVs.empty() == false) {
187 
188  const bool doPt = (DoVertexType & 1) != 0;
189  const bool doA0 = (DoVertexType & 2) != 0;
190  const bool doZ0 = (DoVertexType & 4) != 0;
191  const bool doZ0BA = (DoVertexType & 8) != 0;
192 
193  xAOD::VertexContainer::iterator vtxItr = vtxContainer->begin();
194  for(; vtxItr!=vtxContainer->end(); ++vtxItr) {
195  xAOD::BPhysHelper vtx(*vtxItr);
196 
197  // 1) pT error
198  double ptErr = m_v0Tools->pTError( vtx.vtx() );
199  BPHYS_CHECK( vtx.setPtErr(ptErr) );
200 
201  // 2) refit the primary vertex and set the related decorations.
202  if(doPt) {
203  size_t highPtindex = FindHighPtIndex(GoodPVs); //Should be 0 in PV ordering
204  // 2.a) the first PV with the largest sum pT.
205  FillBPhysHelper(vtx, GoodPVs[highPtindex], pvContainer, xAOD::BPhysHelper::PV_MAX_SUM_PT2, 0);
206  }
207 
208  if(doA0) {
209  // 2.b) the closest in 3D:
210  size_t lowA0 = FindLowA0Index(vtx, GoodPVs, m_PV_minNTracks);
211  FillBPhysHelper(vtx, GoodPVs[lowA0], pvContainer, xAOD::BPhysHelper::PV_MIN_A0, 0);
212  }
213 
214  if(doZ0) {
215  size_t lowZ = FindLowZIndex(vtx, GoodPVs, m_PV_minNTracks);
216  FillBPhysHelper(vtx, GoodPVs[lowZ], pvContainer, xAOD::BPhysHelper::PV_MIN_Z0, 0);
217  }
218 
219  if(doZ0BA) {
220  size_t lowZBA = FindLowZ0BAIndex(vtx, GoodPVs, m_PV_minNTracks);
221  if ( lowZBA < GoodPVs.size() ) { // safety against vector index out-of-bounds
222  FillBPhysHelper(vtx, GoodPVs[lowZBA], pvContainer, xAOD::BPhysHelper::PV_MIN_Z0_BA, 0);
223  } else {
224  // nothing found -- fill nullptr
226  }
227  }
228 
229  }// end of loop over vertices
230  } //end of check for vertices
231  else {
232  // cout << "Warning: DerivationFramework::BPhysPVTools::FillCandExistingVertices No Primary Vertices Found trying to decorate wilth dummy \n";
233  if(pvContainer->empty()) return StatusCode::FAILURE;
234  const xAOD::Vertex* dummy = pvContainer->at(0); //No good vertices so last vertex must be dummy
235  DecorateWithDummyVertex(vtxContainer, pvContainer, dummy, DoVertexType, false);
236  }
237  return StatusCode::SUCCESS;
238 }

◆ FillCandwithRefittedVertices()

StatusCode DerivationFramework::BPhysPVTools::FillCandwithRefittedVertices ( xAOD::VertexContainer vtxContainer,
const xAOD::VertexContainer pvContainer,
xAOD::VertexContainer refPvContainer,
const Analysis::PrimaryVertexRefitter pvRefitter,
size_t  in_PV_max,
int  DoVertexType 
)

Definition at line 241 of file BPhysPVTools.cxx.

243  {
244 
245 
246  //----------------------------------------------------
247  // decorate the vertex
248  //----------------------------------------------------
249  // loop over candidates -- Don't apply PV_minNTracks requirement here
250  // because it may result in exclusion of the high-pt PV.
251  std::vector<const xAOD::Vertex*> goodPrimaryVertices = GetGoodPV(pvContainer);
252 
253  /*
254  cout << "BPhysPVTools::FillCandwithRefittedVertices: #PVs: all: "
255  << pvContainer->size() << " ref: " << refPvContainer->size()
256  << " good: " << goodPrimaryVertices.size()
257  << " PV_minNTracks: " << m_PV_minNTracks << endl;
258  */
259  if(goodPrimaryVertices.empty() == false) {
260 
261  size_t pVmax =std::min(in_PV_max, goodPrimaryVertices.size());
262  std::vector<const xAOD::Vertex*> refPVvertexes;
263  std::vector<xAOD::Vertex*> refPVvertexes_toDelete;
264  std::vector<int> exitCode;
265  refPVvertexes.reserve(pVmax);
266  refPVvertexes_toDelete.reserve(pVmax);
267  exitCode.reserve(pVmax);
268 
269  bool doPt = (DoVertexType & 1) != 0;
270  bool doA0 = (DoVertexType & 2) != 0;
271  bool doZ0 = (DoVertexType & 4) != 0;
272  bool doZ0BA = (DoVertexType & 8) != 0;
273 
274  xAOD::VertexContainer::iterator vtxItr = vtxContainer->begin();
275  for(; vtxItr!=vtxContainer->end(); ++vtxItr) {
276  xAOD::BPhysHelper vtx(*vtxItr);
277 
278  // 1) pT error
279  double ptErr = m_v0Tools->pTError( vtx.vtx() );
280  BPHYS_CHECK( vtx.setPtErr(ptErr) );
281 
282  for(size_t i =0; i < pVmax ; i++) {
283  const xAOD::Vertex* oldPV = goodPrimaryVertices.at(i);
284  //when set to false this will return nullptr when a new vertex is not required
285  int exit =0;
286  xAOD::Vertex* refPV = pvRefitter->refitVertex(oldPV, vtx.vtx(), false, &exit);
287  exitCode.push_back(exit);
288  //I want positioning to match the goodPrimaryVertices
289  if(refPV == nullptr){
290  refPVvertexes.push_back(oldPV);
291  refPVvertexes_toDelete.push_back(nullptr);
292  }else{
293  refPVvertexes.push_back(refPV);
294  refPVvertexes_toDelete.push_back(refPV);
295  }
296  }
297 
298  // 2) refit the primary vertex and set the related decorations.
299 
300  size_t highPtindex = doPt ? FindHighPtIndex(refPVvertexes) : 9999999; //Should be 0 in PV ordering
301  size_t lowA0 = doA0 ?
302  FindLowA0Index(vtx, refPVvertexes, m_PV_minNTracks) : 9999998;
303  size_t lowZ = doZ0 ?
304  FindLowZIndex(vtx, refPVvertexes, m_PV_minNTracks) : 9999997;
305  size_t lowZBA = doZ0BA ?
306  FindLowZ0BAIndex(vtx, refPVvertexes, m_PV_minNTracks) : 9999996;
307  /*
308  cout << "BPhysPVTools::FillCandwithRefittedVertices: in_PV_max/pVMax = "
309  << in_PV_max << ", " << pVmax << endl;
310  cout << "BPhysPVTools::FillCandwithRefittedVertices: m_PV_minNTracks = "
311  << m_PV_minNTracks << endl;
312  cout << "BPhysPVTools::FillCandwithRefittedVertices: hPt,lowA0/Z/ZBA = "
313  << highPtindex << ", "
314  << lowA0 << ", " << lowZ << ", " << lowZBA << " "
315  << (lowA0 != lowZ ? "1!" : " ")
316  << (lowA0 != lowZBA ? "2!" : " ")
317  << (lowZ != lowZBA ? "3!" : " ")
318  << (highPtindex != lowA0 ? "4!" : " ")
319  << (highPtindex != lowZ ? "5!" : " ")
320  << (highPtindex != lowZBA ? "6!" : " ")
321  << endl;
322  */
323  if(doPt) {
324  //Choose old PV container if not refitted
325  const xAOD::VertexContainer* ParentContainer =
326  (refPVvertexes_toDelete.at(highPtindex)) ? refPvContainer : pvContainer;
327  if(ParentContainer == refPvContainer) //if refitted add to refitted container
328  refPvContainer->push_back(refPVvertexes_toDelete.at(highPtindex)); // store the new vertex
329 
330  FillBPhysHelper(vtx, refPVvertexes[highPtindex],
331  ParentContainer, xAOD::BPhysHelper::PV_MAX_SUM_PT2, exitCode[highPtindex]);
332  vtx.setOrigPv(goodPrimaryVertices[highPtindex], pvContainer, xAOD::BPhysHelper::PV_MAX_SUM_PT2);
333  }
334 
335  if(doA0) {
336  const xAOD::VertexContainer* ParentContainer =
337  (refPVvertexes_toDelete.at(lowA0)) ? refPvContainer : pvContainer;
338  if(ParentContainer == refPvContainer && highPtindex!=lowA0)
339  refPvContainer->push_back(refPVvertexes_toDelete.at(lowA0)); // store the new vertex
340 
341  FillBPhysHelper(vtx, refPVvertexes[lowA0],
342  ParentContainer, xAOD::BPhysHelper::PV_MIN_A0, exitCode[lowA0]);
343  vtx.setOrigPv(goodPrimaryVertices[lowA0], pvContainer, xAOD::BPhysHelper::PV_MIN_A0);
344  }
345 
346 
347  // 2.c) the closest in Z:
348  if(doZ0) {
349 
350  const xAOD::VertexContainer* ParentContainer =
351  (refPVvertexes_toDelete.at(lowZ)) ? refPvContainer : pvContainer;
352  if(ParentContainer == refPvContainer && highPtindex!=lowZ && lowZ!=lowA0)
353  refPvContainer->push_back(refPVvertexes_toDelete.at(lowZ)); // store the new vertex
354 
355  FillBPhysHelper(vtx, refPVvertexes[lowZ],
356  ParentContainer, xAOD::BPhysHelper::PV_MIN_Z0, exitCode[lowZ]);
357  vtx.setOrigPv(goodPrimaryVertices[lowZ], pvContainer, xAOD::BPhysHelper::PV_MIN_Z0);
358  }
359 
360  // 2.d) the closest in Z (DOCA w.r.t. beam axis):
361  if (doZ0BA) {
362  if ( lowZBA < pVmax ) { // safety for vector indices
363  const xAOD::VertexContainer* ParentContainer =
364  (refPVvertexes_toDelete.at(lowZBA)) ?
365  refPvContainer : pvContainer;
366  if (ParentContainer == refPvContainer && highPtindex!=lowZBA
367  && lowZBA!=lowA0 && lowZBA != lowZ) {
368  // store the new vertex
369  refPvContainer->push_back(refPVvertexes_toDelete.at(lowZBA));
370  }
371  FillBPhysHelper(vtx, refPVvertexes[lowZBA],
372  ParentContainer, xAOD::BPhysHelper::PV_MIN_Z0_BA,
373  exitCode[lowZBA]);
374  vtx.setOrigPv(goodPrimaryVertices[lowZBA], pvContainer,
376  } else {
377  // nothing found -- fill nullptr
379  // nothing found -- fill dummy vertex (type-0 vertex)
380  // if(pvContainer->empty()) return StatusCode::FAILURE;
381  // const xAOD::Vertex* dummy = pvContainer->at(pvContainer->size()-1); //No good vertices so last vertex must be dummy
382  // FillBPhysHelper(vtx, dummy, pvContainer, xAOD::BPhysHelper::PV_MIN_Z0_BA, 0);
383  // vtx.setOrigPv(Dummy, pvContainer, xAOD::BPhysHelper::PV_MIN_Z0_BA);
384  }
385  }
386 
387  //nullptrify ptrs we want to keep so these won't get deleted
388  //"delete nullptr" is valid in C++ and does nothing so this is quicker than a lot of if statements
389  if(doPt) refPVvertexes_toDelete[highPtindex] = nullptr;
390  if(doA0) refPVvertexes_toDelete[lowA0] = nullptr;
391  if(doZ0) refPVvertexes_toDelete[lowZ] = nullptr;
392  if(doZ0BA && lowZBA < pVmax) refPVvertexes_toDelete[lowZBA] = nullptr;
393  //Loop over toDELETE container, anything that is used or was not refitted is nullptr
394  //This cleans up all extra vertices that were created and not used
395  for(const xAOD::Vertex* ptr : refPVvertexes_toDelete) {
396  delete ptr;
397  }
398  refPVvertexes.clear();// Clear lists of now dangling ptrs
399  refPVvertexes_toDelete.clear();
400  exitCode.clear();
401  } // end of loop over vertices
402 
403  } else {
404 // cout << "Warning: DerivationFramework::BPhysPVTools::FillCandwithRefittedVertices No Primary Vertices Found trying to decorate wilth dummy \n";
405  if(pvContainer->empty()) return StatusCode::FAILURE;
406  const xAOD::Vertex* dummy = pvContainer->at(0); //No good vertices so last vertex must be dummy
407  DecorateWithDummyVertex(vtxContainer, pvContainer, dummy, DoVertexType, true);
408  }
409 
410  return StatusCode::SUCCESS;
411 }

◆ FindHighPtIndex()

size_t DerivationFramework::BPhysPVTools::FindHighPtIndex ( const std::vector< const xAOD::Vertex * > &  PVlist) const

Definition at line 413 of file BPhysPVTools.cxx.

413  {
414  // it SHOULD be the first one in the collection but it shouldn't take long to do a quick check
415  for(size_t i =0; i<PVlist.size(); i++) {
416  if(PVlist[i]->vertexType() == xAOD::VxType::PriVtx) return i;
417  }
418  ATH_MSG_ERROR("High Pt Primary vertex not found - this should not happen");
419  return std::numeric_limits<std::size_t>::max(); //This should not happen
420 }

◆ FindLowA0Index()

size_t DerivationFramework::BPhysPVTools::FindLowA0Index ( 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 422 of file BPhysPVTools.cxx.

424  {
425  size_t lowA0 = 0;
426  if(PVlist.empty()) {
428  return lowA0;
429  }
430  size_t size = PVlist.size();
431  double lowA0calc = m_v0Tools->a0(Obj.vtx(), PVlist[0]);
432  for(size_t i =1; i<size; i++) {
433  if ( PVlist[i]->nTrackParticles() >= PV_minNTracks ) {
434  double a0 = m_v0Tools->a0(Obj.vtx(), PVlist[i]);
435  if(a0 < lowA0calc) {
436  lowA0calc = a0;
437  lowA0 =i;
438  }
439  }
440  }
441  return lowA0;
442 }

◆ FindLowZ0BAIndex()

size_t DerivationFramework::BPhysPVTools::FindLowZ0BAIndex ( 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 483 of file BPhysPVTools.cxx.

485  {
486 
487  size_t ilowZ0BA = std::numeric_limits<std::size_t>::max();
488  double lowZ0BAcalc = std::numeric_limits<double>::max();
489  for (size_t i = 0; i<PVlist.size(); ++i) {
490  if ( PVlist[i]->nTrackParticles() >= PV_minNTracks ) {
491  double z0BA = m_v0Tools->a0(obj.vtx(), PVlist[i]);
492  if (z0BA < lowZ0BAcalc) {
493  lowZ0BAcalc = z0BA;
494  ilowZ0BA = i;
495  }
496  }
497  }
498  return ilowZ0BA;
499 }

◆ FindLowZIndex()

size_t DerivationFramework::BPhysPVTools::FindLowZIndex ( 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 80 of file BPhysPVTools.cxx.

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

◆ GetBeamSpot()

Amg::Vector3D DerivationFramework::BPhysPVTools::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 472 of file BPhysPVTools.cxx.

472  {
473 
475  else {
476  static const Amg::Vector3D defaultBS(-10000.,-10000.,-10000.);
477  return defaultBS;
478  }
479 }

◆ GetGoodPV()

vector< const xAOD::Vertex * > DerivationFramework::BPhysPVTools::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 444 of file BPhysPVTools.cxx.

444  {
447  VertexType Pileupvtx = xAOD::VxType::PileUp;
448  std::vector<const xAOD::Vertex*> goodPrimaryVertices;
449  goodPrimaryVertices.reserve(pvContainer->size());
450 
451  for (auto ptr = pvContainer->begin(); ptr!= pvContainer->end(); ++ptr) {
452  VertexType thistype = (*ptr)->vertexType();
453  if ( thistype == Pileupvtx || thistype == Pvtx ) {
454  goodPrimaryVertices.push_back(*ptr);
455  } else {
456 // cout << "vertex type " << thistype << endl;
457  }
458  }
459  return goodPrimaryVertices;
460 }

◆ 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 }

◆ 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()

void DerivationFramework::BPhysPVTools::PrepareVertexLinks ( xAOD::Vertex theResult,
const xAOD::TrackParticleContainer importedTrackCollection 
)
static

Definition at line 530 of file BPhysPVTools.cxx.

532 {
533  std::vector<ElementLink<DataVector<xAOD::TrackParticle> > > newLinkVector;
534  const auto &trkprtl = theResult->trackParticleLinks();
535  for(unsigned int i=0; i< trkprtl.size(); i++)
536  {
537  ElementLink<DataVector<xAOD::TrackParticle> > mylink=trkprtl[i]; //makes a copy (non-const)
538  mylink.setStorableObject(*importedTrackCollection, true);
539  newLinkVector.push_back( mylink );
540  }
541  theResult->clearTracks();
542  theResult->setTrackParticleLinks( newLinkVector );
543 }

◆ 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::BPhysPVTools::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 464 of file BPhysPVTools.cxx.

465 {
466 
467  m_PV_minNTracks = PV_minNTracks;
468 }

◆ SetSave3d()

void DerivationFramework::BPhysPVTools::SetSave3d ( bool  v)
inline

Definition at line 40 of file BPhysPVTools.h.

40 { m_3dCalc =v; }

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_3dCalc

bool DerivationFramework::BPhysPVTools::m_3dCalc
private

Definition at line 34 of file BPhysPVTools.h.

◆ m_EvtData

const xAOD::EventInfo* DerivationFramework::BPhysPVTools::m_EvtData
private

Definition at line 29 of file BPhysPVTools.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::BPhysPVTools::m_PV_minNTracks
private

minimum number of tracks required in PVs considered

Definition at line 32 of file BPhysPVTools.h.

◆ m_v0Tools

const Trk::V0Tools* DerivationFramework::BPhysPVTools::m_v0Tools
private

Definition at line 28 of file BPhysPVTools.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::BPhysPVTools::DocaExtrapToBeamSpot
Amg::Vector3D DocaExtrapToBeamSpot(xAOD::BPhysHelper &obj) const
Point of DOCA w.r.t.
Definition: BPhysPVTools.cxx:513
Trk::V0Tools::a0xy
static double a0xy(const xAOD::Vertex *vxCandidate, const xAOD::Vertex *vertex)
closest distance in Z and the transverse plane of the momentum vector to an xAOD::Vertex a0xy using t...
Definition: V0Tools.cxx:671
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
Trk::V0Tools::a0zError
double a0zError(const xAOD::Vertex *vxCandidate, const xAOD::Vertex *vertex) const
Definition: V0Tools.cxx:695
xAOD::BPhysHelper
Definition: BPhysHelper.h:71
DerivationFramework::BPhysPVTools::DecorateWithDummyVertex
void DecorateWithDummyVertex(xAOD::VertexContainer *vtxContainer, const xAOD::VertexContainer *pvContainer, const xAOD::Vertex *Dummy, int DoVertexType, bool SetOrignal) const
Definition: BPhysPVTools.cxx:102
DerivationFramework::BPhysPVTools::m_EvtData
const xAOD::EventInfo * m_EvtData
Definition: BPhysPVTools.h:29
Trk::V0Tools::a0xyError
double a0xyError(const xAOD::Vertex *vxCandidate, const xAOD::Vertex *vertex) const
errors on a0xy and a0z
Definition: V0Tools.cxx:809
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
DerivationFramework::BPhysPVTools::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: BPhysPVTools.cxx:444
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
xAOD::Vertex_v1::trackParticleLinks
const TrackParticleLinks_t & trackParticleLinks() const
Get all the particles associated with the vertex.
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
xAOD::BPhysHelper::PV_MIN_Z0
@ PV_MIN_Z0
Definition: BPhysHelper.h:475
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
DerivationFramework::BPhysPVTools::FillBPhysHelperNULL
void FillBPhysHelperNULL(xAOD::BPhysHelper &vtx, const xAOD::VertexContainer *PvContainer, xAOD::BPhysHelper::pv_type pvtype, bool do3d=false) const
Definition: BPhysPVTools.cxx:57
AthMessaging::m_imsg
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
Definition: AthMessaging.h:135
Trk::V0Tools::lxyError
double lxyError(const xAOD::Vertex *vxCandidate, const xAOD::Vertex *vertex) const
error on lxy
Definition: V0Tools.cxx:945
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
DerivationFramework::BPhysPVTools::m_v0Tools
const Trk::V0Tools * m_v0Tools
Definition: BPhysPVTools.h:28
DerivationFramework::BPhysPVTools::FillBPhysHelper
void FillBPhysHelper(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: BPhysPVTools.cxx:32
DerivationFramework::BPhysPVTools::FindLowZ0BAIndex
size_t FindLowZ0BAIndex(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: BPhysPVTools.cxx:483
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
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
DerivationFramework::BPhysPVTools::FindLowZIndex
size_t FindLowZIndex(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: BPhysPVTools.cxx:80
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
TrigConf::MSGTC::Level
Level
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:21
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
xAOD::BPhysHelper::setA0xy
float setA0xy(const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0)
transverse impact parameter
Definition: BPhysHelper.cxx:1045
DataModel_detail::iterator
(Non-const) Iterator class for DataVector/DataList.
Definition: DVLIterator.h:184
lumiFormat.i
int i
Definition: lumiFormat.py:85
DerivationFramework::BPhysPVTools::m_3dCalc
bool m_3dCalc
Definition: BPhysPVTools.h:34
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
xAOD::Vertex_v1::setTrackParticleLinks
void setTrackParticleLinks(const TrackParticleLinks_t &trackParticles)
Set all track particle links at once.
Trk::V0Tools::lxyzError
double lxyzError(const xAOD::Vertex *vxCandidate, const xAOD::Vertex *vertex) const
error on lxyz
Definition: V0Tools.cxx:1060
xAOD::BPhysHelper::PV_MIN_A0
@ PV_MIN_A0
Definition: BPhysHelper.h:475
python.xAODType.dummy
dummy
Definition: xAODType.py:4
Trk::V0Tools::a0
static double a0(const xAOD::Vertex *vxCandidate, const xAOD::Vertex *vertex)
closest distance of the momentum vector to an xAOD::Vertex
Definition: V0Tools.cxx:687
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::Vertex_v1::clearTracks
void clearTracks()
Remove all tracks from the vertex.
Definition: Vertex_v1.cxx:331
Trk::V0Tools::a0Error
double a0Error(const xAOD::Vertex *vxCandidate, const xAOD::Vertex *vertex, bool in3D=true) const
error on a0
Definition: V0Tools.cxx:814
a0
double a0
Definition: globals.cxx:27
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
calibdata.exit
exit
Definition: calibdata.py:236
AthMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AthMessaging.h:164
Trk::V0Tools::lxyz
static double lxyz(const xAOD::Vertex *vxCandidate, const xAOD::Vertex *vertex)
projection of distance in 3D of the vertex wrt an xAOD::Vertex vertex along the momentum direction (P...
Definition: V0Tools.cxx:1049
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
DerivationFramework::BPhysPVTools::FindLowA0Index
size_t FindLowA0Index(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: BPhysPVTools.cxx:422
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
DerivationFramework::BPhysPVTools::GetBeamSpot
Amg::Vector3D GetBeamSpot() const
Get the current beamspot position either from cache or from BeamCondSvc.
Definition: BPhysPVTools.cxx:472
xAOD::EventInfo_v1::beamPosZ
float beamPosZ() const
Z coordinate of the beam spot position.
xAOD::BPhysHelper::vtx
const xAOD::Vertex * vtx() const
Getter method for the cached xAOD::Vertex.
Definition: BPhysHelper.h:108
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.
xAOD::vertexType
vertexType
Definition: Vertex_v1.cxx:166
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
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.
python.PyAthena.v
v
Definition: PyAthena.py:154
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
AthMessaging::m_nm
std::string m_nm
Message source name.
Definition: AthMessaging.h:129
Trk::V0Tools::a0z
static double a0z(const xAOD::Vertex *vxCandidate, const xAOD::Vertex *vertex)
Definition: V0Tools.cxx:679
python.changerun.pv
pv
Definition: changerun.py:81
Trk::V0Tools::vtx
static Amg::Vector3D vtx(const xAOD::Vertex *vxCandidate)
vertex position
Definition: V0Tools.cxx:483
xAOD::BPhysHelper::setLxyzErr
bool setLxyzErr(const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0)
its error
Definition: BPhysHelper.cxx:945
DerivationFramework::BPhysPVTools::m_PV_minNTracks
size_t m_PV_minNTracks
minimum number of tracks required in PVs considered
Definition: BPhysPVTools.h:32
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
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:132
xAOD::BPhysHelper::setLxyz
bool setLxyz(const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0)
decay distance
Definition: BPhysHelper.cxx:934
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
DerivationFramework::BPhysPVTools::FindHighPtIndex
size_t FindHighPtIndex(const std::vector< const xAOD::Vertex * > &PVlist) const
Definition: BPhysPVTools.cxx:413
DataVector::empty
bool empty() const noexcept
Returns true if the collection is empty.
xAOD::BPhysHelper::PV_MIN_Z0_BA
@ PV_MIN_Z0_BA
Definition: BPhysHelper.h:475
Trk::V0Tools::pTError
double pTError(const xAOD::Vertex *vxCandidate) const
error on the transverse momentum of the V0
Definition: V0Tools.cxx:554
Trk::V0Tools::lxy
static double lxy(const xAOD::Vertex *vxCandidate, const xAOD::Vertex *vertex)
projection of distance in xy of the vertex wrt an xAOD::Vertex vertex along the momentum direction (P...
Definition: V0Tools.cxx:935
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.