11#include <tracking/spacePointCreation/MCVXDPurityInfo.h>
12#include <tracking/spacePointCreation/PurityCalculatorTools.h>
13#include <tracking/trackFindingVXD/filterMap/filterFramework/TBranchLeafType.h>
15#include <tracking/spacePointCreation/SpacePoint.h>
73 template<
class Var,
class RangeType>
75 typename Var::variableType fResult,
76 const RangeType& range,
77 const typename Var::argumentType&,
78 const typename Var::argumentType&,
79 const typename Var::argumentType&)
84 generalNotify<Var, RangeType>(fResult, range);
89 template<
class Var,
class RangeType>
91 typename Var::variableType fResult,
92 const RangeType& range,
93 const typename Var::argumentType&,
94 const typename Var::argumentType&)
99 generalNotify<Var, RangeType>(fResult, range);
112 template <
class Var,
class Range,
typename ... types >
115 auto varName = var.name();
117 auto newResult =
new double;
118 s_results.insert(std::make_pair(varName, newResult));
121 auto newAccepted =
new bool(
false);
125 auto newWasUsed =
new bool;
126 s_wasUsed.insert(std::make_pair(varName, newWasUsed));
168 std::vector<const Belle2::SpacePoint*> hits = {&
outerHit, &innerHit};
171 std::vector<Belle2::MCVXDPurityInfo> particlesFound;
174 auto purityPack = particlesFound.at(0).getPurity();
180 *(entry.second) =
false;
187 template <
typename ... types >
197 template <
typename ... types >
214 template<
class Var,
class RangeType>
216 const RangeType& range)
219 auto varName = Var().name();
220 *(
s_results.at(varName)) =
double(fResult);
this observer searches for mcParticles attached to the hits given and stores the information found to...
static bool initialize(Var var, Range, const types &...)
static method used by the observed object to initialize the observer.
static SpacePoint s_innerHitOfTwo
stores the inner hit of a two-hit-combination.
static int s_mainMCParticleID
dominating mcParticleID.
static std::map< std::string, bool * > s_wasAccepted
stores if hits were accepted (->value) for a selectionVariableName (->Key).
static TTree * s_ttree
a ttree to store all the collected data.
static bool initialize(TTree *attree)
version for 2-hit-combinations.
static void terminate(const types &...)
static method used by the observed object to terminate the observer.
ObserverCheckMCPurity()
empty constructor:
static double s_mainPurity
purity for the dominating particleID.
static void prepare(const SpacePoint &outerHit, const SpacePoint &innerHit)
static method used by the observed object to reset the stored values of the observer.
static SpacePoint s_centerHitOfThree
stores the center hit of a three-hit-combination.
static void notify(const Var &, typename Var::variableType fResult, const RangeType &range, const typename Var::argumentType &, const typename Var::argumentType &)
notifier which finds the mcParticles attached to given pair of spacePoints and determines the puritie...
static void generalNotify(typename Var::variableType fResult, const RangeType &range)
unified part of the notifier function.
static SpacePoint s_innerHitOfThree
stores the inner hit of a three-hit-combination.
static void notify(const Var &, typename Var::variableType fResult, const RangeType &range, const typename Var::argumentType &, const typename Var::argumentType &, const typename Var::argumentType &)
notifier which finds the mcParticles attached to given triplet of spacePoints and determines the puri...
static SpacePoint s_outerHitOfThree
stores the outer hit of a three-hit-combination.
static SpacePoint s_outerHitOfTwo
stores the outer hit of a two-hit-combination.
static std::map< std::string, double * > s_results
stores the results calculated (->value) for a selectionVariableName (->Key).
static void collect(const types &...)
fill the tree.
static std::map< std::string, bool * > s_wasUsed
stores if the filter was actually used this time (->value) for a selectionVariableName (->Key).
Represents a range of arithmetic types.
SpacePoint typically is build from 1 PXDCluster or 1-2 SVDClusters.
char TBranchLeafType(const char *)
Overloading TBranchLeafType to be able to get identifier 'C' for type char*.
static std::vector< Belle2::MCVXDPurityInfo > createPurityInfosVec(const std::vector< const Belle2::SpacePoint * > &spacePoints)
create a vector of MCVXDPurityInfos objects for a std::vector<Belle2::SpacePoints>.
B2Vector3D outerHit(0, 0, 0)
testing out of range behavior
Abstract base class for different kinds of events.