|
ATLAS Offline Software
|
#include <Truth3CollectionMaker.h>
|
| Truth3CollectionMaker (const std::string &t, const std::string &n, const IInterface *p) |
|
| ~Truth3CollectionMaker () |
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | finalize () override |
|
virtual StatusCode | addBranches () const override |
| Pass the thinning service
More...
|
|
StatusCode | initializeParser (const ExpressionParsing::SelectionArg< 1 > &selection_string) |
|
StatusCode | finalizeParser () |
|
virtual bool | updateDataNeeds (const std::vector< const DataObjID * > &input_data_in, const std::vector< const DataObjID * > &output_data_in, std::vector< Gaudi::DataHandle * > &new_input_handles, std::vector< Gaudi::DataHandle * > &new_output_handles) override |
| Inform a dynamic data consumer about all consumed or produced data. More...
|
|
virtual bool | renounceInput (const DataObjID &output_data_id) override |
|
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 23 of file Truth3CollectionMaker.h.
◆ StoreGateSvc_t
◆ Truth3CollectionMaker()
DerivationFramework::Truth3CollectionMaker::Truth3CollectionMaker |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~Truth3CollectionMaker()
DerivationFramework::Truth3CollectionMaker::~Truth3CollectionMaker |
( |
| ) |
|
◆ _initializeParser()
◆ addBranches()
StatusCode DerivationFramework::Truth3CollectionMaker::addBranches |
( |
| ) |
const |
|
overridevirtual |
Pass the thinning service
Implements DerivationFramework::IAugmentationTool.
Definition at line 86 of file Truth3CollectionMaker.cxx.
93 return StatusCode::FAILURE;
101 newParticleCollection->setStore( newParticleAuxCollection );
105 unsigned int nParticles = importedTruthParticles->
size();
122 if (nParticles !=
entries.size() ) {
123 ATH_MSG_ERROR(
"Sizes incompatible! Are you sure your selection string used TruthParticles?");
124 return StatusCode::FAILURE;
127 for (
unsigned int i=0;
i<nParticles; ++
i) {
142 if (parentPDGID==24 && parentMass < 20){
145 else if (parentPDGID!=24 && parentPDGID!=15){
148 else if (parentPDGID==15){
159 if (mcount > 10 || abs(mother_hold->
pdgId())!=24){
178 newParticleCollection->
push_back( xTruthParticle );
182 float mothermass = 0.;
186 motherPDGid = mother_hold->
pdgId();
187 mothermass = mother_hold->
p4().M()/1000.;
198 motherPDGid = mother_hold->
pdgId();
199 mothermass = mother_hold->
p4().M()/1000.;
203 *xTruthParticle=*theParticle;
205 originDecorator(*xTruthParticle) = motherPDGid;
206 typeDecorator(*xTruthParticle) = motherBarcode;
207 typeDecoratorMass(*xTruthParticle) = mothermass;
263 tauprongDecorator(*xTruthParticle) = nprong;
264 tautypeDecorator(*xTruthParticle) = islep;
271 for (
unsigned int i=0;
i<nParticles; ++
i){
275 return StatusCode::SUCCESS;
◆ 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
◆ finalize()
StatusCode DerivationFramework::Truth3CollectionMaker::finalize |
( |
| ) |
|
|
overridevirtual |
◆ finalizeParser()
◆ initialize()
StatusCode DerivationFramework::Truth3CollectionMaker::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 49 of file Truth3CollectionMaker.cxx.
55 ATH_MSG_FATAL(
"No truth particle collection provided to use as a basis for new collections");
56 return StatusCode::FAILURE;
60 ATH_MSG_FATAL(
"No key provided for the new truth particle collection");
61 return StatusCode::FAILURE;
66 return StatusCode::FAILURE;
73 return StatusCode::SUCCESS;
◆ initializeParser()
◆ 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()
◆ renounceInput()
◆ 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.
◆ updateDataNeeds()
virtual bool ExpressionParserUserBase< AthAlgTool , NUM_PARSER >::updateDataNeeds |
( |
const std::vector< const DataObjID * > & |
input_data_in, |
|
|
const std::vector< const DataObjID * > & |
output_data_in, |
|
|
std::vector< Gaudi::DataHandle * > & |
new_input_handles, |
|
|
std::vector< Gaudi::DataHandle * > & |
new_output_handles |
|
) |
| |
|
overridevirtualinherited |
Inform a dynamic data consumer about all consumed or produced data.
- Parameters
-
input_data_in | the input data object IDs of all algorithms and tools |
output_data_in | the output data object IDs of all algorithms and tools |
new_input_handles | the new input data handles added by this call |
new_output_handles | the new output data handles added by this call |
- Returns
- true if the consumer did update its handles, false otherwise
Implements IDynamicDataConsumer.
◆ updateVHKA()
◆ m_classifier
◆ m_collectionName
std::string DerivationFramework::Truth3CollectionMaker::m_collectionName |
|
private |
◆ m_detStore
◆ m_evtStore
◆ m_npasspart
std::atomic<unsigned int> DerivationFramework::Truth3CollectionMaker::m_npasspart |
|
private |
◆ m_ntotpart
std::atomic<unsigned int> DerivationFramework::Truth3CollectionMaker::m_ntotpart |
|
mutableprivate |
◆ m_parser
◆ m_particlesKey
std::string DerivationFramework::Truth3CollectionMaker::m_particlesKey |
|
private |
◆ m_partString
std::string DerivationFramework::Truth3CollectionMaker::m_partString |
|
private |
◆ m_proxyLoaders
◆ m_renounce
◆ m_runClassifier
bool DerivationFramework::Truth3CollectionMaker::m_runClassifier |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_xAODProxyLoader
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
std::string m_collectionName
StatusCode finalizeParser()
std::string m_particlesKey
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::conditional< NUM_PARSER==1, std::unique_ptr< ExpressionParsing::ExpressionParser >, std::array< std::unique_ptr< ExpressionParsing::ExpressionParser >, NUM_PARSER > >::type m_parser
void setBarcode(int value)
Set barcode.
constexpr int INVALID_PARTICLE_ID
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
#define ATH_MSG_VERBOSE(x)
std::atomic< unsigned int > m_ntotpart
virtual void setOwner(IDataHandleHolder *o)=0
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
bool isLepton() const
Whether the particle is a lepton.
Auxiliary store for the truth vertices.
bool hasDecayVtx() const
Check for a decay vertex on this particle.
TruthParticleAuxContainer_v1 TruthParticleAuxContainer
Declare the latest version of the truth particle auxiliary container.
Helper class to provide type-safe access to aux data.
Class describing a truth particle in the MC record.
TruthParticle_v1 TruthParticle
Typedef to implementation.
bool hasProdVtx() const
Check for a production vertex on this particle.
#define CHECK(...)
Evaluate an expression and check for errors.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
const TruthParticle_v1 * incomingParticle(size_t index) const
Get one of the incoming particles.
virtual void renounce()=0
StatusCode initializeParser(const ExpressionParsing::SelectionArg< 1 > &selection_string)
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
ElementLink implementation for ROOT usage.
const TruthVertex_v1 * prodVtx() const
The production vertex of this particle.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
std::atomic< unsigned int > m_npasspart
TruthParticleContainer_v1 TruthParticleContainer
Declare the latest version of the truth particle container.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
virtual FourMom_t p4() const override final
The full 4-momentum of the particle.
int pdgId() const
PDG ID code.
size_type size() const noexcept
Returns the number of elements in the collection.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
ToolHandle< IMCTruthClassifier > m_classifier