ATLAS Offline Software
Loading...
Searching...
No Matches
JpsiPlus1Track.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5// ****************************************************************************
6// ----------------------------------------------------------------------------
7// JpsiPlus1Track
8// James Catmore <James.Catmore@cern.ch>
9// Results returned as a vector of xAOD::Vertex
10// ----------------------------------------------------------------------------
11// ****************************************************************************
12
19#include "xAODTracking/Vertex.h"
21#include "AthLinks/ElementLink.h"
24#include <memory>
28#include <limits>
29
30namespace Analysis {
31
32
33 // Set masses
37
39
40 // retrieving vertex Fitter
41 ATH_CHECK(m_iVertexFitter.retrieve());
42 m_VKVFitter = dynamic_cast<Trk::TrkVKalVrtFitter*>(&(*m_iVertexFitter));
43
44 // Get the track selector tool from ToolSvc
45 ATH_CHECK( m_trkSelector.retrieve());
46
47 // Get the vertex point estimator tool from ToolSvc
48 ATH_CHECK(m_jpsiCollectionKey.initialize());
50 if(m_MuonsUsedInJpsi.key() == "NONE") m_MuonsUsedInJpsi = "";//for backwards compatability
51 ATH_CHECK(m_MuonsUsedInJpsi.initialize(!m_MuonsUsedInJpsi.key().empty()));
54
56 ATH_MSG_FATAL("Invalid configuration");
57 return StatusCode::FAILURE;
58 }
59
60 if(m_muonMasses.empty()){
61 m_muonMasses.assign(2, muMass);
62 }
63
64 m_useGSFTrack.reset();
65 for(int i : m_useGSFTrackIndices) m_useGSFTrack.set(i, true);
66 ATH_MSG_DEBUG("Initialize successful");
67
68 return StatusCode::SUCCESS;
69
70 }
71
72
73 JpsiPlus1Track::JpsiPlus1Track(const std::string& t, const std::string& n, const IInterface* p) : AthAlgTool(t,n,p),
74 m_piMassHyp(false),
75 m_kMassHyp(true),
77 m_trkMaxEta(102.5),
78 m_BThresholdPt(0.0),
79 m_BMassUpper(0.0),
80 m_BMassLower(0.0),
81 m_jpsiCollectionKey("JpsiCandidates"),
82 m_jpsiMassUpper(0.0),
83 m_jpsiMassLower(0.0),
84 m_TrkParticleCollection("TrackParticleCandidate"),
88 m_iVertexFitter("Trk::TrkVKalVrtFitter"),
89 m_trkSelector("InDet::TrackSelectorTool"),
90 m_useMassConst(true),
91 m_altMassConst(-1.0),
92 m_chi2cut(-1.0),
95 m_trkTrippletPt(-1.0),
96 m_trkDeltaZ(-1.0),
99 m_candidateLimit(std::numeric_limits<size_t>::max())
100 {
101 declareInterface<JpsiPlus1Track>(this);
102 declareProperty("pionHypothesis",m_piMassHyp);
103 declareProperty("kaonHypothesis",m_kMassHyp);
104 declareProperty("trkThresholdPt",m_trkThresholdPt);
105 declareProperty("trkMaxEta",m_trkMaxEta);
106 declareProperty("BThresholdPt",m_BThresholdPt);
107 declareProperty("BMassUpper",m_BMassUpper);
108 declareProperty("BMassLower",m_BMassLower);
109 declareProperty("JpsiContainerKey",m_jpsiCollectionKey);
110 declareProperty("JpsiMassUpper",m_jpsiMassUpper);
111 declareProperty("JpsiMassLower",m_jpsiMassLower);
112 declareProperty("TrackParticleCollection",m_TrkParticleCollection);
113 declareProperty("MuonsUsedInJpsi",m_MuonsUsedInJpsi);
114 declareProperty("ExcludeJpsiMuonsOnly",m_excludeJpsiMuonsOnly);
115 declareProperty("ExcludeCrossJpsiTracks",m_excludeCrossJpsiTracks); //Essential when trying to make vertices out of multiple muons (set to false)
116 declareProperty("TrkVertexFitterTool",m_iVertexFitter);
117 declareProperty("TrackSelectorTool", m_trkSelector);
118 declareProperty("UseMassConstraint", m_useMassConst);
119 declareProperty("AlternativeMassConstraint",m_altMassConst);
120
121 // additional cuts by Daniel Scheirich copied from 2Tracks by Adam Barton
122 declareProperty("Chi2Cut",m_chi2cut);
123 declareProperty("TrkTrippletMassUpper" ,m_trkTrippletMassUpper);
124 declareProperty("TrkTrippletMassLower" ,m_trkTrippletMassLower);
125 declareProperty("TrkQuadrupletPt" ,m_trkTrippletPt );
126 declareProperty("TrkDeltaZ" ,m_trkDeltaZ );
127 declareProperty("RequireNMuonTracks" ,m_requiredNMuons );
128 declareProperty("RequireNElectronTracks", m_requiredNElectrons );
129 declareProperty("AlternativeMassConstraintTrack", m_muonMasses );
130 declareProperty("UseGSFTrackIndices", m_useGSFTrackIndices );
132 declareProperty("ElectronCollection", m_electronCollectionKey);
133 declareProperty("SkipNoElectron", m_skipNoElectron);
134 declareProperty("CandidateLimit", m_candidateLimit);
135 }
136
138
139 //-------------------------------------------------------------------------------------
140 // Find the candidates
141 //-------------------------------------------------------------------------------------
142 StatusCode JpsiPlus1Track::performSearch(const EventContext& ctx, xAOD::VertexContainer& bContainer) const
143 {
144 ATH_MSG_DEBUG( "JpsiPlus1Track::performSearch" );
145
146 // Get the J/psis from StoreGate
147 const xAOD::VertexContainer* importedJpsiCollection(0);
149 if(!jpsiCollectionhandle.isValid()){
150 ATH_MSG_ERROR("No VertexContainer with key " << m_jpsiCollectionKey.key() << " found in StoreGate. BCandidates will be EMPTY!");
151 return StatusCode::FAILURE;
152 }else{
153 importedJpsiCollection = jpsiCollectionhandle.cptr();
154 ATH_MSG_DEBUG("Found VxCandidate container with key "<<m_jpsiCollectionKey.key());
155 }
156 ATH_MSG_DEBUG("VxCandidate container size " << importedJpsiCollection->size());
157
158 // Get tracks
159 const xAOD::TrackParticleContainer* importedTrackCollection{nullptr};
161 if(!TrkParticleHandle.isValid()){
162 ATH_MSG_ERROR("No track particle collection with name " << m_TrkParticleCollection << " found in StoreGate!");
163 return StatusCode::FAILURE;
164 } else {
165 importedTrackCollection = TrkParticleHandle.cptr();
166 ATH_MSG_DEBUG("Found track particle collection " << m_TrkParticleCollection << " in StoreGate!");
167 }
168 ATH_MSG_DEBUG("Track container size "<< importedTrackCollection->size());
169
170 const xAOD::TrackParticleContainer* importedGSFTrackCollection(nullptr);
171 if(m_useGSFTrack.any() && !m_TrkParticleGSFCollection.key().empty()){
173 ATH_CHECK(h.isValid());
174 importedGSFTrackCollection = h.cptr();
175 }
176
177
178 // Get the muon collection used to build the J/psis
179 const xAOD::MuonContainer* importedMuonCollection(0);
180 if (!m_MuonsUsedInJpsi.key().empty()) {
182 if (!h.isValid()){
183 ATH_MSG_ERROR("No muon collection with name " << m_MuonsUsedInJpsi.key() << " found in StoreGate!");
184 return StatusCode::FAILURE;
185 } else {
186 importedMuonCollection = h.cptr();
187 ATH_MSG_DEBUG("Found muon collection " << m_MuonsUsedInJpsi.key() << " in StoreGate!");
188 }
189 ATH_MSG_DEBUG("Muon container size "<< importedMuonCollection->size());
190 }
191
192 // Get the electrons from StoreGate
193 const xAOD::ElectronContainer* importedElectronCollection = nullptr;
194 if (!m_electronCollectionKey.empty()){
196 if (!h.isValid()){
197 ATH_MSG_ERROR("No Electron collection with name " << m_electronCollectionKey.key() << " found in StoreGate!");
198 return StatusCode::FAILURE;
199 } else {
200 importedElectronCollection = h.cptr();
201 ATH_MSG_DEBUG("Found Electron collection " << m_electronCollectionKey.key() << " in StoreGate!");
202 }
203 ATH_MSG_DEBUG("Electron container size "<< importedElectronCollection->size());
204 }
205
206
207 // Typedef for vectors of tracks and VxCandidates
208 typedef std::vector<const xAOD::TrackParticle*> TrackBag;
209 typedef std::vector<const xAOD::Electron*> ElectronBag;
210
211 // Select the inner detector tracks
212 const xAOD::Vertex* vx = nullptr;
213 TrackBag theIDTracksAfterSelection;
214 for (auto trkPBItr=importedTrackCollection->cbegin(); trkPBItr!=importedTrackCollection->cend(); ++trkPBItr) {
215 const xAOD::TrackParticle* tp (*trkPBItr);
216 if ( tp->pt()<m_trkThresholdPt ) continue;
217 if ( fabs(tp->eta())>m_trkMaxEta ) continue;
218 if (importedMuonCollection!=NULL && !m_excludeJpsiMuonsOnly) {
219 if (JpsiUpsilonCommon::isContainedIn(tp,importedMuonCollection)) continue;
220 }
221 if ( m_trkSelector->decision(*tp, vx) ) theIDTracksAfterSelection.push_back(tp);
222 }
223
224 // Add GSF tracks
225 if(m_useGSFTrack.any()){
226 ATH_MSG_DEBUG("importedTrackCollection contains GSF tracks " << importedGSFTrackCollection->size());
227 for (auto trkPBItr=importedGSFTrackCollection->cbegin(); trkPBItr!=importedGSFTrackCollection->cend(); ++trkPBItr) {
228 const xAOD::TrackParticle* tp (*trkPBItr);
229 if ( tp->pt()<m_trkThresholdPt ) continue;
230 if ( fabs(tp->eta())>m_trkMaxEta ) continue;
231 if (!importedMuonCollection->empty() && !m_excludeJpsiMuonsOnly) {
232 if (JpsiUpsilonCommon::isContainedIn(tp,importedMuonCollection)) continue;
233 }
234 if (m_trkSelector->decision(*tp, vx)) theIDTracksAfterSelection.push_back(tp);
235 }
236 }
237 if (theIDTracksAfterSelection.empty()) return StatusCode::SUCCESS;
238 ATH_MSG_DEBUG("Number of tracks after ID trkSelector: " << theIDTracksAfterSelection.size());
239
240 // Loop over J/psi candidates, select, collect up tracks used to build a J/psi
241 std::vector<const xAOD::Vertex*> selectedJpsiCandidates;
242 std::vector<const xAOD::TrackParticle*> jpsiTracks;
243 for(auto vxcItr=importedJpsiCollection->cbegin(); vxcItr!=importedJpsiCollection->cend(); ++vxcItr) {
244 // Check J/psi candidate invariant mass and skip if need be
245 if (m_jpsiMassUpper>0.0 || m_jpsiMassLower >0.0) {
246 xAOD::BPhysHelper jpsiCandidate(*vxcItr);
247 double jpsiMass = jpsiCandidate.totalP(m_muonMasses).M();
249 if (!pass) continue;
250 }
251 selectedJpsiCandidates.push_back(*vxcItr);
252
253 // Collect up tracks
255 // Extract tracks from J/psi
256 const xAOD::TrackParticle* jpsiTP1 = (*vxcItr)->trackParticle(0);
257 const xAOD::TrackParticle* jpsiTP2 = (*vxcItr)->trackParticle(1);
258 jpsiTracks.push_back(jpsiTP1);
259 jpsiTracks.push_back(jpsiTP2);
260 }
261 }
262
263
264 std::vector<double> massHypotheses;
265 if (m_kMassHyp) massHypotheses.push_back(kMass);
266 if (m_piMassHyp) massHypotheses.push_back(piMass);
267 if (!m_kMassHyp && !m_piMassHyp && m_BMassUpper>0.0) {
268 massHypotheses.push_back(kMass); massHypotheses.push_back(piMass);
269 }
270 std::vector<double> tripletMasses(m_muonMasses);
271 // Attempt to fit each track with the two tracks from the J/psi candidates
272 // Loop over J/psis
273
274 std::vector<double> massCuts;
275
276 TrackBag muonTracks;
277 if (importedMuonCollection && m_excludeJpsiMuonsOnly) {
278 for(auto muon : *importedMuonCollection){
279 auto track = muon->trackParticle( xAOD::Muon::TrackParticleType::InnerDetectorTrackParticle);
280 if(track==nullptr) continue;
281 if(!JpsiUpsilonCommon::isContainedIn(track, theIDTracksAfterSelection)) continue;
282 muonTracks.push_back(track);
283 }
284 }
285
286 TrackBag electronTracks;
287 ElectronBag theElectronsAfterSelection;
288 if (importedElectronCollection && !importedElectronCollection->empty()) {
289 for(auto electron : *importedElectronCollection) {
290 if (!electron->trackParticleLink().isValid()) continue; // No electrons without ID tracks
291 const xAOD::TrackParticle* elTrk(0);
292 elTrk = electron->trackParticleLink().cachedElement();
293 if (!elTrk) continue;
294 theElectronsAfterSelection.push_back(electron);
295 electronTracks.push_back(elTrk);
296 }
297 if (m_skipNoElectron && theElectronsAfterSelection.size() == 0) return StatusCode::SUCCESS;
298 ATH_MSG_DEBUG("Number of electrons after selection: " << theElectronsAfterSelection.size());
299 }
300
301 std::vector<const xAOD::TrackParticle*> tracks(3, nullptr);
302
303 for(auto jpsiItr=selectedJpsiCandidates.cbegin(); jpsiItr!=selectedJpsiCandidates.cend(); ++jpsiItr) {
304
305 // Extract tracks from J/psi
306
307 const xAOD::TrackParticle* jpsiTP1 = tracks[0] = (*jpsiItr)->trackParticle(0);
308 const xAOD::TrackParticle* jpsiTP2 = tracks[1] = (*jpsiItr)->trackParticle(1);
309
310 //If requested, only exclude duplicates in the same triplet
312 jpsiTracks.resize(2);
313 jpsiTracks[0] = jpsiTP1;
314 jpsiTracks[1] = jpsiTP2;
315 }
316
317 // Loop over ID tracks, call vertexing
318 for (auto trkItr=theIDTracksAfterSelection.cbegin(); trkItr!=theIDTracksAfterSelection.cend(); ++trkItr) {
319 if(bContainer.size() >= m_candidateLimit ){
320 ATH_MSG_WARNING("Hard Limit exceeded N=" << bContainer.size());
321 return StatusCode::SUCCESS;
322 }
323 if (!m_excludeJpsiMuonsOnly && JpsiUpsilonCommon::isContainedIn(*trkItr,jpsiTracks)) continue; // remove tracks which were used to build J/psi
324 int linkedMuonTrk = 0;
326 linkedMuonTrk = JpsiUpsilonCommon::isContainedIn(*trkItr, muonTracks);
327 if (linkedMuonTrk) ATH_MSG_DEBUG("This id track is a muon track!");
328 if (JpsiUpsilonCommon::isContainedIn(*trkItr,jpsiTracks)) {
329 if (linkedMuonTrk) ATH_MSG_DEBUG("ID track removed: id track is slected to build Jpsi!");
330 continue;
331
332 }
333 }
334 if(!m_electronCollectionKey.empty()){
335 int linkedElectronTrk = 0;
336 linkedElectronTrk = JpsiUpsilonCommon::isContainedIn(*trkItr, electronTracks);
337 if (linkedElectronTrk) ATH_MSG_DEBUG("This id track is an electron track!");
338 if (JpsiUpsilonCommon::isContainedIn(*trkItr,jpsiTracks)) {
339 if (linkedElectronTrk) ATH_MSG_DEBUG("ID track removed: id track is selected to build Jpsi!");
340 continue;
341 }
342 if (linkedElectronTrk < m_requiredNElectrons) {
343 ATH_MSG_DEBUG("Skipping Tracks with Electron " << linkedElectronTrk << " Limited to " << m_requiredNElectrons);
344 continue;
345 }
346 }
347
348 // Convert to TrackParticleBase
349 const xAOD::TrackParticle* theThirdTP = tracks[2] = *trkItr;
350
351 if (m_trkTrippletPt>0 && JpsiUpsilonCommon::getPt(jpsiTP1, jpsiTP2, theThirdTP) < m_trkTrippletPt ) continue; // track tripplet pT cut (daniel Scheirich)
352 if(m_trkDeltaZ>0 &&
353 fabs(theThirdTP->z0() + theThirdTP->vz() - (*jpsiItr)->z()) > m_trkDeltaZ )
354 continue;
355 if (linkedMuonTrk < m_requiredNMuons) {
356 ATH_MSG_DEBUG("Skipping Tracks with Muons " << linkedMuonTrk << " Limited to " << m_requiredNMuons);
357 continue;
358 }
359
360 // apply mass cut on track tripplet if requested
361 bool passRoughMassCuts(true);
362
364 massCuts.clear();
365 if(m_kMassHyp) massCuts.push_back(JpsiUpsilonCommon::getInvariantMass(tracks, {{m_muonMasses[0], m_muonMasses[1], kMass}}));
366 if(m_piMassHyp) massCuts.push_back(JpsiUpsilonCommon::getInvariantMass(tracks, {{m_muonMasses[0], m_muonMasses[1], piMass}}));
368 }
369 if (!passRoughMassCuts) continue;
370
371
372 //Managed pointer, "release" if you don't want it deleted. Automatically "deleted" otherwise
373 std::unique_ptr<xAOD::Vertex> bVertex( fit(ctx, tracks, importedTrackCollection, importedGSFTrackCollection));
374 if (bVertex) {
375
376 // Chi2/DOF cut
377 double bChi2DOF = bVertex->chiSquared()/bVertex->numberDoF();
378 ATH_MSG_DEBUG("Candidate chi2/DOF is " << bChi2DOF);
379
380 bool chi2CutPassed = (m_chi2cut <= 0.0 || bChi2DOF < m_chi2cut);
381 if(!chi2CutPassed) { ATH_MSG_DEBUG("Chi Cut failed!"); continue; }
382
383 // create the helper class
384 xAOD::BPhysHelper bHelper(bVertex.get());
385 // setRefTrks needs to be called after BPhysHelper is created if you want to access refitted track parameters
386 bHelper.setRefTrks();
387 // Decide whether to keep the candidate
388 bool masspTpassed = true;
389 if (m_BMassUpper>0.0 || m_BThresholdPt >0.0 || m_BMassLower > 0.0) {
390 masspTpassed = false;
391 for (double masshypo3rd : massHypotheses) {
392 tripletMasses.push_back(masshypo3rd); //Add third mass
393 TLorentzVector bMomentum = bHelper.totalP(tripletMasses);//Calulcate result
394 tripletMasses.pop_back(); //Remove 3rd mass - now same as beginning
395 double bpt = bMomentum.Pt();
396 bool PtPassed = m_BThresholdPt <= 0.0 || (bpt >= m_BThresholdPt);
397 double bMass = bMomentum.M();
398 ATH_MSG_DEBUG("candidate pt/mass under track mass hypothesis of " << masshypo3rd << " is " << bpt << " / " << bMass);
399 bool masscut = JpsiUpsilonCommon::cutRange(bMass, m_BMassLower, m_BMassUpper); //( bMass >= m_BMassLower && bMass <= m_BMassUpper );
400 if(masscut && PtPassed) { masspTpassed = true; break; }
401 }
402 }
403 if (masspTpassed) {
404 // Set links to J/psi
405 std::vector<const xAOD::Vertex*> theJpsiPreceding;
406 theJpsiPreceding.push_back(*jpsiItr);
407 bHelper.setPrecedingVertices(theJpsiPreceding, importedJpsiCollection);
408 bContainer.push_back(bVertex.release());
409 } else {
410 ATH_MSG_DEBUG("Cuts failed!");
411 }
412 } else {ATH_MSG_DEBUG("Fitter failed!");}
413
414 } // End of loop over tracks
415
416 } // End of loop over J/psis
417 ATH_MSG_DEBUG("bContainer size " << bContainer.size());
418 return StatusCode::SUCCESS;
419
420 }
421
422 // *********************************************************************************
423
424 // ---------------------------------------------------------------------------------
425 // fit - does the fit
426 // ---------------------------------------------------------------------------------
427
428 std::unique_ptr<xAOD::Vertex> JpsiPlus1Track::fit(const EventContext& ctx, const std::vector<const xAOD::TrackParticle*> &inputTracks, const xAOD::TrackParticleContainer* importedTrackCollection, const xAOD::TrackParticleContainer* gsfCollection) const {
429
430 std::unique_ptr<Trk::IVKalState> state = m_VKVFitter->makeState(ctx);
431
432 // Set the mass constraint if requested by user (default=true)
433 // Can be set by user (m_altMassConstraint) - default is -1.0.
434 // If < 0.0, uses J/psi (default)
435 // If > 0.0, uses the value provided
436 constexpr double jpsiTableMass = ParticleConstants::JpsiMassInMeV;
437
438 if (m_useMassConst) {
439 m_VKVFitter->setMassInputParticles(m_muonMasses, *state);
440 std::array<int,2> indices = {1, 2};
441 if (m_altMassConst<0.0) m_VKVFitter->setMassForConstraint(jpsiTableMass,indices, *state);
442 if (m_altMassConst>0.0) m_VKVFitter->setMassForConstraint(m_altMassConst,indices, *state);
443 }
444
445 // Do the fit itself.......
446 Amg::Vector3D startingPoint(0,0,0);
447 StatusCode sc=m_VKVFitter->VKalVrtFitFast(inputTracks, startingPoint, *state);
448 if(sc.isFailure()){
449 startingPoint = Amg::Vector3D(0,0,0);
450 }
451 std::unique_ptr<xAOD::Vertex> theResult = m_VKVFitter->fit(inputTracks, startingPoint, *state);
452
453 // Added by ASC
454 if(theResult){
455 std::vector<ElementLink<DataVector<xAOD::TrackParticle> > > newLinkVector;
456 for(unsigned int i=0; i< theResult->trackParticleLinks().size(); i++)
457 {
458 ElementLink<DataVector<xAOD::TrackParticle> > mylink=theResult->trackParticleLinks()[i]; //makes a copy (non-const)
459 mylink.setStorableObject( m_useGSFTrack[i] ? *gsfCollection : *importedTrackCollection, true);
460 newLinkVector.push_back( mylink );
461 }
462 theResult->clearTracks();
463 theResult->setTrackParticleLinks( newLinkVector );
464 }
465
466
467 return theResult;
468
469 }
470
471
472
473
474} // End of namespace
475
476
477
#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)
: B-physics xAOD helpers.
static Double_t sc
A number of constexpr particle constants to avoid hardcoding them directly in various places.
size_t size() const
Number of registered mappings.
#define max(a, b)
Definition cfImp.cxx:41
virtual StatusCode initialize() override
JpsiPlus1Track(const std::string &t, const std::string &n, const IInterface *p)
std::vector< double > m_muonMasses
SG::ReadHandleKey< xAOD::MuonContainer > m_MuonsUsedInJpsi
SG::ReadHandleKey< xAOD::VertexContainer > m_jpsiCollectionKey
std::vector< int > m_useGSFTrackIndices
virtual StatusCode performSearch(const EventContext &ctx, xAOD::VertexContainer &) const override
ToolHandle< Trk::ITrackSelectorTool > m_trkSelector
std::bitset< 3 > m_useGSFTrack
std::unique_ptr< xAOD::Vertex > fit(const EventContext &ctx, const std::vector< const xAOD::TrackParticle * > &, const xAOD::TrackParticleContainer *, const xAOD::TrackParticleContainer *) const
SG::ReadHandleKey< xAOD::ElectronContainer > m_electronCollectionKey
ToolHandle< Trk::IVertexFitter > m_iVertexFitter
Trk::TrkVKalVrtFitter * m_VKVFitter
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_TrkParticleCollection
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_TrkParticleGSFCollection
static bool cutRange(double value, double min, double max) noexcept
static double getInvariantMass(const xAOD::TrackParticle *trk1, double mass1, const xAOD::TrackParticle *trk2, double mass2)
static bool cutRangeOR(std::span< double const > values, double min, double max) noexcept
static bool isContainedIn(const xAOD::TrackParticle *, std::span< const xAOD::TrackParticle *const >) noexcept
static double getPt(std::span< const xAOD::TrackParticle *const > tracks)
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Header file for AthHistogramAlgorithm.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
const_iterator cbegin() 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.
const_iterator cend() const noexcept
Return a const_iterator pointing past the end of the collection.
bool empty() const noexcept
Returns true if the collection is empty.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
bool setPrecedingVertices(const std::vector< const xAOD::Vertex * > &vertices, const xAOD::VertexContainer *vertexContainer)
Sets links to preceding vertices.
bool setRefTrks(std::vector< float > px, std::vector< float > py, std::vector< float > pz)
Sets refitted track momenta.
TVector3 totalP()
: Returns total 3-momentum calculated from the refitted tracks
float z0() const
Returns the parameter.
float vz() const
The z origin for the parameters.
virtual double pt() const override final
The transverse momentum ( ) of the particle.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Eigen::Matrix< double, 3, 1 > Vector3D
The namespace of all packages in PhysicsAnalysis/JetTagging.
constexpr double piMass
constexpr double kMass
constexpr double muMass
constexpr double muonMassInMeV
the mass of the muon (in MeV)
constexpr double chargedKaonMassInMeV
the mass of the charged kaon (in MeV)
constexpr double chargedPionMassInMeV
the mass of the charged pion (in MeV)
STL namespace.
ElectronContainer_v1 ElectronContainer
Definition of the current "electron container version".
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".
MuonContainer_v1 MuonContainer
Definition of the current "Muon container version".