ATLAS Offline Software
Loading...
Searching...
No Matches
Operators.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4/* Author: Andrii Verbytskyi andrii.verbytskyi@mpp.mpg.de */
5
6#ifndef ATLASHEPMC_OPERATORS_H
7#define ATLASHEPMC_OPERATORS_H
8// This suboptimal piece of code is here because of the googletest suite.
9// Include it only in the test suite.
10namespace HepMC3 {
11bool operator == (const HepMC3::GenParticle* a, const std::shared_ptr<HepMC3::GenParticle> b) {
12 return a == b.get();
13}
14bool operator == (const std::shared_ptr<HepMC3::GenParticle> a, const HepMC3::GenParticle* const b) {
15 return a.get() == b;
16}
17bool operator == (const std::shared_ptr<const HepMC3::GenParticle> a, const HepMC3::GenParticle* const b) {
18 return a.get() == b;
19}
20bool operator == (const HepMC3::GenParticle a, const HepMC3::GenParticle b) {
21 return a.id() == b.id();
22}
23bool operator != (const std::shared_ptr<HepMC3::GenParticle> a, const HepMC3::GenParticle* const b) {
24 return a.get() != b;
25}
26bool operator != (const std::shared_ptr<const HepMC3::GenParticle> a, const HepMC3::GenParticle* const b) {
27 return a.get() != b;
28}
29bool operator !=(const HepMC3::GenParticle a, const HepMC3::GenParticle b) {
30 return a.id() != b.id();
31}
32
33bool operator == (const HepMC3::GenVertex* a, const std::shared_ptr<HepMC3::GenVertex> b) {
34 return a == b.get();
35}
36bool operator == (const std::shared_ptr<HepMC3::GenVertex> a, const HepMC3::GenVertex* const b) {
37 return a.get() == b;
38}
39bool operator == (const std::shared_ptr<const HepMC3::GenVertex> a, const HepMC3::GenVertex* const b) {
40 return a.get() == b;
41}
42bool operator == (const HepMC3::GenVertex a, const HepMC3::GenVertex b) {
43 return a.id() == b.id();
44}
45bool operator != (const std::shared_ptr<HepMC3::GenVertex> a, const HepMC3::GenVertex* const b) {
46 return a.get() != b;
47}
48bool operator != (const std::shared_ptr<const HepMC3::GenVertex> a, const HepMC3::GenVertex* const b) {
49 return a.get() != b;
50}
51bool operator != (const HepMC3::GenVertex a, const HepMC3::GenVertex b) {
52 return a.id() != b.id();
53}
54}
55#endif
static Double_t a
bool operator==(const HepMC3::GenParticle *a, const std::shared_ptr< HepMC3::GenParticle > b)
Definition Operators.h:11
bool operator!=(const std::shared_ptr< HepMC3::GenParticle > a, const HepMC3::GenParticle *const b)
Definition Operators.h:23