Belle II Software light-2406-ragdoll
SelectorCut Class Reference

Simple cut based selector for curl tracks taken from Belle note 1079. More...

#include <SelectorCut.h>

Inheritance diagram for SelectorCut:
Collaboration diagram for SelectorCut:

Public Member Functions

 SelectorCut (bool belleFlag)
 Constructor.
 
 ~SelectorCut ()
 Destructor.
 
virtual float getResponse (Particle *iPart, Particle *jPart) override
 Selector response that this pair of particles come from the same mc/actual particle.
 
virtual std::vector< float > getVariables (Particle *iPart, Particle *jPart) override
 returns vector of variables used by this selector.
 
virtual float getOptimalResponseCut ()
 returns optimal cut to use with selector
 
virtual void initialize ()
 initialise selector if needed
 
virtual void finalize ()
 finalise selector if needed
 
virtual void collectTrainingInfo (Particle *, Particle *)
 collect information for training for mva or other selectors
 

Private Attributes

double m_magDiffPCut
 cut for momentum magnitude difference
 
double m_sameChargePhiCut
 cut for angle between momenta of the two particles when they have the same charge
 
double m_oppositeChargePhiCut
 cut for angle between momenta of the two particles when they have the opposite charge
 

Detailed Description

Simple cut based selector for curl tracks taken from Belle note 1079.

Definition at line 24 of file SelectorCut.h.

Constructor & Destructor Documentation

◆ SelectorCut()

SelectorCut ( bool  belleFlag)
explicit

Constructor.

Definition at line 17 of file SelectorCut.cc.

18{
19 if (belleFlag) {
20 //BN1079 cuts
21 m_magDiffPCut = 0.1;
24 } else {
25 // TODO - update these with actual values. Is this even worth if switching to MVA anyway?
26 m_magDiffPCut = 0.1;
29 }
30
31}
double m_sameChargePhiCut
cut for angle between momenta of the two particles when they have the same charge
Definition: SelectorCut.h:44
double m_oppositeChargePhiCut
cut for angle between momenta of the two particles when they have the opposite charge
Definition: SelectorCut.h:47
double m_magDiffPCut
cut for momentum magnitude difference
Definition: SelectorCut.h:41

Member Function Documentation

◆ collectTrainingInfo()

virtual void collectTrainingInfo ( Particle ,
Particle  
)
inlinevirtualinherited

collect information for training for mva or other selectors

Reimplemented in SelectorMVA.

Definition at line 49 of file Selector.h.

49{};

◆ finalize()

virtual void finalize ( )
inlinevirtualinherited

finalise selector if needed

Reimplemented in SelectorMVA.

Definition at line 46 of file Selector.h.

46{};

◆ getOptimalResponseCut()

virtual float getOptimalResponseCut ( )
inlinevirtualinherited

returns optimal cut to use with selector

Reimplemented in SelectorMVA.

Definition at line 40 of file Selector.h.

40{return 0.5;};

◆ getResponse()

float getResponse ( Particle iPart,
Particle jPart 
)
overridevirtual

Selector response that this pair of particles come from the same mc/actual particle.

Implements Selector.

Definition at line 43 of file SelectorCut.cc.

44{
45 //Selection from BN1079
46 std::vector<float> variables = getVariables(iPart, jPart);
47 float chargeProduct = variables[0];
48 float magDiffP = variables[1];
49 float phi = variables[2];
50
51 if (magDiffP > m_magDiffPCut) {return 0.;}
52 if (chargeProduct > 0) {
53 if (phi < m_sameChargePhiCut * TMath::Pi() / 180) {return 1.;}
54 }
55 if (chargeProduct < 0) {
56 if (phi > m_oppositeChargePhiCut * TMath::Pi() / 180) {return 1.;}
57 }
58
59 return 0.;
60}
virtual std::vector< float > getVariables(Particle *iPart, Particle *jPart) override
returns vector of variables used by this selector.
Definition: SelectorCut.cc:35

◆ getVariables()

std::vector< float > getVariables ( Particle iPart,
Particle jPart 
)
overridevirtual

returns vector of variables used by this selector.

Not really useful here but included to be consistent with eventual MVA method.

Implements Selector.

Definition at line 35 of file SelectorCut.cc.

36{
37 float chargeProduct = iPart -> getCharge() * jPart -> getCharge();
38 float magDiffP = (iPart->getMomentum() - jPart->getMomentum()).R();
39 float phi = acos(iPart->getMomentum().Unit().Dot(jPart->getMomentum().Unit()));
40 return {chargeProduct, magDiffP, phi};
41}
ROOT::Math::XYZVector getMomentum() const
Returns momentum vector.
Definition: Particle.h:560

◆ initialize()

virtual void initialize ( )
inlinevirtualinherited

initialise selector if needed

Reimplemented in SelectorMVA.

Definition at line 43 of file Selector.h.

43{};

Member Data Documentation

◆ m_magDiffPCut

double m_magDiffPCut
private

cut for momentum magnitude difference

Definition at line 41 of file SelectorCut.h.

◆ m_oppositeChargePhiCut

double m_oppositeChargePhiCut
private

cut for angle between momenta of the two particles when they have the opposite charge

Definition at line 47 of file SelectorCut.h.

◆ m_sameChargePhiCut

double m_sameChargePhiCut
private

cut for angle between momenta of the two particles when they have the same charge

Definition at line 44 of file SelectorCut.h.


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