|
ATLAS Offline Software
|
#include <TruthClusterizationFactory.h>
|
| TruthClusterizationFactory (const std::string &name, const std::string &n, const IInterface *p) |
|
| ~TruthClusterizationFactory ()=default |
|
virtual StatusCode | initialize () |
|
virtual StatusCode | finalize () |
|
std::vector< double > | estimateNumberOfParticles (const InDet::PixelCluster &pCluster) const |
|
std::vector< Amg::Vector2D > | estimatePositions (const InDet::PixelCluster &) const |
|
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 |
|
|
ServiceHandle< IAthRNGSvc > | m_rndmSvc {this, "RndmSvc", "AthRNGSvc", "Random Number Service used in TruthClusterizationFactory"} |
|
Gaudi::Property< std::string > | m_rndmEngineName {this, "RndmEngine", "TruthClustering", "Random Engine Name"} |
|
ATHRNG::RNGWrapper * | m_rndmEngine {nullptr} |
|
Gaudi::Property< bool > | m_discardPUHits {this, "discardPUHits", true, "Discard PU hits for NN emulation"} |
|
Gaudi::Property< float > | m_truthClusterSplittingEff {this, "truthClusterSplittingEff", 0.9, "Cluster splitting effeciency"} |
|
◆ StoreGateSvc_t
◆ TruthClusterizationFactory()
InDet::TruthClusterizationFactory::TruthClusterizationFactory |
( |
const std::string & |
name, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~TruthClusterizationFactory()
InDet::TruthClusterizationFactory::~TruthClusterizationFactory |
( |
| ) |
|
|
default |
◆ 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()
◆ estimateNumberOfParticles()
std::vector< double > InDet::TruthClusterizationFactory::estimateNumberOfParticles |
( |
const InDet::PixelCluster & |
pCluster | ) |
const |
Definition at line 69 of file TruthClusterizationFactory.cxx.
71 const EventContext& ctx = Gaudi::Hive::currentContext();
78 std::vector<double> probabilities(3,0.);
79 const auto &rdos = pCluster.
rdoList();
80 unsigned int nPartContributing = 0;
83 std::set<int> uniqueIDs;
86 if(pixSdoColl.isValid()){
87 for (
auto rdoIter : rdos){
88 auto simDataIter = pixSdoColl->find(rdoIter);
89 if (simDataIter != pixSdoColl->end()){
91 auto simData = (simDataIter->second);
92 for(
const auto& deposit :
simData.getdeposits() ){
94 if (!deposit.first){
ATH_MSG_DEBUG(
"No deposits found");
continue;}
96 if (deposit.first.eventIndex() != 0)
continue;
97 uniqueIDs.insert(deposit.first.id());
104 nPartContributing = uniqueIDs.size();
111 std::set< std::pair<HepMcParticleLink::index_type, int> > uniqueIDs;
114 if(pixSdoColl.isValid()){
115 for (
auto rdoIter : rdos){
116 auto simDataIter = pixSdoColl->find(rdoIter);
117 if (simDataIter != pixSdoColl->end()){
119 auto simData = (simDataIter->second);
120 for(
const auto& deposit :
simData.getdeposits() ){
122 if (!deposit.first){
ATH_MSG_DEBUG(
"No deposits found");
continue;}
124 uniqueIDs.insert(std::make_pair(deposit.first.eventIndex(), deposit.first.id()));
131 nPartContributing = uniqueIDs.size();
134 ATH_MSG_VERBOSE(
"Smearing TruthClusterizationFactory probability output for TIDE studies");
137 if (nPartContributing<=1) {
139 probabilities[0] = 1.0;
142 else if (nPartContributing==2) {
146 else probabilities[0] = 1.0;
149 else if (nPartContributing>2) {
153 else probabilities[0] = 1.0;
156 return probabilities;
◆ estimatePositions()
Definition at line 160 of file TruthClusterizationFactory.cxx.
162 ATH_MSG_ERROR(
"TruthClusterizationFactory::estimatePositions called for ITk ambiguity setup, should never happen! Digital clustering should be run for positions & errors.");
◆ 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()
virtual StatusCode InDet::TruthClusterizationFactory::finalize |
( |
| ) |
|
|
inlinevirtual |
◆ initialize()
StatusCode InDet::TruthClusterizationFactory::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.
◆ interfaceID()
static const InterfaceID& InDet::TruthClusterizationFactory::interfaceID |
( |
| ) |
|
|
inlinestatic |
◆ 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_detStore
◆ m_discardPUHits
Gaudi::Property<bool> InDet::TruthClusterizationFactory::m_discardPUHits {this, "discardPUHits", true, "Discard PU hits for NN emulation"} |
|
protected |
◆ m_evtStore
◆ m_rndmEngine
◆ m_rndmEngineName
Gaudi::Property<std::string> InDet::TruthClusterizationFactory::m_rndmEngineName {this, "RndmEngine", "TruthClustering", "Random Engine Name"} |
|
protected |
◆ m_rndmSvc
◆ m_simDataCollectionName
◆ m_truthClusterSplittingEff
Gaudi::Property<float> InDet::TruthClusterizationFactory::m_truthClusterSplittingEff {this, "truthClusterSplittingEff", 0.9, "Cluster splitting effeciency"} |
|
protected |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
ServiceHandle< IAthRNGSvc > m_rndmSvc
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
Eigen::Matrix< double, 2, 1 > Vector2D
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
const std::vector< Identifier > & rdoList() const
return the List of rdo identifiers (pointers)
ATHRNG::RNGWrapper * m_rndmEngine
#define ATH_MSG_VERBOSE(x)
virtual void setOwner(IDataHandleHolder *o)=0
SG::ReadHandleKey< InDetSimDataCollection > m_simDataCollectionName
IncidentSvc to catch begining of event and end of event.
#define CHECK(...)
Evaluate an expression and check for errors.
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
A wrapper class for event-slot-local random engines.
Gaudi::Property< bool > m_discardPUHits
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
Gaudi::Property< float > m_truthClusterSplittingEff
Gaudi::Property< std::string > m_rndmEngineName
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
#define ATLAS_THREAD_SAFE
EventContext::ContextEvt_t evtSeeded() const
Return the event count at which the current slot was last seeded.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>