ATLAS Offline Software
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 
8 namespace
9 {
11  const SG::AuxElement::Decorator<ElementLink<xAOD::JGTowerContainer>> decSeedTower("seedJGTower");
14 } // namespace
15 
16 namespace xAOD
17 {
19  : IParticle(other)
20  {
21  }
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 
41  AUXSTORE_PRIMITIVE_SETTER_WITH_CAST(GBlock_v1, float, double, eta, setEta)
42 
45 
46  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(GBlock_v1, float, deta, setdEta)
47 
48  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(GBlock_v1, float, dphi, setdPhi)
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  {
62  FourMom_t p4;
63  double PT = (pt() > 0) ? 1000. * static_cast<double>(pt()) : 0.01;
64  p4.SetPtEtaPhiM(PT, eta(), phi(), m());
65  return p4;
66  }
67 
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
xAOD::GBlock_v1::FourMom_t
IParticle::FourMom_t FourMom_t
Definition of the 4-momentum type.
Definition: GBlock_v1.h:60
xAOD::JGTower_v1
Description of JGTower_v1.
Definition: JGTower_v1.h:46
xAOD::GBlock_v1::towerLinks
const std::vector< ElementLink< JGTowerContainer > > & towerLinks() const
Element links to the towers making up this gBlock (including the seed)
Definition: GBlock_v1.cxx:84
xAOD::AUXSTORE_PRIMITIVE_SETTER_AND_GETTER
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(BTagging_v1, float, IP2D_pb, setIP2D_pb) AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(BTagging_v1
xAOD::GBlock_v1::type
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
et
Extra patterns decribing particle interation process.
xAOD::GBlock_v1::e
virtual double e() const final
The total energy of the particle.
Definition: GBlock_v1.cxx:56
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
AuxStoreAccessorMacros.h
xAOD::GBlock_v1
Definition: GBlock_v1.h:17
xAOD::GBlock_v1::phi
virtual double phi() const final
The azimuthal angle ( ) of the particle.
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::GBlock_v1::setSeedTowerLink
void setSeedTowerLink(const ElementLink< JGTowerContainer > &link)
Set the seed link.
Definition: GBlock_v1.cxx:95
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:55
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:41
xAOD::GBlock_v1::m
virtual double m() const final
The invariant mass of the particle.
Definition: GBlock_v1.cxx:54
xAOD::GBlock_v1::p4
virtual FourMom_t p4() const final
The full 4-momentum of the particle as a TLoretzVector.
Definition: GBlock_v1.cxx:60
Amg::setPhi
Amg::RotationMatrix3D setPhi(Amg::RotationMatrix3D mat, double angle, int convention=0)
Definition: EulerAnglesHelpers.h:102
xAOD::GBlock_v1::eta
virtual double eta() const final
The pseudorapidity ( ) of the particle.
xAOD::IParticle::FourMom_t
TLorentzVector FourMom_t
Definition of the 4-momentum type.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:69
xAOD::phi
setEt phi
Definition: TrigEMCluster_v1.cxx:29
xAOD::GBlock_v1::seedTowerLink
const ElementLink< JGTowerContainer > & seedTowerLink() const
The element link to the seed tower of this gBlock.
Definition: GBlock_v1.cxx:73
xAOD::AUXSTORE_PRIMITIVE_SETTER_WITH_CAST
AUXSTORE_PRIMITIVE_SETTER_WITH_CAST(CompositeParticle_v1, float, double, px, setPx) AUXSTORE_PRIMITIVE_SETTER_WITH_CAST(CompositeParticle_v1
SG::Decorator
Helper class to provide type-safe access to aux data.
Definition: Decorator.h:59
xAOD::GBlock_v1::~GBlock_v1
virtual ~GBlock_v1() override
Default destructor.
Definition: GBlock_v1.cxx:36
DMTest::links
links
Definition: CLinks_v1.cxx:22
xAOD::GBlock_v1::et
float et() const
xAOD::AUXSTORE_PRIMITIVE_GETTER_WITH_CAST
AUXSTORE_PRIMITIVE_GETTER_WITH_CAST(Muon_v1, uint8_t, Muon_v1::EnergyLossType, energyLossType) AUXSTORE_PRIMITIVE_SETTER_WITH_CAST(Muon_v1
xAOD::GBlock_v1::setTowerLinks
void setTowerLinks(const std::vector< ElementLink< JGTowerContainer >> &links)
set the tower links
Definition: GBlock_v1.cxx:101
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
xAOD::GBlock_v1::pt
virtual double pt() const final
The transverse momentum of the particle.
Definition: GBlock_v1.cxx:38
SG::AuxElement::makePrivateStore
void makePrivateStore()
Create a new (empty) private store for this object.
Definition: AuxElement.cxx:172
xAOD::GBlock_v1::operator=
GBlock_v1 & operator=(const GBlock_v1 &other)
Assignment operator.
Definition: GBlock_v1.cxx:23
SG::AuxElement::hasStore
bool hasStore() const
Return true if this object has an associated store.
Definition: AuxElement.cxx:355
GBlock_v1.h
xAOD::GBlock_v1::getTower
const JGTower * getTower(std::size_t idx) const
Get a link by number.
Definition: GBlock_v1.cxx:89
xAOD::GBlock_v1::seedTower
const JGTower * seedTower() const
The seed tower for this gBlock.
Definition: GBlock_v1.cxx:78
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
xAOD::GBlock_v1::rapidity
virtual double rapidity() const final
The true rapidity (y) of the particle.
Definition: GBlock_v1.cxx:58
SG::AuxElement::container
const SG::AuxVectorData * container() const
Return the container holding this element.
area
double area(double R)
Definition: ConvertStaveServices.cxx:42
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::GBlock_v1::GBlock_v1
GBlock_v1()=default
Default constructor.
xAOD::IParticle::operator=
IParticle & operator=(const IParticle &)=default