Belle II Software development
BremFindingMatchCompute Class Reference

Module to compute if an extrapolation to the ECL matches the position of an secondary ECLCLuster to find bremsstrahlung clusters. More...

#include <BremFindingMatchCompute.h>

Public Member Functions

 BremFindingMatchCompute (float clusterAcceptanceFactor, const ECLCluster *cluster, genfit::MeasuredStateOnPlane const &measuredStateOnPlane)
 Constructor for setting parameters.
 
bool isMatch ()
 Check if the angles of the cluster position and the extrapolation match.
 
double getDistanceHitCluster ()
 Return the difference between the angles of extrapolation and cluster position.
 
double getEffAcceptanceFactor ()
 Return the effective acceptance factor.
 

Private Attributes

float m_clusterAcceptanceFactor
 Factor which is multiplied onto the cluster position error to check for matches.
 
const ECLClusterm_eclCluster
 Bremsstrahlung cluster candidate gets stored here.
 
genfit::MeasuredStateOnPlane const & m_measuredStateOnPlane
 VXD hit.
 
double m_distanceHitCluster = 0
 Difference between the angles of extrapolation and cluster position.
 
double m_effAcceptanceFactor = -1
 The effective acceptance factor, needed to assign the radiation.
 

Detailed Description

Module to compute if an extrapolation to the ECL matches the position of an secondary ECLCLuster to find bremsstrahlung clusters.

Definition at line 26 of file BremFindingMatchCompute.h.

Constructor & Destructor Documentation

◆ BremFindingMatchCompute()

BremFindingMatchCompute ( float  clusterAcceptanceFactor,
const ECLCluster cluster,
genfit::MeasuredStateOnPlane const &  measuredStateOnPlane 
)
inline

Constructor for setting parameters.

Definition at line 31 of file BremFindingMatchCompute.h.

32 :
33 m_clusterAcceptanceFactor(clusterAcceptanceFactor),
34 m_eclCluster(cluster),
35 m_measuredStateOnPlane(measuredStateOnPlane)
36 {}
const ECLCluster * m_eclCluster
Bremsstrahlung cluster candidate gets stored here.
float m_clusterAcceptanceFactor
Factor which is multiplied onto the cluster position error to check for matches.
genfit::MeasuredStateOnPlane const & m_measuredStateOnPlane
VXD hit.

Member Function Documentation

◆ getDistanceHitCluster()

double getDistanceHitCluster ( )
inline

Return the difference between the angles of extrapolation and cluster position.

Definition at line 46 of file BremFindingMatchCompute.h.

double m_distanceHitCluster
Difference between the angles of extrapolation and cluster position.

◆ getEffAcceptanceFactor()

double getEffAcceptanceFactor ( )
inline

Return the effective acceptance factor.

Definition at line 51 of file BremFindingMatchCompute.h.

double m_effAcceptanceFactor
The effective acceptance factor, needed to assign the radiation.

◆ isMatch()

bool isMatch ( )

Check if the angles of the cluster position and the extrapolation match.

Definition at line 26 of file BremFindingMatchCompute.cc.

