ATLAS Offline Software
Loading...
Searching...
No Matches
GBlock_v1.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
7
8namespace
9{
14} // namespace
15
16namespace xAOD
17{
22
24 {
25 if (this != &other)
26 {
27 if (!container() && !hasStore())
28 {
30 }
32 }
33 return *this;
34 }
35
37
38 double GBlock_v1::pt() const { return et(); }
39
42
45
47
49
51
53
54 double GBlock_v1::m() const { return 0; }
55
56 double GBlock_v1::e() const { return p4().E(); }
57
58 double GBlock_v1::rapidity() const { return p4().Rapidity(); }
59
61 {
63 double PT = (pt() > 0) ? 1000. * static_cast<double>(pt()) : 0.01;
64 p4.SetPtEtaPhiM(PT, eta(), phi(), m());
65 return p4;
66 }
67
68 Type::ObjectType GBlock_v1::type() const
69 {
70 return Type::Other;
71 }
72
74 {
75 return accSeedTower(*this);
76 }
77
79 {
81 return link.isValid() ? *link : nullptr;
82 }
83
84 const std::vector<ElementLink<JGTowerContainer>> &GBlock_v1::towerLinks() const
85 {
86 return accTowers(*this);
87 }
88
89 const JGTower *GBlock_v1::getTower(std::size_t idx) const
90 {
91 const std::vector<ElementLink<JGTowerContainer>> &links = towerLinks();
92 return idx >= links.size() ? nullptr : *links[idx];
93 }
94
96 {
97 decSeedTower(*this) = link;
98 }
99
102 {
103 decTowers(*this) = links;
104 }
105
106} // namespace xAOD
Scalar eta() const
pseudorapidity method
#define AUXSTORE_PRIMITIVE_GETTER_WITH_CAST(CL, PERSTYPE, TRANSTYPE, NAME)
Macro creating a getter function with a type conversion.
#define AUXSTORE_PRIMITIVE_SETTER_WITH_CAST(CL, PERSTYPE, TRANSTYPE, NAME, SETTER)
Macro creating a setter function with a type conversion.
#define AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(CL, TYPE, NAME, SETTER)
Macro creating the accessors of primitive auxiliary properties.
double area(double R)
void makePrivateStore()
Create a new (empty) private store for this object.
SG::ConstAccessor< T, ALLOC > ConstAccessor
Definition AuxElement.h:569
SG::Decorator< T, ALLOC > Decorator
Definition AuxElement.h:575
bool hasStore() const
Return true if this object has an associated store.
const SG::AuxVectorData * container() const
Return the container holding this element.
const JGTower * getTower(std::size_t idx) const
Get a link by number.
Definition GBlock_v1.cxx:89
const std::vector< ElementLink< JGTowerContainer > > & towerLinks() const
Element links to the towers making up this gBlock (including the seed)
Definition GBlock_v1.cxx:84
const ElementLink< JGTowerContainer > & seedTowerLink() const
The element link to the seed tower of this gBlock.
Definition GBlock_v1.cxx:73
virtual Type::ObjectType type() const final
The type of the object as a simple enumeration, remains pure virtual in e/gamma.
Definition GBlock_v1.cxx:68
virtual double m() const final
The invariant mass of the particle.
Definition GBlock_v1.cxx:54
virtual double e() const final
The total energy of the particle.
Definition GBlock_v1.cxx:56
void setTowerLinks(const std::vector< ElementLink< JGTowerContainer > > &links)
set the tower links
virtual ~GBlock_v1() override
Default destructor.
Definition GBlock_v1.cxx:36
virtual FourMom_t p4() const final
The full 4-momentum of the particle as a TLoretzVector.
Definition GBlock_v1.cxx:60
float et() const
virtual double rapidity() const final
The true rapidity (y) of the particle.
Definition GBlock_v1.cxx:58
virtual double eta() const final
The pseudorapidity ( ) of the particle.
virtual double pt() const final
The transverse momentum of the particle.
Definition GBlock_v1.cxx:38
void setSeedTowerLink(const ElementLink< JGTowerContainer > &link)
Set the seed link.
Definition GBlock_v1.cxx:95
virtual double phi() const final
The azimuthal angle ( ) of the particle.
GBlock_v1 & operator=(const GBlock_v1 &other)
Assignment operator.
Definition GBlock_v1.cxx:23
const JGTower * seedTower() const
The seed tower for this gBlock.
Definition GBlock_v1.cxx:78
IParticle::FourMom_t FourMom_t
Definition of the 4-momentum type.
Definition GBlock_v1.h:60
GBlock_v1()=default
Default constructor.
IParticle & operator=(const IParticle &)=default
IParticle()=default
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
JGTower_v1 JGTower
Define the latest version of the JGTower class.
Definition JGTower.h:15