ATLAS Offline Software
Loading...
Searching...
No Matches
InDetV0FinderTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5/***************************************************************************
6 InDetV0FinderTool.cxx - Description
7 -------------------
8 begin : 20-07-2005
9 authors : Evelina Bouhova-Thacker (Lancaster University), Rob Henderson (Lancater University)
10 email : e.bouhova@cern.ch, r.henderson@lancaster.ac.uk
11 changes : December 2014
12 author : Evelina Bouhova-Thacker <e.bouhova@cern.ch>
13 Changed to use xAOD
14 Changed to receive DataHandles from caller
15
16 ***************************************************************************/
17
22
24#include "HepPDT/ParticleDataTable.hh"
28#include <vector>
29#include <cmath>
30
31namespace InDet
32{
33
34InDetV0FinderTool::InDetV0FinderTool(const std::string& t, const std::string& n, const IInterface* p)
35 :
36 AthAlgTool(t,n,p)
37{
38 declareInterface<InDetV0FinderTool>(this);
39}
40
42
44{
45 ATH_CHECK( m_trackParticleKey.initialize() );
46
47 // Get the right vertex fitting tool from ToolSvc
48 if (m_useV0Fitter) {
49 ATH_CHECK( m_iVertexFitter.retrieve() );
50 ATH_MSG_DEBUG( "Retrieved tool " << m_iVertexFitter);
51 } else {
52 ATH_CHECK( m_iVKVertexFitter.retrieve() );
53 ATH_MSG_DEBUG("Retrieved tool " << m_iVKVertexFitter);
54
55 // Get the VKalVrt Ks vertex fitting tool from ToolSvc
56 ATH_CHECK( m_iKshortFitter.retrieve() );
57 ATH_MSG_DEBUG("Retrieved tool " << m_iKshortFitter);
58
59 // Get the VKalVrt Lambda vertex fitting tool from ToolSvc
60 ATH_CHECK( m_iLambdaFitter.retrieve() );
61 ATH_MSG_DEBUG( "Retrieved tool " << m_iLambdaFitter);
62
63 // Get the VKalVrt Lambdabar vertex fitting tool from ToolSvc
64 ATH_CHECK( m_iLambdabarFitter.retrieve() );
65 ATH_MSG_DEBUG("Retrieved tool " << m_iLambdabarFitter);
66 }
67
68 ATH_CHECK( m_iGammaFitter.retrieve() );
69 ATH_MSG_DEBUG("Retrieved tool " << m_iGammaFitter);
70
71 // get the Particle Properties Service
72 ATH_CHECK(m_partPropSvc.retrieve());
74
75 // uploading the V0 tools
76 ATH_CHECK( m_V0Tools.retrieve() );
77 ATH_MSG_DEBUG("Retrieved tool " << m_V0Tools);
78
79 // Get the TrackToVertex extrapolator tool
80 ATH_CHECK( m_trackToVertexTool.retrieve() );
81
82 // Get the extrapolator
83 ATH_CHECK( m_extrapolator.retrieve() );
84 ATH_MSG_DEBUG("Retrieved tool ");
85
86 // Initialize vertex container key
87 ATH_CHECK( m_vertexKey.initialize() );
88
89 m_v0LinksDecorkeyks = m_ksKey + ".V0Link";
90 m_v0LinksDecorkeylb = m_laKey + ".V0Link";
91 m_v0LinksDecorkeylbb = m_lbKey + ".V0Link";
92 m_v0_ksLinksDecorkey = m_v0Key + ".KshortLink";
93 m_v0_laLinksDecorkey = m_v0Key + ".LambdaLink";
94 m_v0_lbLinksDecorkey = m_v0Key + ".LambdabarLink";
95 ATH_MSG_DEBUG("m_v0_lbLinksDecorkey = " << m_v0_lbLinksDecorkey.key());
96 ATH_MSG_DEBUG("m_v0_laLinksDecorkey = " << m_v0_laLinksDecorkey.key());
97 ATH_MSG_DEBUG("m_v0_ksLinksDecorkey = " << m_v0_ksLinksDecorkey.key());
98 ATH_MSG_DEBUG("m_v0LinksDecorkeyks = " << m_v0LinksDecorkeyks.key());
99 ATH_CHECK( m_v0LinksDecorkeyks.initialize());
100 ATH_CHECK( m_v0LinksDecorkeylb.initialize());
101 ATH_CHECK( m_v0LinksDecorkeylbb.initialize());
102 ATH_CHECK( m_v0_ksLinksDecorkey.initialize());
103 ATH_CHECK( m_v0_laLinksDecorkey.initialize());
104 ATH_CHECK( m_v0_lbLinksDecorkey.initialize());
105
106 m_mDecor_gfit = m_v0Key + ".gamma_fit";
107 m_mDecor_gmass = m_v0Key + ".gamma_mass";
108 m_mDecor_gmasserr = m_v0Key + ".gamma_massError";
109 m_mDecor_gprob = m_v0Key + ".gamma_probability";
110 ATH_CHECK( m_mDecor_gfit.initialize());
111 ATH_CHECK( m_mDecor_gmass.initialize());
112 ATH_CHECK( m_mDecor_gmasserr.initialize());
113 ATH_CHECK( m_mDecor_gprob.initialize());
114
115 m_v0_BDTScore = m_v0Key + ".BDTScore";
116
117 ATH_MSG_DEBUG("m_v0_BDTScore = " << m_v0_BDTScore.key());
118 ATH_CHECK( m_v0_BDTScore.initialize());
119
120
121 if (m_useBDT){
122 std::string BDTPathName = "InDetV0FinderTool/BDT/v1/" + m_BDTFile;
123 std::string fullPathToFile = PathResolverFindCalibFile(BDTPathName);
124 ATH_MSG_DEBUG("Using BDT File: " << fullPathToFile);
125 std::unique_ptr<TFile> rootFile(TFile::Open(fullPathToFile.c_str(), "READ"));
126 std::string strBDTName = "xgboost";
127 std::unique_ptr<TTree> training( (TTree*)rootFile->Get(strBDTName.c_str()) );
128 m_BDT = std::make_unique<MVAUtils::BDT>(training.get());
129 }
130
134
135// Get the track selector tool from ToolSvc
136 ATH_CHECK( m_trkSelector.retrieve() );
137 ATH_MSG_DEBUG("Retrieved tool " << m_trkSelector);
138
139// Get the vertex point estimator tool from ToolSvc
140 ATH_CHECK( m_vertexEstimator.retrieve() );
141 ATH_MSG_DEBUG("Retrieved tool " << m_vertexEstimator);
142
143 const HepPDT::ParticleData* pd_pi = m_particleDataTable->particle(MC::PIPLUS);
144 const HepPDT::ParticleData* pd_p = m_particleDataTable->particle(MC::PROTON);
145 const HepPDT::ParticleData* pd_e = m_particleDataTable->particle(MC::ELECTRON);
146 const HepPDT::ParticleData* pd_K = m_particleDataTable->particle(MC::K0S);
147 const HepPDT::ParticleData* pd_L = m_particleDataTable->particle(MC::LAMBDA0);
148 if (m_masses == 1) {
149 m_masspi = pd_pi->mass();
150 m_massp = pd_p->mass();
151 m_masse = pd_e->mass();
152 m_massK0S = pd_K->mass();
153 m_massLambda = pd_L->mass();
154 }
155
157 m_V0s_stored = 0;
158 m_Kshort_stored = 0;
160 m_Lambda_stored = 0;
161 m_Gamma_stored = 0;
162
163// making a concrete fitter for the V0Fitter
164 m_concreteVertexFitter = nullptr;
165 if (m_useV0Fitter) {
166 m_concreteVertexFitter = dynamic_cast<Trk::TrkV0VertexFitter * >(&(*m_iVertexFitter));
167 if (m_concreteVertexFitter == nullptr) {
168 ATH_MSG_FATAL("The vertex fitter passed is not a V0 Vertex Fitter");
169 return StatusCode::FAILURE;
170 }
171 }
172
173 ATH_CHECK(m_RelinkContainers.initialize());
174
175 ATH_MSG_DEBUG( "Initialization successful" );
176
177 return StatusCode::SUCCESS;
178}
179
181 xAOD::VertexContainer* ksContainer,
182 xAOD::VertexContainer* laContainer,
183 xAOD::VertexContainer* lbContainer,
184 const xAOD::Vertex* primaryVertex,
185 const xAOD::VertexContainer* vertColl,
186 const EventContext& ctx
187 ) const
188{
189
190 ATH_MSG_DEBUG( "InDetV0FinderTool::performSearch" );
191 std::vector<const xAOD::TrackParticleContainer*> trackCols;
192 for(const auto &str : m_RelinkContainers){
194 trackCols.push_back(handle.cptr());
195 }
196
198
199 //Retrieve vertices for overlap removal
201 if (!vertices.isValid())
202 {
203 ATH_MSG_WARNING("Primary vertex container with key " << m_vertexKey.key() << " not found");
204 return StatusCode::SUCCESS;
205 }
206
207// Retrieve track particles from StoreGate
209 if ( !TPC.isValid() )
210 {
211 ATH_MSG_ERROR("Input TrackParticle collection is invalid!");
212 return StatusCode::SUCCESS;
213 }
214 ATH_MSG_DEBUG("Track particle container size " << TPC->size());
215
216 if (m_use_vertColl) {
217 ATH_MSG_DEBUG("Vertex container size " << vertColl->size());
218 }
219 Amg::Vector3D beamspot;
221 auto beamSpotHandle = SG::ReadCondHandle(m_beamSpotKey, ctx);
222 beamspot = beamSpotHandle->beamPos();
223 }else{
227 beamspot = Amg::Vector3D(beamPosX(0), beamPosY(0), beamPosZ(0));
228 }
229// track preselection
230 std::vector<const xAOD::TrackParticle*> posTracks; posTracks.clear();
231 std::vector<const xAOD::TrackParticle*> negTracks; negTracks.clear();
232 const xAOD::Vertex* vx = nullptr;
233 if (m_pv && primaryVertex) vx = primaryVertex;
234
235 if (TPC->size() > 1) {
237 for ( tpIt=TPC->begin(); tpIt!=TPC->end(); ++tpIt )
238 {
239 const xAOD::TrackParticle* TP = (*tpIt);
240 double charge = TP->charge();
241
242 if (m_trkSelector->decision(*TP, vx) || (!m_useTrkSel))
243 {
244 //PV Track Overlap Selections
245 const xAOD::Vertex* foundVertex { nullptr };
246 if (m_useorigin)
247 {
248 for (const auto *const vx : *vertices)
249 {
250 for (const auto& tpLink : vx->trackParticleLinks())
251 {
252 if (*tpLink == TP)
253 {
254 foundVertex = vx;
255 break;
256 }
257 }
258 if (foundVertex) break;
259 }
260 }
261 bool useTrack = false;
262 if (!m_useorigin) useTrack = true;
263 if (m_useorigin && foundVertex == nullptr) useTrack = true;
264 if (!useTrack) continue;
265
266
267 //d0 Selections
268 bool d0wrtVertex = true;
269 if (m_use_vertColl) {
270 if ( !d0Pass(TP,vertColl, ctx) ) d0wrtVertex = false;
271 }
272 if (!m_use_vertColl && m_pv) {
273 if (primaryVertex) {
274 if ( !d0Pass(TP,primaryVertex, ctx) ) d0wrtVertex = false;
275 } else {
276 if ( !d0Pass(TP,beamspot, ctx) ) d0wrtVertex = false;
277 }
278 }
279 if (!d0wrtVertex) continue;
280
281 if (m_samesign) {
282 posTracks.push_back(TP);
283 negTracks.push_back(TP);
284 } else {
285 if (charge > 0) {
286 posTracks.push_back(*tpIt);
287 } else {
288 negTracks.push_back(*tpIt);
289 }
290 }
291 }
292 }
293 }
294 ATH_MSG_DEBUG("number of tracks passing preselection, positive " << posTracks.size() << " negative " << negTracks.size());
295
296 if (!posTracks.empty() && !negTracks.empty())
297 {
298
299
310
312
313 std::vector<const xAOD::TrackParticle*>::const_iterator tpIt1;
314 std::vector<const xAOD::TrackParticle*>::const_iterator tpIt2;
315 unsigned int i1 = 0;
316 for (tpIt1 = posTracks.begin(); tpIt1 != posTracks.end(); ++tpIt1)
317 {
318 const xAOD::TrackParticle* TP1 = (*tpIt1);
319 uint8_t temp1(0);
320 uint8_t nclus1(0);
321 if ( TP1->summaryValue( temp1 , xAOD::numberOfPixelHits) ) nclus1 += temp1;
322 if ( TP1->summaryValue( temp1 , xAOD::numberOfSCTHits) ) nclus1 += temp1;
323 double pt1 = TP1->pt();
324
325 unsigned int i2 = 0;
326 for (tpIt2 = negTracks.begin(); tpIt2 != negTracks.end(); ++tpIt2)
327 {
328 if (*tpIt1 == *tpIt2) continue;
329 if (m_samesign && i1 <= i2) continue;
330
331 const xAOD::TrackParticle* TP2 = (*tpIt2);
332 uint8_t temp2(0);
333 uint8_t nclus2(0);
334 if ( TP2->summaryValue( temp2 , xAOD::numberOfPixelHits) ) nclus2 += temp2;
335 if ( TP2->summaryValue( temp2 , xAOD::numberOfSCTHits) ) nclus2 += temp2;
336 ATH_MSG_DEBUG("nclus1 " << (int)nclus1 << " nclus2 " << (int)nclus2);
337
338 if (!m_useTRTplusTRT && nclus1 == 0 && nclus2 == 0) continue;
339 if (!m_useTRTplusSi && (nclus1 == 0 || nclus2 == 0)) continue;
340
341 double pt2 = TP2->pt();
342
343 bool trk_cut1 = false;
344 bool trk_cut2 = false;
345 if (nclus1 != 0) trk_cut1 = true;
346 if (nclus1 == 0 && pt1 >= m_ptTRT) trk_cut1 = true;
347 if (!trk_cut1) continue;
348 if (nclus2 != 0) trk_cut2 = true;
349 if (nclus2 == 0 && pt2 >= m_ptTRT) trk_cut2 = true;
350 if (!trk_cut2) continue;
351
352// find a starting point
353 const Trk::Perigee& aPerigee1 = TP1->perigeeParameters();
354 const Trk::Perigee& aPerigee2 = TP2->perigeeParameters();
355 int sflag = 0;
356 int errorcode = 0;
357 Amg::Vector3D startingPoint = m_vertexEstimator->getCirclesIntersectionPoint(&aPerigee1,&aPerigee2,sflag,errorcode);
358 if (errorcode != 0) {startingPoint(0) = 0.0; startingPoint(1) = 0.0; startingPoint(2) = 0.0;}
359 bool errorCode = false;
360 if (errorcode == 0 || errorcode == 5 || errorcode == 6 || errorcode == 8) errorCode = true;
361 if (!errorCode) continue;
362
363 //re-do d0 selection if using m_use_vertColl to ensure both tracks pass for the SAME vertex
364 bool d0wrtVertex = true;
365 if (m_use_vertColl) {
366 if ( !d0Pass(TP1,TP2,vertColl, ctx) ) d0wrtVertex = false;
367 }
368 if (!d0wrtVertex) continue;
369
370
371// pair pre-selection cuts
372 if ( doFit(TP1,TP2,startingPoint, ctx) )
373 {
374 std::vector<const xAOD::TrackParticle*> pairV0;
375 pairV0.clear();
376 pairV0.push_back(TP1);
377 pairV0.push_back(TP2);
378
379// vertex fit
380 ATH_MSG_DEBUG("unconstrained fit now");
381
382 std::unique_ptr<xAOD::Vertex> myVxCandidate;
383 if (m_useV0Fitter) {
384 myVxCandidate = std::unique_ptr<xAOD::Vertex>( m_concreteVertexFitter->fit(pairV0, startingPoint) );
385 } else {
386 myVxCandidate = std::unique_ptr<xAOD::Vertex>( m_iVKVertexFitter->fit(pairV0, startingPoint) );
387 }
388
389 if (myVxCandidate)
390 {
391 myVxCandidate->setVertexType(xAOD::VxType::V0Vtx);
392 if ( (m_V0Tools->vertexProbability(myVxCandidate.get()) >= m_minVertProb) || (m_useBDT) ) // If using BDT selections, it makes VertProb Selections
393 {
394 bool doKshortFit = false;
395 doKshortFit = doMassFit(myVxCandidate.get(),310);
396 bool doLambdaFit = false;
397 doLambdaFit = doMassFit(myVxCandidate.get(),3122);
398 bool doLambdabarFit = false;
399 doLambdabarFit = doMassFit(myVxCandidate.get(),-3122);
400 float score = 0; // BDT score variable
401 if (doKshortFit || doLambdaFit || doLambdabarFit)
402 {
403 bool pointAtVert = true;
404 if (m_use_vertColl) {
405 if ( !pointAtVertexColl(myVxCandidate.get(),vertColl,score) ) pointAtVert = false;
406 }
407 if (!m_use_vertColl && m_pv && primaryVertex) {
408 if ( !pointAtVertex(myVxCandidate.get(),primaryVertex,score) ) pointAtVert = false;
409 }
410 if (m_doSimpleV0) pointAtVert = true;
411 if (pointAtVert)
412 {
413 Amg::Vector3D vertex = m_V0Tools->vtx(myVxCandidate.get());
414
415 std::unique_ptr<xAOD::Vertex> myKshort;
416 std::unique_ptr<xAOD::Vertex> myLambda;
417 std::unique_ptr<xAOD::Vertex> myLambdabar;
418 std::unique_ptr<xAOD::Vertex> myGamma;
419 bool foundKshort = false;
420 bool foundLambda = false;
421 bool foundLambdabar = false;
422
423 if (doKshortFit && !m_doSimpleV0) {
424 myKshort = std::unique_ptr<xAOD::Vertex>( massFit(310, pairV0, vertex) );
425 if (myKshort) {
426 if (m_V0Tools->vertexProbability(myKshort.get()) >= m_minConstrVertProb) {
427 myKshort->setVertexType(xAOD::VxType::V0Vtx);
428 foundKshort = true;
429 }
430 }
431 }
432
433 if (doLambdaFit && !m_doSimpleV0) {
434 myLambda = std::unique_ptr<xAOD::Vertex>( massFit(3122, pairV0, vertex) );
435 if (myLambda) {
436 if (m_V0Tools->vertexProbability(myLambda.get()) >= m_minConstrVertProb) {
437 myLambda->setVertexType(xAOD::VxType::V0Vtx);
438 foundLambda = true;
439 }
440 }
441 }
442
443 if (doLambdabarFit && !m_doSimpleV0) {
444 myLambdabar = std::unique_ptr<xAOD::Vertex>( massFit(-3122, pairV0, vertex));
445 if (myLambdabar) {
446 if (m_V0Tools->vertexProbability(myLambdabar.get()) >= m_minConstrVertProb) {
447 myLambdabar->setVertexType(xAOD::VxType::V0Vtx);
448 foundLambdabar = true;
449 }
450 }
451 }
452
453 bool doGamma = false;
454 int gamma_fit = 0;
455 double gamma_prob = -1., gamma_mass = -1., gamma_massErr = -1.;
456 if (foundKshort || foundLambda || foundLambdabar) doGamma = true;
457
462
463 if (m_doSimpleV0 || (!m_doSimpleV0 && doGamma)) {
464 m_V0s_stored++;
465 myVxCandidate->clearTracks();
466 ElementLink<xAOD::TrackParticleContainer> newLink1 = makeLink(*tpIt1, trackCols);
467 ElementLink<xAOD::TrackParticleContainer> newLink2 = makeLink(*tpIt2, trackCols);
468 myVxCandidate->addTrackAtVertex(newLink1);
469 myVxCandidate->addTrackAtVertex(newLink2);
470 v0Container->push_back(myVxCandidate.release());
471
472 v0_BDTScore( *(v0Container->back()) ) = score;// decorate w/ bdt score
473
474 if (foundKshort && !m_doSimpleV0) {
476 myKshort->clearTracks();
477 ElementLink<xAOD::TrackParticleContainer> ksLink1 = makeLink(*tpIt1, trackCols);
478 ElementLink<xAOD::TrackParticleContainer> ksLink2 = makeLink(*tpIt2, trackCols);
479 myKshort->addTrackAtVertex(ksLink1);
480 myKshort->addTrackAtVertex(ksLink2);
481 ksContainer->push_back(myKshort.release());
482
483 v0Link.setElement(v0Container->back());
484 v0Link.setStorableObject(*v0Container);
485 v0LinksDecorks(*(ksContainer->back())) = v0Link;
486
487 ksLink.setElement(ksContainer->back());
488 ksLink.setStorableObject(*ksContainer);
489 v0_ksLinksDecor(*(v0Container->back())) = ksLink;
490 } else {
491 v0_ksLinksDecor(*(v0Container->back())) = ksLink;
492 }
493 if (foundLambda && !m_doSimpleV0) {
495 myLambda->clearTracks();
496 ElementLink<xAOD::TrackParticleContainer> laLink1 = makeLink(*tpIt1, trackCols);
497 ElementLink<xAOD::TrackParticleContainer> laLink2 = makeLink(*tpIt2, trackCols);
498 myLambda->addTrackAtVertex(laLink1);
499 myLambda->addTrackAtVertex(laLink2);
500 laContainer->push_back(myLambda.release());
501
502 v0Link.setElement(v0Container->back());
503 v0Link.setStorableObject(*v0Container);
504 v0LinksDecorlb(*(laContainer->back())) = v0Link;
505
506 laLink.setElement(laContainer->back());
507 laLink.setStorableObject(*laContainer);
508 v0_laLinksDecor(*(v0Container->back())) = laLink;
509 } else {
510 v0_laLinksDecor(*(v0Container->back())) = laLink;
511 }
512 if (foundLambdabar && !m_doSimpleV0) {
514 myLambdabar->clearTracks();
515 ElementLink<xAOD::TrackParticleContainer> lbLink1 = makeLink(*tpIt1, trackCols);
516 ElementLink<xAOD::TrackParticleContainer> lbLink2 = makeLink(*tpIt2, trackCols);
517 myLambdabar->addTrackAtVertex(lbLink1);
518 myLambdabar->addTrackAtVertex(lbLink2);
519 lbContainer->push_back(myLambdabar.release());
520
521 v0Link.setElement(v0Container->back());
522 v0Link.setStorableObject(*v0Container);
523 v0LinksDecorlbb(*(lbContainer->back())) = v0Link;
524
525 lbLink.setElement(lbContainer->back());
526 lbLink.setStorableObject(*lbContainer);
527 v0_lbLinksDecor(*(v0Container->back())) = lbLink;
528 } else {
529 v0_lbLinksDecor(*(v0Container->back())) = lbLink;
530 }
531 if (doGamma && !m_doSimpleV0) {
532 myGamma = std::unique_ptr<xAOD::Vertex>( massFit(22, pairV0, vertex) );
533 if (myGamma && m_V0Tools->vertexProbability(myGamma.get()) >= m_minConstrVertProb) {
534 gamma_fit = 1;
535 gamma_prob = m_V0Tools->vertexProbability(myGamma.get());
536 gamma_mass = m_V0Tools->invariantMass(myGamma.get(),m_masse,m_masse);
537 gamma_massErr = m_V0Tools->invariantMassError(myGamma.get(),m_masse,m_masse);
538 }
539
540 mDecor_gfit( *(v0Container->back()) ) = gamma_fit;
541 mDecor_gmass( *(v0Container->back()) ) = gamma_mass;
542 mDecor_gmasserr( *(v0Container->back()) ) = gamma_massErr;
543 mDecor_gprob( *(v0Container->back()) ) = gamma_prob;
544 }
545 }
546
547 } // pointAtVert
548
549 } // in mass window (doMassFit)
550
551 } // chi2 cut failed
552 } else { // unconstrained fit failed
553 ATH_MSG_DEBUG("Fitter failed!");
554 }
555
556 } // doFit
557
558 i2++;
559 } // loop over negative tracks
560 i1++;
561 } // loop over positive tracks
562
563 } // posTracks.size() > 0 && negTracks.size() > 0
564
565 if (v0Container->empty()) ATH_MSG_DEBUG("No Candidates found. Empty container returned");
566 if (ksContainer->empty()) ATH_MSG_DEBUG("No Kshort Candidates found. Empty container returned");
567 if (laContainer->empty()) ATH_MSG_DEBUG("No Lambda Candidates found. Empty container returned");
568 if (lbContainer->empty()) ATH_MSG_DEBUG("No Lambdabar Candidates found. Empty container returned");
569
570 return StatusCode::SUCCESS;
571}
572
574{
575 msg(MSG::DEBUG)
576 << "----------------------------------------------------------------------------------------------------------------------------------------------" << endmsg
577 << "\tSummary" << endmsg
578 << "\tProcessed : " << m_events_processed << " events" << endmsg
579 << "\tStored : " << m_V0s_stored << " V0s" << endmsg
580 << "\tof which : " << m_Kshort_stored << " Kshorts" << endmsg
581 << "\t : " << m_Lambda_stored << " Lambdas" << endmsg
582 << "\t : " << m_Lambdabar_stored << " Lambdabars" << endmsg;
583 msg(MSG::DEBUG) << "----------------------------------------------------------------------------------------------------------------------------------------------" << endmsg;
584
585 return StatusCode::SUCCESS;
586}
587
588void InDetV0FinderTool::SGError(const std::string& errService) const
589{
590 ATH_MSG_FATAL(errService << " not found. Exiting !");
591}
592
593
595 Amg::Vector3D &startingPoint, const EventContext& ctx) const
596{
597 bool pass = false;
598 double srxy = startingPoint.perp();
599 if (srxy <= m_maxsxy)
600 {
601 double massKshort_i=2000001., massLambda_i=2000001., massLambdabar_i=2000001.;
602 const Amg::Vector3D& globalPosition = startingPoint;
603 Trk::PerigeeSurface perigeeSurface(globalPosition);
604 std::vector<std::unique_ptr<const Trk::TrackParameters> > cleanup;
605 const Trk::TrackParameters* extrapolatedPerigee1(nullptr);
606 const Trk::TrackParameters* extrapolatedPerigee2(nullptr);
607 extrapolatedPerigee1 = m_extrapolator->extrapolate(ctx,track1->perigeeParameters(), perigeeSurface).release();
608 if (extrapolatedPerigee1 == nullptr) extrapolatedPerigee1 = &track1->perigeeParameters();
609 else cleanup.push_back(std::unique_ptr<const Trk::TrackParameters>(extrapolatedPerigee1));
610
611 extrapolatedPerigee2 = m_extrapolator->extrapolate(ctx,track2->perigeeParameters(), perigeeSurface).release();
612 if (extrapolatedPerigee2 == nullptr) extrapolatedPerigee2 = &track2->perigeeParameters();
613 else cleanup.push_back(std::unique_ptr<const Trk::TrackParameters>(extrapolatedPerigee2));
614
615 if (extrapolatedPerigee1 != nullptr && extrapolatedPerigee2 != nullptr) {
616 massKshort_i = invariantMass(extrapolatedPerigee1,extrapolatedPerigee2,m_masspi,m_masspi);
617 massLambda_i = invariantMass(extrapolatedPerigee1,extrapolatedPerigee2,m_massp,m_masspi);
618 massLambdabar_i = invariantMass(extrapolatedPerigee1,extrapolatedPerigee2,m_masspi,m_massp);
619 if ( ((massKshort_i >= m_uksmin && massKshort_i <= m_uksmax) ||
620 (massLambda_i >= m_ulamin && massLambda_i <= m_ulamax) ||
621 (massLambdabar_i >= m_ulamin && massLambdabar_i <= m_ulamax)) ) pass = true;
622 }
623 }
624
625 return pass;
626}
627
628bool InDetV0FinderTool::d0Pass(const xAOD::TrackParticle* track1, const xAOD::TrackParticle* track2, const xAOD::VertexContainer * vertColl, const EventContext& ctx) const
629{
630 bool pass = false;
631 int count = 0;
632 bool hasInnerPixHit1 = true;
633 bool hasInnerPixHit2 = true;
635 SG::AuxElement::ConstAccessor<uint8_t> numberOfInnermostPixelLayerHits("numberOfInnermostPixelLayerHits");
636 uint8_t nInnerHits1 = numberOfInnermostPixelLayerHits(*track1);
637 if (nInnerHits1 == 0) hasInnerPixHit1 = false;
638 uint8_t nInnerHits2 = numberOfInnermostPixelLayerHits(*track2);
639 if (nInnerHits2 == 0) hasInnerPixHit2 = false;
640 }
641 for (auto vItr=vertColl->begin(); vItr!=vertColl->end(); ++vItr )
642 {
643 const xAOD::Vertex* PV = (*vItr);
644 auto per1 = m_trackToVertexTool->perigeeAtVertex(ctx, *track1, PV->position() );
645 if (per1 == nullptr) continue;
646 auto per2 = m_trackToVertexTool->perigeeAtVertex(ctx, *track2, PV->position() );
647 if (per2 == nullptr) continue;
648 double d0_1 = per1->parameters()[Trk::d0];
649 double sig_d0_1 = sqrt((*per1->covariance())(0,0));
650 double delta_z0_1 = track1->z0() + track1->vz() - PV->z();
651 double d0_2 = per2->parameters()[Trk::d0];
652 double sig_d0_2 = sqrt((*per2->covariance())(0,0));
653 double delta_z0_2 = track2->z0() + track2->vz() - PV->z();
654 bool IP_check1 = (std::abs(d0_1/sig_d0_1) > m_d0_cut) || !hasInnerPixHit1;
655 IP_check1 &= std::abs(d0_1) < m_max_d0_cut;
656 IP_check1 &= std::abs(delta_z0_1) < m_max_z0_cut;
657 bool IP_check2 = (std::abs(d0_2/sig_d0_2) > m_d0_cut) || !hasInnerPixHit2;
658 IP_check2 &= std::abs(d0_2) < m_max_d0_cut;
659 IP_check2 &= std::abs(delta_z0_2) < m_max_z0_cut;
660 if (IP_check1 && IP_check2) return true;
661 if (++count >= m_maxPV) break;
662 }
663 return pass;
664}
665
666bool InDetV0FinderTool::d0Pass(const xAOD::TrackParticle* track1, const xAOD::VertexContainer * vertColl, const EventContext& ctx) const
667{
668 bool pass = false;
669 int count = 0;
670 bool hasInnerPixHit1 = true;
672 SG::AuxElement::ConstAccessor<uint8_t> numberOfInnermostPixelLayerHits("numberOfInnermostPixelLayerHits");
673 uint8_t nInnerHits1 = numberOfInnermostPixelLayerHits(*track1);
674 if (nInnerHits1 == 0) hasInnerPixHit1 = false;
675 }
676 for (auto vItr=vertColl->begin(); vItr!=vertColl->end(); ++vItr )
677 {
678 const xAOD::Vertex* PV = (*vItr);
679 auto per1 = m_trackToVertexTool->perigeeAtVertex(ctx, *track1, PV->position() );
680 if (per1 == nullptr) continue;
681 double d0_1 = per1->parameters()[Trk::d0];
682 double sig_d0_1 = sqrt((*per1->covariance())(0,0));
683 double delta_z0_1 = track1->z0() + track1->vz() - PV->z();
684 if (((std::abs(d0_1/sig_d0_1) > m_d0_cut) ||
685 (!hasInnerPixHit1)) &&
686 (std::abs(d0_1) < m_max_d0_cut) &&
687 (std::abs(delta_z0_1) < m_max_z0_cut)) return true;
688 if (++count >= m_maxPV) break;
689 }
690 return pass;
691}
692
693bool InDetV0FinderTool::d0Pass(const xAOD::TrackParticle* track1, const xAOD::Vertex* PV, const EventContext& ctx) const
694{
695 bool pass = false;
696 bool hasInnerPixHit1 = true;
698 SG::AuxElement::ConstAccessor<uint8_t> numberOfInnermostPixelLayerHits("numberOfInnermostPixelLayerHits");
699 uint8_t nInnerHits1 = numberOfInnermostPixelLayerHits(*track1);
700 if (nInnerHits1 == 0) hasInnerPixHit1 = false;
701 }
702 auto per1 = m_trackToVertexTool->perigeeAtVertex(ctx, *track1, PV->position() );
703 if (per1 == nullptr) return pass;
704 double d0_1 = per1->parameters()[Trk::d0];
705 double sig_d0_1 = sqrt((*per1->covariance())(0,0));
706 double delta_z0_1 = track1->z0() + track1->vz() - PV->z();
707 if (((std::abs(d0_1/sig_d0_1) > m_d0_cut) ||
708 (!hasInnerPixHit1)) &&
709 (std::abs(d0_1) < m_max_d0_cut) &&
710 (std::abs(delta_z0_1) < m_max_z0_cut)) pass = true;
711 return pass;
712}
713
714bool InDetV0FinderTool::d0Pass(const xAOD::TrackParticle* track1, const Amg::Vector3D& PV, const EventContext& ctx) const
715{
716 bool pass = false;
717 bool hasInnerPixHit1 = true;
719 SG::AuxElement::ConstAccessor<uint8_t> numberOfInnermostPixelLayerHits("numberOfInnermostPixelLayerHits");
720 uint8_t nInnerHits1 = numberOfInnermostPixelLayerHits(*track1);
721 if (nInnerHits1 == 0) hasInnerPixHit1 = false;
722 }
723 auto per1 = m_trackToVertexTool->perigeeAtVertex(ctx, *track1, PV );
724 if (per1 == nullptr) return pass;
725 double d0_1 = per1->parameters()[Trk::d0];
726 double sig_d0_1 = sqrt((*per1->covariance())(0,0));
727 double delta_z0_1 = track1->z0() + track1->vz() - PV.z();
728 if (((std::abs(d0_1/sig_d0_1) > m_d0_cut) ||
729 (!hasInnerPixHit1)) &&
730 (std::abs(d0_1) < m_max_d0_cut) &&
731 (std::abs(delta_z0_1) < m_max_z0_cut)) pass = true;
732 return pass;
733}
734
735bool InDetV0FinderTool::pointAtVertex(const xAOD::Vertex* v0, const xAOD::Vertex* PV, float &score) const
736{
737 bool pass = false;
738 float v0lxy = m_V0Tools->lxy(v0,PV);
739 float v0lxyError = m_V0Tools->lxyError(v0,PV);
740 float cos = m_V0Tools->cosTheta(v0,PV);
741 float v0a0xy = m_V0Tools->a0xy(v0,PV);
742 float v0a0z = m_V0Tools->a0z(v0,PV);
743 if (m_useBDT){
744 float prob = m_V0Tools->vertexProbability(v0);
745 float nLogProb = 999999;
746 if (prob>0) nLogProb = -1*log10f(prob); //bdt model uses the log, not the raw value
747 std::vector<float> bdt_vars = {
748 nLogProb,
749 std::abs(v0a0xy),
750 std::abs(v0a0z),
751 v0lxy,
752 v0lxy/v0lxyError,
753 cos};
754 float this_Score=m_BDT->GetClassification(bdt_vars);
755 if (this_Score > score) {
756 score = this_Score;
757 }
758 if (score > m_BDTCut){
759 pass = true;
760 }
761 }
762 else if (v0lxy/v0lxyError > m_vert_lxy_sig && cos > m_vert_cos_cut &&
763 std::abs(v0a0xy) < m_vert_a0xy_cut && std::abs(v0a0z) < m_vert_a0z_cut &&
764 v0lxy < m_vert_lxy_cut) pass = true;
765 return pass;
766}
767
768bool InDetV0FinderTool::pointAtVertexColl(xAOD::Vertex* v0, const xAOD::VertexContainer * vertColl, float &score) const
769{
770 bool pass = false;
772 for ( vItr=vertColl->begin(); vItr!=vertColl->end(); ++vItr ) { if (pointAtVertex(v0,(*vItr),score)) pass = true; }
773 return pass;
774}
775
776double InDetV0FinderTool::invariantMass(const Trk::TrackParameters* per1, const Trk::TrackParameters* per2, double m1, double m2)
777{
778 double e1sq = per1->momentum().mag2() + m1*m1;
779 double e1 = (e1sq>0.) ? sqrt(e1sq) : 0.;
780 double e2sq = per2->momentum().mag2() + m2*m2;
781 double e2 = (e2sq>0.) ? sqrt(e2sq) : 0.;
782 double p = (per1->momentum()+per2->momentum()).mag();
783 double msq = (e1+e2+p)*(e1+e2-p);
784 double mass = (msq>0.) ? sqrt(msq) : 0.;
785 return mass;
786}
787
788bool InDetV0FinderTool::doMassFit(xAOD::Vertex* vxCandidate, int pdgID) const
789{
790 bool pass = false;
791 double mass = 1000000000.;
792 double error = 1000000001.;
793 bool in_mass_window = false;
794 double winmass_min = 0., winmass_max = 0.;
795
796 if (pdgID == 310) {
797 winmass_min = m_ksmin;
798 winmass_max = m_ksmax;
799 mass = m_V0Tools->invariantMass(vxCandidate,m_masspi,m_masspi);
800 error = m_V0Tools->invariantMassError(vxCandidate,m_masspi,m_masspi);
801 if (mass >= winmass_min && mass <= winmass_max && error <= m_errmass) in_mass_window = true;
802 } else if (pdgID == 3122 || pdgID == -3122) {
803 winmass_min = m_lamin;
804 winmass_max = m_lamax;
805 if (pdgID == 3122) {
806 mass = m_V0Tools->invariantMass(vxCandidate,m_massp,m_masspi);
807 error = m_V0Tools->invariantMassError(vxCandidate,m_massp,m_masspi);
808 } else if (pdgID == -3122) {
809 mass = m_V0Tools->invariantMass(vxCandidate,m_masspi,m_massp);
810 error = m_V0Tools->invariantMassError(vxCandidate,m_masspi,m_massp);
811 }
812 if (mass >= winmass_min && mass <= winmass_max && error <= m_errmass) in_mass_window = true;
813 }
814 if (in_mass_window) pass = true;
815
816 return pass;
817}
818
819xAOD::Vertex* InDetV0FinderTool::massFit(int pdgID, const std::vector<const xAOD::TrackParticle*> &pairV0, const Amg::Vector3D &vertex) const
820{
821 xAOD::Vertex* vxCandidate(nullptr);
822 std::vector<double> masses;
823 if (pdgID == 310) {
824 masses.push_back(m_masspi);
825 masses.push_back(m_masspi);
826 } else if (pdgID == 3122) {
827 masses.push_back(m_massp);
828 masses.push_back(m_masspi);
829 } else if (pdgID == -3122) {
830 masses.push_back(m_masspi);
831 masses.push_back(m_massp);
832 } else if (pdgID == 22) {
833 masses.push_back(m_masse);
834 masses.push_back(m_masse);
835 }
836
837 if (pdgID == 22) {
838 vxCandidate = m_iGammaFitter->fit(pairV0, vertex);
839 }
840 if (pdgID == 310) {
841 if (m_useV0Fitter) {
842 vxCandidate = m_concreteVertexFitter->fit(pairV0, masses, m_massK0S, nullptr, vertex);
843 } else {
844 vxCandidate = m_iKshortFitter->fit(pairV0, vertex);
845 }
846 }
847 if (pdgID == 3122) {
848 if (m_useV0Fitter) {
849 vxCandidate = m_concreteVertexFitter->fit(pairV0, masses, m_massLambda, nullptr, vertex);
850 } else {
851 vxCandidate = m_iLambdaFitter->fit(pairV0, vertex);
852 }
853 }
854 if (pdgID == -3122) {
855 if (m_useV0Fitter) {
856 vxCandidate = m_concreteVertexFitter->fit(pairV0, masses, m_massLambda, nullptr, vertex);
857 } else {
858 vxCandidate = m_iLambdabarFitter->fit(pairV0, vertex);
859 }
860 }
861
862 return vxCandidate;
863}
864
866 const std::vector<const xAOD::TrackParticleContainer*>& trackcols) const
867{
869 Link.setElement(tp);
870 bool elementSet = false;
871 if(trackcols.empty()){
872 Link.setStorableObject( *dynamic_cast<const xAOD::TrackParticleContainer*>( tp->container() ) );
873 elementSet = true;
874 } else {
875 for(const xAOD::TrackParticleContainer* trkcol : trackcols){
876 auto itr = std::find(trkcol->begin(), trkcol->end(), tp);
877 if(itr != trkcol->end()){
878 Link.setStorableObject(*trkcol, true);
879 elementSet = true;
880 break;
881 }
882 }
883 }
884 if(!elementSet) ATH_MSG_ERROR("Track was not found when linking");
885 return Link;
886}
887
888
889}//end of namespace InDet
890
#define endmsg
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_FATAL(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
double charge(const T &p)
Definition AtlasPID.h:997
ATLAS-specific HepMC functions.
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
Handle class for reading a decoration on an object.
Handle class for adding a decoration to an object.
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
MsgStream & msg() const
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
const T * back() const
Access the last element in the collection as an rvalue.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
size_type size() const noexcept
Returns the number of elements in the collection.
bool empty() const noexcept
Returns true if the collection is empty.
bool doMassFit(xAOD::Vertex *vxCandidate, int pdgID) const
SG::WriteDecorHandleKey< xAOD::VertexContainer > m_v0LinksDecorkeyks
BooleanProperty m_useTRTplusSi
= use TRT+Si pairs (true)
BooleanProperty m_useorigin
= true only using tracks that have no vertex association (true)
DoubleProperty m_masspi
pion mass (139.57 MeV)
SG::WriteDecorHandleKey< xAOD::VertexContainer > m_v0_lbLinksDecorkey
const Trk::TrkV0VertexFitter * m_concreteVertexFitter
SG::WriteDecorHandleKey< xAOD::VertexContainer > m_mDecor_gfit
std::atomic< unsigned int > m_events_processed
void SGError(const std::string &errService) const
std::atomic< unsigned int > m_Kshort_stored
DoubleProperty m_vert_cos_cut
V0 cos(theta) angle between displacement and momentum (>0.)
DoubleProperty m_d0_cut
track d0 significance wrt a vertex (>2.)
DoubleProperty m_ksmin
min Kshort mass (400.
SG::WriteDecorHandleKey< xAOD::VertexContainer > m_mDecor_gprob
SG::WriteDecorHandleKey< xAOD::VertexContainer > m_v0LinksDecorkeylbb
SG::ReadHandleKeyArray< xAOD::TrackParticleContainer > m_RelinkContainers
DoubleProperty m_ulamax
max Lambda mass, unconstrained fit (1200.
DoubleProperty m_ksmax
max Kshort mass (600.
DoubleProperty m_vert_a0z_cut
V0 |a0z| wrt a vertex (<15.)
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfo_key
Gaudi::Property< int > m_maxPV
DoubleProperty m_lamax
max Lambda mass (1200.
bool pointAtVertex(const xAOD::Vertex *v0, const xAOD::Vertex *PV, float &score) const
PublicToolHandle< Trk::IVertexFitter > m_iLambdabarFitter
bool pointAtVertexColl(xAOD::Vertex *v0, const xAOD::VertexContainer *vertColl, float &score) const
DoubleProperty m_vert_a0xy_cut
V0 |a0xy| wrt a vertex (<3.)
std::atomic< unsigned int > m_Lambda_stored
PublicToolHandle< Trk::ITrackSelectorTool > m_trkSelector
BooleanProperty m_doSimpleV0
= true equivalent to the old InDetSimpleV0Finder (false)
DoubleProperty m_max_z0_cut
track |z0| wrt a vertex (<999999.)
DoubleProperty m_minVertProb
Minimum vertex probability (0.0001)
BooleanProperty m_use_innerPixHits
= true select allows tracks with no innermost pixel layer hits to always pass d0 significance cut (fa...
PublicToolHandle< Reco::ITrackToVertex > m_trackToVertexTool
PublicToolHandle< Trk::IVertexFitter > m_iKshortFitter
BooleanProperty m_samesign
= true select tracks with same sign (false)
DoubleProperty m_massLambda
Lambda mass (1115.68 MeV)
DoubleProperty m_ulamin
min Lambda mass, unconstrained fit (1000.
PublicToolHandle< Trk::IVertexFitter > m_iVKVertexFitter
SG::WriteDecorHandleKey< xAOD::VertexContainer > m_mDecor_gmass
static double invariantMass(const Trk::TrackParameters *per1, const Trk::TrackParameters *per2, double m1, double m2)
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
DoubleProperty m_uksmax
max Kshort mass, unconstrained fit (600.
BooleanProperty m_useBDT
= true uses BDT selections in place of rectangular pointAtVertex + minVertProb
Gaudi::Property< std::string > m_lbKey
PublicToolHandle< Trk::IVertexFitter > m_iGammaFitter
SG::WriteDecorHandleKey< xAOD::VertexContainer > m_v0_ksLinksDecorkey
IntegerProperty m_masses
= 1 if using PDG values, = 2 if user set (1)
std::atomic< unsigned int > m_Gamma_stored
SG::ReadDecorHandleKeyArray< xAOD::EventInfo > m_beamSpotDecoKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackParticleKey
SG::WriteDecorHandleKey< xAOD::VertexContainer > m_v0LinksDecorkeylb
BooleanProperty m_pv
= true select tracks wrt primary vertex (false)
Gaudi::Property< std::string > m_ksKey
PublicToolHandle< InDet::VertexPointEstimator > m_vertexEstimator
DoubleProperty m_maxsxy
Maximum Rxy of starting point (1000.
std::unique_ptr< MVAUtils::BDT > m_BDT
PublicToolHandle< Trk::IVertexFitter > m_iLambdaFitter
DoubleProperty m_BDTCut
BDT Score threshold.
std::atomic< unsigned int > m_V0s_stored
PublicToolHandle< Trk::IExtrapolator > m_extrapolator
DoubleProperty m_uksmin
min Kshort mass, unconstrained fit (400.
BooleanProperty m_useTRTplusTRT
= use TRT+TRT pairs (true)
ServiceHandle< IPartPropSvc > m_partPropSvc
PublicToolHandle< Trk::V0Tools > m_V0Tools
Gaudi::Property< std::string > m_v0Key
DoubleProperty m_vert_lxy_sig
V0 lxy significance wrt a vertex (>2.)
StatusCode performSearch(xAOD::VertexContainer *v0Container, xAOD::VertexContainer *ksContainer, xAOD::VertexContainer *laContainer, xAOD::VertexContainer *lbContainer, const xAOD::Vertex *vertex, const xAOD::VertexContainer *vertColl, const EventContext &ctx) const
xAOD::Vertex * massFit(int pdgID, const std::vector< const xAOD::TrackParticle * > &pairV0, const Amg::Vector3D &vertex) const
DoubleProperty m_masse
electron mass (0.510999 MeV)
ElementLink< xAOD::TrackParticleContainer > makeLink(const xAOD::TrackParticle *, const std::vector< const xAOD::TrackParticleContainer * > &) const
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexKey
SG::WriteDecorHandleKey< xAOD::VertexContainer > m_v0_BDTScore
DoubleProperty m_vert_lxy_cut
V0 lxy V0 lxy (<500.)
BooleanProperty m_use_vertColl
= true select tracks wrt a vertex collection (false)
DoubleProperty m_minConstrVertProb
Minimum vertex probability for constrained fit (0.0001)
DoubleProperty m_max_d0_cut
track |d0| wrt a vertex (<999999.)
StringProperty m_BDTFile
Filename of mvaUtils model file, located in /InDetV0FinderTool/BDT/v1/.
const HepPDT::ParticleDataTable * m_particleDataTable
PublicToolHandle< Trk::IVertexFitter > m_iVertexFitter
BooleanProperty m_useV0Fitter
= true if using TrkV0Fitter, = false if using VKalVert (true)
InDetV0FinderTool(const std::string &t, const std::string &n, const IInterface *p)
DoubleProperty m_massK0S
Kshort mass (497.672 MeV)
SG::WriteDecorHandleKey< xAOD::VertexContainer > m_mDecor_gmasserr
DoubleProperty m_lamin
min Lambda mass (1000.
DoubleProperty m_ptTRT
Minimum pT for TRT tracks (700.
bool doFit(const xAOD::TrackParticle *track1, const xAOD::TrackParticle *track2, Amg::Vector3D &startingPoint, const EventContext &ctx) const
BooleanProperty m_useTrkSel
= true uses TrackSelectorTool
bool d0Pass(const xAOD::TrackParticle *track1, const xAOD::TrackParticle *track2, const xAOD::VertexContainer *vertColl, const EventContext &ctx) const
Gaudi::Property< std::string > m_laKey
SG::WriteDecorHandleKey< xAOD::VertexContainer > m_v0_laLinksDecorkey
DoubleProperty m_massp
proton mass (938.272 MeV)
std::atomic< unsigned int > m_Lambdabar_stored
Gaudi::Property< bool > m_useBeamSpotCond
DoubleProperty m_errmass
Maximum mass error (100.
SG::ConstAccessor< T, ALLOC > ConstAccessor
Definition AuxElement.h:569
Handle class for reading a decoration on an object.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
Handle class for adding a decoration to an object.
const Amg::Vector3D & momentum() const
Access method for the momentum.
Class describing the Line to which the Perigee refers to.
This class implements a vertex fitting algorithm optimised for V0 finding.
float z0() const
Returns the parameter.
const Trk::Perigee & perigeeParameters() const
Returns the Trk::MeasuredPerigee track parameters.
float vz() const
The z origin for the parameters.
bool summaryValue(uint8_t &value, const SummaryType &information) const
Accessor for TrackSummary values.
virtual double pt() const override final
The transverse momentum ( ) of the particle.
float charge() const
Returns the charge.
float z() const
Returns the z position.
const TrackParticleLinks_t & trackParticleLinks() const
Get all the particles associated with the vertex.
const Amg::Vector3D & position() const
Returns the 3-pos.
bool doFit
int count(std::string s, const std::string &regx)
count how many occurances of a regx are in a string
Definition hcg.cxx:146
Eigen::Matrix< double, 3, 1 > Vector3D
Primary Vertex Finder.
static const int ELECTRON
static const int K0S
static const int PIPLUS
static const int LAMBDA0
static const int PROTON
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee
@ d0
Definition ParamDefs.h:63
ParametersBase< TrackParametersDim, Charged > TrackParameters
@ V0Vtx
Vertex from V0 decay.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
Vertex_v1 Vertex
Define the latest version of the vertex class.
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
@ numberOfSCTHits
number of hits in SCT [unit8_t].
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].