|
ATLAS Offline Software
|
#include <TruthIsolationTool.h>
|
| TruthIsolationTool (const std::string &t, const std::string &n, const IInterface *p) |
|
| ~TruthIsolationTool () |
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | addBranches () const override |
| Pass the thinning service
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 |
|
|
SG::ReadHandleKey< xAOD::TruthParticleContainer > | m_isoParticlesKey {this, "isoParticlesKey", "TruthParticles", "Name of TruthParticle key for input"} |
| Parameter: input collection key. More...
|
|
SG::ReadHandleKey< xAOD::TruthParticleContainer > | m_allParticlesKey {this, "allParticlesKey", "TruthParticles", "Name of Truthparticle key to find in iso cone"} |
| Parameter: input collection key for particles used in calculation. More...
|
|
SG::WriteDecorHandleKeyArray< xAOD::TruthParticleContainer, float > | m_isoDecorKeys {this, "DoNotSet_isoDecorKeys", {}, "WriteDecorHandleKeyArray - set internally but must be property"} |
| Decor handle key array. More...
|
|
Gaudi::Property< std::vector< float > > | m_coneSizes {this, "IsolationConeSizes", {0.2}, "Vector of sizes of dR cone in which to include particles"} |
| Parameter: Cone size for Isolation. More...
|
|
Gaudi::Property< bool > | m_chargedOnly {this, "ChargedParticlesOnly", false, "Only keep charged particles in isolation cone"} |
| Parameter: only use charged particles for iso? More...
|
|
Gaudi::Property< std::vector< int > > | m_listOfPIDs {this, "particleIDsToCalculate", {11,13,22}, "List of the pdgIDs of particles for which to calculate isolation"} |
| Parameter: List of pdgIDs of particles to dress. More...
|
|
Gaudi::Property< std::vector< int > > | m_excludeFromCone {this, "excludeIDsFromCone", {}, "List of the pdgIDs of particles to exclude from the cone when calculating isolation"} |
| Parameter: List of pdgIDs to exclude from cone calculation. More...
|
|
Gaudi::Property< std::string > | m_isoVarNamePrefix {this, "IsolationVarNamePrefix", "", "Prefix of name of the variable to add to output xAOD"} |
| Parameter: name of output variable. More...
|
|
Gaudi::Property< bool > | m_includeNonInteracting {this, "IncludeNonInteracting", false, "Include non-interacting particles in the isolation definition"} |
| Parameter: Include non-interacting particles? More...
|
|
Gaudi::Property< bool > | m_variableR {this, "VariableR", false, "Use radius that shrinks with pT in isolation"} |
| Parameter: Use variable radius? More...
|
|
std::vector< float > | m_coneSizesSort |
|
StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default) More...
|
|
StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) More...
|
|
std::vector< SG::VarHandleKeyArray * > | m_vhka |
|
bool | m_varHandleArraysDeclared |
|
◆ StoreGateSvc_t
◆ TruthIsolationTool()
TruthIsolationTool::TruthIsolationTool |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~TruthIsolationTool()
TruthIsolationTool::~TruthIsolationTool |
( |
| ) |
|
◆ addBranches()
StatusCode TruthIsolationTool::addBranches |
( |
| ) |
const |
|
overridevirtual |
Pass the thinning service
Even if this is with some dummy value
Implements DerivationFramework::IAugmentationTool.
Definition at line 54 of file DerivationFramework/DerivationFrameworkMCTruth/src/TruthIsolationTool.cxx.
57 const EventContext& ctx = Gaudi::Hive::currentContext();
61 if (!isoTruthParticles.isValid()) {
63 return StatusCode::FAILURE;
67 if (!allTruthParticles.isValid()) {
69 return StatusCode::FAILURE;
76 std::vector<const xAOD::TruthParticle*> listOfParticlesForIso;
80 std::vector<const xAOD::TruthParticle*> candidateParticlesList;
82 std::vector<int> emptyList;
86 std::vector<SG::WriteDecorHandle< xAOD::TruthParticleContainer, float > >
91 for (
unsigned int icone = 0; icone <
m_coneSizesSort.size(); ++icone ) {
92 for (
const auto part : *isoTruthParticles) {
93 decorator_iso.at(icone)(*part) = -1;
98 for (
const auto&
part : listOfParticlesForIso) {
100 calcIsos(
part, candidateParticlesList, isolationsCalcs);
101 for (
unsigned int icone = 0; icone <
m_coneSizesSort.size(); ++icone ) {
102 decorator_iso.at(icone)(*part) = isolationsCalcs.at(icone);
106 return StatusCode::SUCCESS;
◆ calcIsos()
◆ calculateDeltaR2()
◆ 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
◆ initialize()
StatusCode TruthIsolationTool::initialize |
( |
| ) |
|
|
overridevirtual |
◆ 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.
◆ interfaceID()
static const InterfaceID& DerivationFramework::IAugmentationTool::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
AlgTool interface methods.
Definition at line 31 of file IAugmentationTool.h.
31 {
return IID_IAugmentationTool; }
◆ 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.
◆ updateVHKA()
◆ m_allParticlesKey
◆ m_chargedOnly
Gaudi::Property<bool> DerivationFramework::TruthIsolationTool::m_chargedOnly {this, "ChargedParticlesOnly", false, "Only keep charged particles in isolation cone"} |
|
private |
◆ m_coneSizes
Gaudi::Property<std::vector<float> > DerivationFramework::TruthIsolationTool::m_coneSizes {this, "IsolationConeSizes", {0.2}, "Vector of sizes of dR cone in which to include particles"} |
|
private |
◆ m_coneSizesSort
std::vector<float> DerivationFramework::TruthIsolationTool::m_coneSizesSort |
|
private |
◆ m_detStore
◆ m_evtStore
◆ m_excludeFromCone
Gaudi::Property<std::vector<int> > DerivationFramework::TruthIsolationTool::m_excludeFromCone {this, "excludeIDsFromCone", {}, "List of the pdgIDs of particles to exclude from the cone when calculating isolation"} |
|
private |
◆ m_includeNonInteracting
Gaudi::Property<bool> DerivationFramework::TruthIsolationTool::m_includeNonInteracting {this, "IncludeNonInteracting", false, "Include non-interacting particles in the isolation definition"} |
|
private |
◆ m_isoDecorKeys
◆ m_isoParticlesKey
◆ m_isoVarNamePrefix
Gaudi::Property<std::string> DerivationFramework::TruthIsolationTool::m_isoVarNamePrefix {this, "IsolationVarNamePrefix", "", "Prefix of name of the variable to add to output xAOD"} |
|
private |
◆ m_listOfPIDs
Gaudi::Property<std::vector<int> > DerivationFramework::TruthIsolationTool::m_listOfPIDs {this, "particleIDsToCalculate", {11,13,22}, "List of the pdgIDs of particles for which to calculate isolation"} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_variableR
Gaudi::Property<bool> DerivationFramework::TruthIsolationTool::m_variableR {this, "VariableR", false, "Use radius that shrinks with pT in isolation"} |
|
private |
◆ m_vhka
The documentation for this class was generated from the following files:
double deltaEtaSq(const I4Momentum &p1, const I4Momentum &p2)
Computes efficiently .
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
std::string find(const std::string &s)
return a remapped string
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
setEt setPhi setE277 setWeta2 eta1
bool constructListOfFinalParticles(const xAOD::TruthParticleContainer *allParticles, std::vector< const xAOD::TruthParticle * > &selectedlist, const std::vector< int > &pdgId, bool allowFromHadron=false, bool chargedOnly=false) const
const std::string & key() const
Return the StoreGate ID for the referenced object.
bool is_same_particle(const T1 &p1, const T2 &p2)
Method to establish if two particles in the GenEvent actually represent the same particle.
virtual void setOwner(IDataHandleHolder *o)=0
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
double deltaPhiSq(const I4Momentum &pA, const I4Momentum &pB)
delta Phi squared in range ([-pi,pi[)^2 from two I4momentum references
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
bool isInteracting(const T &p)
Identify if the particle with given PDG ID would not interact with the detector, i....
float coneSize(IsolationConeSize type)
convert Isolation Size into cone size
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>