ATLAS Offline Software
Loading...
Searching...
No Matches
JGTower_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
5
6// EDM includes(s):
8
9// Local include(s):
11
12namespace xAOD{
13
18
19
20
25
27 {
28 if( this != &other ){
29 if( !container() && !hasStore() ){
31 }
33 }
34 return *this;
35 }
36//Objects stored in this way will be hidden information
37 AUXSTORE_OBJECT_SETTER_AND_GETTER( JGTower_v1 , std::vector<int> , SCIndex , setSCIndex )
38 AUXSTORE_OBJECT_SETTER_AND_GETTER( JGTower_v1 , std::vector<int> , TileIndex , setTileIndex )
39
40
41 void JGTower_v1::initialize(const int Id, const float Eta,const float Phi)
42 {
43 setId (Id);
44 setEta( Eta );
45 setPhi( Phi );
46 }
47
48 void JGTower_v1::initialize(const int Id, const float Eta,const float Phi, const float Et)
49 {
50 setId (Id);
51 setEt (Et);
52 setEta( Eta );
53 setPhi( Phi );
54 }
55
56 // IParticle interface
57
58// AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( JGTower_v1, int , id , setId )
59
60 double JGTower_v1::eta() const
61 {
62 const static ConstAccessor< float > acc( "eta" );
63 return acc( *this );
64 }
65
67 {
68 const static Accessor< float > acc( "eta" );
69 acc( *this ) = eta;
70 }
71
72
73 double JGTower_v1::phi() const
74 {
75 const static ConstAccessor< float > acc( "phi" );
76 return acc( *this );
77 }
78
80 {
81 const static Accessor< float > acc( "phi" );
82 acc( *this ) = phi;
83 }
84
85 double JGTower_v1::deta() const
86 {
87 const static ConstAccessor< float > acc( "deta" );
88 return acc( *this );
89 }
90
92 {
93 const static Accessor< float > acc( "deta" );
94 acc( *this ) = deta;
95 }
96
97 double JGTower_v1::dphi() const
98 {
99 const static ConstAccessor< float > acc( "dphi" );
100 return acc( *this );
101 }
102
104 {
105 const static Accessor< float > acc( "dphi" );
106 acc( *this ) = dphi;
107 }
108
109 int JGTower_v1::Id() const
110 {
111 const static ConstAccessor< int > acc( "Id" );
112 return acc( *this );
113 }
114
116 {
117 const static Accessor< int > acc( "Id" );
118 acc( *this ) = Id;
119 }
120
122 {
123 const static ConstAccessor< int > acc( "sampling" );
124 return acc( *this );
125 }
126
128 {
129 const static Accessor< int > acc( "sampling" );
130 acc( *this ) = sampling;
131 }
132
133
134 double JGTower_v1::et() const
135 {
136 const static ConstAccessor< float > acc( "et" );
137 return acc( *this );
138 }
139
141 {
142 const static Accessor< float > acc( "et" );
143 acc( *this ) = et;
144 }
145
146 double JGTower_v1::pt() const
147 {
148 return static_cast< double >(et() );
149 }
150
151 double JGTower_v1::m() const
152 {
153 return 0.;
154 }
155
156 double JGTower_v1::e() const
157 {
158 return p4().E();
159 }
160
161 double JGTower_v1::rapidity() const
162 {
163 return p4().Rapidity();
164 }
165
167 {
169 double PT = (pt() > 0) ? 1000. * static_cast< double >( pt() ) : 0.01;
170 p4.SetPtEtaPhiM( PT , eta() , phi() , m() );
171 return p4;
172 }
173
174 Type::ObjectType JGTower_v1::type() const
175 {
176 return Type::Jet;
177 }
178
179} // namespace xAOD
#define AUXSTORE_OBJECT_SETTER_AND_GETTER(CL, TYPE, NAME, SETTER)
Macro creating the accessors of complex auxiliary properties.
void makePrivateStore()
Create a new (empty) private store for this object.
SG::ConstAccessor< T, ALLOC > ConstAccessor
Definition AuxElement.h:569
bool hasStore() const
Return true if this object has an associated store.
const SG::AuxVectorData * container() const
Return the container holding this element.
IParticle & operator=(const IParticle &)=default
IParticle()=default
SG::Accessor< T, ALLOC > Accessor
Definition AuxElement.h:572
Description of JGTower_v1.
Definition JGTower_v1.h:46
void setdEta(float)
virtual double e() const final
The total energy of the particle.
virtual double phi() const final
The azimuthal angle ( ) of the particle.
JGTower_v1 & operator=(const JGTower_v1 &other)
Assignment operator.
virtual double et() const final
virtual double dphi() const final
The azimuthal angle ( ) of the particle.
virtual double pt() const final
The transverse momentum ( ) of the particle.
void setEt(float)
virtual int sampling() const final
virtual double rapidity() const final
The true rapidity (y) of the particle.
void setdPhi(float)
virtual double deta() const final
The pseudorapidity ( ) of the particle.
IParticle::FourMom_t FourMom_t
Definition of the 4-momentum type.
Definition JGTower_v1.h:109
void setPhi(float)
JGTower_v1()
Default constructor.
void setSampling(int)
void setEta(float)
virtual FourMom_t p4() const final
The full 4-momentum of the particle as a TLoretzVector.
virtual double m() const final
The invariant mass of the particle.
virtual int Id() const final
get coolId
virtual double eta() const final
The pseudorapidity ( ) of the particle.
virtual void initialize(const int Id, const float Eta, const float Phi, const float Et)
virtual Type::ObjectType type() const final
The type of the object as a simple enumeration, remains pure virtual in e/gamma.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.