Var set used in the CKF for calculating the probability of a correct result, which knows the truth information if two tracks belong together or not.
More...
#include <PXDResultTruthVarSet.h>
|
using | Object |
| Type from which variables should be extracted.
|
|
|
bool | extract (const CKFToPXDResult *result) final |
| Generate and assign the variables from the object.
|
|
std::vector< Named< Float_t * > > | getNamedVariables (const std::string &prefix) override |
| Getter for the named references to the individual variables Base implementation returns empty vector.
|
|
std::vector< Named< Float_t * > > | getNamedVariables () |
| Getter for the named references to the individual variables.
|
|
MayBePtr< Float_t > | find (const std::string &varName) override |
| Pointer to the variable with the given name.
|
|
virtual bool | extract (const Object *obj) |
| Main method that extracts the variable values from the complex object.
|
|
bool | extract (const Object &obj) |
| Method for extraction from an object instead of a pointer.
|
|
std::map< std::string, Float_t > | getNamedValues (const std::string &prefix) const |
| Getter for a map of names to float values.
|
|
std::map< std::string, Float_t > | getNamedValues () const |
| Getter for a map of names to float values.
|
|
void | initialize () override |
| Receive and dispatch signal before the start of the event processing.
|
|
void | beginRun () override |
| Receive and dispatch signal for the beginning of a new run.
|
|
void | beginEvent () override |
| Receive and dispatch signal for the start of a new event.
|
|
void | endRun () override |
| Receive and dispatch signal for the end of the run.
|
|
void | terminate () override |
| Receive and dispatch Signal for termination of the event processing.
|
|
virtual void | exposeParameters (ModuleParamList *moduleParamList, const std::string &prefix) |
| Expose the set of parameters of the filter to the module parameter list.
|
|
|
Float_t | get () const |
| Getter for the value of the ith variable. Static version.
|
|
Float_t & | var () |
| Reference getter for the value of the ith variable. Static version.
|
|
AssignFinite< Float_t > | finitevar () |
| Reference getter for the value of the ith variable. Transforms non-finite values to finite value.
|
|
void | addProcessingSignalListener (ProcessingSignalListener *psl) |
| Register a processing signal listener to be notified.
|
|
int | getNProcessingSignalListener () |
| Get the number of currently registered listeners.
|
|
|
static constexpr int | named (const char *name) |
| Getter for the index from the name.
|
|
|
using | Super |
| Type of the super class.
|
|
|
static const size_t | nVars |
| Number of floating point values represented by this class.
|
|
Var set used in the CKF for calculating the probability of a correct result, which knows the truth information if two tracks belong together or not.
Definition at line 59 of file PXDResultTruthVarSet.h.
◆ Object
Type from which variables should be extracted.
Definition at line 44 of file VarSet.h.
◆ Super
Type of the super class.
Definition at line 40 of file VarSet.h.
◆ addProcessingSignalListener()
Register a processing signal listener to be notified.
Definition at line 53 of file CompositeProcessingSignalListener.cc.
56{
58}
Generic class that generates some named float values from a given object.
◆ beginEvent()
Receive and dispatch signal for the start of a new event.
Definition at line 36 of file CompositeProcessingSignalListener.cc.
32{
36 }
37}
void beginEvent() override
Receive and dispatch signal for the start of a new event.
virtual void beginEvent()
Receive signal for the start of a new event.
◆ beginRun()
Receive and dispatch signal for the beginning of a new run.
Definition at line 33 of file CompositeProcessingSignalListener.cc.
24{
28 }
29}
void beginRun() override
Receive and dispatch signal for the beginning of a new run.
virtual void beginRun()
Receive signal for the beginning of a new run.
◆ endRun()
Receive and dispatch signal for the end of the run.
Definition at line 39 of file CompositeProcessingSignalListener.cc.
40{
43 }
45}
void endRun() override
Receive and dispatch signal for the end of the run.
virtual void endRun()
Receive signal for the end of the run.
◆ exposeParameters()
virtual void exposeParameters |
( |
ModuleParamList * | moduleParamList, |
|
|
const std::string & | prefix ) |
|
inlinevirtualinherited |
Expose the set of parameters of the filter to the module parameter list.
- Parameters
-
moduleParamList | Module parameter list to add the new parameters to |
prefix | Prefix (or sometimes postfix) to be added to all nely added parameters. |
Definition at line 47 of file CompositeProcessingSignalListener.h.
◆ extract() [1/3]
Generate and assign the variables from the object.
Definition at line 16 of file PXDResultTruthVarSet.cc.
17{
18 const RecoTrack* seedTrack = result->getSeed();
19 if (not seedTrack) return false;
20
22 var<
named(
"truth_seed_number")>() = seedTrack->getArrayIndex();
23
24 const std::string& seedTrackStoreArrayName = seedTrack->getArrayName();
25
26 TrackMatchLookUp mcCDCMatchLookUp("MCRecoTracks", seedTrackStoreArrayName);
27 const RecoTrack* mcTrack = mcCDCMatchLookUp.getRelatedMCRecoTrack(*seedTrack);
28
29
30 var<
named(
"truth_number_of_correct_hits")>() = 0;
32 var<
named(
"truth_number_of_mc_pxd_hits")>() = 0;
33 var<
named(
"truth_number_of_mc_svd_hits")>() = 0;
34 var<
named(
"truth_number_of_mc_cdc_hits")>() = 0;
35
36 if (not mcTrack) {
37
38 return true;
39 }
40
41
42 const unsigned int numberOfCorrectHits =
m_mcUtil.getNumberOfCorrectPXDHits(mcTrack, result->getHits());
43
44 var<
named(
"truth_number_of_correct_hits")>() = numberOfCorrectHits;
45 var<
named(
"truth_number_of_mc_pxd_hits")>() = mcTrack->getNumberOfPXDHits();
46 var<
named(
"truth_number_of_mc_svd_hits")>() = mcTrack->getNumberOfSVDHits();
47 var<
named(
"truth_number_of_mc_cdc_hits")>() = mcTrack->getNumberOfCDCHits();
48
49 var<
named(
"truth")>() =
static_cast<double>(numberOfCorrectHits) /
static_cast<double>(mcTrack->getNumberOfPXDHits());
50
51 return true;
52}
MCUtil m_mcUtil
MC information used in the PXD CKF.
StoreObjPtr< EventMetaData > m_eventMetaData
Pointer to the object containing event number etc.
static constexpr int named(const char *name)
◆ extract() [2/3]
bool extract |
( |
const Object & | obj | ) |
|
|
inlineinherited |
Method for extraction from an object instead of a pointer.
Definition at line 57 of file BaseVarSet.h.
58 {
59 return extract(&obj);
60 }
◆ extract() [3/3]
virtual bool extract |
( |
const Object * | obj | ) |
|
|
inlinevirtualinherited |
Main method that extracts the variable values from the complex object.
Returns indication whether the extraction could be completed successfully. Base implementation returns always true.
- Parameters
-
- Returns
- : always true for the base implementation
Definition at line 51 of file BaseVarSet.h.
52 {
53 return true;
54 }
◆ find()
MayBePtr< Float_t > find |
( |
const std::string & | varName | ) |
|
|
inlineoverridevirtualinherited |
◆ finitevar()
AssignFinite< Float_t > finitevar |
( |
| ) |
|
|
inlineprotectedinherited |
Reference getter for the value of the ith variable. Transforms non-finite values to finite value.
Definition at line 130 of file VarSet.h.
131 {
132 static_assert(I < nVars, "Requested variable index exceeds number of variables.");
133 return AssignFinite<Float_t>(m_variables[I]);
134 }
◆ get()
Getter for the value of the ith variable. Static version.
Definition at line 85 of file VarSet.h.
86 {
87 static_assert(I < nVars, "Requested variable index exceeds number of variables.");
88 return m_variables.get(I);
89 }
◆ getNamedValues() [1/2]
std::map< std::string, Float_t > getNamedValues |
( |
| ) |
const |
|
inlineinherited |
Getter for a map of names to float values.
Definition at line 96 of file BaseVarSet.h.
97 {
98 const std::string prefix = "";
99 return this->getNamedValues(prefix);
100 }
◆ getNamedValues() [2/2]
std::map< std::string, Float_t > getNamedValues |
( |
const std::string & | prefix | ) |
const |
|
inlineinherited |
Getter for a map of names to float values.
- Parameters
-
prefix | Name prefix to apply to all variable names. |
Definition at line 84 of file BaseVarSet.h.
85 {
86 std::map<std::string, Float_t> result;
87 std::vector<Named<Float_t*> > namedVariables = this->getNamedVariables(prefix);
88 for (const Named<Float_t*>& namedVariable : namedVariables) {
89 Float_t* variable = namedVariable;
90 result[namedVariable.getName()] = *variable;
91 }
92 return result;
93 }
◆ getNamedVariables() [1/2]
std::vector< Named< Float_t * > > getNamedVariables |
( |
| ) |
|
|
inlineinherited |
Getter for the named references to the individual variables.
Definition at line 74 of file BaseVarSet.h.
75 {
76 const std::string prefix = "";
77 return this->getNamedVariables(prefix);
78 }
◆ getNamedVariables() [2/2]
std::vector< Named< Float_t * > > getNamedVariables |
( |
const std::string & | prefix | ) |
|
|
inlineoverridevirtualinherited |
◆ getNProcessingSignalListener()
int getNProcessingSignalListener |
( |
| ) |
|
|
protectedinherited |
◆ initialize()
Receive and dispatch signal before the start of the event processing.
Definition at line 30 of file CompositeProcessingSignalListener.cc.
16{
20 }
21}
void initialize() override
Receive and dispatch signal before the start of the event processing.
virtual void initialize()
Receive signal before the start of the event processing.
◆ named()
static constexpr int named |
( |
const char * | name | ) |
|
|
inlinestaticconstexprprotectedinherited |
Getter for the index from the name.
Looks through the associated names and returns the right index if found Returns nVars (one after the last element) if not found.
- Parameters
-
name | Name of the sought variable |
- Returns
- Index of the name, nVars if not found.
Definition at line 78 of file VarSet.h.
79 {
80 return index<nVars>(AVarNames::getName, name);
81 }
◆ terminate()
Receive and dispatch Signal for termination of the event processing.
Definition at line 42 of file CompositeProcessingSignalListener.cc.
48{
51 }
53}
void terminate() override
Receive and dispatch Signal for termination of the event processing.
virtual void terminate()
Receive Signal for termination of the event processing.
◆ var()
Reference getter for the value of the ith variable. Static version.
Definition at line 93 of file VarSet.h.
94 {
95 static_assert(I < nVars, "Requested variable index exceeds number of variables.");
96 return m_variables[I];
97 }
◆ m_eventMetaData
◆ m_initialized
◆ m_initializedAs
std::string m_initializedAs |
|
privateinherited |
◆ m_mcUtil
◆ m_subordinaryProcessingSignalListeners
◆ m_terminated
◆ m_variables
Memory for nVars floating point values.
Definition at line 138 of file VarSet.h.
◆ nVars
Number of floating point values represented by this class.
Definition at line 48 of file VarSet.h.
The documentation for this class was generated from the following files: