ATLAS Offline Software
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 
12 namespace xAOD{
13 
15  IParticle()
16  {
17  }
18 
19 
20 
22  IParticle( other )
23  {
24  }
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 
66  void JGTower_v1::setEta(float eta)
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 
79  void JGTower_v1::setPhi(float phi)
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 
91  void JGTower_v1::setdEta(float deta)
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 
103  void JGTower_v1::setdPhi(float dphi)
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 
115  void JGTower_v1::setId(int Id)
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 
127  void JGTower_v1::setSampling(int sampling)
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 
140  void JGTower_v1::setEt(float et)
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  {
168  FourMom_t p4;
169  double PT = (pt() > 0) ? 1000. * static_cast< double >( pt() ) : 0.01;
170  p4.SetPtEtaPhiM( PT , eta() , phi() , m() );
171  return p4;
172  }
173 
175  {
176  return Type::Jet;
177  }
178 
179 } // namespace xAOD
xAOD::JGTower_v1
Description of JGTower_v1.
Definition: JGTower_v1.h:46
et
Extra patterns decribing particle interation process.
xAOD::JGTower_v1::setdPhi
void setdPhi(float)
Definition: JGTower_v1.cxx:103
xAOD::JGTower_v1::setEta
void setEta(float)
Definition: JGTower_v1.cxx:66
xAOD::JGTower_v1::Id
virtual int Id() const final
get coolId
Definition: JGTower_v1.cxx:109
SG::Accessor< float >
AuxStoreAccessorMacros.h
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
initialize
void initialize()
Definition: run_EoverP.cxx:894
xAOD::other
@ other
Definition: TrackingPrimitives.h:509
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::JGTower_v1::eta
virtual double eta() const final
The pseudorapidity ( ) of the particle.
Definition: JGTower_v1.cxx:60
Phi
@ Phi
Definition: RPCdef.h:8
SG::ConstAccessor< float >
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:562
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:40
xAOD::JGTower_v1::setPhi
void setPhi(float)
Definition: JGTower_v1.cxx:79
xAOD::JGTower_v1::et
virtual double et() const final
Definition: JGTower_v1.cxx:134
Amg::setPhi
Amg::RotationMatrix3D setPhi(Amg::RotationMatrix3D mat, double angle, int convention=0)
Definition: EulerAnglesHelpers.h:102
xAOD::JGTower_v1::setSampling
void setSampling(int)
Definition: JGTower_v1.cxx:127
xAOD::JGTower_v1::phi
virtual double phi() const final
The azimuthal angle ( ) of the particle.
Definition: JGTower_v1.cxx:73
xAOD::IParticle::FourMom_t
TLorentzVector FourMom_t
Definition of the 4-momentum type.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:68
xAOD::phi
setEt phi
Definition: TrigEMCluster_v1.cxx:29
xAOD::JGTower_v1::p4
virtual FourMom_t p4() const final
The full 4-momentum of the particle as a TLoretzVector.
Definition: JGTower_v1.cxx:166
xAOD::JGTower_v1::dphi
virtual double dphi() const final
The azimuthal angle ( ) of the particle.
Definition: JGTower_v1.cxx:97
xAOD::JGTower_v1::FourMom_t
IParticle::FourMom_t FourMom_t
Definition of the 4-momentum type.
Definition: JGTower_v1.h:109
xAOD::JGTower_v1::deta
virtual double deta() const final
The pseudorapidity ( ) of the particle.
Definition: JGTower_v1.cxx:85
xAOD::JGTower_v1::JGTower_v1
JGTower_v1()
Default constructor.
Definition: JGTower_v1.cxx:14
JGTower_v1.h
xAOD::JGTower_v1::setEt
void setEt(float)
Definition: JGTower_v1.cxx:140
xAOD::JGTower_v1::m
virtual double m() const final
The invariant mass of the particle.
Definition: JGTower_v1.cxx:151
xAOD::JGTower_v1::setdEta
void setdEta(float)
Definition: JGTower_v1.cxx:91
SG::AuxElement::makePrivateStore
void makePrivateStore()
Create a new (empty) private store for this object.
Definition: AuxElement.cxx:172
SG::AuxElement::hasStore
bool hasStore() const
Return true if this object has an associated store.
Definition: AuxElement.cxx:355
xAOD::JGTower_v1::operator=
JGTower_v1 & operator=(const JGTower_v1 &other)
Assignment operator.
Definition: JGTower_v1.cxx:26
xAOD::JGTower_v1::pt
virtual double pt() const final
The transverse momentum ( ) of the particle.
Definition: JGTower_v1.cxx:146
xAOD::JGTower_v1::type
virtual Type::ObjectType type() const final
The type of the object as a simple enumeration, remains pure virtual in e/gamma.
Definition: JGTower_v1.cxx:174
xAOD::JGTower_v1::setId
void setId(int)
Definition: JGTower_v1.cxx:115
SG::AuxElement::container
const SG::AuxVectorData * container() const
Return the container holding this element.
xAOD::JGTower_v1::e
virtual double e() const final
The total energy of the particle.
Definition: JGTower_v1.cxx:156
xAODType::ObjectType
ObjectType
Type of objects that have a representation in the xAOD EDM.
Definition: ObjectType.h:32
H5Utils::internal::PT
H5::PredType PT
Definition: H5Traits.cxx:15
xAOD::JGTower_v1::rapidity
virtual double rapidity() const final
The true rapidity (y) of the particle.
Definition: JGTower_v1.cxx:161
xAOD::IParticle::operator=
IParticle & operator=(const IParticle &)=default
xAOD::Jet
Jet_v1 Jet
Definition of the current "jet version".
Definition: Event/xAOD/xAODJet/xAODJet/Jet.h:17
xAOD::JGTower_v1::initialize
virtual void initialize(const int Id, const float Eta, const float Phi, const float Et)
Definition: JGTower_v1.cxx:48
Eta
@ Eta
Definition: RPCdef.h:8
xAOD::JGTower_v1::sampling
virtual int sampling() const final
Definition: JGTower_v1.cxx:121
xAOD::AUXSTORE_OBJECT_SETTER_AND_GETTER
AUXSTORE_OBJECT_SETTER_AND_GETTER(CaloRings_v1, RingSetLinks, ringSetLinks, setRingSetLinks) unsigned CaloRings_v1
Definition: CaloRings_v1.cxx:27