Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
#include <PhotonTruthTool.h>
|
| PhotonTruthTool (const std::string &type, const std::string &name, const IInterface *parent) |
| Standard Gaudi tool constructor. More...
|
|
virtual StatusCode | initialize () |
| Standard Gaudi initialize method. More...
|
|
const xAOD::TruthParticle * | toTruthParticle (const xAOD::Photon &g) const |
| Go from a photon to a matching TruthParticle . More...
|
|
bool | getMCConv (const xAOD::TruthParticle *truePart, float &RconvMC, float &ZconvMC) const |
| Check a truth particle for a conversion. More...
|
|
bool | isPromptPhotonMC (const xAOD::TruthParticle *truePart) const |
| Test for a prompt photon. More...
|
|
bool | isPromptParticleMC (const xAOD::TruthParticle *truePart) const |
| Test for a prompt particle. More...
|
|
bool | isQuarkBremMC (const xAOD::TruthParticle *truePart) const |
| Test for a brem. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
Definition at line 33 of file PhotonTruthTool.h.
◆ StoreGateSvc_t
◆ PhotonTruthTool()
D3PD::PhotonTruthTool::PhotonTruthTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
Standard Gaudi tool constructor.
- Parameters
-
type | The name of the tool type. |
name | The tool name. |
parent | The tool's Gaudi parent. |
Definition at line 30 of file PhotonTruthTool.cxx.
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ getMCConv()
Check a truth particle for a conversion.
- Parameters
-
| truePart | The particle to check. |
[out] | RconvMC | Radius of the conversion. |
[out] | ZconvMC | Z of the conversion. |
- Returns
- True if this is a conversion; otherwise false.
Definition at line 76 of file PhotonTruthTool.cxx.
80 RconvMC = +9.999e+10 ;
81 ZconvMC = +9.999e+10 ;
82 if (!truePart)
return false;
85 if (!
v ||
v->nOutgoingParticles() < 2)
88 int pdgId = truePart->
pdgId();
96 if (
v->nOutgoingParticles() == 2 ) {
97 int pdgChild[2] = {0};
98 for (
unsigned u=0;
u<2 ; ++
u) {
101 pdgChild[
u] =
p->pdgId();
103 if ( pdgChild[0]+pdgChild[1]==0 && pdgChild[0]*pdgChild[1]==-121 ) {
109 else if ( std::abs(pdgId) == 11 ) {
111 if (
v->nIncomingParticles()==1 &&
v->nOutgoingParticles()==2 ) {
112 int pdgBrother[2] = {0};
113 for (
unsigned u=0 ;
u<2 ; ++
u ) {
116 pdgBrother[
u] =
p->pdgId();
118 if ( pdgBrother[0]+pdgBrother[1]==(22+pdgId) &&
119 pdgBrother[0]*pdgBrother[1]==(22*pdgId) )
◆ getMother()
Get the (first) mother particle of p.
Definition at line 253 of file PhotonTruthTool.cxx.
257 if (!
v ||
v->nIncomingParticles() == 0)
260 return v->incomingParticle(0);
◆ getMothers()
Return list of mother particles of p.
Definition at line 268 of file PhotonTruthTool.cxx.
270 std::vector<const xAOD::TruthParticle*>
out;
274 int n =
v->nIncomingParticles();
276 for (
int i = 0;
i <
n;
i++)
277 out.push_back (
v->incomingParticle(
i));
◆ getMotherVert()
Get the mother vertex for p.
Definition at line 233 of file PhotonTruthTool.cxx.
238 while (
v &&
v->nIncomingParticles() == 1 &&
239 v->incomingParticle(0)->pdgId() ==
p->pdgId())
241 p =
v->incomingParticle(0);
◆ initialize()
StatusCode D3PD::PhotonTruthTool::initialize |
( |
| ) |
|
|
virtual |
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ isFinalState()
Test for a final-state particle.
Definition at line 205 of file PhotonTruthTool.cxx.
207 if ( truePart ==
nullptr )
return false;
220 if (!
v)
return false;
221 if (
v->nOutgoingParticles()>0 ) {
◆ isFinalStatePhotonMC()
◆ isPromptParticleMC()
Test for a prompt particle.
Definition at line 143 of file PhotonTruthTool.cxx.
146 if ( truePart == 0 )
return false ;
147 const std::vector<const xAOD::TruthParticle*> mothers =
149 unsigned nmothers = mothers.size() ;
150 if ( nmothers == 0 ) {
154 else if ( nmothers == 1 ) {
158 int aPdgMother = abs(mothers[0]->pdgId());
159 return (( aPdgMother>=23 && aPdgMother<=39 ) || aPdgMother==5000039 ) ;
165 int nParentPartons = 0 ;
166 for (
unsigned u=0 ;
u<nmothers ; ++
u ) {
167 int pdgMother = mothers[
u]->pdgId() ;
168 if ( pdgMother==21 || ( std::abs(pdgMother)<7 && pdgMother!=0 ) )
171 return ( nParentPartons >= 1 ) ;
◆ isPromptPhotonMC()
◆ isQuarkBremMC()
Test for a brem.
Definition at line 179 of file PhotonTruthTool.cxx.
183 const std::vector<const xAOD::TruthParticle*> mothers =
185 if ( mothers.size() != 1 )
return false ;
186 int pdgMother = mothers[0]->pdgId() ;
187 return ( pdgMother==21 || ( std::abs(pdgMother)<7 && pdgMother!=0 ) ) ;
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ toTruthParticle()
◆ updateVHKA()
◆ m_classifier
◆ m_detStore
◆ m_evtStore
◆ m_rTruthConv
float D3PD::PhotonTruthTool::m_rTruthConv |
|
private |
◆ m_useG4Particles
bool D3PD::PhotonTruthTool::m_useG4Particles |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_zTruthConv
float D3PD::PhotonTruthTool::m_zTruthConv |
|
private |
The documentation for this class was generated from the following files:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
@ u
Enums for curvilinear frames.
virtual void setOwner(IDataHandleHolder *o)=0
bool is_simulation_particle(const T &p)
Method to establish if a particle (or barcode) was created during the simulation (TODO update to be s...
bool isElectron(const xAOD::Egamma *eg)
is the object an electron (not Fwd)
Class describing a truth particle in the MC record.
#define CHECK(...)
Evaluate an expression and check for errors.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
const TruthVertex_v1 * decayVtx() const
The decay vertex of this particle.
const TruthVertex_v1 * prodVtx() const
The production vertex of this particle.
Class describing a truth vertex in the MC record.
bool isStable(const T &p)
Identify if the particle is stable, i.e. has not decayed.
bool isPhoton(const xAOD::Egamma *eg)
is the object a photon
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
int pdgId() const
PDG ID code.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>