ATLAS Offline Software
Event/EventKernel/EventKernel/IParticle.h
Go to the documentation of this file.
1 // dear emacs, this is -*- C++ -*-
2 
3 /*
4  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef EVENTKERNEL_IPARTICLE_H
8 #define EVENTKERNEL_IPARTICLE_H 1
9 // //
11 // Interface for Particle-like objects //
12 // //
13 // Created by: Kyle Cranmer <kyle.cranmer@cern.ch> //
14 // //
15 // //
17 
18 #include "AthenaKernel/CLASS_DEF.h"
20 #include "AthLinks/ElementLink.h"
21 
22 #ifndef SIMULATIONBASE
23 #ifndef XAOD_ANALYSIS
24 // VxVertex includes
25 #include "VxVertex/VxContainer.h"
26 #endif
27 #endif
28 
29 // Forward declarations
30 namespace Trk { class RecVertex; }
31 
32 
35 namespace ParticleDataType {
36  enum DataType {Data = 0, Full = 1, FastShower = 2, Fast = 3, True = 4} ;
37 }
38 
40 typedef double ChargeType ;
41 
42 class IParticle : public virtual INavigable4Momentum
43 {
44  public:
45 
46  virtual ~IParticle();
47 
51  virtual ParticleDataType::DataType dataType() const = 0;
52 
54  virtual const Trk::RecVertex* origin() const = 0;
55 
56 #ifndef SIMULATIONBASE
57 #ifndef XAOD_ANALYSIS
58 
59  virtual const ElementLink<VxContainer>& originLink() const = 0;
60 #endif
61 #endif
62 
64  virtual bool hasCharge() const = 0;
65 
69  virtual ChargeType charge() const = 0;
70 
72  virtual bool hasPdgId() const = 0;
73 
76  virtual int pdgId() const = 0;
77 
78 };
79 
80 CLASS_DEF(IParticle, 154185086, 1)
81 #endif
IParticle::dataType
virtual ParticleDataType::DataType dataType() const =0
Return enum indicating real data, fast, or full simulation Return Type has a DataType enum with the f...
INavigable4Momentum.h
ParticleDataType::Data
@ Data
Definition: Event/EventKernel/EventKernel/IParticle.h:36
IParticle::~IParticle
virtual ~IParticle()
Definition: Event/EventKernel/src/IParticle.cxx:29
IParticle::origin
virtual const Trk::RecVertex * origin() const =0
Return a RecVertex corresponding to particle Origin
IParticle::charge
virtual ChargeType charge() const =0
returns charge as a typedef ChargeType currently Charge Type is a double for jets this may be changed...
ParticleDataType::DataType
DataType
Definition: Event/EventKernel/EventKernel/IParticle.h:36
Trk::RecVertex
Trk::RecVertex inherits from Trk::Vertex.
Definition: RecVertex.h:44
IParticle::originLink
virtual const ElementLink< VxContainer > & originLink() const =0
Return an ElementLink corresponding to particle's Origin.
IParticle::hasPdgId
virtual bool hasPdgId() const =0
method to check if particle id information is available
ParticleDataType::Fast
@ Fast
Definition: Event/EventKernel/EventKernel/IParticle.h:36
IParticle::pdgId
virtual int pdgId() const =0
Return enum indicating particle id the enum file is available in Event/EventKernel/PdtPdg....
VxContainer.h
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
ParticleDataType
Information about type of data used to fill particle.
Definition: Event/EventKernel/EventKernel/IParticle.h:35
ParticleDataType::True
@ True
Definition: Event/EventKernel/EventKernel/IParticle.h:36
ChargeType
double ChargeType
typedef ChargeType used to anticipate changes here
Definition: Event/EventKernel/EventKernel/IParticle.h:40
IParticle::hasCharge
virtual bool hasCharge() const =0
method to check if charge information is available
INavigable4Momentum
Definition: INavigable4Momentum.h:21
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
ParticleDataType::Full
@ Full
Definition: Event/EventKernel/EventKernel/IParticle.h:36
IParticle
Definition: Event/EventKernel/EventKernel/IParticle.h:43
CLASS_DEF.h
macros to associate a CLID to a type
ParticleDataType::FastShower
@ FastShower
Definition: Event/EventKernel/EventKernel/IParticle.h:36