ThOr functors reference

Introduction

This page aims to be a comprehensive list of all ThOr functors currently in the source tree, alongside their parameters, C++ source files, and even matching LoKi functors!

Contributing

Want to improve functor documentation? This page is automatically generated from the Functors python package in the lhcb/Rec project. Additionally, any Sphinx-flavoured reStructuredText, if used in these docstrings, will be rendered on this page.

To make it easier to move from LoKi to ThOr, each ThOr functor entry on this page will list LoKi functors with known equivalent behaviour. If an entry is missing a LoKi functor equivalent that you know of, why not add it here?

Functors

ABS()

Evaluates the absolute value of a scalar quantity

C++ Representation

::Functors::Common::Abs{}

ABS_DELTA_MASS(particle_name: str)[source]

Get the absolute value of the difference between the reconstructed and the PDG mass (for reference see PDG_MASS()), e.g. ABS_DELTA_MASS(“J/psi(1S)”) < 10.*MeV

It expects a particle-like object as input.

Parameters

particle_name – string representation of the particle ID

ADDRESSOF()

Return address of input. E.g. for pointer comparison

C++ Representation

::Functors::Common::AddressOf{}

ADJUST_ANGLE()

Adjust angle if larger than pi

C++ Representation

::Functors::Common::AdjustAngle{}

ALL()

Accept everything; always evaluates to ‘true’.

C++ Representation

::Functors::AcceptAll{}

LoKi Equivalents
  • PTRUE

  • ATRUE

  • AALL

  • ALL

ALLPVX(Vertices: DataHandle)[source]

vector of x-coordinates of all primary vertices

Functor’s call operator does not require any input.

Parameters

Vertices – DataHandle of the primary vertices

ALLPVY(Vertices: DataHandle)[source]

vector of y-coordinates of all primary vertices

Functor’s call operator does not require any input.

Parameters

Vertices – DataHandle of the primary vertices

ALLPVZ(Vertices: DataHandle)[source]

vector of z-coordinates of all primary vertices

Functor’s call operator does not require any input.

Parameters

Vertices – DataHandle of the primary vertices

ALLPV_FD(Vertices: DataHandle)[source]

Calculate flight distance with respect to all specified primary vertices.

Functor’s call operator does not require any input.

Parameters

Vertices (DataHandle) – the input primary vertices

ALLPV_IP(Vertices: DataHandle)[source]

Calculate Impact Parameter with respect to all specified primary vertices.

Functor’s call operator does not require any input.

Parameters

Vertices (DataHandle) – the input primary vertices

ALV(Child1, Child2)

Compute the cosine value of angle between two decay products.

C++ Representation

::Functors::Combination::CosAngleBetweenDecayProducts

Parameters
  • Child1 (int) – Index [starting from 1] of the first child to consider.

  • Child2 (int) – Index [starting from 1] of the second child to consider.

ASYM(Functor: BoundFunctor, Relations: DataHandle) BoundFunctor[source]

Evaluates the asymmetry value between the application of the functor on the reference particle and the sum of the results of the application of the functor to each related particle

Parameters
  • Functor – The functor to apply to all the particles in the TO side of the table

  • Relations – DataHandle with the relation table

Returns

The value of the asymmetry, defined as (x-SUMCONE(x))/(x+SUMCONE(x)), with x as Functor

BACK()

Back element of range

C++ Representation

::Functors::Functional::Back{}

BEST_PV()

Given list of vertices, get best PV of particle.

C++ Representation

::Functors::Common::BestPV{}

BKGCAT(Relations: DataHandle) BoundFunctor[source]

Background category of composite particle.

Parameters

Relations – DataHandle with the relations table

Note: If no relations are present, value of -1 is returned

To understand the meaning of the background categories, please have a look at the following TWiki page

BPV(Vertices: Optional[DataHandle] = None)[source]

Determine Best Primary Vertex of a particle

Functor’s call operator expects a particle-like object.

Note

“Best” is chosen as the PV for which the particle has the smallest impact parameter (IP). Note that this is different to Run 1+2, where “best” was chosen based on IP chi^2. See also BEST_PV() functor for links to where this is defined in the code. See also final slide of final talk in https://indico.cern.ch/event/1361613/ for more details.

Parameters

Vertices – DataHandle of the vertices - if not provided will use OWNPV()

BPVCORRM(Vertices: Optional[DataHandle] = None)[source]

Compute the corrected mass of the composite using the BPV().

Functor’s call operator expects a composite like object

Args: Vertices: DataHandle of the primary vertices

BPVCORRMERR(Vertices: Optional[DataHandle] = None)[source]

Compute the corrected mass error of the composite using the BPV().

Functor’s call operator expects a composite like object

Parameters

Vertices – DataHandle of the primary vertices

BPVDIRA(Vertices: Optional[DataHandle] = None)[source]

Cosine of angle between particle momentum and flight direction (BPVFDVEC())

Functor’s call operator expects a particle-like object.

Parameters

Vertices – DataHandle of the vertices

BPVDLS(Vertices: Optional[DataHandle] = None)[source]

Decay length with respect to the BPV()

Functor’s call operator expects a particle-like object

Parameters

Vertices – DataHandle of the primary vertices

BPVETA(Vertices: Optional[DataHandle] = None)[source]

Eta (pseudorapidity) coordinate of the distance vector between ENDVERTEX_POS() and BPV_POS()

Functor’s call operator expects a particle-like object.

Parameters

Vertices – DataHandle of the vertices

BPVFD(Vertices: Optional[DataHandle] = None)[source]

Flight distance (magnitude of BPVFDVEC())

Functor’s call operator expects a particle-like object.

Parameters

Vertices – DataHandle of the vertices

BPVFDCHI2(Vertices: Optional[DataHandle] = None)[source]

FDCHI2 with respect to the BPV()

Functor’s call operator expects a particle-like object

Parameters

Vertices – DataHandle of the primary vertices

BPVFDIR(Vertices: Optional[DataHandle] = None)[source]

Normalized flight direction vector (unitvector of BPVFDVEC())

Functor’s call operator expects a particle-like object.

Parameters

Vertices – DataHandle of the vertices

BPVFDVEC(Vertices: Optional[DataHandle] = None)[source]

Distance vector between ENDVERTEX_POS() and BPV_POS()

Functor’s call operator expects a particle-like object.

Parameters

Vertices – DataHandle of the vertices

BPVIP(Vertices: Optional[DataHandle] = None)[source]

Impact parameter with respect to the BPV().

Functor’s call expects a particle-like object

Parameters

Vertices – DataHandle of the vertices

BPVIPCHI2(Vertices: Optional[DataHandle] = None)[source]

Impact parameter Chi2 with respect to the BPV(). More precisely that means the difference in the chi2 of the PV fit (of the BPV) between including and excluding the object the function is called on.

Functor’s call expects a particle-like object

Parameters

Vertices – DataHandle of the vertices

Note: Will use BPV relation if available.

BPVLTIME(Vertices: Optional[DataHandle] = None)[source]

Lifetime with respect to the BPV()

Functor’s call operator expects a particle-like object

Parameters

Vertices – DataHandle of the primary vertices

BPVVDRHO(Vertices: Optional[DataHandle] = None)[source]

Rho coordinate of the distance vector between ENDVERTEX_POS() and BPV_POS()

Functor’s call operator expects a particle-like object.

Parameters

Vertices – DataHandle of the vertices

BPVVDX(Vertices: Optional[DataHandle] = None)[source]

X distance between ENDVERTEX_POS() and BPV_POS()

Functor’s call operator expects a particle-like object.

Parameters

Vertices – DataHandle of the vertices

BPVVDY(Vertices: Optional[DataHandle] = None)[source]

Y distance between ENDVERTEX_POS() and BPV_POS()

Functor’s call operator expects a particle-like object.

Parameters

Vertices – DataHandle of the vertices

BPVVDZ(Vertices: Optional[DataHandle] = None)[source]

Z distance between ENDVERTEX_POS() and BPV_POS()

Functor’s call operator expects a particle-like object.

Parameters

Vertices – DataHandle of the vertices

BPVX(Vertices: Optional[DataHandle] = None)[source]

X position of BPV_POS()

Functor’s call operator expects a particle-like object.

Parameters

Vertices – DataHandle of the vertices

BPVY(Vertices: Optional[DataHandle] = None)[source]

Y position of BPV_POS()

Functor’s call operator expects a particle-like object.

Parameters

Vertices – DataHandle of the vertices

BPVZ(Vertices: Optional[DataHandle] = None)[source]

Z position of BPV_POS()

Functor’s call operator expects a particle-like object.

Parameters

Vertices – DataHandle of the vertices

BPV_POS(Vertices: Optional[DataHandle] = None)[source]

Position of BPV()

Functor’s call operator expects a particle-like object.

Parameters

Vertices – DataHandle of the vertices

BREMBENDCORR()

Correction factor accounting for bending biases in track due to brem.

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::BremBendCorr{}

BREMENERGY()

Brem momentum-recovery energy.

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::BremEnergy{}

BREMHYPODELTAX()

Test statistic of being first-state like of CaloHypo (photon) for brem recovery

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::BremHypoDeltaX{}

BREMHYPOENERGY()

Energy of CaloHypo (photon) associated to track for brem recovery.

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::BremHypoEnergy{}

BREMHYPOID()

All significant bits representation of CellID (32bits), i.e. CellID.all(), for CaloHypo (photon) associated to track for brem recovery 0 is invalid/unavailable (see Detector/Calo/include/Detector/Calo/CaloCellID.h)

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::BremHypoID{}

BREMHYPOMATCH_CHI2()

2D chi2 of CaloHypo (photon) associated to track for brem recovery

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::BremHypoMatch{}

BREMPIDE()

Brem-based DLL for electron-ID.

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::BremPIDe{}

BREMTRACKBASEDENERGY()

Track-based brem energy determination

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::BremTrackBasedEnergy{}

BTRACKING_BPVCORRM(HeavyFlavourTrackRelations: DataHandle)[source]

Compute the corrected mass of the composite using the associated heavy flavour track.

Functor’s call operator expects a composite like object

Parameters

HeavyFlavourTrackRelations – DataHandle of relations of composite to heavy flavour track

BTRACKING_NHITS(HeavyFlavourTrackRelations: DataHandle)[source]

Number of hits on heavy flavour track.

Functor’s call operator expects a composite like object

Parameters

HeavyFlavourTrackRelations – DataHandle of relations of composite to heavy flavour track

BTRACKING_NPRVELO3DEXPECT(HeavyFlavourTrackRelations: DataHandle)[source]

Number of crossed VELO sensors according to pattern recognition window.

Functor’s call operator expects a composite like object

Parameters

HeavyFlavourTrackRelations – DataHandle of relations of composite to heavy flavour track

BTRACKING_TRACK(HeavyFlavourTrackRelations: DataHandle)[source]

Returns heavy flavour track object associated to composite.

Functor’s call operator expects a composite like object

Parameters

HeavyFlavourTrackRelations – DataHandle of relations of composite to heavy flavour track

BUNCHCROSSING_ID(odin: DataHandle)[source]

Extracts bunch crossing id from ODIN

Functor’s call operator expects no input.

Parameters

odin – DataHandle of the odin bank

BUNCHCROSSING_TYPE(odin: DataHandle)[source]

Extracts bunch crossing type from ODIN

Functor’s call operator expects no input.

Parameters

odin – DataHandle of the odin bank

CALL(Row: int, Col: int)[source]

Return an element of a matrix :param Row: row of element :param Col: column of element

CALO_CLUSTER_MASS()

Retrieve the CALO cluster mass obtained from MergedPi0Alg.

Functor’s call operator expects an LHCb::Particle or ProtoParticle.

Note: Functor will return -1000 if protoparticle doesn’t have a NeutralPID object.

C++ Representation

::Functors::Neutral::ClusterMass_t{}

CALO_NEUTRAL_1TO9_ENERGY_RATIO()

Fraction of highest E cell (seed) to 9 (3x3) cells forming the cluster.