27{
28 auto fitted_state = m_measuredStateOnPlane;
29
30 ROOT::Math::XYZVector clusterPosition = m_eclCluster->getClusterPosition();
31
32 TVector3 position = fitted_state.getPos();
33 ROOT::Math::XYZVector positionDifference(
34 clusterPosition.X() - position.X(),
35 clusterPosition.Y() - position.Y(),
36 clusterPosition.Z() - position.Z());
37 TVector3 momentum = fitted_state.getMom();
38 ROOT::Math::XYZVector fitted_mom(momentum.X(), momentum.Y(), momentum.Z());
39
40 auto cov = fitted_state.get6DCov();
41 const double err_px = cov[3][3];
42 const double err_py = cov[4][4];
43 const double err_pz = cov[5][5];
44 const double px = fitted_mom.X();
45 const double py = fitted_mom.Y();
46 const double pz = fitted_mom.Z();
47
48 const double square_perp = px * px + py * py ;
49 const double perp = std::sqrt(square_perp);
50 const double square_sum = square_perp + pz * pz;
51
52 const double err_phi = std::sqrt(pow((py / square_perp), 2) * err_px + pow((px / square_perp), 2) * err_py +
53 (py / square_perp) * (px / square_perp) * cov[3][4]);
54 const double err_theta = std::sqrt(pow(((px * pz) / (square_sum * perp)), 2) * err_px +
55 pow(((py * pz) / (square_sum * perp)), 2) * err_py +
56 pow((perp / square_sum), 2) * err_pz +
57 ((px * pz) / (square_sum * perp)) * ((py * pz) / (square_sum * perp)) * cov[3][4] +
58 ((px * pz) / (square_sum * perp)) * (perp / square_sum) * cov[3][5] +
59 ((py * pz) / (square_sum * perp)) * (perp / square_sum) * cov[4][5]);
60
61 PhiAngle hitPhi(fitted_mom.Phi(), err_phi);
62 ThetaAngle hitTheta(fitted_mom.Theta(), err_theta);
63
64 PhiAngle clusterPhi(positionDifference.Phi(), m_eclCluster->getUncertaintyPhi());
65 ThetaAngle clusterTheta(positionDifference.Theta(), m_eclCluster->getUncertaintyTheta());
66
67 if (clusterPhi.containsIn(hitPhi, m_clusterAcceptanceFactor) &&
68 clusterTheta.containsIn(hitTheta, m_clusterAcceptanceFactor)) {
69
70 ROOT::Math::XYZVector hitV;
71 VectorUtil::setMagThetaPhi(
72 hitV, 1.0, hitTheta.getAngle(), hitPhi.getAngle());
73 ROOT::Math::XYZVector clusterV;
74 VectorUtil::setMagThetaPhi(
75 clusterV, 1.0, clusterTheta.getAngle(), clusterPhi.getAngle());
76
77 ROOT::Math::XYZVector distV = hitV - clusterV;
78
79 m_distanceHitCluster = distV.R();
80
81 // set the effective acceptance factor
82 double deltaTheta = abs(hitV.Y() - clusterV.Y());
83 m_effAcceptanceFactor = deltaTheta / (err_theta + m_eclCluster->getUncertaintyTheta());
84 double deltaPhi = abs(hitV.Z() - clusterV.Z());
85 double effFactor = deltaPhi / (err_phi + m_eclCluster->getUncertaintyPhi());
86 if (effFactor > m_effAcceptanceFactor) {
87 m_effAcceptanceFactor = effFactor;
88 }
89
90 return (true);
91
92 // todo: can use weight here to signal assigment confidence
93
94 } else {
95 return (false);
96 }
97}
double getUncertaintyTheta() const
Return Uncertainty on Theta of Shower.
Definition: ECLCluster.h:325
ROOT::Math::XYZVector getClusterPosition() const
Return ROOT::Math::XYZVector on cluster position (x,y,z)
Definition: ECLCluster.cc:44
double getUncertaintyPhi() const
Return Uncertainty on Phi of Shower.
Definition: ECLCluster.h:328

Member Data Documentation

◆ m_clusterAcceptanceFactor

float m_clusterAcceptanceFactor
private

Factor which is multiplied onto the cluster position error to check for matches.

Definition at line 56 of file BremFindingMatchCompute.h.

◆ m_distanceHitCluster

double m_distanceHitCluster = 0
private

Difference between the angles of extrapolation and cluster position.

Definition at line 71 of file BremFindingMatchCompute.h.

◆ m_eclCluster

const ECLCluster* m_eclCluster
private

Bremsstrahlung cluster candidate gets stored here.

Definition at line 61 of file BremFindingMatchCompute.h.

◆ m_effAcceptanceFactor

double m_effAcceptanceFactor = -1
private

The effective acceptance factor, needed to assign the radiation.

Definition at line 76 of file BremFindingMatchCompute.h.

◆ m_measuredStateOnPlane

genfit::MeasuredStateOnPlane const& m_measuredStateOnPlane
private

VXD hit.

Definition at line 66 of file BremFindingMatchCompute.h.


The documentation for this class was generated from the following files: