Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
FlowElement_v1.h
Go to the documentation of this file.
1 // this files is -*- c++ -*-
2 /*
3  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
4 */
5 #ifndef XAODPFLOW_VERSIONS_FLOWELEMENT_V1_H
6 #define XAODPFLOW_VERSIONS_FLOWELEMENT_V1_H
7 
8 // Core include(s):
9 #include "AthLinks/ElementLink.h"
10 
11 // xAOD include(s):
12 #include "xAODBase/IParticle.h"
14 
15 namespace xAOD {
16 
25  class FlowElement_v1 : public IParticle {
26  public:
27 
29 
30  typedef unsigned long signal_t; // 32-bit minimum
31  typedef short vertex_t;
32  using IParticle::FourMom_t ;
33 
35  enum SignalType {
36  // global characteristics
37  Neutral = 0x1000,
38  Charged = 0x2000,
39  Combined = 0x4000, //needed??
40 
41  // detector level signals and flow objects
42  CaloCluster = Neutral | 0x0100,
43  Track = Charged | 0x0200,
44  Muon = Charged | 0x0400,
45  PFlow = 0x0010,
48 
49  // higher level flow objects
50  TCC = 0x0020,
53  UFO = 0x0001,
56 
57  // unknown
58  Unknown = 0x0000
59  };
60 
63  Undefined = 0x00, HardScatter = 0x10, Pileup = 0x20, PileupSideBand = 0x21
64  };
65 
66  // *************************************************
69  virtual double pt() const override;
70  virtual double eta() const override;
71  virtual double phi() const override;
72  virtual double m() const override;
73  virtual double e() const override;
74  virtual double rapidity() const override;
75  virtual FourMom_t p4() const override;
76  virtual Type::ObjectType type() const override ;
77 
78  void setP4(float pt, float eta, float phi, float m) ;
79  void setP4(const FourMom_t& p4);
81 
82  // *************************************************
88 
89  // *************************************************
92  bool isMatchedToPV(MatchedPVType vxtype=HardScatter) const;
93 
97 
98  // *************************************************
101  bool isCharged() const;
102  float charge() const;
103 
104  void setCharge(float c);
106 
107  // *************************************************
108 
112  std::vector<const xAOD::IParticle*> chargedObjects() const ;
113  std::vector<std::pair<const xAOD::IParticle*,float> > chargedObjectsAndWeights() const ;
114 
115  std::size_t nChargedObjects() const ;
116  const xAOD::IParticle* chargedObject( std::size_t i ) const;
117  std::pair< const xAOD::IParticle*, float > chargedObjectAndWeight( std::size_t i ) const;
119 
120 
122 
123  const std::vector<ElementLink<IParticleContainer>> & chargedObjectLinks() const ;
124  const std::vector<float> & chargedObjectWeights() const ;
126  void setChargedObjectLinks(const std::vector<ElementLink<IParticleContainer>> & elV, const std::vector<float> & wV);
128 
129  // *************************************************
133  std::vector<const xAOD::IParticle*> otherObjects() const ;
134  std::vector<std::pair<const xAOD::IParticle*,float> > otherObjectsAndWeights() const ;
135 
136  std::size_t nOtherObjects() const ;
137  const xAOD::IParticle* otherObject( std::size_t i ) const;
138  std::pair< const xAOD::IParticle*, float > otherObjectAndWeight( std::size_t i ) const;
140 
143  const std::vector<ElementLink<IParticleContainer>>& otherObjectLinks() const ;
144  const std::vector<float>& otherObjectWeights() const ;
145 
146  void setOtherObjectLinks(const std::vector<ElementLink<IParticleContainer>> & elV);
147  void setOtherObjectLinks(const std::vector<ElementLink<IParticleContainer>> & elV, const std::vector<float> & wV);
149 
150  };
151 
152 }
153 // Declare IParticle as a base class of FlowElement_v1:
156 
157 
158 #endif
xAOD::FlowElement_v1::NeutralPFlow
@ NeutralPFlow
Definition: FlowElement_v1.h:46
xAOD::FlowElement_v1::setOtherObjectLinks
void setOtherObjectLinks(const std::vector< ElementLink< IParticleContainer >> &elV, const std::vector< float > &wV)
xAOD::FlowElement_v1::Neutral
@ Neutral
Definition: FlowElement_v1.h:37
IParticle.h
xAOD::FlowElement_v1::Charged
@ Charged
Definition: FlowElement_v1.h:38
xAOD::FlowElement_v1::rapidity
virtual double rapidity() const override
The true rapidity (y) of the particle.
Definition: FlowElement_v1.cxx:29
xAOD::FlowElement_v1::m
virtual double m() const override
The invariant mass of the particle.
xAOD::FlowElement_v1::UFO
@ UFO
Definition: FlowElement_v1.h:53
xAOD::FlowElement_v1::vertexType
vertex_t vertexType() const
xAOD::FlowElement_v1::nOtherObjects
std::size_t nOtherObjects() const
Definition: FlowElement_v1.cxx:192
xAOD::FlowElement_v1::setSignalType
void setSignalType(signal_t t)
DATAVECTOR_BASE
DATAVECTOR_BASE(xAOD::FlowElement_v1, xAOD::IParticle)
xAOD::FlowElement_v1::otherObjectsAndWeights
std::vector< std::pair< const xAOD::IParticle *, float > > otherObjectsAndWeights() const
Definition: FlowElement_v1.cxx:173
xAOD::FlowElement_v1::chargedObjectLinks
const std::vector< ElementLink< IParticleContainer > > & chargedObjectLinks() const
Access to the EL.
xAOD::FlowElement_v1::setVertexType
void setVertexType(vertex_t t)
xAOD::FlowElement_v1::otherObjectLinks
const std::vector< ElementLink< IParticleContainer > > & otherObjectLinks() const
xAOD::FlowElement_v1::SignalType
SignalType
Enum to encode the nature of the object this FlowElement represents.
Definition: FlowElement_v1.h:35
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::FlowElement_v1::phi
virtual double phi() const override
The azimuthal angle ( ) of the particle.
xAOD::FlowElement_v1::pt
virtual double pt() const override
xAOD::FlowElement_v1::PileupSideBand
@ PileupSideBand
Definition: FlowElement_v1.h:63
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
xAOD::FlowElement_v1::TCC
@ TCC
Definition: FlowElement_v1.h:50
xAOD::FlowElement_v1::setOtherObjectLinks
void setOtherObjectLinks(const std::vector< ElementLink< IParticleContainer >> &elV)
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition: TrackSystemController.h:45
xAOD::FlowElement_v1::Undefined
@ Undefined
Definition: FlowElement_v1.h:63
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:41
xAOD::FlowElement_v1::nChargedObjects
std::size_t nChargedObjects() const
Definition: FlowElement_v1.cxx:123
xAOD::FlowElement_v1::setCharge
void setCharge(float c)
xAOD::FlowElement_v1::signal_t
unsigned long signal_t
Definition: FlowElement_v1.h:30
xAOD::FlowElement_v1::isMatchedToPV
bool isMatchedToPV(MatchedPVType vxtype=HardScatter) const
Definition: FlowElement_v1.cxx:63
xAOD::IParticle::FourMom_t
TLorentzVector FourMom_t
Definition of the 4-momentum type.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:69
xAOD::FlowElement_v1::PFlow
@ PFlow
Definition: FlowElement_v1.h:45
xAOD::FlowElement_v1::HardScatter
@ HardScatter
Definition: FlowElement_v1.h:63
xAOD::FlowElement_v1::otherObjectAndWeight
std::pair< const xAOD::IParticle *, float > otherObjectAndWeight(std::size_t i) const
Definition: FlowElement_v1.cxx:202
xAOD::FlowElement_v1::isCharged
bool isCharged() const
Definition: FlowElement_v1.cxx:56
xAOD::FlowElement_v1::chargedObjectsAndWeights
std::vector< std::pair< const xAOD::IParticle *, float > > chargedObjectsAndWeights() const
Definition: FlowElement_v1.cxx:104
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:62
xAOD::FlowElement_v1::MatchedPVType
MatchedPVType
Enum to encode high-level information on the vertex associated to this FlowElement.
Definition: FlowElement_v1.h:62
lumiFormat.i
int i
Definition: lumiFormat.py:85
IParticleContainer.h
PFlow
Definition: PFlow.py:1
xAOD::FlowElement_v1::charge
float charge() const
xAOD::FlowElement_v1::signalType
signal_t signalType() const
xAOD::FlowElement_v1::ChargedPFlow
@ ChargedPFlow
Definition: FlowElement_v1.h:47
xAOD::FlowElement_v1::vertex_t
short vertex_t
Definition: FlowElement_v1.h:31
xAOD::FlowElement_v1::chargedObject
const xAOD::IParticle * chargedObject(std::size_t i) const
Definition: FlowElement_v1.cxx:127
xAOD::FlowElement_v1::ChargedUFO
@ ChargedUFO
Definition: FlowElement_v1.h:55
xAOD::FlowElement_v1::setChargedObjectLinks
void setChargedObjectLinks(const std::vector< ElementLink< IParticleContainer >> &elV)
xAOD::FlowElement_v1::setChargedObjectLinks
void setChargedObjectLinks(const std::vector< ElementLink< IParticleContainer >> &elV, const std::vector< float > &wV)
xAOD::FlowElement_v1::e
virtual double e() const override
The total energy of the particle.
Definition: FlowElement_v1.cxx:25
xAOD::FlowElement_v1::chargedObjects
std::vector< const xAOD::IParticle * > chargedObjects() const
Definition: FlowElement_v1.cxx:94
xAOD::FlowElement_v1::Combined
@ Combined
Definition: FlowElement_v1.h:39
xAOD::FlowElement_v1::Pileup
@ Pileup
Definition: FlowElement_v1.h:63
xAOD::FlowElement_v1::ChargedTCC
@ ChargedTCC
Definition: FlowElement_v1.h:52
xAOD::IParticle::IParticle
IParticle()=default
DataVector.h
An STL vector of pointers that by default owns its pointed-to elements.
xAOD::FlowElement_v1::eta
virtual double eta() const override
The pseudorapidity ( ) of the particle.
xAOD::FlowElement_v1::chargedObjectAndWeight
std::pair< const xAOD::IParticle *, float > chargedObjectAndWeight(std::size_t i) const
Definition: FlowElement_v1.cxx:133
xAOD::FlowElement_v1::p4
virtual FourMom_t p4() const override
The full 4-momentum of the particle.
Definition: FlowElement_v1.cxx:33
xAOD::FlowElement_v1::chargedObjectWeights
const std::vector< float > & chargedObjectWeights() const
xAOD::FlowElement_v1::otherObject
const xAOD::IParticle * otherObject(std::size_t i) const
Definition: FlowElement_v1.cxx:196
xAOD::FlowElement_v1::setP4
void setP4(float pt, float eta, float phi, float m)
Definition: FlowElement_v1.cxx:39
xAOD::FlowElement_v1::otherObjectWeights
const std::vector< float > & otherObjectWeights() const
Track
Definition: TriggerChamberClusterOnTrackCreator.h:21
xAODType::ObjectType
ObjectType
Type of objects that have a representation in the xAOD EDM.
Definition: ObjectType.h:32
xAOD::FlowElement_v1::Unknown
@ Unknown
Definition: FlowElement_v1.h:58
xAOD::FlowElement_v1::type
virtual Type::ObjectType type() const override
The type of the object as a simple enumeration.
Definition: FlowElement_v1.cxx:68
python.compressB64.c
def c
Definition: compressB64.py:93
xAOD::FlowElement_v1::NeutralUFO
@ NeutralUFO
Definition: FlowElement_v1.h:54
xAOD::FlowElement_v1::NeutralTCC
@ NeutralTCC
Definition: FlowElement_v1.h:51
xAOD::FlowElement_v1::otherObjects
std::vector< const xAOD::IParticle * > otherObjects() const
Definition: FlowElement_v1.cxx:163
xAOD::FlowElement_v1
A detector object made of other lower level object(s)
Definition: FlowElement_v1.h:25