Functor’s call operator expects an LHCb::Particle or ProtoParticle.

Note: Functor will return -1000 if protoparticle doesn’t have a NeutralPID object.

C++ Representation

::Functors::Neutral::NeutralE19_t{}

CALO_NEUTRAL_4TO9_ENERGY_RATIO()

Fraction of highest 2x2 cell (seed) to 9 (3x3) cells forming the cluster.

Functor’s call operator expects an LHCb::Particle or ProtoParticle.

Note: Functor will return -1000 if protoparticle doesn’t have a NeutralPID object.

C++ Representation

::Functors::Neutral::NeutralE49_t{}

CALO_NEUTRAL_ECAL_ENERGY()

Retrieve the ECAL cluster energy associated to the neutral CaloHypo.

Functor’s call operator expects an LHCb::Particle or ProtoParticle.

Note: Functor will return -1000 if protoparticle doesn’t have a NeutralPID object.

C++ Representation

::Functors::Neutral::NeutralEcal_t{}

CALO_NEUTRAL_HCAL2ECAL_ENERGY_RATIO()

Retrieve the HCAL/ECAL energy ratio associated to the neutral CaloHypo, usually used to compute neutral PID.

Functor’s call operator expects an LHCb::Particle or ProtoParticle.

Note: Functor will return -1000 if protoparticle doesn’t have a NeutralPID object.

C++ Representation

::Functors::Neutral::NeutralHcal2Ecal_t{}

CALO_NEUTRAL_ID()

Retrieve bitwise information (32bits) of all CALO neutral seed CellIDs. 0 is invalid/unavailable (see Detector/Calo/include/Detector/Calo/CaloCellID.h)

Functor’s call operator expects an LHCb::Particle or ProtoParticle.

C++ Representation

::Functors::Neutral::NeutralID_t{}

CALO_NEUTRAL_SHOWER_SHAPE()

CaloID estimator: 2nd order moment of the cluster. Return the square of the width of the shower/cluster in the transverse plane

Functor’s call operator expects an LHCb::Particle or ProtoParticle.

Note: Functor will return -1000 if protoparticle doesn’t have a NeutralPID object.

C++ Representation

::Functors::Neutral::ShowerShape_t{}

CALO_NUM_SATURATED_CELLS()

ComposedBoundFunctor:

(
  VALUE_OR()
  @
  CALO_NUM_SATURATED_CELLS()
)
Python Representation

VALUE_OR(Value=-1000) @ CALO_NUM_SATURATED_CELLS

CAST_TO_INT()

Return argment as int

C++ Representation

::Functors::Functional::CastTo<int>{}

CHARGE()

Compute the charge

C++ Representation

::Functors::Combination::Charge{}

LoKi Equivalent
  • Q

CHI2()

Vertex or track chi^2.

Python Representation

VALUE_OR(Value=nan) @ _CHI2

LoKi Equivalents
CHI2DOF()

Vertex or track chi^2 per degrees of freedom.

Python Representation

VALUE_OR(Value=nan) @ _CHI2DOF

LoKi Equivalents
CHILD(Index, Functor)

Apply functor on a child.

Functor’s call operator expects a composite like object.

C++ Representation

::Functors::Adapters::Child

LoKi Equivalents
  • CHILD

  • ACHILD

Parameters
  • Index (int) – The index of the child to apply the functor to (starting from 1).

  • Functor (BoundFunctor) – The functor to apply on the child.

CLOSESTTOBEAM()

Returns a closest-to-beam state of a given track.

C++ Representation

::Functors::Track::ClosestToBeamState{}

CLUSTERID()

CellID.all() of the best matching cluster for a given reconstructed track. 0 is invalid/unavailable (see Detector/Calo/include/Detector/Calo/CaloCellID.h)

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::ClusterID{}

CLUSTERMATCH_CHI2()

CaloID estimator : 2D chi2 for Track/CaloCluster matching (neutral + charged).

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::ClusterMatch{}

COLUMN(ColumnLabel)

Returns T(‘label’) when acting on T.

C++ Representation

::Functors::Column_t

Parameters

ColumnLabel (str) – label

COMB(Functor: BoundFunctor, ChildContainers: Union[DataHandle, List[DataHandle]]) BoundFunctor[source]

Re-constructs a ‘combination’ object from a ‘composite’ object and returns the result of applying the given functor to that ‘combination’ object.

Functor’s call operator expects a composite like object.

Parameters
  • Functor – The functor to apply to the constructed combination

  • ChildContainers – Datahandles of child containers

COMB_FROM_COMP(Functor)

Re-constructs a ‘combination’ object from a ‘composite’ object and returns the result of applying the given functor to that ‘combination’ object.

Functor’s call operator expects a composite like object.

C++ Representation

::Functors::Adapters::CombinationFromComposite

Parameters

Functor (BoundFunctor) – The functor to apply to the ‘combination’ object.

COMB_MASS()

Evaluates the invariant mass of the sum of two 4-vectors.

Binary functor: Functor’s call operator expects two particle-like objects

Example:

>>> import Functors as F
>>> import Functors.math as fmath
>>> from Functors.tests.categories import dummy_data_particle_range
>>> from GaudiKernel.SystemOfUnits import MeV
>>> from PyConf.Algorithms import WeightedRelTableAlg
>>> alg = WeightedRelTableAlg(
>>>     InputCandidates = dummy_data_particle_range,
>>>     ReferenceParticles = dummy_data_particle_range,
>>>     Cut = fmath.in_range(500*MeV, F.COMB_MASS, 1000*MeV)
>>> alg.OutputRelations
DataHandle('/Event/WeightedRelTableAlg/OutputRelations')
Python Representation

MASS @ ( ( FOURMOMENTUM @ _FORWARDARGS(index=0) ) + ( FOURMOMENTUM @ _FORWARDARGS(index=1) ) )

COSANGLE()

Evaluates dot product of two unit vectors

C++ Representation

::Functors::Common::NormedDot{}

COV(Row: int, Col: int)[source]

Return an element of a track’s covariance TRACK_COVARIANCE(): (x,y,tx,ty,qop)

Parameters
  • Row – row of element

  • Col – column of element

DECISION(DecReports: DataHandle, trigger_line_name: str)[source]

Extract HLT event decision with respect to a given trigger line using selection DecReports

Functor’s call operator expects no input.

Parameters
  • trigger_line_name – Name of the trigger line

  • DecReports – DataHandle of the DecReports

DECREPORTS_FILTER(DecReports: DataHandle, Lines: List[str])[source]

Filter events depending on DecReports decision

Functor’s call operator expects no input.

Parameters
  • DecReports – DataHandle of the DecReports

  • Lines – List of line names

DECREPORTS_RE_FILTER(DecReports: DataHandle, Regex: str)[source]

Filter events depending on DecReports decision

Functor’s call operator expects no input.

Parameters
  • DecReports – DataHandle of the DecReports

  • Regex – regex to apply to line names

DETA()

Evaluates the difference between the pseudorapidity of two particles

Binary functor: Functor’s call operator expects two particle-like objects

Example:

>>> import Functors as F
>>> from Functors.tests.categories import dummy_data_particle_range
>>> from PyConf.Algorithms import WeightedRelTableAlg
>>> alg = WeightedRelTableAlg(
>>>     InputCandidates = dummy_data_particle_range,
>>>     ReferenceParticles = dummy_data_particle_range,
>>>     Cut = F.DETA < 0.2)
>>> alg.OutputRelations
DataHandle('/Event/WeightedRelTableAlg/OutputRelations')
Python Representation

( ETA_COORDINATE @ SLOPES @ _FORWARDARGS(index=0) ) - ( ETA_COORDINATE @ SLOPES @ _FORWARDARGS(index=1) )

LoKi Equivalent
  • DETA – Assumes inputs are charged basics

DOCA(Child1, Child2)

Compute the distance of closest approach between two track-like objects which may need transport over longer distances.

C++ Representation

::Functors::Combination::DistanceOfClosestApproach

LoKi Equivalent
  • ADOCA(x, y) \(\equiv\) Functors.DOCA(x, y) – Indices x and y are child indices (starting from one).

Parameters
  • Child1 (int) – Index [starting from 1] of the first child to consider.

  • Child2 (int) – Index [starting from 1] of the second child to consider.

DOCACHI2(Child1, Child2)

Compute the significance of the distance of closest approach between two track-like object which may need transport.

C++ Representation

::Functors::Combination::DistanceOfClosestApproachChi2

LoKi Equivalent
  • ACHI2DOCA(x, y) \(\equiv\) Functors.DOCACHI2(x, y) – Indices x and y are child indices (starting from one).

Parameters
  • Child1 (int) – Index [starting from 1] of the first child to consider.

  • Child2 (int) – Index [starting from 1] of the second child to consider.

DOT()

Dot product.

C++ Representation

::Functors::Common::Dot{}

DPHI()

Evaluates the difference between the phi angle of two particles

The difference is then adjusted in the range [-pi, pi] (see ADJUST_ANGLE())

Binary functor: Functor’s call operator expects two particle-like objects

Example:

>>> import Functors as F
>>> from Functors.tests.categories import dummy_data_particle_range
>>> from PyConf.Algorithms import WeightedRelTableAlg
>>> alg = WeightedRelTableAlg(
>>>     InputCandidates = dummy_data_particle_range,
>>>     ReferenceParticles = dummy_data_particle_range,
>>>     Cut = F.DPHI < 0.2)
>>> alg.OutputRelations
DataHandle('/Event/WeightedRelTableAlg/OutputRelations')
Python Representation

ADJUST_ANGLE @ ( ( PHI_COORDINATE @ SLOPES @ _FORWARDARGS(index=0) ) - ( PHI_COORDINATE @ SLOPES @ _FORWARDARGS(index=1) ) )

LoKi Equivalent
  • DPHI – Assumes inputs are charged basics

DR2()

Evaluates the dr2 between two particles, defined as DETA^2+DPHI^2

Binary functor: Functor’s call operator expects two particle-like objects

Example:

>>> import Functors as F
>>> from Functors.tests.categories import dummy_data_particle_range
>>> from PyConf.Algorithms import WeightedRelTableAlg
>>> alg = WeightedRelTableAlg(
>>>     InputCandidates = dummy_data_particle_range,
>>>     ReferenceParticles = dummy_data_particle_range,
>>>     Cut = F.DR2 < 0.4)
>>> alg.OutputRelations
DataHandle('/Event/WeightedRelTableAlg/OutputRelations')
Python Representation

( ( ( ETA_COORDINATE @ SLOPES @ _FORWARDARGS(index=0) ) - ( ETA_COORDINATE @ SLOPES @ _FORWARDARGS(index=1) ) ) * ( ( ETA_COORDINATE @ SLOPES @ _FORWARDARGS(index=0) ) - ( ETA_COORDINATE @ SLOPES @ _FORWARDARGS(index=1) ) ) ) + ( ( ADJUST_ANGLE @ ( ( PHI_COORDINATE @ SLOPES @ _FORWARDARGS(index=0) ) - ( PHI_COORDINATE @ SLOPES @ _FORWARDARGS(index=1) ) ) ) * ( ADJUST_ANGLE @ ( ( PHI_COORDINATE @ SLOPES @ _FORWARDARGS(index=0) ) - ( PHI_COORDINATE @ SLOPES @ _FORWARDARGS(index=1) ) ) ) )

LoKi Equivalent
  • DELTAR2 – Assumes inputs are charged basics

ECALPIDE()

Ecal-based DLL for electron-ID.

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::EcalPIDe{}

ECALPIDMU()

Ecal-based DLL for mu-ID.

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::EcalPIDmu{}

ELECTRONENERGY()

Cluster energy associated to CaloHypo (charged)

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::ElectronEnergy{}

ELECTRONID()

All significant bits representation of CellID (32bits), i.e. CellID.all(), associated to CaloHypo seed (electron hypo) 0 is invalid/unavailable (see Detector/Calo/include/Detector/Calo/CaloCellID.h)

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::ElectronID{}

ELECTRONMATCH_CHI2()

CaloID estimator : 3D chi2 for Track/CaloHypo(e) matching (charged).

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::ElectronMatch{}

ELECTRONSHOWERDLL()

Summed per-cell E/p DLL (electron versus pion) with track-based cell selection and energy estimation.

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::ElectronShowerDLL{}

ELECTRONSHOWEREOP()

Electron energy/momentum with track-based cell selection.

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::ElectronShowerEoP{}

ENDVERTEX()

Get the endvertex of an object.

C++ Representation

::Functors::Common::EndVertex{}

ENDVERTEX_POS()

Get the 3-vector position of the ENDVERTEX() of a particle.

Functor’s call operator expects a particle-like object.

Python Representation

TOLINALG @ POSITION @ ENDVERTEX

END_VRHO()

Get the rho-coordinate of the ENDVERTEX() of a particle.

Functor’s call operator expects a particle-like object.

Python Representation

RHO_COORDINATE @ TOLINALG @ POSITION @ ENDVERTEX

END_VX()

Get the X-coordinate of the ENDVERTEX() of a particle.

Functor’s call operator expects a particle-like object.

Python Representation

X_COORDINATE @ TOLINALG @ POSITION @ ENDVERTEX

LoKi Equivalent
  • VX

END_VY()

Get the Y-coordinate of the ENDVERTEX() of a particle.

Functor’s call operator expects a particle-like object.

Python Representation

Y_COORDINATE @ TOLINALG @ POSITION @ ENDVERTEX

LoKi Equivalent
  • VY

END_VZ()

Get the Z–coordinate of the ENDVERTEX() of a particle.

Functor’s call operator expects a particle-like object.

Python Representation

Z_COORDINATE @ TOLINALG @ POSITION @ ENDVERTEX

LoKi Equivalent
  • VZ

ENERGY()

Get the energy (see FOURMOMENTUM() for definition).

Functor’s call expects a particle-like object

Python Representation

E_COORDINATE @ FOURMOMENTUM

LoKi Equivalent
  • E

ENTRY_WITH_MAX_REL_VALUE_OF(Functor)

Return an entry in the list which corresponds to the maximum value of the functor. If X is the original list and F(X) is the result of the functor F, this returns element x for which F(X) is a maximum i.e. x = argmax F(X)

C++ Representation

::Functors::Functional::EntryWithMaxRelatedValueOf

Parameters

Functor (BoundFunctor) – The functor to apply for the evaluation of the max.

ENTRY_WITH_MIN_REL_VALUE_OF(Functor)

Return an entry in the list which corresponds to the minimum value of the functor. If X is the original list and F(X) is the result of the functor F, this returns element x for which F(X) is a minimum i.e. x = argmin F(X)

C++ Representation

::Functors::Functional::EntryWithMinRelatedValueOf

Parameters

Functor (BoundFunctor) – The functor to apply for the evaluation of the min.

ETA()

Get the eta (pseudorapidity) coordinate of a slope (see SLOPES() for definition).

Functor’s call expects a particle-like object

Python Representation

ETA_COORDINATE @ SLOPES

LoKi Equivalent
  • ETA – Assumes input objects are charged basics (they have an associated track).

ETA_COORDINATE()

Get eta coordinate (pseudorapidity). Functor to be used in composition.

C++ Representation

::Functors::Common::Eta_Coordinate{}

EVENTNUMBER(odin: DataHandle)[source]

Extracts event number from ODIN

Functor’s call operator expects no input.

Parameters

odin – DataHandle of the odin bank

EVENTTYPE(odin: DataHandle)[source]

Extracts event type from ODIN

Functor’s call operator expects no input.

Parameters

odin – DataHandle of the odin bank

E_COORDINATE()

Get E coordinate. Functor to be used in composition.

C++ Representation

::Functors::Common::E_Coordinate{}

FILTER(Functor)

Adapt a predicate to filter a container.

C++ Representation

::Functors::Filter

Parameters

Functor (BoundFunctor) – Predicate to filter the container with.

FIND_DECAY(DecayDesc)

Use the DecayFinder algorithm to get a list of particles in the reconstructed decay

Functor’s call expects a particle-like object

C++ Representation

::Functors::Decay::FindDecay

Parameters

DecayDesc (str) – Decay descriptor

FIND_IN_TREE()

Check whenever a basic particle (from InputCandidates) is inside a decay tree of a composite one (from ReferenceParticles).

Binary functor: Functor’s call operator expects two particle-like objects

Args: Vertices: DataHandle of the vertices

Example:

>>> import Functors as F
>>> from PyConf.Algorithms import WeightedRelTableAlg
>>> from Functors.tests.categories import dummy_data_particle_range, dummy_data_pv_container
>>> alg = WeightedRelTableAlg(name='WeightedRelTableAlg_FINDINTREE', InputCandidates = dummy_data_particle_range, ReferenceParticles = dummy_data_particle_range, Cut = F.FIND_IN_TREE())
>>> alg.OutputRelations
DataHandle('/Event/WeightedRelTableAlg_FINDINTREE/OutputRelations')
C++ Representation

Functors::bind( ::Functors::Functional::MapAnyOf( /* The predicate functor to map over a range. */ operator==( Functors::chain( ::Functors::Particle::GetTrack{}, ::Functors::Particle::GetProtoParticle{}, ::Functors::Common::ForwardArgs<0>(  ) ), Functors::chain( ::Functors::Particle::GetTrack{}, ::Functors::Particle::GetProtoParticle{}, ::Functors::Common::ForwardArgs<1>(  ) ) ) ), Functors::chain( ::Functors::Adapters::BasicsFromCompositeV1{}, ::Functors::Common::ForwardArgs<0>(  ) ), ::Functors::Common::ForwardArgs<1>(  ) )

FIND_MCDECAY(MCDecayDesc)

Use the MCDecayFinder algorithm to get a list of MCParticles in the decay

Functor’s call expects MCParticle

C++ Representation

::Functors::Decay::FindMCDecay

Parameters

MCDecayDesc (str) – Monte Carlo decay descriptor

FORWARDARG0()

Forward the first argument.

Note: For reference, have a look at FORWARDARGS()

C++ Representation

::Functors::Common::ForwardArgs<0>(  )

FORWARDARG1()

Forward the second argument

Note: For reference, have a look at FORWARDARGS()

C++ Representation

::Functors::Common::ForwardArgs<1>(  )

FORWARDARG2()

Forward the third argument

Note: For reference, have a look at FORWARDARGS()

C++ Representation

::Functors::Common::ForwardArgs<2>(  )

FORWARDARGS()

Forward all the arguments. It can be used in binding operation for composed functors with argument. While binding, one (or more) argument is fixed and all the other will be forwarded.

Example: The call operator of BPV(), which is composed as BEST_PV.bind(TES(Vertices), FORWARDARGS), expects two arguments: list of primary vertices and a reconstructed particle. The bind fixes the first argument to the output of the TES() functor and FORWARDARGS() functor simply forwards all other arguments (in this instance the reconstructed particle).

C++ Representation

::Functors::Common::ForwardArgs

Parameters

index (TemplateParameter-<lambda>) – Nth argument to forward. If not specified all arguments will be forwarded.

FOURMOMENTUM()

4-Momentum vector.

C++ Representation

::Functors::Track::FourMomentum{}

FRONT()

Front element of range

C++ Representation

::Functors::Functional::Front{}

GET_ALL_BASICS()

Returns all basic particles.

Functor’s call operator expects a composite like object.

Note: If the functor is applied to a basic particle, it will throw an exception.

C++ Representation

::Functors::Adapters::BasicsFromCompositeV1{}

GET_ALL_DESCENDANTS()

Returns all descendants. The descendants include intermediate (composite) and final (basic) states.

Functor’s call operator expects a composite like object.

Note: If the functor is applied to a basic particle, it will throw an exception.

C++ Representation

::Functors::Adapters::DescendantsFromCompositeV1{}

GET_CHILDREN()

Get the first generation of descendants (see GET_GENERATION() for definition).

Functor’s call operator expects a composite like object.

C++ Representation

::Functors::Adapters::GenerationFromCompositeV1( /* The generation of the children. Generation 1 are direct children, Generation 2 are grandchildren and so on. */ std::integral_constant<int, 1>{} )

GET_GENERATION(Generation)

Returns all descendants belonging to a given generation.

Functor’s call operator expects a composite like object.

Note: If the functor is applied to a basic particle, it will throw an exception.

C++ Representation

::Functors::Adapters::GenerationFromCompositeV1

Parameters

Generation (int) – The generation of the children. Generation 1 are direct children, Generation 2 are grandchildren and so on.

GET_GRANDCHILDREN()

Get the second generation of descendants (see GET_GENERATION() for definition).

Functor’s call operator expects a composite like object.

C++ Representation

::Functors::Adapters::GenerationFromCompositeV1( /* The generation of the children. Generation 1 are direct children, Generation 2 are grandchildren and so on. */ std::integral_constant<int, 2>{} )

GHOSTPROB()

Track ghost probability (see TRACK() for definition).

Functor’s call operator expects a ChargedBasic

Python Representation

VALUE_OR(Value=nan) @ _GHOSTPROB @ TRACK

LoKi Equivalent
  • TrGHOSTPROB

GPSTIME(odin: DataHandle)[source]

Extracts gps time from ODIN

Functor’s call operator expects no input.

Parameters

odin – DataHandle of the odin bank

HASBREM()

Has non-zero brem momentum-recovery energy.

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::HasBrem{}

HASBREMADDED()

Has non-zero brem momentum-recovery energy added (using Particle class flag).

Functor’s call operator expects a particle-like object in v1 event model.

C++ Representation

::Functors::Track::HasBremAdded{}

HAS_VALUE()

Return true if the input has a valid value.

C++ Representation

::Functors::Functional::HasValue{}

HCALEOP()

Hcal energy deposit over momentum (track)

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::HcalEoP{}

HCALPIDE()

Hcal-based DLL for electron-ID.

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::HcalPIDe{}

HCALPIDMU()

Hcal-based DLL for mu-ID.

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::HcalPIDmu{}

IDENTITY()

Returns the same value.

C++ Representation

::Functors::Identity_t{}

INBREM()

In Brem acceptance.

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::InBrem{}

INECAL()

In Ecal acceptance.

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::InEcal{}

INGENERATION(Predicate: Functor, Depth: int)[source]

Requires there is a particle in a decay tree satisfying the predicate at the given depth (see GET_GENERATION() for definition)

Functor’s call operator expects composite particle-like input.

Parameters
  • Predicate – Predicate to filter the decay tree

  • Depth – Number of the correspondent generation (1-children, 2-grandchildren, …)

INHCAL()

In Hcal acceptance.

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::InHcal{}

INMUON()

InAcceptance. Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::InAcceptance{}

LoKi Equivalent
  • INMUON

INTREE(Predicate: Functor)[source]

Requires there is a particle in a decay tree satisfying the predicate (see GET_ALL_DESCENDANTS() for definition)

Functor’s call operator expects composite particle-like input.

Parameters

Predicate – Predicate to filter the decay tree

INT_CALO_NUM_SATURATED_CELLS()

Retrieve the number of saturated cells.

Functor’s call operator expects LHCb::Particle or ProtoParticle.

Note: Since the return is an int, it is necessary to add a custom invalid_value through F.VALUE_OR(invalid_value) @…. Can be done manually in each usage or with below functor CALO_NUM_SATURATED_CELLS.

C++ Representation

::Functors::Neutral::Saturation_t{}

IP()

Calculate IP between vertex and state position. The first implicit argument type is a three-vector position.

C++ Representation

::Functors::Common::ImpactParameter{}

LoKi Equivalent
  • IP

IPCHI2()

Calculate IP Chi2 between vertex and state position. The first implicit argument type is a vertex.

C++ Representation

::Functors::Common::ImpactParameterChi2{}

LoKi Equivalents
  • IPCHI2

  • CHI2IP

ISBASICPARTICLE()

IsBasicParticle. Returns the ‘isBasicParticle’ of the Particle object.

C++ Representation

::Functors::Particle::IsBasicParticle{}

ISMUON()

IsMuon. Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::IsMuon{}

LoKi Equivalent
  • ISMUON

ISMUONTIGHT()

IsMuonTight. Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::IsMuonTight{}

IS_ABS_ID(particle_name: str)[source]

Check if particle ABSID matches the specific abs(ID) (string representation). Both are compared by the absolute values, e.g. IS_ABS_ID(“pi+”) is equivalent to IS_ABS_ID(“pi-“)

For reference have a look at PARTICLE_PROPERTY()

It expects a particle-like object as input

Parameters

particle_name – string representation of the particle ID

IS_ID(particle_name: str)[source]

Check if particle ID matches the specific ID (string representation, e.g. IS_ID(“pi+”) ).

For reference have a look at PARTICLE_PROPERTY() It expect a particle-like object as input

Parameters

particle_name – string representation of the particle ID

IS_NOT_H()

MLP-based neutralID - anti-hadron ID

Functor’s call operator expects an LHCb::Particle or ProtoParticle.

Note: Functor will return -1000 if protoparticle doesn’t have a NeutralPID object.

C++ Representation

::Functors::Neutral::IsNotH_t{}

IS_PHOTON()

Gamma/Pi0 separation variable (neutral)

Functor’s call operator expects an LHCb::Particle or ProtoParticle.

Note: Functor will return -1000 if protoparticle doesn’t have a NeutralPID object.

C++ Representation

::Functors::Neutral::IsPhoton_t{}

IS_TIS(trigger_line: str, P2TisTosTable: DataHandle)[source]

Check if the trigger result for a particle is TIS for a given trigger line

Parameters
  • trigger_line – Name of the trigger line

  • P2TisTosTable – DataHandle which is the output of “HltTisTosAlg” algorithm

IS_TOS(trigger_line: str, P2TisTosTable: DataHandle)[source]

Check if the trigger result for a particle is TOS for a given trigger line

Parameters
  • trigger_line – Name of the trigger line

  • P2TisTosTable – DataHandle which is the output of “HltTisTosAlg” algorithm

MAGNITUDE()

Get magnitude of vector.

C++ Representation

::Functors::Common::Magnitude{}

MAP(Functor)

Map a functor over a range

C++ Representation

::Functors::Functional::Map

Parameters

Functor (BoundFunctor) – The functor to map over a range.

MAP_ALL_OF(Functor)

Map a predicate over range, early stopping if one value is false

C++ Representation

::Functors::Functional::MapAllOf

Parameters

Functor (BoundFunctor) – The predicate functor to map over a range.

MAP_ANY_OF(Functor)

Map a predicate over range, early stopping if one value is true

C++ Representation

::Functors::Functional::MapAnyOf

Parameters

Functor (BoundFunctor) – The predicate functor to map over a range.

MAP_INPUT(Functor: BoundFunctor, Relations: DataHandle) BoundFunctor[source]

Map the input object to the related object (via relations table) and apply functor to it.

Parameters
  • Functor – The functor to apply to the particle

  • Relations – Datahandle of the relations table

MAP_INPUT_ARRAY(Functor: BoundFunctor, Relations: DataHandle) BoundFunctor[source]

Create a map with the relations between the input candidate and a vector of output particles.

Parameters

Functor – The functor to apply to the particle

MAP_INPUT_SIZE(Relations: DataHandle) BoundFunctor[source]

Return the size of mapped object

Parameters

Relations – Datahandle of the relations table

Get the related object from the input object (via relations table).

Parameters

Relations – Datahandle of the relations table

MAP_WEIGHT(Relations: DataHandle) BoundFunctor[source]

Map the input object to the weights of related objects via relations table.

Parameters

Relations – Datahandle of the relations table

MASS()

Get the particle (composite or basic) mass.

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::Composite::Mass{}

LoKi Equivalents
  • AM

  • AM0

  • M

  • AMASS

MASSWITHHYPOTHESES(Masses)

Invariant mass of a combined particle given child mass hypotheses.

Functor’s call operator expects a composite like object.

C++ Representation

::Functors::Composite::MassWithHypotheses

Parameters

Masses (tuple) – Masses of the children

MASS_WITH_BREM()

Get invariant mass of a particle with brem correction

Python Representation

MASS @ WITH_BREM

MATH_ERROR()

Returns the error of Gaudi::Math::ValueWithError

C++ Representation

::Functors::LHCbMath::ValueWithError::Error{}

MATH_INVARIANT_MASS()

Returns the scalar momentum by input.invariantMass()

C++ Representation

::Functors::LHCbMath::invariantMass{}

MATH_SCALAR_MOMENTUM()

Returns the scalar momentum by input.scalarMomentum()

C++ Representation

::Functors::LHCbMath::scalarMomentum{}

MATH_VALUE()

Returns the value of Gaudi::Math::ValueWithError

C++ Representation

::Functors::LHCbMath::ValueWithError::Value{}

MAX(Functor)

Calculate the maximum of the given functor value.

Functor’s call operator expects a composite like object.

C++ Representation

::Functors::Adapters::Maximum

LoKi Equivalent
  • AMAXCHILD

Parameters

Functor (BoundFunctor) – The functor to find the maximum return value of.

MAXCONE(Functor: BoundFunctor, Relations: DataHandle) BoundFunctor[source]

Evaluates the maximum element of the results of the application of the functor to each particle on the TO side of the table

Parameters
  • Functor – The functor to apply to all the related particles

  • Relations – DataHandle with the relation table

Returns

The max of the mapped functor

MAXDOCA()

Compute the maximum pairwise distance of closest approach between members of a combination using IDistanceCalculator.

C++ Representation

::Functors::Combination::MaxDistanceOfClosestApproach{}

MAXDOCACHI2()

Compute the maximum pairwise significance of the distance of closest approach, computed using an IDistanceCalculator implementation, between members of a combination.

C++ Representation

::Functors::Combination::MaxDistanceOfClosestApproachChi2{}

MAXDOCACHI2CUT(thresh)

Cut on the significance of the distance of closest approach between two track-like object which may need transport.

C++ Representation

::Functors::Combination::MaxDistanceOfClosestApproachChi2Cut

LoKi Equivalent
  • ACUTDOCACHI2

Parameters

thresh (float) – Threshold for cut

MAXDOCACUT(thresh)

Cut on the the distance of closest approach between two track-like objects which may need transport.

C++ Representation

::Functors::Combination::MaxDistanceOfClosestApproachCut

LoKi Equivalent
  • ACUTDOCA

Parameters

thresh (float) – Threshold for cut

MAXSDOCA()

Compute the maximum pairwise distance of closest approach between members of a combination.

C++ Representation

::Functors::Combination::MaxSDistanceOfClosestApproach{}

MAXSDOCACHI2()

Compute the maximum pairwise significance of the distance of closest approach between members of a combination.

C++ Representation

::Functors::Combination::MaxSDistanceOfClosestApproachChi2{}

MAXSDOCACHI2CUT(thresh)

Cut on the significance of the distance of closest approach between two ‘states’.

C++ Representation

::Functors::Combination::MaxSDistanceOfClosestApproachChi2Cut

Parameters

thresh (float) – Threshold for cut

MAXSDOCACUT(thresh)

Cut on the the distance of closest approach between two ‘states’.

C++ Representation

::Functors::Combination::MaxSDistanceOfClosestApproachCut

Parameters

thresh (float) – Threshold for cut

MAXTREE(Predicate: Functor, Functor: Functor)[source]

Evaluates the maximal value of the applied functor through a decay tree (see GET_ALL_DESCENDANTS() for definition)

Functor’s call operator expects composite particle-like input.

Parameters
  • Predicate – Predicate to filter the decay tree

  • Functor – Functor to apply

MAX_ELEMENT()

Maximum element of range

C++ Representation

::Functors::Functional::Max{}

MC_ALLPVS(mc_header: DataHandle)[source]

Return all MC primary vertices from MC Header

Parameters

mc_header (DataHandle) – The MC header

Returns

all MC primary vertices

MC_EVTNUMBER(mc_header: DataHandle)[source]

Return event number from MC Header

Parameters

mc_header (DataHandle) – The MC header

Returns

event number from MC Header

MC_EVTTIME(mc_header: DataHandle)[source]

Return event time from MC Header

Parameters

mc_header (DataHandle) – The MC header

Returns

event time from MC Header

MC_FIRST_LONGLIVED_ANCESTOR(MinLifetime)

Get the first longlived ancestor.

Functor’s call operator expects a MCParticle.

C++ Representation

::Functors::Simulation::MC::FirstLongLivedAncestor

Parameters

MinLifetime (float) – minimum lifetime of long-lived particles (ns)

MC_ISPROMPT(max_lifetime=1e-07)[source]

Determine whenever a decay originates from prompt charm based on the true lifetime of its ancestors.

Functor’s call operator expects a MCParticle.

Parameters

max_lifetime (float) – maximum lifetime of short-lived particles (ns). Defaults to 1e-7 ns.

MC_LIFETIME()

Get the lifetime of a MCParticle.

Python Representation

VALUE_OR(Value=nan) @ _MC_LIFETIME

MC_MOTHER(Generation: int, Functor: BoundFunctor)[source]

Apply functor on mother.

Functor’s call operator expects a MCParticle.

Parameters
  • Generation (int) – The generation of the mother. Generation 1 is simply Mother, Generation 2 is Grandmother and so on.

  • Functor (BoundFunctor) – The functor to apply on the mother.

Returns

Composite functor that apply certain functor on the mother of an MCParticle.

Return type

BoundFunctor

MC_ORIGINFLAG()

Get the true origin type of a tagging MCParticle.

C++ Representation

::Functors::Simulation::MC::OriginFlag{}

MC_ORIGINVERTEX()

Get the origin vertex of a MCParticle.

C++ Representation

::Functors::Simulation::MC::OriginVertex{}

MC_PRIMARYVERTEX()

Get the primary vertex of a MCParticle.

C++ Representation

::Functors::Simulation::MC::PrimaryVertex{}

MC_PROPERTY(mc_track_info: DataHandle)[source]

Retrieve the MCProperty object from MCTrackInfo object.

Functor’s call expects MCParticle

Parameters

mc_track_info – DataHandle of the MC track info

MC_PV_VX()

Get the (true) x position of the primary vertex of a MCParticle.

Python Representation

X_COORDINATE @ POSITION @ MC_PRIMARYVERTEX

MC_PV_VY()

Get the (true) y position of the primary vertex of a MCParticle.

Python Representation

Y_COORDINATE @ POSITION @ MC_PRIMARYVERTEX

MC_PV_VZ()

Get the (true) z position of the primary vertex of a MCParticle.

Python Representation

Z_COORDINATE @ POSITION @ MC_PRIMARYVERTEX

MC_RECONSTRUCTED()

MC Reconstructed category

Functor’s call expects MCParticle

C++ Representation

::Functors::Track::MC_Reconstructed{}

MC_RECONSTRUCTIBLE()
Get the MC Reconstructible category code:
-1: NoClassification

0: OutsideAcceptance 1: NotReconstructible 2: ChargedLong 3: ChargedDownstream 4: ChargedUpstream 5: ChargedTtrack 6: ChargedVelo

50: Neutral

Python Representation

CAST_TO_INT @ _MC_RECONSTRUCTIBLE

LoKi Equivalent
  • MCREC

MC_TRACKINFO(Flag)

Has Flag in property

Functor’s call expects MCParticle

C++ Representation

::Functors::Simulation::CheckMask

Parameters

Flag (int) – The flag

MC_VTX_ISDECAY()

Returns true if the MCVertex is a primary vertex.

C++ Representation

::Functors::Simulation::MCVertex::IsDecay{}

MC_VTX_ISPRIMARY()

Returns true if the MCVertex is a decay vertex.

C++ Representation

::Functors::Simulation::MCVertex::IsPrimary{}

MC_VTX_PRODUCTS()

Get all decay products of a MCVertex.

C++ Representation

::Functors::Simulation::MCVertex::Products{}

MC_VTX_TIME()

Get the time of a MCVertex.

C++ Representation

::Functors::Simulation::MCVertex::Time{}

MC_VTX_TYPE()

Get the type code of a MCVertex, the type code is defined as following: | Type | Code | | ———————– | —- | | Unknown | 0 | | ppCollision | 1 | | DecayVertex | 2 | | OscillatedAndDecay | 3 | | StringFragmentation | 4 | | HadronicInteraction | 100 | | Bremsstrahlung | 101 | | PairProduction | 102 | | Compton | 103 | | DeltaRay | 104 | | PhotoElectric | 105 | | Annihilation | 106 | | RICHPhotoElectric | 107 | | Cerenkov | 108 | | RichHpdBackScat | 109 | | GenericInteraction | 110 | | LHCHalo | 200 | | MuonBackground | 300 | | MuonBackgroundFlat | 301 | | MuonBackgroundSpillover | 302 | | WorldLimit | 400 | | KinematicLimit | 401 |

Python Representation

CAST_TO_INT @ _MC_VTX_TYPE

MIN(Functor)

Calculate the minimum of the given functor value.

Functor’s call operator expects a composite like object.

C++ Representation

::Functors::Adapters::Minimum

LoKi Equivalent
  • AMINCHILD

Parameters

Functor (BoundFunctor) – The functor to find the minimum return value of.

MINCONE(Functor: BoundFunctor, Relations: DataHandle) BoundFunctor[source]

Evaluates the minimum element of the results of the application of the functor to each particle on the TO side of the table

Parameters
  • Functor – The functor to apply to all the related particles

  • Relations – DataHandle with the relation table

Returns

The min of the mapped functor

MINIP(Vertices: DataHandle)[source]

Miniumum impact parameter with respect to the given vertices.

Functor’s call expects a particle-like object

Parameters

Vertices – DataHandle of the vertices

MINIPCHI2(Vertices: DataHandle)[source]

Miniumum impact parameter chi2 with respect to the given vertices.

Functor’s call expects a particle-like object

Parameters

Vertices – DataHandle of the vertices

MINIPCHI2CUT(Vertices: DataHandle, IPChi2Cut: float)[source]

Require the minimum impact parameter chi2 w.r.t. any of the given vertices is greater than the threshold IPChi2Cut.

Functor’s call expects a particle-like object

Parameters
  • Vertices – DataHandle of the vertices

  • IPCut – threshold cut (float)

MINIPCUT(Vertices: DataHandle, IPCut: float)[source]

Require the minimum impact parameter w.r.t. any of the given Vertices is greater than the threshold IPCut.

Functor’s call expects a particle-like object

Parameters
  • Vertices – DataHandle of the vertices

  • IPCut – threshold cut (float)

MINTREE(Predicate: Functor, Functor: Functor)[source]

Evaluates the minimal value of the applied functor through a decay tree (see GET_ALL_DESCENDANTS() for definition)

Functor’s call operator expects composite particle-like input.

Parameters
  • Predicate – Predicate to filter the decay tree

  • Functor – Functor to apply

MIN_ELEMENT()

Miniumum element of range

C++ Representation

::Functors::Functional::Min{}

MOM_POS_COV_MATRIX()

Get the covariance matrix for (px, py, pz, pe) x (x, y, z): [(x,px), (x,py), (x,pz), (x,pe)] [(y,px), (y,py), (y,pz), (y,pe)] [(z,px), (z,py), (z,pz), (z,pe)]

C++ Representation

::Functors::Particle::momPosCovMatrix{}

MTDOCACHI2(Child: int, Vertices: DataHandle)[source]

Compute the significance of the distance of closest approach between mother and child.

Functor’s call operator expects a composite like object

Parameters
  • Child – the index number (int) of the first child to consider

  • Vertices – DataHandle of the primary vertices

MUONCATBOOST()

CatBoost. Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::MuonCatBoost{}

MUONCHI2CORR()

MuonChi2Corr. Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::MuonChi2Corr{}

MUONLLBG()

MuonLLBg. Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::MuonLLBg{}

MUONLLMU()

MuonLLMu. Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::MuonLLMu{}

MVA(Config, Inputs)

Evaluate an MVA.

C++ Representation

::Functors::MVA

Parameters
  • Config (dict) – MVA config

  • Inputs (dict) – MVA inputs

  • MVAType (TemplateParameter-mva_impl_formatter) – The MVA implementation to use

NDOF()

Number of degrees of freedom [for chi2]

C++ Representation

::Functors::Track::nDoF{}

LoKi Equivalent
  • VDOF

NFTHITS()

Number of FT hits.

Functor’s call operator expects a track-like object.

C++ Representation

::Functors::Track::nFTHits{}

NHITS()

Track number of hits.

Functor’s call operator expects a track-like object.

C++ Representation

::Functors::Track::nHits{}

NINGENERATION(Predicate: Functor, Depth: int)[source]

Evaluates the number of particles in a decay tree satisfying the predicate at the given depth (see GET_GENERATION() for definition)

Functor’s call operator expects composite particle-like input.

Parameters
  • Predicate – Predicate to filter the decay tree

  • Depth – Number of the correspondent generation (1-children, 2-grandchildren, …)

NINTREE(Predicate: Functor)[source]

Evaluates the number of particles in a decay tree satisfying the predicate (see GET_ALL_DESCENDANTS() for definition)

Functor’s call operator expects composite particle-like input.

Parameters

Predicate – Predicate to filter the decay tree

NONE()

Accept nothing; always evaluates to ‘false’.

C++ Representation

::Functors::AcceptNone{}

LoKi Equivalents
  • NONE

  • AFALSE

  • ANONE

NORMEDDOT()

Evaluates dot product of two unit vectors

C++ Representation

::Functors::Common::NormedDot{}

NPRVELO3DEXPECT()

Number of expected Velo clusters from VELO 3D pattern recognition.

Functor’s call operator expects a track-like object.

C++ Representation

::Functors::Track::nPRVelo3DExpect{}

NUTHITS()

Number of UT hits.

Functor’s call operator expects a track-like object.

C++ Representation

::Functors::Track::nUTHits{}

NVPHITS()

Number of VP hits.

Functor’s call operator expects a track-like object.

C++ Representation

::Functors::Track::nVPHits{}

OBJECT_KEY()

Key of the KeyedObject.

C++ Representation

::Functors::TES::ObjectKey{}

LoKi Equivalents
  • MCVKEY

  • PKEY

  • TrKEY

  • KEY

ODINTCK(odin: DataHandle)[source]

Extracts ODIN TCK from ODIN

Functor’s call operator expects no input.

Parameters

odin – DataHandle of the odin bank

ORIGIN_VX()

Get the x position of the origin vertex of a MCParticle.

Python Representation

X_COORDINATE @ POSITION @ MC_ORIGINVERTEX

ORIGIN_VY()

Get the y position of the origin vertex of a MCParticle.

Python Representation

Y_COORDINATE @ POSITION @ MC_ORIGINVERTEX

ORIGIN_VZ()

Get the z position of the origin vertex of a MCParticle.

Python Representation

Z_COORDINATE @ POSITION @ MC_ORIGINVERTEX

OWNPV()

Get PV associated to particle.

C++ Representation

::Functors::Common::OwnPV{}

OWNPVCORRM()

Corrected mass of the composite using the OWNPV()

C++ Representation

Functors::bind( ::Functors::Composite::CorrectedMass{}, ::Functors::Common::OwnPV{}, ::Functors::Common::ForwardArgs<>(  ) )

OWNPVCORRMERR()

Corrected mass error of the composite using the OWNPV()

C++ Representation

Functors::bind( ::Functors::Composite::CorrectedMassError{}, ::Functors::Common::OwnPV{}, ::Functors::Common::ForwardArgs<>(  ) )

OWNPVDIRA()

Direction angle between the three-momentum of a particle and its OWNPVFDVEC()

C++ Representation

Functors::bind( ::Functors::Common::NormedDot{}, ::Functors::Track::ThreeMomentum{}, operator-( Functors::chain( ::Functors::Common::ToLinAlg{}, ::Functors::Common::Position{}, ::Functors::Common::EndVertex{} ), Functors::chain( ::Functors::Common::ToLinAlg{}, ::Functors::Common::Position{}, ::Functors::Common::OwnPV{} ) ) )

OWNPVDLS()

Decay length significance with respect to the OWNPV()

C++ Representation

Functors::bind( ::Functors::Composite::ComputeDecayLengthSignificance{}, ::Functors::Common::OwnPV{}, ::Functors::Common::ForwardArgs<>(  ) )

OWNPVETA()

Eta-coordinate of OWNPVFDVEC()

Python Representation

ETA_COORDINATE @ ( ( TOLINALG @ POSITION @ ENDVERTEX ) - ( TOLINALG @ POSITION @ OWNPV ) )

OWNPVFD()

Distance between the endvertex position and the position of the PV associated to a particle

Python Representation

MAGNITUDE @ ( ( TOLINALG @ POSITION @ ENDVERTEX ) - ( TOLINALG @ POSITION @ OWNPV ) )

OWNPVFDCHI2()

Flight distance chi2 with respect to the OWNPV()

C++ Representation

Functors::bind( ::Functors::Composite::FlightDistanceChi2ToVertex{}, ::Functors::Common::OwnPV{}, ::Functors::Common::ForwardArgs<>(  ) )

OWNPVFDIR()

Unity vector of OWNPVFDVEC()

Python Representation

UNITVECTOR @ ( ( TOLINALG @ POSITION @ ENDVERTEX ) - ( TOLINALG @ POSITION @ OWNPV ) )

OWNPVFDVEC()

Three-vector distance between the endvertex position and the position of the PV associated to a particle

Python Representation

( TOLINALG @ POSITION @ ENDVERTEX ) - ( TOLINALG @ POSITION @ OWNPV )

OWNPVIP()

Impact parameter with respect to the OWNPV()

C++ Representation

Functors::bind( ::Functors::Common::ImpactParameter{}, Functors::chain( ::Functors::Common::ToLinAlg{}, ::Functors::Common::Position{}, ::Functors::Common::OwnPV{} ), ::Functors::Common::ForwardArgs<>(  ) )

OWNPVIPCHI2()

Impact parameter chi2 with respect to the OWNPV()

C++ Representation

Functors::bind( ::Functors::Common::ImpactParameterChi2{}, ::Functors::Common::OwnPV{}, ::Functors::Common::ForwardArgs<>(  ) )

OWNPVLTIME()

Lifetime with respect to the OWNPV()

C++ Representation

Functors::bind( ::Functors::Composite::Lifetime{}, ::Functors::Common::OwnPV{}, ::Functors::Common::ForwardArgs<>(  ) )

OWNPVVDRHO()

Rho-coordinate of OWNPVFDVEC()

Python Representation

RHO_COORDINATE @ ( ( TOLINALG @ POSITION @ ENDVERTEX ) - ( TOLINALG @ POSITION @ OWNPV ) )

OWNPVVDX()

Distance along the x-axis between the endvertex and the PV associated to a particle

Python Representation

( X_COORDINATE @ TOLINALG @ POSITION @ ENDVERTEX ) - ( X_COORDINATE @ TOLINALG @ POSITION @ OWNPV )

OWNPVVDY()

Distance along the y-axis between the endvertex and the PV associated to a particle

Python Representation

( Y_COORDINATE @ TOLINALG @ POSITION @ ENDVERTEX ) - ( Y_COORDINATE @ TOLINALG @ POSITION @ OWNPV )

OWNPVVDZ()

Distance along the z-axis between the endvertex and the PV associated to a particle

Python Representation

( Z_COORDINATE @ TOLINALG @ POSITION @ ENDVERTEX ) - ( Z_COORDINATE @ TOLINALG @ POSITION @ OWNPV )

OWNPVX()

X-coordinate of the PV associated to the particle

Python Representation

X_COORDINATE @ TOLINALG @ POSITION @ OWNPV

OWNPVY()

Y-coordinate of the PV associated to the particle

Python Representation

Y_COORDINATE @ TOLINALG @ POSITION @ OWNPV

OWNPVZ()

Z-coordinate of the PV associated to the particle

Python Representation

Z_COORDINATE @ TOLINALG @ POSITION @ OWNPV

OWNPV_POS()[source]

Position of OWNPV()

Functor’s call operator expects a particle-like object.

Parameters

Vertices – DataHandle of the vertices

P()

Get the magnitude of the momentum vector (see THREEMOMENTUM() for definition).

Functor’s call expects a particle-like object

Python Representation

MAGNITUDE @ THREEMOMENTUM

LoKi Equivalent
  • P

PARTICLE_ID()

Particle ID of a Particle or MCParticle.

C++ Representation

::Functors::Simulation::Particle_Id{}

LoKi Equivalents
  • MCID

  • PID

PARTICLE_PARAMS_CTAU()

Returns the c*tau of Gaudi::Math::ParticleParams

C++ Representation

::Functors::LHCbMath::ParticleParams::ctau{}

PARTICLE_PARAMS_FLIGHT_DISTANCE()

Returns the flight distance of Gaudi::Math::ParticleParams

C++ Representation

::Functors::LHCbMath::ParticleParams::flightDistance{}

PARTICLE_PARAMS_LEN_MOM_COV()

Returns the “Matrix” with correlation errors between momentum and decay length from Gaudi::Math::ParticleParams

C++ Representation

::Functors::LHCbMath::ParticleParams::lenMomCov{}

PARTICLE_PARAMS_LEN_POS_COV()

Returns the “Matrix” with correlation errors between position and decay length from Gaudi::Math::ParticleParams

C++ Representation

::Functors::LHCbMath::ParticleParams::lenPosCov{}

PARTICLE_PROPERTY(particle_name)

Get the particle properties of the specific ID (string representation)

Functor’s call operator expects no input

C++ Representation

::Functors::Particle::ParticlePropertyUser

Parameters

particle_name (str) – ID to check

PARTICLE_PROPERTY_WITH_SMALLEST_DELTACHI2(Functor: BoundFunctor, Relations: DataHandle) BoundFunctor[source]

Evaluates the particle property express by the functor of the related particle with the smallest delta chi2, defined as the absolute difference of the chi2 of the related particle and the reference one given a relation table

Parameters
  • Functor – BoundFunctor to apply to the related particle in the relation table giving the smallest delta chi2

  • Relations – DataHandle with the relation table

Returns

The particle property of the “related” particle with the smallest delta chi2

PDG_MASS(particle_name: str)[source]

Get the PDG mass given the specific ID (string representation), e.g. PDG_MASS(“pi+”)

For reference have a look at PARTICLE_PROPERTY()

It does not expects input

Parameters

particle_name – string representation of the particle ID

PERR2()[source]

Returns the uncertainty on the momentum of a particle

PHI()

Get the phi coordinate of a slope (see SLOPES() for definition).

Functor’s call expects a particle-like object

Python Representation

PHI_COORDINATE @ SLOPES

LoKi Equivalent
  • PHI

PHI_COORDINATE()

Get phi coordinate. Functor to be used in composition.

C++ Representation

::Functors::Common::Phi_Coordinate{}

PID_E()

Gives measure of the electron mass hypothesis relative to the pion hypotesis.

It is actually DLL(e-pi). Likelihood information is produced by each subsistem.

General information on PID could be found at the following TWiki page

Python Representation

VALUE_OR(Value=nan) @ _PID_E

LoKi Equivalent
  • PIDe

PID_K()

Gives measure of the kaon mass hypothesis relative to the pion hypotesis.

It is actually DLL(K-pi). Likelihood information is produced by RICH detectors.

General information on PID could be found at the following TWiki page

Python Representation

VALUE_OR(Value=nan) @ _PID_K

LoKi Equivalent
  • PIDK

PID_MU()

Gives measure of the muon mass hypothesis relative to the pion hypotesis.

It is actually DLL(mu-pi). Likelihood information is produced by each subsistem.

General information on PID could be found at the following TWiki page

Python Representation

VALUE_OR(Value=nan) @ _PID_MU

LoKi Equivalent
  • PIDmu

PID_P()

Gives measure of the proton mass hypothesis relative to the pion hypotesis.

It is actually DLL(p-pi). Likelihood information is produced by RICH detectors.

General information on PID could be found at the following TWiki page

Python Representation

VALUE_OR(Value=nan) @ _PID_P

LoKi Equivalent
  • PIDp

PID_PI()

CombDLLpi. Should be peaked at zero.

General information on PID could be found at the following TWiki page

Python Representation

VALUE_OR(Value=nan) @ _PID_PI

LoKi Equivalent
  • PIDpi

POD(Functor)

Try to convert an object representing a scalar number into a plain C++ type. For example, convert SIMDWrapper::scalar::float_v to float.

C++ Representation

::Functors::Adapters::ConvertToPOD

Parameters

Functor (BoundFunctor) – The functor to convert the return value of.

POSITION()

Get the position of an object.

C++ Representation

::Functors::Common::Position{}

POSITION_X()

Get the X-coordinate of the POSITION()

Python Representation

X_COORDINATE @ POSITION

POSITION_Y()

Get the Y-coordinate of the POSITION()

Python Representation

Y_COORDINATE @ POSITION

POSITION_Z()

Get the Z-coordinate of the POSITION()

Python Representation

Z_COORDINATE @ POSITION

POS_COV_MATRIX()

Get the covariance matrix for (x, y, z)

C++ Representation

::Functors::Particle::posCovMatrix{}

PPHASMUONINFO()

ProtoParticle has MUON info

Functor’s call operator expects a protoparticle.

C++ Representation

::Functors::Particle::PPHasMuonInfo{}

PPHASRICH()

ProtoParticle has RICH info

Functor’s call operator expects a protoparticle. Note: FIXME

C++ Representation

::Functors::Particle::PPHasRich{}

PROBNN_D()

MVA technique to establish deuterium mass hypothesis which keep in consideration the correlation between detector systems and includes tracking information.

General information on PID could be found at the following TWiki page

Python Representation

VALUE_OR(Value=nan) @ _PROBNN_D

PROBNN_E()

MVA technique to establish electron mass hypothesis which keep in consideration the correlation between detector systems and includes tracking information.

General information on PID could be found at the following TWiki page

Python Representation

VALUE_OR(Value=nan) @ _PROBNN_E

LoKi Equivalent
  • PROBNNe

PROBNN_GHOST()

MVA technique to establish ghost tracks hypothesis which keep in consideration the correlation between detector systems and includes tracking information.

General information on PID could be found at the following TWiki page

Python Representation

VALUE_OR(Value=nan) @ _PROBNN_GHOST

LoKi Equivalent
  • PROBNNghost

PROBNN_K()

MVA technique to establish kaon mass hypothesis which keep in consideration the correlation between detector systems and includes tracking information.

General information on PID could be found at the following TWiki page

Python Representation

VALUE_OR(Value=nan) @ _PROBNN_K

LoKi Equivalent
  • PROBNNk

PROBNN_MU()

MVA technique to establish muon mass hypothesis which keep in consideration the correlation between detector systems and includes tracking information.

General information on PID could be found at the following TWiki page

Python Representation

VALUE_OR(Value=nan) @ _PROBNN_MU

LoKi Equivalent
  • PROBNNmu

PROBNN_P()

MVA technique to establish proton mass hypothesis which keep in consideration the correlation between detector systems and includes tracking information.

General information on PID could be found at the following TWiki page

Python Representation

VALUE_OR(Value=nan) @ _PROBNN_P

LoKi Equivalent
  • PROBNNp

PROBNN_PI()

MVA technique to establish pion mass hypothesis which keep in consideration the correlation between detector systems and includes tracking information.

General information on PID could be found at the following TWiki page

Python Representation

VALUE_OR(Value=nan) @ _PROBNN_PI

LoKi Equivalent
  • PROBNNpi

PROTOPARTICLE()

Get the ProtoParticle from a Particle

C++ Representation

::Functors::Particle::GetProtoParticle{}

PT()

Get the transverse momentum (see THREEMOMENTUM() for definition).

Functor’s call expects a particle-like object

Python Representation

RHO_COORDINATE @ THREEMOMENTUM

LoKi Equivalents
  • PT

  • APT

PT_WITH_BREM()

Get the transverse momentum of a track with brem correction

Python Representation

RHO_COORDINATE @ THREEMOMENTUM @ WITH_BREM

PX()

Get the X-coordinate of the momentum (see THREEMOMENTUM() for definition).

Functor’s call expects a particle-like object

Python Representation

X_COORDINATE @ THREEMOMENTUM

LoKi Equivalent
  • PX

PY()

Get the Y-coordinate of the momentum (see THREEMOMENTUM() for definition).

Functor’s call expects a particle-like object

Python Representation

Y_COORDINATE @ THREEMOMENTUM

LoKi Equivalent
  • PY

PZ()

Get the Z-coordinate of the momentum (see THREEMOMENTUM() for definition).

Functor’s call expects a particle-like object

Python Representation

Z_COORDINATE @ THREEMOMENTUM

LoKi Equivalent
  • PZ

P_WITH_BREM()

Get the magnitude of the momentum vector of a track with brem correction

Python Representation

MAGNITUDE @ THREEMOMENTUM @ WITH_BREM

QOVERP()

q/p

C++ Representation

::Functors::Track::QoverP{}

RECSUMMARY_INFO(rec_summary: DataHandle, DataType: Union[str, int])[source]

Extracts DataType information from LHCb::RecSummary.DataType

Parameters
REFERENCEPOINT()

Get the track reference point (position at which the momentum of the particle is evaluated)

C++ Representation

::Functors::Track::ReferencePoint{}

REFERENCEPOINT_X()

Get the X-coordinate of the reference point (see REFERENCEPOINT() for definition).

Python Representation

X_COORDINATE @ REFERENCEPOINT

REFERENCEPOINT_Y()

Get the Y-coordinate of the reference point (see REFERENCEPOINT() for definition).

Python Representation

Y_COORDINATE @ REFERENCEPOINT

REFERENCEPOINT_Z()

Get the Z-coordinate of the reference point (see REFERENCEPOINT() for definition).

Python Representation

Z_COORDINATE @ REFERENCEPOINT

RELATIONS()

Given a relation table, return the set of relations contained

C++ Representation

::Functors::Common::Relations{}

REQUIRE_CLOSE(F1, F2, AbsDiff: float = 1e-34, RelDiff: float = 1e-08)[source]

Check if the output of two functors that return floating point values are close to each other within some absolute difference and/or relative difference The condition imposed is “( F1 == F2 ) || ( &#124;F1 - F2&#124; < max( AbsDiff, RelDiff * ( &#124;F1&#124; + &#124;F2&#124; ) ) )”

Parameters
  • F1 – The first functor

  • F2 – The second functor

  • AbsDiff – The absolute difference

  • RelDiff – The relative difference

Note

The functor’s call operator expects two inputs. These inputs are the restuls of the two functors F1 and F2.

Example

>>> import Functors as F
>>> F.REQUIRE_CLOSE(F.PT, 1000.)
('Functors::bind( ::Functors::Common::RequireClose( /* The absolute difference between two numbers */ 1e-34f, /* The relative difference between two numbers */ 1e-08f ), Functors::chain( ::Functors::Common::Rho_Coordinate{}, ::Functors::Track::ThreeMomentum{} ), 1000.0f )', '_REQUIRE_CLOSE(AbsDiff=1e-34, RelDiff=1e-08).bind( ( RHO_COORDINATE @ THREEMOMENTUM ), 1000.0 )')
>>> F.REQUIRE_CLOSE(F.MASS, F.PDG_MASS("J/psi(1S)"))
('Functors::bind( ::Functors::Common::RequireClose( /* The absolute difference between two numbers */ 1e-34f, /* The relative difference between two numbers */ 1e-08f ), ::Functors::Composite::Mass{}, Functors::chain( ::Functors::Composite::Mass{}, ::Functors::Particle::ParticlePropertyUser( /* ID to check */ std::string{"J/psi(1S)"} ) ) )', '_REQUIRE_CLOSE(AbsDiff=1e-34, RelDiff=1e-08).bind( MASS, ( MASS @ PARTICLE_PROPERTY(particle_name=J/psi(1S)) ) )')
REVERSE_RANGE()

Return the reversed range

C++ Representation

::Functors::Functional::Reverse{}

RHO_COORDINATE()

Get rho coordinate. Functor to be used in composition.

C++ Representation

::Functors::Common::Rho_Coordinate{}

RICH1_GAS_USED()

Rich 1 gas flag.

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::Rich1GasUsed{}

RICH2_GAS_USED()

Rich 2 gas flag.

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::Rich2GasUsed{}

RICH_DLL_BT()

Rich-based DLL for below threshold tracks.

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::RichDLLbt{}

RICH_DLL_D()

Rich-based DLL for deuteron-ID.

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::RichDLLd{}

RICH_DLL_E()

Rich-based DLL for electron-ID.

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::RichDLLe{}

RICH_DLL_K()

Rich-based DLL for kaon-ID.

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::RichDLLk{}

RICH_DLL_MU()

Rich-based DLL for mu-ID.

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::RichDLLmu{}

RICH_DLL_P()

Rich-based DLL for proton-ID.

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::RichDLLp{}

RICH_DLL_PI()

Rich-based DLL for pion-ID.

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::RichDLLpi{}

RICH_SCALED_DLL_E()

Rich-based DLL for electron-ID. Scaled with monotonic function to approximate true DLL. For usage in combined DLLs (with other subdetectors).

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::RichScaledDLLe{}

RICH_SCALED_DLL_MU()

Rich-based DLL for mu-ID. Scaled with monotonic function to approximate true DLL. For usage in combined DLLs (with other subdetectors).

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::RichScaledDLLmu{}

RICH_THRESHOLD_DE()

Rich threshold for deuterons.

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::RichThresholdDe{}

RICH_THRESHOLD_EL()

Rich threshold for electrons.

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::RichThresholdEl{}

RICH_THRESHOLD_KA()

Rich threshold for kaons.

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::RichThresholdKa{}

RICH_THRESHOLD_MU()

Rich threshold for muons.

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::RichThresholdMu{}

RICH_THRESHOLD_PI()

Rich threshold for pions.

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::RichThresholdPi{}

RICH_THRESHOLD_PR()

Rich threshold for protons.

Functor’s call operator expects a particle-like object.

C++ Representation

::Functors::PID::RichThresholdPr{}

RPPVIPCHI2(Vertices: Optional[DataHandle] = None)[source]

Evaluates the impact parameter chi2 of a particle (related one) w.r.t. the primary vertex of another particle (reference one)

Binary functor: Functor’s call operator expects two particle-like objects

Parameters

Vertices – DataHandle of the vertices

Example

>>> import Functors as F
>>> from PyConf.Algorithms import WeightedRelTableAlg
>>> from Functors.tests.categories import dummy_data_particle_range, dummy_data_pv_container
>>> alg = WeightedRelTableAlg(name="WeightedRelTableAlg_RPPVIPCHI2", InputCandidates = dummy_data_particle_range, ReferenceParticles = dummy_data_particle_range, Cut = F.RPPVIPCHI2(dummy_data_pv_container) > 12)
>>> alg.OutputRelations
DataHandle('/Event/WeightedRelTableAlg_RPPVIPCHI2/OutputRelations')
RUNNUMBER(odin: DataHandle)[source]

Extracts run number from ODIN

Functor’s call operator expects no input.

Parameters

odin – DataHandle of the odin bank

SDOCA(Child1, Child2)

Compute the distance of closest approach between two ‘states’.

C++ Representation

::Functors::Combination::SDistanceOfClosestApproach

Parameters
  • Child1 (int) – Index [starting from 1] of the first child to consider.

  • Child2 (int) – Index [starting from 1] of the second child to consider.

SDOCACHI2(Child1, Child2)

Compute the significance of the distance of closest approach between two ‘states’.

C++ Representation

::Functors::Combination::SDistanceOfClosestApproachChi2

Parameters
  • Child1 (int) – Index [starting from 1] of the first child to consider.

  • Child2 (int) – Index [starting from 1] of the second child to consider.

SHARE_BPV(Vertices: DataHandle)[source]

Check whenever two particles are sharing the same BPV()

Binary functor: Functor’s call operator expects two particle-like objects

Parameters

Vertices – DataHandle of the vertices

Example:

>>> import Functors as F
>>> from Functors.tests.categories import dummy_data_particle_range, dummy_data_pv_container
>>> from PyConf.Algorithms import WeightedRelTableAlg
>>> alg = WeightedRelTableAlg(name="WeightedRelTableAlg_SHARE_BPV", InputCandidates = dummy_data_particle_range, ReferenceParticles = dummy_data_particle_range, Cut = F.SHARE_BPV(dummy_data_pv_container) )
>>> alg.OutputRelations
DataHandle('/Event/WeightedRelTableAlg_SHARE_BPV/OutputRelations')
SHARE_TRACKS()

Check whenever two particles are sharing the same track

Binary functor: Functor’s call operator expects two particle-like objects

Args: Vertices: DataHandle of the vertices

Example:

>>> import Functors as F
>>> from PyConf.Algorithms import WeightedRelTableAlg
>>> from Functors.tests.categories import dummy_data_particle_range, dummy_data_pv_container
>>> alg = WeightedRelTableAlg(name='WeightedRelTableAlg_SHARETRACKS', InputCandidates = dummy_data_particle_range, ReferenceParticles = dummy_data_particle_range, Cut = F.SHARE_TRACKS())
>>> alg.OutputRelations
DataHandle('/Event/WeightedRelTableAlg_SHARETRACKS/OutputRelations')
Python Representation

( TRACK @ PROTOPARTICLE @ _FORWARDARGS(index=0) ) == ( TRACK @ PROTOPARTICLE @ _FORWARDARGS(index=1) )

SIGNED_DELTA_MASS(particle_name: str)[source]

Get the signed difference between the reconstructed and the PDG mass (for reference see PDG_MASS()) It expects a particle-like object as input.

Parameters

particle_name – string representation of the particle ID

SIZE(dh: DataHandle)[source]

Size of the container at the given TES location

Parameters

dh – Datahandle of TES location from which container will be retrieved

SIZE_OF()

Get Size of input

C++ Representation

::Functors::detail::SizeOf{}

SLOPES()

Get the slopes vector (tx=dx/dz,ty=dy/dz,1.) from a track

C++ Representation

::Functors::Track::Slopes{}

SMALLEST_DELTACHI2(Relations: DataHandle) BoundFunctor[source]

Evaluates the smallest delta chi2, defined as the absolute difference of the chi2 of the related particle and the reference particle given a relation table

Parameters

Relations – DataHandle to the relation table that maps a “reference” particle to several “related” particles.

Returns

The value of the smallest delta chi2

SQRT()

Evaluates the square root of a scalar quantity

C++ Representation

::Functors::Common::Sqrt{}

STATES()

Retrieve const Container with pointers to all the states

C++ Representation

::Functors::Track::States{}

SUBCOMB(Functor)

Apply functor on a SubCombination.

Functor’s call operator expects a composite like object.

C++ Representation

::Functors::Adapters::SubCombination

Parameters
  • Functor (BoundFunctor) – The functor to apply on the subcombination.

  • Indices (TemplateParameter-template_list_arg_formatter) – Tuple of indices to build the subcombination from (starting from 1).

SUM(Functor)

Calculate the [scalar] sum of the given functor value.

Functor’s call operator expects a composite like object.

C++ Representation

::Functors::Adapters::Accumulate

LoKi Equivalents
  • ASUM

  • ANUM(<predicate>) \(\equiv\) Functors.SUM(<predicate>)

Parameters

Functor (BoundFunctor) – The functor to accumulate the return value of.

SUMCONE(Functor: BoundFunctor, Relations: DataHandle) BoundFunctor[source]

Evaluates the sum of the results of the application of the functor to each particle on the TO side of the table

Parameters
  • Functor – The functor to apply to all the related particles

  • Relations – DataHandle with the relation table

Returns

The sum of the mapped functor

SUM_RANGE()

Return the sum of a range of values

C++ Representation

::Functors::Functional::Sum{}

TCK(DecReports: DataHandle)[source]

Extracts TCK from selection DecReports

Functor’s call operator expects no input.

Parameters

DecReports – DataHandle of the DecReports

TES(datahandles: Union[DataHandle, List[DataHandle]]) BoundFunctor[source]

Return references to specified TES locations

When invoked, this functor will return a tuple of references to the specified TES locations.

Note: This functor is not for direct use in selection, but rather for the composition of more complex functors. Internally it is a helper function to create _TES() functor

Parameters

datahandles – Datahandles of the TES locations

THREEMOMENTUM()

3-Momentum vector.

C++ Representation

::Functors::Track::ThreeMomentum{}

THREE_MOM_COV_MATRIX()

Get the covariance matrix for (px, py, pz)

C++ Representation

::Functors::Particle::threeMomCovMatrix{}

THREE_MOM_POS_COV_MATRIX()

Get the covariance matrix for (px, py, pz) x (x, y, z): [(x,px), (x,py), (x,pz)] [(y,px), (y,py), (y,pz)] [(z,px), (z,py), (z,pz)]

C++ Representation

::Functors::Particle::threeMomPosCovMatrix{}

TO()

Given a relation, return the TO side

C++ Representation

::Functors::Common::To{}

TOLINALG()

trafo gaudi/root classes to linalg vecs.

C++ Representation

::Functors::Common::ToLinAlg{}

TO_VALUE_RELATION_TABLE(Relations: DataHandle, default: Optional[float] = None) BoundFunctor[source]

Retrieve the ‘TO’ value of the relation table with protoparticles in the ‘FROM’ side (see PROTOPARTICLE() functor).

Parameters
  • Relations – Datahandle of the relations table

  • default – Default value to use in case the variable doesn’t exist

TRACK()

Get the track object from a ChargedBasic

C++ Representation

::Functors::Particle::GetTrack{}

TRACKFLAG()

Track flag.

Functor’s call operator expects a track-like object.

C++ Representation

::Functors::Track::Flag{}

TRACKHAST()

Returns True if track has hits in T stations, False otherwise

Functor’s call operator expects a track-like object.

Python Representation

TRACKHAST @ TRACKTYPE

LoKi Equivalent
  • TrHAST

TRACKHASUT()

Returns True if track has hits in UT detector, False otherwise

Functor’s call operator expects a track-like object.

Python Representation

TRACKHASUT @ TRACKTYPE

TRACKHASVELO()

Returns True if track has hits in Velo, False otherwise

Functor’s call operator expects a track-like object.

Python Representation

TRACKHASVELO @ TRACKTYPE

TRACKHISTORY()

ComposedBoundFunctor:

(
  CAST_TO_INT()
  @
  TRACKHISTORY()
)
Python Representation

CAST_TO_INT @ TRACKHISTORY

TRACKISCLONE()

Track flag contains Clone

Functor’s call operator expects a track-like object.

C++ Representation

::Functors::Track::HasTrackFlag<LHCb::Event::Enum::Track::Flag::Clone>{}

LoKi Equivalent
  • TrCLONE

TRACKISDOWNSTREAM()

Track type is Downstream

Functor’s call operator expects a track-like object.

C++ Representation

::Functors::Track::IsTrackType<LHCb::Event::Enum::Track::Type::Downstream>{}

TRACKISINVALID()

Track flag contains Invalid

Functor’s call operator expects a track-like object.

C++ Representation

::Functors::Track::HasTrackFlag<LHCb::Event::Enum::Track::Flag::Invalid>{}

TRACKISLONG()

Track type is Long

Functor’s call operator expects a track-like object.

C++ Representation

::Functors::Track::IsTrackType<LHCb::Event::Enum::Track::Type::Long>{}

LoKi Equivalent
  • ISLONG

TRACKISSELECTED()

Track flag contains Selected

Functor’s call operator expects a track-like object.

C++ Representation

::Functors::Track::HasTrackFlag<LHCb::Event::Enum::Track::Flag::Selected>{}

LoKi Equivalent
  • TrIPSELECTED

TRACKISTTRACK()

Track type is Ttrack

Functor’s call operator expects a track-like object.

C++ Representation

::Functors::Track::IsTrackType<LHCb::Event::Enum::Track::Type::Ttrack>{}

LoKi Equivalent
  • TRTTRACK

TRACKISUPSTREAM()

Track type is Upstream

Functor’s call operator expects a track-like object.

C++ Representation

::Functors::Track::IsTrackType<LHCb::Event::Enum::Track::Type::Upstream>{}

LoKi Equivalent
  • TRUP

TRACKISVELO()

Track type is Velo

Functor’s call operator expects a track-like object.

C++ Representation

::Functors::Track::IsTrackType<LHCb::Event::Enum::Track::Type::Velo>{}

TRACKISVELOBACKWARD()

Track type is VeloBackward

Functor’s call operator expects a track-like object.

C++ Representation

::Functors::Track::IsTrackType<LHCb::Event::Enum::Track::Type::VeloBackward>{}

TRACKTYPE()

Track type.

C++ Representation

::Functors::Track::Type{}

LoKi Equivalent
  • TrTYPE

TRACK_COVARIANCE()

Get the covariance matrix for an track state: (x,y,tx,ty,qop).

C++ Representation

::Functors::Track::Covariance{}

TRACK_MOMVEC()

Get the 3-vector momentum of a track (see TRACK() for definition)

Functor’s call operator expects a ChargedBasic

Python Representation

THREEMOMENTUM @ TRACK

TRACK_P()

Get the magnitude of the momentum vector of a track (see TRACK() for definition)

Functor’s call operator expects a ChargedBasic

Python Representation

MAGNITUDE @ THREEMOMENTUM @ TRACK

TRACK_POSVEC_CLOSESTTOBEAM()

Get the position vector of TRACK() at the closest-to-beam state (see CLOSESTTOBEAM() for definition).

Functor’s call operator expects a ChargedBasic

Python Representation

POSITION @ CLOSESTTOBEAM @ TRACK

TRACK_POS_CLOSESTTOBEAM_X()

Get the X-coordinate of the position vector of a track at the closest-to-beam state (see CLOSESTTOBEAM() for definition).

Functor’s call operator expects a ChargedBasic

Python Representation

X_COORDINATE @ POSITION @ CLOSESTTOBEAM @ TRACK

TRACK_POS_CLOSESTTOBEAM_Y()

Get the Y-coordinate of the position vector of a track at the closest-to-beam state (see CLOSESTTOBEAM() for definition).

Functor’s call operator expects a ChargedBasic

Python Representation

Y_COORDINATE @ POSITION @ CLOSESTTOBEAM @ TRACK

TRACK_POS_CLOSESTTOBEAM_Z()

Get the Z-coordinate of the position vector of a track at the closest-to-beam state (see CLOSESTTOBEAM() for definition).

Functor’s call operator expects a ChargedBasic

Python Representation

Z_COORDINATE @ POSITION @ CLOSESTTOBEAM @ TRACK

TRACK_PT()

Get the transverse momentum of a track (see TRACK() for definition)

Functor’s call operator expects a ChargedBasic

Python Representation

RHO_COORDINATE @ THREEMOMENTUM @ TRACK

TRACK_PX()

Get the X-coordinate of the momentum of a track (see TRACK_MOMVEC() for definition)

Functor’s call operator expects a ChargedBasic

Python Representation

X_COORDINATE @ THREEMOMENTUM @ TRACK

TRACK_PY()

Get the Y-coordinate of the momentum of a track (see TRACK_MOMVEC() for definition)

Functor’s call operator expects a ChargedBasic

Python Representation

Y_COORDINATE @ THREEMOMENTUM @ TRACK

TRACK_PZ()

Get the Z-coordinate of the momentum of a track (see TRACK_MOMVEC() for definition)

Functor’s call operator expects a ChargedBasic

Python Representation

Z_COORDINATE @ THREEMOMENTUM @ TRACK

TWOBODY_TILT(axis_str: str)[source]

axis_str should be X or Y, case sensitive

TWOBODY_YZ_INTERSECTION_Y()

The y-position of the y-z straight line intersection calculated using the slopes and closest to beam positions. Can be used to help reduce combinatorics before vertex fit if combination mass is unreliable.

Python Representation

( CHILD(Index=1, Functor=( Y_COORDINATE @ SLOPES )) * ( ( CHILD(Index=2, Functor=( ( VALUE_OR(Value=0) @ Y_COORDINATE @ POSITION @ CLOSESTTOBEAM @ TRACK ) - ( ( Y_COORDINATE @ SLOPES ) * ( VALUE_OR(Value=0) @ Z_COORDINATE @ POSITION @ CLOSESTTOBEAM @ TRACK ) ) )) - CHILD(Index=1, Functor=( ( VALUE_OR(Value=0) @ Y_COORDINATE @ POSITION @ CLOSESTTOBEAM @ TRACK ) - ( ( Y_COORDINATE @ SLOPES ) * ( VALUE_OR(Value=0) @ Z_COORDINATE @ POSITION @ CLOSESTTOBEAM @ TRACK ) ) )) ) / ( CHILD(Index=1, Functor=( Y_COORDINATE @ SLOPES )) - CHILD(Index=2, Functor=( Y_COORDINATE @ SLOPES )) ) ) ) + CHILD(Index=1, Functor=( ( VALUE_OR(Value=0) @ Y_COORDINATE @ POSITION @ CLOSESTTOBEAM @ TRACK ) - ( ( Y_COORDINATE @ SLOPES ) * ( VALUE_OR(Value=0) @ Z_COORDINATE @ POSITION @ CLOSESTTOBEAM @ TRACK ) ) ))

TWOBODY_YZ_INTERSECTION_Z()

The z-position of the y-z straight line intersection calculated using the slopes and closest to beam positions. Can be used to help reduce combinatorics before vertex fit if combination mass is unreliable.

Python Representation

( CHILD(Index=2, Functor=( ( VALUE_OR(Value=0) @ Y_COORDINATE @ POSITION @ CLOSESTTOBEAM @ TRACK ) - ( ( Y_COORDINATE @ SLOPES ) * ( VALUE_OR(Value=0) @ Z_COORDINATE @ POSITION @ CLOSESTTOBEAM @ TRACK ) ) )) - CHILD(Index=1, Functor=( ( VALUE_OR(Value=0) @ Y_COORDINATE @ POSITION @ CLOSESTTOBEAM @ TRACK ) - ( ( Y_COORDINATE @ SLOPES ) * ( VALUE_OR(Value=0) @ Z_COORDINATE @ POSITION @ CLOSESTTOBEAM @ TRACK ) ) )) ) / ( CHILD(Index=1, Functor=( Y_COORDINATE @ SLOPES )) - CHILD(Index=2, Functor=( Y_COORDINATE @ SLOPES )) )

TX()

Get the X-coordinate of the slope (see SLOPES() for definition).

Functor’s call expects a particle-like object

Python Representation

X_COORDINATE @ SLOPES

TY()

Get the Y-coordinate of the slope (see SLOPES() for definition).

Functor’s call expects a particle-like object

Python Representation

Y_COORDINATE @ SLOPES

UNITVECTOR()

Normalize vector.

C++ Representation

::Functors::Common::UnitVector{}

VALUE()

Return contained value of an optional. If no value is contained, it throws an exception. This functor is used currently for example to store Tis/Tos information using relation table, where a value is always expected in the optional.

C++ Representation

::Functors::Functional::Value{}

VALUE_FROM_DICT(Key)

Return value from a dictionary with specified key. If the key is not found, it throws an exception.

C++ Representation

::Functors::Functional::ValueFromDict

Parameters

Key (BoundFunctor) – The key to look up.

VALUE_OR(Value)

Return contained value of optional or specified default if optional is empty

C++ Representation

::Functors::Functional::ValueOr

Parameters

Value (BoundFunctor) – The default value.

VTX_DLS()

Return the decay length significance w.r.t. the given vertex.

C++ Representation

::Functors::Composite::ComputeDecayLengthSignificance{}

VTX_FDCHI2()

Return the flight distance chi2 w.r.t. the given vertex. The first implicit argument type is a vertex.

C++ Representation

::Functors::Composite::FlightDistanceChi2ToVertex{}

VTX_LTIME()

Return the particle lifetime w.r.t. the given vertex.

C++ Representation

::Functors::Composite::Lifetime{}

WEIGHT()

Given a relation, return the WEIGHT side

C++ Representation

::Functors::Common::Weight{}

WITH_BREM()

Gives wrapper around object to use brem-corrected momenta / covariances, no overlap check unless done in composite builder

C++ Representation

::Functors::Track::Bremsstrahlung{}

X_COORDINATE()

Get X coordinate. Functor to be used in composition.

C++ Representation

::Functors::Common::X_Coordinate{}

Y_COORDINATE()

Get Y coordinate. Functor to be used in composition.

C++ Representation

::Functors::Common::Y_Coordinate{}

Z_COORDINATE()

Get Z coordinate. Functor to be used in composition.

C++ Representation

::Functors::Common::Z_Coordinate{}

Functors.math

in_range(min_val, functor, max_val)[source]

Wrap the math::in_range functor.

This is efficient and only evaluates the functor once.

Example usage:

>>> import Functors.math as fmath
>>> from Functors import MASS
>>> fmath.in_range(1500, MASS, 2500)
('::Functors::math::in_range( std::integral_constant<int, 1500>{}, ::Functors::Composite::Mass{}, std::integral_constant<int, 2500>{} )', '::Functors::math::in_range( 1500, MASS, 2500 )')
log(functor)[source]

Wrap the math::log functor.

Example usage:

>>> import Functors.math as fmath
>>> from Functors import PT
>>> fmath.log(PT) > 1.0
('operator>( ::Functors::math::log( Functors::chain( ::Functors::Common::Rho_Coordinate{}, ::Functors::Track::ThreeMomentum{} ) ), 1.0f )', '( ::Functors::math::log( ( RHO_COORDINATE @ THREEMOMENTUM ) ) > 1.0 )')
sign(functor)[source]

Wrap the math::sign functor.

Example usage:

>>> import Functors.math as fmath
>>> from Functors import PT
>>> fmath.sign(PT) > 0
('operator>( ::Functors::math::sign( Functors::chain( ::Functors::Common::Rho_Coordinate{}, ::Functors::Track::ThreeMomentum{} ) ), std::integral_constant<int, 0>{} )', '( ::Functors::math::sign( ( RHO_COORDINATE @ THREEMOMENTUM ) ) > 0 )')
similarity(vec, cov_matrix)[source]

Wrap for “Similarity” functor. Given vector “vec” of length “n” and covariance matrix of size “nxn”, similarity computes: vec.transpose() * cov_matrix * vec

Example usage:

>>> import Functors.math as fmath
>>> from Functors import THREEMOMENTUM, THREE_MOM_COV_MATRIX, P
>>> fmath.similarity(THREEMOMENTUM/P, THREE_MOM_COV_MATRIX)
('::Functors::math::similarity( operator/( ::Functors::Track::ThreeMomentum{}, Functors::chain( ::Functors::Common::Magnitude{}, ::Functors::Track::ThreeMomentum{} ) ), ::Functors::Particle::threeMomCovMatrix{} )', '::Functors::math::similarity( ( THREEMOMENTUM / ( MAGNITUDE @ THREEMOMENTUM ) ), THREE_MOM_COV_MATRIX )')